mirror of https://github.com/aminya/setup-cpp
4 lines
344 KiB
JavaScript
4 lines
344 KiB
JavaScript
#!/usr/bin/env node
|
||
function e(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}function r(e,t,r){const n=new Io(e,t,r);process.stdout.write(""+n+Oo.EOL)}function n(){return No>xo.length-16&&(Gr.randomFillSync(xo),No=0),xo.slice(No,No+=16)}function o(e){return"string"==typeof e&&Ao.test(e)}function i(e,t=0){const r=(Po[e[t+0]]+Po[e[t+1]]+Po[e[t+2]]+Po[e[t+3]]+"-"+Po[e[t+4]]+Po[e[t+5]]+"-"+Po[e[t+6]]+Po[e[t+7]]+"-"+Po[e[t+8]]+Po[e[t+9]]+"-"+Po[e[t+10]]+Po[e[t+11]]+Po[e[t+12]]+Po[e[t+13]]+Po[e[t+14]]+Po[e[t+15]]).toLowerCase();if(!o(r))throw TypeError("Stringified UUID is invalid");return r}function s(e){if(!o(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function a(e,t,r){function n(e,n,o,a){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;e.length>r;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=s(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,o){a=a||0;for(let e=0;16>e;++e)o[a+e]=c[e];return o}return i(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function c(e){const t="https:"===e.protocol;if(function(e){if(!e.hostname)return!1;if(function(e){const t=e.toLowerCase();return"localhost"===t||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}(e.hostname))return!0;const t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;e.port?r=Number(e.port):"http:"===e.protocol?r=80:"https:"===e.protocol&&(r=443);const n=[e.hostname.toUpperCase()];"number"==typeof r&&n.push(`${n[0]}:${r}`);for(const o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||n.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))return!0;return!1}(e))return;const r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Xo(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Xo("http://"+r)}}function l(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Qo.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=d(r,n,o),s=0,a=t.requests.length;a>s;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function u(e,t){var r=this;l.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=p({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=Jo.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function d(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function p(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}function f(){return vi||(vi=1,function(e){var t=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=Cr,n=kr,{access:o,appendFile:i,writeFile:s}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY",e.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";const a=new class{constructor(){this._buffer=""}filePath(){return t(this,void 0,void 0,(function*(){if(this._filePath)return this._filePath;const t=process.env[e.SUMMARY_ENV_VAR];if(!t)throw Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield o(t,n.constants.R_OK|n.constants.W_OK)}catch(r){throw Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");return t?`<${e}${n}>${t}</${e}>`:`<${e}${n}>`}write(e){return t(this,void 0,void 0,(function*(){const t=!!(null==e?void 0:e.overwrite),r=yield this.filePath(),n=t?s:i;return yield n(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()}))}clear(){return t(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:!0})}))}stringify(){return this._buffer}isEmptyBuffer(){return 0===this._buffer.length}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t}),n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=!1){const r=t?"ol":"ul",n=e.map((e=>this.wrap("li",e))).join(""),o=this.wrap(r,n);return this.addRaw(o).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if("string"==typeof e)return this.wrap("td",e);const{header:t,data:r,colspan:n,rowspan:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,r,s)})).join("");return this.wrap("tr",t)})).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:o}=r||{},i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(s).addEOL()}addHeading(e,t){const r="h"+t,n=this.wrap(["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t}),n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}};e.markdownSummary=a,e.summary=a}(_i)),_i}function h(){return Ei||(Ei=1,function(e){function t(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function r(e,t={}){l.issueCommand("error",d.toCommandProperties(t),e instanceof Error?""+e:e)}function n(e){l.issue("group",e)}function o(){l.issue("endgroup")}var i=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},c=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const l=vo,u=To,d=bo,p=a(Cr),m=a(Hr),y=function(){if(yi)return Wo;yi=1;var e=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.OidcClient=void 0;const t=mi,n=gi,o=h();class i{static createHttpClient(e=!0,r=10){const o={allowRetries:e,maxRetries:r};return new t.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(i.getRequestToken())],o)}static getRequestToken(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw 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 Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(t){var r;return e(this,void 0,void 0,(function*(){const e=i.createHttpClient(),n=yield e.getJson(t).catch((e=>{throw Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)})),o=null===(r=n.result)||void 0===r?void 0:r.value;if(!o)throw Error("Response json body do not have ID Token field");return o}))}static getIDToken(t){return e(this,void 0,void 0,(function*(){try{let e=i.getIDTokenUrl();t&&(e=`${e}&audience=${encodeURIComponent(t)}`),o.debug("ID token url is "+e);const r=yield i.getCall(e);return o.setSecret(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return Wo.OidcClient=i,Wo}();var g,w;(w=g=e.ExitCode||(e.ExitCode={}))[w.Success=0]="Success",w[w.Failure=1]="Failure",e.exportVariable=function(e,t){const r=d.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV)return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t));l.issueCommand("set-env",{name:e},r)},e.setSecret=function(e){l.issueCommand("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?u.issueFileCommand("PATH",e):l.issueCommand("add-path",{},e),process.env.PATH=`${e}${m.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,r){const n=t(e,r).split("\n").filter((e=>""!==e));return r&&!1===r.trimWhitespace?n:n.map((e=>e.trim()))},e.getBooleanInput=function(e,r){const n=t(e,r);if(["true","True","TRUE"].includes(n))return!0;if(["false","False","FALSE"].includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},e.setOutput=function(e,t){if(process.env.GITHUB_OUTPUT)return u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t));process.stdout.write(p.EOL),l.issueCommand("set-output",{name:e},d.toCommandValue(t))},e.setCommandEcho=function(e){l.issue("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=g.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){l.issueCommand("debug",{},e)},e.error=r,e.warning=function(e,t={}){l.issueCommand("warning",d.toCommandProperties(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){l.issueCommand("notice",d.toCommandProperties(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+p.EOL)},e.startGroup=n,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{o()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t));l.issueCommand("save-state",{name:e},d.toCommandValue(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield y.OidcClient.getIDToken(e)}))};var v=f();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return v.summary}});var b=f();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return b.markdownSummary}});var E=function(){if(bi)return Si;bi=1;var e=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=mo&&mo.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Si,"__esModule",{value:!0}),Si.toPlatformPath=Si.toWin32Path=Si.toPosixPath=void 0;const n=r(Hr);return Si.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Si.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Si.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Si}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return E.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return E.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return E.toPlatformPath}})}(wo)),wo}function m(e){return yo.GITHUB_ACTIONS?Oi.error(e):console.log(`[31m${e}[0m`)}function y(e){return yo.GITHUB_ACTIONS?Oi.warning(e):console.log(`[33m${e}[0m`)}function g(e){return yo.GITHUB_ACTIONS?Oi.notice(e):console.log(`[94m${e}[0m`)}function w(e){return yo.GITHUB_ACTIONS?Oi.info(e):console.log(e)}function v(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function b(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){b(e,t||{},(function(e,t){e?n(e):r(t)}))}))}ta(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function E(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=ma.sync(e.command,{path:r[ya({env:r})],pathExt:t?ha.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=ha.resolve(o?e.options.cwd:"",s)),s}function _(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function S(e,t){return xa&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=Aa(e,t,r),o=Na.spawn(n.command,n.args,n.options);return Pa.hookChildProcess(o,n),o}function R(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function I(e){return e instanceof URL?fn(e):e}function T(e){if("string"==typeof e)return $l(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw Error("Input must be a string or a Uint8Array");return Cl(e)}function x(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function N(e,{checkOpen:t=!0}={}){return x(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function A(e,{checkOpen:t=!0}={}){return x(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function P(e,t){return N(e,t)&&A(e,t)}function $(){return this[Fl].next()}function C(e){return this[Fl].return(e)}function D({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ul(t,e),n=Object.create(Bl);return n[Fl]=r,n}function L(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=0>e?"-":"";e=0>e?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=e+"",t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length;i="0".repeat(Math.max(0,(o.length>0?2:1)-e))+i}else i+=t.verbose?" "+(s=r,1===(a=e)||1n===a?s:s+"s"):n;var s,a;o.push(i)}},s=function(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Iu(1e3*e)%1e3),nanoseconds:Math.trunc(Iu(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}(e),a=BigInt(s.days);if(i(a/365n,"year","y"),i(a%365n,"day","d"),i(Number(s.hours),"hour","h"),i(Number(s.minutes),"minute","m"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&1e3>e){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=1>e?Math.ceil(e):Math.round(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=(Math.round(Math.floor((r?Number(e%86400000n):e)/1e3%60*10**(c="number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1)+1e-7))/10**c).toFixed(c),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}var c;if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const l=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(l)}function k(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const o of e)Pf(o);const t=e.some((({readableObjectMode:e})=>e)),r=If(e,t),n=new Tf({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const o of e)n.add(o);return n}function M(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return Xm(function(){if(void 0===Oy){const e=Sy.sync("pwsh",{nothrow:!0});null!==e&&(Oy=e);const t=Sy.sync("powershell",{nothrow:!0});null!==t&&(Oy=t)}if(void 0===Oy)throw Error("Could not find powershell");return Oy}(),[...t,"-c",e],r)}function j(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function U(){return null!==Sy.sync("sudo",{nothrow:!0})}function F(){return 0===process.getuid?.()||!!process.env.CI}function B(){return F()&&U()}function G(e){return B()?"sudo "+e:e}function H(e,t=[],r=Ty){return B()?Jm(q(e,t),r):Km(e,z(t),r)}function V(e,t=[],r=Ty){return B()?Ym(q(e,t),r):Xm(e,z(t),r)}function q(e,t){return"sudo "+z([e,...t]).join(" ")}function z(e){return e.map((e=>`'${e}'`))}function W(){return"win32"===process.platform?xy():F()}async function X(e){if(("linux"===process.platform||"darwin"===process.platform)&&B()&&void 0!==process.env.SUDO_USER){let t=kr.statSync(e).isDirectory();await V("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],Ty)}}function K(){if(vg)return wg;vg=1;var e=og,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return wg=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),n(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return i}}function Y(){return mw?hw:(mw=1,hw=(dw?uw:(dw=1,uw=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(fw)return pw;fw=1;var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};return pw=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()}())}function J(){if(Ew)return bw;Ew=1;var e=vw?ww:(vw=1,ww=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return bw=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function Q(){return Pw?Aw:(Pw=1,Aw=function(){if(gw)return yw;gw=1;var e=Y(),t={object:!0,symbol:!0};return yw=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?Y().Symbol:function(){if(Nw)return xw;Nw=1;var e,t,r,n=sw,o=J(),i=Y().Symbol,s=function(){if(Sw)return _w;Sw=1;var e=sw,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return _w=function(o){for(var i,s,a=0;n[o+(a||"")];)++a;return n[o+=a||""]=!0,t(r,i="@@"+o,e.gs(null,(function(r){s||(s=!0,t(this,i,e(r)),s=!1)}))),i}}(),a=function(){if(Rw)return Ow;Rw=1;var e=sw,t=Y().Symbol;return Ow=function(r){return Object.defineProperties(r,{hasInstance:e("",t&&t.hasInstance||r("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||r("isConcatSpreadable")),iterator:e("",t&&t.iterator||r("iterator")),match:e("",t&&t.match||r("match")),replace:e("",t&&t.replace||r("replace")),search:e("",t&&t.search||r("search")),species:e("",t&&t.species||r("species")),split:e("",t&&t.split||r("split")),toPrimitive:e("",t&&t.toPrimitive||r("toPrimitive")),toStringTag:e("",t&&t.toStringTag||r("toStringTag")),unscopables:e("",t&&t.unscopables||r("unscopables"))})}}(),c=function(){if(Tw)return Iw;Tw=1;var e=sw,t=J(),r=Object.create(null);return Iw=function(n){return Object.defineProperties(n,{for:e((function(e){return r[e]?r[e]:r[e]=n(e+"")})),keyFor:e((function(e){var n;for(n in t(e),r)if(r[n]===e)return n}))})}}(),l=Object.create,u=Object.defineProperties,d=Object.defineProperty;if("function"==typeof i)try{i(),r=!0}catch(p){}else i=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},xw=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?i(o):(a=l(t.prototype),u(a,{__description__:n("",o=void 0===o?"":o+""),__name__:n("",s(o))}))},a(e),c(e),u(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),u(e.prototype,{toString:n((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:n((function(){return o(this)}))}),d(e.prototype,e.toPrimitive,n("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),d(e.prototype,e.toStringTag,n("c","Symbol")),d(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),d(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),xw}())}function Z(){return Bw?Fw:(Bw=1,Fw=(lw?cw:(lw=1,cw=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}))()?Array.from:function(){if(Uw)return jw;Uw=1;var e=Q().iterator,t=function(){if(Cw)return $w;Cw=1;var e={}.toString,t=e.call(function(){return arguments}());return $w=function(r){return e.call(r)===t}}(),r=function(){if(Lw)return Dw;Lw=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Dw=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Zy,o=rg,i=og,s=Vy,a=function(){if(Mw)return kw;Mw=1;var e={}.toString,t=e.call("");return kw=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,l=function(){}.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;return jw=function(p){var f,h,m,y,g,w,v,b,E,_,S=arguments[1],O=arguments[2];if(p=Object(i(p)),s(S)&&o(S),this&&this!==Array&&r(this))f=this;else{if(!S){if(t(p))return 1!==(g=p.length)?Array.apply(null,p):((y=[,])[0]=p[0],y);if(c(p)){for(y=Array(g=p.length),h=0;g>h;++h)y[h]=p[h];return y}}y=[]}if(!c(p))if(void 0!==(E=p[e])){for(v=o(E).call(p),f&&(y=new f),b=v.next(),h=0;!b.done;)_=S?l.call(S,O,b.value,h):b.value,f?(u.value=_,d(y,h,u)):y[h]=_,b=v.next(),++h;g=h}else if(a(p)){for(g=p.length,f&&(y=new f),h=0,m=0;g>h;++h)_=p[h],g>h+1&&(55296>(w=_.charCodeAt(0))||w>56319||(_+=p[++h])),_=S?l.call(S,O,_,m):_,f?(u.value=_,d(y,m,u)):y[m]=_,++m;g=m}if(void 0===g)for(g=n(p.length),f&&(y=new f(g)),h=0;g>h;++h)_=S?l.call(S,O,p[h],h):p[h],f?(u.value=_,d(y,h,u)):y[h]=_;return f&&(u.value=null,y.length=g),y},jw}())}function ee(){if(sv)return iv;sv=1;var e=ov?nv:(ov=1,nv=(ev?Zw:(ev=1,Zw=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:rv?tv:(rv=1,tv=function(e){return e!=e})),t=Zy,r=og,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return iv=function(a){var c,l,u;if(!e(a))return n.apply(this,arguments);for(l=t(r(this).length),c=u=isNaN(u=arguments[1])?0:0>u?t(this.length)-s(i(u)):s(u);l>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},iv}function te(){if(hv)return fv;hv=1;var e=rg,t=dg,r=function(){}.call;return fv=function(n,o){var i={},s=arguments[2];return e(o),t(n,(function(e,t,n,a){i[t]=r.call(o,s,e,t,n,a)})),i},fv}function re(){if(yv)return mv;yv=1;var e=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},t=function(t){var r,n,o=document.createTextNode(""),i=0;return new t((function(){var e;if(r)n&&(r=n.concat(r));else{if(!n)return;r=n}if(n=r,r=null,"function"==typeof n)return e=n,n=null,void e();for(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(o,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,o.data=i=++i%2)}};return mv=function(){if("object"==typeof process&&process&&"function"==typeof process.nextTick)return process.nextTick;if("function"==typeof queueMicrotask)return function(t){queueMicrotask(e(t))};if("object"==typeof document&&document){if("function"==typeof MutationObserver)return t(MutationObserver);if("function"==typeof WebKitMutationObserver)return t(WebKitMutationObserver)}return"function"==typeof setImmediate?function(t){setImmediate(e(t))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(t){setTimeout(e(t),0)}:null}()}function ne(){return Ev?bv:(Ev=1,bv=function(e){return"function"==typeof e})}function oe(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return Av||(Av=1,ab.exports=e,ab.exports.default=e),ab.exports}function ie(){if(Pv)return sb;Pv=1;var e=te(),t=function(){if(vv)return wv;vv=1;var e=[].forEach,t=Object.create;return wv=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},wv}(),r=function(){if(Rv)return Ov;Rv=1;var e=og,t=function(){if(Sv)return _v;Sv=1;var e=ne();return _v=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Ov=function(r){return t(e(r))}}(),n=function(){if(Nv)return xv;Nv=1;var e=function(){if(Tv)return Iv;Tv=1;var e=ne();return Iv=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return xv=function(t){var r=e(t);return r.length>100&&(r=r.slice(0,99)+"…"),r.replace(/[\n\r\u2028\u2029]/g,(function(e){return JSON.stringify(e).slice(1,-1)}))}}(),o=oe(),i=re(),s=Object.create,a=t("then","then:finally","done","done:finally");return pg.promise=function(t,c){var l=s(null),u=s(null),d=s(null);if(!0===t)t=null;else if(t=r(t),!a[t])throw new TypeError("'"+n(t)+"' is not valid promise mode");c.on("set",(function(e,r,n){var s=!1;if(!o(n))return u[e]=n,void c.emit("setasync",e,1);l[e]=1,d[e]=n;var a=function(t){var r=l[e];if(s)throw Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");r&&(delete l[e],u[e]=t,c.emit("setasync",e,r))},p=function(){s=!0,l[e]&&(delete l[e],delete d[e],c.delete(e))},f=t;if(f||(f="then"),"then"===f){var h=function(){i(p)};"function"==typeof(n=n.then((function(e){i(a.bind(this,e))}),h)).finally&&n.finally(h)}else if("done"===f){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");n.done(a,p)}else if("done:finally"===f){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof n.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");n.done(a),n.finally(p)}})),c.on("get",(function(e,t,r){var n;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=d[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete d[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),d=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},sb}async function se(e){try{return await kn.access(e),!0}catch{return!1}}function ae(e){const t=function(){if(B()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Vr("/Users/",process.env.SUDO_USER):Vr("/home/",process.env.SUDO_USER);{const e=Dr();if(""===e)return;return e}}();return void 0===t?e:e.replace(gb,t)}async function ce(e){const t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`\n# Automatically Generated by envosman ${e.guard}\nexport SOURCE_${e.guard.toUpperCase()}RC=0\n`;await se(e.rcPath)&&((await vb(e.rcPath,"utf8")).includes(t)||(await wb(e.rcPath,`\n${t}\n`),w(`Added ${t} to ${e.rcPath}`)))}async function le(e,t){await se(t)&&((await vb(t,"utf-8")).includes(e)||(await wb(t,e),w(`${e} was added to ${t}`)))}async function ue(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Eb,...r},o=function(e,t=!1){const r=t?Tb(e):e;return Cb(r,'"',"\\")}(t??"",n.escapeSpace);try{if(yo.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);Oi.exportVariable(e,o)}catch(i){m(i),await de(e,o,n)}else await de(e,o,n)}catch(i){m(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function de(e,t,r){const n=t??"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await M(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void w(`${e}='${n}' was set in the environment.`)):void w(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await _b(r),void(r.overwrite?(await Db(r.rcPath,`\nexport ${e}="${n}"\n`),w(`${e}="${n}" was added to "${r.rcPath}`)):(await Db(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),w(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function pe(e,t={}){const r={rcPath:Eb,...t};if(!function(e){return!!kb.some((t=>t.test(e)))&&(process.env.PATH?.split(qr)??[]).includes(e)}(e)){process.env.PATH=`${e}${qr}${process.env.PATH}`;try{if(yo.GITHUB_ACTIONS)try{Oi.addPath(e)}catch(n){m(n),await fe(e,r)}else await fe(e,r)}catch(n){m(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function fe(e,t){switch(process.platform){case"win32":return await M(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void w(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await _b(t),await Lb(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void w(`"${e}" was added to "${t.rcPath}"`);default:return}}function he(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function me(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;Wb[e]=r}}function ye(e,t,r){const n=function(e){const t=Wb[e.locale];let r=e.unitTypeLookupOrder.slice();r.unshift(e.unitType),r=Array.from(new Set(r));let n=null;if(r.some((function(e){if(void 0!==t[e])return n=t[e],!0})),null===n)throw Error("Can not find any unit type data for locale: "+e.locale);return n}(r);return Hb.pluralize(r.locale,t,n[e]).replace("{0}",t)}function ge(){if(u_)return l_;u_=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof o)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=r.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&m(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;this.set.length>e;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;t.length>e;e++)e>0&&(this.formatted+=" "),this.formatted+=(""+t[e]).trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&f))+":"+e,n=r.get(t);if(n)return n;const s=this.options.loose;e=e.replace(s?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE],T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],u),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],d),i("caret trim",e);let m=e.split(" ").map((e=>g(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const y=new Map,w=m.map((e=>new o(e,this.options)));for(const r of w){if(h(r))return[r];y.set(r.value,r)}y.size>1&&y.has("")&&y.delete("");const v=[...y.values()];return r.set(t,v),v}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,r)&&e.set.some((e=>y(e,r)&&t.every((t=>e.every((e=>t.intersects(e,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(t){return!1}for(let r=0;this.set.length>r;r++)if(x(this.set[r],e,this.options))return!0;return!1}}l_=t;const r=new f_,n=rE,o=we(),i=Qb,s=fE,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:d}=Zb,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:f}=Jb,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},g=(e,t)=>(i("comp",e,t),e=E(e,t),i("caret",e),e=v(e,t),i("tildes",e),e=S(e,t),i("xrange",e),e=R(e,t),i("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>e.replace(t.loose?a[c.TILDELOOSE]:a[c.TILDE],((t,r,n,o,s)=>{let a;return i("tilde",e,t,r,n,o,s),w(r)?a="":w(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,i("tilde return",a),a})),E=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{i("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,o,s,a)=>{let c;return i("caret",e,t,n,o,s,a),w(n)?c="":w(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(s)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${s}-${a} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s}-${a} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${s}${r} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s} <${+n+1}.0.0-0`),i("caret return",c),c}))},S=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,o,s,a,c)=>{i("xRange",e,r,n,o,s,a,c);const l=w(o),u=l||w(s),d=u||w(a);return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+o}.${s}.${a}${c}`):u?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",r),r})),R=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,r,n,o,i,s,a,c,l,u,d,p)=>`${r=w(n)?"":w(o)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=w(l)?"":w(u)?`<${+l+1}.0.0-0`:w(d)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${d}-${p}`:e?`<${l}.${u}.${+d+1}-0`:"<="+c}`.trim(),x=(e,t,r)=>{for(let n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;e.length>r;r++)if(i(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return l_}function we(){if(p_)return d_;p_=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,o){if(o=r(o),n instanceof t){if(n.loose===!!o.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,o),this.options=o,this.loose=!!o.loose,this.parse(n),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(t){const r=t.match(this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR]);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),this.semver=r[2]?new a(r[2],this.options.loose):e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(r){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,n).test(this.value):""===e.operator?""===e.value||new c(this.value,n).test(e.semver):!((n=r(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}d_=t;const r=rE,{safeRe:n,t:o}=Zb,i=r_,s=Qb,a=fE,c=ge();return d_}function ve(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{a(n.next(e))}catch(t){o(t)}}function s(e){try{a(n.throw(e))}catch(t){o(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,s)}a((n=n.call(e)).next())}))}function be(e,t){function r(r){return function(c){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&i[3]>r[1])){a.label=r[1];break}if(6===r[0]&&i[1]>a.label){a.label=i[1],i=r;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function Ee(e){return null==e?[]:Array.isArray(e)?e:[e]}function _e(e,t,r,n){var o,i=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function Se(e,t,r,n=40){yo.GITHUB_ACTIONS?await async function(e,t,r=40){await V("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await _b(r),await ES(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function Oe(e){const t={...process.env,DEBIAN_FRONTEND:"noninteractive"};return"nala"===e&&(void 0===t.LANG&&(t.LANG="C.UTF-8"),void 0===t.LC_ALL&&(t.LC_ALL="C.UTF-8")),t}function Re(){return null!==Sy.sync("nala",{nothrow:!0})}function Ie(){let e;return e=Re()?"nala":"apt-get",e}function Te(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function xe(e){try{const{stdout:t}=await Xm("dpkg",["-s",e],{env:Oe("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Ne(e,t=Ie()){return(await Promise.all(e.map((e=>Ae(e,t))))).filter((e=>void 0!==e))}async function Ae(e,t=Ie()){const r=await async function(e,t,r){switch(await Pe(e,t,r)){case RS.NameDashVersion:return`${t}-${r}`;case RS.NameEqualsVersion:return`${t}=${r}`;case RS.Name:return void 0!==r&&""!==r&&y(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${r??""}`)}}(t,e.name,e.version);return await xe(r)?void 0:r}async function Pe(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await Xm("apt-cache",["search","--names-only",`^${Te(t)}-${Te(r)}$`],{env:Oe(e),stdio:"pipe"});if(""!==n.trim())return RS.NameDashVersion;try{const{stdout:n}=await Xm("apt-cache",["show",`${t}=${r}`],{env:Oe(e)});if(""===n.trim())return RS.NameEqualsVersion}catch{}}try{const{stdout:r}=await Xm("apt-cache",["show",t],{env:Oe(e),stdio:"pipe"});if(""!==r.trim())return RS.Name}catch{}return SS?RS.None:(OS(e),Pe(e,t,r))}async function $e(e,t=!1){try{const n=Ie();for(const{name:t,version:r}of e)w(`Installing ${t} ${r??""} via ${n}`);t&&OS(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>e.repository??[])))];await Promise.all(r.map((t=>async function(e,t=Ie()){await TS(t),await async function(e){await xe("software-properties-common")||H(e,["install","-y","--fix-broken","-o",_S,"software-properties-common"],{...Ty,env:Oe(e)})}(t),H("add-apt-repository",["-y","--no-update",e],{...Ty,env:Oe(t)}),OS.clear(),OS(t)}(t,e))))}(n,e);const o=await Ne(e,n);if(0===o.length)return w("All packages are already installed"),{binDir:"/usr/bin/"};await TS(n);try{await async function(e){await Promise.all(e.map((async e=>{var t;void 0!==e.key&&await(t=e.key,"keyUrl"in t?Ce(t):async function({key:e,keyServer:t=AS,fileName:r,keyStorePath:n=AS}){try{Le(r);const o=Vr(n,r);return await se(o)||(De(),await V("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await V("chmod",["644",o])),o}catch(o){return void y(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),H(n,["install","--fix-broken","-y",...o],{...Ty,env:Oe(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;xS.some((e=>"string"==typeof r.stderr&&r.stderr.includes(e)))&&(y(`Failed to install packages ${o}. Retrying...`),H(n,["install","--fix-broken","-y","-o",_S,...o],{...Ty,env:Oe(n)}))}return{binDir:"/usr/bin/"}}catch(r){throw Error("Failed to install apt packages: "+(r instanceof Error?`${r.message}\n${r.stack}`:r+""))}}async function Ce({keyUrl:e,fileName:t,keyStorePath:r=NS}){try{Le(t);const n=Vr(r,t);if(!(await se(n))){De(),await $e([{name:"ca-certificates"}]);const r=Vr(Lr(),t),o=new bS.DownloaderHelper(e,Lr(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),H("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),H("chmod",["644",n])}return n}catch(n){return void y(`Failed to add apt key via download ${e}: ${n}`)}}function De(){H("gpg",["-k"])}function Le(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function ke(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof PS)return{binDir:PS};const t=await Sy("brew",{nothrow:!0});if(null!==t)return PS=zr(t),{binDir:PS};await $e([{name:"ca-certificates"}]);const r=new bS.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Lr(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),Km("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),PS=Me(),await pe(PS,e.rcOptions),{binDir:PS}}function Me(){return Vr(je(),"bin")}function je(){if("darwin"===process.platform)return"arm64"===process.arch?"/opt/homebrew":"/usr/local";if("linux"===process.platform)return"/home/linuxbrew/.linuxbrew";throw Error("Unsupported platform for brew")}async function Ue(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};w(`Installing ${e} ${t??""} via brew`),kS&&null!==Sy.sync("brew",{nothrow:!0})||(await ke(),kS=!0);const o=Me(),i=Vr(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),Km(i,s,{stdio:"inherit"}),{binDir:o}}function Fe(){return"linux"===process.platform&&(void 0===$S&&($S=null!==Sy.sync("dnf",{nothrow:!0})),$S)}function Be(){return"linux"===process.platform&&(void 0===CS&&(CS=null!==Sy.sync("pacman",{nothrow:!0})),CS)}function Ge(){return"linux"===process.platform&&(void 0===DS&&(DS=null!==Sy.sync("apt-get",{nothrow:!0})),DS)}async function He(e,t,r){if("win32"!==process.platform)return;if("string"==typeof LS)return{binDir:LS};const n=Sy.sync("choco",{nothrow:!0});if(null!==n)return LS=zr(n),{binDir:LS};let o="powershell.exe";const i=Sy.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==i&&(o=i),Km(o,["-NoProfile","-InputFormat","None","-ExecutionPolicy","Bypass","-Command","[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"],{stdio:"inherit"});const s=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await pe(s,ZI);const a=Sy.sync("choco",{nothrow:!0});return LS=null!==a?zr(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await se(LS)?{binDir:LS}:void 0}async function Ve(e,t,r=[]){w(`Installing ${e} ${t??""} via chocolatey`),MS&&null!==Sy.sync("choco",{nothrow:!0})||(await He(0,0,process),MS=!0);const n=process.env.PATH,o={...process.env};if(o.TMP=void 0,o.TEMP=void 0,o.Path=void 0,o.PATH=n,void 0!==t&&""!==t)Km("choco",["install","-y",e,"--version="+t,...r],{env:o,extendEnv:!1,stdio:"inherit"});else try{Km("choco",["install","-y",e,...r],{env:o,extendEnv:!1,stdio:"inherit"})}catch(s){if(!s.message.includes("exit code 3010"))throw s;w(e+" might require a reboot for the completion of the installation.")}const i=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin";return await pe(i,ZI),{binDir:i}}async function qe(e){for(const{name:t,version:r}of e)w(`Installing ${t} ${r??""} via dnf`);return H("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await Xm("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await Xm("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;y(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function ze(e,t,r){w(`Installing ${e} ${t??""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===Sy.sync("yay",{nothrow:!0}))try{H("pacman",["-S","--noconfirm","base-devel","git"]);const e=Vr(Lr(),"yay");H("mkdir",["-p",e]),F()?(y("Creating a non-root user to build yay"),H("useradd",["-m","-G","wheel","builder"]),H("passwd",["-d","builder"]),H("chown",["-R","builder:builder",e]),H("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),BS=!0,Km("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),Km("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(Km("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:Lr()}),Km("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),Km("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),jS||"yay"===r||(H(n,["-Sy","--noconfirm"]),jS=!0),US||"yay"===r||(H(n,["-S","--noconfirm","base-devel"]),US=!0);const o=e=>"yay"===r?F()&&BS?H("su",["-","builder","-c","yay -S --noconfirm "+e]):Km(r,["-S","--noconfirm",e]):H(r??n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await Xm(e,["-Si",t]);for(const e of n.matchAll(FS))r.push(e[1])}catch(n){y(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else w(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function We(e,t){return Object.keys(t).forEach((r=>{"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:()=>t[r]})})),e}function Xe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function Ke(e,t=!0){return t?Wr(e):Wr(e,Xr(e))}function Ye(e){return Kr(e).replace(RegExp(Te(Yr)+"$"),"")}function Je(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Qe(e,t){const r=Xr(e),n=`${t}${Wr(e,r)}${r}`;return Vr(zr(e),n)}function Ze(e,t){const r=Xr(e),n=`${Wr(e,r)}${t}${r}`;return Vr(zr(e),n)}function et(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function tt(e){return"win32"===process.platform?e:"./"+e}function rt(e){const t=Xr(e).length;return e.slice(0,-t)}function nt(e,t){return HS(e,t)}function ot(e,t){const r=Jr(t,e);return!(!r||".."===r||r.startsWith(".."+Yr)||r===Qr(e))}function it(e){return fO(this,void 0,void 0,(function*(){if(yO.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield yO.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function st(e){return fO(this,void 0,void 0,(function*(){hO.ok(e,"a path argument must be provided"),yield yO.mkdir(e,{recursive:!0})}))}function at(e){return fO(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(yO.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(mO.delimiter))e&&t.push(e);if(yO.isRooted(e)){const r=yield yO.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(mO.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(mO.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield yO.tryGetExecutablePath(mO.join(o,e),t);r&&n.push(r)}return n}))}function ct(e,t,r,n){return fO(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield st(t);const o=yield yO.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield yO.lstat(o)).isDirectory()?yield ct(o,s,r,n):yield lt(o,s,n)}yield yO.chmod(t,(yield yO.stat(e)).mode)}))}function lt(e,t,r){return fO(this,void 0,void 0,(function*(){if((yield yO.lstat(e)).isSymbolicLink()){try{yield yO.lstat(t),yield yO.unlink(t)}catch(n){"EPERM"===n.code&&(yield yO.chmod(t,"0666"),yield yO.unlink(t))}const r=yield yO.readlink(e);yield yO.symlink(r,t,yO.IS_WINDOWS?"junction":null)}else(yield yO.exists(t))&&!r||(yield yO.copyFile(e,t))}))}function ut(e,t,r){return qO(this,void 0,void 0,(function*(){const n=XO.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new XO.ToolRunner(o,t,r).exec()}))}function dt(e,t){const r=[];t=t||dR.arch();const n=pR.join(gt(),e);if(lR.existsSync(n)){const e=lR.readdirSync(n);for(const o of e)if(mt(o)){const e=pR.join(n,o,t||"");lR.existsSync(e)&&lR.existsSync(e+".complete")&&r.push(o)}}return r}function pt(e){return iR(this,void 0,void 0,(function*(){return e||(e=pR.join(wt(),wR.default())),yield cR.mkdirP(e),e}))}function ft(e,t,r){return iR(this,void 0,void 0,(function*(){const n=pR.join(gt(),e,hR.clean(t)||t,r||"");aR.debug("destination "+n);const o=n+".complete";return yield cR.rmRF(n),yield cR.rmRF(o),yield cR.mkdirP(n),n}))}function ht(e,t,r){const n=pR.join(gt(),e,hR.clean(t)||t,r||"");lR.writeFileSync(n+".complete",""),aR.debug("finished caching tool")}function mt(e){const t=hR.clean(e)||"";aR.debug("isExplicit: "+t);const r=null!=hR.valid(t);return aR.debug("explicit? "+r),r}function yt(e,t){let r="";aR.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>hR.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(hR.satisfies(o,t)){r=o;break}}return aR.debug(r?"matched: "+r:"match not found"),r}function gt(){const e=process.env.RUNNER_TOOL_CACHE||"";return gR.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function wt(){const e=process.env.RUNNER_TEMP||"";return gR.ok(e,"Expected RUNNER_TEMP to be defined"),e}function vt(e,t){const r=mo[e];return void 0!==r?r:t}function bt(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const r={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return r.match&&!Array.isArray(r.match)&&(r.match=[r.match]),r.report&&r.report("Trying "+r.name+" #"+r.$current+" at "+(new Date).toLocaleTimeString(),r),new Promise((function(t,n){let o,i,s;r.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),n(new CR(r.name+" timed out",s))}),r.timeout)),Promise.resolve(e({current:r.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,r.report&&r.report(a&&""+a||a,r,a);var c=r.max>r.$current;if(!c)return n(a);if(c=0===r.match.length||r.match.some((function(e){return function(e,t){if("function"==typeof e)try{if(t instanceof e)return!0}catch(r){return!!e(t)}return e===""+t||e===t.message||e instanceof RegExp&&(e.test(t.message)||e.test(""+t))}(e,a)})),!c)return n(a);var l=r.backoffBase*Math.pow(r.backoffExponent,r.$current-1);r.$current++,r.report&&r.report(`Retrying ${r.name} (${r.$current})`,r),l?(r.report&&r.report(`Delaying retry of ${r.name} by ${l}`,r),i=setTimeout((function(){bt(e,r).then(t).catch(n)}),l)):bt(e,r).then(t).catch(n)}))}))}function Et(e,t,r){switch(process.platform){case"win32":return Ve("7zip",e);case"darwin":return Ue("p7zip",e);case"linux":if(Be())return ze("p7zip",e);if(Fe())return qe([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(Ge())return $e([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function _t(e){const t=e.split(".").pop();return"tar"===t?0:"gz"===t||"tgz"===t?1:"xz"===t||"txz"===t?2:"zip"===t?3:("7z"===t||"exe"===t||y(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function St(e,t){return await Xm(await async function(){return void 0===LR&&(null===Sy.sync("7z",{nothrow:!0})&&await Et("",0,process),LR="7z"),LR}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await X(t),t}function Ot(e,t){return St(e,t)}async function Rt(e,t){return null!==Sy.sync("7z",{nothrow:!0})?St(e,t):null!==Sy.sync("unzip",{nothrow:!0})?(await Xm("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await X(t),t):St(e,t)}async function It(e,t,r=0,n=[]){await async function(e){switch(w("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(Be()?(await ze("gzip"),await ze("tar")):Fe()?await qe([{name:"gzip"},{name:"tar"}]):Ge()&&await $e([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(Be()?(await ze("xz"),await ze("tar")):Fe()?await qe([{name:"xz"},{name:"tar"}]):Ge()&&await $e([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(_t(e));try{await gO(t)}catch{}try{await Xm("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&y(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await X(t),t}async function Tt(e,t,r,n,o){w(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=process.env.RUNNER_TEMP??Lr(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Vr(Lr(),"setup-cpp","hostedtoolcache");const{url:i,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:l}=await r(t,process.platform,o);if(yo.GITHUB_ACTIONS)try{const r=NR(e,t);if(r){const n=Vr(r,c),o=Vr(n,s);if(await se(Vr(o,a)))return w(`${e} ${t} was found in the cache at ${o}.`),await pe(o,ZI),{installDir:n,binDir:o}}}catch{}const u=Vr(n,c),d=Vr(u,s),p=Vr(d,a);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([se(e),se(t)])).includes(!1))try{const e=await async function(e,t,r){w(`Download ${e} ${t}`);return await DR((()=>{const e=Vr(process.env.RUNNER_TEMP??Lr(),`${Date.now()}-${Wr(r)}`);return RR(r,e)}),{name:r,max:4,backoffBase:2e3,report:e=>w(e)})}(r,n,o);w(`Extracting ${e} to ${i}`);const t=s??function(e){switch(e){case 0:case 1:case 2:return It;case 3:return Rt;default:return St}}(_t(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(w(`Add ${e} to PATH`),await pe(e,ZI),!(await se(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await ln(t,"755")}catch(c){y(`Failed to make ${t} executable: ${c}`)}}(d,p,e,t,i,n,l,o),await async function(e,t,r){yo.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==Pr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await xR(e,t,r))}(n,e,t),{installDir:u,binDir:d}}function xt(e,t,r){const n=c_(e)??e;switch(t){case"win32":{const t=KE(n,"v3.19.6");let o;tO.includes(r)?o=t?"win64-x64":"windows-x86_64":rO.includes(r)?o=t?"win32-x86":"windows-i386":nO.includes(r)?o="windows-arm64":(w(`Trying unsupported arch '${r}' for cmake on Windows`),o="windows-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:Je("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${KE(n,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:Je("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=KE(n,"v3.19.8");let o;nO.includes(r)?o=t?"Linux-aarch64":"linux-aarch64":tO.includes(r)?o=t?"Linux-x86_64":"linux-x86_64":(w(`Trying unsupported arch '${r}' for cmake on Linux`),o="linux-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:Je("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function Nt(e,t,r){return Tt("cmake",e,xt,t,r)}async function At(e,t,r=JR){const n=await async function(e,t=JR){try{const r=await zO(e,["--version"]),n=r.stdout||r.stderr||"",o=n.trim().match(t)?.[1];return c_(o)??void 0}catch(r){return void console.error(r)}}(e,r);return void 0!==n&&""!==t&&-1!==AE(n,t)}function Pt(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function $t(e,t,r){const n=await async function(e,t,r){let n,o=await Ct(t);if(void 0!==o){const e=zr(o);n={bin:o,installDir:e,binDir:e}}else{if(yo.GITHUB_ACTIONS)try{w("Installing python in GitHub Actions");const{setupActionsPython:i}=await import("./assets/actions_python-DEBafgEv.mjs");if(await i(e,t,r),o=await Ct(t),void 0===o)throw Error("Python binary could not be found");const s=zr(o);n={bin:o,installDir:s,binDir:s}}catch(i){y(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ve("python3",t,["--params=/InstallDir:"+e]):await Ve("python3",t);const n=await Ct(e);if(void 0===n)throw Error("Python binary could not be found");const o=zr(n);await pe(o,ZI),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await Ue("python3",t);const e=await Xm("brew",["--prefix","python"],{stdio:"pipe"}),n=Vr(e.stdout,"libexec","bin");await pe(n,ZI);break}case"linux":if(Be())r=await ze("python",t);else if(Fe())r=await qe([{name:"python3",version:t}]);else{if(!Ge())throw Error("Unsupported linux distributions");r=await $e([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,e))}if(void 0===o||void 0===n.bin){if(o=await Ct(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:zr(o),binDir:zr(o)}}return n}(e,t,r);co(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Lt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await Mt(e)||(await zt("pip"),await Mt(e))}(e),Lt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await qt(e)))try{await Gt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===zt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await Xm(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await async function(e){try{await Gt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){y(`Failed to install venv: ${""+t}. Ignoring...`)}}(e)}catch(t){y(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Gt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Gt(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){y(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(o),n}async function Ct(e){for(const t of["python","python3"]){const r=await Dt(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Zr(Dr()).root,t=(await un(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Dt(t,Vr(e,r));if(void 0!==n)return n}}}async function Dt(e,t){try{if(void 0!==t){const r=Vr(t,Je(e));if(await se(r)&&await At(r,tI))return r}const r=await Sy(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await At(e,tI))return e}catch{}}async function Lt(){for(const e of["pip3","pip"]){const t=await kt(e);if(void 0!==t)return t}}async function kt(e){try{const t=await Sy(e,{nothrow:!0,all:!0})??[];for(const e of t)if(await At(e,eI))return e}catch{}}async function Mt(e){try{return await Xm(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){w(""+t);try{return await Xm(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){w(""+r)}}return!1}function jt(e,t,r=null){return Ut(t)&&"linux"===process.platform&&null!==r&&e in rI?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0===n?"":t[n]}(r,rI[e]):Ut(t)&&e in ZR?ZR[e]??"":"true"===t?"":t??""}function Ut(e){return"true"===e||void 0===e}function Ft(){if(!("version"in Cr)||"function"!=typeof Cr.version)return null;const e=Cr.version().match(/(\d+)\.(\d+)\.(\d+)/);return null===e?null:[Number.parseInt(e[1],10),Number.parseInt(e[2],10),Number.parseInt(e[3],10)]}async function Bt(e,t,r={}){return Gt(await async function(){return void 0!==uI||(uI=(await $t(jt("python",void 0,await aI()),"",process.arch)).bin),uI}(),e,t,r)}async function Gt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await qt(e),l=c?"pipx":"pip",u=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await Xm(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==r.exitCode||"string"!=typeof r.stdout)return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const e of Object.values(n.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,u):await async function(e,t){try{return 0===(await Xm(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,u);if(t)return{binDir:c?await Ht():await Vt(e,u)}}const d=await async function(e,t){return 0===(await Xm(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,u);if(d)try{Oi.info(`Installing ${t} ${r??""} via ${l}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],u=process.env;c&&i&&(u.PIPX_HOME=await cI(),u.PIPX_BIN_DIR=await lI()),Km(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(p){if(Oi.info(`Failed to install ${t} via ${l}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await zt(t))throw Error(`Failed to install ${t} via ${l}: ${p}.`)}else if(null===await zt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);return{binDir:c?await Ht():await Vt(e,u)}}function Ht(){return lI()}async function Vt(e,t){const r=await nI(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>se(Vr(e,Je(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=Sy.sync(Je(t),{nothrow:!0});return null!==n?zr(n):e[e.length-1]}(r,t);return await pe(n,ZI),n}async function qt(e){return 0===(await Xm(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function zt(e,t=!0){if("linux"===process.platform){if(Oi.info(`Installing ${e} via the system package manager`),Be())return ze(t?"python-"+e:e);if(Fe())return qe([{name:t?"python3-"+e:e}]);if(Ge())return $e([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return Ue(e);return null}function Wt(e,t,r){return Bt("cmakelang[YAML]",e)}async function Xt(e,t,r){switch(process.platform){case"win32":return await Ve("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await pe(e,ZI),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return Ue("graphviz",e);case"linux":if(Be())return ze("graphviz",e);if(Fe())return qe([{name:"graphviz",version:e}]);if(Ge())return $e([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Kt(e,t){const{ArchiveHdi:r}=await import("./assets/hdi-BtlhU6up.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Vr(t,e.path))}))}function Yt(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:Je("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:Je("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.windows.x64.bin.zip`}}case"darwin":{const t="Doxygen-"+e;return{binRelativeDir:"Doxygen/Doxygen.app/Contents/Resources/",binFileName:Je("doxygen"),extractedFolderName:t,extractFunction:Kt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Jt(){if("darwin"===process.platform)try{const e=await zO("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ue("SDKROOT",t.trim(),ZI):m("SDKROOT not set")}catch(e){m(e)}}async function Qt(e){const t=await dn(e,"utf-8");return JSON.parse(t)}function Zt(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const i of r)n.set(i,i);else for(const i of r){const e=t.filterMapTag(i);void 0!==e&&n.set(e,i)}if(0===n.size)return;const o=[];for(const[i,s]of n.entries())i.startsWith(t.version)&&o.push(s);if(0!==o.length)for(const i of o){let r=e[i];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=er(i,r,t);if(void 0!==n)return n}}function er(e,t,r){if(!(void 0!==r.keywords&&0!==r.keywords.length||void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length))return{tag:e,name:t[0]};let n=[];if(void 0!==r.keywords&&0!==r.keywords.length)for(const o of t)r.keywords.every((e=>o.includes(e)))&&n.push(o);else n=t;if(0!==n.length){if(void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length){const t=n.map((e=>{let t=0;for(const n of r.optionalKeywords)e.includes(n)&&t++;return t})),o=Math.max(...t);return{tag:e,name:n[t.indexOf(o)]}}return{tag:e,name:n[0]}}}async function tr(e,t,r){if("win32"===t){const t=Zt(await Qt(Vr(fI,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[{x64:"x86_64",ia32:"i386"}[r]??r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:Je("g++"),extractedFolderName:"mingw64",extractFunction:St,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function rr(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ve("gcc-arm-embedded",e);try{o=await Tt("g++",e,tr,t,r)}catch(i){w(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){let r;if(await Ve("mingw",e),"x64"===t&&await se("C:/tools/mingw64/bin")?(r="C:/tools/mingw64/bin",await pe(r,ZI)):"ia32"===t&&await se("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await pe(r,ZI)):await se((process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(r=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin"),void 0!==r)return{binDir:r}}(e,r)}break;case"darwin":o=await Ue("gcc",e);break;case"linux":"x64"===r?Be()?o=await ze("gcc",e):Fe()?o=await qe([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):Ge()&&(o=""===e?await $e([{name:"gcc"},{name:"g++"}]):await $e([{name:"gcc",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}},{name:"g++",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])):(w(`Install g++-multilib because gcc for ${r} was requested`),Be()?o=await ze("gcc-multilib",e):Ge()&&(o=""===e?await $e([{name:"gcc-multilib"}]):await $e([{name:"gcc-multilib",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])));break;default:throw Error("Unsupported platform for "+r)}if(void 0!==o)return await async function(e,t,r=40){const n=[];if("win32"===process.platform)n.push(ue("CC",Je(t+"/gcc"),ZI),ue("CXX",Je(t+"/g++"),ZI));else{let o=e;""===e&&(o=await async function(e,t){try{let r="gcc";if(await se(e+"/gcc"))r=e+"/gcc";else{const t=(await un(e)).sort(((e,t)=>function(e,t){const r=c_(e),n=c_(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(e.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"",t.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"")));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await Xm(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(y("Failed to parse gcc version from: "+n),t)}catch(i){return m("Failed to get gcc version: "+i),t}}(t,o),w("Using gcc version "+o));const s=OE(c_(o)??o);5>s?(n.push(ue("CC",`${t}/gcc-${o}`,ZI),ue("CXX",`${t}/g++-${o}`,ZI)),Ge()&&n.push(Se("cc",`${t}/gcc-${o}`,ZI,r),Se("cxx",`${t}/g++-${o}`,ZI,r),Se("gcc",`${t}/gcc-${o}`,ZI,r),Se("g++",`${t}/g++-${o}`,ZI,r))):(n.push(ue("CC",`${t}/gcc-${s}`,ZI),ue("CXX",`${t}/g++-${s}`,ZI)),Ge()&&n.push(Se("cc",`${t}/gcc-${s}`,ZI,r),Se("cxx",`${t}/g++-${s}`,ZI,r),Se("gcc",`${t}/gcc-${s}`,ZI,r),Se("g++",`${t}/g++-${s}`,ZI,r)))}n.push(Jt()),yo.GITHUB_ACTIONS&&await async function(){const e=Vr(fI,"gcc_matcher.json");if(!(await se(e)))return y("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}(),await Promise.all(n)}(e,o.binDir,n),o}async function nr(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return rr(e,t,r);case"linux":Be()?n=await ze("mingw-w64-gcc",e):Fe()?n=await qe([{name:"mingw64-gcc",version:e}]):Ge()&&(n=await $e([{name:"mingw-w64",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}]));break;default:throw Error("Unsupported platform for "+r)}if(void 0!==n)return n}function or(e){const t=wE(e),r=null!==t?OE(t):e;return ue("GCOV",""!==r?"gcov-"+r:"gcov",ZI)}async function ir(e,t,r){const{keywords:n,optionalKeywords:o}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),tO.includes(t)?(n.push("64"),n.push("x86_64")):(w(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),tO.includes(t)?n.push("x86_64"):nO.includes(t)?n.push("arm64"):(w(`Using arch ${t} for infer`),r.push(t));break;default:w(`Using ${e} ${t} for infer`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(t,r),i=Zt(await Qt(Vr(hI,"github_facebook_infer.json")),{version:e,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==i)return{url:`https://github.com/facebook/infer/releases/download/${i.tag}/${i.name}`,extractedFolderName:""+Wr(i.name,".tar.xz"),binRelativeDir:"bin",binFileName:Je("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${o}`)}function sr(e,t,r){const n=function(e,t){switch(e){case"win32":return tO.includes(t)||rO.includes(t)?"win":nO.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return tO.includes(t)||rO.includes(t)?"linux":nO.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:Je("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function ar(e,t,r){return Tt("ninja",e,sr,t,r)}function cr(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:Je("kcov")}}function lr(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Je("kcov"),extractFunction:ur}}async function ur(e,t){const r=await It(e,t,1),n=await async function(){let e=Sy.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await Nt(jt("cmake",void 0,await aI()),Vr(ae("~"),"cmake"),"");e=Vr(t,"cmake")}return null===Sy.sync("ninja",{nothrow:!0})&&await ar(jt("ninja",void 0,await aI()),Vr(ae("~"),"ninja"),""),e}();"linux"===process.platform&&(Be()?await Promise.all([ze("libdwarf"),ze("libcurl-openssl")]):Fe()?await qe([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):Ge()&&await $e([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==Sy.sync("patch",{nothrow:!0})){const e=Vr(mI,"gcc13.patch");await Xm("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else w("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Vr(r,"build");return await Xm(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await Xm(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function dr(){"darwin"===process.platform&&(null!==await Sy("clang",{nothrow:!0})&&null!==await Sy("clang++",{nothrow:!0})&&(g("Assuming clang is an Apple Clang compiler"),await Promise.all([ue("CC","clang",ZI),ue("CXX","clang++",ZI)])),fo("Apple Clang automatic installation is not supported yet"))}function pr(e){return Object.values(NI).includes(e)?e:e in NI?NI[e]:e}function fr(e){if(Object.keys(NI).includes(e))return e;for(const[t,r]of Object.entries(NI))if(r===e)return t;return e}function hr(e){const t=pr(e);let r;if(t){const e=t.split(".")[0]+".9";r=`-version "${t},${e}"`}else r="-latest";let n=function(e,t){try{return(""+EI.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){bI.warning("vswhere failed: "+r)}return null}(0,r);if(n&&_I.existsSync(n))return bI.info("Found with vswhere: "+n),n;bI.info("Not found with vswhere");const o=e?[fr(e)]:xI;for(const i of II)for(const e of o)for(const t of TI)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,bI.info("Trying standard location: "+n),_I.existsSync(n))return bI.info("Found standard location: "+n),n;if(bI.info("Not found in standard locations"),n=RI+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",_I.existsSync(n))return bI.info("Found VS 2015: "+n),n;throw bI.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function mr(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function yr(e,t,r,n,o,i,s){void 0!==t&&await se(t)&&(w(`Adding ${t} to PATH`),await ue("VCTargetsPath",t,ZI)),await CI(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),o,n,i,s,e)}async function gr(e,t,r,n,o,i,s,a=12e5){Oi.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(vI(e)),e.addEventListener("abort",(()=>{c(vI(e))}))}if(r===1/0)return void e.then(a,c);const l=new yI;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(l.message=o??`Promise timed out after ${r} milliseconds`,c(l))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,r,n,o,i){const s=KI.includes(e);let a;if("vcvarsall"===e)await yr(jt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await ke({rcOptions:ZI});else{const i=Vr(o,s?"llvm":e),c=jt(e,t,r),l=YI[e];a=await l(c,i,n)}i.push($r(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){m(c),c instanceof Error&&void 0!==c.stack&&m(c.stack),s.push(e+" failed to install")}Oi.endGroup()}async function wr(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:o}=await async function(e,t){const r=[],n=[];switch(e){case"win32":tO.includes(t)?r.push("win64"):rO.includes(t)?r.push("win32"):nO.includes(t)?r.push("woa64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),Ge()){n.push("ubuntu");const e=await aI();if(null!==e){n.push(""+e[0]);const t=10>e[1]?"0"+e[1]:""+e[1];n.push(`${e[0]}.${t}`),n.push(`${e[0]}.${t}.${e[2]}`)}}else Fe()&&n.push("rhel");tO.includes(t)?r.push("x86_64"):rO.includes(t)?r.push("x86"):nO.includes(t)?r.push("aarch64"):oO.includes(t)?r.push("armv7a"):iO.includes(t)?r.push("powerpc64le"):sO.includes(t)?r.push("sparc64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),tO.includes(t)?r.push("x86_64"):nO.includes(t)?n.push("arm64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),tO.includes(t)?r.push("amd64"):rO.includes(t)?r.push("i386"):(w(`Using arch ${t} for LLVM`),r.push(t));break;default:w(`Using ${e} ${t} for LLVM`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=Zt(await Qt(Vr(LI,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=Zt(await Qt(Vr(LI,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return w("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:Je("clang"),extractFunction:"win32"===t?Ot:(e,t)=>It(e,t,1)}}async function vr(e,t,r){const n=await MI(e,t,r);return await async function(e,t){const r=process.env.LD_LIBRARY_PATH??"",n=process.env.DYLD_LIBRARY_PATH??"",o=Sr(t),i=[ue("CC",Je(e+"/bin/clang"),ZI),ue("CXX",Je(e+"/bin/clang++"),ZI),ue("LLVM_PATH",e,ZI),ue("LD_LIBRARY_PATH",`${r}${qr}${e}/lib`,ZI),ue("DYLD_LIBRARY_PATH",`${n}${qr}${e}/lib`,ZI),ue("LLVM_LDFLAGS","-L"+Pt(e+"/lib"),ZI),ue("LLVM_CPPFLAGS","-I"+Pt(e+"/include"),ZI),await se(`${e}/lib/clang/${t}/include`)?ue("LLVM_CPATH",`${e}/lib/clang/${t}/include`,ZI):await se(`${e}/lib/clang/${o}/include`)?ue("LLVM_CPATH",`${e}/lib/clang/${o}/include`,ZI):Promise.resolve(),ue("LIBRARY_PATH",e+"/lib",ZI),Jt()];if(Ge()){const t=60;i.push(Se("cc",e+"/bin/clang",ZI,t),Se("cxx",e+"/bin/clang++",ZI,t),Se("clang",e+"/bin/clang",ZI),Se("clang++",e+"/bin/clang++",ZI),Se("lld",e+"/bin/lld",ZI),Se("ld.lld",e+"/bin/ld.lld",ZI),Se("llvm-ar",e+"/bin/llvm-ar",ZI))}await Promise.all(i)}(n.installDir??t,e),n}function br(e,t,r){return _r(e,t,r,DI.ClangFormat)}function Er(e,t,r){return _r(e,t,r)}async function _r(e,t,r,n=DI.All){const o=Sr(e);try{if(Ge())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await $e([{name:"ca-certificates"}]);const n=new bS.DownloaderHelper("https://apt.llvm.org/llvm.sh",Lr(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await dn(n.getDownloadPath(),"utf-8"),i=Vr(Lr(),"llvm-setup-cpp.sh"),s=await async function(e,t,r,n){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${_S} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${_S} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const r=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await Xm("dpkg",["-l",e],{env:Oe("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(ho("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return Re()?e.replace(/apt-get/g,"nala"):e}(o),await pn(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await $e(s),await ln(i,"755"),await V("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await pe(r+"/bin",ZI),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){w("Failed to install llvm via system package manager "+s)}const i=await Tt("llvm",e,wr,t,r);return await jI(o),i}function Sr(e){const t=function(e){if(null===wE(e))try{const t=c_(e);if(null!==t)return w(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function Or(){if(yo.GITHUB_ACTIONS){const e=Vr(kI,"llvm_matcher.json");if(!(await se(e)))return y("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}}async function Rr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=AI(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=$I(s);l=!0,w("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Ve("visualcpp-build-tools","14.0.25420.1",["--ignore-dependencies"]),c="C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140"):"15.0"===s?(a="14.16",await Ve("visualstudio2017buildtools","15.9.41.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16"):"16.0"===s?(a="14.29",await Ve("visualstudio2019buildtools","16.11.7.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"):"17.0"===s?(a=void 0,await Ve("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):m(`The given MSVC versions ${e} is not supported yet.`)}catch(u){m(u)}await yr(s,c,r,a,n,o,i),yo.GITHUB_ACTIONS&&await async function(){const e=Vr(FI,"msvc_matcher.json");if(!(await se(e)))return y("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}()}async function Ir(e,t,r){if("win32"===process.platform)return await Ve("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await pe(e,ZI),e}()}}function Tr(e,t,r){return{url:xr(t,r,e),binRelativeDir:"",binFileName:Je("pwsh"),extractedFolderName:""}}function xr(e,t,r){switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/PowerShell-${r}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${{arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t]??"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function Nr(e,t,r){try{return await Tt("pwsh",e,Tr,t,r)}catch(n){return m(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ve("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await pe(t,ZI),{binDir:t}}case"darwin":return Ue("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Be())return ze("powershell-bin",e,"yay");if(Fe())return await qe([{name:"curl"}]),H("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),qe([{name:"powershell",version:e}]);if(Ge()){await $e([{name:"curl"}]);const t=await aI();return H("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),H("dpkg",["-i","packages-microsoft-prod.deb"]),$e([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function Ar(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:Je("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function Pr(e){const t=Oi.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function $r(e,t){let r=`✅ ${e} was installed successfully:`;return void 0===t||("installDir"in t&&(r+="\n- The installation directory is "+t.installDir),""!==t.binDir&&(r+="\n- The binary directory is "+t.binDir)),r}import Cr,{homedir as Dr,tmpdir as Lr}from"os";import kr,{promises as Mr,mkdir as jr,stat as Ur,statSync as Fr,mkdirSync as Br}from"fs";import Gr from"crypto";import Hr,{join as Vr,delimiter as qr,dirname as zr,basename as Wr,extname as Xr,normalize as Kr,sep as Yr,relative as Jr,resolve as Qr,parse as Zr}from"path";import*as en from"http";import tn from"http";import*as rn from"https";import nn from"https";import"net";import on from"tls";import sn from"events";import an from"util";import cn,{chmod as ln,readdir as un,readFile as dn,writeFile as pn}from"fs/promises";import{fileURLToPath as fn}from"node:url";import{ChildProcess as hn,execFile as mn,spawnSync as yn,spawn as gn}from"node:child_process";import{StringDecoder as wn}from"node:string_decoder";import{debuglog as vn,stripVTControlCharacters as bn,inspect as En,promisify as _n,callbackify as Sn,aborted as On}from"node:util";import Rn,{platform as In,hrtime as Tn,execPath as xn,execArgv as Nn}from"node:process";import{writeFileSync as An,statSync as Pn,readFileSync as $n,appendFileSync as Cn,createReadStream as Dn,createWriteStream as Ln,promises as kn}from"node:fs";import Mn from"node:tty";import jn from"node:path";import Un from"child_process";import{setTimeout as Fn,scheduler as Bn,setImmediate as Gn}from"node:timers/promises";import Hn,{constants as Vn}from"node:os";import{once as qn,addAbortListener as zn,EventEmitter as Wn,on as Xn,setMaxListeners as Kn}from"node:events";import{serialize as Yn}from"node:v8";import{Transform as Jn,getDefaultHighWaterMark as Qn,PassThrough as Zn,Readable as eo,Writable as to,Duplex as ro}from"node:stream";import{Buffer as no}from"node:buffer";import{finished as oo}from"node:stream/promises";import io from"process";import so,{fileURLToPath as ao}from"url";import co from"assert";import lo from"stream";import uo from"string_decoder";import po from"timers";import{error as fo,info as ho}from"console";var mo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},yo={};const go=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{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:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{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:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{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:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{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:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}];!function(e){function t(e){return"string"==typeof e?!!n[e]:"env"in e?n[e.env]&&n[e.env].includes(e.includes):"any"in e?e.any.some((function(e){return!!n[e]})):Object.keys(e).every((function(t){return n[t]===e[t]}))}const r=go,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,r.forEach((function(r){const o=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));if(e[r.constant]=o,o)switch(e.name=r.name,typeof r.pr){case"string":e.isPR=!!n[r.pr];break;case"object":e.isPR="env"in r.pr?r.pr.env in n&&n[r.pr.env]!==r.pr.ne:"any"in r.pr?r.pr.any.some((function(e){return!!n[e]})):t(r.pr);break;default:e.isPR=null}})),e.isCI=!("false"===n.CI||!(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name))}(yo);var wo={},vo={},bo={};Object.defineProperty(bo,"__esModule",{value:!0}),bo.toCommandProperties=bo.toCommandValue=void 0,bo.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},bo.toCommandProperties=function(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}};var Eo=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),_o=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),So=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&Eo(t,e,r);return _o(t,e),t};Object.defineProperty(vo,"__esModule",{value:!0}),vo.issue=vo.issueCommand=void 0;const Oo=So(Cr),Ro=bo;vo.issueCommand=r,vo.issue=function(e,t=""){r(e,{},t)};class Io{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(const n in this.properties)if(this.properties.hasOwnProperty(n)){const o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${t=o,Ro.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+="::"+function(e){return Ro.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var To={};const xo=new Uint8Array(256);let No=xo.length;const Ao=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Po=[];for(let tT=0;256>tT;++tT)Po.push((tT+256).toString(16).substr(1));let $o,Co,Do=0,Lo=0;const ko=a("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Gr.createHash("md5").update(e).digest()})),Mo=a("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Gr.createHash("sha1").update(e).digest()})),jo=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:s,stringify:i,v1:function(e,t,r){let o=t&&r||0;const s=t||Array(16);let a=(e=e||{}).node||$o,c=void 0!==e.clockseq?e.clockseq:Co;if(null==a||null==c){const t=e.random||(e.rng||n)();null==a&&(a=$o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=Co=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:Lo+1;const d=l-Do+(u-Lo)/1e4;if(0>d&&void 0===e.clockseq&&(c=c+1&16383),(0>d||l>Do)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Do=l,Lo=u,Co=c,l+=122192928e5;const p=(1e4*(268435455&l)+u)%4294967296;s[o++]=p>>>24&255,s[o++]=p>>>16&255,s[o++]=p>>>8&255,s[o++]=255&p;const f=l/4294967296*1e4&268435455;s[o++]=f>>>8&255,s[o++]=255&f,s[o++]=f>>>24&15|16,s[o++]=f>>>16&255,s[o++]=c>>>8|128,s[o++]=255&c;for(let n=0;6>n;++n)s[o+n]=a[n];return t||i(s)},v3:ko,v4:function(e,t,r){const o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=o[e];return t}return i(o)},v5:Mo,validate:o,version:function(e){if(!o(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),Uo=t(jo);var Fo=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),Bo=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Go=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&Fo(t,e,r);return Bo(t,e),t};Object.defineProperty(To,"__esModule",{value:!0}),To.prepareKeyValueMessage=To.issueFileCommand=void 0;const Ho=Go(kr),Vo=Go(Cr),qo=Uo,zo=bo;To.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!Ho.existsSync(r))throw Error("Missing file at path: "+r);Ho.appendFileSync(r,`${zo.toCommandValue(t)}${Vo.EOL}`,{encoding:"utf8"})},To.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+qo.v4(),n=zo.toCommandValue(t);if(e.includes(r))throw Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${Vo.EOL}${n}${Vo.EOL}${r}`};var Wo={};class Xo extends URL{_decodedUsername;_decodedPassword;constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var Ko,Yo={},Jo=on,Qo=tn,Zo=nn,ei=sn,ti=an;Yo.httpOverHttp=function(e){var t=new l(e);return t.request=Qo.request,t},Yo.httpsOverHttp=function(e){var t=new l(e);return t.request=Qo.request,t.createSocket=u,t.defaultPort=443,t},Yo.httpOverHttps=function(e){var t=new l(e);return t.request=Zo.request,t},Yo.httpsOverHttps=function(e){var t=new l(e);return t.request=Zo.request,t.createSocket=u,t.defaultPort=443,t},ti.inherits(l,ei.EventEmitter),l.prototype.addRequest=function(e,t,r,n){var o=this,i=p({request:e},o.options,d(t,r,n));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)})):o.requests.push(i)},l.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(Ko("tunneling socket could not be established, statusCode=%d",r.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):a.length>0?(Ko("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(Ko("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=p({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Ko("making CONNECT request");var s=n.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),s.once("connect",r),s.once("error",(function(t){s.removeAllListeners(),Ko("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=Error("tunneling socket could not be established, cause="+t.message);r.code="ECONNRESET",e.request.emit("error",r),n.removeSocket(o)})),s.end()},l.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},Ko=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},Yo.debug=Ko;var ri,ni,oi,ii,si,ai=Yo;(ni=ri||(ri={}))[ni.OK=200]="OK",ni[ni.MultipleChoices=300]="MultipleChoices",ni[ni.MovedPermanently=301]="MovedPermanently",ni[ni.ResourceMoved=302]="ResourceMoved",ni[ni.SeeOther=303]="SeeOther",ni[ni.NotModified=304]="NotModified",ni[ni.UseProxy=305]="UseProxy",ni[ni.SwitchProxy=306]="SwitchProxy",ni[ni.TemporaryRedirect=307]="TemporaryRedirect",ni[ni.PermanentRedirect=308]="PermanentRedirect",ni[ni.BadRequest=400]="BadRequest",ni[ni.Unauthorized=401]="Unauthorized",ni[ni.PaymentRequired=402]="PaymentRequired",ni[ni.Forbidden=403]="Forbidden",ni[ni.NotFound=404]="NotFound",ni[ni.MethodNotAllowed=405]="MethodNotAllowed",ni[ni.NotAcceptable=406]="NotAcceptable",ni[ni.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",ni[ni.RequestTimeout=408]="RequestTimeout",ni[ni.Conflict=409]="Conflict",ni[ni.Gone=410]="Gone",ni[ni.TooManyRequests=429]="TooManyRequests",ni[ni.InternalServerError=500]="InternalServerError",ni[ni.NotImplemented=501]="NotImplemented",ni[ni.BadGateway=502]="BadGateway",ni[ni.ServiceUnavailable=503]="ServiceUnavailable",ni[ni.GatewayTimeout=504]="GatewayTimeout",(ii=oi||(oi={})).Accept="accept",ii.ContentType="content-type",(si||(si={})).ApplicationJson="application/json";const ci=[ri.MovedPermanently,ri.ResourceMoved,ri.SeeOther,ri.TemporaryRedirect,ri.PermanentRedirect],li=[ri.BadGateway,ri.ServiceUnavailable,ri.GatewayTimeout],ui=["OPTIONS","GET","DELETE","HEAD"];class di extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,di.prototype)}statusCode;result}class pi{constructor(e){this.message=e}message;async readBody(){return new Promise((async e=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])})),this.message.on("end",(()=>{e(""+t)}))}))}async readBodyBuffer(){return new Promise((async e=>{const t=[];this.message.on("data",(e=>{t.push(e)})),this.message.on("end",(()=>{e(Buffer.concat(t))}))}))}}class fi{userAgent;handlers;requestOptions;_ignoreSslError=!1;_socketTimeout;_allowRedirects=!0;_allowRedirectDowngrade=!1;_maxRedirects=50;_allowRetries=!1;_maxRetries=1;_agent;_proxyAgent;_proxyAgentDispatcher;_keepAlive=!1;_disposed=!1;constructor(e,t,r){this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.maxRetries))}async options(e,t){return this.request("OPTIONS",e,null,t||{})}async get(e,t){return this.request("GET",e,null,t||{})}async del(e,t){return this.request("DELETE",e,null,t||{})}async post(e,t,r){return this.request("POST",e,t,r||{})}async patch(e,t,r){return this.request("PATCH",e,t,r||{})}async put(e,t,r){return this.request("PUT",e,t,r||{})}async head(e,t){return this.request("HEAD",e,null,t||{})}async sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[oi.Accept]=this._getExistingOrDefaultHeader(t,oi.Accept,si.ApplicationJson);const r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[oi.Accept]=this._getExistingOrDefaultHeader(r,oi.Accept,si.ApplicationJson),r[oi.ContentType]=this._getExistingOrDefaultHeader(r,oi.ContentType,si.ApplicationJson);const o=await this.post(e,n,r);return this._processResponse(o,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[oi.Accept]=this._getExistingOrDefaultHeader(r,oi.Accept,si.ApplicationJson),r[oi.ContentType]=this._getExistingOrDefaultHeader(r,oi.ContentType,si.ApplicationJson);const o=await this.put(e,n,r);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[oi.Accept]=this._getExistingOrDefaultHeader(r,oi.Accept,si.ApplicationJson),r[oi.ContentType]=this._getExistingOrDefaultHeader(r,oi.ContentType,si.ApplicationJson);const o=await this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&ui.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===ri.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&ci.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.protocol!==c.protocol&&!this._allowRedirectDowngrade)throw 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.");if(await a.readBody(),c.hostname!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!li.includes(a.message.statusCode))return a;c+=1,s>c&&(await a.readBody(),await this._performExponentialBackoff(c))}while(s>c);return a}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}async requestRaw(e,t){return new Promise(((r,n)=>{this.requestRawWithCallback(e,t,(function(e,t){e?n(e):t?r(t):n(Error("Unknown error"))}))}))}requestRawWithCallback(e,t,r){function n(e,t){o||(o=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{n(void 0,new pi(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){n(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=c(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o="https:"===n.parsedUrl.protocol;n.httpModule=o?rn:en;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},hi(this.requestOptions.headers),hi(e||{})):hi(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=hi(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=c(e),n=r&&r.hostname;if(this._keepAlive&&n&&(t=this._proxyAgent),n||(t=this._agent),t)return t;const o="https:"===e.protocol;let i=100;if(this.requestOptions&&(i=this.requestOptions.maxSockets||en.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=o?s?ai.httpsOverHttps:ai.httpsOverHttp:s?ai.httpOverHttps:ai.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new rn.Agent(e):new en.Agent(e),this._agent=t}return o&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}async _getProxyAgentDispatcher(e,t){let r;if(this._keepAlive&&(r=this._proxyAgentDispatcher),r)return r;const n="https:"===e.protocol;return r=new(await import("./assets/proxy-agent-CazGe35s.mjs").then((e=>e.p)))({uri:t.href,pipelining:this._keepAlive?1:0,...(t.username||t.password)&&{token:"Basic "+Buffer.from(`${t.username}:${t.password}`).toString("base64")}}),this._proxyAgentDispatcher=r,n&&this._ignoreSslError&&(r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:!1})),r}async _performExponentialBackoff(e){const t=5*Math.pow(2,e=Math.min(10,e));return new Promise((e=>setTimeout((()=>e()),t)))}async _processResponse(e,t){return new Promise((async(r,n)=>{const o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===ri.NotFound&&r(i);try{a=await e.readBody(),a&&a.length>0&&(s=t&&t.deserializeDates?JSON.parse(a,(function(e,t){if("string"==typeof t){const e=new Date(t);if(!isNaN(e.valueOf()))return e}return t})):JSON.parse(a),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new di(e,o);t.result=i.result,n(t)}else r(i)}))}}const hi=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),mi=t(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return oi},HttpClient:fi,HttpClientError:di,HttpClientResponse:pi,get HttpCodes(){return ri},get MediaTypes(){return si},getProxyUrl:function(e){const t=c(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var yi,gi={},wi=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(gi,"__esModule",{value:!0}),gi.PersonalAccessTokenCredentialHandler=gi.BearerCredentialHandler=gi.BasicCredentialHandler=void 0,gi.BasicCredentialHandler=class{constructor(e,t){this.username=e,this.password=t}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from(`${this.username}:${this.password}`).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return wi(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},gi.BearerCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Bearer "+this.token}canHandleAuthentication(){return!1}handleAuthentication(){return wi(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},gi.PersonalAccessTokenCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return wi(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var vi,bi,Ei,_i={},Si={},Oi=h();const Ri=(e,t)=>{const r=Ii(e);if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Ii=e=>e instanceof URL?fn(e):e,Ti=(e,t=[],r={})=>{const n=Ri(e,"First argument"),[o,i]=v(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError("Second argument must be either an array of arguments or an options object: "+o);if(o.some((e=>"object"==typeof e&&null!==e)))throw new TypeError("Second argument must be an array of strings: "+o);const s=o.map(String),a=s.find((e=>e.includes("\0")));if(void 0!==a)throw new TypeError('Arguments cannot contain null bytes ("\\0"): '+a);if(!v(i))throw new TypeError("Last argument must be an options object: "+i);return[n,s,i]},{toString:xi}=Object.prototype,Ni=e=>"[object Uint8Array]"===xi.call(e),Ai=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Pi=new TextEncoder,$i=e=>Pi.encode(e),Ci=new TextDecoder,Di=e=>Ci.decode(e),Li=e=>1===e.length&&Ni(e[0])?e[0]:Mi(ki(e)),ki=e=>e.map((e=>"string"==typeof e?$i(e):e)),Mi=e=>{const t=new Uint8Array(ji(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ji=e=>{let t=0;for(const r of e)t+=r.length;return t},Ui=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError("Invalid backslash sequence: "+e.raw[n]);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=Fi(o,e.raw[n]),c=Hi(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map((e=>Vi(e))):[Vi(l)];return Hi(c,u,a)},Fi=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=Bi.has(t[0]);for(let s=0,a=0;e.length>s;s+=1,a+=1){const o=t[a];if(Bi.has(o))n!==s&&r.push(e.slice(n,s)),n=s+1;else if("\\"===o){const e=t[a+1];"u"===e&&"{"===t[a+2]?a=t.indexOf("}",a+3):a+=Gi[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},Bi=new Set([" ","\t","\r","\n"]),Gi={x:3,u:5},Hi=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Vi=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return e+"";if(v(e)&&("stdout"in e||"isMaxBuffer"in e))return qi(e);if(e instanceof hn||"[object Promise]"==={}.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},qi=({stdout:e})=>{if("string"==typeof e)return e;if(Ni(e))return Di(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},zi=e=>Wi.includes(e),Wi=[Rn.stdin,Rn.stdout,Rn.stderr],Xi=["stdin","stdout","stderr"],Ki=e=>Xi[e]??`stdio[${e}]`,Yi=(e,t)=>{const r=Array.from({length:Ji(e)+1}),n=Qi(e[t],r,t);return is(n,t)},Ji=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Xi.length):Xi.length,Qi=(e,t,r)=>v(e)?Zi(e,t,r):t.fill(e),Zi=(e,t,r)=>{for(const n of Object.keys(e).sort(es))for(const o of rs(n,r,t))t[o]=e[n];return t},es=(e,t)=>ts(e)<ts(t)?1:-1,ts=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,rs=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=ns(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},ns=e=>{if("all"===e)return e;if(Xi.includes(e))return Xi.indexOf(e);const t=os.exec(e);return null!==t?Number(t[1]):void 0},os=/^fd(\d+)$/,is=(e,t)=>e.map((e=>void 0===e?ss[t]:e)),ss={lines:!1,buffer:!0,maxBuffer:1e8,verbose:vn("execa").enabled?"full":"none",stripFinalNewline:!0},as=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],cs=(e,t)=>"ipc"===t?e.at(-1):e[t],ls=({verbose:e},t)=>"none"!==ds(e,t),us=({verbose:e},t)=>!["none","short"].includes(ds(e,t)),ds=(e,t)=>void 0===t?ps(e):cs(e,t),ps=e=>e.find((e=>fs(e)))??hs.findLast((t=>e.includes(t))),fs=e=>"function"==typeof e,hs=["none","short","full"],ms=e=>bn(e).split("\n").map((e=>ys(e))).join("\n"),ys=e=>e.replaceAll(ws,(e=>gs(e))),gs=e=>{const t=vs[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r>bs?"\\U"+n:"\\u"+n.padStart(4,"0")},ws=(()=>{try{return RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),vs={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},bs=65535,Es=/^[\w./-]+$/,_s={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},Ss={..._s,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},Os={..._s,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Rs=function(){const{env:e}=Rn,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==Rn.platform?"linux"!==t:!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}()?Ss:Os,Is=Mn?.WriteStream?.prototype?.hasColors?.()??!1,Ts=(e,t)=>{if(!Is)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const t=e+"";let o=t.indexOf(n);if(-1===o)return r+t+n;let i=r,s=0;for(;-1!==o;)i+=t.slice(s,o)+r,s=o+n.length,o=t.indexOf(n,s);return i+=t.slice(s)+n,i}},xs=Ts(1,22),Ns=Ts(90,39),As=Ts(91,39),Ps=Ts(93,39),$s=(e,t)=>(e+"").padStart(t,"0"),Cs=({failed:e,reject:t})=>e?t?Rs.cross:Rs.warning:Rs.tick,Ds={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Cs,duration:Cs},Ls=e=>e,ks={command:()=>xs,output:()=>Ls,ipc:()=>Ls,error:({reject:e})=>e?As:Ps,duration:()=>Ns},Ms=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},js=e=>e.endsWith("\n")?e:e+"\n",Us=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=Fs({type:e,result:o,verboseInfo:n}),s=((e,t,r)=>{const n=(({verbose:e},t)=>{const r=ds(e,t);return fs(r)?r:void 0})(t,r);return e.map((({verboseLine:e,verboseObject:t})=>Ms(e,t,n))).filter((e=>void 0!==e)).map((e=>js(e))).join("")})(Bs(t,i),n,r);An(Hs,s)},Fs=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:""+n,timestamp:new Date,piped:o,result:t,options:i}),Bs=(e,t)=>e.split("\n").map((e=>Gs({...t,message:e}))),Gs=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=(e=>`${$s(e.getHours(),2)}:${$s(e.getMinutes(),2)}:${$s(e.getSeconds(),2)}.${$s(e.getMilliseconds(),3)}`)(r),c=Ds[e]({failed:i,reject:s,piped:n}),l=ks[e]({reject:s});return`${Ns(`[${a}]`)} ${Ns(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),Hs=2,Vs=e=>{const t="string"==typeof e?e:En(e);return ms(t).replaceAll("\t"," ".repeat(qs))},qs=2,zs=e=>ls({verbose:e})?Ws++:void 0;let Ws=0n;const Xs=()=>Tn.bigint(),Ks=e=>Number(Tn.bigint()-e)/1e6,Ys=(e,t,r)=>{const n=Xs(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map((e=>{return t=ys(e),Es.test(t)?t:"win32"===In?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`;var t})).join(" ")}})(e,t),s=((e,t,r)=>((e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!hs.includes(t)&&!fs(t)){const e=hs.map((e=>`'${e}'`)).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}})(e),{verbose:e,escapedCommand:t,commandId:zs(e),rawOptions:r}))(Yi(r,"verbose"),i,{...r});return((e,t)=>{ls(t)&&Us({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Js,Qs,Zs,ea,ta,ra={exports:{}};ta="win32"===process.platform||mo.TESTING_WINDOWS?function(){function e(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;r.length>n;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function t(t,n,o){r.stat(t,(function(r,i){o(r,!r&&e(i,t,n))}))}if(Qs)return Js;Qs=1,Js=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=kr;return Js}():function(){function e(e,n,o){r.stat(e,(function(e,r){o(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=a|c;return r&parseInt("001",8)||r&c&&o===s||r&a&&n===i||r&l&&0===i}(e,t)}if(ea)return Zs;ea=1,Zs=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=kr;return Zs}();var na=b;b.sync=function(e,t){try{return ta.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const oa="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,ia=Hr,sa=oa?";":":",aa=na,ca=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),la=(e,t)=>{const r=t.colon||sa,n=e.match(/\//)||oa&&e.match(/\\/)?[""]:[...oa?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=oa?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=oa?o.split(r):[""];return oa&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},ua=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=la(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(ca(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=ia.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(d,r,0))})),c=(e,r,n)=>new Promise(((l,u)=>{if(n===o.length)return l(a(r+1));const d=o[n];aa(e+d,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return l(e+d);s.push(e+d)}return l(c(e,r,n+1))}))}));return r?a(0).then((e=>r(null,e)),r):a(0)};var da=ua;ua.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=la(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=ia.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;n.length>e;e++){const r=d+n[e];try{if(aa.sync(r,{pathExt:o})){if(!t.all)return r;i.push(r)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw ca(e)};var pa={exports:{}};const fa=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};pa.exports=fa,pa.exports.default=fa;const ha=Hr,ma=da,ya=pa.exports;var ga={};const wa=/([()\][%!^"`<>&|;, *?])/g;ga.command=function(e){return e.replace(wa,"^$1")},ga.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(wa,"^$1"),t&&(e=e.replace(wa,"^$1")),e};const va=/^#!(.*)/,ba=kr,Ea=Hr,_a=function(e){return E(e)||E(e,!0)},Sa=ga,Oa=function(e){const t=Buffer.alloc(150);let r;try{r=ba.openSync(e,"r"),ba.readSync(r,t,0,150,0),ba.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(va);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},Ra="win32"===process.platform,Ia=/\.(?:com|exe)$/i,Ta=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,xa="win32"===process.platform,Na=Un,Aa=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:function(e){if(!Ra)return e;const t=function(e){e.file=_a(e);const t=e.file&&Oa(e.file);return t?(e.args.unshift(e.file),e.command=t,_a(e)):e.file}(e),r=!Ia.test(t);if(e.options.forceShell||r){const r=Ta.test(t);e.command=Ea.normalize(e.command),e.command=Sa.command(e.command),e.args=e.args.map((e=>Sa.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(n)},Pa={hookChildProcess:function(e,t){if(!xa)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=S(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:S,verifyENOENTSync:function(e,t){return xa&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};ra.exports=O,ra.exports.spawn=O,ra.exports.sync=function(e,t,r){const n=Aa(e,t,r),o=Na.spawnSync(n.command,n.args,n.options);return o.error=o.error||Pa.verifyENOENTSync(o.status,n),o},ra.exports._parse=Aa,ra.exports._enoent=Pa;const $a=e(ra.exports);_n(mn);const Ca=({env:e=Rn.env,...t}={})=>{const r=R({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Rn.cwd(),path:t=Rn.env[R()],preferLocal:r=!0,execPath:n=Rn.execPath,addExecPath:o=!0}={})=>{const i=jn.resolve(I(e)),s=[],a=t.split(jn.delimiter);return r&&((e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=jn.resolve(I(e));for(;t!==r;)yield r,t=r,r=jn.resolve(r,"..")}}}(r)){const r=jn.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}})(s,a,i),o&&((e,t,r,n)=>{const o=jn.resolve(n,I(r),"..");t.includes(o)||e.push(o)})(s,a,n,i),""===t||t===jn.delimiter?`${s.join(jn.delimiter)}${t}`:[...s,t].join(jn.delimiter)})(t),e};class Da extends Error{}const La=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,ka,{value:!0,writable:!1,enumerable:!1,configurable:!1})},ka=Symbol(),Ma=e=>"[object Error]"==={}.toString.call(e);class ja extends Error{}La(ja,ja.name);class Ua extends Error{}La(Ua,Ua.name);const Fa=(e,t)=>({name:"SIGRT"+(t+1),number:Ba+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ba=34,Ga=[{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:!0},{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:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{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"}],Ha=()=>{const e=Array.from({length:64-Ba+1},Fa);return[...Ga,...e].map(Va)},Va=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=Vn,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},qa=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],za=(()=>{const e=Ha();return Object.fromEntries(e.map(qa))})(),Wa=(e,t)=>{const r=t.find((({name:t})=>Vn.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ha(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Wa(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const Xa=e=>0===e?e:Ka(e,"`subprocess.kill()`'s argument"),Ka=(e,t)=>{if(Number.isInteger(e))return Ya(e,t);if("string"==typeof e)return Qa(e,t);throw new TypeError(`Invalid ${t} ${e+""}: it must be a string or an integer.\n${Za()}`)},Ya=(e,t)=>{if(Ja.has(e))return Ja.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${Za()}`)},Ja=new Map(Object.entries(Vn.signals).reverse().map((([e,t])=>[t,e]))),Qa=(e,t)=>{if(e in Vn.signals)return e;if(e.toUpperCase()in Vn.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${Za()}`)},Za=()=>`Available signal names: ${ec()}.\nAvailable signal numbers: ${tc()}.`,ec=()=>Object.keys(Vn.signals).sort().map((e=>`'${e}'`)).join(", "),tc=()=>[...new Set(Object.values(Vn.signals).sort(((e,t)=>e-t)))].join(", "),rc=e=>za[e].description,nc=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=oc(s,a,r);ic(l,n);const u=e(c);return sc({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},oc=(e,t,r)=>{const[n=r,o]=Ma(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError("The first argument must be an error instance or a signal name string/integer: "+n);if(void 0!==o&&!Ma(o))throw new TypeError("The second argument is optional. If specified, it must be an error instance: "+o);return{signal:Xa(n),error:o}},ic=(e,t)=>{void 0!==e&&t.reject(e)},sc=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&ac({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},ac=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await Fn(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},cc=async(e,t)=>{e.aborted||await qn(e,"abort",{signal:t})},lc=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[uc(e,t,n,o)],uc=async(e,t,r,{signal:n})=>{throw await cc(t,n),r.terminationReason??="cancel",e.kill(),t.reason},dc=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{pc(e,t,r),fc(e,t,n)},pc=(e,t,r)=>{if(!r)throw Error(gc(e,t)+" can only be used if the `ipc` option is `true`.")},fc=(e,t,r)=>{if(!r)throw Error(`${gc(e,t)} cannot be used: the ${vc(t)} has already exited or disconnected.`)},hc=(e,t)=>Error(`${gc("sendMessage",t)} failed when sending an acknowledgment response to the ${vc(t)}.`,{cause:e}),mc=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),yc=["could not be cloned","circular structure","call stack size exceeded"],gc=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${wc(t)}${e}(${r})`,wc=e=>e?"":"subprocess.",vc=e=>e?"parent process":"subprocess",bc=e=>{e.connected&&e.disconnect()},Ec=()=>{const e={},t=new Promise(((t,r)=>{Object.assign(e,{resolve:t,reject:r})}));return Object.assign(t,e)},_c=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Oc.get(e),i=Rc(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(xc(i,t,n,r));return s},Sc=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Oc.get(e),i=Rc(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(xc(i,t,n,r));return s},Oc=new WeakMap,Rc=(e,t,r)=>{const n=Ic(t,r);return Tc(n,t,r,e),n},Ic=(e,t)=>{const r=ns(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${Pc(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Tc=(e,t,r,n)=>{const o=n[Ac(e)];if(void 0===o)throw new TypeError(`"${Pc(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${Pc(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${Pc(r)}" must not be ${t}. It must be a writable stream, not readable.`)},xc=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nc(e,r);return`The "${o}: ${$c(i)}" option is incompatible with using "${Pc(n)}: ${$c(t)}".\nPlease set this option with "pipe" instead.`},Nc=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=Ac(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},Ac=e=>"all"===e?1:e,Pc=e=>e?"to":"from",$c=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?""+e:"Stream",Cc=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==1/0&&(e.setMaxListeners(n+t),zn(r,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},Dc=(e,t)=>{t&&Lc(e)},Lc=e=>{e.refCounted()},kc=(e,t)=>{t&&Mc(e)},Mc=e=>{e.unrefCounted()},jc=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(Xc(o)||pl(o))return;Fc.has(e)||Fc.set(e,[]);const i=Fc.get(e);if(i.push(o),1>=i.length)for(;i.length>0;){await el(e,n,o),await Bn.yield();const s=await Wc({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Uc=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{hl();const i=Fc.get(e);for(;i?.length>0;)await qn(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Lc(e),Lc(e))})(t,r),n.connected=!1,n.emit("disconnect")},Fc=new WeakMap,Bc=(e,t,r)=>{if(Gc.has(e))return Gc.get(e);const n=new Wn;return n.connected=!0,Gc.set(e,n),Hc({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Gc=new WeakMap,Hc=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=jc.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Uc.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Mc(e),Mc(e))})(r,n)},Vc=e=>{const t=Gc.get(e);return void 0===t?null!==e.channel:t.connected};let qc=0n;const zc=(e,t)=>{if(t?.type===Qc&&!t.hasListeners)for(const{id:r}of e)void 0!==r&&Yc[r].resolve({isDeadlock:!0,hasListeners:!1})},Wc=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==Qc||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:Zc,message:rl(t,o)};try{await ol({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){o.emit("strict:error",c)}return s},Xc=e=>{if(e?.type!==Zc)return!1;const{id:t,message:r}=e;return Yc[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},Kc=async(e,t,r)=>{if(e?.type!==Qc)return;const n=Ec();Yc[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,Jc(t,r,o)]);e&&(e=>{throw Error(`${gc("sendMessage",e)} failed: the ${vc(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${gc("getOneMessage",e)},\n\t${gc("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw Error(`${gc("sendMessage",e)} failed: the ${vc(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete Yc[e.id]}},Yc={},Jc=async(e,t,{signal:r})=>{Cc(e,1,r),await qn(e,"disconnect",{signal:r}),(e=>{throw Error(`${gc("sendMessage",e)} failed: the ${vc(e)} exited without listening to incoming messages.`)})(t)},Qc="execa:ipc:request",Zc="execa:ipc:response",el=async(e,t,r)=>{for(;!rl(e,t)&&tl.get(e)?.size>0;){const t=[...tl.get(e)];zc(t,r),await Promise.all(t.map((({onMessageSent:e})=>e)))}},tl=new WeakMap,rl=(e,t)=>t.listenerCount("message")>nl(e),nl=e=>Oc.has(e)&&!cs(Oc.get(e).options.buffer,"ipc")?1:0,ol=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return dc({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),il({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},il=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=Bc(e,t,r),s=rl(e,i);return{id:qc++,type:Qc,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{tl.has(e)||tl.set(e,new Set);const n=tl.get(e),o={onMessageSent:Ec(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await sl({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(c){throw bc(e),c}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},sl=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=al(e);try{await Promise.all([Kc(n,e,r),i(n)])}catch(s){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw Error(`${gc(t,r)} cannot be used: the ${vc(r)} is disconnecting.`,{cause:e})})({error:s,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if((({code:e,message:t})=>mc.has(e)||yc.some((e=>t.includes(e))))(e))throw Error(`${gc(t,r)}'s argument type is invalid: the message cannot be serialized: ${n+""}.`,{cause:e})})({error:s,methodName:t,isSubprocess:r,message:o}),s}},al=e=>{if(cl.has(e))return cl.get(e);const t=_n(e.send.bind(e));return cl.set(e,t),t},cl=new WeakMap,ll=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await ul({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),ml.signal),ul=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{dl||(dl=!0,n?null!==t?(Bc(e,t,r),await Bn.yield()):hl():(()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let dl=!1;const pl=e=>e?.type===fl&&(ml.abort(e.message),!0),fl="execa:ipc:cancel",hl=()=>{ml.abort(Error(`\`cancelSignal\` aborted: the ${vc(!0)} disconnected.`))},ml=new AbortController,yl=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[gl({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],gl=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await cc(t,o);const i=wl(t);throw await((e,t)=>{const r="cancelSignal";return fc(r,!1,e.connected),sl({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:fl,message:t},message:t})})(e,i),ac({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},wl=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},vl=(e,t,r,n)=>0===t||void 0===t?[]:[bl(e,t,r,n)],bl=async(e,t,r,{signal:n})=>{throw await Fn(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Da},El={advanced:e=>{try{Yn(e)}catch(t){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},json:e=>{try{JSON.stringify(e)}catch(t){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}}},_l=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},Sl=new Set(["utf8","utf16le"]),Ol=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Rl=new Set([...Sl,...Ol]),Il={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Tl=e=>"string"==typeof e?`"${e}"`:e+"",xl=()=>{try{return Rn.cwd()}catch(e){throw e.message="The current directory does not exist.\n"+e.message,e}},Nl=(e,t,r)=>{r.cwd=((e=xl())=>{const t=Ri(e,'The "cwd" option');return jn.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=xn,nodeOptions:o=Nn.filter((e=>!e.startsWith("--inspect"))),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Ri(n,'The "nodePath" option'),l=jn.resolve(i,c),u={...a,nodePath:l,node:r,cwd:i};if(!r)return[e,t,u];if("node"===jn.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[l,[...o,e,...t],{ipc:!0,...u,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=$a._parse(n,o,i),l=(e=>{const t={...e};for(const r of as)t[r]=Yi(e,r);return t})(c),u=Al(l);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(u),(({encoding:e})=>{if(Rl.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Il?Il[t]:Rl.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Tl(e)}\`.\nPlease rename it to ${Tl(t)}.`);const r=[...Rl].map((e=>Tl(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${Tl(e)}\`.\nPlease rename it to one of: ${r}.`)})(u),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");El[r](e)}})(u),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!=={}.toString.call(e))throw Error("The `cancelSignal` option must be an AbortSignal: "+e)})(u),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(u),u.shell=Ii(u.shell),u.env=Pl(u),u.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Ka(e,t)})(u.killSignal),u.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(u.forceKillAfterDelay),u.lines=u.lines.map(((e,t)=>e&&!Ol.has(u.encoding)&&u.buffer[t])),"win32"===Rn.platform&&"cmd"===jn.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:u}},Al=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:h="advanced",...m})=>({...m,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:h}),Pl=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...Rn.env,...e}:e;return r||n?Ca({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},$l=e=>e.at(-1)===Dl?e.slice(0,e.at(-2)===kl?-2:-1):e,Cl=e=>e.at(-1)===Ll?e.subarray(0,e.at(-2)===Ml?-2:-1):e,Dl="\n",Ll=Dl.codePointAt(0),kl="\r",Ml=kl.codePointAt(0),jl=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);let Ul=class{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(t){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),t}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}};const Fl=Symbol();Object.defineProperty($,"name",{value:"next"}),Object.defineProperty(C,"name",{value:"return"});const Bl=Object.create(jl,{next:{enumerable:!0,configurable:!0,writable:!0,value:$},return:{enumerable:!0,configurable:!0,writable:!0,value:C}}),Gl=e=>{if(A(e,{checkOpen:!1})&&void 0!==zl.on)return Vl(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===Hl.call(e))return D.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hl}=Object.prototype,Vl=async function*(e){const t=new AbortController,r={};ql(e,t,r);try{for await(const[r]of zl.on(e,"data",{signal:t.signal}))yield r}catch(n){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw n}finally{e.destroy()}},ql=async(e,t,r)=>{try{await zl.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},zl={},Wl=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=1/0}={})=>{const l=Gl(e),u=t();u.length=0;try{for await(const e of l){const t=r[Jl(e)](e,u);Kl({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return Xl({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(d){const e="object"==typeof d&&null!==d?d:Error(d);throw e.bufferedData=a(u),e}},Xl=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&Kl({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},Kl=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(i>=a)return void Yl(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&Yl(c,t,o,i),new Zl},Yl=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Jl=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=Ql.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===Ql.call(e.buffer)?"typedArray":"others"},{toString:Ql}=Object.prototype;class Zl extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const eu=e=>e,tu=()=>{},ru=({contents:e})=>e,nu=e=>{throw Error("Streams in object mode are not supported: "+e)},ou=e=>e.length,iu={init:()=>({contents:[]}),convertChunk:{string:eu,buffer:eu,arrayBuffer:eu,dataView:eu,typedArray:eu,others:eu},getSize:()=>1,truncateChunk:tu,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:tu,finalize:ru},su=new TextEncoder,au=e=>new Uint8Array(e),cu=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),lu=e=>uu**Math.ceil(Math.log(e)/Math.log(uu)),uu=2,du=()=>"resize"in ArrayBuffer.prototype,pu={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>su.encode(e),buffer:au,arrayBuffer:au,dataView:cu,typedArray:cu,others:nu},getSize:ou,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=du()?((e,t)=>{if(e.maxByteLength>=t)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:lu(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,n):((e,t)=>{if(e.byteLength>=t)return e;const r=new ArrayBuffer(lu(t));return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:tu,finalize:({contents:e,length:t})=>du()?e:e.slice(0,t)},fu=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),hu={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:eu,buffer:fu,arrayBuffer:fu,dataView:fu,typedArray:fu,others:nu},getSize:ou,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:ru},mu=(e,t,r)=>{if(t.length!==r)return;const n=new Zl;throw n.maxBufferInfo={fdNumber:"ipc"},n},yu=([,e])=>e,gu=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const h=wu(d,p);return t?`Command timed out after ${r} milliseconds${h}`:u?void 0===s?"Command was gracefully canceled with exit code "+c:d?"Command was gracefully canceled"+h:`Command was gracefully canceled with ${s} (${a})`:l?"Command was canceled"+h:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=((e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=cs(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Ki(r),threshold:o,unit:n}})(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${h}`:void 0!==i?`Command failed with ${i}${h}`:d?`Command was killed with ${f} (${rc(f)})${h}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?"Command failed with exit code "+c:"Command failed"},wu=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",vu=e=>"string"==typeof e?e:Ni(e)?Di(e):"",bu=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>Ou({command:e,escapedCommand:t,cwd:i,durationMs:Ks(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Eu=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>_u({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),_u=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:h,timeout:m=h,forceKillAfterDelay:y,killSignal:g,cwd:w,maxBuffer:v},isSync:b})=>{const{exitCode:E,signal:_,signalDescription:S}=Ru(l,u),{originalMessage:O,shortMessage:R,message:I}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:h,maxBuffer:m,timeout:y,cwd:g})=>{const w=n?.code,v=gu({originalError:n,timedOut:c,timeout:y,isMaxBuffer:d,maxBuffer:m,errorCode:w,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:h}),b=((e,t)=>{if(e instanceof Da)return;const r=Ma(n=e)&&ka in n?e.originalMessage:(e?.message??e)+"";var n;const o=ms(((e,t)=>{if(t===xl())return e;let r;try{r=Pn(t)}catch(n){return`The "cwd" option is invalid: ${t}.\n${n.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===o?void 0:o})(n,g),E=`${v}: ${a}${void 0===b?"":"\n"+b}`,_=[E,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map((e=>(e=>"string"==typeof e?e:En(e))(e))).join("\n")].map((e=>ms(T((e=>Array.isArray(e)?e.map((e=>T(vu(e)))).filter(Boolean).join("\n"):vu(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:b,shortMessage:E,message:_}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:_,signalDescription:S,exitCode:E,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:y,killSignal:g,maxBuffer:v,timeout:m,cwd:w}),x=((e,t,r)=>new(r?Ua:ja)(t,e instanceof Da?{}:{cause:e}))(e,I,b);return Object.assign(x,Su({error:x,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:E,signal:_,signalDescription:S,stdio:d,all:p,ipcOutput:f,cwd:w,originalMessage:O,shortMessage:R})),x},Su=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:h,cwd:m,originalMessage:y,shortMessage:g})=>Ou({shortMessage:g,originalMessage:y,command:t,escapedCommand:r,cwd:m,durationMs:Ks(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:h,pipedFrom:[]}),Ou=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),Ru=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:rc(t)}},Iu=e=>Number.isFinite(e)?e:0,Tu=(e,t)=>{const r=`(done in ${L(e.durationMs)})`;Us({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},xu=(e,t,{reject:r})=>{if(((e,t)=>{ls(t)&&(((e,t)=>{e.failed&&Us({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),Tu(e,t))})(e,t),e.failed&&r)throw e;return e},Nu=(e,t)=>ju(e)?"asyncGenerator":Uu(e)?"generator":Bu(e)?"fileUrl":Gu(e)?"filePath":Wu(e)?"webStream":x(e,{checkOpen:!1})?"native":Ni(e)?"uint8Array":Ku(e)?"asyncIterable":Yu(e)?"iterable":Xu(e)?$u({transform:e},t):Fu(e)?Au(e,t):"native",Au=(e,t)=>P(e.transform,{checkOpen:!1})?Pu(e,t):Xu(e.transform)?$u(e,t):Lu(e,t),Pu=(e,t)=>(Cu(e,t,"Duplex stream"),"duplex"),$u=(e,t)=>(Cu(e,t,"web TransformStream"),"webTransform"),Cu=({final:e,binary:t,objectMode:r},n,o)=>{Du(e,n+".final",o),Du(t,n+".binary",o),ku(r,n+".objectMode")},Du=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},Lu=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!Mu(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(P(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Xu(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!Mu(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return ku(r,o+".binary"),ku(n,o+".objectMode"),ju(e)||ju(t)?"asyncGenerator":"generator"},ku=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},Mu=e=>ju(e)||Uu(e),ju=e=>"[object AsyncGeneratorFunction]"==={}.toString.call(e),Uu=e=>"[object GeneratorFunction]"==={}.toString.call(e),Fu=e=>v(e)&&(void 0!==e.transform||void 0!==e.final),Bu=e=>"[object URL]"==={}.toString.call(e),Gu=e=>v(e)&&1===Object.keys(e).length&&Hu(e.file),Hu=e=>"string"==typeof e,Vu=new Set(["ipc","ignore","inherit","overlapped","pipe"]),qu=e=>"[object ReadableStream]"==={}.toString.call(e),zu=e=>"[object WritableStream]"==={}.toString.call(e),Wu=e=>qu(e)||zu(e),Xu=e=>qu(e?.readable)&&zu(e?.writable),Ku=e=>Ju(e)&&"function"==typeof e[Symbol.asyncIterator],Yu=e=>Ju(e)&&"function"==typeof e[Symbol.iterator],Ju=e=>"object"==typeof e&&null!==e,Qu=new Set(["generator","asyncGenerator","duplex","webTransform"]),Zu=new Set(["fileUrl","filePath","fileNumber"]),ed=new Set(["fileUrl","filePath"]),td=new Set([...ed,"webStream","nodeStream"]),rd=new Set(["webTransform","duplex"]),nd={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},od=(e,t,r,n)=>"output"===n?id(e,t,r):sd(e,t,r),id=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},sd=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},ad=(e,t,r,{encoding:n})=>{const o=e.filter((({type:e})=>Qu.has(e))),i=Array.from({length:o.length});for(const[s,a]of Object.entries(o))i[s]=cd({stdioItem:a,index:Number(s),newTransforms:i,optionName:t,direction:r,encoding:n});return pd(i,r)},cd=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?ld({stdioItem:e,optionName:o}):"webTransform"===t?ud({stdioItem:e,index:r,newTransforms:n,direction:i}):dd({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),ld=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},ud=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=v(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=od(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},dd=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=v(t)?t:{transform:t},d=c||Ol.has(i),{writableObjectMode:p,readableObjectMode:f}=od(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},pd=(e,t)=>"input"===t?e.reverse():e,fd=["input","output","output"],hd=()=>{},md=()=>"input",yd={generator:hd,asyncGenerator:hd,fileUrl:hd,filePath:hd,iterable:md,asyncIterable:md,uint8Array:md,webStream:e=>zu(e)?"output":"input",nodeStream:e=>A(e,{checkOpen:!1})?N(e,{checkOpen:!1})?void 0:"input":"output",webTransform:hd,duplex:hd,native(e){const t=gd(e);return void 0!==t?t:x(e,{checkOpen:!1})?yd.nodeStream(e):void 0}},gd=e=>[0,Rn.stdin].includes(e)?"input":[1,2,Rn.stdout,Rn.stderr].includes(e)?"output":void 0,wd=e=>Xi.some((t=>void 0!==e[t])),vd=(e,t)=>Array.isArray(e)?e.map((e=>vd(e,t))):null==e?Xi.length>t?"pipe":"ignore":e,bd=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),Ed=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=_d(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if(Mn.isatty(o))throw new TypeError(`The \`${t}: ${$c(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Ai($n(o)),optionName:t}}},_d=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=Wi.indexOf(e);return-1!==r?r:void 0},Sd=(e,t,r)=>{const n=Wi[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},Od=({input:e,inputFile:t},r)=>0===r?[...Rd(e),...Td(t)]:[],Rd=e=>void 0===e?[]:[{type:Id(e),value:e,optionName:"input"}],Id=e=>{if(A(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(Ni(e))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},Td=e=>void 0===e?[]:[{...xd(e),optionName:"inputFile"}],xd=e=>{if(Bu(e))return{type:"fileUrl",value:e};if(Hu(e))return{type:"filePath",value:{file:e}};throw Error("The `inputFile` option must be a file path string or a file URL.")},Nd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter((e=>Ad(e,r)));if(0===i.length)return;const s=i.find((e=>e.direction!==o));return Pd(s,n,t),"output"===o?i[0].stream:void 0},Ad=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,Pd=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${nd[r]} that is the same.`)},$d=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=((e,t)=>{if(void 0===e)return Xi.map((e=>t[e]));if(wd(t))throw Error("It's not possible to provide `stdio` in combination with one of "+Xi.map((e=>`\`${e}\``)).join(", "));if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);return Array.from({length:Math.max(e.length,Xi.length)},((t,r)=>e[r]))})(e,n).map(((e,t)=>vd(e,t)));return i?((e,t,r)=>e.map(((e,n)=>t[n]||0===n||us(r,n)||!bd(e)?e:"ignore")))(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map(((e,r)=>Cd({stdioOption:e,fdNumber:r,options:t,isSync:n}))),s=Bd({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map((({stdioItems:e})=>qd(e))),s},Cd=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Ki(t),{stdioItems:i,isStdioArray:s}=Dd({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map((e=>(({type:e,value:t},r)=>fd[r]??yd[e](t))(e,t)));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??"output"})(i,t,o),c=i.map((e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=Ed({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(x(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e})({stdioItem:e,fdNumber:n,direction:o}):(({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:Sd(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:Sd(t,t,r),optionName:r}:x(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e)({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n}))),l=((e,t,r,n)=>[...e.filter((({type:e})=>!Qu.has(e))),...ad(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast((({type:e})=>Qu.has(e)));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return Fd(l,u),{direction:a,objectMode:u,stdioItems:l}},Dd=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter(((t,r)=>e.every(((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))))([...(Array.isArray(e)?e:[e]).map((e=>Ld(e,n))),...Od(r,t)]),i=o.length>1;return kd(o,i,n),jd(o),{stdioItems:o,isStdioArray:i}},Ld=(e,t)=>({type:Nu(e,t),value:e,optionName:t}),kd=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:n,optionName:o}of e)if(Md.has(n))throw Error(`The \`${o}\` option must not include \`${n}\`.`)},Md=new Set(["ignore","ipc"]),jd=e=>{for(const t of e)Ud(t)},Ud=({type:e,value:t,optionName:r})=>{if((e=>Bu(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!Vu.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},Fd=(e,t)=>{if(!t)return;const r=e.find((({type:e})=>Zu.has(e)));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Bd=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Gd({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(i){throw Vd(o),i}},Gd=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map((t=>Hd({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s})));return{direction:e,objectMode:t,stdioItems:a}},Hd=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=((e,t)=>e.flatMap((({direction:e,stdioItems:r})=>r.filter((e=>e.type===t)).map((t=>({...t,direction:e}))))))(o,e);if(0!==s.length){if(!i)return td.has(e)?Nd({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(rd.has(e)&&(({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find((({value:{transform:e}})=>e===r.transform));Pd(o,n,t)})({otherStdioItems:s,type:e,value:t,optionName:r}));(({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{ed.has(t)&&Nd({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})})({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Vd=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||zi(e)||e.destroy()},qd=e=>{if(e.length>1)return e.some((({value:e})=>"overlapped"===e))?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},zd=({type:e,optionName:t})=>{Wd(t,nd[e])},Wd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Xd={generator(){},asyncGenerator:zd,webStream:zd,nodeStream:zd,webTransform:zd,duplex:zd,asyncIterable:zd,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Wd(e,`"${t}"`),{})},Kd={input:{...Xd,fileUrl:({value:e})=>({contents:[Ai($n(e))]}),filePath:({value:{file:e}})=>({contents:[Ai($n(e))]}),fileNumber:zd,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Xd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e}})=>({path:e}),fileNumber:({value:e})=>({path:e}),iterable:zd,string:zd,uint8Array:zd}},Yd=(e,{stripFinalNewline:t},r)=>Jd(t,r)&&void 0!==e&&!Array.isArray(e)?T(e):e,Jd=(e,t)=>"all"===t?e[1]||e[2]:e[t],Qd=(e,t,r,n)=>e||r?void 0:tp(t,n),Zd=(e,t,r)=>r?e.flatMap((e=>ep(e,t))):ep(e,t),ep=(e,t)=>{const{transform:r,final:n}=tp(t,{});return[...r(e),...n()]},tp=(e,t)=>(t.previousChunks="",{transform:rp.bind(void 0,t,e),final:op.bind(void 0,t)}),rp=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;r.length>i;i+=1)if("\n"===r[i]){const s=np(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=ap(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=ap(n,r.slice(o+1))),e.previousChunks=n},np=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),op=function*({previousChunks:e}){e.length>0&&(yield e)},ip=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:sp.bind(void 0,n)},sp=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?cp:lp;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},ap=(e,t)=>`${e}${t}`,cp={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:ap},lp={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},up=(e,t)=>e?void 0:dp.bind(void 0,t),dp=function*(e,t){if("string"!=typeof t&&!Ni(t)&&!no.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},pp=(e,t)=>e?fp.bind(void 0,t):hp.bind(void 0,t),fp=function*(e,t){mp(e,t),yield t},hp=function*(e,t){if(mp(e,t),"string"!=typeof t&&!Ni(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},mp=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},yp=(e,t,r)=>{if(r)return;if(e)return{transform:gp.bind(void 0,new TextEncoder)};const n=new wn(t);return{transform:wp.bind(void 0,n),final:vp.bind(void 0,n)}},gp=function*(e,t){no.isBuffer(t)?yield Ai(t):"string"==typeof t?yield e.encode(t):yield t},wp=function*(e,t){yield Ni(t)?e.write(t):t},vp=function*(e){const t=e.end();""!==t&&(yield t)},bp=Sn((async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}})),Ep=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=Rp}=t[r];for await(const o of n(e))yield*Ep(o,t,r+1)},_p=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*Sp(r,Number(t),e)},Sp=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*Ep(n,r,t+1)},Op=Sn((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),Rp=function*(e){yield e},Ip=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(o){n(o)}},Tp=(e,t)=>[...t.flatMap((t=>[...xp(t,e,0)])),...Np(e)],xp=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=Pp}=t[r];for(const o of n(e))yield*xp(o,t,r+1)},Np=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*Ap(r,Number(t),e)},Ap=function*(e,t,r){if(void 0!==e)for(const n of e())yield*xp(n,r,t+1)},Pp=function*(e){yield e},$p=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=Dp(e,s,i),l=ju(t),u=ju(r),d=l?bp.bind(void 0,Ep,a):Ip.bind(void 0,xp),p=l||u?bp.bind(void 0,_p,a):Ip.bind(void 0,Np),f=l||u?Op.bind(void 0,a):void 0;return{stream:new Jn({writableObjectMode:n,writableHighWaterMark:Qn(n),readableObjectMode:o,readableHighWaterMark:Qn(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},Cp=(e,t,r,n)=>{const o=t.filter((({type:e})=>"generator"===e)),i=n?o.reverse():o;for(const{value:s,optionName:a}of i){const t=Dp(s,r,a);e=Tp(t,e)}return e},Dp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:up(n,a)},yp(r,s,n),Qd(r,i,n,c),{transform:e,final:t},{transform:pp(o,a)},ip({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},Lp=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter((({contents:e})=>void 0!==e));if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${nd[e]} with synchronous methods.`)}const i=o.map((({contents:e})=>e)).map((e=>kp(e,n)));r.input=Li(i)},kp=(e,t)=>{const r=Cp(e,t,"utf8",!0);return Mp(r),Li(r)},Mp=e=>{const t=e.find((e=>"string"!=typeof e&&!Ni(e)));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},jp=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&us(r,n)&&!Ol.has(t)&&Up(n)&&(e.some((({type:e,value:t})=>"native"===e&&Fp.has(t)))||e.every((({type:e})=>Qu.has(e)))),Up=e=>1===e||2===e,Fp=new Set(["pipe","overlapped"]),Bp=e=>e._readableState.pipes.length>0,Gp=(e,t,r)=>{const n=Vs(e);Us({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Hp=(e,t,r,n)=>{try{return Cp(e,t,r,!1)}catch(o){return n.error=o,e}},Vp=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:Li(e)};const s=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const r=new wn(t),n=e.map((e=>"string"==typeof e?$i(e):e)).map((e=>r.write(e))),o=r.end();return""===o?n:[...n,o]})(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:Zd(s,!o[i],t)}:{serializedResult:s}},qp=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!jp({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=Zd(e,!1,s);try{((e,t,r)=>{for(const n of e)Gp(n,t,r)})(a,t,n)}catch(c){r.error??=c}},zp=(e,t,r)=>{for(const{path:n}of t.filter((({type:e})=>Zu.has(e)))){const t="string"==typeof n?n:""+n;r.has(t)?Cn(n,e):(r.add(t),An(n,e))}},Wp=async e=>{try{return await qn(e,"exit")}catch{return Wp(e)}},Xp=async e=>{const[t,r]=await e;if(!Kp(t,r)&&Yp(t,r))throw new Da;return[t,r]},Kp=(e,t)=>void 0===e&&void 0===t,Yp=(e,t)=>0!==e||null!==t,Jp=(e,t,r)=>void 0!==e?e:Yp(t,r)?new Da:void 0,Qp=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Zp=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&ef("ipcInput"),e&&ef("ipc: true"),r&&ef("detached: true"),n&&ef("cancelSignal")},ef=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},tf=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=rf({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=(({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Jp(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some((e=>null!==e&&e.length>yu(r))))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}})(c,r),{output:h,error:m=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map(((t,a)=>(({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=yu(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=Ai(p),{stdioItems:h,objectMode:y}=t[r],g=Hp([f],h,c,n),{serializedResult:w,finalResult:v=w}=Vp({chunks:g,objectMode:y,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});qp({serializedResult:w,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:h,objectMode:y});const b=a[r]?v:void 0;try{return void 0===n.error&&zp(w,h,o),b}catch(m){return n.error=m,b}})({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r))),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),y=h.map(((e,t)=>Yd(e,r,t))),g=Yd((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Yd(t,r,"all")]:Array.isArray(t)?[Yd(e,r,"all"),...t]:Ni(e)&&Ni(t)?Mi([e,t]):`${e}${t}`})(h,r),r,"all");return of({error:m,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:y,all:g,options:r,command:n,escapedCommand:o,startTime:a})},rf=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of(e=>new Set(Object.entries(e).filter((([,{direction:e}])=>"input"===e)).map((([e])=>Number(e)))))(e))Lp(e,r,t)})(i,r);const n=nf(r);return yn(e,t,n)}catch(a){return Eu({error:a,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},nf=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:yu(t)}),of=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?bu({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):_u({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),sf=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(dc({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Vc(e)}),af({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),af=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Dc(t,o);const i=Bc(e,t,r),s=new AbortController;try{return await Promise.race([cf(i,n,s),lf(i,r,s),uf(i,r,s)])}catch(a){throw bc(e),a}finally{s.abort(),kc(t,o)}},cf=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await qn(e,"message",{signal:r});return t}for await(const[n]of Xn(e,"message",{signal:r}))if(t(n))return n},lf=async(e,t,{signal:r})=>{await qn(e,"disconnect",{signal:r}),(e=>{throw Error(`${gc("getOneMessage",e)} could not complete: the ${vc(e)} exited or disconnected.`)})(t)},uf=async(e,t,{signal:r})=>{const[n]=await qn(e,"strict:error",{signal:r});throw hc(n,t)},df=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>pf({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),pf=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{dc({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Vc(e)}),Dc(t,i);const s=Bc(e,t,r),a=new AbortController,c={};return ff(e,s,a),hf({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),mf({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},ff=async(e,t,r)=>{try{await qn(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},hf=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await qn(e,"strict:error",{signal:r.signal});n.error=hc(o,t),r.abort()}catch{}},mf=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of Xn(r,"message",{signal:i.signal}))yf(s),yield e}catch{yf(s)}finally{i.abort(),kc(t,a),n||bc(e),o&&await e}},yf=({error:e})=>{if(e)throw e},gf=(e,t,r)=>({sendMessage:ol.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:sf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:df.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),wf=()=>{const e=new Zn;return e.end(),e},vf=()=>new eo({read(){}}),bf=()=>new to({write(){}}),Ef=()=>new ro({read(){},write(){}}),_f=async(e,t,r)=>xu(e,t,r),Sf=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${nd[e]}.`)},Of={fileNumber:Sf,generator:$p,asyncGenerator:$p,nodeStream:({value:e})=>({stream:e}),webTransform:({value:{transform:e,writableObjectMode:t,readableObjectMode:r}})=>({stream:ro.fromWeb(e,{objectMode:t||r})}),duplex:({value:{transform:e}})=>({stream:e}),native(){}},Rf={input:{...Of,fileUrl:({value:e})=>({stream:Dn(e)}),filePath:({value:{file:e}})=>({stream:Dn(e)}),webStream:({value:e})=>({stream:eo.fromWeb(e)}),iterable:({value:e})=>({stream:eo.from(e)}),asyncIterable:({value:e})=>({stream:eo.from(e)}),string:({value:e})=>({stream:eo.from(e)}),uint8Array:({value:e})=>({stream:eo.from(no.from(e))})},output:{...Of,fileUrl:({value:e})=>({stream:Ln(e)}),filePath:({value:{file:e}})=>({stream:Ln(e)}),webStream:({value:e})=>({stream:to.fromWeb(e)}),iterable:Sf,asyncIterable:Sf,string:Sf,uint8Array:Sf}},If=(e,t)=>{if(0===e.length)return Qn(t);const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class Tf extends Zn{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol();#d=new WeakMap;add(e){if(Pf(e),this.#s.has(e))return;this.#s.add(e),this.#l??=xf(this,this.#s,this.#u);const t=$f({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Pf(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const xf=async(e,t,r)=>{Gf(e,Hf);const n=new AbortController;try{await Promise.race([Nf(e,n),Af(e,t,r,n)])}finally{n.abort(),Gf(e,-Hf)}},Nf=async(e,{signal:t})=>{try{await oo(e,{signal:t,cleanup:!0})}catch(r){throw Mf(e,r),r}},Af=async(e,t,r,{signal:n})=>{for await(const[o]of Xn(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Pf=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},$f=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Gf(e,Vf);const a=new AbortController;try{await Promise.race([Cf(i,t,a),Df({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Lf({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Gf(e,-Vf)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Uf(e):kf(e))},Cf=async(e,t,{signal:r})=>{try{await e,r.aborted||Uf(t)}catch(n){r.aborted||Mf(t,n)}},Df=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await oo(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(s){if(i.aborted||!r.has(t))return;jf(s)?o.add(t):Ff(e,s)}},Lf=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await qn(e,o,{signal:i}),!e.readable)return qn(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},kf=e=>{e.writable&&e.end()},Mf=(e,t)=>{jf(t)?Uf(e):Ff(e,t)},jf=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Uf=e=>{(e.readable||e.writable)&&e.destroy()},Ff=(e,t)=>{e.destroyed||(e.once("error",Bf),e.destroy(t))},Bf=()=>{},Gf=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==1/0&&e.setMaxListeners(r+t)},Hf=2,Vf=1,qf=(e,t)=>{e.pipe(t),zf(e,t),Xf(e,t)},zf=async(e,t)=>{if(!zi(e)&&!zi(t)){try{await oo(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Wf(t)}},Wf=e=>{e.writable&&e.end()},Xf=async(e,t)=>{if(!zi(e)&&!zi(t)){try{await oo(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Kf(e)}},Kf=e=>{e.readable&&e.destroy()},Yf=(e,t,r,n)=>{"output"===r?qf(e.stdio[n],t):qf(t,e.stdio[n]);const o=Jf[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Jf=["stdin","stdout","stderr"],Qf=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Zf(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Zf=(e,{signal:t})=>{zi(e)&&Cc(e,eh,t)},eh=2,th=[];th.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&th.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&th.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const rh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,nh=Symbol.for("signal-exit emitter"),oh=globalThis,ih=Object.defineProperty.bind(Object);class sh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(oh[nh])return oh[nh];ih(oh,nh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class ah{}const ch=globalThis.process,{onExit:lh}=(uh=rh(ch)?new class extends ah{#p="win32"===ch.platform?"SIGINT":"SIGHUP";#f=new sh;#h;#m;#y;#g={};#w=!1;constructor(e){super(),this.#h=e,this.#g={};for(const t of th)this.#g[t]=()=>{const r=this.#h.listeners(t);let{count:n}=this.#f;if("object"==typeof e.__signal_exit_emitter__&&"number"==typeof e.__signal_exit_emitter__.count&&(n+=e.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#y=e.reallyExit,this.#m=e.emit}onExit(e,t){if(!rh(this.#h))return()=>{};!1===this.#w&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#w){this.#w=!0,this.#f.count+=1;for(const t of th)try{const e=this.#g[t];e&&this.#h.on(t,e)}catch(e){}this.#h.emit=(e,...t)=>this.#v(e,...t),this.#h.reallyExit=e=>this.#b(e)}}unload(){this.#w&&(this.#w=!1,th.forEach((e=>{const t=this.#g[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#h.removeListener(e,t)}catch(r){}})),this.#h.emit=this.#m,this.#h.reallyExit=this.#y,this.#f.count-=1)}#b(e){return rh(this.#h)?(this.#h.exitCode=e||0,this.#f.emit("exit",this.#h.exitCode,null),this.#y.call(this.#h,this.#h.exitCode)):0}#v(e,...t){const r=this.#m;if("exit"===e&&rh(this.#h)){"number"==typeof t[0]&&(this.#h.exitCode=t[0]);const n=r.call(this.#h,e,...t);return this.#f.emit("exit",this.#h.exitCode,null),n}return r.call(this.#h,e,...t)}}(ch):new class extends ah{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>uh.onExit(e,t),load:()=>uh.load(),unload:()=>uh.unload()});var uh;const dh=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(ph,e)(r,...n),pipeOptions:e};if("string"==typeof r||r instanceof URL){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=Ti(r,...n);return{destination:t(ph)(o,i,s),pipeOptions:s}}if(Oc.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError("The first argument must be a template string, an options object, or an Execa subprocess: "+r)},ph=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),fh=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Eu({error:e,command:hh,escapedCommand:hh,fileDescriptors:t,options:r,startTime:n,isSync:!1}),hh="source.pipe(destination)",mh=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},yh=new WeakMap,gh=(e,t)=>void 0===e?[]:[wh(e,t)],wh=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{throw await On(e,t),await r.remove(t),fh({error:Error("Pipe canceled by `unpipeSignal` option."),fileDescriptors:n,sourceOptions:o,startTime:i})},vh=(e,...t)=>{if(v(t[0]))return vh.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Xs(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=((e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=dh(e,t,...r);return{destination:n,destinationStream:_c(n,i),from:o,unpipeSignal:s}}catch(n){return{destinationError:n}}})(r,n,o),{sourceStream:d,sourceError:p}=((e,t)=>{try{return{sourceStream:Sc(e,t)}}catch(r){return{sourceError:r}}})(e,l),{options:f,fileDescriptors:h}=Oc.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:h,startTime:i}})(e,...t),o=bh({...n,destination:r});return o.pipe=vh.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bh=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=Eh(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Kf(e),n):void 0!==t?(Wf(r),t):void 0)({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw fh({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=yh.has(t)?((e,t)=>{const r=yh.get(t);return r.add(e),r})(e,t):((e,t)=>{const r=k([e]);return qf(r,t),yh.set(t,r),r})(e,t);return Cc(e,2,r.signal),Cc(t,1,r.signal),(async e=>{try{await oo(e,{cleanup:!0,readable:!1,writable:!0})}catch{}yh.delete(e)})(t),n})(t,i,d);return await Promise.race([mh(u),...gh(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},Eh=(e,t)=>Promise.allSettled([e,t]),_h=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sh(t,s),Ih({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sh=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Oh=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;Rh(t,s,e);const a=e.readableObjectMode&&!i;return Ih({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},Rh=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Ih=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=Xn(e,"data",{signal:t.signal,highWaterMark:xh,highWatermark:xh});return Nh({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Th=Qn(!0),xh=Th,Nh=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Ah({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*xp(t,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Np(a)}},Ah=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[yp(e,r,!t),Qd(e,o,!n,{})].filter(Boolean),Ph=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=$h({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void(await Promise.all([Ch(e),d]));const p=Jd(c,r),f=Oh({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[h]=await Promise.all([Dh({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return h},$h=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!jp({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Oh({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Bp(t)||Gp(o,r,n)})(a,e,r,i)},Ch=async e=>{await Gn(),null===e.readableFlowing&&e.resume()},Dh=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return Wl(e,iu,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return Wl(e,pu,t)}(r,{maxBuffer:i})):await async function(e,t){return Wl(e,hu,t)}(r,{maxBuffer:i})}catch(a){return kh((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof Zl))throw e;if("all"===i)return e;const s=((e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters")(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:a,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Lh=async e=>{try{return await e}catch(t){return kh(t)}},kh=({bufferedData:e})=>"[object ArrayBuffer]"===xi.call(e)?new Uint8Array(e):e,Mh=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=jh(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],oo(e,{cleanup:!0,signal:s.signal})])}catch(a){i.stdinCleanedUp||Bh(a,t,r,n)}finally{s.abort()}},jh=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&Uh(e,r,n),n},Uh=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{Fh(t,r),n.call(e,...o)}},Fh=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bh=(e,t,r,n)=>{if(!Gh(e,t,r,n))throw e},Gh=(e,t,r,n=!0)=>r.propagating?qh(e)||Vh(e):(r.propagating=!0,Hh(r,t)===n?qh(e):Vh(e)),Hh=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Vh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,qh=e=>"EPIPE"===e?.code,zh=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mh(e,t,l);if(Hh(l,t))return void(await u);const[d]=await Promise.all([Ph({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Wh=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Xh=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,Kh=(e,t)=>{const r=Vs(e);Us({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},Yh=async(e,t)=>(await Promise.allSettled([e]),t),Jh=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:h,originalStreams:m,onInternalError:y,controller:g})=>{const w=(async(e,t)=>{const[r,n]=await(async e=>{const[t,r]=await Promise.allSettled([qn(e,"spawn"),qn(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Wp(e):r.value})(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:m,fileDescriptors:h,subprocess:e,exitPromise:w,propagating:!1},b=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map(((e,c)=>zh({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a}))))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>zh({...Wh(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Xh(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),_=[],S=(async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>us(e,"ipc"))(i),a=cs(t,"ipc"),c=cs(r,"ipc");for await(const l of pf({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(mu(0,o,c),o.push(l)),s&&Kh(l,i);return o})({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:_,verboseInfo:f}),O=Qh(m,e,v),R=Zh(h,v);try{return await Promise.race([Promise.all([{},Xp(w),Promise.all(b),E,S,_l(e,d),...O,...R]),y,em(e,g),...vl(e,i,p,g),...lc({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:g}),...yl({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:g})])}catch(I){return p.terminationReason??="other",Promise.all([{error:I},w,Promise.all(b.map((e=>Lh(e)))),Lh(E),Yh(S,_),Promise.allSettled(O),Promise.allSettled(R)])}},Qh=(e,t,r)=>e.map(((e,n)=>e===t.stdio[n]?void 0:Mh(e,n,r))),Zh=(e,t)=>e.flatMap((({stdioItems:e},r)=>e.filter((({value:e,stream:t=e})=>x(t,{checkOpen:!1})&&!zi(t))).map((({type:e,value:n,stream:o=n})=>Mh(o,r,t,{isSameDirection:Qu.has(e),stopOnExit:"native"===e}))))),em=async(e,{signal:t})=>{const[r]=await qn(e,"error",{signal:t});throw r},tm=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Ec();return o.push(i),{resolve:i.resolve.bind(i),promises:o}},rm=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},nm=async e=>{if(void 0!==e)try{await om(e)}catch{}},om=async e=>{await oo(e,{cleanup:!0,readable:!1,writable:!0})},im=async e=>{await oo(e,{cleanup:!0,readable:!0,writable:!1})},sm=async(e,t)=>{if(await e,t)throw t},am=(e,t,r)=>{r&&!Vh(r)?e.destroy(r):t&&e.destroy()},cm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Ol.has(r),{subprocessStdout:a,waitReadableDestroy:c}=lm(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=um(a,s),{read:p,onStdoutDataDone:f}=dm({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),h=new eo({read:p,destroy:Sn(hm.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return fm({subprocessStdout:a,onStdoutDataDone:f,readable:h,subprocess:e}),h},lm=(e,t,r)=>{const n=Sc(e,t);return{subprocessStdout:n,waitReadableDestroy:tm(r,n,"readableDestroy")}},um=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Th},dm=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Ec(),s=_h({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){pm(this,s,i)},onStdoutDataDone:i}},pm=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},fm=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await im(e),await n,await nm(o),await t,r.readable&&r.push(null)}catch(i){await nm(o),mm(r,i)}},hm=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await rm(r,t)&&(mm(e,n),await sm(t,n))},mm=(e,t)=>{am(e,e.readable,t)},ym=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gm(e,r,t),s=new to({...wm(n,e,o),destroy:Sn(_m.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return Em(n,s),s},gm=(e,t,r)=>{const n=_c(e,t);return{subprocessStdin:n,waitWritableFinal:tm(r,n,"writableFinal"),waitWritableDestroy:tm(r,n,"writableDestroy")}},wm=(e,t,r)=>({write:vm.bind(void 0,e),final:Sn(bm.bind(void 0,e,t,r))}),vm=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},bm=async(e,t,r)=>{await rm(r,t)&&(e.writable&&e.end(),await t)},Em=async(e,t,r)=>{try{await om(e),t.writable&&t.end()}catch(n){await(async e=>{if(void 0!==e)try{await im(e)}catch{}})(r),Sm(t,n)}},_m=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await rm(r,t),await rm(n,t)&&(Sm(e,o),await sm(t,o))},Sm=(e,t)=>{am(e,e.writable,t)},Om=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Ol.has(r),{subprocessStdout:c,waitReadableDestroy:l}=lm(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gm(e,o,t),{readableEncoding:f,readableObjectMode:h,readableHighWaterMark:m}=um(c,a),{read:y,onStdoutDataDone:g}=dm({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),w=new ro({read:y,...wm(u,e,d),destroy:Sn(Rm.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:m,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:h,writableObjectMode:u.writableObjectMode,encoding:f});return fm({subprocessStdout:c,onStdoutDataDone:g,readable:w,subprocess:e,subprocessStdin:u}),Em(u,w,c),w},Rm=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([hm({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),_m({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Im=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Ol.has(t),s=Sc(e,r),a=_h({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Tm(a,s,e)},Tm=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},xm=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=cm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=ym.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=Om.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Im.bind(void 0,e,t),e[Symbol.asyncIterator]=Im.bind(void 0,e,t,{})},Nm=(async()=>{})().constructor.prototype,Am=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Nm,e)])),Pm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=Ys(e,t,r),{file:a,commandArguments:c,options:l}=Nl(e,t,r),u=$m(l),d=((e,t)=>$d(Rf,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},$m=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Cm=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=gn(e,t,r)}catch(f){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Vd(n);const a=new hn;((e,t)=>{const r=wf(),n=wf(),o=wf(),i=Array.from({length:t.length-3},wf),s=wf(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})})(a,n),Object.assign(a,{readable:vf,writable:bf,duplex:Ef});const c=Eu({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:_f(c,s,o)}})({error:f,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;Kn(1/0,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter((({type:e})=>Qu.has(e))))Yf(e,t,s,o);for(const{stream:t}of i.filter((({type:e})=>!Qu.has(e))))Qf({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[o,i]of n.entries()){const e=1===i.length?i[0]:k(i);qf(e,o)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=lh((()=>{e.kill()}));zn(n,(()=>{o()}))})(c,r,l);const d={},p=Ec();return c.kill=nc.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?k([e,t].filter(Boolean)):void 0)(c,r),xm(c,r),((e,{ipc:t})=>{Object.assign(e,gf(e,!1,t))})(c,r),{subprocess:c,promise:Dm({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Dm=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],h,m,y]=await Jh({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const g=h.map(((e,r)=>Yd(e,t,r))),w=Yd(m,t,"all"),v=Lm({errorInfo:d,exitCode:p,signal:f,stdio:g,all:w,ipcOutput:y,context:c,options:t,command:s,escapedCommand:a,startTime:r});return xu(v,n,t)},Lm=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?_u({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof Zl,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):bu({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),km=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map((([t,r])=>[t,Mm(t,e[t],r)])));return{...e,...r}},Mm=(e,t,r)=>jm.has(e)&&v(t)&&v(r)?{...t,...r}:r,jm=new Set(["env",...as]),Um=(e,t,r,n)=>{const o=(e,t,n)=>Um(e,t,r,n),i=(...i)=>Fm({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fm=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(v(i))return o(e,km(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Bm({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=((e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=Ys(e,t,r),a=Qp(r),{file:c,commandArguments:l,options:u}=Nl(e,t,a);Zp(u);const d=((e,t)=>$d(Kd,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}})(e,t,r),d=tf({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return xu(d,c,l)})(a,c,l):((e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Pm(e,t,r),{subprocess:p,promise:f}=Cm({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=vh.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Am){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Oc.set(p,{options:u,fileDescriptors:d}),p})(a,c,l,o)},Bm=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=Array.isArray(s=t)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[i,s]of e.entries())r=Ui({templates:e,expressions:t,tokens:r,index:i,template:s});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r];var s;const[a,c,l]=Ti(...i),u=km(km(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:h=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:h}},Gm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Hm(e);return{file:r,commandArguments:n}},Hm=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${e+""}.`);const t=e.trim();if(""===t)return[];const r=[];for(const n of t.split(Vm)){const e=r.at(-1);e&&e.endsWith("\\")?r[r.length-1]=`${e.slice(0,-1)} ${n}`:r.push(n)}return r},Vm=/ +/g,qm=({options:e})=>({...zm(e),isSync:!0}),zm=e=>({options:{...Wm(e),...e}}),Wm=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},Xm=Um((()=>({}))),Km=Um((()=>({isSync:!0}))),Ym=Um((({file:e,commandArguments:t})=>Gm(e,t))),Jm=Um((({file:e,commandArguments:t})=>({...Gm(e,t),isSync:!0})));Um((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),Um((({options:e})=>zm(e)),{},{preferLocal:!0},((e,t,r)=>{e.sync=t(qm,r),e.s=e.sync})),(()=>{const e=Rn,t=!0,r=void 0!==Rn.channel;gf(e,t,r),ll.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})();var Qm={},Zm={};Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.sync=Zm.isexe=void 0;const ey=kr,ty=cn;Zm.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ry(await(0,ty.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Zm.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ry((0,ey.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const ry=(e,t)=>e.isFile()&&ny(e,t),ny=(e,t)=>{const r=t.uid??process.getuid?.(),n=t.groups??process.getgroups?.()??[],o=t.gid??process.getgid?.()??n[0];if(void 0===r||void 0===o)throw Error("cannot get uid or gid");const i=new Set([o,...n]),s=e.mode,a=e.uid,c=e.gid,l=parseInt("100",8),u=parseInt("010",8),d=l|u;return!!(s&parseInt("001",8)||s&u&&i.has(c)||s&l&&a===r||s&d&&0===r)};var oy={};Object.defineProperty(oy,"__esModule",{value:!0}),oy.sync=oy.isexe=void 0;const iy=kr,sy=cn;oy.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ay(await(0,sy.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},oy.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ay((0,iy.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const ay=(e,t,r)=>e.isFile()&&((e,t)=>{const{pathExt:r=process.env.PATHEXT||""}=t,n=r.split(";");if(-1!==n.indexOf(""))return!0;for(let o=0;n.length>o;o++){const t=n[o].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);var cy={};Object.defineProperty(cy,"__esModule",{value:!0}),function(e){var t=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=mo&&mo.__exportStar||function(e,r){for(var n in e)"default"===n||{}.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;const i=n(Zm);e.posix=i;const s=n(oy);e.win32=s,o(cy,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Qm);const{isexe:ly,sync:uy}=Qm,{join:dy,delimiter:py,sep:fy,posix:hy}=Hr,my="win32"===process.platform,yy=RegExp(`[${hy.sep}${fy===hy.sep?"":fy}]`.replace(/(\\)/g,"\\$1")),gy=RegExp("^\\."+yy.source),wy=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),vy=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=py})=>{const o=e.match(yy)?[""]:[...my?[process.cwd()]:[],...(t||"").split(n)];if(my){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),i=t.split(n).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},by=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&gy.test(t)?t.slice(0,2):"")+dy(r,t)},Ey=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=vy(e,t),i=[];for(const s of r){const r=by(s,e);for(const e of n){const n=r+e;if(await ly(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw wy(e)};var _y=Ey;Ey.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=vy(e,t),i=[];for(const s of r){const r=by(s,e);for(const e of n){const n=r+e;if(uy(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw wy(e)};const Sy=e(_y);let Oy;var Ry,Iy={};j(Iy,"hasSudo",(()=>U)),j(Iy,"isRoot",(()=>F)),j(Iy,"isSudo",(()=>B)),j(Iy,"prependSudo",(()=>G)),j(Iy,"defaultExecOptions",(()=>Ty)),j(Iy,"execRootSync",(()=>H)),j(Iy,"execRoot",(()=>V));let Ty={stdio:"inherit",shell:!0};j(Ry={},"isAdminWindows",(()=>xy)),j(Ry,"isAdminPosix",(()=>Ny)),j(Ry,"isAdmin",(()=>W));let xy=async function(){if("win32"!==process.platform)return!1;try{return await Xm("fsutil",["dirty","query",process.env.systemdrive??""]),!0}catch(e){return"ENOENT"===e.code&&async function(){try{return await Xm("fltmc"),!0}catch{return!1}}()}},Ny=F;j({},"grantUserWriteAccess",(()=>X));var Ay,Py,$y,Cy,Dy,Ly,ky,My,jy,Uy,Fy,By,Gy,Hy,Vy=function(e){return null!=e},qy=Vy,zy=[].forEach,Wy=Object.create,Xy=function(e){var t=Wy(null);return zy.call(arguments,(function(e){qy(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Ky="function"==typeof($y=Math.sign)&&1===$y(10)&&-1===$y(-20)?Math.sign:Py?Ay:(Py=1,Ay=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}),Yy=Math.abs,Jy=Math.floor,Qy=Math.max,Zy=function(e){return Qy(0,function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?Ky(e)*Jy(Yy(e)):e}(e))},eg=Zy,tg=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&eg(e)},rg=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},ng=Vy,og=function(e){if(!ng(e))throw new TypeError("Cannot use null or undefined");return e},ig=rg,sg=og,ag=function(){}.bind,cg=function(){}.call,lg=Object.keys,ug={}.propertyIsEnumerable,dg=(Cy="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(sg(e)),ig(t),r=lg(e),o&&r.sort("function"==typeof o?ag.call(o,e):void 0),"function"!=typeof Cy&&(Cy=r[Cy]),cg.call(Cy,r,(function(r,o){return ug.call(e,r)?cg.call(t,n,e[r],r,e,o):undefined}))}),pg={},fg={exports:{}},hg="function"==typeof(Hy=Object.assign)&&(Hy(Gy={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Gy.foo+Gy.bar+Gy.trzy==="razdwatrzy")?Object.assign:function(){if(By)return Fy;By=1;var e=Uy?jy:(Uy=1,jy=(Ly?Dy:(Ly=1,Dy=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(My)return ky;My=1;var e=Vy,t=Object.keys;return ky=function(r){return t(e(r)?Object(r):r)}}()),t=og,r=Math.max;return Fy=function(n,o){var i,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return n},Fy}(),mg=Vy,yg={function:!0,object:!0},gg=function(e){return mg(e)&&yg[typeof e]||!1};!function(e){var t=hg,r=gg,n=Vy,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),a=arguments[1],c=arguments[2];return n(c)||r(a)&&(c=a,a=null),n(c)&&t(s,c),n(a)&&(s.code=a),o&&o(s,e.exports),s}}(fg);var wg,vg,bg,Eg,_g=fg.exports,Sg={exports:{}},Og=Zy;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(eT){}Eg=K(),bg=function(){var e=[];return function(t){var r,n=0;if(e[t])return e[t];for(r=[];t--;)r.push("a"+(++n).toString(36));return Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),Sg.exports=function(e,t){var r;if(t=Og(t),e.length===t)return e;r=bg(t)(e);try{Eg(r,e)}catch(eT){}return r};var Rg,Ig,Tg=Sg.exports,xg={exports:{}},Ng=function(e){return null!=e},Ag=Ng,Pg={object:!0,function:!0,undefined:!0},$g=function(e){if(!function(e){return!!Ag(e)&&hasOwnProperty.call(Pg,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},Cg=/^\s*class[\s{/}]/,Dg=function(){}.toString,Lg="razdwatrzy",kg="function"==typeof Lg.contains&&!0===Lg.contains("dwa")&&!1===Lg.contains("foo")?"".contains:function(){if(Ig)return Rg;Ig=1;var e="".indexOf;return Rg=function(t){return e.call(this,t,arguments[1])>-1}}(),Mg=Ng,jg=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!$g(e)}(e)&&!Cg.test(Dg.call(e))},Ug=hg,Fg=Xy,Bg=kg;(xg.exports=function(e,t){var r,n,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],Mg(e)?(r=Bg.call(e,"c"),n=Bg.call(e,"e"),o=Bg.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Ug(Fg(i),s):s}).gs=function(e,t,r){var n,o,i,s;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],Mg(t)?jg(t)?Mg(r)?jg(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,Mg(e)?(n=Bg.call(e,"c"),o=Bg.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Ug(Fg(i),s):s};var Gg,Hg,Vg,qg,zg,Wg,Xg,Kg,Yg,Jg,Qg,Zg,ew,tw,rw,nw,ow,iw,sw=xg.exports,aw={exports:{}};Gg=aw,Qg=rg,Zg=function(){}.apply,ew=function(){}.call,tw=Object.create,rw=Object.defineProperty,nw=Object.defineProperties,ow={}.hasOwnProperty,iw={configurable:!0,enumerable:!1,writable:!0},qg=function(e,t){var r,n;return Qg(t),n=this,Vg.call(this,e,r=function(){zg.call(n,e,r),Zg.call(t,this,arguments)}),r.__eeOnceListener__=t,this},zg=function(e,t){var r,n,o,i;if(Qg(t),!ow.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},Wg=function(e){var t,r,n,o,i;if(ow.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)Zg.call(n,this,i)}else switch(arguments.length){case 1:ew.call(o,this);break;case 2:ew.call(o,this,arguments[1]);break;case 3:ew.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];Zg.call(o,this,i)}},Xg={on:Vg=function(e,t){var r;return Qg(t),ow.call(this,"__ee__")?r=this.__ee__:(r=iw.value=tw(null),rw(this,"__ee__",iw),iw.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:qg,off:zg,emit:Wg},Kg={on:(Jg=sw)(Vg),once:Jg(qg),off:Jg(zg),emit:Jg(Wg)},Yg=nw({},Kg),Gg.exports=Hg=function(e){return null==e?tw(Yg):nw(Object(e),Kg)},Hg.methods=Xg;var cw,lw,uw,dw,pw,fw,hw,mw,yw,gw,ww,vw,bw,Ew,_w,Sw,Ow,Rw,Iw,Tw,xw,Nw,Aw,Pw,$w,Cw,Dw,Lw,kw,Mw,jw,Uw,Fw,Bw,Gw,Hw=aw.exports,Vw=Z(),qw=Array.isArray,zw=Vy,Ww=rg,Xw=[].slice;Gw=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(Xw.call(e,this.length))};var Kw,Yw,Jw,Qw,Zw,ev,tv,rv,nv,ov,iv,sv,av,cv,lv,uv,dv,pv,fv,hv,mv,yv,gv,wv,vv,bv,Ev,_v,Sv,Ov,Rv,Iv,Tv,xv,Nv,Av,Pv,$v,Cv,Dv,Lv,kv,Mv,jv,Uv,Fv,Bv,Gv=rg,Hv=_g,Vv=Tg,qv=sw,zv=Hw.methods,Wv=function(e){return(t=e,e=qw(t)?t:Vw(t)).forEach((function(e){zw(e)&&Ww(e)})),Gw.bind(e);var t},Xv=function(){}.apply,Kv=function(){}.call,Yv=Object.create,Jv=Object.defineProperties,Qv=zv.on,Zv=zv.emit,eb=rg,tb=dg,rb=pg,nb=function(e,t,r){var n,o,i,s,a,c,l,u,d,p,f,h,m,y,g,w=Yv(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(p=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:Gv(e.get)},void 0!==e.set?(t.set=Gv(e.set),e.delete&&(t.delete=Gv(e.delete)),e.clear&&(t.clear=Gv(e.clear)),t):(t.set=t.get,t))}(r.normalizer),i=p.get,s=p.set,a=p.delete,c=p.clear),null!=r.resolvers&&(g=Wv(r.resolvers)),y=i?Vv((function(t){var r,o,a=arguments;if(g&&(a=g(a)),null!==(r=i(a))&&hasOwnProperty.call(w,r))return f&&n.emit("get",r,a,this),w[r];if(o=1===a.length?Kv.call(e,this,a[0]):Xv.call(e,this,a),null===r){if(null!==(r=i(a)))throw Hv("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(w,r))throw Hv("Circular invocation","CIRCULAR_INVOCATION");return w[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(w,"data"))return f&&n.emit("get","data",arguments,this),w.data;if(t=arguments.length?Xv.call(e,this,arguments):Kv.call(e,this),hasOwnProperty.call(w,"data"))throw Hv("Circular invocation","CIRCULAR_INVOCATION");return w.data=t,h&&n.emit("set","data",null,t),t}:function(t){var r,o,i=arguments;if(g&&(i=g(arguments)),o=i[0]+"",hasOwnProperty.call(w,o))return f&&n.emit("get",o,i,this),w[o];if(r=1===i.length?Kv.call(e,this,i[0]):Xv.call(e,this,i),hasOwnProperty.call(w,o))throw Hv("Circular invocation","CIRCULAR_INVOCATION");return w[o]=r,h&&n.emit("set",o,null,r),r},n={original:e,memoized:y,profileName:r.profileName,get:function(e){return g&&(e=g(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(w,e)},delete:function(e){var t;hasOwnProperty.call(w,e)&&(a&&a(e),t=w[e],delete w[e],m&&n.emit("delete",e,t))},clear:function(){var e=w;c&&c(),w=Yv(null),n.emit("clear",e)},on:function(e,t){return"get"===e?f=!0:"set"===e?h=!0:"delete"===e&&(m=!0),Qv.call(this,e,t)},emit:Zv,updateEnv:function(){e=n.original}},l=i?Vv((function(e){var t,r=arguments;g&&(r=g(r)),null!==(t=i(r))&&n.delete(t)}),o):0===t?function(){return n.delete("data")}:function(e){return g&&(e=g(arguments)[0]),n.delete(e)},u=Vv((function(){var e,r=arguments;return 0===t?w.data:(g&&(r=g(r)),e=i?i(r):r[0]+"",w[e])})),d=Vv((function(){var e,r=arguments;return 0===t?n.has("data"):(g&&(r=g(r)),null!==(e=i?i(r):r[0]+"")&&n.has(e))})),Jv(y,{__memoized__:qv(!0),delete:qv(l),clear:qv(n.clear),_get:qv(u),_has:qv(d)}),n},ob=tg,ib={},sb={},ab={exports:{}},cb={},lb={},ub={},db={},pb=Xy,fb=tg,hb=function e(t){var r,n,o;if(eb(t),(r=Object(arguments[1])).async&&r.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(n=ob(r.length,t.length,r.async&&rb.async),o=nb(t,n,r),tb(rb,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},mb=function(e){var t,r=pb(arguments[1]);return r.normalizer||0!==(t=r.length=fb(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(Yw||(Yw=1,Kw=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),Kw):t>1&&(r.normalizer=(Qw||(Qw=1,Jw=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),Jw)(t)):r.normalizer=!1===t?function(){if(cv)return av;cv=1;var e=ee(),t=Object.create;return av=function(){var r=0,n=[],o=t(null);return{get:function(t){var r,o=0,i=n,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(r=e.call(i[0],t[o])))return null;i=i[1][r],++o}return-1===(r=e.call(i[0],t[o]))?null:i[1][r]||null}return null},set:function(t){var i,s=0,a=n,c=t.length;if(0===c)a[c]=++r;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++r}return o[r]=t,r},delete:function(t){var r,i=0,s=n,a=o[t],c=a.length,l=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(r=e.call(s[0],a[i])))return;l.push(s,r),s=s[1][r],++i}if(-1===(r=e.call(s[0],a[i])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&l.length;)r=l.pop(),(s=l.pop())[0].splice(r,1),s[1].splice(r,1)}delete o[t]},clear:function(){n=[],o=t(null)}}},av}()():1===t?function(){if(uv)return lv;uv=1;var e=ee();return lv=function(){var t=0,r=[],n=[];return{get:function(t){var o=e.call(r,t[0]);return-1===o?null:n[o]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var o=e.call(n,t);-1!==o&&(r.splice(o,1),n.splice(o,1))},clear:function(){r=[],n=[]}}}}()():function(){if(pv)return dv;pv=1;var e=ee(),t=Object.create;return dv=function(r){var n=0,o=[[],[]],i=t(null);return{get:function(t){for(var n,i=0,s=o;r-1>i;){if(-1===(n=e.call(s[0],t[i])))return null;s=s[1][n],++i}return-1===(n=e.call(s[0],t[i]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=o;r-1>a;)-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1),c[1][s]=++n,i[n]=t,n},delete:function(t){for(var n,s=0,a=o,c=[],l=i[t];r-1>s;){if(-1===(n=e.call(a[0],l[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],l[s]))){for(t=a[1][n],a[0].splice(n,1),a[1].splice(n,1);!a[0].length&&c.length;)n=c.pop(),(a=c.pop())[0].splice(n,1),a[1].splice(n,1);delete i[t]}},clear:function(){o=[[],[]],i=t(null)}}},dv}()(t)),r.async&&function(){if(gv)return ib;gv=1;var e=Z(),t=te(),r=K(),n=Tg,o=re(),i=[].slice,s=function(){}.apply,a=Object.create;pg.async=function(c,l){var u,d,p,f=a(null),h=a(null),m=l.memoized,y=l.original;l.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(u=r,t=i.call(t,0,-1)),m.apply(d=this,p=t)}),m);try{r(l.memoized,m)}catch(eT){}l.on("get",(function(e){var t,r,n;if(u){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],u]:f[e].push(u),void(u=null);t=u,r=d,n=p,u=d=p=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],l.emit("getasync",e,n,r),s.call(t,o.context,o.args)):(u=t,d=r,p=n,m.apply(r,n))}))}})),l.original=function(){var t,r,n,i;return u?(t=e(arguments),r=function t(r){var n,a,c=t.id;if(null!=c){if(delete t.id,n=f[c],delete f[c],n)return a=e(arguments),l.has(c)&&(r?l.delete(c):(h[c]={context:this,args:a},l.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?i=s.call(n,this,a):n.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},n=u,u=d=p=null,t.push(r),i=s.call(y,this,t),r.cb=n,u=r,i):s.call(y,this,arguments)},l.on("set",(function(e){u?(f[e]?"function"==typeof f[e]?f[e]=[f[e],u.cb]:f[e].push(u.cb):f[e]=u.cb,delete u.cb,u.id=e,u=null):l.delete(e)})),l.on("delete",(function(e){var t;hasOwnProperty.call(f,e)||h[e]&&(t=h[e],delete h[e],l.emit("deleteasync",e,i.call(t.args,1)))})),l.on("clear",(function(){var e=h;h=a(null),l.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),r.promise&&ie(),r.dispose&&function(){if($v)return cb;$v=1;var e=rg,t=dg,r=pg,n=function(){}.apply;r.dispose=function(o,i,s){var a;if(e(o),s.async&&r.async||s.promise&&r.promise)return i.on("deleteasync",a=function(e,t){n.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),r.maxAge&&function(){if(Mv)return lb;Mv=1;var e=Z(),t=dg,r=re(),n=oe(),o=function(){if(kv)return Lv;kv=1;var e=Zy,t=Dv?Cv:(Dv=1,Cv=2147483647);return Lv=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=pg,s=Function.prototype,a=Math.max,c=Math.min,l=Object.create;i.maxAge=function(u,d,p){var f,h,m,y;(u=o(u))&&(f=l(null),d.on("set"+(h=p.async&&i.async||p.promise&&i.promise?"async":""),(function(e){f[e]=setTimeout((function(){d.delete(e)}),u),"function"==typeof f[e].unref&&f[e].unref(),y&&(y[e]&&"nextTick"!==y[e]&&clearTimeout(y[e]),y[e]=setTimeout((function(){delete y[e]}),m),"function"==typeof y[e].unref&&y[e].unref())})),d.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],y&&("nextTick"!==y[e]&&clearTimeout(y[e]),delete y[e])})),p.preFetch&&(m=!0===p.preFetch||isNaN(p.preFetch)?.333:a(c(Number(p.preFetch),1),0))&&(y={},m=(1-m)*u,d.on("get"+h,(function(t,o,i){y[t]||(y[t]="nextTick",r((function(){var r;"nextTick"===y[t]&&(delete y[t],d.delete(t),p.async&&(o=e(o)).push(s),r=d.memoized.apply(i,o),p.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),d.on("clear"+h,(function(){t(f,(function(e){clearTimeout(e)})),f={},y&&(t(y,(function(e){"nextTick"!==e&&clearTimeout(e)})),y={})})))}}(),r.max&&function(){if(Fv)return ub;Fv=1;var e=Zy,t=function(){if(Uv)return jv;Uv=1;var e=Zy,t=Object.create,r={}.hasOwnProperty;return jv=function(n){var o,i=0,s=1,a=t(null),c=t(null),l=0;return n=e(n),{hit:function(e){var t=c[e],u=++l;if(a[u]=e,c[e]=u,!t){if(++i,n>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return l=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),l=0}}}}(),r=pg;r.max=function(n,o,i){var s,a,c;(n=e(n))&&(a=t(n),o.on("set"+(s=i.async&&r.async||i.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),r.refCounter&&function(){if(Bv)return db;Bv=1;var e=sw,t=pg,r=Object.create,n=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=r(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),n(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),hb(e,r)};const yb=e(mb),gb=/^~(?=$|\/|\\)/,{appendFile:wb,readFile:vb,writeFile:bb}=Mr,Eb=ae("~/.bashrc"),_b=yb((async function(e){const t=void 0===e.guard?`\nsource "${e.rcPath}"\n`:`\n# ${e.guard}\nif [[ "$SOURCE_${e.guard.toUpperCase()}RC" != 0 && -f "${e.rcPath}" ]]; then source "${e.rcPath}"; fi\n`;try{await Promise.all([ce(e),le(t,ae("~/.bashrc")),le(t,ae("~/.profile"))])}catch(r){y(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Sb=Cr,Ob="win32"!==Sb.platform(),Rb=Sb.release(),Ib=/(\d+\.\d+)\.(\d+)/,Tb=e((function(e){return Ob?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...Ib.exec(Rb).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var xb,Nb,Ab,Pb,$b={exports:{}};Ab=function(){if(Nb)return xb;Nb=1;var e=/[|\\{}()[\]^$+*?.]/g;return xb=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Pb=function(e){return e.split("").reverse().join("")},$b.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Ab(t)+"])(?!"+Ab(r)+")","g"),Pb(Pb(e).replace(n,"$1"+r)))};const Cb=e($b.exports),{appendFile:Db}=Mr,{appendFile:Lb}=Mr,kb=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Mb={exports:{}};!function(e){!function(){function t(e,t,o){if(r(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=n[e](t);return void 0!==o[i]?o[i]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{he(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var n={},o={create:function(e){return r(e),{pluralize:function(r,n){return t(e,r,n)}}},addLocale:function(e,t){n[e]=t},pluralize:t};e.exports=o}()}(Mb);var jb=Mb.exports,Ub=jb;const Fb=e(Ub);var Bb={};jb.addLocale("en",(function(e){var t=Math.floor(Math.abs(e)),r=(""+e).replace(/^[^.]*\.?/,"").length;return"string"==typeof e&&(e=parseInt(e,10)),1===t&&0===r?"one":"other"}));var Gb={exports:{}};Gb.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const Hb=Ub,Vb=Gb.exports,qb=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],zb={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},Wb={},Xb=e({create:function(e){return e=Object.assign({},zb,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!Wb[e]){if(!Vb||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{me(he(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(r.locale,{autoload:r.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const n=function(e,t){let r=t-e;const n=[];return qb.some((function(e){const t=e[0],o=e[1],i=Math.floor(r/o);if(r-=i*o,n.push([t,i]),0>=r)return!0})),n}(e,t),o=[];for(const i of n){const[e,t]=i;if(t>0&&o.push(ye(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:me,defaultConfig:zb}),Kb=e({id:"en",data:{long:{years:{one:"{0} year",other:"{0} years"},months:{one:"{0} month",other:"{0} months"},weeks:{one:"{0} week",other:"{0} weeks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hour",other:"{0} hours"},minutes:{one:"{0} minute",other:"{0} minutes"},seconds:{one:"{0} second",other:"{0} seconds"}},narrow:{years:{one:"{0}y",other:"{0}y"},months:{one:"{0}m",other:"{0}m"},weeks:{one:"{0}w",other:"{0}w"},days:{one:"{0}d",other:"{0}d"},hours:{one:"{0}h",other:"{0}h"},minutes:{one:"{0}m",other:"{0}m"},seconds:{one:"{0}s",other:"{0}s"}},short:{years:{one:"{0} yr",other:"{0} yrs"},months:{one:"{0} mth",other:"{0} mths"},weeks:{one:"{0} wk",other:"{0} wks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hr",other:"{0} hr"},minutes:{one:"{0} min",other:"{0} min"},seconds:{one:"{0} sec",other:"{0} sec"}}}});var Yb={exports:{}},Jb={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Qb="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=Jb,i=Qb,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[d,n]],f=(e,t,r)=>{const n=(e=>{for(const[t,r]of p)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),o=u++;i(e,o,t),l[e]=o,c[o]=t,s[o]=RegExp(t,r?"g":void 0),a[o]=RegExp(n,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",d+"+"),f("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),f("FULL",`^${c[l.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),f("LOOSE",`^${c[l.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),f("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),f("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),f("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),f("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),f("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[l.COERCE],!0),f("COERCERTLFULL",c[l.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Yb,Yb.exports);var Zb=Yb.exports;const eE=Object.freeze({loose:!0}),tE=Object.freeze({});var rE=e=>e?"object"!=typeof e?eE:e:tE;const nE=/^[0-9]+$/,oE=(e,t)=>{const r=nE.test(e),n=nE.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var iE={compareIdentifiers:oE,rcompareIdentifiers:(e,t)=>oE(t,e)};const sE=Qb,{MAX_LENGTH:aE,MAX_SAFE_INTEGER:cE}=Jb,{safeRe:lE,t:uE}=Zb,dE=rE,{compareIdentifiers:pE}=iE;var fE=class e{constructor(t,r){if(r=dE(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>aE)throw new TypeError(`version is longer than ${aE} characters`);sE("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?lE[uE.LOOSE]:lE[uE.FULL]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>cE||0>this.major)throw new TypeError("Invalid major version");if(this.minor>cE||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>cE||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&cE>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(sE("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),pE(this.major,t.major)||pE(this.minor,t.minor)||pE(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const e=this.prerelease[r],n=t.prerelease[r];if(sE("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return pE(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(sE("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return pE(e,n)}while(++r)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===pE(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}};const hE=fE;var mE=(e,t,r=!1)=>{if(e instanceof hE)return e;try{return new hE(e,t)}catch(n){if(!r)return null;throw n}};const yE=mE;var gE=(e,t)=>{const r=yE(e,t);return r?r.version:null};const wE=e(gE),vE=mE;const bE=fE;const EE=mE;const _E=fE;var SE=(e,t)=>new _E(e,t).major;const OE=e(SE),RE=fE;const IE=fE;const TE=mE;const xE=fE;var NE=(e,t,r)=>new xE(e,r).compare(new xE(t,r));const AE=e(NE),PE=NE;const $E=NE;const CE=fE;var DE=(e,t,r)=>{const n=new CE(e,r),o=new CE(t,r);return n.compare(o)||n.compareBuild(o)};const LE=DE;const kE=DE;const ME=NE;var jE=(e,t,r)=>ME(e,t,r)>0;const UE=NE;var FE=(e,t,r)=>0>UE(e,t,r);const BE=NE;var GE=(e,t,r)=>0===BE(e,t,r);const HE=NE;var VE=(e,t,r)=>0!==HE(e,t,r);const qE=NE;var zE=(e,t,r)=>qE(e,t,r)>=0;const WE=NE;var XE=(e,t,r)=>0>=WE(e,t,r);const KE=e(XE),YE=GE,JE=VE,QE=jE,ZE=zE,e_=FE,t_=XE;var r_=(e,t,r,n)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return YE(e,r,n);case"!=":return JE(e,r,n);case">":return QE(e,r,n);case">=":return ZE(e,r,n);case"<":return e_(e,r,n);case"<=":return t_(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const n_=fE,o_=mE,{safeRe:i_,t:s_}=Zb;var a_=(e,t)=>{if(e instanceof n_)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?i_[s_.COERCERTLFULL]:i_[s_.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?i_[s_.COERCEFULL]:i_[s_.COERCE]);return null===r?null:o_(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const c_=e(a_);var l_,u_,d_,p_,f_=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};const h_=ge();var m_=(e,t,r)=>{try{t=new h_(t,r)}catch(n){return!1}return t.test(e)};const y_=ge();const g_=fE,w_=ge();const v_=fE,b_=ge();const E_=fE,__=ge(),S_=jE;const O_=ge();const R_=fE,I_=we(),{ANY:T_}=I_,x_=ge(),N_=m_,A_=jE,P_=FE,$_=XE,C_=zE;var D_=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new R_(e,n),t=new x_(t,n),r){case">":o=A_,i=$_,s=P_,a=">",c=">=";break;case"<":o=P_,i=C_,s=A_,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(N_(e,t,n))return!1;for(let l=0;t.set.length>l;++l){let r=null,u=null;if(t.set[l].forEach((e=>{e.semver===T_&&(e=new I_(">=0.0.0")),r=r||e,u=u||e,o(e.semver,r.semver,n)?r=e:s(e.semver,u.semver,n)&&(u=e)})),r.operator===a||r.operator===c)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;if(u.operator===c&&s(e,u.semver))return!1}return!0};const L_=D_;const k_=D_;const M_=ge();const j_=m_,U_=NE,F_=ge(),B_=we(),{ANY:G_}=B_,H_=m_,V_=NE,q_=[new B_(">=0.0.0-0")],z_=[new B_(">=0.0.0")],W_=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===G_){if(1===t.length&&t[0].semver===G_)return!0;e=r.includePrerelease?q_:z_}if(1===t.length&&t[0].semver===G_){if(r.includePrerelease)return!0;t=z_}const n=new Set;let o,i,s,a,c,l,u;for(const f of e)">"===f.operator||">="===f.operator?o=X_(o,f,r):"<"===f.operator||"<="===f.operator?i=K_(i,f,r):n.add(f.semver);if(n.size>1)return null;if(o&&i){if(s=V_(o.semver,i.semver,r),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const f of n){if(o&&!H_(f,o+"",r))return null;if(i&&!H_(f,i+"",r))return null;for(const e of t)if(!H_(f,e+"",r))return!1;return!0}let d=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver,p=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const f of t){if(u=u||">"===f.operator||">="===f.operator,l=l||"<"===f.operator||"<="===f.operator,o)if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),">"===f.operator||">="===f.operator){if(a=X_(o,f,r),a===f&&a!==o)return!1}else if(">="===o.operator&&!H_(o.semver,f+"",r))return!1;if(i)if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),"<"===f.operator||"<="===f.operator){if(c=K_(i,f,r),c===f&&c!==i)return!1}else if("<="===i.operator&&!H_(i.semver,f+"",r))return!1;if(!f.operator&&(i||o)&&0!==s)return!1}return!(o&&l&&!i&&0!==s||i&&u&&!o&&0!==s||p||d)},X_=(e,t,r)=>{if(!e)return t;const n=V_(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},K_=(e,t,r)=>{if(!e)return t;const n=V_(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const Y_=Zb,J_=Jb,Q_=fE,Z_=iE;var eS={parse:mE,valid:gE,clean:(e,t)=>{const r=vE(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new bE(e instanceof bE?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=EE(e,null,!0),n=EE(t,null,!0),o=r.compare(n);if(0===o)return null;const i=o>0,s=i?r:n,a=i?n:r,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"},major:SE,minor:(e,t)=>new RE(e,t).minor,patch:(e,t)=>new IE(e,t).patch,prerelease:(e,t)=>{const r=TE(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:NE,rcompare:(e,t,r)=>PE(t,e,r),compareLoose:(e,t)=>$E(e,t,!0),compareBuild:DE,sort:(e,t)=>e.sort(((e,r)=>LE(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>kE(r,e,t))),gt:jE,lt:FE,eq:GE,neq:VE,gte:zE,lte:XE,cmp:r_,coerce:a_,Comparator:we(),Range:ge(),satisfies:m_,toComparators:(e,t)=>new y_(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new w_(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new g_(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new b_(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new v_(n,r)))})),n},minVersion:(e,t)=>{e=new __(e,t);let r=new E_("0.0.0");if(e.test(r))return r;if(r=new E_("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;e.set.length>n;++n){let t=null;e.set[n].forEach((e=>{const r=new E_(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!S_(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!S_(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new O_(e,t).range||"*"}catch(r){return null}},outside:D_,gtr:(e,t,r)=>L_(e,t,">",r),ltr:(e,t,r)=>k_(e,t,"<",r),intersects:(e,t,r)=>(e=new M_(e,r),t=new M_(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>U_(e,t,r)));for(const l of s)j_(l,t,r)?(i=l,o||(o=l)):(i&&n.push([o,i]),i=null,o=null);o&&n.push([o,null]);const a=[];for(const[l,u]of n)a.push(l===u?l:u||l!==s[0]?u?l===s[0]?"<="+u:`${l} - ${u}`:">="+l:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,r={})=>{if(e===t)return!0;e=new F_(e,r),t=new F_(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=W_(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:Q_,re:Y_.re,src:Y_.src,tokens:Y_.t,SEMVER_SPEC_VERSION:J_.SEMVER_SPEC_VERSION,RELEASE_TYPES:J_.RELEASE_TYPES,compareIdentifiers:Z_.compareIdentifiers,rcompareIdentifiers:Z_.rcompareIdentifiers},tS=eS,rS=Cr,nS=Hr,oS=kr,iS=nn,sS=io.env.npm_package_json,aS=io.env.npm_config_user_agent,cS=!(!aS||!aS.startsWith("npm")),lS=!(!sS||!sS.endsWith("package.json")),uS=cS||lS,dS=!(!aS||!aS.startsWith("yarn")),pS=uS||dS,fS=rS.homedir(),hS=process.env.XDG_CONFIG_HOME||nS.join(fS,".config","simple-update-notifier"),mS=function(e){return nS.join(hS,"".concat(e.replace("@","").replace("/","__"),".json"))},yS=function(e,t){return ve(void 0,0,void 0,(function(){var r;return be(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){iS.get(r,(function(r){var o="";r.on("data",(function(e){return o+=e})),r.on("end",(function(){try{var r=JSON.parse(o)[t];r||n(Error("Error getting version")),e(r)}catch(i){n(Error("Could not parse version response"))}}))})).on("error",(function(e){return n(e)}))}))]}))}))},gS=function(e){var t=e.pkg,r=e.updateCheckInterval,n=void 0===r?864e5:r,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return ve(void 0,0,void 0,(function(){var r,o;return be(this,(function(c){switch(c.label){case 0:return oS.existsSync(hS)||oS.mkdirSync(hS,{recursive:!0}),r=function(t){var r=mS(t);try{if(!oS.existsSync(r))return;return JSON.parse(oS.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,yS(t.name,i)]:[3,2];case 1:return o=c.sent(),l=mS(t.name),oS.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),tS.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(n,"ms but only ").concat((new Date).getTime()-r,"ms since last check.")),c.label=3;case 3:return[2,!1]}var l}))}))};const wS=e((function(e){return ve(void 0,0,void 0,(function(){var t,r;return be(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||pS&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,gS(e)];case 2:return(t=n.sent())&&console.error(function(e){for(var t=e.split("\n"),r=Math.max.apply(Math,t.map((function(e){return e.length}))),n=["┌".concat("─".repeat(r+2),"┐")],o=0,i=t;i.length>o;o++)n.push("│ ".concat(i[o].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return r=n.sent(),e.debug&&r instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",r),[3,4];case 4:return[2]}}))}))})),vS={name:"setup-cpp",version:"0.43.0"};var bS={};!function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r,n=0;t.length>n;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=t(kr),s=so,a=t(Hr),c=t(tn),l=t(nn),u=sn,d=e.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"};e.DownloaderHelper=function(e){function t(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,n)?(i.url=i.requestURL=e.trim(),i.state=d.IDLE,i.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=d,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=n,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):r(i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(){var e=this,t=function(){return new Promise((function(t,r){e.__promise={resolve:t,reject:r},e.__start()}))};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then((function(r){var n=r.name,o=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,fileName:n}):t()})):t()}},{key:"pause",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return e.__setState(e.__states.PAUSED),e.emit("pause"),!0})))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__requestAbort(),this.__closeFileStream().then((function(){return e.__opts.removeOnStop?new Promise((function(t,r){i.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void i.unlink(e.__filePath,(function(n){return n?(e.__setState(e.__states.FAILED),e.emit("error",n),r(n)):(e.__emitStop(),void t(!0))}))}))})):(e.__emitStop(),Promise.resolve(!0))})))}},{key:"pipe",value:function(e){return this.__pipes.push({stream:e,options:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null}),e}},{key:"unpipe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=function(t){return e.__response?e.__response.unpipe(t):t.unpipe()};t?this.__pipes.find((function(e){return e.stream===t}))&&(r(t),this.__pipes=this.__pipes.filter((function(e){return e.stream!==t}))):(this.__pipes.forEach((function(e){return r(e.stream)})),this.__pipes=[])}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.__opts=Object.assign({},this.__opts,e),this.__headers=this.__opts.headers,this.__opts.timeout>-1&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),("number"!=typeof this.__opts.progressThrottle||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=t||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var e=this;return new Promise((function(t,r){var n=function(t){e.__initProtocol(t);var r=Object.assign({},e.__headers);r.hasOwnProperty("range")&&delete r.range;var n=e.__getReqOptions("HEAD",t,r);return Object.assign({},e.__reqOptions,n)},o=function(i,a){var c=e.__protocol.request(a,(function(a){if(e.__isRequireRedirect(a)){var c=/^https?:\/\//.test(a.headers.location)?a.headers.location:new s.URL(a.headers.location,i).href;return e.emit("redirected",c,i),o(c,n(c))}return 200===a.statusCode?void t({name:e.__getFileNameFromHeaders(a.headers,a),total:parseInt(a.headers["content-length"])||null}):r(Error("Response status was "+a.statusCode))}));c.on("error",(function(e){return r(e)})),c.on("timeout",(function(){return r(Error("timeout"))})),c.on("uncaughtException",(function(e){return r(e)})),c.end()};o(e.url,n(e.url))}))}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=e,(r.total&&r.fileName?Promise.resolve({name:r.fileName,total:r.total}):this.getTotalSize()).then((function(e){var n=e.name;return t.__total=r.total||e.total,t.__fileName=r.fileName||n,t.__downloaded=r.downloaded||t.__getFilesizeInBytes(t.__filePath),t.__reqOptions.headers.range="bytes="+t.__downloaded+"-",t.__isResumed=!0,t.__isResumable=!0,t.__setState(t.__states.RESUMED),t.emit("resume",t.__isResumed),new Promise((function(e,r){t.__promise={resolve:e,reject:r},t.__start()}))}))}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var e=this.__promise.resolve;return this.__promise=null,e(!0)}}},{key:"__downloadRequest",value:function(e,t){var r=this;return this.__protocol.request(this.__reqOptions,(function(n){if(r.__response=n,r.__isResumed||(r.__total=parseInt(n.headers["content-length"])||null,r.__resetStats()),r.__isRequireRedirect(n)){var o=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(o),r.emit("redirected",o,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var i=Error("Response status was "+n.statusCode);return i.status=n.statusCode||0,i.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",i),t(i)}(r.__opts.forceResume||n.headers.hasOwnProperty("accept-ranges")&&"none"!==n.headers["accept-ranges"])&&(r.__isResumable=!0),r.__startDownload(n,e,t)}))}},{key:"__startDownload",value:function(e,t,r){var o=this,s=e;if(this.__isResumed)this.__fileStream=i.createWriteStream(this.__filePath,{flags:"a"});else{var c=this.__getFileNameFromHeaders(e.headers);if(this.__filePath=this.__getFilePath(c),this.__fileName=this.__filePath.split(a.sep).pop(),i.existsSync(this.__filePath)){var l=this.__getFilesizeInBytes(this.__filePath),u=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||l>=u))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:l}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=i.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",(function(e){return o.__calculateStats(e.length)})),this.__pipes.forEach((function(e){s.pipe(e.stream,e.options),s=e.stream})),s.pipe(this.__fileStream),s.on("error",this.__onError(t,r)),this.__fileStream.on("finish",this.__onFinished(t,r)),this.__fileStream.on("error",this.__onError(t,r))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&-1===[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)}},{key:"__isRequireRedirect",value:function(e){return e.statusCode>300&&400>e.statusCode&&e.headers.hasOwnProperty("location")&&e.headers.location}},{key:"__onFinished",value:function(e,t){var r=this;return function(){r.__fileStream.close((function(n){if(n)return t(n);if(r.__hasFinished()){var o=!!r.__total&&r.__downloaded!==r.__total;if(o&&r.__isResumable&&r.__opts.resumeOnIncomplete&&r.__opts.resumeOnIncompleteMaxRetry>=r.__resumeRetryCount)return r.__resumeRetryCount++,r.emit("warning",Error("uncomplete download, retrying")),r.resume();r.__setState(r.__states.FINISHED),r.__pipes=[],r.emit("end",{fileName:r.__fileName,filePath:r.__filePath,totalSize:r.__total,incomplete:o,onDiskSize:r.__getFilesizeInBytes(r.__filePath),downloadedSize:r.__downloaded})}return e(r.__downloaded===r.__total)}))}}},{key:"__closeFileStream",value:function(){var e=this;return this.__fileStream?new Promise((function(t,r){e.__fileStream.close((function(e){return e?r(e):t(!0)}))})):Promise.resolve(!0)}},{key:"__onError",value:function(e,t){var r=this,n=!(2>=arguments.length||void 0===arguments[2])&&arguments[2];return function(e){return r.__pipes=[],n&&r.__requestAbort(),r.state===r.__states.STOPPED||r.state===r.__states.FAILED?void 0:r.__opts.retry?r.__retry(e).catch((function(n){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",n||e),t(n||e)}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",e),t(e)}))}}},{key:"__retry",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.__opts.retry||"object"!==n(this.__opts.retry))return Promise.reject(t||Error("wrong retry options"));var r=this.__opts.retry,o=r.delay,i=void 0===o?0:o,s=r.maxRetries;return(void 0===s?999:s)>this.__retryCount?(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,t),this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return new Promise((function(t){return e.__retryTimeout=setTimeout((function(){return t(e.__downloaded>0?e.resume():e.__start())}),i)}))}))):Promise.reject(t||Error("reached the maximum retries"))}},{key:"__onTimeout",value:function(e,t){var r=this;return function(){return r.__requestAbort(),r.__opts.retry?r.__retry(Error("timeout")).catch((function(e){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),e?t(e):(r.emit("timeout"),t(Error("timeout")))}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("timeout"),t(Error("timeout"))}))}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(e,t){var r="",n=e.hasOwnProperty("content-disposition"),o=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!n||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(o||i||c)?(r=(r=e["content-disposition"]).trim(),o?r=o[1]:i?r=i[1]:c&&(r=c[1]),r=r.replace(/[/\\]/g,"")):r=a.basename(new s.URL(this.requestURL).pathname).length>0?a.basename(new s.URL(this.requestURL).pathname):new s.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(r,t):r.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(e){var t=a.join(this.__destFolder,e),r=t;return this.__opts.override||this.state===this.__states.RESUMED||t!==(r=this.__uniqFileNameSync(r))&&this.emit("renamed",{path:r,fileName:r.split(a.sep).pop(),prevPath:t,prevFileName:t.split(a.sep).pop()}),r}},{key:"__getFileNameFromOpts",value:function(e,t){if(!this.__opts.fileName)return e;if("string"==typeof this.__opts.fileName)return this.__opts.fileName;if("function"==typeof this.__opts.fileName){var r=a.join(this.__destFolder,e);return t&&t.headers||this.__response&&this.__response.headers?this.__opts.fileName(e,r,(t||this.__response).headers["content-type"]):this.__opts.fileName(e,r)}if("object"===n(this.__opts.fileName)){var o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||n>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=t,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(e){this.state=e,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new s.URL(t),o={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(o.headers=r),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.statSync(e,{throwIfNoEntry:!1}).size||0}catch(t){this.emit("warning",t)}return 0}},{key:"__validate",value:function(e,t){if("string"!=typeof e)throw Error("URL should be an string");if(""===e.trim())throw Error("URL couldn't be empty");if("string"!=typeof t)throw Error("Destination Folder should be an string");if(""===t.trim())throw Error("Destination Folder couldn't be empty");if(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.constants.W_OK)}catch(r){throw Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(e){var t=this.__getReqOptions(this.__opts.method,e,this.__headers);this.requestURL=e,e.indexOf("https://")>-1?(this.__protocol=l,t.agent=new l.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpsRequestOptions)):(this.__protocol=c,t.agent=new c.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(e){if("string"!=typeof e||""===e)return e;try{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?r=r.replace(o="."+o,""):o="",this.__uniqFileNameSync(r+" ("+ ++n+")"+o)}catch(s){return e}}},{key:"__removeFile",value:function(){var e=this;return new Promise((function(t){return e.__fileStream?void e.__fileStream.close((function(r){return r&&e.emit("warning",r),e.__opts.removeOnFail?i.access(e.__filePath,(function(n){return n?t():void i.unlink(e.__filePath,(function(n){n&&e.emit("warning",r),t()}))})):void t()})):t()}))}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(u.EventEmitter)}(bS);const{appendFile:ES}=Mr,_S="Dpkg::Lock::Timeout=300";let SS=!1;const OS=yb((function(e=Ie()){H(e,"nala"!==e?["update","-y","-o",_S]:["update","-o",_S],{...Ty,env:Oe(e)}),SS=!0}));var RS,IS;(IS=RS||(RS={}))[IS.NameDashVersion=0]="NameDashVersion",IS[IS.NameEqualsVersion=1]="NameEqualsVersion",IS[IS.Name=2]="Name",IS[IS.None=3]="None";const TS=yb((async function(e){OS(e);const t=await Ne([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&H(e,["install","-y","--fix-broken","-o",_S,...t],{...Ty,env:Oe(e)})}),{promise:!0}),xS=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],NS="/etc/apt/trusted.gpg.d",AS="keyserver.ubuntu.com";let PS,$S,CS,DS,LS,kS=!1,MS=!1,jS=!1,US=!1;const FS=/Version\s*:\s*(.*)/g;let BS=!1;var GS=Hr;const HS=e((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=GS.basename(e,GS.extname(e))+t,o=GS.join(GS.dirname(e),n);return(r=e.slice(0,2))==="."+GS.sep||"./"===r?"."+GS.sep+o:o}));var VS={},qS={};Xe(qS,"name",(()=>Ke));var zS={};Xe(zS,"normalizeTrim",(()=>Ye));var WS={};Xe(WS,"addExeExt",(()=>Je));var XS={};Xe(XS,"addNamePrefix",(()=>Qe));var KS={};Xe(KS,"addNameSuffix",(()=>Ze));var YS={};Xe(YS,"addShExt",(()=>et));var JS={};Xe(JS,"addShRelativePrefix",(()=>tt));var QS={};Xe(QS,"removeExt",(()=>rt));var ZS={};Xe(ZS,"replaceExt",(()=>nt));var eO={};Xe(eO,"isPathInside",(()=>ot)),We(VS,qS),We(VS,zS),We(VS,WS),We(VS,XS),We(VS,KS),We(VS,YS),We(VS,JS),We(VS,QS),We(VS,ZS),We(VS,eO);const tO=["x64","amd64","x86_64","win64","64"],rO=["x86","i386","ia32","win32","32","x32"],nO=["aarch64","arm64","woa64","arm"],oO=["armv7","armv7a"],iO=["powerpc64le","ppc64le"],sO=["sparc64"];var aO={},cO={},lO={};!function(e){function t(e){return(1&e.mode)>0||(8&e.mode)>0&&e.gid===process.getgid()||(64&e.mode)>0&&e.uid===process.getuid()}var r,n=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getCmdPath=e.tryGetExecutablePath=e.isRooted=e.isDirectory=e.exists=e.READONLY=e.UV_FS_O_EXLOCK=e.IS_WINDOWS=e.unlink=e.symlink=e.stat=e.rmdir=e.rm=e.rename=e.readlink=e.readdir=e.open=e.mkdir=e.lstat=e.copyFile=e.chmod=void 0;const a=i(kr),c=i(Hr);e.chmod=(r=a.promises).chmod,e.copyFile=r.copyFile,e.lstat=r.lstat,e.mkdir=r.mkdir,e.open=r.open,e.readdir=r.readdir,e.readlink=r.readlink,e.rename=r.rename,e.rm=r.rm,e.rmdir=r.rmdir,e.stat=r.stat,e.symlink=r.symlink,e.unlink=r.unlink,e.IS_WINDOWS="win32"===process.platform,e.UV_FS_O_EXLOCK=268435456,e.READONLY=a.constants.O_RDONLY,e.exists=function(t){return s(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(r){if("ENOENT"===r.code)return!1;throw r}return!0}))},e.isDirectory=function(t,r=!1){return s(this,void 0,void 0,(function*(){return(r?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){return t=t||"",e.IS_WINDOWS?(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\"):t.replace(/\/\/+/g,"/")}(t)))throw Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.tryGetExecutablePath=function(r,n){return s(this,void 0,void 0,(function*(){let o;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(o))return r;const i=r;for(const a of n){r=i+a,o=void 0;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const o of yield e.readdir(t))if(n===o.toUpperCase()){r=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(o))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(lO);var uO=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),dO=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pO=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&uO(t,e,r);return dO(t,e),t},fO=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(cO,"__esModule",{value:!0}),cO.findInPath=cO.which=gO=cO.mkdirP=cO.rmRF=cO.mv=cO.cp=void 0;const hO=co,mO=pO(Hr),yO=pO(lO);cO.cp=function(e,t,r={}){return fO(this,void 0,void 0,(function*(){const{force:n,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),s=(yield yO.exists(t))?yield yO.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?mO.join(t,mO.basename(e)):t;if(!(yield yO.exists(e)))throw Error("no such file or directory: "+e);if((yield yO.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield ct(e,a,0,n)}else{if(""===mO.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield lt(e,a,n)}}))},cO.mv=function(e,t,r={}){return fO(this,void 0,void 0,(function*(){if(yield yO.exists(t)){let n=!0;if((yield yO.isDirectory(t))&&(t=mO.join(t,mO.basename(e)),n=yield yO.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield it(t)}}yield st(mO.dirname(t)),yield yO.rename(e,t)}))},cO.rmRF=it;var gO=cO.mkdirP=st;cO.which=function e(t,r){return fO(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(r){const r=yield e(t,!1);if(!r)throw Error(yO.IS_WINDOWS?`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}const n=yield at(t);return n&&n.length>0?n[0]:""}))},cO.findInPath=at;var wO={exports:{}},vO={exports:{}};!function(e,t){function r(e){A[e]=P++}function n(e){for(var t=0;C.length>t;t++){var r=C[t][0],n=C[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>O)return null;if(!(t.loose?x[A.LOOSE]:x[A.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof i))return new i(e,t);S("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[A.LOOSE]:x[A.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>R||0>this.major)throw new TypeError("Invalid major version");if(this.minor>R||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>R||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&R>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=L.test(e),n=L.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1}function a(e,t,r){return new i(e,r).compare(new i(t,r))}function c(e,t,r){return a(e,t,r)>0}function l(e,t,r){return 0>a(e,t,r)}function u(e,t,r){return 0===a(e,t,r)}function d(e,t,r){return 0!==a(e,t,r)}function p(e,t,r){return a(e,t,r)>=0}function f(e,t,r){return 0>=a(e,t,r)}function h(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return u(e,r,n);case"!=":return d(e,r,n);case">":return c(e,r,n);case">=":return p(e,r,n);case"<":return l(e,r,n);case"<=":return f(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function m(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof m){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof m))return new m(e,t);e=e.trim().split(/\s+/).join(" "),S("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,S("comp",this)}function y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof y)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new y(e.raw,t);if(e instanceof m)return new y(e.value,t);if(!(this instanceof y))return new y(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function g(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every((function(e){return o.intersects(e,t)})),o=n.pop();return r}function w(e){return!e||"x"===e.toLowerCase()||"*"===e}function v(e,t,r,n,o,i,s,a,c,l,u,d,p){return((t=w(r)?"":w(n)?">="+r+".0.0":w(o)?">="+r+"."+n+".0":">="+t)+" "+(a=w(c)?"":w(l)?"<"+(+c+1)+".0.0":w(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function b(e,t,r){for(var n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;e.length>n;n++)if(S(e[n].semver),e[n].semver!==k&&e[n].semver.prerelease.length>0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function E(e,t,r){try{t=new y(t,r)}catch(n){return!1}return t.test(e)}function _(e,t,r,n){var o,s,a,u,d;switch(e=new i(e,n),t=new y(t,n),r){case">":o=c,s=f,a=l,u=">",d=">=";break;case"<":o=l,s=p,a=c,u="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(E(e,t,n))return!1;for(var h=0;t.set.length>h;++h){var g=null,w=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),w=w||e,o(e.semver,(g=g||e).semver,n)?g=e:a(e.semver,w.semver,n)&&(w=e)})),g.operator===u||g.operator===d)return!1;if((!w.operator||w.operator===u)&&s(e,w.semver))return!1;if(w.operator===d&&a(e,w.semver))return!1}return!0}var S;t=vO.exports=i,S="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var O=256,R=Number.MAX_SAFE_INTEGER||9007199254740991,I=O-6,T=t.re=[],x=t.safeRe=[],N=t.src=[],A=t.tokens={},P=0,$="[a-zA-Z0-9-]",C=[["\\s",1],["\\d",O],[$,I]];r("NUMERICIDENTIFIER"),N[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),N[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),N[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+$+"*",r("MAINVERSION"),N[A.MAINVERSION]="("+N[A.NUMERICIDENTIFIER]+")\\.("+N[A.NUMERICIDENTIFIER]+")\\.("+N[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),N[A.MAINVERSIONLOOSE]="("+N[A.NUMERICIDENTIFIERLOOSE]+")\\.("+N[A.NUMERICIDENTIFIERLOOSE]+")\\.("+N[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),N[A.PRERELEASEIDENTIFIER]="(?:"+N[A.NUMERICIDENTIFIER]+"|"+N[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),N[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+N[A.NUMERICIDENTIFIERLOOSE]+"|"+N[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),N[A.PRERELEASE]="(?:-("+N[A.PRERELEASEIDENTIFIER]+"(?:\\."+N[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),N[A.PRERELEASELOOSE]="(?:-?("+N[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+N[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),N[A.BUILDIDENTIFIER]=$+"+",r("BUILD"),N[A.BUILD]="(?:\\+("+N[A.BUILDIDENTIFIER]+"(?:\\."+N[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),N[A.FULLPLAIN]="v?"+N[A.MAINVERSION]+N[A.PRERELEASE]+"?"+N[A.BUILD]+"?",N[A.FULL]="^"+N[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),N[A.LOOSEPLAIN]="[v=\\s]*"+N[A.MAINVERSIONLOOSE]+N[A.PRERELEASELOOSE]+"?"+N[A.BUILD]+"?",r("LOOSE"),N[A.LOOSE]="^"+N[A.LOOSEPLAIN]+"$",r("GTLT"),N[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),N[A.XRANGEIDENTIFIERLOOSE]=N[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),N[A.XRANGEIDENTIFIER]=N[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),N[A.XRANGEPLAIN]="[v=\\s]*("+N[A.XRANGEIDENTIFIER]+")(?:\\.("+N[A.XRANGEIDENTIFIER]+")(?:\\.("+N[A.XRANGEIDENTIFIER]+")(?:"+N[A.PRERELEASE]+")?"+N[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),N[A.XRANGEPLAINLOOSE]="[v=\\s]*("+N[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[A.XRANGEIDENTIFIERLOOSE]+")(?:"+N[A.PRERELEASELOOSE]+")?"+N[A.BUILD]+"?)?)?",r("XRANGE"),N[A.XRANGE]="^"+N[A.GTLT]+"\\s*"+N[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),N[A.XRANGELOOSE]="^"+N[A.GTLT]+"\\s*"+N[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),N[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[A.COERCERTL]=RegExp(N[A.COERCE],"g"),x[A.COERCERTL]=RegExp(n(N[A.COERCE]),"g"),r("LONETILDE"),N[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),N[A.TILDETRIM]="(\\s*)"+N[A.LONETILDE]+"\\s+",T[A.TILDETRIM]=RegExp(N[A.TILDETRIM],"g"),x[A.TILDETRIM]=RegExp(n(N[A.TILDETRIM]),"g"),r("TILDE"),N[A.TILDE]="^"+N[A.LONETILDE]+N[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),N[A.TILDELOOSE]="^"+N[A.LONETILDE]+N[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),N[A.LONECARET]="(?:\\^)",r("CARETTRIM"),N[A.CARETTRIM]="(\\s*)"+N[A.LONECARET]+"\\s+",T[A.CARETTRIM]=RegExp(N[A.CARETTRIM],"g"),x[A.CARETTRIM]=RegExp(n(N[A.CARETTRIM]),"g"),r("CARET"),N[A.CARET]="^"+N[A.LONECARET]+N[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),N[A.CARETLOOSE]="^"+N[A.LONECARET]+N[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),N[A.COMPARATORLOOSE]="^"+N[A.GTLT]+"\\s*("+N[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),N[A.COMPARATOR]="^"+N[A.GTLT]+"\\s*("+N[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),N[A.COMPARATORTRIM]="(\\s*)"+N[A.GTLT]+"\\s*("+N[A.LOOSEPLAIN]+"|"+N[A.XRANGEPLAIN]+")",T[A.COMPARATORTRIM]=RegExp(N[A.COMPARATORTRIM],"g"),x[A.COMPARATORTRIM]=RegExp(n(N[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),N[A.HYPHENRANGE]="^\\s*("+N[A.XRANGEPLAIN]+")\\s+-\\s+("+N[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),N[A.HYPHENRANGELOOSE]="^\\s*("+N[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+N[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),N[A.STAR]="(<|>)?=?\\s*\\*";for(var D=0;P>D;D++)S(D,N[D]),T[D]||(T[D]=RegExp(N[D]),x[D]=RegExp(n(N[D])));t.parse=o,t.valid=function(e,t){var r=o(e,t);return r?r.version:null},t.clean=function(e,t){var r=o(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return S("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},i.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new i(e,r).inc(t,n).version}catch(o){return null}},t.diff=function(e,t){if(u(e,t))return null;var r=o(e),n=o(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return s},t.compareIdentifiers=s;var L=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(e,t).patch},t.compare=a,t.compareLoose=function(e,t){return a(e,t,!0)},t.compareBuild=function(e,t,r){var n=new i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)},t.rcompare=function(e,t,r){return a(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=c,t.lt=l,t.eq=u,t.neq=d,t.gte=p,t.lte=f,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[A.COMPARATORLOOSE]:x[A.COMPARATOR]);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),this.semver=t[2]?new i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(S("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(e,this.options)}catch(t){return!1}return h(e,this.operator,this.semver,this.options)},m.prototype.intersects=function(e,t){if(!(e instanceof m))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new y(e.value,t),E(this.value,r,t));if(""===e.operator)return""===e.value||(r=new y(this.value,t),E(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=h(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=h(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},t.Range=y,y.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},y.prototype.toString=function(){return this.range},y.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[A.HYPHENRANGELOOSE]:x[A.HYPHENRANGE],v),S("hyphen replace",e),e=e.replace(x[A.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,x[A.COMPARATORTRIM]),e=(e=(e=e.replace(x[A.TILDETRIM],"$1~")).replace(x[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[A.COMPARATORLOOSE]:x[A.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return S("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return S("caret",e,t),e.replace(t.loose?x[A.CARETLOOSE]:x[A.CARET],(function(t,r,n,o,i){var s;return S("caret",e,t,r,n,o,i),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(o)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":i?(S("replaceCaret pr",i),s="0"===r?"0"===n?">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+"-"+i+" <"+(+r+1)+".0.0"):(S("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+o+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+" <"+(+r+1)+".0.0"),S("caret return",s),s}))}(e,t)})).join(" ")}(e,t),S("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[A.TILDELOOSE]:x[A.TILDE],(function(t,r,n,o,i){var s;return S("tilde",e,t,r,n,o,i),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(o)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":i?(S("replaceTilde pr",i),s=">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0",S("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),S("tildes",e),e=function(e,t){return S("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[A.XRANGELOOSE]:x[A.XRANGE],(function(r,n,o,i,s,a){S("xRange",e,r,n,o,i,s,a);var c=w(o),l=c||w(i),u=l||w(s);return"="===n&&u&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),r=n+o+"."+i+"."+s+a):l?r=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:u&&(r=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),S("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),S("xrange",e),e=function(e,t){return S("replaceStars",e,t),e.trim().replace(x[A.STAR],"")}(e,t),S("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(n=n.filter((function(e){return!!e.match(r)}))),n.map((function(e){return new m(e,this.options)}),this)},y.prototype.intersects=function(e,t){if(!(e instanceof y))throw new TypeError("a Range is required");return this.set.some((function(r){return g(r,t)&&e.set.some((function(e){return g(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new y(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},y.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(r){return!1}for(var t=0;this.set.length>t;t++)if(b(this.set[t],e,this.options))return!0;return!1},t.satisfies=E,t.maxSatisfying=function(e,t,r){var n=null,o=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,o=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minVersion=function(e,t){e=new y(e,t);var r=new i("0.0.0");if(e.test(r))return r;if(r=new i("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;e.set.length>n;++n)e.set[n].forEach((function(e){var t=new i(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!c(r,t)||(r=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new y(e,t).range||"*"}catch(r){return null}},t.ltr=function(e,t,r){return _(e,t,"<",r)},t.gtr=function(e,t,r){return _(e,t,">",r)},t.outside=_,t.prerelease=function(e,t){var r=o(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new y(e,r),t=new y(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[A.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[A.COERCERTL].lastIndex=-1}else r=e.match(x[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,vO.exports);var bO=vO.exports;!function(e,t){var r=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},i=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(bO),a=h(),c=Cr,l=Un,u=kr;t._findMatch=function(t,r,n,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let l,u,d;for(const c of n){const n=c.version;if(a.debug(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(d=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let r=t.arch===o&&t.platform===i;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),d)){a.debug("matched "+c.version),u=c;break}}return u&&d&&(l=Object.assign({},u),l.files=[d]),l}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+l.execSync("sw_vers -productVersion");else if("linux"===t){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(2===e.length&&("VERSION_ID"===e[0].trim()||"DISTRIB_RELEASE"===e[0].trim())){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let r="";return u.existsSync(e)?r=""+u.readFileSync(e):u.existsSync(t)&&(r=""+u.readFileSync(t)),r}}(wO,wO.exports);for(var EO=wO.exports,_O=Gr,SO=[],OO=0;256>OO;++OO)SO[OO]=(OO+256).toString(16).substr(1);var RO=function(){return _O.randomBytes(16)},IO=function(e,t){var r=t||0;return""+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]+"-"+SO[e[r++]]+SO[e[r++]]+"-"+SO[e[r++]]+SO[e[r++]]+"-"+SO[e[r++]]+SO[e[r++]]+"-"+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]+SO[e[r++]]},TO={},xO={},NO=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),AO=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),PO=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&NO(t,e,r);return AO(t,e),t},$O=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(xO,"__esModule",{value:!0}),xO.argStringToArray=xO.ToolRunner=void 0;const CO=PO(Cr),DO=PO(sn),LO=PO(Un),kO=PO(Hr),MO=PO(cO),jO=PO(lO),UO=po,FO="win32"===process.platform;xO.ToolRunner=class extends DO.EventEmitter{constructor(e,t,r){if(super(),!e)throw Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){const r=this._getSpawnFileName(),n=this._getSpawnArgs(e);let o=t?"":"[command]";if(FO)if(this._isCmdFile()){o+=r;for(const e of n)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of n)o+=" "+e}else{o+=this._windowsQuoteCmdArg(r);for(const e of n)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=r;for(const e of n)o+=" "+e}return o}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(CO.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+CO.EOL.length),o=n.indexOf(CO.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return FO&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(FO&&this._isCmdFile()){let t='/D /S /C "'+this._windowsQuoteCmdArg(this.toolPath);for(const r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=!1;for(const i of e)if(t.some((e=>e===i))){r=!0;break}if(!r)return e;let n='"',o=!0;for(let i=e.length;i>0;i--)n+=e[i-1],o&&"\\"===e[i-1]?n+="\\":'"'===e[i-1]?(o=!0,n+='"'):o=!1;return n+='"',n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let n=e.length;n>0;n--)t+=e[n-1],r&&"\\"===e[n-1]?t+="\\":'"'===e[n-1]?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){const t={cwd:(e=e||{}).cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){const r={};return r.cwd=(e=e||{}).cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return $O(this,void 0,void 0,(function*(){return!jO.isRooted(this.toolPath)&&(this.toolPath.includes("/")||FO&&this.toolPath.includes("\\"))&&(this.toolPath=kO.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield MO.which(this.toolPath,!0),new Promise(((e,t)=>$O(this,void 0,void 0,(function*(){this._debug("exec tool: "+this.toolPath),this._debug("arguments:");for(const e of this.args)this._debug(" "+e);const r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+CO.EOL);const n=new BO(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield jO.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=LO.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let s="";i.stdout&&i.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),s=this._processLineBuffer(e,s,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let a="";if(i.stderr&&i.stderr.on("data",(e=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(e),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),i.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),i.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),i.on("close",(e=>{n.processExitCode=e,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()})),n.on("done",((r,n)=>{s.length>0&&this.emit("stdline",s),a.length>0&&this.emit("errline",a),i.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!i.stdin)throw Error("child process missing stdin");i.stdin.end(this.options.input)}}))))}))}},xO.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const r=[];let n=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&n?o=!0:" "!==a||n?t(a):i.length>0&&(r.push(i),i=""):o?t(a):n=!n}return i.length>0&&r.push(i.trim()),r};class BO extends DO.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=UO.setTimeout(BO.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):0===this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)):e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){e.done||(!e.processClosed&&e.processExited&&e._debug(`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`),e._setResult())}}var GO=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),HO=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),VO=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&GO(t,e,r);return HO(t,e),t},qO=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(TO,"__esModule",{value:!0});var zO=TO.getExecOutput=TO.exec=void 0;const WO=uo,XO=VO(xO);var KO=TO.exec=ut;zO=TO.getExecOutput=function(e,t,r){var n,o;return qO(this,void 0,void 0,(function*(){let i="",s="";const a=new WO.StringDecoder("utf8"),c=new WO.StringDecoder("utf8"),l=null===(n=null==r?void 0:r.listeners)||void 0===n?void 0:n.stdout,u=null===(o=null==r?void 0:r.listeners)||void 0===o?void 0:o.stderr,d=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{i+=a.write(e),l&&l(e)},stderr:e=>{s+=c.write(e),u&&u(e)}}),p=yield ut(e,t,Object.assign(Object.assign({},r),{listeners:d}));return i+=a.end(),s+=c.end(),{exitCode:p,stdout:i,stderr:s}}))};var YO={},JO=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),QO=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ZO=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&JO(t,e,r);return QO(t,e),t},eR=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(YO,"__esModule",{value:!0}),YO.RetryHelper=void 0;const tR=ZO(h());YO.RetryHelper=class{constructor(e,t,r){if(1>e)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return eR(this,void 0,void 0,(function*(){let r=1;for(;this.maxAttempts>r;){try{return yield e()}catch(n){if(t&&!t(n))throw n;tR.info(n.message)}const o=this.getSleepAmount();tR.info(`Waiting ${o} seconds before trying again`),yield this.sleep(o),r++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return eR(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var rR=mo&&mo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),nR=mo&&mo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),oR=mo&&mo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&rR(t,e,r);return nR(t,e),t},iR=mo&&mo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},sR=mo&&mo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aO,"__esModule",{value:!0}),aO.evaluateVersions=aO.isExplicitVersion=aO.findFromManifest=aO.getManifestFromRepo=aO.findAllVersions=NR=aO.find=aO.cacheFile=xR=aO.cacheDir=aO.extractZip=aO.extractXar=aO.extractTar=aO.extract7z=RR=aO.downloadTool=aO.HTTPError=void 0;const aR=oR(h()),cR=oR(cO),lR=oR(kr),uR=oR(EO),dR=oR(Cr),pR=oR(Hr),fR=oR(mi),hR=oR(bO),mR=oR(lo),yR=oR(an),gR=co,wR=sR((function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||RO)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[n+i]=o[i];return t||IO(o)})),vR=TO,bR=YO;class ER extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}var _R=aO.HTTPError=ER;const SR="win32"===process.platform,OR="darwin"===process.platform;var RR=aO.downloadTool=function(e,t,r,n){return iR(this,void 0,void 0,(function*(){t=t||pR.join(wt(),wR.default()),yield cR.mkdirP(pR.dirname(t)),aR.debug("Downloading "+e),aR.debug("Destination "+t);const o=vt("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=vt("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new bR.RetryHelper(3,o,i);return yield s.execute((()=>iR(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return iR(this,void 0,void 0,(function*(){if(lR.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new fR.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(aR.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new ER(i.message.statusCode);throw aR.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=yR.promisify(mR.pipeline),a=vt("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,lR.createWriteStream(t)),aR.debug("download complete"),c=!0,t}finally{if(!c){aR.debug("download failed");try{yield cR.rmRF(t)}catch(l){aR.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof ER&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};aO.extract7z=function(e,t,r){return iR(this,void 0,void 0,(function*(){gR.ok(SR,"extract7z() not supported on current OS"),gR.ok(e,'parameter "file" is required'),t=yield pt(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",aR.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield vR.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${pR.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield cR.which("powershell",!0);yield vR.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))};var IR=aO.extractTar=function(e,t,r="xz"){return iR(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield pt(t),aR.debug("Checking tar --version");let n="";yield vR.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),aR.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],aR.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return SR&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield vR.exec("tar",i),t}))};aO.extractXar=function(e,t,r=[]){return iR(this,void 0,void 0,(function*(){let n;gR.ok(OR,"extractXar() not supported on current OS"),gR.ok(e,'parameter "file" is required'),t=yield pt(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),aR.isDebug()&&n.push("-v");const o=yield cR.which("xar",!0);var i;return yield vR.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))};var TR=aO.extractZip=function(e,t){return iR(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield pt(t),SR?yield function(e,t){return iR(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=yield cR.which("pwsh",!1);if(o){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];aR.debug("Using pwsh at path: "+o),yield vR.exec(`"${o}"`,e)}else{const e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],t=yield cR.which("powershell",!0);aR.debug("Using powershell at path: "+t),yield vR.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return iR(this,void 0,void 0,(function*(){const r=yield cR.which("unzip",!0),n=[e];aR.isDebug()||n.unshift("-q"),n.unshift("-o"),yield vR.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))},xR=aO.cacheDir=function(e,t,r,n){return iR(this,void 0,void 0,(function*(){if(r=hR.clean(r)||r,n=n||dR.arch(),aR.debug(`Caching tool ${t} ${r} ${n}`),aR.debug("source dir: "+e),!lR.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield ft(t,r,n);for(const t of lR.readdirSync(e)){const r=pR.join(e,t);yield cR.cp(r,o,{recursive:!0})}return ht(t,r,n),o}))};aO.cacheFile=function(e,t,r,n,o){return iR(this,void 0,void 0,(function*(){if(n=hR.clean(n)||n,o=o||dR.arch(),aR.debug(`Caching tool ${r} ${n} ${o}`),aR.debug("source file: "+e),!lR.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield ft(r,n,o),s=pR.join(i,t);return aR.debug("destination file "+s),yield cR.cp(e,s),ht(r,n,o),i}))};var NR=aO.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||dR.arch(),mt(t)||(t=yt(dt(e,r),t));let n="";if(t){t=hR.clean(t)||"";const o=pR.join(gt(),e,t,r);aR.debug("checking cache: "+o),lR.existsSync(o)&&lR.existsSync(o+".complete")?(aR.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):aR.debug("not found")}return n};aO.findAllVersions=dt;var AR=aO.getManifestFromRepo=function(e,t,r,n="master"){return iR(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new fR.HttpClient("tool-cache"),a={};r&&(aR.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(d){aR.debug("Invalid json")}}return o}))},PR=aO.findFromManifest=function(e,t,r,n=dR.arch()){return iR(this,void 0,void 0,(function*(){return yield uR._findMatch(e,t,r,n)}))};aO.isExplicitVersion=mt,aO.evaluateVersions=yt;var $R={};Object.defineProperty($R,"__esModule",{value:!0}),$R.retryAsPromised=$R.TimeoutError=void 0;let CR=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};$R.TimeoutError=CR,$R.retryAsPromised=bt;var DR=$R.default=bt;let LR;const kR=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,r=e.fs||{};return e.mkdir=e.mkdir||r.mkdir||jr,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,o)=>t.mkdir(e,r,((e,t)=>e?o(e):n(t))))),e.stat=e.stat||r.stat||Ur,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((r,n)=>t.stat(e,((e,t)=>e?n(e):r(t))))),e.statSync=e.statSync||r.statSync||Fr,e.mkdirSync=e.mkdirSync||r.mkdirSync||Br,t},MR=(e,t,r)=>{const n=zr(e),o={...kR(t),recursive:!1};if(n===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),r||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return MR(e,o,MR(n,o,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},jR=Object.assign((async(e,t,r)=>{const n=kR(t);n.recursive=!1;const o=zr(e);return o===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return jR(o,n).then((t=>jR(e,n,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:MR}),UR=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?UR(e,zr(t),t):void 0))},FR=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?FR(e,zr(t),t):void 0}},BR=(e,t)=>{const r=kR(t);if(r.recursive=!0,zr(e)===e)return r.mkdirSync(e,r);const n=FR(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return MR(e,r);throw o}},GR=Object.assign((async(e,t)=>{const r={...kR(t),recursive:!0};return zr(e)===e?await r.mkdirAsync(e,r):UR(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return jR(e,r);throw t}))))}),{sync:BR}),HR=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,VR=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=Qr(e),"win32"===HR){const t=/[*|"<>?:]/,{root:r}=Zr(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},qR=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),zR=+qR[0]>10||10==+qR[0]&&+qR[1]>=12,WR=zR?e=>kR(e).mkdirSync===Br:()=>!1,XR=Object.assign(zR?e=>kR(e).mkdir===jr:()=>!1,{sync:WR}),KR=(e,t)=>{e=VR(e);const r=kR(t);return WR(r)?BR(e,r):MR(e,r)},YR=Object.assign((async(e,t)=>{e=VR(e);const r=kR(t);return XR(r)?GR(e,r):jR(e,r)}),{mkdirpSync:KR,mkdirpNative:GR,mkdirpNativeSync:BR,mkdirpManual:jR,mkdirpManualSync:MR,sync:KR,native:GR,nativeSync:BR,manual:jR,manualSync:MR,useNative:XR,useNativeSync:WR}),JR=/v?(\d\S*)/,QR="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",ZR={llvm:QR,clang:QR,"clang++":QR,"clang-tidy":QR,clangtidy:QR,"clang-format":QR,clangformat:QR,ninja:"1.12.1",cmake:"3.30.2",gcovr:"5.2",conan:"1.64.1",meson:"1.5.1",kcov:"42",task:"3.38.0",doxygen:Be()?"1.11.0-4":"1.11.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},eI="22.2.0",tI="3.7.9",rI={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},nI=yb((async function(e){const t=[];"linux"===process.platform?t.push("/home/runner/.local/bin/"):"darwin"===process.platform&&t.push("/usr/local/bin/");const r=(await zO(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Vr(r,"Scripts"),Vr(r,"Scripts","bin"),Vr(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var oI={};Object.defineProperty(oI,"__esModule",{value:!0});var iI=oI.getUbuntuVersion=void 0;const sI=Un;iI=oI.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{sI.execFile(t,r,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void n(Error(`Could not execute \`${t} ${r.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,r;if(null===e)return[];const n=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const l of e.split("\n")){const e=l.match(n);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=l.match(o);t&&(s=t);const r=l.match(i);if(r&&(a=r),c&&s&&a)break}if(!c)return[];for(const l of[s,a])if(l){const e=[l[1],l[2]];return l[3]&&e.push(l[3]),e.map((e=>parseInt(e,10)))}return[]};const aI=yb((async function(){try{if(Ge()){try{null===Sy.sync("lsb_release",{nothrow:!0})&&await $e([{name:"lsb-release"}])}catch{return Ft()}const e=await iI();return 0===e.length?Ft():e}return null}catch(e){return y(""+e),null}}),{promise:!0}),cI=yb((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=ae("~/.local/pipx");if(await se(t))return t;switch(process.platform){case"win32":e=ae("~/AppData/Local/pipx");break;case"darwin":e=ae("~/Library/Application Support/pipx");break;default:e=ae("~/.local/share/pipx")}return await YR(e),await YR(Vr(e,"trash")),await YR(Vr(e,"shared")),await YR(Vr(e,"venv")),e}),{promise:!0}),lI=yb((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=ae("~/.local/bin");return await pe(e,ZI),await YR(e),e}),{promise:!0});let uI;const dI=new Map([[24,["Sequoia","15"]],[23,["Sonoma","14"]],[22,["Ventura","13"]],[21,["Monterey","12"]],[20,["Big Sur","11"]],[19,["Catalina","10.15"]],[18,["Mojave","10.14"]],[17,["High Sierra","10.13"]],[16,["Sierra","10.12"]],[15,["El Capitan","10.11"]],[14,["Yosemite","10.10"]],[13,["Mavericks","10.9"]],[12,["Mountain Lion","10.8"]],[11,["Lion","10.7"]],[10,["Snow Leopard","10.6"]],[9,["Leopard","10.5"]],[8,["Tiger","10.4"]],[7,["Panther","10.3"]],[6,["Jaguar","10.2"]],[5,["Puma","10.1"]]]),pI=yb((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||Hn.release()).split(".")[0]);const[t,r]=dI.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),fI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url)),hI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url)),mI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url));class yI extends Error{constructor(e){super(e),this.name="TimeoutError"}}class gI extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const wI=e=>void 0===globalThis.DOMException?new gI(e):new DOMException(e),vI=e=>{const t=void 0===e.reason?wI("This operation was aborted."):e.reason;return t instanceof Error?t:wI(t)},bI=h(),EI=Un,_I=kr,SI=Hr,OI=io,RI=OI.env["ProgramFiles(x86)"],II=[OI.env["ProgramFiles(x86)"],OI.env.ProgramFiles],TI=["Enterprise","Professional","Community","BuildTools"],xI=["2022","2019","2017"],NI={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var AI=pr;const PI=RI+"\\Microsoft Visual Studio\\Installer";var $I=hr,CI=function(e,t,r,n,o,i){if("win32"!=OI.platform)return void bI.info("This is not a Windows virtual environment, bye!");OI.env.PATH+=SI.delimiter+PI;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${hr(i)}" ${a.join(" ")}`;bI.debug("vcvars command-line: "+c);const l=(""+EI.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),u=l[0].split("\r\n"),d=l[1].split("\r\n"),p=l[2].split("\r\n"),f=d.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(f.length>0)throw Error("invalid parameters\r\n"+f.join("\r\n"));let h={};for(let m of u){const[e,t]=m.split("=");h[e]=t}bI.startGroup("Environment variables");for(let m of p){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(bI.info("Setting "+e),mr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),bI.exportVariable(e,t))}bI.endGroup(),bI.info("Configured Developer Command Prompt")},DI=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(DI||{});const LI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url)),kI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url)),MI=yb((async function(e,t,r){const[n,o]=await Promise.all([_r(e,t,r),Or()]);return await UI(r),n}),{promise:!0}),jI=yb((async function(e){if(Ge())if(e>10)await $e([{name:"libtinfo-dev"}]);else try{await $e([{name:"libtinfo5"}])}catch(t){w(`Failed to install libtinfo5 ${t}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${tO.includes(process.arch)?"amd64":nO.includes(process.arch)?"arm64":process.arch}.deb`,r="http://launchpadlibrarian.net/666971015/"+e,n=new bS.DownloaderHelper(r,Lr(),{fileName:e});n.on("error",(e=>{throw Error(`Failed to download ${r}: ${e}`)})),await n.start(),H("dpkg",["-i",Vr(Lr(),e)])}else Be()?await ze("ncurses5-compat-libs",void 0,"yay"):Fe()&&await qe([{name:"ncurses-compat-libs"}])}),{promise:!0}),UI=yb((async function(e){"linux"===process.platform&&await rr(jt("gcc",void 0,await aI()),"",e,40)}),{promise:!0}),FI="string"==typeof __dirname?__dirname:Hr.dirname(ao(import.meta.url));let BI,GI=!1;const HI={llvm:vr,clang:vr,"clang++":vr},VI={gcc:rr,"g++":rr},qI={mingw:nr},zI={msvc:Rr,cl:Rr,msbuild:Rr,visualstudio:Rr},WI={appleclang:dr,applellvm:dr,"apple-clang":dr,"apple-llvm":dr},XI={cmakelang:Wt,"cmake-lint":Wt,"cmake-format":Wt,cmakelint:Wt,cmakeformat:Wt},KI=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],YI={nala:async function(e,t,r){if(!Ge())return;if("string"==typeof BI)return{binDir:BI};const n=Sy.sync("nala",{nothrow:!0});if(null!==n)return BI=zr(n),{binDir:BI};await $e([{name:"python3-apt"}]),BI="/usr/bin";try{const t=await Ae({name:"nala",version:e});if(void 0!==t)return await $e([{name:t}]),{binDir:BI}}catch(o){w("Failed to install nala: "+o)}try{const e=await Ae({name:"nala-legacy"});if(void 0!==e)return await $e([{name:e}],!0),{binDir:BI}}catch(o){w("Failed to install nala-legacy: "+o)}return await async function(){const e=new bS.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",Lr(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Vr(Lr(),"install-nala.sh"),r=await dn(t,"utf8");await pn(t,r.replace(/sudo/g,"")),await $e([{name:"wget"}]);try{H("bash",[t])}catch(o){m("Failed to install nala via installer: "+o),H("apt",["install","-y","-t","nala","nala"])}}(),{binDir:BI}},brew:ke,choco:He,python:$t,powershell:Nr,pwsh:Nr,...HI,...VI,...qI,...zI,...WI,...XI,cmake:Nt,ninja:ar,vcpkg:async function(e,t,r){return GI&&null!==Sy.sync("vcpkg",{nothrow:!0})?{binDir:zr(Sy.sync("vcpkg"))}:("linux"===process.platform&&(Be()?await Promise.all([ze("curl"),ze("zip"),ze("unzip"),ze("tar"),ze("git"),ze("pkg-config")]):Fe()?await qe([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):Ge()&&await $e([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await se(Vr(t,et("bootstrap-vcpkg",".bat")))?g(`Vcpkg folder already exists at ${t}. Skipping the clone`):Km("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:zr(t),stdio:"inherit"}),""!==e&&"true"!==e&&(w("Checking out vcpkg version "+e),Km("git",["checkout",e],{cwd:t,stdio:"inherit"})),Km(et(tt("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await X(t),await pe(t,ZI),GI=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ve("bazelisk",e);case"darwin":return Ue("bazelisk",e);case"linux":if(Be())throw Error("installing bazel on Arch linux is not supported yet");if(Fe())return await qe([{name:"dnf-plugins-core"}]),H("dnf",["copr","enable","vbatts/bazel"]),qe([{name:"bazel4"}]);if(Ge())return H("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Ce({fileName:"bazel-archive-keyring.gpg",keyUrl:"https://bazel.build/bazel-release.pub.gpg"})}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`]),$e([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Bt("conan",e)},meson:function(e,t,r){return Bt("meson",e)},gcovr:function(e,t,r){return Bt("gcovr",e)},opencppcoverage:Ir,OpenCppCoverage:Ir,ccache:function(e,t,r){switch(process.platform){case"win32":return Ve("ccache",e);case"darwin":return Ue("ccache",e);case"linux":if(Be())return ze("ccache",e);if(Fe())return qe([{name:"ccache",version:e}]);if(Ge())return $e([{name:"ccache",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},sccache:function(e,t,r){switch(process.platform){case"win32":return Ve("sccache",e);case"linux":case"darwin":return Ue("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await DR((()=>Ve("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>w(e)});const t={binDir:await async function(){if("win32"===process.platform){for(const e of["C:/ProgramData/chocolatey/bin","C:/Program Files/doxygen/bin","C:/Program Files (x86)/doxygen"])if(await se(Vr(e,"doxygen.exe")))return await pe(e,ZI),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Xt(jt("graphviz",void 0)),t}case"darwin":{const e=await Ue("doxygen",void 0);return pI()[0]>11&&await Xt(jt("graphviz",void 0)),e}case"linux":{let o;if(""===e||Be()||Fe())if(Be())o=await ze("doxygen",e);else{if(Fe())return qe([{name:"doxygen",version:e}]);if(!Ge())throw Error("Unsupported linux distributions");o=await $e([{name:"doxygen",version:e}])}else{if(!Ge())throw Error("Unsupported linux distributions");try{o=await Tt("doxygen",e,Yt,t,r);try{await $e([{name:"libclang-cpp9"}])}catch(n){w("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){g(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await $e([{name:"doxygen"}])}}return await Xt(jt("graphviz",void 0,await aI())),o}default:throw Error("Unsupported platform")}},graphviz:Xt,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ve("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await pe(e,ZI),e}()};case"darwin":return Ue("cppcheck",e);case"linux":if(Be())return ze("cppcheck",e);if(Fe())return qe([{name:"ccache",version:e}]);if(Ge())return $e([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Bt("cpplint",e)},flawfinder:function(e,t,r){return Bt("flawfinder",e)},lizard:function(e,t,r){return Bt("lizard",e)},infer:function(e,t,r){return Tt("infer",e,ir,t,r)},"clang-tidy":Er,clangtidy:Er,"clang-format":br,clangformat:br,vcvarsall:yr,kcov:async function(e,t,r){if("linux"!==process.platform)return void w("Kcov is not supported on non-linux");const n=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const i=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await Tt("kcov",o,lr,t,r),a):(a=await Tt("kcov",o,cr,t,r),Be()?await ze("binutils"):Fe()?await qe([{name:"binutils"}]):Ge()&&await $e([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ve("make",e);case"darwin":{await Ue("make",e);const t=Vr(je(),"opt/make/libexec/gnubin");return await pe(t,ZI),{binDir:t}}case"linux":if(Be())return ze("make",e);if(Fe())return qe([{name:"make",version:e}]);if(Ge())return $e([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return Tt("task",e,Ar,t,r)},sevenzip:Et,"7zip":Et,"7z":Et},JI=Object.keys(YI),QI=["compiler","architecture","timeout",...JI],ZI={rcPath:ae("~/.cpprc"),guard:"cpp"};(async function(e){let t=Promise.resolve();yo.GITHUB_ACTIONS||(t=async function(){try{await wS({pkg:vS})}catch(e){y("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const r=function(e){return function(e,t){var r,n,o,i,s,a={_:[]},c=0,l=0,u=0,d=(e=e||[]).length;const p=void 0!==(t=t||{}).alias,f=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=Ee(t.string),t.boolean=Ee(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Ee(t.alias[r]),c=0;n.length>c;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(l=(n=t.alias[t.boolean[c]]||[]).length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(l=(n=t.alias[t.string[c]]||[]).length;l-- >0;)t.string.push(n[l]);if(h)for(r in t.default)if(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[i])for(t[i].push(r),c=0;n.length>c;c++)t[i].push(n[c]);const m=f?Object.keys(t.alias):[];for(c=0;d>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(l=0;o.length>l&&45===o.charCodeAt(l);l++);if(0===l)a._.push(o);else if("no-"===o.substring(l,l+3)){if(i=o.substring(l+3),f&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(u=l+1;o.length>u&&61!==o.charCodeAt(u);u++);for(i=o.substring(l,u),s=o.substring(++u)||c+1===d||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===l?[i]:i,u=0;n.length>u;u++){if(i=n[u],f&&!~m.indexOf(i))return t.unknown("-".repeat(l)+i);_e(a,i,n.length>u+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...QI,"timeout"],default:Object.fromEntries(QI.map((e=>[e,Pr(e)]))),alias:{h:"help"},boolean:"help"})}(e);r.help&&(w('\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\t the <compiler> to install.\n \t You can specify the version instead of specifying just the name e.g: --compiler \'llvm-13.0.0\'\n--$tool_name\t pass "true" or pass the <version> you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},"analyzer/linter":{tools:"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const n=r.architecture??process.arch,o=process.env.SETUP_CPP_DIR??ae("~"),i=[],s=[],a=Xb.create({autoloadLocales:!0});let c,l;Xb.addLocale(Kb),Fb.addLocale(Bb);const u=await aI(),d=void 0!==r.compiler?function(e){try{const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null===wE(e)&&w(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}catch(t){return m(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(r.compiler):void 0;if(!function(e,t,r){const n=void 0!==r&&t.includes(r.compiler),o=(n?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),i=o.filter((t=>!Ut(n&&"compiler"===t&&void 0!==r?r.version:e[t]))),s=0!==i.length?n&&"compiler"===i[0]&&void 0!==r?r.version??"true":e[i[0]]??"true":"true";if(i.some((t=>n&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${s}`:e[t]!==s)))return!1;for(const a of o)e[a]=n&&"compiler"===a&&void 0!==r?`${r.compiler}-${s}`:s;return!0}(r,[...KI,"compiler"],d))return m("The same version must be used for llvm, clang-format and clang-tidy"),1;Be()&&"string"==typeof r.cppcheck&&"string"==typeof r.gcovr&&(w("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await ze("python-pygments"));let p=!1;for(const f of JI){if(yo.isCI&&0!==s.length){p=!0;break}const e=r[f];void 0!==e&&(c=Date.now(),await gr(f,e,u,n,o,i,s,60*Number.parseFloat(r.timeout??"20")*1e3),l=Date.now(),w("took "+(a.format(c,l)||"0 seconds")))}if(!p&&void 0!==d){const e=Date.now();await async function(e,t,r,n,o,i,s){let a;try{if(Oi.startGroup(`Installing ${e} ${t??""}`),e in HI)a=await vr(jt("llvm",t,r),Vr(n,"llvm"),o),await ue("GCOV","llvm-cov gcov",ZI);else if(e in VI){const e=jt("gcc",t,r);a=await rr(e,Vr(n,"gcc"),o),await or(e)}else if(e in qI){const e=jt("mingw",t,r);a=await nr(e,Vr(n,"gcc"),o),await or(e)}else e in zI?a=await Rr(jt("msvc",t,r),Vr(n,"msvc"),o):e in WI?await dr():(a=null,s.push("Unsupported compiler "+e))}catch(c){m(c),s.push(`Failed to install the ${e} ${t}`)}null!==a&&i.push($r(e,a)),Oi.endGroup()}(d.compiler,d.version,u,o,n,i,s);const t=Date.now();w("took "+(a.format(e,t)||"0 seconds"))}if(await async function(e){if(await se(e.rcPath)){const t=(await vb(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await bb(e.rcPath,r.join("\n")),await X(e.rcPath)}}(ZI),0===i.length&&0===s.length)return y("setup-cpp was called without any arguments. Nothing to do."),0;for(const f of i)console.log(`[32m${f}[0m`);for(const f of s)m(f);if(w("setup-cpp finished"),!yo.GITHUB_ACTIONS)switch(process.platform){case"win32":y("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":y("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await t,0===s.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{m("main() panicked!"),m(e),process.exitCode=1}));export{_R as H,Oi as a,IR as b,mo as c,RR as d,TR as e,xR as f,zO as g,fi as h,KO as i,NR as j,PR as k,AR as l,w as m,yo as n,e as o,se as p,eS as s,y as w};
|
||
//# sourceMappingURL=setup-cpp.mjs.map
|