functione(e){returne&&e.__esModule?e.default:e}functiont(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}functionr(e,t,o){if("function"==typeoft&&(o=t,t={}),!o){if("function"!=typeofPromise)thrownewTypeError("callback not provided");returnnewPromise(((o,n)=>{r(e,t||{},((e,t)=>{e?n(e):o(t)}))}))}Ne(e,t||{},((e,r)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),o(e,r)}))}functiono(t,r,o){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeofMe)return{binDir:Me};constn=e(Te).sync("brew",{nothrow:!0});returnnull!==n?(Me=ue.dirname(n),{binDir:Me}):(de.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),Me="/usr/local/bin/",{binDir:Me})}functionn(e,t){constr=e.options.env||process.env,o=process.cwd(),n=null!=e.options.cwd,s=n&&void0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}leti;try{i=Te.sync(e.command,{path:r[Ve({env:r})],pathExt:t?ue.delimiter:void0})}catch(e){}finally{s&&process.chdir(o)}returni&&(i=ue.resolve(n?e.options.cwd:"",i)),i}functions(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args})}functioni(e,t){returnQe&&1===e&&!t.file?s(t.original,"spawn"):null}functiona(e,t,r){consto=Be(e,t,r),n=de.spawn(o.command,o.args,o.options);returnKe.hookChildProcess(n,o),n}functionc(){At&&(At=!1,$t.forEach((e=>{try{process.removeListener(e,Tt[e])}catch(e){}})),process.emit=Nt,process.reallyExit=It,_t.count-=1)}functionl(e,t,r){_t.emitted[e]||(_t.emitted[e]=!0,_t.emit(e,t,r))}functionu(){At||(At=!0,_t.count+=1,$t=$t.filter((e=>{try{returnprocess.on(e,Tt[e]),!0}catch(e){return!1}})),process.emit=d,process.reallyExit=p)}functionp(e){process.exitCode=e||0,l("exit",process.exitCode,null),l("afterexit",process.exitCode,null),It.call(process,process.exitCode)}functiond(e,t){if("exit"===e){void0!==t&&(process.exitCode=t);varr=Nt.apply(this,arguments);returnl("exit",process.exitCode,null),l("afterexit",process.exitCode,null),r}returnNt.apply(this,arguments)}asyncfunctionh(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,o=Vt(t);returnawaitnewPromise(((t,n)=>{consts=e=>{e&&o.getBufferedLength()<=Ht.MAX_LENGTH&&(e.bufferedData=o.getBufferedValue()),n(e)};(async()=>{try{awaitWt(e,o),t()}catch(e){s(e)}})(),o.on("data",(()=>{o.getBufferedLength()>r&&s(newYt)}))})),o.getBufferedValue()}functionf(t,r){returnvoid0!==gr||(gr=!!process.env.CI||0===(null===(o=process.getuid)||void0===o?void0:o.call(process))),gr?e(Ge)("sudo",[t,...r]):e(Ge)(t,r);varo}asyncfunctionm(e,t,r=!0){consto="apt-get";if("string"==typeofr&&awaitf("add-apt-repository",["--update","-y",r]),yr&&!0!==r||(awaitf(o,["update","-y"]),yr=!0),void0!==t&&""!==t)try{awaitf(o,["install","-y",`${e}=${t}`])}catch{awaitf(o,["install","-y",`${e}-${t}`])}elseawaitf(o,["install","-y",e]);return{binDir:"/usr/bin/"}}functionv(t,r){returnxr&&null!==e(Te).sync("brew",{nothrow:!0})||(o(0,0,process),xr=!0),e(Ge).sync("brew",["install",void0!==r&&""!==r?`${t}@${r}`:t]),{binDir:"/usr/local/bin/"}}asyncfunctiong(t){try{Ce.addPath(t)}catch(r){switch(Ce.error(r),process.platform){case"win32":awaite(Ge)(`setx PATH=${t};%PATH%`);break;case"linux":case"darwin":awaite(Ge).command(`echo "export PATH=${t}:$PATH" >> ~/.profile`),awaite(Ge).command("source ~/.profile"),Ce.info(t+" was added to ~/.profile");break;default:Ce.error(`Failed to add ${t} to the percistent PATH. You should add it manually.`),process.env.PATH=`${t}${ue.delimiter}${process.env.PATH}`}}}functiony(t,r,o){if("win32"!==process.platform)return;if("string"==typeofwr)return{binDir:wr};constn=e(Te).sync("choco",{nothrow:!0});if(null!==n)returnwr=ue.dirname(n),{binDir:wr};e(Ge).commandSync('@"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"-NoProfile-InputFormatNone-ExecutionPolicyBypass-Command"[System.Net.ServicePointManager]::Se