setup-cpp/dist/legacy/setup-cpp.js

4 lines
369 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env node
"use strict";function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}function t(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function r(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 n(e,t,r){const n=new no(e,t,r);process.stdout.write(""+n+to.EOL)}function o(){return so>io.length-16&&(_n.randomFillSync(io),so=0),io.slice(so,so+=16)}function i(e){return"string"==typeof e&&ao.test(e)}function s(e,t=0){const r=(co[e[t+0]]+co[e[t+1]]+co[e[t+2]]+co[e[t+3]]+"-"+co[e[t+4]]+co[e[t+5]]+"-"+co[e[t+6]]+co[e[t+7]]+"-"+co[e[t+8]]+co[e[t+9]]+"-"+co[e[t+10]]+co[e[t+11]]+co[e[t+12]]+co[e[t+13]]+co[e[t+14]]+co[e[t+15]]).toLowerCase();if(!i(r))throw TypeError("Stringified UUID is invalid");return r}function a(e){if(!i(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 c(e,t,r){function n(e,n,o,i){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=a(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){i=i||0;for(let e=0;16>e;++e)o[i+e]=c[e];return o}return s(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function l(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=+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 To(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new To("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Ao.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(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 d(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=f({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=Po.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function f(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 h(){return Jo||(Jo=1,function(e){var t=zn&&zn.__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=bn,n=En,{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}(ii)),ii}function m(){return Zo||(Zo=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=zn&&zn.__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=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=zn&&zn.__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=zn&&zn.__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=Yn,u=oo,d=Jn,p=a(bn),f=a(Sn),y=function(){if(Xo)return Io;Xo=1;var e=zn&&zn.__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(Io,"__esModule",{value:!0}),Io.OidcClient=void 0;const t=Wo,n=Ko,o=m();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 Io.OidcClient=i,Io}();var g,v;(v=g=e.ExitCode||(e.ExitCode={}))[v.Success=0]="Success",v[v.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}${f.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 w=h();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return w.summary}});var b=h();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return b.markdownSummary}});var E=function(){if(Qo)return si;Qo=1;var e=zn&&zn.__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=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=zn&&zn.__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(Sn);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}})}(Kn)),Kn}function y(e){return Wn.GITHUB_ACTIONS?ai.error(e):console.log(`${e}`)}function g(e){return Wn.GITHUB_ACTIONS?ai.warning(e):console.log(`${e}`)}function v(e){return Wn.GITHUB_ACTIONS?ai.notice(e):console.log(`${e}`)}function w(e){return Wn.GITHUB_ACTIONS?ai.info(e):console.log(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)}))}))}oi(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=Ei.sync(e.command,{path:r[_i({env:r})],pathExt:t?bi.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=bi.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 Di&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=ki(e,t,r),o=Li.spawn(n.command,n.args,n.options);return ji.hookChildProcess(o,n),o}function I(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 T(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function x(e){return T(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function R(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=ks(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=$s.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await js(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new Ms)}))})),n.getBufferedValue()}function P(e,t,r){const n=oa(e,t,r),o=Js(e,t),i=Qs(e,t);let s;na(i,n.options),(({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})`)})(n.options);try{s=An.spawn(n.file,n.args,n.options)}catch(d){const e=new An.ChildProcess,t=Promise.reject(ts({error:d,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Ws(e,t),e}const a=(e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))})))(s),c=((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),l=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Ss((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=Os.bind(null,s.kill.bind(s)),s.cancel=Ps.bind(null,s,{isCanceled:!1});const u=zi((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,d]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=qs(t,{encoding:o,buffer:i,maxBuffer:s}),l=qs(r,{encoding:o,buffer:i,maxBuffer:s}),u=qs(n,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},Hs(t,c),Hs(r,l),Hs(n,u)])}})(s,n.options,l),p=ia(n.options,c),f=ia(n.options,u),h=ia(n.options,d);if(e||0!==t||null!==r){const c=ts({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:p,stderr:f,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Gs(e),En.createReadStream(t)))(t);void 0!==r&&(T(r)?r.pipe(e.stdin):e.stdin.end(r))})(s,n.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=Bs();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=As.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=As.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=As.bind(void 0,e,"all"))})(s),Ws(s,u),s}function A(e,t,r){const n=oa(e,t,r),o=Js(e,t),i=Qs(e,t);na(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Gs(e),En.readFileSync(t)))(e);if(T(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=An.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw ts({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=ia(n.options,a.stdout,a.error),l=ia(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=ts({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function C(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return P(function(){if(void 0===ic){const e=oc.sync("pwsh",{nothrow:!0});null!==e&&(ic=e);const t=oc.sync("powershell",{nothrow:!0});null!==t&&(ic=t)}if(void 0===ic)throw Error("Could not find powershell");return ic}(),[...t,"-c",e],r)}function N(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function $(){return null!==oc.sync("sudo",{nothrow:!0})}function D(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function L(){return D()&&$()}function k(e){return L()?"sudo "+e:e}function j(e,t=[],r=cc){return L()?function(e,t){const[r,...n]=ea(e);return A(r,n,t)}(U(e,t),r):A(e,F(t),r)}function M(e,t=[],r=cc){return L()?function(e,t){const[r,...n]=ea(e);return P(r,n,t)}(U(e,t),r):P(e,F(t),r)}function U(e,t){return"sudo "+F([e,...t]).join(" ")}function F(e){return e.map((e=>`'${e}'`))}function B(){return"win32"===process.platform?lc():D()}async function G(e){if(("linux"===process.platform||"darwin"===process.platform)&&L()&&void 0!==process.env.SUDO_USER){let t=En.statSync(e).isDirectory();await M("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],cc)}}function H(){if(el)return Zc;el=1;var e=Uc,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return Zc=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 q(){return Nl?Cl:(Nl=1,Cl=(Rl?xl:(Rl=1,xl=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Al)return Pl;Al=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 Pl=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 V(){if(Ml)return jl;Ml=1;var e=kl?Ll:(kl=1,Ll=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return jl=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function z(){return Xl?Wl:(Xl=1,Wl=function(){if(Dl)return $l;Dl=1;var e=q(),t={object:!0,symbol:!0};return $l=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?q().Symbol:function(){if(zl)return Vl;zl=1;var e,t,r,n=Sl,o=V(),i=q().Symbol,s=function(){if(Fl)return Ul;Fl=1;var e=Sl,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Ul=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(Gl)return Bl;Gl=1;var e=Sl,t=q().Symbol;return Bl=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(ql)return Hl;ql=1;var e=Sl,t=V(),r=Object.create(null);return Hl=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)},Vl=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])),Vl}())}function W(){return ou?nu:(ou=1,nu=(Tl?Il:(Tl=1,Il=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(ru)return tu;ru=1;var e=z().iterator,t=function(){if(Yl)return Kl;Yl=1;var e={}.toString,t=e.call(function(){return arguments}());return Kl=function(r){return e.call(r)===t}}(),r=function(){if(Ql)return Jl;Ql=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Jl=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Dc,o=jc,i=Uc,s=Ic,a=function(){if(eu)return Zl;eu=1;var e={}.toString,t=e.call("");return Zl=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 tu=function(p){var f,h,m,y,g,v,w,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(w=o(E).call(p),f&&(y=new f),b=w.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=w.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>(v=_.charCodeAt(0))||v>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},tu}())}function X(){if(Su)return _u;Su=1;var e=Eu?bu:(Eu=1,bu=(gu?yu:(gu=1,yu=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:wu?vu:(wu=1,vu=function(e){return e!=e})),t=Dc,r=Uc,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return _u=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},_u}function K(){if(Cu)return Au;Cu=1;var e=jc,t=zc,r=function(){}.call;return Au=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},Au}function Y(){if($u)return Nu;$u=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 Nu=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 J(){return Mu?ju:(Mu=1,ju=function(e){return"function"==typeof e})}function Q(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return Wu||(Wu=1,Od.exports=e,Od.exports.default=e),Od.exports}function Z(){if(Xu)return Sd;Xu=1;var e=K(),t=function(){if(ku)return Lu;ku=1;var e=[].forEach,t=Object.create;return Lu=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Lu}(),r=function(){if(Gu)return Bu;Gu=1;var e=Uc,t=function(){if(Fu)return Uu;Fu=1;var e=J();return Uu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Bu=function(r){return t(e(r))}}(),n=function(){if(zu)return Vu;zu=1;var e=function(){if(qu)return Hu;qu=1;var e=J();return Hu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return Vu=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=Q(),i=Y(),s=Object.create,a=t("then","then:finally","done","done:finally");return Wc.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]})))}))},Sd}async function ee(e){try{return await En.promises.access(e),!0}catch{return!1}}function te(e){const t=function(){if(L()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Sn.join("/Users/",process.env.SUDO_USER):Sn.join("/home/",process.env.SUDO_USER);{const e=bn.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(Dd,t)}async function re(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 ee(e.rcPath)&&((await kd(e.rcPath,"utf8")).includes(t)||(await Ld(e.rcPath,`\n${t}\n`),w(`Added ${t} to ${e.rcPath}`)))}async function ne(e,t){await ee(t)&&((await kd(t,"utf-8")).includes(e)||(await Ld(t,e),w(`${e} was added to ${t}`)))}async function oe(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Md,...r},o=function(e,t=!1){const r=t?qd(e):e;return Yd(r,'"',"\\")}(null!=t?t:"",n.escapeSpace);try{if(Wn.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);ai.exportVariable(e,o)}catch(i){y(i),await ie(e,o,n)}else await ie(e,o,n)}catch(i){y(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function ie(e,t,r){const n=null!=t?t:"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await C(`[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 Ud(r),void(r.overwrite?(await Jd(r.rcPath,`\nexport ${e}="${n}"\n`),w(`${e}="${n}" was added to "${r.rcPath}`)):(await Jd(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 se(e,t={}){const r={rcPath:Md,...t};if(!function(e){var t,r;return!!Zd.some((t=>t.test(e)))&&(null!=(r=null==(t=process.env.PATH)?void 0:t.split(Sn.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${Sn.delimiter}${process.env.PATH}`;try{if(Wn.GITHUB_ACTIONS)try{ai.addPath(e)}catch(n){y(n),await ae(e,r)}else await ae(e,r)}catch(n){y(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function ae(e,t){switch(process.platform){case"win32":return await C(`$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 Ud(t),await Qd(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void w(`"${e}" was added to "${t.rcPath}"`);default:return}}function ce(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 le(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;up[e]=r}}function ue(e,t,r){const n=function(e){const t=up[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 sp.pluralize(r.locale,t,n[e]).replace("{0}",t)}function de(){if(Rf)return xf;Rf=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],x(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=>T(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,v=m.map((e=>new o(e,this.options)));for(const r of v){if(h(r))return[r];y.set(r.value,r)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return r.set(t,w),w}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(R(this.set[r],e,this.options))return!0;return!1}}xf=t;const r=new Cf,n=wp,o=pe(),i=mp,s=Ap,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:d}=yp,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:f}=hp,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=w(e,t),i("tildes",e),e=S(e,t),i("xrange",e),e=I(e,t),i("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(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),v(r)?a="":v(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:v(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),v(n)?c="":v(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(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=v(o),u=l||v(s),d=u||v(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})),I=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),T=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),x=e=>(t,r,n,o,i,s,a,c,l,u,d,p)=>`${r=v(n)?"":v(o)?`>=${n}.0.0${e?"-0":""}`:v(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=v(l)?"":v(u)?`<${+l+1}.0.0-0`:v(d)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${d}-${p}`:e?`<${l}.${u}.${+d+1}-0`:"<="+c}`.trim(),R=(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 xf}function pe(){if(Af)return Pf;Af=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(">")))}}Pf=t;const r=wp,{safeRe:n,t:o}=yp,i=bf,s=mp,a=Ap,c=de();return Pf}function fe(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 he(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 me(e){return null==e?[]:Array.isArray(e)?e:[e]}function ye(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 ge(e,t,r,n=40){Wn.GITHUB_ACTIONS?await async function(e,t,r=40){await M("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Ud(r),await Uh(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function ve(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 we(){return null!==oc.sync("nala",{nothrow:!0})}function be(){let e;return e=we()?"nala":"apt-get",e}function Ee(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function _e(e){try{const{stdout:t}=await P("dpkg",["-s",e],{env:ve("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Se(e,t=be()){return(await Promise.all(e.map((e=>Oe(e,t))))).filter((e=>void 0!==e))}async function Oe(e,t=be()){const r=await async function(e,t,r){switch(await Ie(e,t,r)){case Hh.NameDashVersion:return`${t}-${r}`;case Hh.NameEqualsVersion:return`${t}=${r}`;case Hh.Name:return void 0!==r&&""!==r&&g(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${null!=r?r:""}`)}}(t,e.name,e.version);return await _e(r)?void 0:r}async function Ie(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await P("apt-cache",["search","--names-only",`^${Ee(t)}-${Ee(r)}$`],{env:ve(e),stdio:"pipe"});if(""!==n.trim())return Hh.NameDashVersion;try{const{stdout:n}=await P("apt-cache",["show",`${t}=${r}`],{env:ve(e)});if(""===n.trim())return Hh.NameEqualsVersion}catch{}}try{const{stdout:r}=await P("apt-cache",["show",t],{env:ve(e),stdio:"pipe"});if(""!==r.trim())return Hh.Name}catch{}return Bh?Hh.None:(Gh(e),Ie(e,t,r))}async function Te(e,t=!1){try{const n=be();for(const{name:t,version:r}of e)w(`Installing ${t} ${null!=r?r:""} via ${n}`);t&&Gh(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>{var t;return null!=(t=e.repository)?t:[]})))];await Promise.all(r.map((t=>async function(e,t=be()){await Vh(t),await async function(e){await _e("software-properties-common")||j(e,["install","-y","--fix-broken","-o",Fh,"software-properties-common"],{...cc,env:ve(e)})}(t),j("add-apt-repository",["-y","--no-update",e],{...cc,env:ve(t)}),Gh.clear(),Gh(t)}(t,e))))}(n,e);const o=await Se(e,n);if(0===o.length)return w("All packages are already installed"),{binDir:"/usr/bin/"};await Vh(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?xe(t):async function({key:e,keyServer:t=Xh,fileName:r,keyStorePath:n=Xh}){try{Pe(r);const o=Sn.join(n,r);return await ee(o)||(Re(),await M("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await M("chmod",["644",o])),o}catch(o){return void g(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),j(n,["install","--fix-broken","-y",...o],{...cc,env:ve(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;zh.some((e=>r.stderr.includes(e)))&&(g(`Failed to install packages ${o}. Retrying...`),j(n,["install","--fix-broken","-y","-o",Fh,...o],{...cc,env:ve(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 xe({keyUrl:e,fileName:t,keyStorePath:r=Wh}){try{Pe(t);const n=Sn.join(r,t);if(!(await ee(n))){Re(),await Te([{name:"ca-certificates"}]);const r=Sn.join(bn.tmpdir(),t),o=new Mh.DownloaderHelper(e,bn.tmpdir(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),j("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),j("chmod",["644",n])}return n}catch(n){return void g(`Failed to add apt key via download ${e}: ${n}`)}}function Re(){j("gpg",["-k"])}function Pe(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Ae(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof Kh)return{binDir:Kh};const t=await oc("brew",{nothrow:!0});if(null!==t)return Kh=Sn.dirname(t),{binDir:Kh};await Te([{name:"ca-certificates"}]);const r=new Mh.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",bn.tmpdir(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),A("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Kh=Ce(),await se(Kh,e.rcOptions),{binDir:Kh}}function Ce(){return Sn.join(Ne(),"bin")}function Ne(){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 $e(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};w(`Installing ${e} ${null!=t?t:""} via brew`),Zh&&null!==oc.sync("brew",{nothrow:!0})||(await Ae(),Zh=!0);const o=Ce(),i=Sn.join(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),A(i,s,{stdio:"inherit"}),{binDir:o}}function De(){return"linux"===process.platform&&(void 0===Yh&&(Yh=null!==oc.sync("dnf",{nothrow:!0})),Yh)}function Le(){return"linux"===process.platform&&(void 0===Jh&&(Jh=null!==oc.sync("pacman",{nothrow:!0})),Jh)}function ke(){return"linux"===process.platform&&(void 0===Qh&&(Qh=null!==oc.sync("apt-get",{nothrow:!0})),Qh)}function je(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 Me(e){return e instanceof URL?Dn.fileURLToPath(e):e}function Ue(e){if("string"==typeof e)return Iv(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw Error("Input must be a string or a Uint8Array");return Tv(e)}function Fe(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 Be(e,{checkOpen:t=!0}={}){return Fe(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 Ge(e,{checkOpen:t=!0}={}){return Fe(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 He(e,t){return Be(e,t)&&Ge(e,t)}function qe(){return this[Dv].next()}function Ve(e){return this[Dv].return(e)}function ze({preventCancel:e=!1}={}){const t=this.getReader(),r=new $v(t,e),n=Object.create(Lv);return n[Dv]=r,n}function We(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(null!=i||(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(bw(1e3*e)%1e3),nanoseconds:Math.trunc(bw(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(+s.hours,"hour","h"),i(+s.minutes,"minute","m"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&1e3>e){const e=+s.milliseconds,r=+s.microseconds,n=+s.nanoseconds;if(i(+s.seconds,"second","s"),t.formatSubMilliseconds)i(e,"millisecond","ms"),i(r,"microsecond","µs"),i(n,"nanosecond","ns");else{const o=e+r/1e3+n/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=1>o?Math.ceil(o):Math.round(o),c=s?o.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=(Math.round(Math.floor((r?+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 Xe(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const o of e)O_(o);const t=e.some((({readableObjectMode:e})=>e)),r=w_(e,t),n=new b_({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const o of e)n.add(o);return n}async function Ke(e,t,r){var n;if("win32"!==process.platform)return;if("string"==typeof HO)return{binDir:HO};const o=oc.sync("choco",{nothrow:!0});if(null!==o)return HO=Sn.dirname(o),{binDir:HO};let i="powershell.exe";const s=oc.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(i=s),GO(i,["-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 a=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await se(a,Yx);const c=oc.sync("choco",{nothrow:!0});return HO=null!==c?Sn.dirname(c):(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin",await ee(HO)?{binDir:HO}:void 0}async function Ye(e,t,r=[]){var n;w(`Installing ${e} ${null!=t?t:""} via chocolatey`),qO&&null!==oc.sync("choco",{nothrow:!0})||(await Ke(0,0,process),qO=!0);const o=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=o,void 0!==t&&""!==t)GO("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{GO("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;w(e+" might require a reboot for the completion of the installation.")}const s=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin";return await se(s,Yx),{binDir:s}}async function Je(e){for(const{name:t,version:r}of e)w(`Installing ${t} ${null!=r?r:""} via dnf`);return j("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await BO("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await BO("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;g(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Qe(e,t,r){w(`Installing ${e} ${null!=t?t:""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===oc.sync("yay",{nothrow:!0}))try{j("pacman",["-S","--noconfirm","base-devel","git"]);const e=Sn.join(bn.tmpdir(),"yay");j("mkdir",["-p",e]),D()?(g("Creating a non-root user to build yay"),j("useradd",["-m","-G","wheel","builder"]),j("passwd",["-d","builder"]),j("chown",["-R","builder:builder",e]),j("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),XO=!0,GO("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),GO("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(GO("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:bn.tmpdir()}),GO("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),GO("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),VO||"yay"===r||(j(n,["-Sy","--noconfirm"]),VO=!0),zO||"yay"===r||(j(n,["-S","--noconfirm","base-devel"]),zO=!0);const o=e=>"yay"===r?D()&&XO?j("su",["-","builder","-c","yay -S --noconfirm "+e]):GO(r,["-S","--noconfirm",e]):j(null!=r?r:n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await BO(e,["-Si",t]);for(const e of n.matchAll(WO))r.push(e[1])}catch(n){g(`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 Ze(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 et(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function tt(e,t=!0){return t?Sn.basename(e):Sn.basename(e,Sn.extname(e))}function rt(e){return Sn.normalize(e).replace(RegExp(Ee(Sn.sep)+"$"),"")}function nt(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function ot(e,t){const r=Sn.extname(e),n=`${t}${Sn.basename(e,r)}${r}`;return Sn.join(Sn.dirname(e),n)}function it(e,t){const r=Sn.extname(e),n=`${Sn.basename(e,r)}${t}${r}`;return Sn.join(Sn.dirname(e),n)}function st(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function at(e){return"win32"===process.platform?e:"./"+e}function ct(e){const t=Sn.extname(e).length;return e.slice(0,-t)}function lt(e,t){return YO(e,t)}function ut(e,t){const r=Sn.relative(t,e);return!(!r||".."===r||r.startsWith(".."+Sn.sep)||r===Sn.resolve(e))}function dt(e){return bI(this,void 0,void 0,(function*(){if(SI.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield SI.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function pt(e){return bI(this,void 0,void 0,(function*(){EI.ok(e,"a path argument must be provided"),yield SI.mkdir(e,{recursive:!0})}))}function ft(e){return bI(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(SI.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(_I.delimiter))e&&t.push(e);if(SI.isRooted(e)){const r=yield SI.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(_I.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(_I.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield SI.tryGetExecutablePath(_I.join(o,e),t);r&&n.push(r)}return n}))}function ht(e,t,r,n){return bI(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield pt(t);const o=yield SI.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield SI.lstat(o)).isDirectory()?yield ht(o,s,r,n):yield mt(o,s,n)}yield SI.chmod(t,(yield SI.stat(e)).mode)}))}function mt(e,t,r){return bI(this,void 0,void 0,(function*(){if((yield SI.lstat(e)).isSymbolicLink()){try{yield SI.lstat(t),yield SI.unlink(t)}catch(n){"EPERM"===n.code&&(yield SI.chmod(t,"0666"),yield SI.unlink(t))}const r=yield SI.readlink(e);yield SI.symlink(r,t,SI.IS_WINDOWS?"junction":null)}else(yield SI.exists(t))&&!r||(yield SI.copyFile(e,t))}))}function yt(e,t,r){return QI(this,void 0,void 0,(function*(){const n=eT.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 eT.ToolRunner(o,t,r).exec()}))}function gt(e,t){const r=[];t=t||yT.arch();const n=gT.join(St(),e);if(hT.existsSync(n)){const e=hT.readdirSync(n);for(const o of e)if(Et(o)){const e=gT.join(n,o,t||"");hT.existsSync(e)&&hT.existsSync(e+".complete")&&r.push(o)}}return r}function vt(e){return uT(this,void 0,void 0,(function*(){return e||(e=gT.join(Ot(),ST.default())),yield fT.mkdirP(e),e}))}function wt(e,t,r){return uT(this,void 0,void 0,(function*(){const n=gT.join(St(),e,wT.clean(t)||t,r||"");pT.debug("destination "+n);const o=n+".complete";return yield fT.rmRF(n),yield fT.rmRF(o),yield fT.mkdirP(n),n}))}function bt(e,t,r){const n=gT.join(St(),e,wT.clean(t)||t,r||"");hT.writeFileSync(n+".complete",""),pT.debug("finished caching tool")}function Et(e){const t=wT.clean(e)||"";pT.debug("isExplicit: "+t);const r=null!=wT.valid(t);return pT.debug("explicit? "+r),r}function _t(e,t){let r="";pT.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>wT.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(wT.satisfies(o,t)){r=o;break}}return pT.debug(r?"matched: "+r:"match not found"),r}function St(){const e=process.env.RUNNER_TOOL_CACHE||"";return _T.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function Ot(){const e=process.env.RUNNER_TEMP||"";return _T.ok(e,"Expected RUNNER_TEMP to be defined"),e}function It(e,t){const r=zn[e];return void 0!==r?r:t}function Tt(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 AT(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(){Tt(e,r).then(t).catch(n)}),l)):Tt(e,r).then(t).catch(n)}))}))}function xt(e,t,r){switch(process.platform){case"win32":return Ye("7zip",e);case"darwin":return $e("p7zip",e);case"linux":if(Le())return Qe("p7zip",e);if(De())return Je([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(ke())return Te([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function Rt(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||g(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function Pt(e,t){return await BO(await async function(){return void 0===NT&&(null===oc.sync("7z",{nothrow:!0})&&await xt("",0,process),NT="7z"),NT}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await G(t),t}function At(e,t){return Pt(e,t)}async function Ct(e,t){return null!==oc.sync("7z",{nothrow:!0})?Pt(e,t):null!==oc.sync("unzip",{nothrow:!0})?(await BO("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await G(t),t):Pt(e,t)}async function Nt(e,t,r=0,n=[]){await async function(e){switch(w("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(Le()?(await Qe("gzip"),await Qe("tar")):De()?await Je([{name:"gzip"},{name:"tar"}]):ke()&&await Te([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(Le()?(await Qe("xz"),await Qe("tar")):De()?await Je([{name:"xz"},{name:"tar"}]):ke()&&await Te([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(Rt(e));try{await OI(t)}catch{}try{await BO("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&g(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await G(t),t}async function $t(e,t,r,n,o){var i,s;w(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=null!=(i=process.env.RUNNER_TEMP)?i:bn.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:Sn.join(bn.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:d}=await r(t,process.platform,o);if(Wn.GITHUB_ACTIONS)try{const r=exports.find_1(e,t);if(r){const n=Sn.join(r,u),o=Sn.join(n,c);if(await ee(Sn.join(o,l)))return w(`${e} ${t} was found in the cache at ${o}.`),await se(o,Yx),{installDir:n,binDir:o}}}catch{}const p=Sn.join(n,u),f=Sn.join(p,c),h=Sn.join(f,l);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([ee(e),ee(t)])).includes(!1))try{const e=await async function(e,t,r){w(`Download ${e} ${t}`);const n=await CT((()=>{var e;const t=Sn.join(null!=(e=process.env.RUNNER_TEMP)?e:bn.tmpdir(),`${Date.now()}-${Sn.basename(r)}`);return exports.downloadTool_1(r,t)}),{name:r,max:4,backoffBase:2e3,report:e=>w(e)});return n}(r,n,o);w(`Extracting ${e} to ${i}`);const t=null!=s?s:function(e){switch(e){case 0:case 1:case 2:return Nt;case 3:return Ct;default:return Pt}}(Rt(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 se(e,Yx),!(await ee(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await da(t,"755")}catch(c){g(`Failed to make ${t} executable: ${c}`)}}(f,h,e,t,a,n,d,o),await async function(e,t,r){Wn.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==jr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await exports.cacheDir_1(e,t,r))}(n,e,t),{installDir:p,binDir:f}}function Dt(e,t,r){var n;const o=null!=(n=Tf(e))?n:e;switch(t){case"win32":{const t=ff(o,"v3.19.6");let n;cI.includes(r)?n=t?"win64-x64":"windows-x86_64":lI.includes(r)?n=t?"win32-x86":"windows-i386":uI.includes(r)?n="windows-arm64":(w(`Trying unsupported arch '${r}' for cmake on Windows`),n="windows-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:nt("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${ff(o,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:nt("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=ff(o,"v3.19.8");let n;uI.includes(r)?n=t?"Linux-aarch64":"linux-aarch64":cI.includes(r)?n=t?"Linux-x86_64":"linux-x86_64":(w(`Trying unsupported arch '${r}' for cmake on Linux`),n="linux-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:nt("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function Lt(e,t,r){return $t("cmake",e,Dt,t,r)}async function kt(e,t,r=XT){const n=await async function(e,t=XT){var r,n;try{const o=await exports.getExecOutput_1(e,["--version"]),i=null==(r=(o.stdout||o.stderr||"").trim().match(t))?void 0:r[1];return null!=(n=Tf(i))?n:void 0}catch(o){return void console.error(o)}}(e,r);return void 0!==n&&""!==t&&-1!==Wp(n,t)}function jt(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function Mt(e,t,r){const n=await async function(e,t,r){let n,o=await Ut(t);if(void 0!==o){const e=Sn.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(Wn.GITHUB_ACTIONS)try{w("Installing python in GitHub Actions");const{setupActionsPython:i}=await Promise.resolve().then((()=>require("./assets/actions_python-DaQ8vMqV.js")));if(await i(e,t,r),o=await Ut(t),void 0===o)throw Error("Python binary could not be found");const s=Sn.dirname(o);n={bin:o,installDir:s,binDir:s}}catch(i){g(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ye("python3",t,["--params=/InstallDir:"+e]):await Ye("python3",t);const n=await Ut(e);if(void 0===n)throw Error("Python binary could not be found");const o=Sn.dirname(n);await se(o,Yx),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await $e("python3",t);const e=await BO("brew",["--prefix","python"],{stdio:"pipe"}),n=Sn.join(e.stdout,"libexec","bin");await se(n,Yx);break}case"linux":if(Le())r=await Qe("python",t);else if(De())r=await Je([{name:"python3",version:t}]);else{if(!ke())throw Error("Unsupported linux distributions");r=await Te([{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 Ut(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Sn.dirname(o),binDir:Sn.dirname(o)}}return n}(e,t,r);Nn(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Bt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await Ht(e)||(await Qt("pip"),await Ht(e))}(e),Bt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Jt(e)))try{await Xt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Qt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await BO(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await async function(e){try{await Xt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){g(`Failed to install venv: ${""+t}. Ignoring...`)}}(e)}catch(t){g(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Xt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Xt(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){g(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(o),n}async function Ut(e){for(const t of["python","python3"]){const r=await Ft(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Sn.parse(bn.homedir()).root,t=(await Ea(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Ft(t,Sn.join(e,r));if(void 0!==n)return n}}}async function Ft(e,t){var r;try{if(void 0!==t){const r=Sn.join(t,nt(e));if(await ee(r)&&await kt(r,QT))return r}const n=null!=(r=await oc(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await kt(e,QT))return e}catch{}}async function Bt(){for(const e of["pip3","pip"]){const t=await Gt(e);if(void 0!==t)return t}}async function Gt(e){var t;try{const r=null!=(t=await oc(e,{nothrow:!0,all:!0}))?t:[];for(const e of r)if(await kt(e,JT))return e}catch{}}async function Ht(e){try{return await BO(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){w(""+t);try{return await BO(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){w(""+r)}}return!1}function qt(e,t,r=null){var n;return Vt(t)&&"linux"===process.platform&&null!==r&&e in ZT?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,ZT[e]):Vt(t)&&e in YT?null!=(n=YT[e])?n:"":"true"===t?"":null!=t?t:""}function Vt(e){return"true"===e||void 0===e}function zt(){if(!("version"in bn)||"function"!=typeof bn.version)return null;const e=bn.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 Wt(e,t,r={}){return Xt(await async function(){return void 0!==ax||(ax=(await Mt(qt("python",void 0,await ox()),"",process.arch)).bin),ax}(),e,t,r)}async function Xt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await Jt(e),l=c?"pipx":"pip",u=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await BO(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 BO(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,u);if(t)return{binDir:c?await Kt():await Yt(e,u)}}const d=await async function(e,t){return 0===(await BO(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,u);if(d)try{ai.info(`Installing ${t} ${null!=r?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 ix(),u.PIPX_BIN_DIR=await sx()),GO(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(p){if(ai.info(`Failed to install ${t} via ${l}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await Qt(t))throw Error(`Failed to install ${t} via ${l}: ${p}.`)}else if(null===await Qt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);return{binDir:c?await Kt():await Yt(e,u)}}function Kt(){return sx()}async function Yt(e,t){const r=await ex(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>ee(Sn.join(e,nt(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=oc.sync(nt(t),{nothrow:!0});return null!==n?Sn.dirname(n):e[e.length-1]}(r,t);return await se(n,Yx),n}async function Jt(e){return 0===(await BO(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Qt(e,t=!0){if("linux"===process.platform){if(ai.info(`Installing ${e} via the system package manager`),Le())return Qe(t?"python-"+e:e);if(De())return Je([{name:t?"python3-"+e:e}]);if(ke())return Te([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return $e(e);return null}function Zt(e,t,r){return Wt("cmakelang[YAML]",e)}async function er(e,t,r){switch(process.platform){case"win32":return await Ye("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await se(e,Yx),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return $e("graphviz",e);case"linux":if(Le())return Qe("graphviz",e);if(De())return Je([{name:"graphviz",version:e}]);if(ke())return Te([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function tr(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-HMjVj8JE.js"))),n=new r(e);await n.read((async e=>{await e.extract(Sn.join(t,e.path))}))}function rr(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:nt("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:nt("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:nt("doxygen"),extractedFolderName:t,extractFunction:tr,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function nr(){if("darwin"===process.platform)try{const e=await exports.getExecOutput_1("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await oe("SDKROOT",t.trim(),Yx):y("SDKROOT not set")}catch(e){y(e)}}async function or(e){const t=await _a(e,"utf-8");return JSON.parse(t)}function ir(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=sr(i,r,t);if(void 0!==n)return n}}function sr(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 ar(e,t,r){var n;if("win32"===t){const t=ir(await or(Sn.join(ux,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[null!=(n={x64:"x86_64",ia32:"i386"}[r])?n:r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:nt("g++"),extractedFolderName:"mingw64",extractFunction:Pt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function cr(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ye("gcc-arm-embedded",e);try{o=await $t("g++",e,ar,t,r)}catch(i){w(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){var r,n;let o;if(await Ye("mingw",e),"x64"===t&&await ee("C:/tools/mingw64/bin")?(o="C:/tools/mingw64/bin",await se(o,Yx)):"ia32"===t&&await ee("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await se(o,Yx)):await ee((null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(o=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin"),void 0!==o)return{binDir:o}}(e,r)}break;case"darwin":o=await $e("gcc",e);break;case"linux":"x64"===r?Le()?o=await Qe("gcc",e):De()?o=await Je([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):ke()&&(o=""===e?await Te([{name:"gcc"},{name:"g++"}]):await Te([{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`),Le()?o=await Qe("gcc-multilib",e):ke()&&(o=""===e?await Te([{name:"gcc-multilib"}]):await Te([{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){var n;const o=[];if("win32"===process.platform)o.push(oe("CC",nt(t+"/gcc"),Yx),oe("CXX",nt(t+"/g++"),Yx));else{let s=e;""===e&&(s=await async function(e,t){try{let r="gcc";if(await ee(e+"/gcc"))r=e+"/gcc";else{const t=(await Ea(e)).sort(((e,t)=>{var r,n,o,i;return function(e,t){const r=Tf(e),n=Tf(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(null!=(n=null==(r=e.match(/^gcc-?(.*)(\.exe)?$/))?void 0:r[1])?n:"",null!=(i=null==(o=t.match(/^gcc-?(.*)(\.exe)?$/))?void 0:o[1])?i:"")}));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await BO(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(g("Failed to parse gcc version from: "+n),t)}catch(i){return y("Failed to get gcc version: "+i),t}}(t,s),w("Using gcc version "+s));const a=Bp(null!=(n=Tf(s))?n:s);5>a?(o.push(oe("CC",`${t}/gcc-${s}`,Yx),oe("CXX",`${t}/g++-${s}`,Yx)),ke()&&o.push(ge("cc",`${t}/gcc-${s}`,Yx,r),ge("cxx",`${t}/g++-${s}`,Yx,r),ge("gcc",`${t}/gcc-${s}`,Yx,r),ge("g++",`${t}/g++-${s}`,Yx,r))):(o.push(oe("CC",`${t}/gcc-${a}`,Yx),oe("CXX",`${t}/g++-${a}`,Yx)),ke()&&o.push(ge("cc",`${t}/gcc-${a}`,Yx,r),ge("cxx",`${t}/g++-${a}`,Yx,r),ge("gcc",`${t}/gcc-${a}`,Yx,r),ge("g++",`${t}/g++-${a}`,Yx,r)))}o.push(nr()),Wn.GITHUB_ACTIONS&&await async function(){const e=Sn.join(ux,"gcc_matcher.json");if(!(await ee(e)))return g("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}(),await Promise.all(o)}(e,o.binDir,n),o}async function lr(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return cr(e,t,r);case"linux":Le()?n=await Qe("mingw-w64-gcc",e):De()?n=await Je([{name:"mingw64-gcc",version:e}]):ke()&&(n=await Te([{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 ur(e){const t=Lp(e),r=null!==t?Bp(t):e;return oe("GCOV",""!==r?"gcov-"+r:"gcov",Yx)}async function dr(e,t,r){const{keywords:n,optionalKeywords:o}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),cI.includes(t)?(n.push("64"),n.push("x86_64")):(w(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),cI.includes(t)?n.push("x86_64"):uI.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=ir(await or(Sn.join(dx,"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:""+Sn.basename(i.name,".tar.xz"),binRelativeDir:"bin",binFileName:nt("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${o}`)}function pr(e,t,r){const n=function(e,t){switch(e){case"win32":return cI.includes(t)||lI.includes(t)?"win":uI.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return cI.includes(t)||lI.includes(t)?"linux":uI.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:nt("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function fr(e,t,r){return $t("ninja",e,pr,t,r)}function hr(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:nt("kcov")}}function mr(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:nt("kcov"),extractFunction:yr}}async function yr(e,t){const r=await Nt(e,t,1),n=await async function(){let e=oc.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await Lt(qt("cmake",void 0,await ox()),Sn.join(te("~"),"cmake"),"");e=Sn.join(t,"cmake")}return null===oc.sync("ninja",{nothrow:!0})&&await fr(qt("ninja",void 0,await ox()),Sn.join(te("~"),"ninja"),""),e}();"linux"===process.platform&&(Le()?await Promise.all([Qe("libdwarf"),Qe("libcurl-openssl")]):De()?await Je([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):ke()&&await Te([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==oc.sync("patch",{nothrow:!0})){const e=Sn.join(px,"gcc13.patch");await BO("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=Sn.join(r,"build");return await BO(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await BO(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function gr(){"darwin"===process.platform&&(null!==await oc("clang",{nothrow:!0})&&null!==await oc("clang++",{nothrow:!0})&&(v("Assuming clang is an Apple Clang compiler"),await Promise.all([oe("CC","clang",Yx),oe("CXX","clang++",Yx)])),Fn.error("Apple Clang automatic installation is not supported yet"))}function vr(e){return Object.values(Tx).includes(e)?e:e in Tx?Tx[e]:e}function wr(e){if(Object.keys(Tx).includes(e))return e;for(const[t,r]of Object.entries(Tx))if(r===e)return t;return e}function br(e){const t=vr(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(""+vx.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){gx.warning("vswhere failed: "+r)}return null}(0,r);if(n&&wx.existsSync(n))return gx.info("Found with vswhere: "+n),n;gx.info("Not found with vswhere");const o=e?[wr(e)]:Ix;for(const i of Sx)for(const e of o)for(const t of Ox)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,gx.info("Trying standard location: "+n),wx.existsSync(n))return gx.info("Found standard location: "+n),n;if(gx.info("Not found in standard locations"),n=_x+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",wx.existsSync(n))return gx.info("Found VS 2015: "+n),n;throw gx.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function Er(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function _r(e,t,r,n,o,i,s){void 0!==t&&await ee(t)&&(w(`Adding ${t} to PATH`),await oe("VCTargetsPath",t,Yx)),await Ax(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 Sr(e,t,r,n,o,i,s,a=12e5){ai.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(yx(e)),e.addEventListener("abort",(()=>{c(yx(e))}))}if(r===1/0)return void e.then(a,c);const l=new fx;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=null!=o?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=zx.includes(e);let a;if("vcvarsall"===e)await _r(qt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Ae({rcOptions:Yx});else{const i=Sn.join(o,s?"llvm":e),c=qt(e,t,r),l=Wx[e];a=await l(c,i,n)}i.push(Mr(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){y(c),c instanceof Error&&void 0!==c.stack&&y(c.stack),s.push(e+" failed to install")}ai.endGroup()}async function Or(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":cI.includes(t)?r.push("win64"):lI.includes(t)?r.push("win32"):uI.includes(t)?r.push("woa64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),ke()){n.push("ubuntu");const e=await ox();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 De()&&n.push("rhel");cI.includes(t)?r.push("x86_64"):lI.includes(t)?r.push("x86"):uI.includes(t)?r.push("aarch64"):dI.includes(t)?r.push("armv7a"):pI.includes(t)?r.push("powerpc64le"):fI.includes(t)?r.push("sparc64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),cI.includes(t)?r.push("x86_64"):uI.includes(t)?n.push("arm64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),cI.includes(t)?r.push("amd64"):lI.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=ir(await or(Sn.join(Nx,"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=ir(await or(Sn.join(Nx,"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:nt("clang"),extractFunction:"win32"===t?At:(e,t)=>Nt(e,t,1)}}async function Ir(e,t,r){var n;const o=await Dx(e,t,r);return await async function(e,t){var r,n;const o=null!=(r=process.env.LD_LIBRARY_PATH)?r:"",i=null!=(n=process.env.DYLD_LIBRARY_PATH)?n:"",s=Pr(t),a=[oe("CC",nt(e+"/bin/clang"),Yx),oe("CXX",nt(e+"/bin/clang++"),Yx),oe("LLVM_PATH",e,Yx),oe("LD_LIBRARY_PATH",`${o}${Sn.delimiter}${e}/lib`,Yx),oe("DYLD_LIBRARY_PATH",`${i}${Sn.delimiter}${e}/lib`,Yx),oe("LLVM_LDFLAGS","-L"+jt(e+"/lib"),Yx),oe("LLVM_CPPFLAGS","-I"+jt(e+"/include"),Yx),await ee(`${e}/lib/clang/${t}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${t}/include`,Yx):await ee(`${e}/lib/clang/${s}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${s}/include`,Yx):Promise.resolve(),oe("LIBRARY_PATH",e+"/lib",Yx),nr()];if(ke()){const t=60;a.push(ge("cc",e+"/bin/clang",Yx,t),ge("cxx",e+"/bin/clang++",Yx,t),ge("clang",e+"/bin/clang",Yx),ge("clang++",e+"/bin/clang++",Yx),ge("lld",e+"/bin/lld",Yx),ge("ld.lld",e+"/bin/ld.lld",Yx),ge("llvm-ar",e+"/bin/llvm-ar",Yx))}await Promise.all(a)}(null!=(n=o.installDir)?n:t,e),o}function Tr(e,t,r){return Rr(e,t,r,Cx.ClangFormat)}function xr(e,t,r){return Rr(e,t,r)}async function Rr(e,t,r,n=Cx.All){const o=Pr(e);try{if(ke())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Te([{name:"ca-certificates"}]);const n=new Mh.DownloaderHelper("https://apt.llvm.org/llvm.sh",bn.tmpdir(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await _a(n.getDownloadPath(),"utf-8"),i=Sn.join(bn.tmpdir(),"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 ${Fh} -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 ${Fh} -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 P("dpkg",["-l",e],{env:ve("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Fn.info("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return we()?e.replace(/apt-get/g,"nala"):e}(o),await Na(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Te(s),await da(i,"755"),await M("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await se(r+"/bin",Yx),{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 $t("llvm",e,Or,t,r);return await Lx(o),i}function Pr(e){const t=function(e){if(null===Lp(e))try{const t=Tf(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 Ar(){if(Wn.GITHUB_ACTIONS){const e=Sn.join($x,"llvm_matcher.json");if(!(await ee(e)))return g("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}}async function Cr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=xx(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Px(s);l=!0,w("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Ye("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 Ye("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 Ye("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 Ye("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):y(`The given MSVC versions ${e} is not supported yet.`)}catch(u){y(u)}await _r(s,c,r,a,n,o,i),Wn.GITHUB_ACTIONS&&await async function(){const e=Sn.join(jx,"msvc_matcher.json");if(!(await ee(e)))return g("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}()}async function Nr(e,t,r){if("win32"===process.platform)return await Ye("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await se(e,Yx),e}()}}function $r(e,t,r){return{url:Dr(t,r,e),binRelativeDir:"",binFileName:nt("pwsh"),extractedFolderName:""}}function Dr(e,t,r){var n;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}-${null!=(n={arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t])?n:"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function Lr(e,t,r){try{return await $t("pwsh",e,$r,t,r)}catch(n){return y(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ye("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await se(t,Yx),{binDir:t}}case"darwin":return $e("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Le())return Qe("powershell-bin",e,"yay");if(De())return await Je([{name:"curl"}]),j("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),Je([{name:"powershell",version:e}]);if(ke()){await Te([{name:"curl"}]);const t=await ox();return j("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),j("dpkg",["-i","packages-microsoft-prod.deb"]),Te([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function kr(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:nt("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function jr(e){const t=ai.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function Mr(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}var Ur,Fr,Br,Gr,Hr,qr,Vr,zr,Wr,Xr,Kr,Yr,Jr,Qr,Zr,en,tn,rn,nn,on,sn,an,cn,ln,un,dn,pn,fn,hn=e=>{throw TypeError(e)},mn=(e,t,r)=>t.has(e)||hn("Cannot "+r),yn=(e,t,r)=>(mn(e,t,"read from private field"),r?r.call(e):t.get(e)),gn=(e,t,r)=>t.has(e)?hn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),vn=(e,t,r,n)=>(mn(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),wn=(e,t,r)=>(mn(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bn=require("os"),En=require("fs"),_n=require("crypto"),Sn=require("path"),On=require("http"),In=require("https");require("net");const Tn=require("tls"),xn=require("events"),Rn=require("util"),Pn=require("buffer"),An=require("child_process"),Cn=require("process"),Nn=require("assert"),$n=require("stream"),Dn=require("url"),Ln=require("string_decoder"),kn=require("tty"),jn=require("timers/promises"),Mn=require("v8"),Un=require("timers"),Fn=require("console");var Bn="undefined"!=typeof document?document.currentScript:null;const Gn=e(En),Hn=e(On),qn=e(In),Vn=e($n);var zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Wn={};const Xn=[{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=Xn,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))}(Wn);var Kn={},Yn={},Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.toCommandProperties=Jn.toCommandValue=void 0,Jn.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Jn.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 Qn=zn&&zn.__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]}),Zn=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),eo=zn&&zn.__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)&&Qn(t,e,r);return Zn(t,e),t};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.issue=Yn.issueCommand=void 0;const to=eo(bn),ro=Jn;Yn.issueCommand=n,Yn.issue=function(e,t=""){n(e,{},t)};class no{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 oo={};const io=new Uint8Array(256);let so=io.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,co=[];for(let Qx=0;256>Qx;++Qx)co.push((Qx+256).toString(16).substr(1));let lo,uo,po=0,fo=0;const ho=c("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),_n.createHash("md5").update(e).digest()})),mo=c("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),_n.createHash("sha1").update(e).digest()})),yo=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:a,stringify:s,v1:function(e,t,r){let n=t&&r||0;const i=t||Array(16);let a=(e=e||{}).node||lo,c=void 0!==e.clockseq?e.clockseq:uo;if(null==a||null==c){const t=e.random||(e.rng||o)();null==a&&(a=lo=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=uo=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:fo+1;const d=l-po+(u-fo)/1e4;if(0>d&&void 0===e.clockseq&&(c=c+1&16383),(0>d||l>po)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");po=l,fo=u,uo=c,l+=122192928e5;const p=(1e4*(268435455&l)+u)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;const f=l/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=255&f,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=c>>>8|128,i[n++]=255&c;for(let o=0;6>o;++o)i[n+o]=a[o];return t||s(i)},v3:ho,v4:function(e,t,r){const n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=n[e];return t}return s(n)},v5:mo,validate:i,version:function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),go=r(yo);var vo=zn&&zn.__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]}),wo=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),bo=zn&&zn.__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)&&vo(t,e,r);return wo(t,e),t};Object.defineProperty(oo,"__esModule",{value:!0}),oo.prepareKeyValueMessage=oo.issueFileCommand=void 0;const Eo=bo(En),_o=bo(bn),So=go,Oo=Jn;oo.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!Eo.existsSync(r))throw Error("Missing file at path: "+r);Eo.appendFileSync(r,`${Oo.toCommandValue(t)}${_o.EOL}`,{encoding:"utf8"})},oo.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+So.v4(),n=Oo.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}${_o.EOL}${n}${_o.EOL}${r}`};var Io={};class To 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 xo,Ro={},Po=Tn,Ao=On,Co=In,No=xn,$o=Rn;Ro.httpOverHttp=function(e){var t=new u(e);return t.request=Ao.request,t},Ro.httpsOverHttp=function(e){var t=new u(e);return t.request=Ao.request,t.createSocket=d,t.defaultPort=443,t},Ro.httpOverHttps=function(e){var t=new u(e);return t.request=Co.request,t},Ro.httpsOverHttps=function(e){var t=new u(e);return t.request=Co.request,t.createSocket=d,t.defaultPort=443,t},$o.inherits(u,No.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=f({request:e},o.options,p(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)},u.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(xo("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?(xo("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)):(xo("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=f({},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")),xo("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(),xo("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()},u.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)}))}},xo=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(){},Ro.debug=xo;var Do,Lo,ko,jo,Mo,Uo=Ro;(Lo=Do||(Do={}))[Lo.OK=200]="OK",Lo[Lo.MultipleChoices=300]="MultipleChoices",Lo[Lo.MovedPermanently=301]="MovedPermanently",Lo[Lo.ResourceMoved=302]="ResourceMoved",Lo[Lo.SeeOther=303]="SeeOther",Lo[Lo.NotModified=304]="NotModified",Lo[Lo.UseProxy=305]="UseProxy",Lo[Lo.SwitchProxy=306]="SwitchProxy",Lo[Lo.TemporaryRedirect=307]="TemporaryRedirect",Lo[Lo.PermanentRedirect=308]="PermanentRedirect",Lo[Lo.BadRequest=400]="BadRequest",Lo[Lo.Unauthorized=401]="Unauthorized",Lo[Lo.PaymentRequired=402]="PaymentRequired",Lo[Lo.Forbidden=403]="Forbidden",Lo[Lo.NotFound=404]="NotFound",Lo[Lo.MethodNotAllowed=405]="MethodNotAllowed",Lo[Lo.NotAcceptable=406]="NotAcceptable",Lo[Lo.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Lo[Lo.RequestTimeout=408]="RequestTimeout",Lo[Lo.Conflict=409]="Conflict",Lo[Lo.Gone=410]="Gone",Lo[Lo.TooManyRequests=429]="TooManyRequests",Lo[Lo.InternalServerError=500]="InternalServerError",Lo[Lo.NotImplemented=501]="NotImplemented",Lo[Lo.BadGateway=502]="BadGateway",Lo[Lo.ServiceUnavailable=503]="ServiceUnavailable",Lo[Lo.GatewayTimeout=504]="GatewayTimeout",(jo=ko||(ko={})).Accept="accept",jo.ContentType="content-type",(Mo||(Mo={})).ApplicationJson="application/json";const Fo=[Do.MovedPermanently,Do.ResourceMoved,Do.SeeOther,Do.TemporaryRedirect,Do.PermanentRedirect],Bo=[Do.BadGateway,Do.ServiceUnavailable,Do.GatewayTimeout],Go=["OPTIONS","GET","DELETE","HEAD"];class Ho extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Ho.prototype)}statusCode;result}class qo{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 Vo{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[ko.Accept]=this._getExistingOrDefaultHeader(t,ko.Accept,Mo.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[ko.Accept]=this._getExistingOrDefaultHeader(r,ko.Accept,Mo.ApplicationJson),r[ko.ContentType]=this._getExistingOrDefaultHeader(r,ko.ContentType,Mo.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[ko.Accept]=this._getExistingOrDefaultHeader(r,ko.Accept,Mo.ApplicationJson),r[ko.ContentType]=this._getExistingOrDefaultHeader(r,ko.ContentType,Mo.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[ko.Accept]=this._getExistingOrDefaultHeader(r,ko.Accept,Mo.ApplicationJson),r[ko.ContentType]=this._getExistingOrDefaultHeader(r,ko.ContentType,Mo.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&&Go.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===Do.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&&Fo.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||!Bo.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 qo(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=l(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?qn:Hn;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({},zo(this.requestOptions.headers),zo(e||{})):zo(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=zo(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=l(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||Hn.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?Uo.httpsOverHttps:Uo.httpsOverHttp:s?Uo.httpOverHttps:Uo.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new qn.Agent(e):new Hn.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 Promise.resolve().then((()=>require("./assets/proxy-agent-B6ncb0bd.js"))).then((e=>e.proxyAgent)))({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===Do.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 Ho(e,o);t.result=i.result,n(t)}else r(i)}))}}const zo=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),Wo=r(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return ko},HttpClient:Vo,HttpClientError:Ho,HttpClientResponse:qo,get HttpCodes(){return Do},get MediaTypes(){return Mo},getProxyUrl:function(e){const t=l(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var Xo,Ko={},Yo=zn&&zn.__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(Ko,"__esModule",{value:!0}),Ko.PersonalAccessTokenCredentialHandler=Ko.BearerCredentialHandler=Ko.BasicCredentialHandler=void 0,Ko.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 Yo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Ko.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 Yo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Ko.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 Yo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Jo,Qo,Zo,ei,ti,ri,ni,oi,ii={},si={},ai=m(),ci={exports:{}};oi="win32"===process.platform||zn.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(ti)return ei;ti=1,ei=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=En;return ei}():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(ni)return ri;ni=1,ri=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=En;return ri}();var li=b;b.sync=function(e,t){try{return oi.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const ui="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,di=Sn,pi=ui?";":":",fi=li,hi=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),mi=(e,t)=>{const r=t.colon||pi,n=e.match(/\//)||ui&&e.match(/\\/)?[""]:[...ui?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=ui?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=ui?o.split(r):[""];return ui&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},yi=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=mi(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(hi(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=di.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];fi(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 gi=yi;yi.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=mi(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=di.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(fi.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 hi(e)};var vi={exports:{}};const wi=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};vi.exports=wi,vi.exports.default=wi;const bi=Sn,Ei=gi,_i=vi.exports;var Si={};const Oi=/([()\][%!^"`<>&|;, *?])/g;Si.command=function(e){return e.replace(Oi,"^$1")},Si.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Oi,"^$1"),t&&(e=e.replace(Oi,"^$1")),e};const Ii=/^#!(.*)/,Ti=En,xi=Sn,Ri=function(e){return E(e)||E(e,!0)},Pi=Si,Ai=function(e){const t=Buffer.alloc(150);let r;try{r=Ti.openSync(e,"r"),Ti.readSync(r,t,0,150,0),Ti.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(Ii);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},Ci="win32"===process.platform,Ni=/\.(?:com|exe)$/i,$i=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,Di="win32"===process.platform,Li=An,ki=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(!Ci)return e;const t=function(e){e.file=Ri(e);const t=e.file&&Ai(e.file);return t?(e.args.unshift(e.file),e.command=t,Ri(e)):e.file}(e),r=!Ni.test(t);if(e.options.forceShell||r){const r=$i.test(t);e.command=xi.normalize(e.command),e.command=Pi.command(e.command),e.args=e.args.map((e=>Pi.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)},ji={hookChildProcess:function(e,t){if(!Di)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 Di&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};ci.exports=O,ci.exports.spawn=O,ci.exports.sync=function(e,t,r){const n=ki(e,t,r),o=Li.spawnSync(n.command,n.args,n.options);return o.error=o.error||ji.verifyENOENTSync(o.status,n),o},ci.exports._parse=ki,ci.exports._enoent=ji;const Mi=t(ci.exports),Ui=({env:e=Cn.env,...t}={})=>{const r=I({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Cn.cwd(),path:t=Cn.env[I()],preferLocal:r=!0,execPath:n=Cn.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?Dn.fileURLToPath(e):e,s=Sn.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(Sn.join(t,"node_modules/.bin")),r=t,t=Sn.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?Dn.fileURLToPath(t):t;e.push(Sn.resolve(r,n,".."))})(a,n,s),[...a,t].join(Sn.delimiter)})(t),e},Fi=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Bi(o,i)&&n||Object.defineProperty(e,r,i)},Bi=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Gi=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Hi=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),qi=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),Vi=new WeakMap,zi=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"<anonymous>",i=function(...s){if(Vi.set(i,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const o of Reflect.ownKeys(t))Fi(e,t,o,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,o=Gi.bind(null,n,""+t);Object.defineProperty(o,"name",qi),Object.defineProperty(e,"toString",{...Hi,value:o})})(e,t,n)}(i,e),Vi.set(i,n),i};zi.callCount=e=>{if(!Vi.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Vi.get(e)};const Wi=(e,t)=>({name:"SIGRT"+(t+1),number:Xi+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Xi=34,Ki=[{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"}],Yi=()=>{const e=Array.from({length:64-Xi+1},Wi);return[...Ki,...e].map(Ji)},Ji=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=bn.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Qi=({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}],Zi=(()=>{const e=Yi();return Object.fromEntries(e.map(Qi))})(),es=(e,t)=>{const r=t.find((({name:t})=>bn.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Yi(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=es(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 ts=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d,cwd:p=Cn.cwd()}}})=>{const f=void 0===(o=null===o?void 0:o)?void 0:Zi[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:d,errorCode:n&&n.code,signal:o,signalDescription:f,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,y="[object Error]"==={}.toString.call(n),g=y?`${m}\n${n.message}`:m,v=[g,t,e].filter(Boolean).join("\n");return y?(n.originalMessage=n.message,n.message=v):n=Error(v),n.shortMessage=g,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=f,n.stdout=e,n.stderr=t,n.cwd=p,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=u&&!c,n},rs=["stdin","stdout","stderr"];var ns,os={exports:{}},is={exports:{}},ss=zn.process;const as=function(e){return 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};if(as(ss)){var cs,ls=Nn,us=(ns||(ns=1,(_s=is).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&_s.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&_s.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),is.exports),ds=/^win/i.test(ss.platform),ps=xn;"function"!=typeof ps&&(ps=ps.EventEmitter),ss.__signal_exit_emitter__?cs=ss.__signal_exit_emitter__:((cs=ss.__signal_exit_emitter__=new ps).count=0,cs.emitted={}),cs.infinite||(cs.setMaxListeners(1/0),cs.infinite=!0),os.exports=function(e,t){if(!as(zn.process))return function(){};ls.equal(typeof e,"function","a callback must be provided for exit handler"),!1===ys&&gs();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),cs.on(r,e),function(){cs.removeListener(r,e),0===cs.listeners("exit").length&&0===cs.listeners("afterexit").length&&fs()}};var fs=function(){ys&&as(zn.process)&&(ys=!1,us.forEach((function(e){try{ss.removeListener(e,ms[e])}catch(t){}})),ss.emit=bs,ss.reallyExit=vs,cs.count-=1)};os.exports.unload=fs;var hs=function(e,t,r){cs.emitted[e]||(cs.emitted[e]=!0,cs.emit(e,t,r))},ms={};us.forEach((function(e){ms[e]=function(){as(zn.process)&&ss.listeners(e).length===cs.count&&(fs(),hs("exit",null,e),hs("afterexit",null,e),ds&&"SIGHUP"===e&&(e="SIGINT"),ss.kill(ss.pid,e))}})),os.exports.signals=function(){return us};var ys=!1,gs=function(){!ys&&as(zn.process)&&(ys=!0,cs.count+=1,us=us.filter((function(e){try{return ss.on(e,ms[e]),!0}catch(t){return!1}})),ss.emit=Es,ss.reallyExit=ws)};os.exports.load=gs;var vs=ss.reallyExit,ws=function(e){as(zn.process)&&(ss.exitCode=e||0,hs("exit",ss.exitCode,null),hs("afterexit",ss.exitCode,null),vs.call(ss,ss.exitCode))},bs=ss.emit,Es=function(e,t){if("exit"===e&&as(zn.process)){void 0!==t&&(ss.exitCode=t);var r=bs.apply(this,arguments);return hs("exit",ss.exitCode,null),hs("afterexit",ss.exitCode,null),r}return bs.apply(this,arguments)}}else os.exports=function(){return function(){}};var _s;const Ss=t(os.exports),Os=(e,t="SIGTERM",r={})=>{const n=e(t);return Is(e,t,r,n),n},Is=(e,t,r,n)=>{if(!Ts(t,r,n))return;const o=Rs(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Ts=(e,{forceKillAfterTimeout:t},r)=>xs(e)&&!1!==t&&r,xs=e=>e===bn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Rs=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Ps=(e,t)=>{e.kill()&&(t.isCanceled=!0)},As=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(En.createWriteStream(r)),e;if(x(r))return e[t].pipe(r),e;if(!(e=>e instanceof An.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!x(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Cs={exports:{}};const{PassThrough:Ns}=$n,{constants:$s}=Pn,Ds=$n,{promisify:Ls}=Rn,ks=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new Ns({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},js=Ls(Ds.pipeline);let Ms=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};Cs.exports=R,Cs.exports.buffer=(e,t)=>R(e,{...t,encoding:"buffer"}),Cs.exports.array=(e,t)=>R(e,{...t,array:!0}),Cs.exports.MaxBufferError=Ms;const Us=t(Cs.exports),{PassThrough:Fs}=$n,Bs=t((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(r.push(o),o.once("end",t.bind(null,o)),o.once("error",n.emit.bind(n,"error")),o.pipe(n,{end:!1}),this)}function t(e){!(r=r.filter((function(t){return t!==e}))).length&&n.readable&&n.end()}var r=[],n=new Fs({objectMode:!0});return n.setMaxListeners(0),n.add=e,n.isEmpty=function(){return 0==r.length},n.on("unpipe",t),[].slice.call(arguments).forEach(e),n})),Gs=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Hs=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},qs=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Us(e,{encoding:t,maxBuffer:n}):Us.buffer(e,{maxBuffer:n})},Vs=(async()=>{})().constructor.prototype,zs=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Vs,e)])),Ws=(e,t)=>{for(const[r,n]of zs){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Xs=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ks=/^[\w.-]+$/,Ys=/"/g,Js=(e,t)=>Xs(e,t).join(" "),Qs=(e,t)=>Xs(e,t).map((e=>(e=>"string"!=typeof e||Ks.test(e)?e:`"${e.replace(Ys,'\\"')}"`)(e))).join(" "),Zs=/ +/g,ea=e=>{const t=[];for(const r of e.trim().split(Zs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},ta=Rn.debuglog("execa").enabled,ra=(e,t)=>(e+"").padStart(t,"0"),na=(e,{verbose:t})=>{t&&Cn.stderr.write(`[${(()=>{const e=new Date;return`${ra(e.getHours(),2)}:${ra(e.getMinutes(),2)}:${ra(e.getSeconds(),2)}.${ra(e.getMilliseconds(),3)}`})()}] ${e}\n`)},oa=(e,t,r={})=>{const n=Mi._parse(e,t,r);return e=n.command,t=n.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=n.options).cwd||Cn.cwd(),execPath:Cn.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:ta,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...Cn.env,...e}:e;return r?Ui({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return rs.map((t=>e[t]));if((e=>rs.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+rs.map((e=>`\`${e}\``)).join(", "));if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);return Array.from({length:Math.max(t.length,rs.length)},((e,r)=>t[r]))})(r),"win32"===Cn.platform&&"cmd"===Sn.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},ia=(e,t,r)=>"string"==typeof t||Pn.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\r":13;return e[e.length-1]===("string"==typeof e?"\n":10)&&(e=e.slice(0,-1)),e[e.length-1]===t&&(e=e.slice(0,-1)),e}(t):t:void 0===r?void 0:"";var sa={},aa={};const ca=Gn.promises,{access:la,appendFile:ua,chmod:da,chown:pa,copyFile:fa,lchmod:ha,lchown:ma,link:ya,lstat:ga,mkdir:va,mkdtemp:wa,open:ba,readdir:Ea,readFile:_a,readlink:Sa,realpath:Oa,rename:Ia,rmdir:Ta,stat:xa,symlink:Ra,truncate:Pa,unlink:Aa,utimes:Ca,writeFile:Na}=Gn.promises,$a="rm"in Gn.promises?Gn.promises.rm:Rn.promisify(Gn.unlink),Da=r(Object.freeze(Object.defineProperty({__proto__:null,access:la,appendFile:ua,chmod:da,chown:pa,copyFile:fa,default:ca,lchmod:ha,lchown:ma,link:ya,lstat:ga,mkdir:va,mkdtemp:wa,open:ba,readFile:_a,readdir:Ea,readlink:Sa,realpath:Oa,rename:Ia,rm:$a,rmdir:Ta,stat:xa,symlink:Ra,truncate:Pa,unlink:Aa,utimes:Ca,writeFile:Na},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(aa,"__esModule",{value:!0}),aa.sync=aa.isexe=void 0;const La=En,ka=Da;aa.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ja(await(0,ka.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},aa.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ja((0,La.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const ja=(e,t)=>e.isFile()&&Ma(e,t),Ma=(e,t)=>{var r,n,o,i,s,a,c,l;const u=null!=(n=t.uid)?n:null==(r=process.getuid)?void 0:r.call(process),d=null!=(s=null!=(i=t.groups)?i:null==(o=process.getgroups)?void 0:o.call(process))?s:[],p=null!=(l=null!=(c=t.gid)?c:null==(a=process.getgid)?void 0:a.call(process))?l:d[0];if(void 0===u||void 0===p)throw Error("cannot get uid or gid");const f=new Set([p,...d]),h=e.mode,m=e.uid,y=e.gid,g=parseInt("100",8),v=parseInt("010",8),w=g|v;return!!(h&parseInt("001",8)||h&v&&f.has(y)||h&g&&m===u||h&w&&0===u)};var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.sync=Ua.isexe=void 0;const Fa=En,Ba=Da;Ua.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ga(await(0,Ba.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Ua.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ga((0,Fa.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Ga=(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 Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),function(e){var t=zn&&zn.__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=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=zn&&zn.__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=zn&&zn.__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(aa);e.posix=i;const s=n(Ua);e.win32=s,o(Ha,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(sa);const{isexe:qa,sync:Va}=sa,{join:za,delimiter:Wa,sep:Xa,posix:Ka}=Sn,Ya="win32"===process.platform,Ja=RegExp(`[${Ka.sep}${Xa===Ka.sep?"":Xa}]`.replace(/(\\)/g,"\\$1")),Qa=RegExp("^\\."+Ja.source),Za=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),ec=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=Wa})=>{const o=e.match(Ja)?[""]:[...Ya?[process.cwd()]:[],...(t||"").split(n)];if(Ya){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:[""]}},tc=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&Qa.test(t)?t.slice(0,2):"")+za(r,t)},rc=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=ec(e,t),i=[];for(const s of r){const r=tc(s,e);for(const e of n){const n=r+e;if(await qa(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 Za(e)};var nc=rc;rc.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=ec(e,t),i=[];for(const s of r){const r=tc(s,e);for(const e of n){const n=r+e;if(Va(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 Za(e)};const oc=t(nc);let ic;var sc,ac={};N(ac,"hasSudo",(()=>$)),N(ac,"isRoot",(()=>D)),N(ac,"isSudo",(()=>L)),N(ac,"prependSudo",(()=>k)),N(ac,"defaultExecOptions",(()=>cc)),N(ac,"execRootSync",(()=>j)),N(ac,"execRoot",(()=>M));let cc={stdio:"inherit",shell:!0};N(sc={},"isAdminWindows",(()=>lc)),N(sc,"isAdminPosix",(()=>uc)),N(sc,"isAdmin",(()=>B));let lc=async function(){var e;if("win32"!==process.platform)return!1;try{return await P("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await P("fltmc"),!0}catch{return!1}}()}},uc=D;N({},"grantUserWriteAccess",(()=>G));var dc,pc,fc,hc,mc,yc,gc,vc,wc,bc,Ec,_c,Sc,Oc,Ic=function(e){return null!=e},Tc=Ic,xc=[].forEach,Rc=Object.create,Pc=function(e){var t=Rc(null);return xc.call(arguments,(function(e){Tc(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Ac="function"==typeof(fc=Math.sign)&&1===fc(10)&&-1===fc(-20)?Math.sign:pc?dc:(pc=1,dc=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Cc=Math.abs,Nc=Math.floor,$c=Math.max,Dc=function(e){return $c(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?Ac(e)*Nc(Cc(e)):e}(e))},Lc=Dc,kc=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Lc(e)},jc=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Mc=Ic,Uc=function(e){if(!Mc(e))throw new TypeError("Cannot use null or undefined");return e},Fc=jc,Bc=Uc,Gc=function(){}.bind,Hc=function(){}.call,qc=Object.keys,Vc={}.propertyIsEnumerable,zc=(hc="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Bc(e)),Fc(t),r=qc(e),o&&r.sort("function"==typeof o?Gc.call(o,e):void 0),"function"!=typeof hc&&(hc=r[hc]),Hc.call(hc,r,(function(r,o){return Vc.call(e,r)?Hc.call(t,n,e[r],r,e,o):undefined}))}),Wc={},Xc={exports:{}},Kc="function"==typeof(Oc=Object.assign)&&(Oc(Sc={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Sc.foo+Sc.bar+Sc.trzy==="razdwatrzy")?Object.assign:function(){if(_c)return Ec;_c=1;var e=bc?wc:(bc=1,wc=(yc?mc:(yc=1,mc=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(vc)return gc;vc=1;var e=Ic,t=Object.keys;return gc=function(r){return t(e(r)?Object(r):r)}}()),t=Uc,r=Math.max;return Ec=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},Ec}(),Yc=Ic,Jc={function:!0,object:!0},Qc=function(e){return Yc(e)&&Jc[typeof e]||!1};!function(e){var t=Kc,r=Qc,n=Ic,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}}(Xc);var Zc,el,tl,rl,nl=Xc.exports,ol={exports:{}},il=Dc;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(Jx){}rl=H(),tl=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); };")}}(),ol.exports=function(e,t){var r;if(t=il(t),e.length===t)return e;r=tl(t)(e);try{rl(r,e)}catch(Jx){}return r};var sl,al,cl=ol.exports,ll={exports:{}},ul=function(e){return null!=e},dl=ul,pl={object:!0,function:!0,undefined:!0},fl=function(e){if(!function(e){return!!dl(e)&&hasOwnProperty.call(pl,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},hl=/^\s*class[\s{/}]/,ml=function(){}.toString,yl="razdwatrzy",gl="function"==typeof yl.contains&&!0===yl.contains("dwa")&&!1===yl.contains("foo")?"".contains:function(){if(al)return sl;al=1;var e="".indexOf;return sl=function(t){return e.call(this,t,arguments[1])>-1}}(),vl=ul,wl=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!fl(e)}(e)&&!hl.test(ml.call(e))},bl=Kc,El=Pc,_l=gl;(ll.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],vl(e)?(r=_l.call(e,"c"),n=_l.call(e,"e"),o=_l.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?bl(El(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],vl(t)?wl(t)?vl(r)?wl(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,vl(e)?(n=_l.call(e,"c"),o=_l.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?bl(El(i),s):s};var Sl=ll.exports,Ol={exports:{}};!function(e,t){var r,n,o,i,s,a,c,l=Sl,u=jc,d=function(){}.apply,p=function(){}.call,f=Object.create,h=Object.defineProperty,m=Object.defineProperties,y={}.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return u(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),d.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(u(t),!y.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},i=function(e){var t,r,n,o,i;if(y.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)d.call(n,this,i)}else switch(arguments.length){case 1:p.call(o,this);break;case 2:p.call(o,this,arguments[1]);break;case 3:p.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];d.call(o,this,i)}},s={on:r=function(e,t){var r;return u(t),y.call(this,"__ee__")?r=this.__ee__:(r=g.value=f(null),h(this,"__ee__",g),g.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},a={on:l(r),once:l(n),off:l(o),emit:l(i)},c=m({},a),e.exports=t=function(e){return null==e?f(c):m(Object(e),a)},t.methods=s}(Ol,Ol.exports);var Il,Tl,xl,Rl,Pl,Al,Cl,Nl,$l,Dl,Ll,kl,jl,Ml,Ul,Fl,Bl,Gl,Hl,ql,Vl,zl,Wl,Xl,Kl,Yl,Jl,Ql,Zl,eu,tu,ru,nu,ou,iu,su=Ol.exports,au=W(),cu=Array.isArray,lu=Ic,uu=jc,du=[].slice;iu=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(du.call(e,this.length))};var pu,fu,hu,mu,yu,gu,vu,wu,bu,Eu,_u,Su,Ou,Iu,Tu,xu,Ru,Pu,Au,Cu,Nu,$u,Du,Lu,ku,ju,Mu,Uu,Fu,Bu,Gu,Hu,qu,Vu,zu,Wu,Xu,Ku,Yu,Ju,Qu,Zu,ed,td,rd,nd,od,id=jc,sd=nl,ad=cl,cd=Sl,ld=su.methods,ud=function(e){return(t=e,e=cu(t)?t:au(t)).forEach((function(e){lu(e)&&uu(e)})),iu.bind(e);var t},dd=function(){}.apply,pd=function(){}.call,fd=Object.create,hd=Object.defineProperties,md=ld.on,yd=ld.emit,gd=jc,vd=zc,wd=Wc,bd=function(e,t,r){var n,o,i,s,a,c,l,u,d,p,f,h,m,y,g,v=fd(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:id(e.get)},void 0!==e.set?(t.set=id(e.set),e.delete&&(t.delete=id(e.delete)),e.clear&&(t.clear=id(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=ud(r.resolvers)),y=i?ad((function(t){var r,o,a=arguments;if(g&&(a=g(a)),null!==(r=i(a))&&hasOwnProperty.call(v,r))return f&&n.emit("get",r,a,this),v[r];if(o=1===a.length?pd.call(e,this,a[0]):dd.call(e,this,a),null===r){if(null!==(r=i(a)))throw sd("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(v,r))throw sd("Circular invocation","CIRCULAR_INVOCATION");return v[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(v,"data"))return f&&n.emit("get","data",arguments,this),v.data;if(t=arguments.length?dd.call(e,this,arguments):pd.call(e,this),hasOwnProperty.call(v,"data"))throw sd("Circular invocation","CIRCULAR_INVOCATION");return v.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(v,o))return f&&n.emit("get",o,i,this),v[o];if(r=1===i.length?pd.call(e,this,i[0]):dd.call(e,this,i),hasOwnProperty.call(v,o))throw sd("Circular invocation","CIRCULAR_INVOCATION");return v[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(v,e)},delete:function(e){var t;hasOwnProperty.call(v,e)&&(a&&a(e),t=v[e],delete v[e],m&&n.emit("delete",e,t))},clear:function(){var e=v;c&&c(),v=fd(null),n.emit("clear",e)},on:function(e,t){return"get"===e?f=!0:"set"===e?h=!0:"delete"===e&&(m=!0),md.call(this,e,t)},emit:yd,updateEnv:function(){e=n.original}},l=i?ad((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=ad((function(){var e,r=arguments;return 0===t?v.data:(g&&(r=g(r)),e=i?i(r):r[0]+"",v[e])})),d=ad((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))})),hd(y,{__memoized__:cd(!0),delete:cd(l),clear:cd(n.clear),_get:cd(u),_has:cd(d)}),n},Ed=kc,_d={},Sd={},Od={exports:{}},Id={},Td={},xd={},Rd={},Pd=Pc,Ad=kc,Cd=function e(t){var r,n,o;if(gd(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=Ed(r.length,t.length,r.async&&wd.async),o=bd(t,n,r),vd(wd,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Nd=function(e){var t,r=Pd(arguments[1]);return r.normalizer||0!==(t=r.length=Ad(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(fu||(fu=1,pu=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),pu):t>1&&(r.normalizer=(mu||(mu=1,hu=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),hu)(t)):r.normalizer=!1===t?function(){if(Iu)return Ou;Iu=1;var e=X(),t=Object.create;return Ou=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)}}},Ou}()():1===t?function(){if(xu)return Tu;xu=1;var e=X();return Tu=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(Pu)return Ru;Pu=1;var e=X(),t=Object.create;return Ru=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)}}},Ru}()(t)),r.async&&function(){if(Du)return _d;Du=1;var e=W(),t=K(),r=H(),n=cl,o=Y(),i=[].slice,s=function(){}.apply,a=Object.create;Wc.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(Jx){}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&&Z(),r.dispose&&function(){if(Ku)return Id;Ku=1;var e=jc,t=zc,r=Wc,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(ed)return Td;ed=1;var e=W(),t=zc,r=Y(),n=Q(),o=function(){if(Zu)return Qu;Zu=1;var e=Dc,t=Ju?Yu:(Ju=1,Yu=2147483647);return Qu=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=Wc,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(+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(nd)return xd;nd=1;var e=Dc,t=function(){if(rd)return td;rd=1;var e=Dc,t=Object.create,r={}.hasOwnProperty;return td=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=Wc;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(od)return Rd;od=1;var e=Sl,t=Wc,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}))})}}(),Cd(e,r)};const $d=t(Nd),Dd=/^~(?=$|\/|\\)/,{appendFile:Ld,readFile:kd,writeFile:jd}=En.promises,Md=te("~/.bashrc"),Ud=$d((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([re(e),ne(t,te("~/.bashrc")),ne(t,te("~/.profile"))])}catch(r){g(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Fd=bn,Bd="win32"!==Fd.platform(),Gd=Fd.release(),Hd=/(\d+\.\d+)\.(\d+)/,qd=t((function(e){return Bd?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...Hd.exec(Gd).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Vd,zd,Wd,Xd,Kd={exports:{}};Wd=function(){if(zd)return Vd;zd=1;var e=/[|\\{}()[\]^$+*?.]/g;return Vd=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Xd=function(e){return e.split("").reverse().join("")},Kd.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Wd(t)+"])(?!"+Wd(r)+")","g"),Xd(Xd(e).replace(n,"$1"+r)))};const Yd=t(Kd.exports),{appendFile:Jd}=En.promises,{appendFile:Qd}=En.promises,Zd=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var ep={exports:{}},tp={exports:{}}.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);!function(e){function t(e){Array.isArray(e)||(e=[e]);for(const t of e)i[t.id]=t}function r(e,t,r){if(n(e),!r||"object"!=typeof r)throw Error("List of variants should be specified as a valid object");return r[i[e].handler(t)]||void 0}function n(r){if(!function(e){return!!i[e]}(r)){if(!o)throw Error(`Locale: ${r} is not registered with numerous. You need to manually register it before use`);!function(r){try{t((0,e.require)(`${__dirname}/../locales/${r}.js`))}catch(n){throw Error("Failed to require locale: "+r)}}(r)}}const o=tp,i={};e.exports={create:function(e){return n(e),{pluralize:(t,n)=>r(e,t,n)}},registerLocale:t,pluralize:r}}(ep);var rp=ep.exports,np={id:"en",handler:function(e){const t=+e,r=Math.floor(Math.abs(e)),n=(""+e).replace(/^[^.]*\.?/,"").length;if(isNaN(t))throw Error("n is not a number");return 1===r&&0===n?"one":"other"}};const op=t(np);var ip={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{ce(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var n={};e.exports={create:function(e){return r(e),{pluralize:function(r,n){return t(e,r,n)}}},addLocale:function(e,t){n[e]=t},pluralize:t}}()}(ip);const sp=ip.exports,ap=tp,cp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],lp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},up={};var dp={create:function(e){return e=Object.assign({},lp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!up[e]){if(!ap||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{le(ce(`../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 cp.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(ue(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:le,defaultConfig:lp};const pp=t({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 fp={exports:{}},hp={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},mp="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}=hp,i=mp,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*$")}(fp,fp.exports);var yp=fp.exports;const gp=Object.freeze({loose:!0}),vp=Object.freeze({});var wp=e=>e?"object"!=typeof e?gp:e:vp;const bp=/^[0-9]+$/,Ep=(e,t)=>{const r=bp.test(e),n=bp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var _p={compareIdentifiers:Ep,rcompareIdentifiers:(e,t)=>Ep(t,e)};const Sp=mp,{MAX_LENGTH:Op,MAX_SAFE_INTEGER:Ip}=hp,{safeRe:Tp,t:xp}=yp,Rp=wp,{compareIdentifiers:Pp}=_p;var Ap=class e{constructor(t,r){if(r=Rp(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>Op)throw new TypeError(`version is longer than ${Op} characters`);Sp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Tp[xp.LOOSE]:Tp[xp.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>Ip||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Ip||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Ip||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&&Ip>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(Sp("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)),Pp(this.major,t.major)||Pp(this.minor,t.minor)||Pp(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(Sp("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 Pp(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(Sp("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 Pp(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=+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===Pp(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 Cp=Ap;var Np=(e,t,r=!1)=>{if(e instanceof Cp)return e;try{return new Cp(e,t)}catch(n){if(!r)return null;throw n}};const $p=Np;var Dp=(e,t)=>{const r=$p(e,t);return r?r.version:null};const Lp=t(Dp),kp=Np;const jp=Ap;const Mp=Np;const Up=Ap;var Fp=(e,t)=>new Up(e,t).major;const Bp=t(Fp),Gp=Ap;const Hp=Ap;const qp=Np;const Vp=Ap;var zp=(e,t,r)=>new Vp(e,r).compare(new Vp(t,r));const Wp=t(zp),Xp=zp;const Kp=zp;const Yp=Ap;var Jp=(e,t,r)=>{const n=new Yp(e,r),o=new Yp(t,r);return n.compare(o)||n.compareBuild(o)};const Qp=Jp;const Zp=Jp;const ef=zp;var tf=(e,t,r)=>ef(e,t,r)>0;const rf=zp;var nf=(e,t,r)=>0>rf(e,t,r);const of=zp;var sf=(e,t,r)=>0===of(e,t,r);const af=zp;var cf=(e,t,r)=>0!==af(e,t,r);const lf=zp;var uf=(e,t,r)=>lf(e,t,r)>=0;const df=zp;var pf=(e,t,r)=>0>=df(e,t,r);const ff=t(pf),hf=sf,mf=cf,yf=tf,gf=uf,vf=nf,wf=pf;var bf=(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 hf(e,r,n);case"!=":return mf(e,r,n);case">":return yf(e,r,n);case">=":return gf(e,r,n);case"<":return vf(e,r,n);case"<=":return wf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const Ef=Ap,_f=Np,{safeRe:Sf,t:Of}=yp;var If=(e,t)=>{if(e instanceof Ef)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?Sf[Of.COERCERTLFULL]:Sf[Of.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?Sf[Of.COERCEFULL]:Sf[Of.COERCE]);return null===r?null:_f(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const Tf=t(If);var xf,Rf,Pf,Af,Cf=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 Nf=de();var $f=(e,t,r)=>{try{t=new Nf(t,r)}catch(n){return!1}return t.test(e)};const Df=de();const Lf=Ap,kf=de();const jf=Ap,Mf=de();const Uf=Ap,Ff=de(),Bf=tf;const Gf=de();const Hf=Ap,qf=pe(),{ANY:Vf}=qf,zf=de(),Wf=$f,Xf=tf,Kf=nf,Yf=pf,Jf=uf;var Qf=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Hf(e,n),t=new zf(t,n),r){case">":o=Xf,i=Yf,s=Kf,a=">",c=">=";break;case"<":o=Kf,i=Jf,s=Xf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Wf(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===Vf&&(e=new qf(">=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 Zf=Qf;const eh=Qf;const th=de();const rh=$f,nh=zp,oh=de(),ih=pe(),{ANY:sh}=ih,ah=$f,ch=zp,lh=[new ih(">=0.0.0-0")],uh=[new ih(">=0.0.0")],dh=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===sh){if(1===t.length&&t[0].semver===sh)return!0;e=r.includePrerelease?lh:uh}if(1===t.length&&t[0].semver===sh){if(r.includePrerelease)return!0;t=uh}const n=new Set;let o,i,s,a,c,l,u;for(const f of e)">"===f.operator||">="===f.operator?o=ph(o,f,r):"<"===f.operator||"<="===f.operator?i=fh(i,f,r):n.add(f.semver);if(n.size>1)return null;if(o&&i){if(s=ch(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&&!ah(f,o+"",r))return null;if(i&&!ah(f,i+"",r))return null;for(const e of t)if(!ah(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=ph(o,f,r),a===f&&a!==o)return!1}else if(">="===o.operator&&!ah(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=fh(i,f,r),c===f&&c!==i)return!1}else if("<="===i.operator&&!ah(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)},ph=(e,t,r)=>{if(!e)return t;const n=ch(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},fh=(e,t,r)=>{if(!e)return t;const n=ch(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const hh=yp,mh=hp,yh=Ap,gh=_p;var vh={parse:Np,valid:Dp,clean:(e,t)=>{const r=kp(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 jp(e instanceof jp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=Mp(e,null,!0),n=Mp(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:Fp,minor:(e,t)=>new Gp(e,t).minor,patch:(e,t)=>new Hp(e,t).patch,prerelease:(e,t)=>{const r=qp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:zp,rcompare:(e,t,r)=>Xp(t,e,r),compareLoose:(e,t)=>Kp(e,t,!0),compareBuild:Jp,sort:(e,t)=>e.sort(((e,r)=>Qp(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>Zp(r,e,t))),gt:tf,lt:nf,eq:sf,neq:cf,gte:uf,lte:pf,cmp:bf,coerce:If,Comparator:pe(),Range:de(),satisfies:$f,toComparators:(e,t)=>new Df(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 kf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Lf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Mf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new jf(n,r)))})),n},minVersion:(e,t)=>{e=new Ff(e,t);let r=new Uf("0.0.0");if(e.test(r))return r;if(r=new Uf("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 Uf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!Bf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!Bf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Gf(e,t).range||"*"}catch(r){return null}},outside:Qf,gtr:(e,t,r)=>Zf(e,t,">",r),ltr:(e,t,r)=>eh(e,t,"<",r),intersects:(e,t,r)=>(e=new th(e,r),t=new th(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>nh(e,t,r)));for(const l of s)rh(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 oh(e,r),t=new oh(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=dh(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:yh,re:hh.re,src:hh.src,tokens:hh.t,SEMVER_SPEC_VERSION:mh.SEMVER_SPEC_VERSION,RELEASE_TYPES:mh.RELEASE_TYPES,compareIdentifiers:gh.compareIdentifiers,rcompareIdentifiers:gh.rcompareIdentifiers},wh=vh,bh=bn,Eh=Sn,_h=En,Sh=In,Oh=Cn.env.npm_package_json,Ih=Cn.env.npm_config_user_agent,Th=!(!Ih||!Ih.startsWith("npm")),xh=!(!Oh||!Oh.endsWith("package.json")),Rh=Th||xh,Ph=!(!Ih||!Ih.startsWith("yarn")),Ah=Rh||Ph,Ch=bh.homedir(),Nh=process.env.XDG_CONFIG_HOME||Eh.join(Ch,".config","simple-update-notifier"),$h=function(e){return Eh.join(Nh,"".concat(e.replace("@","").replace("/","__"),".json"))},Dh=function(e,t){return fe(void 0,0,void 0,(function(){var r;return he(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){Sh.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)}))}))]}))}))},Lh=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 fe(void 0,0,void 0,(function(){var r,o;return he(this,(function(c){switch(c.label){case 0:return _h.existsSync(Nh)||_h.mkdirSync(Nh,{recursive:!0}),r=function(t){var r=$h(t);try{if(!_h.existsSync(r))return;return JSON.parse(_h.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,Dh(t.name,i)]:[3,2];case 1:return o=c.sent(),l=$h(t.name),_h.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),wh.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 kh=t((function(e){return fe(void 0,0,void 0,(function(){var t,r;return he(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||Ah&&!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,Lh(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]}}))}))})),jh={name:"setup-cpp",version:"0.43.0"};var Mh={};!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(En),s=Dn,a=t(Sn),c=t(On),l=t(In),u=xn,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)}(Mh);const{appendFile:Uh}=En.promises,Fh="Dpkg::Lock::Timeout=300";let Bh=!1;const Gh=$d((function(e=be()){j(e,"nala"!==e?["update","-y","-o",Fh]:["update","-o",Fh],{...cc,env:ve(e)}),Bh=!0}));var Hh,qh;(qh=Hh||(Hh={}))[qh.NameDashVersion=0]="NameDashVersion",qh[qh.NameEqualsVersion=1]="NameEqualsVersion",qh[qh.Name=2]="Name",qh[qh.None=3]="None";const Vh=$d((async function(e){Gh(e);const t=await Se([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&j(e,["install","-y","--fix-broken","-o",Fh,...t],{...cc,env:ve(e)})}),{promise:!0}),zh=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Wh="/etc/apt/trusted.gpg.d",Xh="keyserver.ubuntu.com";let Kh,Yh,Jh,Qh,Zh=!1;const em=(e,t)=>{const r=tm(e);if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},tm=e=>e instanceof URL?Dn.fileURLToPath(e):e,rm=(e,t=[],r={})=>{const n=em(e,"First argument"),[o,i]=je(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(!je(i))throw new TypeError("Last argument must be an options object: "+i);return[n,s,i]},{toString:nm}=Object.prototype,om=e=>"[object Uint8Array]"===nm.call(e),im=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sm=new TextEncoder,am=e=>sm.encode(e),cm=new TextDecoder,lm=e=>cm.decode(e),um=e=>1===e.length&&om(e[0])?e[0]:pm(dm(e)),dm=e=>e.map((e=>"string"==typeof e?am(e):e)),pm=e=>{const t=new Uint8Array(fm(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},fm=e=>{let t=0;for(const r of e)t+=r.length;return t},hm=({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}=mm(o,e.raw[n]),c=vm(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map((e=>wm(e))):[wm(l)];return vm(c,u,a)},mm=(e,t)=>{var r;if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const n=[];let o=0;const i=ym.has(t[0]);for(let a=0,c=0;e.length>a;a+=1,c+=1){const i=t[c];if(ym.has(i))o!==a&&n.push(e.slice(o,a)),o=a+1;else if("\\"===i){const e=t[c+1];"u"===e&&"{"===t[c+2]?c=t.indexOf("}",c+3):c+=null!=(r=gm[e])?r:1}}const s=o===e.length;return s||n.push(e.slice(o)),{nextTokens:n,leadingWhitespaces:i,trailingWhitespaces:s}},ym=new Set([" ","\t","\r","\n"]),gm={x:3,u:5},vm=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wm=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return e+"";if(je(e)&&("stdout"in e||"isMaxBuffer"in e))return bm(e);if(e instanceof An.ChildProcess||"[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`)},bm=({stdout:e})=>{if("string"==typeof e)return e;if(om(e))return lm(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`)},Em=e=>_m.includes(e),_m=[Cn.stdin,Cn.stdout,Cn.stderr],Sm=["stdin","stdout","stderr"],Om=e=>{var t;return null!=(t=Sm[e])?t:`stdio[${e}]`},Im=(e,t)=>{const r=Array.from({length:Tm(e)+1}),n=xm(e[t],r,t);return Dm(n,t)},Tm=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Sm.length):Sm.length,xm=(e,t,r)=>je(e)?Rm(e,t,r):t.fill(e),Rm=(e,t,r)=>{for(const n of Object.keys(e).sort(Pm))for(const o of Cm(n,r,t))t[o]=e[n];return t},Pm=(e,t)=>Am(e)<Am(t)?1:-1,Am=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Cm=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Nm(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]},Nm=e=>{if("all"===e)return e;if(Sm.includes(e))return Sm.indexOf(e);const t=$m.exec(e);return null!==t?+t[1]:void 0},$m=/^fd(\d+)$/,Dm=(e,t)=>e.map((e=>void 0===e?Lm[t]:e)),Lm={lines:!1,buffer:!0,maxBuffer:1e8,verbose:Rn.debuglog("execa").enabled?"full":"none",stripFinalNewline:!0},km=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],jm=(e,t)=>"ipc"===t?e.at(-1):e[t],Mm=({verbose:e},t)=>"none"!==Fm(e,t),Um=({verbose:e},t)=>!["none","short"].includes(Fm(e,t)),Fm=(e,t)=>void 0===t?Bm(e):jm(e,t),Bm=e=>{var t;return null!=(t=e.find((e=>Gm(e))))?t:Hm.findLast((t=>e.includes(t)))},Gm=e=>"function"==typeof e,Hm=["none","short","full"],qm=e=>Rn.stripVTControlCharacters(e).split("\n").map((e=>Vm(e))).join("\n"),Vm=e=>e.replaceAll(Wm,(e=>zm(e))),zm=e=>{const t=Xm[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r>Km?"\\U"+n:"\\u"+n.padStart(4,"0")},Wm=(()=>{try{return RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xm={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Km=65535,Ym=/^[\w./-]+$/,Jm={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:""},Qm={...Jm,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:"⅒"},Zm={...Jm,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"},ey=function(){const{env:e}=Cn,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==Cn.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}()?Qm:Zm,ty=null!=(Gr=null==(Br=null==(Fr=null==(Ur=null==kn?void 0:kn.WriteStream)?void 0:Ur.prototype)?void 0:Fr.hasColors)?void 0:Br.call(Fr))&&Gr,ry=(e,t)=>{if(!ty)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}},ny=ry(1,22),oy=ry(90,39),iy=ry(91,39),sy=ry(93,39),ay=(e,t)=>(e+"").padStart(t,"0"),cy=({failed:e,reject:t})=>e?t?ey.cross:ey.warning:ey.tick,ly={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:cy,duration:cy},uy=e=>e,dy={command:()=>ny,output:()=>uy,ipc:()=>uy,error:({reject:e})=>e?iy:sy,duration:()=>oy},py=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},fy=e=>e.endsWith("\n")?e:e+"\n",hy=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=my({type:e,result:o,verboseInfo:n}),s=((e,t,r)=>{const n=(({verbose:e},t)=>{const r=Fm(e,t);return Gm(r)?r:void 0})(t,r);return e.map((({verboseLine:e,verboseObject:t})=>py(e,t,n))).filter((e=>void 0!==e)).map((e=>fy(e))).join("")})(yy(t,i),n,r);En.writeFileSync(vy,s)},my=({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}),yy=(e,t)=>e.split("\n").map((e=>gy({...t,message:e}))),gy=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=(e=>`${ay(e.getHours(),2)}:${ay(e.getMinutes(),2)}:${ay(e.getSeconds(),2)}.${ay(e.getMilliseconds(),3)}`)(r),c=ly[e]({failed:i,reject:s,piped:n}),l=dy[e]({reject:s});return`${oy(`[${a}]`)} ${oy(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),vy=2,wy=e=>{const t="string"==typeof e?e:Rn.inspect(e);return qm(t).replaceAll("\t"," ".repeat(by))},by=2,Ey=e=>Mm({verbose:e})?_y++:void 0;let _y=0n;const Sy=()=>Cn.hrtime.bigint(),Oy=e=>+(Cn.hrtime.bigint()-e)/1e6,Iy=(e,t,r)=>{const n=Sy(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map((e=>{return t=Vm(e),Ym.test(t)?t:"win32"===Cn.platform?`"${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(!Hm.includes(t)&&!Gm(t)){const e=Hm.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:Ey(e),rawOptions:r}))(Im(r,"verbose"),i,{...r});return((e,t)=>{Mm(t)&&hy({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};Rn.promisify(An.execFile);const Ty=({env:e=Cn.env,...t}={})=>{const r=I({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Cn.cwd(),path:t=Cn.env[I()],preferLocal:r=!0,execPath:n=Cn.execPath,addExecPath:o=!0}={})=>{const i=Sn.resolve(Me(e)),s=[],a=t.split(Sn.delimiter);return r&&((e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=Sn.resolve(Me(e));for(;t!==r;)yield r,t=r,r=Sn.resolve(r,"..")}}}(r)){const r=Sn.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}})(s,a,i),o&&((e,t,r,n)=>{const o=Sn.resolve(n,Me(r),"..");t.includes(o)||e.push(o)})(s,a,n,i),""===t||t===Sn.delimiter?`${s.join(Sn.delimiter)}${t}`:[...s,t].join(Sn.delimiter)})(t),e};class xy extends Error{}const Ry=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Py,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Py=Symbol(),Ay=e=>"[object Error]"==={}.toString.call(e);class Cy extends Error{}Ry(Cy,Cy.name);class Ny extends Error{}Ry(Ny,Ny.name);const $y=(e,t)=>({name:"SIGRT"+(t+1),number:Dy+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Dy=34,Ly=[{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"}],ky=()=>{const e=Array.from({length:64-Dy+1},$y);return[...Ly,...e].map(jy)},jy=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=bn.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},My=({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}],Uy=(()=>{const e=ky();return Object.fromEntries(e.map(My))})(),Fy=(e,t)=>{const r=t.find((({name:t})=>bn.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=ky(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Fy(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 By=e=>0===e?e:Gy(e,"`subprocess.kill()`'s argument"),Gy=(e,t)=>{if(Number.isInteger(e))return Hy(e,t);if("string"==typeof e)return Vy(e,t);throw new TypeError(`Invalid ${t} ${e+""}: it must be a string or an integer.\n${zy()}`)},Hy=(e,t)=>{if(qy.has(e))return qy.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${zy()}`)},qy=new Map(Object.entries(bn.constants.signals).reverse().map((([e,t])=>[t,e]))),Vy=(e,t)=>{if(e in bn.constants.signals)return e;if(e.toUpperCase()in bn.constants.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${zy()}`)},zy=()=>`Available signal names: ${Wy()}.\nAvailable signal numbers: ${Xy()}.`,Wy=()=>Object.keys(bn.constants.signals).sort().map((e=>`'${e}'`)).join(", "),Xy=()=>[...new Set(Object.values(bn.constants.signals).sort(((e,t)=>e-t)))].join(", "),Ky=e=>Uy[e].description,Yy=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=Jy(s,a,r);Qy(l,n);const u=e(c);return Zy({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},Jy=(e,t,r)=>{const[n=r,o]=Ay(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&&!Ay(o))throw new TypeError("The second argument is optional. If specified, it must be an error instance: "+o);return{signal:By(n),error:o}},Qy=(e,t)=>{void 0!==e&&t.reject(e)},Zy=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&eg({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},eg=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await jn.setTimeout(t,void 0,{signal:n}),e("SIGKILL")&&(null!=r.isForcefullyTerminated||(r.isForcefullyTerminated=!0))}catch{}},tg=async(e,t)=>{e.aborted||await xn.once(e,"abort",{signal:t})},rg=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[ng(e,t,n,o)],ng=async(e,t,r,{signal:n})=>{throw await tg(t,n),null!=r.terminationReason||(r.terminationReason="cancel"),e.kill(),t.reason},og=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{ig(e,t,r),sg(e,t,n)},ig=(e,t,r)=>{if(!r)throw Error(ug(e,t)+" can only be used if the `ipc` option is `true`.")},sg=(e,t,r)=>{if(!r)throw Error(`${ug(e,t)} cannot be used: the ${pg(t)} has already exited or disconnected.`)},ag=(e,t)=>Error(`${ug("sendMessage",t)} failed when sending an acknowledgment response to the ${pg(t)}.`,{cause:e}),cg=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),lg=["could not be cloned","circular structure","call stack size exceeded"],ug=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${dg(t)}${e}(${r})`,dg=e=>e?"":"subprocess.",pg=e=>e?"parent process":"subprocess",fg=e=>{e.connected&&e.disconnect()},hg=()=>{const e={},t=new Promise(((t,r)=>{Object.assign(e,{resolve:t,reject:r})}));return Object.assign(t,e)},mg=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=gg.get(e),i=vg(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Eg(i,t,n,r));return s},yg=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=gg.get(e),i=vg(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Eg(i,t,n,r));return s},gg=new WeakMap,vg=(e,t,r)=>{const n=wg(t,r);return bg(n,t,r,e),n},wg=(e,t)=>{const r=Nm(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(`"${Og(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},bg=(e,t,r,n)=>{const o=n[Sg(e)];if(void 0===o)throw new TypeError(`"${Og(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(`"${Og(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${Og(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Eg=(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}=_g(e,r);return`The "${o}: ${Ig(i)}" option is incompatible with using "${Og(n)}: ${Ig(t)}".\nPlease set this option with "pipe" instead.`},_g=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=Sg(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]}},Sg=e=>"all"===e?1:e,Og=e=>e?"to":"from",Ig=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?""+e:"Stream",Tg=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==1/0&&(e.setMaxListeners(n+t),xn.addAbortListener(r,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},xg=(e,t)=>{t&&Rg(e)},Rg=e=>{e.refCounted()},Pg=(e,t)=>{t&&Ag(e)},Ag=e=>{e.unrefCounted()},Cg=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(Bg(o)||iv(o))return;$g.has(e)||$g.set(e,[]);const i=$g.get(e);if(i.push(o),1>=i.length)for(;i.length>0;){await Wg(e,n,o),await jn.scheduler.yield();const s=await Fg({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Ng=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{av();const i=$g.get(e);for(;(null==i?void 0:i.length)>0;)await xn.once(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Rg(e),Rg(e))})(t,r),n.connected=!1,n.emit("disconnect")},$g=new WeakMap,Dg=(e,t,r)=>{if(Lg.has(e))return Lg.get(e);const n=new xn.EventEmitter;return n.connected=!0,Lg.set(e,n),kg({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Lg=new WeakMap,kg=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Cg.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Ng.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Ag(e),Ag(e))})(r,n)},jg=e=>{const t=Lg.get(e);return void 0===t?null!==e.channel:t.connected};let Mg=0n;const Ug=(e,t)=>{if((null==t?void 0:t.type)===Vg&&!t.hasListeners)for(const{id:r}of e)void 0!==r&&Hg[r].resolve({isDeadlock:!0,hasListeners:!1})},Fg=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if((null==e?void 0:e.type)!==Vg||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:zg,message:Kg(t,o)};try{await Jg({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){o.emit("strict:error",c)}return s},Bg=e=>{var t;if((null==e?void 0:e.type)!==zg)return!1;const{id:r,message:n}=e;return null==(t=Hg[r])||t.resolve({isDeadlock:!1,hasListeners:n}),!0},Gg=async(e,t,r)=>{if((null==e?void 0:e.type)!==Vg)return;const n=hg();Hg[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,qg(t,r,o)]);e&&(e=>{throw Error(`${ug("sendMessage",e)} failed: the ${pg(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${ug("getOneMessage",e)},\n\t${ug("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw Error(`${ug("sendMessage",e)} failed: the ${pg(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete Hg[e.id]}},Hg={},qg=async(e,t,{signal:r})=>{Tg(e,1,r),await xn.once(e,"disconnect",{signal:r}),(e=>{throw Error(`${ug("sendMessage",e)} failed: the ${pg(e)} exited without listening to incoming messages.`)})(t)},Vg="execa:ipc:request",zg="execa:ipc:response",Wg=async(e,t,r)=>{for(var n;!Kg(e,t)&&(null==(n=Xg.get(e))?void 0:n.size)>0;){const t=[...Xg.get(e)];Ug(t,r),await Promise.all(t.map((({onMessageSent:e})=>e)))}},Xg=new WeakMap,Kg=(e,t)=>t.listenerCount("message")>Yg(e),Yg=e=>gg.has(e)&&!jm(gg.get(e).options.buffer,"ipc")?1:0,Jg=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return og({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),Qg({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},Qg=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=Dg(e,t,r),s=Kg(e,i);return{id:Mg++,type:Vg,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{Xg.has(e)||Xg.set(e,new Set);const n=Xg.get(e),o={onMessageSent:hg(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await Zg({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(c){throw fg(e),c}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},Zg=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=ev(e);try{await Promise.all([Gg(n,e,r),i(n)])}catch(s){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw Error(`${ug(t,r)} cannot be used: the ${pg(r)} is disconnecting.`,{cause:e})})({error:s,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if((({code:e,message:t})=>cg.has(e)||lg.some((e=>t.includes(e))))(e))throw Error(`${ug(t,r)}'s argument type is invalid: the message cannot be serialized: ${n+""}.`,{cause:e})})({error:s,methodName:t,isSubprocess:r,message:o}),s}},ev=e=>{if(tv.has(e))return tv.get(e);const t=Rn.promisify(e.send.bind(e));return tv.set(e,t),t},tv=new WeakMap,rv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await nv({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),cv.signal),nv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{ov||(ov=!0,n?null!==t?(Dg(e,t,r),await jn.scheduler.yield()):av():(()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let ov=!1;const iv=e=>(null==e?void 0:e.type)===sv&&(cv.abort(e.message),!0),sv="execa:ipc:cancel",av=()=>{cv.abort(Error(`\`cancelSignal\` aborted: the ${pg(!0)} disconnected.`))},cv=new AbortController,lv=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[uv({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],uv=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await tg(t,o);const i=dv(t);throw await((e,t)=>{const r="cancelSignal";return sg(r,!1,e.connected),Zg({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:sv,message:t},message:t})})(e,i),eg({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),null!=n.terminationReason||(n.terminationReason="gracefulCancel"),t.reason},dv=({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},pv=(e,t,r,n)=>0===t||void 0===t?[]:[fv(e,t,r,n)],fv=async(e,t,r,{signal:n})=>{throw await jn.setTimeout(t,void 0,{signal:n}),null!=r.terminationReason||(r.terminationReason="timeout"),e.kill(),new xy},hv={advanced:e=>{try{Mn.serialize(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})}}},mv=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},yv=new Set(["utf8","utf16le"]),gv=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),vv=new Set([...yv,...gv]),wv={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},bv=e=>"string"==typeof e?`"${e}"`:e+"",Ev=()=>{try{return Cn.cwd()}catch(e){throw e.message="The current directory does not exist.\n"+e.message,e}},_v=(e,t,r)=>{r.cwd=((e=Ev())=>{const t=em(e,'The "cwd" option');return Sn.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=Cn.execPath,nodeOptions:o=Cn.execArgv.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=em(n,'The "nodePath" option'),l=Sn.resolve(i,c),u={...a,nodePath:l,node:r,cwd:i};if(!r)return[e,t,u];if("node"===Sn.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}=Mi._parse(n,o,i),l=(e=>{const t={...e};for(const r of km)t[r]=Im(e,r);return t})(c),u=Sv(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(vv.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in wv?wv[t]:vv.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${bv(e)}\`.\nPlease rename it to ${bv(t)}.`);const r=[...vv].map((e=>bv(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${bv(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`.");hv[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=tm(u.shell),u.env=Ov(u),u.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Gy(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&&!gv.has(u.encoding)&&u.buffer[t])),"win32"===Cn.platform&&"cmd"===Sn.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:u}},Sv=({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}),Ov=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...Cn.env,...e}:e;return r||n?Ty({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Iv=e=>e.at(-1)===xv?e.slice(0,e.at(-2)===Pv?-2:-1):e,Tv=e=>e.at(-1)===Rv?e.subarray(0,e.at(-2)===Av?-2:-1):e,xv="\n",Rv=xv.codePointAt(0),Pv="\r",Av=Pv.codePointAt(0);"promises"in Vn&&"pipeline"in Vn.promises||Rn.promisify(Vn.pipeline);const Cv="promises"in Vn&&"finished"in Vn.promises?Vn.promises.finished:Rn.promisify(Vn.finished),Nv=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);let $v=(Yr=class{constructor(e,t){gn(this,Wr),gn(this,Hr),gn(this,qr),gn(this,Vr,!1),gn(this,zr),vn(this,Hr,e),vn(this,qr,t)}next(){const e=()=>wn(this,Wr,Xr).call(this);return vn(this,zr,yn(this,zr)?yn(this,zr).then(e,e):e()),yn(this,zr)}return(e){const t=()=>wn(this,Wr,Kr).call(this,e);return yn(this,zr)?yn(this,zr).then(t,t):t()}},Hr=new WeakMap,qr=new WeakMap,Vr=new WeakMap,zr=new WeakMap,Wr=new WeakSet,Xr=async function(){if(yn(this,Vr))return{done:!0,value:void 0};let e;try{e=await yn(this,Hr).read()}catch(t){throw vn(this,zr,void 0),vn(this,Vr,!0),yn(this,Hr).releaseLock(),t}return e.done&&(vn(this,zr,void 0),vn(this,Vr,!0),yn(this,Hr).releaseLock()),e},Kr=async function(e){if(yn(this,Vr))return{done:!0,value:e};if(vn(this,Vr,!0),!yn(this,qr)){const t=yn(this,Hr).cancel(e);return yn(this,Hr).releaseLock(),await t,{done:!0,value:e}}return yn(this,Hr).releaseLock(),{done:!0,value:e}},Yr);const Dv=Symbol();Object.defineProperty(qe,"name",{value:"next"}),Object.defineProperty(Ve,"name",{value:"return"});const Lv=Object.create(Nv,{next:{enumerable:!0,configurable:!0,writable:!0,value:qe},return:{enumerable:!0,configurable:!0,writable:!0,value:Ve}}),kv=e=>{if(Ge(e,{checkOpen:!1})&&void 0!==Fv.on)return Mv(e);if("function"==typeof(null==e?void 0:e[Symbol.asyncIterator]))return e;if("[object ReadableStream]"===jv.call(e))return ze.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:jv}=Object.prototype,Mv=async function*(e){const t=new AbortController,r={};Uv(e,t,r);try{for await(const[r]of Fv.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()}},Uv=async(e,t,r)=>{try{await Fv.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(n){r.error=n}finally{t.abort()}},Fv={},Bv=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=1/0}={})=>{const l=kv(e),u=t();u.length=0;try{for await(const e of l){const t=r[Vv(e)](e,u);Hv({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return Gv({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}},Gv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&Hv({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},Hv=({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 qv(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&qv(c,t,o,i),new Wv},qv=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Vv=e=>{var t;const r=typeof e;if("string"===r)return"string";if("object"!==r||null===e)return"others";if(null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))return"buffer";const n=zv.call(e);return"[object ArrayBuffer]"===n?"arrayBuffer":"[object DataView]"===n?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===zv.call(e.buffer)?"typedArray":"others"},{toString:zv}=Object.prototype;class Wv extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Xv=e=>e,Kv=()=>{},Yv=({contents:e})=>e,Jv=e=>{throw Error("Streams in object mode are not supported: "+e)},Qv=e=>e.length,Zv={init:()=>({contents:[]}),convertChunk:{string:Xv,buffer:Xv,arrayBuffer:Xv,dataView:Xv,typedArray:Xv,others:Xv},getSize:()=>1,truncateChunk:Kv,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:Kv,finalize:Yv},ew=new TextEncoder,tw=e=>new Uint8Array(e),rw=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),nw=e=>ow**Math.ceil(Math.log(e)/Math.log(ow)),ow=2,iw=()=>"resize"in ArrayBuffer.prototype,sw={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>ew.encode(e),buffer:tw,arrayBuffer:tw,dataView:rw,typedArray:rw,others:Jv},getSize:Qv,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=iw()?((e,t)=>{if(e.maxByteLength>=t)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:nw(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(nw(t));return new Uint8Array(r).set(new Uint8Array(e),0),r})(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:Kv,finalize:({contents:e,length:t})=>iw()?e:e.slice(0,t)},aw=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),cw={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Xv,buffer:aw,arrayBuffer:aw,dataView:aw,typedArray:aw,others:Jv},getSize:Qv,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:Yv},lw=(e,t,r)=>{if(t.length!==r)return;const n=new Wv;throw n.maxBufferInfo={fdNumber:"ipc"},n},uw=([,e])=>e,dw=({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=pw(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===(null==e?void 0:e.maxBufferInfo))return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=jm(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Om(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} (${Ky(f)})${h}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?"Command failed with exit code "+c:"Command failed"},pw=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",fw=e=>"string"==typeof e?e:om(e)?lm(e):"",hw=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>vw({command:e,escapedCommand:t,cwd:i,durationMs:Oy(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:[]}),mw=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>yw({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}),yw=({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:v,maxBuffer:w},isSync:b})=>{const{exitCode:E,signal:_,signalDescription:S}=ww(l,u),{originalMessage:O,shortMessage:I,message:T}=(({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 v=dw({originalError:n,timedOut:c,timeout:y,isMaxBuffer:d,maxBuffer:m,errorCode:null==n?void 0:n.code,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:h}),w=((e,t)=>{var r;if(e instanceof xy)return;const n=Ay(o=e)&&Py in o?e.originalMessage:(null!=(r=null==e?void 0:e.message)?r:e)+"";var o;const i=qm(((e,t)=>{if(t===Ev())return e;let r;try{r=En.statSync(t)}catch(o){return`The "cwd" option is invalid: ${t}.\n${o.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(n,t));return""===i?void 0:i})(n,g),b=`${v}: ${a}${void 0===w?"":"\n"+w}`,E=[b,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map((e=>(e=>"string"==typeof e?e:Rn.inspect(e))(e))).join("\n")].map((e=>qm(Ue((e=>Array.isArray(e)?e.map((e=>Ue(fw(e)))).filter(Boolean).join("\n"):fw(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:b,message:E}})({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:w,timeout:m,cwd:v}),x=((e,t,r)=>new(r?Ny:Cy)(t,e instanceof xy?{}:{cause:e}))(e,T,b);return Object.assign(x,gw({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:v,originalMessage:O,shortMessage:I})),x},gw=({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})=>{var v;return vw({shortMessage:g,originalMessage:y,command:t,escapedCommand:r,cwd:m,durationMs:Oy(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:null==(v=e.cause)?void 0:v.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:h,pipedFrom:[]})},vw=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),ww=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:Ky(t)}},bw=e=>Number.isFinite(e)?e:0,Ew=(e,t)=>{const r=`(done in ${We(e.durationMs)})`;hy({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},_w=(e,t,{reject:r})=>{if(((e,t)=>{Mm(t)&&(((e,t)=>{e.failed&&hy({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),Ew(e,t))})(e,t),e.failed&&r)throw e;return e},Sw=(e,t)=>Nw(e)?"asyncGenerator":$w(e)?"generator":Lw(e)?"fileUrl":kw(e)?"filePath":Bw(e)?"webStream":Fe(e,{checkOpen:!1})?"native":om(e)?"uint8Array":Hw(e)?"asyncIterable":qw(e)?"iterable":Gw(e)?Tw({transform:e},t):Dw(e)?Ow(e,t):"native",Ow=(e,t)=>He(e.transform,{checkOpen:!1})?Iw(e,t):Gw(e.transform)?Tw(e,t):Pw(e,t),Iw=(e,t)=>(xw(e,t,"Duplex stream"),"duplex"),Tw=(e,t)=>(xw(e,t,"web TransformStream"),"webTransform"),xw=({final:e,binary:t,objectMode:r},n,o)=>{Rw(e,n+".final",o),Rw(t,n+".binary",o),Aw(r,n+".objectMode")},Rw=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},Pw=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!Cw(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(He(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Gw(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!Cw(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return Aw(r,o+".binary"),Aw(n,o+".objectMode"),Nw(e)||Nw(t)?"asyncGenerator":"generator"},Aw=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},Cw=e=>Nw(e)||$w(e),Nw=e=>"[object AsyncGeneratorFunction]"==={}.toString.call(e),$w=e=>"[object GeneratorFunction]"==={}.toString.call(e),Dw=e=>je(e)&&(void 0!==e.transform||void 0!==e.final),Lw=e=>"[object URL]"==={}.toString.call(e),kw=e=>je(e)&&1===Object.keys(e).length&&jw(e.file),jw=e=>"string"==typeof e,Mw=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Uw=e=>"[object ReadableStream]"==={}.toString.call(e),Fw=e=>"[object WritableStream]"==={}.toString.call(e),Bw=e=>Uw(e)||Fw(e),Gw=e=>Uw(null==e?void 0:e.readable)&&Fw(null==e?void 0:e.writable),Hw=e=>Vw(e)&&"function"==typeof e[Symbol.asyncIterator],qw=e=>Vw(e)&&"function"==typeof e[Symbol.iterator],Vw=e=>"object"==typeof e&&null!==e,zw=new Set(["generator","asyncGenerator","duplex","webTransform"]),Ww=new Set(["fileUrl","filePath","fileNumber"]),Xw=new Set(["fileUrl","filePath"]),Kw=new Set([...Xw,"webStream","nodeStream"]),Yw=new Set(["webTransform","duplex"]),Jw={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"},Qw=(e,t,r,n)=>"output"===n?Zw(e,t,r):eb(e,t,r),Zw=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:null!=e?e:n}},eb=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(null!=e?e:n)}},tb=(e,t,r,{encoding:n})=>{const o=e.filter((({type:e})=>zw.has(e))),i=Array.from({length:o.length});for(const[s,a]of Object.entries(o))i[s]=rb({stdioItem:a,index:+s,newTransforms:i,optionName:t,direction:r,encoding:n});return sb(i,r)},rb=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?nb({stdioItem:e,optionName:o}):"webTransform"===t?ob({stdioItem:e,index:r,newTransforms:n,direction:i}):ib({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),nb=({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}}},ob=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=je(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Qw(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},ib=({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}=je(t)?t:{transform:t},d=c||gv.has(i),{writableObjectMode:p,readableObjectMode:f}=Qw(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},sb=(e,t)=>"input"===t?e.reverse():e,ab=["input","output","output"],cb=()=>{},lb=()=>"input",ub={generator:cb,asyncGenerator:cb,fileUrl:cb,filePath:cb,iterable:lb,asyncIterable:lb,uint8Array:lb,webStream:e=>Fw(e)?"output":"input",nodeStream:e=>Ge(e,{checkOpen:!1})?Be(e,{checkOpen:!1})?void 0:"input":"output",webTransform:cb,duplex:cb,native(e){const t=db(e);return void 0!==t?t:Fe(e,{checkOpen:!1})?ub.nodeStream(e):void 0}},db=e=>[0,Cn.stdin].includes(e)?"input":[1,2,Cn.stdout,Cn.stderr].includes(e)?"output":void 0,pb=e=>Sm.some((t=>void 0!==e[t])),fb=(e,t)=>Array.isArray(e)?e.map((e=>fb(e,t))):null==e?Sm.length>t?"pipe":"ignore":e,hb=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),mb=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=yb(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if(kn.isatty(o))throw new TypeError(`The \`${t}: ${Ig(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:im(En.readFileSync(o)),optionName:t}}},yb=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_m.indexOf(e);return-1!==r?r:void 0},gb=(e,t,r)=>{const n=_m[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},vb=({input:e,inputFile:t},r)=>0===r?[...wb(e),...Eb(t)]:[],wb=e=>void 0===e?[]:[{type:bb(e),value:e,optionName:"input"}],bb=e=>{if(Ge(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(om(e))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},Eb=e=>void 0===e?[]:[{..._b(e),optionName:"inputFile"}],_b=e=>{if(Lw(e))return{type:"fileUrl",value:e};if(jw(e))return{type:"filePath",value:{file:e}};throw Error("The `inputFile` option must be a file path string or a file URL.")},Sb=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter((e=>Ob(e,r)));if(0===i.length)return;const s=i.find((e=>e.direction!==o));return Ib(s,n,t),"output"===o?i[0].stream:void 0},Ob=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,Ib=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Jw[r]} that is the same.`)},Tb=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=((e,t)=>{if(void 0===e)return Sm.map((e=>t[e]));if(pb(t))throw Error("It's not possible to provide `stdio` in combination with one of "+Sm.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,Sm.length)},((t,r)=>e[r]))})(e,n).map(((e,t)=>fb(e,t)));return i?((e,t,r)=>e.map(((e,n)=>t[n]||0===n||Um(r,n)||!hb(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)=>xb({stdioOption:e,fdNumber:r,options:t,isSync:n}))),s=Lb({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map((({stdioItems:e})=>Ub(e))),s},xb=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Om(t),{stdioItems:i,isStdioArray:s}=Rb({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{var n;const o=e.map((e=>(({type:e,value:t},r)=>{var n;return null!=(n=ab[r])?n:ub[e](t)})(e,t)));if(o.includes("input")&&o.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return null!=(n=o.find(Boolean))?n:"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=mb({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(Fe(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:gb(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:gb(t,t,r),optionName:r}:Fe(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})=>!zw.has(e))),...tb(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast((({type:e})=>zw.has(e)));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return Db(l,u),{direction:a,objectMode:u,stdioItems:l}},Rb=({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=>Pb(e,n))),...vb(r,t)]),i=o.length>1;return Ab(o,i,n),Nb(o),{stdioItems:o,isStdioArray:i}},Pb=(e,t)=>({type:Sw(e,t),value:e,optionName:t}),Ab=(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(Cb.has(n))throw Error(`The \`${o}\` option must not include \`${n}\`.`)},Cb=new Set(["ignore","ipc"]),Nb=e=>{for(const t of e)$b(t)},$b=({type:e,value:t,optionName:r})=>{if((e=>Lw(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&&!Mw.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},Db=(e,t)=>{if(!t)return;const r=e.find((({type:e})=>Ww.has(e)));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Lb=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(kb({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(i){throw Mb(o),i}},kb=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map((t=>jb({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s})));return{direction:e,objectMode:t,stdioItems:a}},jb=({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 Kw.has(e)?Sb({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(Yw.has(e)&&(({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find((({value:{transform:e}})=>e===r.transform));Ib(o,n,t)})({otherStdioItems:s,type:e,value:t,optionName:r}));(({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Xw.has(t)&&Sb({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)}},Mb=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Em(e)||e.destroy()},Ub=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"},Fb=({type:e,optionName:t})=>{Bb(t,Jw[e])},Bb=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Gb={generator(){},asyncGenerator:Fb,webStream:Fb,nodeStream:Fb,webTransform:Fb,duplex:Fb,asyncIterable:Fb,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Bb(e,`"${t}"`),{})},Hb={input:{...Gb,fileUrl:({value:e})=>({contents:[im(En.readFileSync(e))]}),filePath:({value:{file:e}})=>({contents:[im(En.readFileSync(e))]}),fileNumber:Fb,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Gb,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e}})=>({path:e}),fileNumber:({value:e})=>({path:e}),iterable:Fb,string:Fb,uint8Array:Fb}},qb=(e,{stripFinalNewline:t},r)=>Vb(t,r)&&void 0!==e&&!Array.isArray(e)?Ue(e):e,Vb=(e,t)=>"all"===t?e[1]||e[2]:e[t],zb=(e,t,r,n)=>e||r?void 0:Kb(t,n),Wb=(e,t,r)=>r?e.flatMap((e=>Xb(e,t))):Xb(e,t),Xb=(e,t)=>{const{transform:r,final:n}=Kb(t,{});return[...r(e),...n()]},Kb=(e,t)=>(t.previousChunks="",{transform:Yb.bind(void 0,t,e),final:Qb.bind(void 0,t)}),Yb=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=Jb(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=tE(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=tE(n,r.slice(o+1))),e.previousChunks=n},Jb=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Qb=function*({previousChunks:e}){e.length>0&&(yield e)},Zb=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:eE.bind(void 0,n)},eE=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?rE:nE;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},tE=(e,t)=>`${e}${t}`,rE={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:tE},nE={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}},oE=(e,t)=>e?void 0:iE.bind(void 0,t),iE=function*(e,t){if("string"!=typeof t&&!om(t)&&!Pn.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},sE=(e,t)=>e?aE.bind(void 0,t):cE.bind(void 0,t),aE=function*(e,t){lE(e,t),yield t},cE=function*(e,t){if(lE(e,t),"string"!=typeof t&&!om(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},lE=(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; }`)},uE=(e,t,r)=>{if(r)return;if(e)return{transform:dE.bind(void 0,new TextEncoder)};const n=new Ln.StringDecoder(t);return{transform:pE.bind(void 0,n),final:fE.bind(void 0,n)}},dE=function*(e,t){Pn.Buffer.isBuffer(t)?yield im(t):"string"==typeof t?yield e.encode(t):yield t},pE=function*(e,t){yield om(t)?e.write(t):t},fE=function*(e){const t=e.end();""!==t&&(yield t)},hE=Rn.callbackify((async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}})),mE=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=wE}=t[r];for await(const o of n(e))yield*mE(o,t,r+1)},yE=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*gE(r,+t,e)},gE=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*mE(n,r,t+1)},vE=Rn.callbackify((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),wE=function*(e){yield e},bE=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(o){n(o)}},EE=(e,t)=>[...t.flatMap((t=>[..._E(t,e,0)])),...SE(e)],_E=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=IE}=t[r];for(const o of n(e))yield*_E(o,t,r+1)},SE=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*OE(r,+t,e)},OE=function*(e,t,r){if(void 0!==e)for(const n of e())yield*_E(n,r,t+1)},IE=function*(e){yield e},TE=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=RE(e,s,i),l=Nw(t),u=Nw(r),d=l?hE.bind(void 0,mE,a):bE.bind(void 0,_E),p=l||u?hE.bind(void 0,yE,a):bE.bind(void 0,SE),f=l||u?vE.bind(void 0,a):void 0;return{stream:new $n.Transform({writableObjectMode:n,writableHighWaterMark:$n.getDefaultHighWaterMark(n),readableObjectMode:o,readableHighWaterMark:$n.getDefaultHighWaterMark(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},xE=(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=RE(s,r,a);e=EE(t,e)}return e},RE=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:oE(n,a)},uE(r,s,n),zb(r,i,n,c),{transform:e,final:t},{transform:sE(o,a)},Zb({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},PE=(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 ${Jw[e]} with synchronous methods.`)}const i=o.map((({contents:e})=>e)).map((e=>AE(e,n)));r.input=um(i)},AE=(e,t)=>{const r=xE(e,t,"utf8",!0);return CE(r),um(r)},CE=e=>{const t=e.find((e=>"string"!=typeof e&&!om(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}.`)},NE=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Um(r,n)&&!gv.has(t)&&$E(n)&&(e.some((({type:e,value:t})=>"native"===e&&DE.has(t)))||e.every((({type:e})=>zw.has(e)))),$E=e=>1===e||2===e,DE=new Set(["pipe","overlapped"]),LE=e=>e._readableState.pipes.length>0,kE=(e,t,r)=>{const n=wy(e);hy({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},jE=(e,t,r,n)=>{try{return xE(e,t,r,!1)}catch(o){return n.error=o,e}},ME=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:um(e)};const s=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const r=new Ln.StringDecoder(t),n=e.map((e=>"string"==typeof e?am(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:Wb(s,!o[i],t)}:{serializedResult:s}},UE=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!NE({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=Wb(e,!1,s);try{((e,t,r)=>{for(const n of e)kE(n,t,r)})(a,t,n)}catch(c){null!=r.error||(r.error=c)}},FE=(e,t,r)=>{for(const{path:n}of t.filter((({type:e})=>Ww.has(e)))){const t="string"==typeof n?n:""+n;r.has(t)?En.appendFileSync(n,e):(r.add(t),En.writeFileSync(n,e))}},BE=async e=>{try{return await xn.once(e,"exit")}catch{return BE(e)}},GE=async e=>{const[t,r]=await e;if(!HE(t,r)&&qE(t,r))throw new xy;return[t,r]},HE=(e,t)=>void 0===e&&void 0===t,qE=(e,t)=>0!==e||null!==t,VE=(e,t,r)=>void 0!==e?e:qE(t,r)?new xy:void 0,zE=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,WE=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&XE("ipcInput"),e&&XE("ipc: true"),r&&XE("detached: true"),n&&XE("cancelSignal")},XE=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},KE=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=YE({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=VE(e,t,r),s="ETIMEDOUT"===(null==i?void 0:i.code),a=((e,t,r)=>"ENOBUFS"===(null==e?void 0:e.code)&&null!==t&&t.some((e=>null!==e&&e.length>uw(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=uw(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=im(p),{stdioItems:h,objectMode:y}=t[r],g=jE([f],h,c,n),{serializedResult:v,finalResult:w=v}=ME({chunks:g,objectMode:y,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});UE({serializedResult:v,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:h,objectMode:y});const b=a[r]?w:void 0;try{return void 0===n.error&&FE(v,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)=>qb(e,r,t))),g=qb((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,qb(t,r,"all")]:Array.isArray(t)?[qb(e,r,"all"),...t]:om(e)&&om(t)?pm([e,t]):`${e}${t}`})(h,r),r,"all");return QE({error:m,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:y,all:g,options:r,command:n,escapedCommand:o,startTime:a})},YE=({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])=>+e))))(e))PE(e,r,t)})(i,r);const n=JE(r);return An.spawnSync(e,t,n)}catch(a){return mw({error:a,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},JE=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:uw(t)}),QE=({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?hw({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):yw({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}),ZE=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(og({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:jg(e)}),e_({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),e_=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{xg(t,o);const i=Dg(e,t,r),s=new AbortController;try{return await Promise.race([t_(i,n,s),r_(i,r,s),n_(i,r,s)])}catch(a){throw fg(e),a}finally{s.abort(),Pg(t,o)}},t_=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await xn.once(e,"message",{signal:r});return t}for await(const[n]of xn.on(e,"message",{signal:r}))if(t(n))return n},r_=async(e,t,{signal:r})=>{await xn.once(e,"disconnect",{signal:r}),(e=>{throw Error(`${ug("getOneMessage",e)} could not complete: the ${pg(e)} exited or disconnected.`)})(t)},n_=async(e,t,{signal:r})=>{const[n]=await xn.once(e,"strict:error",{signal:r});throw ag(n,t)},o_=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>i_({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),i_=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{og({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:jg(e)}),xg(t,i);const s=Dg(e,t,r),a=new AbortController,c={};return s_(e,s,a),a_({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),c_({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},s_=async(e,t,r)=>{try{await xn.once(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},a_=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await xn.once(e,"strict:error",{signal:r.signal});n.error=ag(o,t),r.abort()}catch{}},c_=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.on(r,"message",{signal:i.signal}))l_(s),yield e}catch{l_(s)}finally{i.abort(),Pg(t,a),n||fg(e),o&&await e}},l_=({error:e})=>{if(e)throw e},u_=(e,t,r)=>({sendMessage:Jg.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:ZE.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:o_.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),d_=()=>{const e=new $n.PassThrough;return e.end(),e},p_=()=>new $n.Readable({read(){}}),f_=()=>new $n.Writable({write(){}}),h_=()=>new $n.Duplex({read(){},write(){}}),m_=async(e,t,r)=>_w(e,t,r),y_=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Jw[e]}.`)},g_={fileNumber:y_,generator:TE,asyncGenerator:TE,nodeStream:({value:e})=>({stream:e}),webTransform:({value:{transform:e,writableObjectMode:t,readableObjectMode:r}})=>({stream:$n.Duplex.fromWeb(e,{objectMode:t||r})}),duplex:({value:{transform:e}})=>({stream:e}),native(){}},v_={input:{...g_,fileUrl:({value:e})=>({stream:En.createReadStream(e)}),filePath:({value:{file:e}})=>({stream:En.createReadStream(e)}),webStream:({value:e})=>({stream:$n.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:$n.Readable.from(e)}),asyncIterable:({value:e})=>({stream:$n.Readable.from(e)}),string:({value:e})=>({stream:$n.Readable.from(e)}),uint8Array:({value:e})=>({stream:$n.Readable.from(Pn.Buffer.from(e))})},output:{...g_,fileUrl:({value:e})=>({stream:En.createWriteStream(e)}),filePath:({value:{file:e}})=>({stream:En.createWriteStream(e)}),webStream:({value:e})=>({stream:$n.Writable.fromWeb(e)}),iterable:y_,asyncIterable:y_,string:y_,uint8Array:y_}},w_=(e,t)=>{if(0===e.length)return $n.getDefaultHighWaterMark(t);const r=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...r)};class b_ extends $n.PassThrough{constructor(){super(...arguments),gn(this,Jr,new Set([])),gn(this,Qr,new Set([])),gn(this,Zr,new Set([])),gn(this,en),gn(this,tn,Symbol()),gn(this,rn,new WeakMap)}add(e){if(O_(e),yn(this,Jr).has(e))return;yn(this,Jr).add(e),null!=yn(this,en)||vn(this,en,E_(this,yn(this,Jr),yn(this,tn)));const t=I_({passThroughStream:this,stream:e,streams:yn(this,Jr),ended:yn(this,Qr),aborted:yn(this,Zr),onFinished:yn(this,en),unpipeEvent:yn(this,tn)});yn(this,rn).set(e,t),e.pipe(this,{end:!1})}async remove(e){if(O_(e),!yn(this,Jr).has(e))return!1;const t=yn(this,rn).get(e);return void 0!==t&&(yn(this,rn).delete(e),e.unpipe(this),await t,!0)}}Jr=new WeakMap,Qr=new WeakMap,Zr=new WeakMap,en=new WeakMap,tn=new WeakMap,rn=new WeakMap;const E_=async(e,t,r)=>{L_(e,k_);const n=new AbortController;try{await Promise.race([__(e,n),S_(e,t,r,n)])}finally{n.abort(),L_(e,-k_)}},__=async(e,{signal:t})=>{try{await Cv(e,{signal:t,cleanup:!0})}catch(r){throw A_(e,r),r}},S_=async(e,t,r,{signal:n})=>{for await(const[o]of xn.on(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},O_=e=>{if("function"!=typeof(null==e?void 0:e.pipe))throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},I_=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{L_(e,j_);const a=new AbortController;try{await Promise.race([T_(i,t,a),x_({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),R_({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),L_(e,-j_)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?N_(e):P_(e))},T_=async(e,t,{signal:r})=>{try{await e,r.aborted||N_(t)}catch(n){r.aborted||A_(t,n)}},x_=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await Cv(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(s){if(i.aborted||!r.has(t))return;C_(s)?o.add(t):$_(e,s)}},R_=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await xn.once(e,o,{signal:i}),!e.readable)return xn.once(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},P_=e=>{e.writable&&e.end()},A_=(e,t)=>{C_(t)?N_(e):$_(e,t)},C_=e=>"ERR_STREAM_PREMATURE_CLOSE"===(null==e?void 0:e.code),N_=e=>{(e.readable||e.writable)&&e.destroy()},$_=(e,t)=>{e.destroyed||(e.once("error",D_),e.destroy(t))},D_=()=>{},L_=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==1/0&&e.setMaxListeners(r+t)},k_=2,j_=1,M_=(e,t)=>{e.pipe(t),U_(e,t),B_(e,t)},U_=async(e,t)=>{if(!Em(e)&&!Em(t)){try{await Cv(e,{cleanup:!0,readable:!0,writable:!1})}catch{}F_(t)}},F_=e=>{e.writable&&e.end()},B_=async(e,t)=>{if(!Em(e)&&!Em(t)){try{await Cv(t,{cleanup:!0,readable:!1,writable:!0})}catch{}G_(e)}},G_=e=>{e.readable&&e.destroy()},H_=(e,t,r,n)=>{"output"===r?M_(e.stdio[n],t):M_(t,e.stdio[n]);const o=q_[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},q_=["stdin","stdout","stderr"],V_=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{var s;if(void 0===t)return;z_(t,i);const[a,c]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],l=null!=(s=o.get(a))?s:[];o.set(a,[...l,c])},z_=(e,{signal:t})=>{Em(e)&&Tg(e,W_,t)},W_=2,X_=[];X_.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&X_.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&X_.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const K_=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,Y_=Symbol.for("signal-exit emitter"),J_=globalThis,Q_=Object.defineProperty.bind(Object);class Z_{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(J_[Y_])return J_[Y_];Q_(J_,Y_,{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 eS{}nn=new WeakMap,on=new WeakMap,sn=new WeakMap,an=new WeakMap,cn=new WeakMap,ln=new WeakMap,un=new WeakMap,dn=new WeakSet,pn=function(e){return K_(yn(this,sn))?(yn(this,sn).exitCode=e||0,yn(this,on).emit("exit",yn(this,sn).exitCode,null),yn(this,cn).call(yn(this,sn),yn(this,sn).exitCode)):0},fn=function(e,...t){const r=yn(this,an);if("exit"===e&&K_(yn(this,sn))){"number"==typeof t[0]&&(yn(this,sn).exitCode=t[0]);const n=r.call(yn(this,sn),e,...t);return yn(this,on).emit("exit",yn(this,sn).exitCode,null),n}return r.call(yn(this,sn),e,...t)};const tS=globalThis.process,{onExit:rS}=(nS=K_(tS)?new class extends eS{constructor(e){super(),gn(this,dn),gn(this,nn,"win32"===tS.platform?"SIGINT":"SIGHUP"),gn(this,on,new Z_),gn(this,sn),gn(this,an),gn(this,cn),gn(this,ln,{}),gn(this,un,!1),vn(this,sn,e),vn(this,ln,{});for(const t of X_)yn(this,ln)[t]=()=>{const r=yn(this,sn).listeners(t);let{count:n}=yn(this,on);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=yn(this,on).emit("exit",null,t),n="SIGHUP"===t?yn(this,nn):t;r||e.kill(e.pid,n)}};vn(this,cn,e.reallyExit),vn(this,an,e.emit)}onExit(e,t){if(!K_(yn(this,sn)))return()=>{};!1===yn(this,un)&&this.load();const r=(null==t?void 0:t.alwaysLast)?"afterExit":"exit";return yn(this,on).on(r,e),()=>{yn(this,on).removeListener(r,e),0===yn(this,on).listeners.exit.length&&0===yn(this,on).listeners.afterExit.length&&this.unload()}}load(){if(!yn(this,un)){vn(this,un,!0),yn(this,on).count+=1;for(const t of X_)try{const e=yn(this,ln)[t];e&&yn(this,sn).on(t,e)}catch(e){}yn(this,sn).emit=(e,...t)=>wn(this,dn,fn).call(this,e,...t),yn(this,sn).reallyExit=e=>wn(this,dn,pn).call(this,e)}}unload(){yn(this,un)&&(vn(this,un,!1),X_.forEach((e=>{const t=yn(this,ln)[e];if(!t)throw Error("Listener not defined for signal: "+e);try{yn(this,sn).removeListener(e,t)}catch(r){}})),yn(this,sn).emit=yn(this,an),yn(this,sn).reallyExit=yn(this,cn),yn(this,on).count-=1)}}(tS):new class extends eS{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>nS.onExit(e,t),load:()=>nS.load(),unload:()=>nS.unload()});var nS;const oS=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(iS,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]=rm(r,...n);return{destination:t(iS)(o,i,s),pipeOptions:s}}if(gg.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)},iS=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),sS=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>mw({error:e,command:aS,escapedCommand:aS,fileDescriptors:t,options:r,startTime:n,isSync:!1}),aS="source.pipe(destination)",cS=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},lS=new WeakMap,uS=(e,t)=>void 0===e?[]:[dS(e,t)],dS=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{throw await Rn.aborted(e,t),await r.remove(t),sS({error:Error("Pipe canceled by `unpipeSignal` option."),fileDescriptors:n,sourceOptions:o,startTime:i})},pS=(e,...t)=>{if(je(t[0]))return pS.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Sy(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=((e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=oS(e,t,...r);return{destination:n,destinationStream:mg(n,i),from:o,unpipeSignal:s}}catch(n){return{destinationError:n}}})(r,n,o),{sourceStream:d,sourceError:p}=((e,t)=>{try{return{sourceStream:yg(e,t)}}catch(r){return{sourceError:r}}})(e,l),{options:f,fileDescriptors:h}=gg.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=fS({...n,destination:r});return o.pipe=pS.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},fS=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=hS(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?(G_(e),n):void 0!==t?(F_(r),t):void 0)({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sS({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=lS.has(t)?((e,t)=>{const r=lS.get(t);return r.add(e),r})(e,t):((e,t)=>{const r=Xe([e]);return M_(r,t),lS.set(t,r),r})(e,t);return Tg(e,2,r.signal),Tg(t,1,r.signal),(async e=>{try{await Cv(e,{cleanup:!0,readable:!1,writable:!0})}catch{}lS.delete(e)})(t),n})(t,i,d);return await Promise.race([cS(u),...uS(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},hS=(e,t)=>Promise.allSettled([e,t]),mS=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return yS(t,s),wS({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},yS=async(e,t)=>{try{await e}catch{}finally{t.abort()}},gS=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;vS(t,s,e);const a=e.readableObjectMode&&!i;return wS({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},vS=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},wS=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=xn.on(e,"data",{signal:t.signal,highWaterMark:ES,highWatermark:ES});return _S({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},bS=$n.getDefaultHighWaterMark(!0),ES=bS,_S=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=SS({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*_E(t,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*SE(a)}},SS=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[uE(e,r,!t),zb(e,o,!n,{})].filter(Boolean),OS=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=IS({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void(await Promise.all([TS(e),d]));const p=Vb(c,r),f=gS({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[h]=await Promise.all([xS({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return h},IS=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{var a;if(!NE({stdioItems:null==(a=s[r])?void 0:a.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const c=gS({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)LE(t)||kE(o,r,n)})(c,e,r,i)},TS=async e=>{await jn.setImmediate(),null===e.readableFlowing&&e.resume()},xS=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 Bv(e,Zv,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return Bv(e,sw,t)}(r,{maxBuffer:i})):await async function(e,t){return Bv(e,cw,t)}(r,{maxBuffer:i})}catch(a){return PS((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof Wv))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}))}},RS=async e=>{try{return await e}catch(t){return PS(t)}},PS=({bufferedData:e})=>"[object ArrayBuffer]"===nm.call(e)?new Uint8Array(e):e,AS=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=CS(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],Cv(e,{cleanup:!0,signal:s.signal})])}catch(a){i.stdinCleanedUp||DS(a,t,r,n)}finally{s.abort()}},CS=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&NS(e,r,n),n},NS=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{$S(t,r),n.call(e,...o)}},$S=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},DS=(e,t,r,n)=>{if(!LS(e,t,r,n))throw e},LS=(e,t,r,n=!0)=>r.propagating?MS(e)||jS(e):(r.propagating=!0,kS(r,t)===n?MS(e):jS(e)),kS=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,jS=e=>"ERR_STREAM_PREMATURE_CLOSE"===(null==e?void 0:e.code),MS=e=>"EPIPE"===(null==e?void 0:e.code),US=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=AS(e,t,l);if(kS(l,t))return void(await u);const[d]=await Promise.all([OS({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},FS=({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}},BS=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,GS=(e,t)=>{const r=wy(e);hy({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},HS=async(e,t)=>(await Promise.allSettled([e]),t),qS=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 v=(async(e,t)=>{const[r,n]=await(async e=>{const[t,r]=await Promise.allSettled([xn.once(e,"spawn"),xn.once(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?BE(e):r.value})(e);return null!=t.isForcefullyTerminated||(t.isForcefullyTerminated=!1),[r,n]})(e,p),w={originalStreams:m,fileDescriptors:h,subprocess:e,exitPromise:v,propagating:!1},b=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map(((e,c)=>US({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:w}),E=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>US({...FS(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:BS(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:w}),_=[],S=(async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Um(e,"ipc"))(i),a=jm(t,"ipc"),c=jm(r,"ipc");for await(const l of i_({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(lw(0,o,c),o.push(l)),s&&GS(l,i);return o})({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:_,verboseInfo:f}),O=VS(m,e,w),I=zS(h,w);try{return await Promise.race([Promise.all([{},GE(v),Promise.all(b),E,S,mv(e,d),...O,...I]),y,WS(e,g),...pv(e,i,p,g),...rg({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:g}),...lv({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:g})])}catch(T){return null!=p.terminationReason||(p.terminationReason="other"),Promise.all([{error:T},v,Promise.all(b.map((e=>RS(e)))),RS(E),HS(S,_),Promise.allSettled(O),Promise.allSettled(I)])}},VS=(e,t,r)=>e.map(((e,n)=>e===t.stdio[n]?void 0:AS(e,n,r))),zS=(e,t)=>e.flatMap((({stdioItems:e},r)=>e.filter((({value:e,stream:t=e})=>Fe(t,{checkOpen:!1})&&!Em(t))).map((({type:e,value:n,stream:o=n})=>AS(o,r,t,{isSameDirection:zw.has(e),stopOnExit:"native"===e}))))),WS=async(e,{signal:t})=>{const[r]=await xn.once(e,"error",{signal:t});throw r},XS=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=hg();return o.push(i),{resolve:i.resolve.bind(i),promises:o}},KS=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},YS=async e=>{if(void 0!==e)try{await JS(e)}catch{}},JS=async e=>{await Cv(e,{cleanup:!0,readable:!1,writable:!0})},QS=async e=>{await Cv(e,{cleanup:!0,readable:!0,writable:!1})},ZS=async(e,t)=>{if(await e,t)throw t},eO=(e,t,r)=>{r&&!jS(r)?e.destroy(r):t&&e.destroy()},tO=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||gv.has(r),{subprocessStdout:a,waitReadableDestroy:c}=rO(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=nO(a,s),{read:p,onStdoutDataDone:f}=oO({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),h=new $n.Readable({read:p,destroy:Rn.callbackify(aO.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return sO({subprocessStdout:a,onStdoutDataDone:f,readable:h,subprocess:e}),h},rO=(e,t,r)=>{const n=yg(e,t);return{subprocessStdout:n,waitReadableDestroy:XS(r,n,"readableDestroy")}},nO=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:bS},oO=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=hg(),s=mS({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){iO(this,s,i)},onStdoutDataDone:i}},iO=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},sO=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await QS(e),await n,await YS(o),await t,r.readable&&r.push(null)}catch(i){await YS(o),cO(r,i)}},aO=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await KS(r,t)&&(cO(e,n),await ZS(t,n))},cO=(e,t)=>{eO(e,e.readable,t)},lO=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=uO(e,r,t),s=new $n.Writable({...dO(n,e,o),destroy:Rn.callbackify(mO.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return hO(n,s),s},uO=(e,t,r)=>{const n=mg(e,t);return{subprocessStdin:n,waitWritableFinal:XS(r,n,"writableFinal"),waitWritableDestroy:XS(r,n,"writableDestroy")}},dO=(e,t,r)=>({write:pO.bind(void 0,e),final:Rn.callbackify(fO.bind(void 0,e,t,r))}),pO=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},fO=async(e,t,r)=>{await KS(r,t)&&(e.writable&&e.end(),await t)},hO=async(e,t,r)=>{try{await JS(e),t.writable&&t.end()}catch(n){await(async e=>{if(void 0!==e)try{await QS(e)}catch{}})(r),yO(t,n)}},mO=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await KS(r,t),await KS(n,t)&&(yO(e,o),await ZS(t,o))},yO=(e,t)=>{eO(e,e.writable,t)},gO=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||gv.has(r),{subprocessStdout:c,waitReadableDestroy:l}=rO(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=uO(e,o,t),{readableEncoding:f,readableObjectMode:h,readableHighWaterMark:m}=nO(c,a),{read:y,onStdoutDataDone:g}=oO({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),v=new $n.Duplex({read:y,...dO(u,e,d),destroy:Rn.callbackify(vO.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 sO({subprocessStdout:c,onStdoutDataDone:g,readable:v,subprocess:e,subprocessStdin:u}),hO(u,v,c),v},vO=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([aO({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),mO({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},wO=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||gv.has(t),s=yg(e,r),a=mS({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return bO(a,s,e)},bO=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},EO=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=tO.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=lO.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=gO.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=wO.bind(void 0,e,t),e[Symbol.asyncIterator]=wO.bind(void 0,e,t,{})},_O=(async()=>{})().constructor.prototype,SO=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(_O,e)])),OO=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=Iy(e,t,r),{file:a,commandArguments:c,options:l}=_v(e,t,r),u=IO(l),d=((e,t)=>Tb(v_,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},IO=({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}},TO=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=An.spawn(e,t,r)}catch(f){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Mb(n);const a=new An.ChildProcess;((e,t)=>{const r=d_(),n=d_(),o=d_(),i=Array.from({length:t.length-3},d_),s=d_(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})})(a,n),Object.assign(a,{readable:p_,writable:f_,duplex:h_});const c=mw({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:m_(c,s,o)}})({error:f,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;xn.setMaxListeners(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})=>zw.has(e))))H_(e,t,s,o);for(const{stream:t}of i.filter((({type:e})=>!zw.has(e))))V_({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]:Xe(i);M_(e,o)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=rS((()=>{e.kill()}));xn.addAbortListener(n,(()=>{o()}))})(c,r,l);const d={},p=hg();return c.kill=Yy.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)?Xe([e,t].filter(Boolean)):void 0)(c,r),EO(c,r),((e,{ipc:t})=>{Object.assign(e,u_(e,!1,t))})(c,r),{subprocess:c,promise:xO({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},xO=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 qS({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)=>qb(e,t,r))),v=qb(m,t,"all"),w=RO({errorInfo:d,exitCode:p,signal:f,stdio:g,all:v,ipcOutput:y,context:c,options:t,command:s,escapedCommand:a,startTime:r});return _w(w,n,t)},RO=({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?yw({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 Wv,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):hw({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),PO=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map((([t,r])=>[t,AO(t,e[t],r)])));return{...e,...r}},AO=(e,t,r)=>CO.has(e)&&je(t)&&je(r)?{...t,...r}:r,CO=new Set(["env",...km]),NO=(e,t,r,n)=>{const o=(e,t,n)=>NO(e,t,r,n),i=(...i)=>$O({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},$O=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(je(i))return o(e,PO(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=DO({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}=Iy(e,t,r),a=zE(r),{file:c,commandArguments:l,options:u}=_v(e,t,a);WE(u);const d=((e,t)=>Tb(Hb,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=KE({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return _w(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}=OO(e,t,r),{subprocess:p,promise:f}=TO({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=pS.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of SO){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),gg.set(p,{options:u,fileDescriptors:d}),p})(a,c,l,o)},DO=({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=hm({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]=rm(...i),u=PO(PO(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}},LO=(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]=kO(e);return{file:r,commandArguments:n}},kO=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(jO)){const e=r.at(-1);e&&e.endsWith("\\")?r[r.length-1]=`${e.slice(0,-1)} ${n}`:r.push(n)}return r},jO=/ +/g,MO=({options:e})=>({...UO(e),isSync:!0}),UO=e=>({options:{...FO(e),...e}}),FO=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},BO=NO((()=>({}))),GO=NO((()=>({isSync:!0})));let HO;NO((({file:e,commandArguments:t})=>LO(e,t))),NO((({file:e,commandArguments:t})=>({...LO(e,t),isSync:!0}))),NO((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),NO((({options:e})=>UO(e)),{},{preferLocal:!0},((e,t,r)=>{e.sync=t(MO,r),e.s=e.sync})),(()=>{const e=Cn,t=!0,r=void 0!==Cn.channel;u_(e,t,r),rv.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})();let qO=!1,VO=!1,zO=!1;const WO=/Version\s*:\s*(.*)/g;let XO=!1;var KO=Sn;const YO=t((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=KO.basename(e,KO.extname(e))+t,o=KO.join(KO.dirname(e),n);return(r=e.slice(0,2))==="."+KO.sep||"./"===r?"."+KO.sep+o:o}));var JO={},QO={};et(QO,"name",(()=>tt));var ZO={};et(ZO,"normalizeTrim",(()=>rt));var eI={};et(eI,"addExeExt",(()=>nt));var tI={};et(tI,"addNamePrefix",(()=>ot));var rI={};et(rI,"addNameSuffix",(()=>it));var nI={};et(nI,"addShExt",(()=>st));var oI={};et(oI,"addShRelativePrefix",(()=>at));var iI={};et(iI,"removeExt",(()=>ct));var sI={};et(sI,"replaceExt",(()=>lt));var aI={};et(aI,"isPathInside",(()=>ut)),Ze(JO,QO),Ze(JO,ZO),Ze(JO,eI),Ze(JO,tI),Ze(JO,rI),Ze(JO,nI),Ze(JO,oI),Ze(JO,iI),Ze(JO,sI),Ze(JO,aI);const cI=["x64","amd64","x86_64","win64","64"],lI=["x86","i386","ia32","win32","32","x32"],uI=["aarch64","arm64","woa64","arm"],dI=["armv7","armv7a"],pI=["powerpc64le","ppc64le"],fI=["sparc64"];var hI={},mI={},yI={};!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=zn&&zn.__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=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=zn&&zn.__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=zn&&zn.__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(En),c=i(Sn);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"}}(yI);var gI=zn&&zn.__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]}),vI=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wI=zn&&zn.__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)&&gI(t,e,r);return vI(t,e),t},bI=zn&&zn.__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(mI,"__esModule",{value:!0}),mI.findInPath=mI.which=OI=mI.mkdirP=mI.rmRF=mI.mv=mI.cp=void 0;const EI=Nn,_I=wI(Sn),SI=wI(yI);mI.cp=function(e,t,r={}){return bI(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 SI.exists(t))?yield SI.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?_I.join(t,_I.basename(e)):t;if(!(yield SI.exists(e)))throw Error("no such file or directory: "+e);if((yield SI.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield ht(e,a,0,n)}else{if(""===_I.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield mt(e,a,n)}}))},mI.mv=function(e,t,r={}){return bI(this,void 0,void 0,(function*(){if(yield SI.exists(t)){let n=!0;if((yield SI.isDirectory(t))&&(t=_I.join(t,_I.basename(e)),n=yield SI.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield dt(t)}}yield pt(_I.dirname(t)),yield SI.rename(e,t)}))},mI.rmRF=dt;var OI=mI.mkdirP=pt;mI.which=function e(t,r){return bI(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(SI.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 ft(t);return n&&n.length>0?n[0]:""}))},mI.findInPath=ft;var II={exports:{}},TI={exports:{}};!function(e,t){function r(e){A[e]=C++}function n(e){for(var t=0;$.length>t;t++){var r=$[t][0],n=$[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?R[A.LOOSE]:R[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?R[A.LOOSE]:R[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>I||0>this.major)throw new TypeError("Invalid major version");if(this.minor>I||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>I||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&&I>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 v(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,r,n,o,i,s,a,c,l,u,d,p){return((t=v(r)?"":v(n)?">="+r+".0.0":v(o)?">="+r+"."+n+".0":">="+t)+" "+(a=v(c)?"":v(l)?"<"+(+c+1)+".0.0":v(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,v=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),v=v||e,o(e.semver,(g=g||e).semver,n)?g=e:a(e.semver,v.semver,n)&&(v=e)})),g.operator===u||g.operator===d)return!1;if((!v.operator||v.operator===u)&&s(e,v.semver))return!1;if(v.operator===d&&a(e,v.semver))return!1}return!0}var S;t=TI.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,I=Number.MAX_SAFE_INTEGER||9007199254740991,T=O-6,x=t.re=[],R=t.safeRe=[],P=t.src=[],A=t.tokens={},C=0,N="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",O],[N,T]];r("NUMERICIDENTIFIER"),P[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+N+"*",r("MAINVERSION"),P[A.MAINVERSION]="("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[A.MAINVERSIONLOOSE]="("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[A.PRERELEASEIDENTIFIER]="(?:"+P[A.NUMERICIDENTIFIER]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[A.NUMERICIDENTIFIERLOOSE]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[A.PRERELEASE]="(?:-("+P[A.PRERELEASEIDENTIFIER]+"(?:\\."+P[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[A.PRERELEASELOOSE]="(?:-?("+P[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[A.BUILDIDENTIFIER]=N+"+",r("BUILD"),P[A.BUILD]="(?:\\+("+P[A.BUILDIDENTIFIER]+"(?:\\."+P[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[A.FULLPLAIN]="v?"+P[A.MAINVERSION]+P[A.PRERELEASE]+"?"+P[A.BUILD]+"?",P[A.FULL]="^"+P[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[A.LOOSEPLAIN]="[v=\\s]*"+P[A.MAINVERSIONLOOSE]+P[A.PRERELEASELOOSE]+"?"+P[A.BUILD]+"?",r("LOOSE"),P[A.LOOSE]="^"+P[A.LOOSEPLAIN]+"$",r("GTLT"),P[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[A.XRANGEIDENTIFIERLOOSE]=P[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[A.XRANGEIDENTIFIER]=P[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[A.XRANGEPLAIN]="[v=\\s]*("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:"+P[A.PRERELEASE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[A.XRANGEPLAINLOOSE]="[v=\\s]*("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:"+P[A.PRERELEASELOOSE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGE"),P[A.XRANGE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[A.XRANGELOOSE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),x[A.COERCERTL]=RegExp(P[A.COERCE],"g"),R[A.COERCERTL]=RegExp(n(P[A.COERCE]),"g"),r("LONETILDE"),P[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[A.TILDETRIM]="(\\s*)"+P[A.LONETILDE]+"\\s+",x[A.TILDETRIM]=RegExp(P[A.TILDETRIM],"g"),R[A.TILDETRIM]=RegExp(n(P[A.TILDETRIM]),"g"),r("TILDE"),P[A.TILDE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[A.TILDELOOSE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[A.LONECARET]="(?:\\^)",r("CARETTRIM"),P[A.CARETTRIM]="(\\s*)"+P[A.LONECARET]+"\\s+",x[A.CARETTRIM]=RegExp(P[A.CARETTRIM],"g"),R[A.CARETTRIM]=RegExp(n(P[A.CARETTRIM]),"g"),r("CARET"),P[A.CARET]="^"+P[A.LONECARET]+P[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[A.CARETLOOSE]="^"+P[A.LONECARET]+P[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[A.COMPARATORLOOSE]="^"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[A.COMPARATOR]="^"+P[A.GTLT]+"\\s*("+P[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[A.COMPARATORTRIM]="(\\s*)"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+"|"+P[A.XRANGEPLAIN]+")",x[A.COMPARATORTRIM]=RegExp(P[A.COMPARATORTRIM],"g"),R[A.COMPARATORTRIM]=RegExp(n(P[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[A.HYPHENRANGE]="^\\s*("+P[A.XRANGEPLAIN]+")\\s+-\\s+("+P[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[A.HYPHENRANGELOOSE]="^\\s*("+P[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[A.STAR]="(<|>)?=?\\s*\\*";for(var D=0;C>D;D++)S(D,P[D]),x[D]||(x[D]=RegExp(P[D]),R[D]=RegExp(n(P[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?R[A.COMPARATORLOOSE]:R[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?R[A.HYPHENRANGELOOSE]:R[A.HYPHENRANGE],w),S("hyphen replace",e),e=e.replace(R[A.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,R[A.COMPARATORTRIM]),e=(e=(e=e.replace(R[A.TILDETRIM],"$1~")).replace(R[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?R[A.COMPARATORLOOSE]:R[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?R[A.CARETLOOSE]:R[A.CARET],(function(t,r,n,o,i){var s;return S("caret",e,t,r,n,o,i),v(r)?s="":v(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":v(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?R[A.TILDELOOSE]:R[A.TILDE],(function(t,r,n,o,i){var s;return S("tilde",e,t,r,n,o,i),v(r)?s="":v(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":v(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?R[A.XRANGELOOSE]:R[A.XRANGE],(function(r,n,o,i,s,a){S("xRange",e,r,n,o,i,s,a);var c=v(o),l=c||v(i),u=l||v(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(R[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=R[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),R[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;R[A.COERCERTL].lastIndex=-1}else r=e.match(R[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,TI.exports);var xI=TI.exports;!function(e,t){var r=zn&&zn.__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=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=zn&&zn.__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=zn&&zn.__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(xI),a=m(),c=bn,l=An,u=En;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}}(II,II.exports);for(var RI=II.exports,PI=_n,AI=[],CI=0;256>CI;++CI)AI[CI]=(CI+256).toString(16).substr(1);var NI=function(){return PI.randomBytes(16)},$I=function(e,t){var r=t||0;return""+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]+"-"+AI[e[r++]]+AI[e[r++]]+"-"+AI[e[r++]]+AI[e[r++]]+"-"+AI[e[r++]]+AI[e[r++]]+"-"+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]+AI[e[r++]]},DI={},LI={},kI=zn&&zn.__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]}),jI=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),MI=zn&&zn.__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)&&kI(t,e,r);return jI(t,e),t},UI=zn&&zn.__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(LI,"__esModule",{value:!0}),LI.argStringToArray=LI.ToolRunner=void 0;const FI=MI(bn),BI=MI(xn),GI=MI(An),HI=MI(Sn),qI=MI(mI),VI=MI(yI),zI=Un,WI="win32"===process.platform;LI.ToolRunner=class extends BI.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(WI)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(FI.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+FI.EOL.length),o=n.indexOf(FI.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return WI&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(WI&&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 UI(this,void 0,void 0,(function*(){return!VI.isRooted(this.toolPath)&&(this.toolPath.includes("/")||WI&&this.toolPath.includes("\\"))&&(this.toolPath=HI.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield qI.which(this.toolPath,!0),new Promise(((e,t)=>UI(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)+FI.EOL);const n=new XI(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield VI.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=GI.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)}}))))}))}},LI.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 XI extends BI.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=zI.setTimeout(XI.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 KI=zn&&zn.__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]}),YI=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),JI=zn&&zn.__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)&&KI(t,e,r);return YI(t,e),t},QI=zn&&zn.__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(DI,"__esModule",{value:!0}),exports.getExecOutput_1=DI.getExecOutput=exports.exec_2=DI.exec=void 0;const ZI=Ln,eT=JI(LI);exports.exec_2=DI.exec=yt,exports.getExecOutput_1=DI.getExecOutput=function(e,t,r){var n,o;return QI(this,void 0,void 0,(function*(){let i="",s="";const a=new ZI.StringDecoder("utf8"),c=new ZI.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 yt(e,t,Object.assign(Object.assign({},r),{listeners:d}));return i+=a.end(),s+=c.end(),{exitCode:p,stdout:i,stderr:s}}))};var tT={},rT=zn&&zn.__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]}),nT=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),oT=zn&&zn.__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)&&rT(t,e,r);return nT(t,e),t},iT=zn&&zn.__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(tT,"__esModule",{value:!0}),tT.RetryHelper=void 0;const sT=oT(m());tT.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 iT(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;sT.info(n.message)}const o=this.getSleepAmount();sT.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 iT(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var aT=zn&&zn.__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]}),cT=zn&&zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),lT=zn&&zn.__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)&&aT(t,e,r);return cT(t,e),t},uT=zn&&zn.__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())}))},dT=zn&&zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hI,"__esModule",{value:!0}),hI.evaluateVersions=hI.isExplicitVersion=exports.findFromManifest_1=hI.findFromManifest=exports.getManifestFromRepo_1=hI.getManifestFromRepo=hI.findAllVersions=exports.find_1=hI.find=hI.cacheFile=exports.cacheDir_1=hI.cacheDir=exports.extractZip_1=hI.extractZip=hI.extractXar=exports.extractTar_1=hI.extractTar=hI.extract7z=exports.downloadTool_1=hI.downloadTool=exports.HTTPError_1=hI.HTTPError=void 0;const pT=lT(m()),fT=lT(mI),hT=lT(En),mT=lT(RI),yT=lT(bn),gT=lT(Sn),vT=lT(Wo),wT=lT(xI),bT=lT($n),ET=lT(Rn),_T=Nn,ST=dT((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||NI)();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||$I(o)})),OT=DI,IT=tT;class TT extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}exports.HTTPError_1=hI.HTTPError=TT;const xT="win32"===process.platform,RT="darwin"===process.platform;exports.downloadTool_1=hI.downloadTool=function(e,t,r,n){return uT(this,void 0,void 0,(function*(){t=t||gT.join(Ot(),ST.default()),yield fT.mkdirP(gT.dirname(t)),pT.debug("Downloading "+e),pT.debug("Destination "+t);const o=It("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=It("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new IT.RetryHelper(3,o,i);return yield s.execute((()=>uT(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return uT(this,void 0,void 0,(function*(){if(hT.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new vT.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(pT.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 TT(i.message.statusCode);throw pT.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=ET.promisify(bT.pipeline),a=It("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,hT.createWriteStream(t)),pT.debug("download complete"),c=!0,t}finally{if(!c){pT.debug("download failed");try{yield fT.rmRF(t)}catch(l){pT.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof TT&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},hI.extract7z=function(e,t,r){return uT(this,void 0,void 0,(function*(){_T.ok(xT,"extract7z() not supported on current OS"),_T.ok(e,'parameter "file" is required'),t=yield vt(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",pT.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield OT.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${gT.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 fT.which("powershell",!0);yield OT.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},exports.extractTar_1=hI.extractTar=function(e,t,r="xz"){return uT(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield vt(t),pT.debug("Checking tar --version");let n="";yield OT.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),pT.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],pT.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return xT&&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 OT.exec("tar",i),t}))},hI.extractXar=function(e,t,r=[]){return uT(this,void 0,void 0,(function*(){let n;_T.ok(RT,"extractXar() not supported on current OS"),_T.ok(e,'parameter "file" is required'),t=yield vt(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),pT.isDebug()&&n.push("-v");const o=yield fT.which("xar",!0);var i;return yield OT.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},exports.extractZip_1=hI.extractZip=function(e,t){return uT(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield vt(t),xT?yield function(e,t){return uT(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 fT.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(" ")];pT.debug("Using pwsh at path: "+o),yield OT.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 fT.which("powershell",!0);pT.debug("Using powershell at path: "+t),yield OT.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return uT(this,void 0,void 0,(function*(){const r=yield fT.which("unzip",!0),n=[e];pT.isDebug()||n.unshift("-q"),n.unshift("-o"),yield OT.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))},exports.cacheDir_1=hI.cacheDir=function(e,t,r,n){return uT(this,void 0,void 0,(function*(){if(r=wT.clean(r)||r,n=n||yT.arch(),pT.debug(`Caching tool ${t} ${r} ${n}`),pT.debug("source dir: "+e),!hT.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield wt(t,r,n);for(const t of hT.readdirSync(e)){const r=gT.join(e,t);yield fT.cp(r,o,{recursive:!0})}return bt(t,r,n),o}))},hI.cacheFile=function(e,t,r,n,o){return uT(this,void 0,void 0,(function*(){if(n=wT.clean(n)||n,o=o||yT.arch(),pT.debug(`Caching tool ${r} ${n} ${o}`),pT.debug("source file: "+e),!hT.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield wt(r,n,o),s=gT.join(i,t);return pT.debug("destination file "+s),yield fT.cp(e,s),bt(r,n,o),i}))},exports.find_1=hI.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||yT.arch(),Et(t)||(t=_t(gt(e,r),t));let n="";if(t){t=wT.clean(t)||"";const o=gT.join(St(),e,t,r);pT.debug("checking cache: "+o),hT.existsSync(o)&&hT.existsSync(o+".complete")?(pT.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):pT.debug("not found")}return n},hI.findAllVersions=gt,exports.getManifestFromRepo_1=hI.getManifestFromRepo=function(e,t,r,n="master"){return uT(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new vT.HttpClient("tool-cache"),a={};r&&(pT.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){pT.debug("Invalid json")}}return o}))},exports.findFromManifest_1=hI.findFromManifest=function(e,t,r,n=yT.arch()){return uT(this,void 0,void 0,(function*(){return yield mT._findMatch(e,t,r,n)}))},hI.isExplicitVersion=Et,hI.evaluateVersions=_t;var PT={};Object.defineProperty(PT,"__esModule",{value:!0}),PT.retryAsPromised=PT.TimeoutError=void 0;let AT=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};PT.TimeoutError=AT,PT.retryAsPromised=Tt;var CT=PT.default=Tt;let NT;const $T=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||En.mkdir,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||En.stat,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||En.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||En.mkdirSync,t},DT=(e,t,r)=>{const n=Sn.dirname(e),o={...$T(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 DT(e,o,DT(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}}},LT=Object.assign((async(e,t,r)=>{const n=$T(t);n.recursive=!1;const o=Sn.dirname(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 LT(o,n).then((t=>LT(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:DT}),kT=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?kT(e,Sn.dirname(t),t):void 0))},jT=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?jT(e,Sn.dirname(t),t):void 0}},MT=(e,t)=>{const r=$T(t);if(r.recursive=!0,Sn.dirname(e)===e)return r.mkdirSync(e,r);const n=jT(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return DT(e,r);throw o}},UT=Object.assign((async(e,t)=>{const r={...$T(t),recursive:!0};return Sn.dirname(e)===e?await r.mkdirAsync(e,r):kT(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return LT(e,r);throw t}))))}),{sync:MT}),FT=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,BT=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=Sn.resolve(e),"win32"===FT){const t=/[*|"<>?:]/,{root:r}=Sn.parse(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},GT=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),HT=+GT[0]>10||10==+GT[0]&&+GT[1]>=12,qT=HT?e=>$T(e).mkdirSync===En.mkdirSync:()=>!1,VT=Object.assign(HT?e=>$T(e).mkdir===En.mkdir:()=>!1,{sync:qT}),zT=(e,t)=>{e=BT(e);const r=$T(t);return qT(r)?MT(e,r):DT(e,r)},WT=Object.assign((async(e,t)=>{e=BT(e);const r=$T(t);return VT(r)?UT(e,r):LT(e,r)}),{mkdirpSync:zT,mkdirpNative:UT,mkdirpNativeSync:MT,mkdirpManual:LT,mkdirpManualSync:DT,sync:zT,native:UT,nativeSync:MT,manual:LT,manualSync:DT,useNative:VT,useNativeSync:qT}),XT=/v?(\d\S*)/,KT="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",YT={llvm:KT,clang:KT,"clang++":KT,"clang-tidy":KT,clangtidy:KT,"clang-format":KT,clangformat:KT,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:Le()?"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"},JT="22.2.0",QT="3.7.9",ZT={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"}},ex=$d((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 exports.getExecOutput_1(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Sn.join(r,"Scripts"),Sn.join(r,"Scripts","bin"),Sn.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var tx={};Object.defineProperty(tx,"__esModule",{value:!0});var rx=tx.getUbuntuVersion=void 0;const nx=An;rx=tx.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{nx.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 ox=$d((async function(){try{if(ke()){try{null===oc.sync("lsb_release",{nothrow:!0})&&await Te([{name:"lsb-release"}])}catch{return zt()}const e=await rx();return 0===e.length?zt():e}return null}catch(e){return g(""+e),null}}),{promise:!0}),ix=$d((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=te("~/.local/pipx");if(await ee(t))return t;switch(process.platform){case"win32":e=te("~/AppData/Local/pipx");break;case"darwin":e=te("~/Library/Application Support/pipx");break;default:e=te("~/.local/share/pipx")}return await WT(e),await WT(Sn.join(e,"trash")),await WT(Sn.join(e,"shared")),await WT(Sn.join(e,"venv")),e}),{promise:!0}),sx=$d((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=te("~/.local/bin");return await se(e,Yx),await WT(e),e}),{promise:!0});let ax;const cx=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"]]]),lx=$d((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||bn.release()).split(".")[0];const[t,r]=cx.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),ux="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),dx="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),px="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href));class fx extends Error{constructor(e){super(e),this.name="TimeoutError"}}class hx extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const mx=e=>void 0===globalThis.DOMException?new hx(e):new DOMException(e),yx=e=>{const t=void 0===e.reason?mx("This operation was aborted."):e.reason;return t instanceof Error?t:mx(t)},gx=m(),vx=An,wx=En,bx=Sn,Ex=Cn,_x=Ex.env["ProgramFiles(x86)"],Sx=[Ex.env["ProgramFiles(x86)"],Ex.env.ProgramFiles],Ox=["Enterprise","Professional","Community","BuildTools"],Ix=["2022","2019","2017"],Tx={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var xx=vr;const Rx=_x+"\\Microsoft Visual Studio\\Installer";var Px=br,Ax=function(e,t,r,n,o,i){if("win32"!=Ex.platform)return void gx.info("This is not a Windows virtual environment, bye!");Ex.env.PATH+=bx.delimiter+Rx;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=`"${br(i)}" ${a.join(" ")}`;gx.debug("vcvars command-line: "+c);const l=(""+vx.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}gx.startGroup("Environment variables");for(let m of p){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(gx.info("Setting "+e),Er(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),gx.exportVariable(e,t))}gx.endGroup(),gx.info("Configured Developer Command Prompt")},Cx=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Cx||{});const Nx="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),$x="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href)),Dx=$d((async function(e,t,r){const[n,o]=await Promise.all([Rr(e,t,r),Ar()]);return await kx(r),n}),{promise:!0}),Lx=$d((async function(e){if(ke())if(e>10)await Te([{name:"libtinfo-dev"}]);else try{await Te([{name:"libtinfo5"}])}catch(t){w(`Failed to install libtinfo5 ${t}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${cI.includes(process.arch)?"amd64":uI.includes(process.arch)?"arm64":process.arch}.deb`,r="http://launchpadlibrarian.net/666971015/"+e,n=new Mh.DownloaderHelper(r,bn.tmpdir(),{fileName:e});n.on("error",(e=>{throw Error(`Failed to download ${r}: ${e}`)})),await n.start(),j("dpkg",["-i",Sn.join(bn.tmpdir(),e)])}else Le()?await Qe("ncurses5-compat-libs",void 0,"yay"):De()&&await Je([{name:"ncurses-compat-libs"}])}),{promise:!0}),kx=$d((async function(e){"linux"===process.platform&&await cr(qt("gcc",void 0,await ox()),"",e,40)}),{promise:!0}),jx="string"==typeof __dirname?__dirname:Sn.dirname(Dn.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Bn&&Bn.src||new URL("setup-cpp.js",document.baseURI).href));let Mx,Ux=!1;const Fx={llvm:Ir,clang:Ir,"clang++":Ir},Bx={gcc:cr,"g++":cr},Gx={mingw:lr},Hx={msvc:Cr,cl:Cr,msbuild:Cr,visualstudio:Cr},qx={appleclang:gr,applellvm:gr,"apple-clang":gr,"apple-llvm":gr},Vx={cmakelang:Zt,"cmake-lint":Zt,"cmake-format":Zt,cmakelint:Zt,cmakeformat:Zt},zx=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],Wx={nala:async function(e,t,r){if(!ke())return;if("string"==typeof Mx)return{binDir:Mx};const n=oc.sync("nala",{nothrow:!0});if(null!==n)return Mx=Sn.dirname(n),{binDir:Mx};await Te([{name:"python3-apt"}]),Mx="/usr/bin";try{const t=await Oe({name:"nala",version:e});if(void 0!==t)return await Te([{name:t}]),{binDir:Mx}}catch(o){w("Failed to install nala: "+o)}try{const e=await Oe({name:"nala-legacy"});if(void 0!==e)return await Te([{name:e}],!0),{binDir:Mx}}catch(o){w("Failed to install nala-legacy: "+o)}return await async function(){const e=new Mh.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",bn.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Sn.join(bn.tmpdir(),"install-nala.sh"),r=await _a(t,"utf8");await Na(t,r.replace(/sudo/g,"")),await Te([{name:"wget"}]);try{j("bash",[t])}catch(o){y("Failed to install nala via installer: "+o),j("apt",["install","-y","-t","nala","nala"])}}(),{binDir:Mx}},brew:Ae,choco:Ke,python:Mt,powershell:Lr,pwsh:Lr,...Fx,...Bx,...Gx,...Hx,...qx,...Vx,cmake:Lt,ninja:fr,vcpkg:async function(e,t,r){return Ux&&null!==oc.sync("vcpkg",{nothrow:!0})?{binDir:Sn.dirname(oc.sync("vcpkg"))}:("linux"===process.platform&&(Le()?await Promise.all([Qe("curl"),Qe("zip"),Qe("unzip"),Qe("tar"),Qe("git"),Qe("pkg-config")]):De()?await Je([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):ke()&&await Te([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await ee(Sn.join(t,st("bootstrap-vcpkg",".bat")))?v(`Vcpkg folder already exists at ${t}. Skipping the clone`):GO("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Sn.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(w("Checking out vcpkg version "+e),GO("git",["checkout",e],{cwd:t,stdio:"inherit"})),GO(st(at("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await G(t),await se(t,Yx),Ux=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ye("bazelisk",e);case"darwin":return $e("bazelisk",e);case"linux":if(Le())throw Error("installing bazel on Arch linux is not supported yet");if(De())return await Je([{name:"dnf-plugins-core"}]),j("dnf",["copr","enable","vbatts/bazel"]),Je([{name:"bazel4"}]);if(ke())return j("bash",["-c",`echo "deb [arch=amd64 signed-by=${await xe({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`]),Te([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Wt("conan",e)},meson:function(e,t,r){return Wt("meson",e)},gcovr:function(e,t,r){return Wt("gcovr",e)},opencppcoverage:Nr,OpenCppCoverage:Nr,ccache:function(e,t,r){switch(process.platform){case"win32":return Ye("ccache",e);case"darwin":return $e("ccache",e);case"linux":if(Le())return Qe("ccache",e);if(De())return Je([{name:"ccache",version:e}]);if(ke())return Te([{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 Ye("sccache",e);case"linux":case"darwin":return $e("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await CT((()=>Ye("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 ee(Sn.join(e,"doxygen.exe")))return await se(e,Yx),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await er(qt("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return lx()[0]>11&&await er(qt("graphviz",void 0)),e}case"linux":{let o;if(""===e||Le()||De())if(Le())o=await Qe("doxygen",e);else{if(De())return Je([{name:"doxygen",version:e}]);if(!ke())throw Error("Unsupported linux distributions");o=await Te([{name:"doxygen",version:e}])}else{if(!ke())throw Error("Unsupported linux distributions");try{o=await $t("doxygen",e,rr,t,r);try{await Te([{name:"libclang-cpp9"}])}catch(n){w("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){v(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Te([{name:"doxygen"}])}}return await er(qt("graphviz",void 0,await ox())),o}default:throw Error("Unsupported platform")}},graphviz:er,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ye("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await se(e,Yx),e}()};case"darwin":return $e("cppcheck",e);case"linux":if(Le())return Qe("cppcheck",e);if(De())return Je([{name:"ccache",version:e}]);if(ke())return Te([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Wt("cpplint",e)},flawfinder:function(e,t,r){return Wt("flawfinder",e)},lizard:function(e,t,r){return Wt("lizard",e)},infer:function(e,t,r){return $t("infer",e,dr,t,r)},"clang-tidy":xr,clangtidy:xr,"clang-format":Tr,clangformat:Tr,vcvarsall:_r,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 $t("kcov",o,mr,t,r),a):(a=await $t("kcov",o,hr,t,r),Le()?await Qe("binutils"):De()?await Je([{name:"binutils"}]):ke()&&await Te([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ye("make",e);case"darwin":{await $e("make",e);const t=Sn.join(Ne(),"opt/make/libexec/gnubin");return await se(t,Yx),{binDir:t}}case"linux":if(Le())return Qe("make",e);if(De())return Je([{name:"make",version:e}]);if(ke())return Te([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return $t("task",e,kr,t,r)},sevenzip:xt,"7zip":xt,"7z":xt},Xx=Object.keys(Wx),Kx=["compiler","architecture","timeout",...Xx],Yx={rcPath:te("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();Wn.GITHUB_ACTIONS||(o=async function(){try{await kh({pkg:jh})}catch(e){g("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const i=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=me(t.string),t.boolean=me(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=me(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);ye(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:[...Kx,"timeout"],default:Object.fromEntries(Kx.map((e=>[e,jr(e)]))),alias:{h:"help"},boolean:"help"})}(e);i.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 s=null!=(t=i.architecture)?t:process.arch,a=null!=(r=process.env.SETUP_CPP_DIR)?r:te("~"),c=[],l=[],u=dp.create({autoloadLocales:!0});let d,p;dp.addLocale(pp),rp.addLocale(op);const f=await ox(),h=void 0!==i.compiler?function(e){try{const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null===Lp(e)&&w(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}catch(t){return y(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(i.compiler):void 0;if(!function(e,t,r){var n,o;const i=void 0!==r&&t.includes(r.compiler),s=(i?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),a=s.filter((t=>!Vt(i&&"compiler"===t&&void 0!==r?r.version:e[t]))),c=0!==a.length?i&&"compiler"===a[0]&&void 0!==r?null!=(n=r.version)?n:"true":null!=(o=e[a[0]])?o:"true":"true";if(a.some((t=>i&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${c}`:e[t]!==c)))return!1;for(const l of s)e[l]=i&&"compiler"===l&&void 0!==r?`${r.compiler}-${c}`:c;return!0}(i,[...zx,"compiler"],h))return y("The same version must be used for llvm, clang-format and clang-tidy"),1;Le()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(w("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Qe("python-pygments"));let m=!1;for(const y of Xx){if(Wn.isCI&&0!==l.length){m=!0;break}const e=i[y];void 0!==e&&(d=Date.now(),await Sr(y,e,f,s,a,c,l,6e4*Number.parseFloat(null!=(n=i.timeout)?n:"20")),p=Date.now(),w("took "+(u.format(d,p)||"0 seconds")))}if(!m&&void 0!==h){const e=Date.now();await async function(e,t,r,n,o,i,s){let a;try{if(ai.startGroup(`Installing ${e} ${null!=t?t:""}`),e in Fx)a=await Ir(qt("llvm",t,r),Sn.join(n,"llvm"),o),await oe("GCOV","llvm-cov gcov",Yx);else if(e in Bx){const e=qt("gcc",t,r);a=await cr(e,Sn.join(n,"gcc"),o),await ur(e)}else if(e in Gx){const e=qt("mingw",t,r);a=await lr(e,Sn.join(n,"gcc"),o),await ur(e)}else e in Hx?a=await Cr(qt("msvc",t,r),Sn.join(n,"msvc"),o):e in qx?await gr():(a=null,s.push("Unsupported compiler "+e))}catch(c){y(c),s.push(`Failed to install the ${e} ${t}`)}null!==a&&i.push(Mr(e,a)),ai.endGroup()}(h.compiler,h.version,f,a,s,c,l);const t=Date.now();w("took "+(u.format(e,t)||"0 seconds"))}if(await async function(e){if(await ee(e.rcPath)){const t=(await kd(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await jd(e.rcPath,r.join("\n")),await G(e.rcPath)}}(Yx),0===c.length&&0===l.length)return g("setup-cpp was called without any arguments. Nothing to do."),0;for(const y of c)console.log(`${y}`);for(const g of l)y(g);if(w("setup-cpp finished"),!Wn.GITHUB_ACTIONS)switch(process.platform){case"win32":g("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":g("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await o,0===l.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{y("main() panicked!"),y(e),process.exitCode=1})),exports.HttpClient=Vo,exports.ciInfo=Wn,exports.commonjsGlobal=zn,exports.coreExports=ai,exports.getAugmentedNamespace=r,exports.getDefaultExportFromCjs=t,exports.info=w,exports.pathExists=ee,exports.semver=vh,exports.warning=g;
//# sourceMappingURL=setup-cpp.js.map