ErrorMessage:${e.result.message}`);}),i=null===(t=n.result)||void 0===t?void 0:t.value;if(!i)throw Error("Response json body do not have ID Token field");return i;});}static getIDToken(e){return r(this,void 0,void 0,function*(){try{let t=s.getIDTokenUrl();if(e){let r=encodeURIComponent(e);t=`${t}&audience=${r}`;}o.debug(`IDtokenurlis${t}`);let r=yield s.getCall(t);return o.setSecret(r),r;}catch(e){throw Error(`Errormessage:${e.message}`);}});}}e.exports.OidcClient=s;}),F.register("3bels",function(e,t){"use strict";var r,n,i,o,s,a=e.exports&&e.exports.__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];}),l=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),c=e.exports&&e.exports.__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)&&a(t,e,r);return l(t,e),t;},u=e.exports&&e.exports.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e));}catch(e){o(e);}}function a(e){try{l(n.throw(e));}catch(e){o(e);}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t);})).then(s,a);}l((n=n.apply(e,t||[])).next());});};Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.HttpClient=e.exports.isHttps=e.exports.HttpClientResponse=e.exports.HttpClientError=e.exports.getProxyUrl=e.exports.MediaTypes=e.exports.Headers=e.exports.HttpCodes=void 0;let p=c(h),d=c(m),f=c(F("ht6Lg")),v=c(F("eYDoL"));(r=i=e.exports.HttpCodes||(e.exports.HttpCodes={}))[r.OK=200]="OK",r[r.MultipleChoices=300]="MultipleChoices",r[r.MovedPermanently=301]="MovedPermanently",r[r.ResourceMoved=302]="ResourceMoved",r[r.SeeOther=303]="SeeOther",r[r.NotModified=304]="NotModified",r[r.UseProxy=305]="UseProxy",r[r.SwitchProxy=306]="SwitchProxy",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",r[r.BadRequest=400]="BadRequest",r[r.Unauthorized=401]="Unauthorized",r[r.PaymentRequired=402]="PaymentRequired",r[r.Forbidden=403]="Forbidden",r[r.NotFound=404]="NotFound",r[r.MethodNotAllowed=405]="MethodNotAllowed",r[r.NotAcceptable=406]="NotAcceptable",r[r.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",r[r.RequestTimeout=408]="RequestTimeout",r[r.Conflict=409]="Conflict",r[r.Gone=410]="Gone",r[r.TooManyRequests=429]="TooManyRequests",r[r.InternalServerError=500]="InternalServerError",r[r.NotImplemented=501]="NotImplemented",r[r.BadGateway=502]="BadGateway",r[r.ServiceUnavailable=503]="ServiceUnavailable",r[r.GatewayTimeout=504]="GatewayTimeout",(n=o=e.exports.Headers||(e.exports.Headers={})).Accept="accept",n.ContentType="content-type",(s=e.exports.MediaTypes||(e.exports.MediaTypes={})).ApplicationJson="application/json",e.exports.getProxyUrl=function(e){let t=f.getProxyUrl(new URL(e));return t?t.href:"";};let g=[i.MovedPermanently,i.ResourceMoved,i.SeeOther,i.TemporaryRedirect,i.PermanentRedirect],E=[i.BadGateway,i.ServiceUnavailable,i.GatewayTimeout],y=["OPTIONS","GET","DELETE","HEAD"];class w extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,w.prototype);}}e.exports.HttpClientError=w;class x{constructor(e){this.message=e;}readBody(){return u(this,void 0,void 0,function*(){return new Promise(e=>u(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on("data",e=>{t=Buffer.concat([t,e]);}),this.message.on("end",()=>{e(t.toString());});}));});}}e.exports.HttpClientResponse=x,e.exports.isHttps=function(e){let t=new URL(e);return"https:"===t.protocol;},e.exports.HttpClient=class{constructor(e,t,r){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=t||[],this.requestO
${n.message}`:m,E=[g,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=g,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;};var eX={};"use strict";const ez=["stdin","stdout","stderr"],eK=e=>ez.some(t=>void 0!==e[t]),eW=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return ez.map(t=>e[t]);if(eK(e))throw Error(`It'snotpossibletoprovide\`stdio\` in combination with one of ${ez.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);letr=Math.max(t.length,ez.length);returnArray.from({length:r},(e,r)=>t[r]);};(eX=eW).node=e=>{lett=eW(e);return"ipc"===t?"ipc":void0===t||"string"==typeoft?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"];};vareY={},eQ={},eJ=U.process;consteZ=function(e){returne&&"object"==typeofe&&"function"==typeofe.removeListener&&"function"==typeofe.emit&&"function"==typeofe.reallyExit&&"function"==typeofe.listeners&&"function"==typeofe.kill&&"number"==typeofe.pid&&"function"==typeofe.on;};if(eZ(eJ)){vare0,e1,e2=F("1YMV0"),e4=/^win/i.test(eJ.platform),e3=g;"function"!=typeofe3&&(e3=e3.EventEmitter),eJ.__signal_exit_emitter__?e1=eJ.__signal_exit_emitter__:((e1=eJ.__signal_exit_emitter__=newe3()).count=0,e1.emitted={}),e1.infinite||(e1.setMaxListeners(1/0),e1.infinite=!0);vare6=function(){e8&&eZ(U.process)&&(e8=!1,e2.forEach(function(e){try{eJ.removeListener(e,e7[e]);}catch(e){}}),eJ.emit=tr,eJ.reallyExit=te,e1.count-=1);};(eQ=function(e,t){if(!eZ(U.process))returnfunction(){};E.equal(typeofe,"function","a callback must be provided for exit handler"),!1===e8&&e9();varr="exit";returnt&&t.alwaysLast&&(r="afterexit"),e1.on(r,e),function(){e1.removeListener(r,e),0===e1.listeners("exit").length&&0===e1.listeners("afterexit").length&&e6();};}).unload=e6;vare5=function(e,t,r){e1.emitted[e]||(e1.emitted[e]=!0,e1.emit(e,t,r));},e7={};e2.forEach(function(e){e7[e]=function(){eZ(U.process)&&eJ.listeners(e).length===e1.count&&(e6(),e5("exit",null,e),e5("afterexit",null,e),e4&&"SIGHUP"===e&&(e="SIGINT"),eJ.kill(eJ.pid,e));};}),eQ.signals=function(){returne2;};vare8=!1,e9=function(){!e8&&eZ(U.process)&&(e8=!0,e1.count+=1,e2=e2.filter(function(e){try{returneJ.on(e,e7[e]),!0;}catch(e){return!1;}}),eJ.emit=tn,eJ.reallyExit=tt);};eQ.load=e9;varte=eJ.reallyExit,tt=function(e){eZ(U.process)&&(eJ.exitCode=e||0,e5("exit",eJ.exitCode,null),e5("afterexit",eJ.exitCode,null),te.call(eJ,eJ.exitCode));},tr=eJ.emit,tn=function(e,t){if(!("exit"===e&&eZ(U.process)))returntr.apply(this,arguments);void0!==t&&(eJ.exitCode=t);varr=tr.apply(this,arguments);returne5("exit",eJ.exitCode,null),e5("afterexit",eJ.exitCode,null),r;};}elseeQ=function(){returnfunction(){};};"use strict";"use strict";constti=(e,t,r,n)=>{if(!to(t,r,n))return;leti=ta(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},to=(e,{forceKillAfterTimeout:t},r)=>ts(e)&&!1!==t&&r,ts=e=>e===u.constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),ta=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},tl=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},tc=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=eQ(()=>{e.kill();});returnn.finally(()=>{i();});};vartu=(eY={spawnedKill:(e,t="SIGTERM",r={})=>{letn=e(t);returnti(e,t,r,n),n;},spawnedCancel:(e,t)=>{letr=e.kill();r&&(t.isCanceled=!0);},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;if(0===t||void0===t)returnn;leto=newPromise((n,o)=>{i=setTimeout(()=>{tl(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});returnPromise.race([o,s]);},validateTimeout:({timeout:e})=>{if(void0!==e&&(!Number.isFin
${t}`,rx=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),rb=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),rS=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=rw.bind(null,n,t.toString());Object.defineProperty(i,"name",rb),Object.defineProperty(e,"toString",{...rx,value:i});},rI=new WeakMap(),rR=(e,t={})=>{let r;if("function"!=typeof e)throw TypeError("Expected a function");let n=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(rI.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function\`${i}\` can only be called once`);returnr;};returnfunction(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(letnofReflect.ownKeys(t))rg(e,t,n,r);ry(e,t),rS(e,t,n);}(o,e),rI.set(o,n),o;};rR.callCount=e=>{if(!rI.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnrI.get(e);};constrO=()=>Array.from({length:rC-rT+1},r$),r$=(e,t)=>({name:`SIGRT${t+1}`,number:rT+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),rT=34,rC=64,rA=[{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:"termina
${n.message}`:m,E=[g,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=g,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;},rM=["stdin","stdout","stderr"],rF=e=>rM.some(t=>void 0!==e[t]),rG=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return rM.map(t=>e[t]);if(rF(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${rM.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,rM.length);return Array.from({length:r},(e,r)=>t[r]);},rB=(e,t="SIGTERM",r={})=>{let n=e(t);return rH(e,t,r,n),n;},rH=(e,t,r,n)=>{if(!rV(t,r,n))return;let i=rX(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},rV=(e,{forceKillAfterTimeout:t},r)=>rq(e)&&!1!==t&&r,rq=e=>e===k(N).constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),rX=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e;},rz=(e,t)=>{let r=e.kill();r&&(t.isCanceled=!0);},rK=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},rW=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{let i;if(0===t||void 0===t)return n;let o=new Promise((n,o)=>{i=setTimeout(()=>{rK(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});return Promise.race([o,s]);},rY=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);},rQ=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=k(eQ)(()=>{e.kill();});return n.finally(()=>{i();});};function rJ(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe;}function rZ(e){return rJ(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState;}const r0=e=>e instanceof C.ChildProcess&&"function"==typeof e.then,r1=(e,t,r)=>{if("string"==typeof r)return e[t].pipe((0,w.createWriteStream)(r)),e;if(rZ(r))return e[t].pipe(r),e;if(!r0(r))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!rZ(r.stdin))throw TypeError("The target child process'sstdinmustbeavailable.");return e[t].pipe(r.stdin),r;},r2=e=>{null!==e.stdout&&(e.pipeStdout=r1.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=r1.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=r1.bind(void 0,e,"all"));},r4=e=>{if(void 0!==e)throw TypeError("The`input`and`inputFile`optionscannotbebothset.");},r3=({input:e,inputFile:t})=>"string"!=typeof t?e:(r4(e),(0,w.readFileSync)(t)),r6=e=>{let t=r3(e);if(rJ(t))throw TypeError("The`input`optioncannotbeastreaminsyncmode");return t;},r5=({input:e,inputFile:t})=>"string"!=typeof t?e:(r4(e),(0,w.createReadStream)(t)),r7=(e,t)=>{let r=r5(t);void 0!==r&&(rJ(r)?r.pipe(e.stdin):e.stdin.end(r));},r8=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=k(tO)();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},r9=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t;}catch(e){return e.bufferedData;}}},ne=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?k(tE)(e,{encoding:t,maxBuffer:n}):k(tE).buffer(e,{maxBuffer:n});},nt=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{let a=ne(e,{encoding:n,buffer:i,maxBuffer:o}),l=ne(t,{encoding:n,buffer:i,maxBuffer:o}),c=ne(r,{encoding:n,buffer:i,maxBuffer:2*o});try{return await Promise.all([s,a,l,c]);}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},r9(e,a),r9(t,l),r9(r,c)]);}},nr=(async()=>{})().constructor.prototype,nn=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(nr,e)]),ni=(e,t)=>{for(let[r,n]of nn){let i="function"==typ
`),(0,rf.info)(`${e}="${n}"wasaddedto"${nF}`));return;}process.env[e]=n;}async function nB(e){switch(process.platform){case"win32":await nT(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),(0,rf.info)(`"${e}" was added to the PATH.`);return;case"linux":case"darwin":awaitnV(),(0,d.appendFileSync)(nF,`
`;try{let e=t2(".profile");(0,d.appendFileSync)(e,t),(0,rf.info)(`${t}wasaddedto${e}`);let r=t2(".bashrc");(0,d.appendFileSync)(r,t),(0,rf.info)(`${t}wasaddedto${r}`);}catch(e){(0,B.warning)(`Failedtoadd${t}to.profileor.bashrc.Youshouldadditmanually:${e}`);}nH=!0;}async function nq(){if(await(0,nk.pathExists)(nF)){let e=(0,d.readFileSync)(nF,"utf-8").split("\n"),t=[...new Set(e.reverse())].reverse();(0,d.writeFileSync)(nF,t.join("\n"));try{nL(nF);}catch{}}}var nk=F("dOmbL"),nX=F("9ag04"),B=F("ER74K"),nz={},nK=p.join,nW=p.delimiter,nY=p.sep,nQ=p.posix;const nJ="win32"===process.platform,nZ=new RegExp(`[${nQ.sep}${nY===nQ.sep?"":nY}]`.replace(/(\\)/g,"\\$1")),n0=RegExp(`^\\.${nZ.source}`),n1=e=>Object.assign(Error(`notfound:${e}`),{code:"ENOENT"}),n2=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=nW})=>{let i=e.match(nZ)?[""]:[...(nJ?[process.cwd()]:[]),...(t||"").split(n)];if(nJ){let t=r||[".EXE",".CMD",".BAT",".COM"].join(n),o=t.split(n).reduce((e,t)=>(e.push(t),e.push(t.toLowerCase()),e),[]);return e.includes(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:t};}return{pathEnv:i,pathExt:[""]};},n4=(e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e,n=!r&&n0.test(t)?t.slice(0,2):"";return n+nK(r,t);},n3=async(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=n2(e,t),o=[];for(let s of r){let r=n4(s,e);for(let e of n){let n=r+e,s=await J(n,{pathExt:i,ignoreErrors:!0});if(s){if(!t.all)return n;o.push(n);}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw n1(e);};nz=n3,n3.sync=(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=n2(e,t),o=[];for(let s of r){let r=n4(s,e);for(let e of n){let n=r+e,s=J.sync(n,{pathExt:i,ignoreErrors:!0});if(s){if(!t.all)return n;o.push(n);}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw n1(e);};const{appendFile:n6}=d.promises;let n5=!1,n7=!1;async function n8(e,t=!1){let r=ie()?"nala":"apt-get";for(let{name:t,version:n}of e)(0,B.info)(`Installing${t}${n??""}via${r}`);process.env.DEBIAN_FRONTEND="noninteractive",(!n5||t)&&(it(r),n5=!0),n7||(await ir(r),n7=!0);let n=[...new Set(e.flatMap(e=>e.repositories??[]))];if(0!==n.length){for(let e of n)t0("add-apt-repository",["-y",e]);it(r);}let i=await Promise.all(e.map(e=>n9(e.name,e.version)));return t0(r,["install","--fix-broken","-y",...i]),{binDir:"/usr/bin/"};}async function n9(e,t){if(void 0!==t&&""!==t){let{stdout:r}=await nI("apt-cache",["search","--names-only",`^${(0,nX.default)(e)}-${(0,nX.default)(t)}$`]);if(""!==r.trim())return`${e}-${t}`;try{let{stdout:r}=await nI("apt-cache",["show",`${e}=${t}`]);if(""===r.trim())return`${e}=${t}`;}catch{}(0,B.warning)(`Failedtoinstall${e}${t}viaapt,tryingwithoutversion`);}return e;}function ie(){return null!==k(nz).sync("nala",{nothrow:!0});}function it(e){t0(e,"nala"!==e?["update","-y"]:["update"]);}async function ir(e){t0(e,["install","--fix-broken","-y","software-properties-common","apt-utils","ca-certificates","gnupg"]);let t=[io(["3B4FE6ACC0B21F32","40976EAF437D05B5"],"setup-cpp-ubuntu-archive.gpg"),io(["1E9377A2BA9EF27F"],"launchpad-toolchain.gpg")];"nala"===e&&t.push(nj("LANG","C.UTF-8",{shouldAddOnlyIfNotDefined:!0}),nj("LC_ALL","C.UTF-8",{shouldAddOnlyIfNotDefined:!0})),await Promise.all(t);}function ii(){t0("gpg",["-k"]);}async function io(e,t,r="keyserver.ubuntu.com"){try{let n=`/etc/apt/trusted.gpg.d/${t}`;return(await(0,nk.pathExists)(n))||(ii(),await Promise.all(e.map(async e=>{await t1("gpg",["--no-default-keyring","--keyring",`gnupg-ring:${n}`,"--keyserver",r,"--recv-keys",e]),await t1("chmod",["644",n]);}))),n;}catch(e){(0,B.warning)(`Failedtoaddaptkeyviaserver${r}:${e}`);return;}}async function is(e,t){let r=`/etc/apt/trusted.gpg.d/${e}`;return(await(0,nk.pathExists)(r))||(ii(),await n8([{name:"curl"},{name:"ca-certificates"}],void 0),await nI("curl",["-s",t,"-o",`/tmp/${e}`]),t0("gpg",["--no-default-keyring","--keyring",`gnupg-ring:${r}`,"--import",`/tmp/${e}`]),t0("chmod",["644",r])),r;}async function ia(e,t){return G.GITHUB_ACTIONS?t1("update-alternatives",["--install",`/usr/bin/${e}`,e,t,"4
`),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--cppcache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));let o=i.architecture??process.arch,s=process.env.SETUP_CPP_DIR??t2(""),a=[],l=[],c=q.create({autoloadLocales:!0});q.addLocale(k(X)),H.addLocale(k(V));let u=await o0();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!oY(e[t])),i=n.length>=1?e[n[0]]:"true";return!n.some(t=>e[t]!==i)&&(r.forEach(t=>{e[t]=i;}),!0);}(i,["llvm","clangtidy","clangformat"]))return(0,B.error)("The same version must be used for llvm, clangformat and clangtidy"),1;ig()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&((0,B.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await iR("python-pygments"));let p=!1;for(let e of aI){let n=i[e];void 0!==n&&(t=Date.now(),p=await ab(e,n,u,o,s,a,l),r=Date.now(),(0,B.info)(`took${c.format(t,r)||"0 seconds"}`));}let d=i.compiler;if(void 0!==d){let e=Date.now();await a$(d,u,s,o,a,p,l);let t=Date.now();(0,B.info)(`took${c.format(e,t)||"0 seconds"}`);}if(await nq(),0===a.length&&0===l.length)return(0,B.warning)("setup-cpp was called without any arguments. Nothing to do."),0;if(a.forEach(e=>(0,B.success)(e)),l.forEach(e=>(0,B.error)(e)),(0,B.info)("setup-cpp finished"),!G.GITHUB_ACTIONS)switch(process.platform){case"win32":(0,B.warning)("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":(0,B.warning)("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");}returnawaitn,0===l.length?0:1;})(process.argv).then(e=>{process.exitCode=e;}).catch(e=>{(0,B.error)("main()panicked!"),(0,B.error)(e),process.exitCode=1;});