Update yarn to v4.16 (#19268)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-03 01:46:24 +08:00
1 parent b7c8baba37
commit 5c43df8963
8 files changed
+951 -947

No files matched your search

-940
View File
@@ -1,940 +0,0 @@
#!/usr/bin/env node
/* eslint-disable */
//prettier-ignore
(()=>{var yje=Object.create;var rU=Object.defineProperty;var Eje=Object.getOwnPropertyDescriptor;var Ije=Object.getOwnPropertyNames;var Cje=Object.getPrototypeOf,wje=Object.prototype.hasOwnProperty;var Ie=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xe=(e,t)=>()=>(e&&(t=e(e=0)),t);var G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vt=(e,t)=>{for(var r in t)rU(e,r,{get:t[r],enumerable:!0})},Bje=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ije(t))!wje.call(e,a)&&a!==r&&rU(e,a,{get:()=>t[a],enumerable:!(s=Eje(t,a))||s.enumerable});return e};var et=(e,t,r)=>(r=e!=null?yje(Cje(e)):{},Bje(t||!e||!e.__esModule?rU(r,"default",{value:e,enumerable:!0}):r,e));var Ai={};Vt(Ai,{SAFE_TIME:()=>pZ,S_IFDIR:()=>JP,S_IFLNK:()=>KP,S_IFMT:()=>Hf,S_IFREG:()=>b2});var Hf,JP,b2,KP,pZ,hZ=Xe(()=>{Hf=61440,JP=16384,b2=32768,KP=40960,pZ=456789e3});var or={};Vt(or,{EBADF:()=>qo,EBUSY:()=>vje,EEXIST:()=>kje,EINVAL:()=>Dje,EISDIR:()=>xje,ENOENT:()=>bje,ENOSYS:()=>Sje,ENOTDIR:()=>Pje,ENOTEMPTY:()=>Rje,EOPNOTSUPP:()=>Tje,EROFS:()=>Qje,ERR_DIR_CLOSED:()=>nU});function Bc(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function vje(e){return Bc("EBUSY",e)}function Sje(e,t){return Bc("ENOSYS",`${e}, ${t}`)}function Dje(e){return Bc("EINVAL",`invalid argument, ${e}`)}function qo(e){return Bc("EBADF",`bad file descriptor, ${e}`)}function bje(e){return Bc("ENOENT",`no such file or directory, ${e}`)}function Pje(e){return Bc("ENOTDIR",`not a directory, ${e}`)}function xje(e){return Bc("EISDIR",`illegal operation on a directory, ${e}`)}function kje(e){return Bc("EEXIST",`file already exists, ${e}`)}function Qje(e){return Bc("EROFS",`read-only filesystem, ${e}`)}function Rje(e){return Bc("ENOTEMPTY",`directory not empty, ${e}`)}function Tje(e){return Bc("EOPNOTSUPP",`operation not supported, ${e}`)}function nU(){return Bc("ERR_DIR_CLOSED","Directory handle was closed")}var zP=Xe(()=>{});var al={};Vt(al,{BigIntStatsEntry:()=>aE,DEFAULT_MODE:()=>oU,DirEntry:()=>iU,StatEntry:()=>oE,areStatsEqual:()=>aU,clearStats:()=>XP,convertToBigIntStats:()=>Nje,makeDefaultStats:()=>gZ,makeEmptyStats:()=>Fje});function gZ(){return new oE}function Fje(){return XP(gZ())}function XP(e){for(let t in e)if(Object.hasOwn(e,t)){let r=e[t];typeof r=="number"?e[t]=0:typeof r=="bigint"?e[t]=BigInt(0):sU.types.isDate(r)&&(e[t]=new Date(0))}return e}function Nje(e){let t=new aE;for(let r in e)if(Object.hasOwn(e,r)){let s=e[r];typeof s=="number"?t[r]=BigInt(Math.floor(s)):sU.types.isDate(s)&&(t[r]=new Date(s))}return t.atimeNs=t.atimeMs*BigInt(1e6)+BigInt(Math.floor(e.atimeMs%1*1e3))*BigInt(1e3),t.mtimeNs=t.mtimeMs*BigInt(1e6)+BigInt(Math.floor(e.mtimeMs%1*1e3))*BigInt(1e3),t.ctimeNs=t.ctimeMs*BigInt(1e6)+BigInt(Math.floor(e.ctimeMs%1*1e3))*BigInt(1e3),t.birthtimeNs=t.birthtimeMs*BigInt(1e6)+BigInt(Math.floor(e.birthtimeMs%1*1e3))*BigInt(1e3),t}function aU(e,t){if(e.atimeMs!==t.atimeMs||e.birthtimeMs!==t.birthtimeMs||e.blksize!==t.blksize||e.blocks!==t.blocks||e.ctimeMs!==t.ctimeMs||e.dev!==t.dev||e.gid!==t.gid||e.ino!==t.ino||e.isBlockDevice()!==t.isBlockDevice()||e.isCharacterDevice()!==t.isCharacterDevice()||e.isDirectory()!==t.isDirectory()||e.isFIFO()!==t.isFIFO()||e.isFile()!==t.isFile()||e.isSocket()!==t.isSocket()||e.isSymbolicLink()!==t.isSymbolicLink()||e.mode!==t.mode||e.mtimeMs!==t.mtimeMs||e.nlink!==t.nlink||e.rdev!==t.rdev||e.size!==t.size||e.uid!==t.uid)return!1;let r=e,s=t;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var sU,oU,iU,oE,aE,lU=Xe(()=>{sU=et(Ie("util")),oU=33188,iU=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},oE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=oU;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},aE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtLine truncated
`).length,s=t.length-r;return r>s?`\r
`:`
`}function md(e,t){return t.replace(/\r?\n/g,Jje(e))}var vZ,SZ,Ep,jf,yd=Xe(()=>{vZ=Ie("crypto"),SZ=Ie("os");fU();ll();Ep=class{constructor(t){this.pathUtils=t}async*genTraversePromise(t,{stableSort:r=!1}={}){let s=[t];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(t,{algorithm:r="sha512"}={}){let s=await this.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,vZ.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await this.closePromise(s)}}async removePromise(t,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(t)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(t);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(t,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(t);break}catch(c){if(c.code!=="EBUSY"&&c.code!=="ENOTEMPTY")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(t)}removeSync(t,{recursive:r=!0}={}){let s;try{s=this.lstatSync(t)}catch(a){if(a.code==="ENOENT")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(t))this.removeSync(this.pathUtils.resolve(t,a));this.rmdirSync(t)}else this.unlinkSync(t)}async mkdirpPromise(t,{chmod:r,utimes:s}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(t,{chmod:r,utimes:s}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(t,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await yZ(this,t,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(t,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(t);if(n.isDirectory()){this.mkdirpSync(t);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(t,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(t);let p=s.readFileSync(r);this.writeFileSync(t,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(t);let p=s.readlinkSync(r);this.symlinkSync(ZP(this.pathUtils,p),t)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let f=n.mode&511;this.chmodSync(t,f)}async changeFilePromise(t,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(t,r,s):this.changeFileTextPromise(t,r,s)}async changeFileBufferPromise(t,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(t)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(t,r,{mode:s})}async changeFileTextPromise(t,r,{automaticNewlines:s,mode:a}={}){let n="";try{n=await this.readFilePromise(t,"utf8")}catch{}let c=s?md(n,r):r;n!==c&&await this.writeFilePromise(t,c,{mode:a})}changeFileSync(t,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(t,r,s):this.changeFileTextSync(t,r,s)}changeFileBufferSync(t,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(t)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(t,r,{mode:s})}changeFileTextSync(t,r,{automaticNewlines:s=!1,mode:a}={}){let n="";try{n=this.readFileSync(t,"utf8")}catch{}let c=s?md(n,r):r;n!==c&&this.writeFileSync(t,c,{mode:a})}async movePromise(t,r){try{await this.renamePromise(t,r)}catch(s){if(s.code==="EXDEV")await this.copyPromise(r,t),await this.removePromise(t);else throw s}}moveSync(t,r){try{this.renameSync(t,r)}catch(s){if(s.code==="EXDEV")this.copySync(r,t),this.removeSync(t);else throw s}}async lockPromise(t,r){let s=`${t}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,"wx")}catch(p){if(p.code==="EEXIST"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw Line truncated
`)}writeJsonSync(t,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(t,`${JSON.stringify(r,null,a)}
`)}async preserveTimePromise(t,r){let s=await this.lstatPromise(t),a=await r();typeof a<"u"&&(t=a),await this.lutimesPromise(t,s.atime,s.mtime)}async preserveTimeSync(t,r){let s=this.lstatSync(t),a=r();typeof a<"u"&&(t=a),this.lutimesSync(t,s.atime,s.mtime)}},jf=class extends Ep{constructor(){super(J)}}});var Gs,Ip=Xe(()=>{yd();Gs=class extends Ep{getExtractHint(t){return this.baseFs.getExtractHint(t)}resolve(t){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(t)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(t,r,s){return this.baseFs.openPromise(this.mapToBase(t),r,s)}openSync(t,r,s){return this.baseFs.openSync(this.mapToBase(t),r,s)}async opendirPromise(t,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(t),r),{path:t})}opendirSync(t,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(t),r),{path:t})}async readPromise(t,r,s,a,n){return await this.baseFs.readPromise(t,r,s,a,n)}readSync(t,r,s,a,n){return this.baseFs.readSync(t,r,s,a,n)}async writePromise(t,r,s,a,n){return typeof r=="string"?await this.baseFs.writePromise(t,r,s):await this.baseFs.writePromise(t,r,s,a,n)}writeSync(t,r,s,a,n){return typeof r=="string"?this.baseFs.writeSync(t,r,s):this.baseFs.writeSync(t,r,s,a,n)}async closePromise(t){return this.baseFs.closePromise(t)}closeSync(t){this.baseFs.closeSync(t)}createReadStream(t,r){return this.baseFs.createReadStream(t!==null?this.mapToBase(t):t,r)}createWriteStream(t,r){return this.baseFs.createWriteStream(t!==null?this.mapToBase(t):t,r)}async realpathPromise(t){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(t)))}realpathSync(t){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(t)))}async existsPromise(t){return this.baseFs.existsPromise(this.mapToBase(t))}existsSync(t){return this.baseFs.existsSync(this.mapToBase(t))}accessSync(t,r){return this.baseFs.accessSync(this.mapToBase(t),r)}async accessPromise(t,r){return this.baseFs.accessPromise(this.mapToBase(t),r)}async statPromise(t,r){return this.baseFs.statPromise(this.mapToBase(t),r)}statSync(t,r){return this.baseFs.statSync(this.mapToBase(t),r)}async fstatPromise(t,r){return this.baseFs.fstatPromise(t,r)}fstatSync(t,r){return this.baseFs.fstatSync(t,r)}lstatPromise(t,r){return this.baseFs.lstatPromise(this.mapToBase(t),r)}lstatSync(t,r){return this.baseFs.lstatSync(this.mapToBase(t),r)}async fchmodPromise(t,r){return this.baseFs.fchmodPromise(t,r)}fchmodSync(t,r){return this.baseFs.fchmodSync(t,r)}async chmodPromise(t,r){return this.baseFs.chmodPromise(this.mapToBase(t),r)}chmodSync(t,r){return this.baseFs.chmodSync(this.mapToBase(t),r)}async fchownPromise(t,r,s){return this.baseFs.fchownPromise(t,r,s)}fchownSync(t,r,s){return this.baseFs.fchownSync(t,r,s)}async chownPromise(t,r,s){return this.baseFs.chownPromise(this.mapToBase(t),r,s)}chownSync(t,r,s){return this.baseFs.chownSync(this.mapToBase(t),r,s)}async renamePromise(t,r){return this.baseFs.renamePromise(this.mapToBase(t),this.mapToBase(r))}renameSync(t,r){return this.baseFs.renameSync(this.mapToBase(t),this.mapToBase(r))}async copyFilePromise(t,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(t),this.mapToBase(r),s)}copyFileSync(t,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(t),this.mapToBase(r),s)}async appendFilePromise(t,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(t),r,s)}appendFileSync(t,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(t),r,s)}async writeFilePromise(t,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(t),r,s)}writeFileSync(t,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(t),r,s)}async unlinkPromise(t){return this.baseFs.unlinkPromise(this.mapToBase(t))}unlinkSync(t){return this.baseFs.unlinkSync(this.mapToBase(t))}async utimesPromise(t,r,s){return this.baseFs.utimesPromise(this.mapToBase(t),r,s)}utimesSync(t,r,s){return this.baseFs.utimesSync(this.mapToBase(t),r,s)}async lutimesPromise(t,r,s){return this.baseFs.lutimesPromise(this.mapToBase(t),r,s)}lutimesSync(t,r,s){return this.baseFs.lutimesSync(this.mapToBase(t),r,s)}async mkdirPromise(t,r){return this.baseFs.mkdirPromise(this.mapToBase(t),r)}mkdirSync(t,r){return this.baseFs.mkdirSync(this.mapToBase(t),r)}async rmdirPromise(t,r){return this.baseFs.rmdirPromise(this.mapToBase(t),r)}rmdirSync(t,r){return this.baseFs.rmdirSync(this.mapToBase(t),r)}async rmPromise(t,r){return this.baseFs.rmPromise(this.mapToBase(t),r)}rmSync(t,r){return this.baseFs.rmSync(this.mapToBase(t),r)}async linkPromise(t,r){return this.baseFs.linkPromise(this.mapToBase(t),this.mapToBase(r))}linkSync(t,r){return this.baseFs.linkSync(this.mapToBase(t),this.mapToBase(r))}async symlinkPromise(t,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(t))return this.baseFs.symlinkPromise(this.mapToBase(t),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),t)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkP Line truncated
`,FA=ur(`\\
`,!1),NA=function(){return""},fa="\\",Aa=ur("\\",!1),OA=/^[\\$"`]/,gr=zi(["\\","$",'"',"`"],!1,!1),xo=function(N){return N},Ga="\\a",Ue=ur("\\a",!1),wr=function(){return"a"},df="\\b",LA=ur("\\b",!1),MA=function(){return"\b"},cu=/^[Ee]/,uu=zi(["E","e"],!1,!1),lc=function(){return"\x1B"},we="\\f",Nt=ur("\\f",!1),cc=function(){return"\f"},Oi="\\n",co=ur("\\n",!1),Tt=function(){return`
`},Qn="\\r",pa=ur("\\r",!1),Gi=function(){return"\r"},Li="\\t",qa=ur("\\t",!1),mn=function(){return" "},Xn="\\v",fu=ur("\\v",!1),mh=function(){return"\v"},Wa=/^[\\'"?]/,Ya=zi(["\\","'",'"',"?"],!1,!1),Va=function(N){return String.fromCharCode(parseInt(N,16))},$e="\\x",Ja=ur("\\x",!1),mf="\\u",uc=ur("\\u",!1),vn="\\U",ha=ur("\\U",!1),UA=function(N){return String.fromCodePoint(parseInt(N,16))},_A=/^[0-7]/,ga=zi([["0","7"]],!1,!1),kl=/^[0-9a-fA-f]/,Ut=zi([["0","9"],["a","f"],["A","f"]],!1,!1),Rn=Cf(),da="{}",Ka=ur("{}",!1),is=function(){return"{}"},fc="-",Au=ur("-",!1),Ac="+",za=ur("+",!1),Mi=".",Bs=ur(".",!1),Ql=function(N,K,re){return{type:"number",value:(N==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},yf=function(N,K){return{type:"number",value:(N==="-"?-1:1)*parseInt(K.join(""))}},pc=function(N){return{type:"variable",...N}},Bi=function(N){return{type:"variable",name:N}},Tn=function(N){return N},hc="*",Ke=ur("*",!1),ot="/",St=ur("/",!1),lr=function(N,K,re){return{type:K==="*"?"multiplication":"division",right:re}},ee=function(N,K){return K.reduce((re,ge)=>({left:re,...ge}),N)},ye=function(N,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Oe="$((",mt=ur("$((",!1),Et="))",bt=ur("))",!1),tr=function(N){return N},pn="$(",ci=ur("$(",!1),qi=function(N){return N},Fn="${",Xa=ur("${",!1),Iy=":-",q1=ur(":-",!1),ko=function(N,K){return{name:N,defaultValue:K}},Cy=":-}",yh=ur(":-}",!1),W1=function(N){return{name:N,defaultValue:[]}},Qo=":+",Eh=ur(":+",!1),Ih=function(N,K){return{name:N,alternativeValue:K}},pu=":+}",Ch=ur(":+}",!1),Rg=function(N){return{name:N,alternativeValue:[]}},Tg=function(N){return{name:N}},Fg="$",wy=ur("$",!1),Ef=function(N){return t.isGlobPattern(N)},Ro=function(N){return N},Rl=/^[a-zA-Z0-9_]/,wh=zi([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ng=function(){return Dy()},Tl=/^[$@*?#a-zA-Z0-9_\-]/,Fl=zi(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),By=/^[()}<>$|&; \t"']/,HA=zi(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),vy=/^[<>&; \t"']/,Sy=zi(["<",">","&",";"," "," ",'"',"'"],!1,!1),jA=/^[ \t]/,GA=zi([" "," "],!1,!1),W=0,xt=0,qA=[{line:1,column:1}],To=0,If=[],yt=0,hu;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function Dy(){return e.substring(xt,W)}function Og(){return wf(xt,W)}function Y1(N,K){throw K=K!==void 0?K:wf(xt,W),WA([Lg(N)],e.substring(xt,W),K)}function Bh(N,K){throw K=K!==void 0?K:wf(xt,W),mi(N,K)}function ur(N,K){return{type:"literal",text:N,ignoreCase:K}}function zi(N,K,re){return{type:"class",parts:N,inverted:K,ignoreCase:re}}function Cf(){return{type:"any"}}function Za(){return{type:"end"}}function Lg(N){return{type:"other",description:N}}function gu(N){var K=qA[N],re;if(K)return K;for(re=N-1;!qA[re];)re--;for(K=qA[re],K={line:K.line,column:K.column};re<N;)e.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return qA[N]=K,K}function wf(N,K){var re=gu(N),ge=gu(K);return{start:{offset:N,line:re.line,column:re.column},end:{offset:K,line:ge.line,column:ge.column}}}function wt(N){W<To||(W>To&&(To=W,If=[]),If.push(N))}function mi(N,K){return new Cd(N,null,null,K)}function WA(N,K,re){return new Cd(Cd.buildMessage(N,K),N,K,re)}function $a(){var N,K,re;for(N=W,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=ma(),re===r&&(re=null),re!==r?(xt=N,K=n(re),N=K):(W=N,N=r)):(W=N,N=r),N}function ma(){var N,K,re,ge,Je;if(N=W,K=vh(),K!==r){for(re=[],ge=kt();ge!==r;)re.push(ge),ge=kt();re!==r?(ge=Mg(),ge!==r?(Je=el(),Je===r&&(Je=null),Je!==r?(xt=N,K=c(K,ge,Je),N=K):(W=N,N=r)):(W=N,N=r)):(W=N,N=r)}else W=N,N=r;if(N===r)if(N=W,K=vh(),K!==r){for(re=[],ge=kt();ge!==r;)re.push(ge),ge=kt();re!==r?(ge=Mg(),ge===r&&(ge=null),ge!==r?(xt=N,K=f(K,ge),N=K):(W=N,N=r)):(W=N,N=r)}else W=N,N=r;return N}function el(){var N,K,re,ge,Je;for(N=W,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=ma(),re!==r){for(ge=[],Je=kt();Je!==r;)ge.push(Je),Je=kt();ge!==r?(xt=N,K=p(re),N=K):(W=N,N=r)}else W=N,N=r;else W=N,N=r;return N}function Mg(){var N;return e.charCodeAt(W)===59?(N=h,W++):(N=r,yt===0&&wt(E)),N===r&&(e.charCodeAt(W)===38?(N=C,W++):(N=r,yt===0&&wt(S))),N}function vh(){var N,K,re;return N=W,K=YA(),K!==r?(re=Ug(),re===r&&(re=null),re!==r?(xt=N,K=x(K,re),N=K):(W=N,N=r)):(W=N,N=r),N}function Ug(){var N,K,re,ge,Je,pt,dr;for(N=W,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=by(),re!==r){for(ge=[],Je=kt();Je!==r;)ge.push(Je),Je=kt();if(ge!==r)if(Je=vh(),Je!==r){for(pt=[],dr=kt();dr!==r;)pt.push(dr),dr=kt();pt!==r?(xt=N,K=I(re,Je),N=K):(W=N,N=r)}else W=N,N=r;else W=N,N=r}else W=N,N=r;else W=N,N=r;return N}function by(){var N;return e.substr(W,2)===T?(N=T,W+=2):(N=r,yt===0&&wt(O)),N===r&&(e.substr(W,2)===U?(N=U,W+=2):(N=r,yt===0&&wt(V))),N}function YA(){var N,K,re;return N=W,K=Bf(),K!==r?(re=_g(),re===r&&(re=null),re!==r?(xt=N,K=te(K,re),N=K):(W=N,N=r)):(W=N,N=r),N}function _g(){var N,K,re,ge,Je,pt,dr;for(N=W,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)Line truncated
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),b6e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(j$,([e,t])=>[e,`"$'${t}'"`])]),G$=e=>j$.get(e)??`\\x${e.charCodeAt(0).toString(16).padStart(2,"0")}`,P6e=e=>b6e.get(e)??`"$'${G$(e)}'"`});var Y$=G((IPt,W$)=>{"use strict";function x6e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Bd(e,t,r,s){this.message=e,this.expected=t,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Bd)}x6e(Bd,Error);Bd.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+"-"+n(h.parts[C][1]):n(h.parts[C]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(e)+" but "+p(t)+" found."};function k6e(e,t){t=t!==void 0?t:{};var r={},s={resolution:ke},a=ke,n="/",c=Be("/",!1),f=function(Me,P){return{from:Me,descriptor:P}},p=function(Me){return{descriptor:Me}},h="@",E=Be("@",!1),C=function(Me,P){return{fullName:Me,description:P}},S=function(Me){return{fullName:Me}},x=function(){return Ce()},I=/^[^\/@]/,T=me(["/","@"],!0,!1),O=/^[^\/]/,U=me(["/"],!0,!1),V=0,te=0,ie=[{line:1,column:1}],ue=0,ae=[],de=0,Ae;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function Ce(){return e.substring(te,V)}function Ee(){return st(te,V)}function g(Me,P){throw P=P!==void 0?P:st(te,V),Ne([De(Me)],e.substring(te,V),P)}function Se(Me,P){throw P=P!==void 0?P:st(te,V),tt(Me,P)}function Be(Me,P){return{type:"literal",text:Me,ignoreCase:P}}function me(Me,P,w){return{type:"class",parts:Me,inverted:P,ignoreCase:w}}function ce(){return{type:"any"}}function Z(){return{type:"end"}}function De(Me){return{type:"other",description:Me}}function Qe(Me){var P=ie[Me],w;if(P)return P;for(w=Me-1;!ie[w];)w--;for(P=ie[w],P={line:P.line,column:P.column};w<Me;)e.charCodeAt(w)===10?(P.line++,P.column=1):P.column++,w++;return ie[Me]=P,P}function st(Me,P){var w=Qe(Me),b=Qe(P);return{start:{offset:Me,line:w.line,column:w.column},end:{offset:P,line:b.line,column:b.column}}}function _(Me){V<ue||(V>ue&&(ue=V,ae=[]),ae.push(Me))}function tt(Me,P){return new Bd(Me,null,null,P)}function Ne(Me,P,w){return new Bd(Bd.buildMessage(Me,P),Me,P,w)}function ke(){var Me,P,w,b;return Me=V,P=be(),P!==r?(e.charCodeAt(V)===47?(w=n,V++):(w=r,de===0&&_(c)),w!==r?(b=be(),b!==r?(te=Me,P=f(P,b),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=be(),P!==r&&(te=Me,P=p(P)),Me=P),Me}function be(){var Me,P,w,b;return Me=V,P=je(),P!==r?(e.charCodeAt(V)===64?(w=h,V++):(w=r,de===0&&_(E)),w!==r?(b=ct(),b!==r?(te=Me,P=C(P,b),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=je(),P!==r&&(te=Me,P=S(P)),Me=P),Me}function je(){var Me,P,w,b,y;return Me=V,e.charCodeAt(V)===64?(P=h,V++):(P=r,de===0&&_(E)),P!==r?(w=Re(),w!==r?(e.charCodeAt(V)===47?(b=n,V++):(b=r,de===0&&_(c)),b!==r?(y=Re(),y!==r?(te=Me,P=x(),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=Re(),P!==r&&(te=Me,P=x()),Me=P),Me}function Re(){var Me,P,w;if(Me=V,P=[],I.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,de===0&&_(T)),w!==r)for(;w!==r;)P.push(w),I.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,de===0&&_(T));else P=r;return P!==r&&(te=Me,P=x()),Me=P,Me}function ct(){var Me,P,w;if(Me=V,P=[],O.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,de===0&&_(U)),w!==r)for(;w!==r;)P.push(w),O.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,de===0&&_(U));else P=r;return P!==r&&(te=Me,P=x()),Me=P,Me}if(Ae=a(),Ae!==r&&V===e.length)return Ae;throw Ae!==r&&V<e.length&&_(Z()),Ne(ae,ue<e.length?e.charAt(ue):null,ue<e.length?st(ue,ue+1):st(ue,ue))}W$.exports={SyntaxError:Bd,parse:k6e}});function px(e){let t=e.match(/^\*{1,2}\/(.*Line truncated
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=" ... ",a+=5;break}for(n="",c=this.position;c<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=" ... ",c-=5;break}return f=this.buffer.slice(a,c),X$.repeat(" ",t)+s+f+n+`
`+X$.repeat(" ",t+this.position-a+s.length)+"^"};QU.prototype.toString=function(t){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(s+=`:
`+r)),s};Z$.exports=QU});var Ps=G((SPt,tee)=>{"use strict";var eee=dE(),O6e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],L6e=["scalar","sequence","mapping"];function M6e(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(s){t[String(s)]=r})}),t}function U6e(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(O6e.indexOf(r)===-1)throw new eee('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=M6e(t.styleAliases||null),L6e.indexOf(this.kind)===-1)throw new eee('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}tee.exports=U6e});var Dd=G((DPt,nee)=>{"use strict";var ree=Sd(),gx=dE(),_6e=Ps();function RU(e,t,r){var s=[];return e.include.forEach(function(a){r=RU(a,t,r)}),e[t].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function H6e(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function s(a){e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(s);return e}function mE(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new gx("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=RU(this,"implicit",[]),this.compiledExplicit=RU(this,"explicit",[]),this.compiledTypeMap=H6e(this.compiledImplicit,this.compiledExplicit)}mE.DEFAULT=null;mE.create=function(){var t,r;switch(arguments.length){case 1:t=mE.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new gx("Wrong number of arguments for Schema.create function")}if(t=ree.toArray(t),r=ree.toArray(r),!t.every(function(s){return s instanceof mE}))throw new gx("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(s){return s instanceof _6e}))throw new gx("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new mE({include:t,explicit:r})};nee.exports=mE});var see=G((bPt,iee)=>{"use strict";var j6e=Ps();iee.exports=new j6e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var aee=G((PPt,oee)=>{"use strict";var G6e=Ps();oee.exports=new G6e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var cee=G((xPt,lee)=>{"use strict";var q6e=Ps();lee.exports=new q6e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var dx=G((kPt,uee)=>{"use strict";var W6e=Dd();uee.exports=new W6e({explicit:[see(),aee(),cee()]})});var Aee=G((QPt,fee)=>{"use strict";var Y6e=Ps();function V6e(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function J6e(){return null}function K6e(e){return e===null}fee.exports=new Y6e("tag:yaml.org,2002:null",{kind:"scalar",resolve:V6e,construct:J6e,predicate:K6e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var hee=G((RPt,pee)=>{"use strict";var z6e=Ps();function X6e(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Z6e(e){return e==="true"||e==="True"||e==="TRUE"}function $6e(e){return Object.prototype.toString.call(e)==="[object Boolean]"}pee.exports=new z6e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:X6e,construct:Z6e,predicate:$6e,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var dee=G((TPt,gee)=>{"use strict";var eGe=Sd(),tGe=Ps();function rGe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function nGe(e){return 48<=e&&e<=55}function iGe(e){return 48<=e&&e<=57}function sGe(e){if(e===null)return!1;var t=e.length,r=0,s=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;s=!0}return s&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!rGe(e.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}for(;r<t;r++)if(a=e[r],a!=="_"){if(!nGe(e.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(a===":")break;if(!iGe(e.charCodeAt(r)))return!1;s=!0}return!s||a==="_"?!1:a!==":"?!0:/^(: Line truncated
\r`;function vGe(e){if(e===null)return!1;var t,r,s=0,a=e.length,n=NU;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;s+=6}return s%8===0}function SGe(e){var t,r,s=e.replace(/[\r\n=]/g,""),a=s.length,n=NU,c=0,f=[];for(t=0;t<a;t++)t%4===0&&t&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(t));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),bd?bd.from?bd.from(f):new bd(f):f}function DGe(e){var t="",r=0,s,a,n=e.length,c=NU;for(s=0;s<n;s++)s%3===0&&s&&(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]),r=(r<<8)+e[s];return a=n%3,a===0?(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]):a===2?(t+=c[r>>10&63],t+=c[r>>4&63],t+=c[r<<2&63],t+=c[64]):a===1&&(t+=c[r>>2&63],t+=c[r<<4&63],t+=c[64],t+=c[64]),t}function bGe(e){return bd&&bd.isBuffer(e)}xee.exports=new BGe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vGe,construct:SGe,predicate:bGe,represent:DGe})});var Ree=G((HPt,Qee)=>{"use strict";var PGe=Ps(),xGe=Object.prototype.hasOwnProperty,kGe=Object.prototype.toString;function QGe(e){if(e===null)return!0;var t=[],r,s,a,n,c,f=e;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,kGe.call(a)!=="[object Object]")return!1;for(n in a)if(xGe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}function RGe(e){return e!==null?e:[]}Qee.exports=new PGe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:QGe,construct:RGe})});var Fee=G((jPt,Tee)=>{"use strict";var TGe=Ps(),FGe=Object.prototype.toString;function NGe(e){if(e===null)return!0;var t,r,s,a,n,c=e;for(n=new Array(c.length),t=0,r=c.length;t<r;t+=1){if(s=c[t],FGe.call(s)!=="[object Object]"||(a=Object.keys(s),a.length!==1))return!1;n[t]=[a[0],s[a[0]]]}return!0}function OGe(e){if(e===null)return[];var t,r,s,a,n,c=e;for(n=new Array(c.length),t=0,r=c.length;t<r;t+=1)s=c[t],a=Object.keys(s),n[t]=[a[0],s[a[0]]];return n}Tee.exports=new TGe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:NGe,construct:OGe})});var Oee=G((GPt,Nee)=>{"use strict";var LGe=Ps(),MGe=Object.prototype.hasOwnProperty;function UGe(e){if(e===null)return!0;var t,r=e;for(t in r)if(MGe.call(r,t)&&r[t]!==null)return!1;return!0}function _Ge(e){return e!==null?e:{}}Nee.exports=new LGe("tag:yaml.org,2002:set",{kind:"mapping",resolve:UGe,construct:_Ge})});var yE=G((qPt,Lee)=>{"use strict";var HGe=Dd();Lee.exports=new HGe({include:[FU()],implicit:[See(),bee()],explicit:[kee(),Ree(),Fee(),Oee()]})});var Uee=G((WPt,Mee)=>{"use strict";var jGe=Ps();function GGe(){return!0}function qGe(){}function WGe(){return""}function YGe(e){return typeof e>"u"}Mee.exports=new jGe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:GGe,construct:qGe,predicate:YGe,represent:WGe})});var Hee=G((YPt,_ee)=>{"use strict";var VGe=Ps();function JGe(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),s="";return!(t[0]==="/"&&(r&&(s=r[1]),s.length>3||t[t.length-s.length-1]!=="/"))}function KGe(e){var t=e,r=/\/([gim]*)$/.exec(e),s="";return t[0]==="/"&&(r&&(s=r[1]),t=t.slice(1,t.length-s.length-1)),new RegExp(t,s)}function zGe(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function XGe(e){return Object.prototype.toString.call(e)==="[object RegExp]"}_ee.exports=new VGe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:JGe,construct:KGe,predicate:XGe,represent:zGe})});var qee=G((VPt,Gee)=>{"use strict";var mx;try{jee=Ie,mx=jee("esprima")}catch{typeof window<"u"&&(mx=window.esprima)}var jee,ZGe=Ps();function $Ge(e){if(e===null)return!1;try{var t="("+e+")",r=mx.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function e5e(e){var t="("+e+")",r=mx.parse(t,{range:!0}),s=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(s,t.slice(a[0]+1,a[1]-1)):new Function(s,"return "+t.slice(a[0],a[1]))}function t5e(e){return e.toString()}function r5e(e){return Object.prototype.toString.call(e)==="[object Function]"}Gee.exports=new ZGe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:$Ge,construct:e5e,predicate:r5e,represent:t5e})});var N2=G((KPt,Yee)=>{"use strict";var Wee=Dd();Yee.exports=Wee.DEFAULT=new Wee({include:[yE()],explicit:[Uee(),Hee(),qee()]})});var fte=G((zPt,O2)=>{"use strict";var wp=Sd(),$ee=dE(),n5e=$$(),ete=yE(),i5e=N2(),n0=Object.prototype.hasOwnProperty,yx=1,tte=2,rte=3,Ex=4,OU=1,s5e=2,Vee=3,o5e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\ Line truncated
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function A5e(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ste=new Array(256),ote=new Array(256);for(Pd=0;Pd<256;Pd++)ste[Pd]=Kee(Pd)?1:0,ote[Pd]=Kee(Pd);var Pd;function p5e(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||i5e,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ate(e,t){return new $ee(t,new n5e(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Fr(e,t){throw ate(e,t)}function Ix(e,t){e.onWarning&&e.onWarning.call(null,ate(e,t))}var zee={YAML:function(t,r,s){var a,n,c;t.version!==null&&Fr(t,"duplication of %YAML directive"),s.length!==1&&Fr(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),a===null&&Fr(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Fr(t,"unacceptable YAML version of the document"),t.version=s[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&Ix(t,"unsupported YAML version of the document")},TAG:function(t,r,s){var a,n;s.length!==2&&Fr(t,"TAG directive accepts exactly two arguments"),a=s[0],n=s[1],nte.test(a)||Fr(t,"ill-formed tag handle (first argument) of the TAG directive"),n0.call(t.tagMap,a)&&Fr(t,'there is a previously declared suffix for "'+a+'" tag handle'),ite.test(n)||Fr(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[a]=n}};function r0(e,t,r,s){var a,n,c,f;if(t<r){if(f=e.input.slice(t,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Fr(e,"expected valid JSON character");else o5e.test(f)&&Fr(e,"the stream contains non-printable characters");e.result+=f}}function Xee(e,t,r,s){var a,n,c,f;for(wp.isObject(r)||Fr(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],n0.call(t,n)||(t[n]=r[n],s[n]=!0)}function IE(e,t,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Fr(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Jee(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&Jee(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)Xee(e,t,n[p],r);else Xee(e,t,n,r);else!e.json&&!n0.call(r,a)&&n0.call(t,a)&&(e.line=c||e.line,e.position=f||e.position,Fr(e,"duplicated mapping key")),t[a]=n,delete r[a];return t}function LU(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Fr(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function ls(e,t,r){for(var s=0,a=e.input.charCodeAt(e.position);a!==0;){for(;xd(a);)a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Wf(a))for(LU(e),a=e.input.charCodeAt(e.position),s++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&s!==0&&e.lineIndent<r&&Ix(e,"deficient indentation"),s}function Cx(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ul(r)))}function MU(e,t){t===1?e.result+=" ":t>1&&(e.result+=wp.repeat(`
`,t-1))}function h5e(e,t,r){var s,a,n,c,f,p,h,E,C=e.kind,S=e.result,x;if(x=e.input.charCodeAt(e.position),ul(x)||EE(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=e.input.charCodeAt(e.position+1),ul(a)||r&&EE(a)))return!1;for(e.kind="scalar",e.result="",n=c=e.position,f=!1;x!==0;){if(x===58){if(a=e.input.charCodeAt(e.position+1),ul(a)||r&&EE(a))break}else if(x===35){if(s=e.input.charCodeAt(e.position-1),ul(s))break}else{if(e.position===e.lineStart&&Cx(e)||r&&EE(x))break;if(Wf(x))if(p=e.line,h=e.lineStart,E=e.lineIndent,ls(e,!1,-1),e.lineIndent>=t){f=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=p,e.lineStart=h,e.lineIndent=E;break}}f&&(r0(e,n,c,!1),MU(e,e.line-p),n=c=e.position,f=!1),xd(x)||(c=e.position+1),x=e.input.charCodeAt(++e.position)}return r0(e,n,c,!1),e.result?!0:(e.kind=C,e.result=S,!1)}function g5e(e,t){var r,s,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,s=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(r0(e,s,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)s=e.position,e.position++,a=e.position;else return!0;else Wf(r)?(r0(e,s,a,!0),MU(e,ls(e,!1,t)),s=a=e.position):e.position===e.lineStart&&Cx(e)?Fr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Fr(e,"unexpected end of the stream within a single quoted scalar")}function d5e(e,t){var r,s,a,n,c,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=s=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return r0(e,r,e.position,!0),e.position++,!0;if(f===92){if(r0(e,r,e.position,!0),f=e.input.charCodeAt(++e.position),Wf(f))ls(e,!1,t);else if(f<256&&ste[f])e.result+=ote[f],e.position++;else if((c=u5e(f))>0){for(a=c,n=0;a>0;a--)f=e.input.charCodeAt(++e.position),(c=c5e(f))>=0?n=(n<<4)+c:Fr(e,"expected hexadecimal character");e.result+=A5e(n),e.position++}else Fr(e,"unknown escape sequence");r=s=e.position}else Wf(f)?(r0(e,r,s,!0),MU(e,ls(e,!1,t)),r=s=e.position):e.position===e.lineStart&&Cx(e)?Fr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,s=e.position)}Fr(e,"unexpected end of the stream within a double quoted scalar")}function m5e(e,t){var r=!0,s,a=e.tag,n,c=e.anchor,f,p,h,E,C,S={},x,I,T,O;if(O=e.input.charCodeAt(e.position),O===91)p=93,C=!1,n=[];else if(O===123)p=125,C=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),O=e.input.charCodeAt(++e.position);O!==0;){if(ls(e,!0,t),O=e.input.charCodeAt(e.position),O===p)return e.position++,e.tag=a,e.anchor=c,e.kind=C?"mapping":"sequence",e.result=n,!0;r||Fr(e,"missed comma between flow collection entries"),I=x=T=null,h=E=!1,O===63&&(f=e.input.charCodeAt(e.position+1),ul(f)&&(h=E=!0,e.position++,ls(e,!0,t))),s=e.line,CE(e,t,yx,!1,!0),I=e.tag,x=e.result,ls(e,!0,t),O=e.input.charCodeAt(e.position),(E||e.line===s)&&O===58&&(h=!0,O=e.input.charCodeAt(++e.position),ls(e,!0,t),CE(e,t,yx,!1,!0),T=e.result),C?IE(e,n,S,I,x,T):h?n.push(IE(e,null,S,I,x,T)):n.push(x),ls(e,!0,t),O=e.input.charCodeAt(e.position),O===44?(r=!0,O=e.input.charCodeAt(++e.position)):r=!1}Fr(e,"unexpected end of the stream within a flow collection")}function y5e(e,t){var r,s,a=OU,n=!1,c=!1,f=t,p=0,h=!1,E,C;if(C=e.input.charCodeAt(e.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(e.kind="scalar",e.result="";C!==0;)if(C=e.input.charCodeAt(++e.position),C===43||C===45)OU===a?a=C===43?Vee:s5e:Fr(e,"repeat of a chomping mode identifier");else if((E=f5e(C))>=0)E===0?Fr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Fr(e,"repeat of an indentation width identifier"):(f=t+E-1,c=!0);else break;if(xd(C)){do C=e.input.charCodeAt(++e.position);while(xd(C));if(C===35)do C=e.input.charCodeAt(++e.position);while(!Wf(C)&&C!==0)}for(;C!==0;){for(LU(e),e.lineIndent=0,C=e.input.charCodeAt(e.position);(!c||e.lineIndent<f)&&C===32;)e.lineIndent++,C=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>f&&(f=e.lineIndent),Wf(C)){p++;continue}if(e.lineIndent<f){a===Vee?e.result+=wp.repeat(`
`,n?1+p:p):a===OU&&n&&(e.result+=`
`);break}for(s?xd(C)?(h=!0,e.result+=wp.repeat(`
`,n?1+p:p)):h?(h=!1,e.result+=wp.repeat(`
`,p+1)):p===0?n&&(e.result+=" "):e.result+=wp.repeat(`
`,p):e.result+=wp.repeat(`
`,n?1+p:p),n=!0,c=!0,p=0,r=e.position;!Wf(C)&&C!==0;)C=e.input.charCodeAt(++e.position);r0(e,r,e.position,!1)}return!0}function Zee(e,t){var r,s=e.tag,a=e.anchor,n=[],c,f=!1,p;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(e.position);p!==0&&!(p!==45||(c=e.input.charCodeAt(e.position+1),!ul(c)));){if(f=!0,e.position++,ls(e,!0,-1)&&e.lineIndent<=t){n.push(null),p=e.input.charCodeAt(e.position);continue}if(r=e.line,CE(e,t,rte,!1,!0),n.push(e.result),ls(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)Fr(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return f?(e.tag=s,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}function E5e(e,t,r){var s,a,n,c,f=e.tag,p=e.anchor,h={},E={},C=null,S=null,x=null,I=!1,T=!1,O;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),O=e.input.charCodeAt(e.position);O!==0;){if(s=e.input.charCodeAt(e.position+1),n=e.line,c=e.position,(O===63||O===58)&&ul(s))O===63?(I&&(IE(e,h,E,C,S,null),C=S=x=null),T=!0,I=!0,a=!0):I?(I=!1,a=!0):Fr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,O=s;else if(CE(e,r,tte,!1,!0))if(e.line===n){for(O=e.input.charCodeAt(e.position);xd(O);)O=e.input.charCodeAt(++e.position);if(O===58)O=e.input.charCodeAt(++e.position),ul(O)||Fr(e,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(IE(e,h,E,C,S,null),C=S=x=null),T=!0,I=!1,a=!1,C=e.tag,S=e.result;else if(T)Fr(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)Fr(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0;else break;if((e.line===n||e.lineIndent>t)&&(CE(e,t,Ex,!0,a)&&(I?S=e.result:x=e.result),I||(IE(e,h,E,C,S,x,n,c),C=S=x=null),ls(e,!0,-1),O=e.input.charCodeAt(e.position)),e.lineIndent>t&&O!==0)Fr(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return I&&IE(e,h,E,C,S,null),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=h),T}function I5e(e){var t,r=!1,s=!1,a,n,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&Fr(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(r=!0,c=e.input.charCodeAt(++e.position)):c===33?(s=!0,a="!!",c=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(n=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):Fr(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!ul(c);)c===33&&(s?Fr(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),nte.test(a)||Fr(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),l5e.test(n)&&Fr(e,"tag suffix cannot contain flow indicator characters")}return n&&!ite.test(n)&&Fr(e,"tag name cannot contain such characters: "+n),r?e.tag=n:n0.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:Fr(e,'undeclared tag handle "'+a+'"'),!0}function C5e(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Fr(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ul(r)&&!EE(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Fr(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function w5e(e){var t,r,s;if(s=e.input.charCodeAt(e.position),s!==42)return!1;for(s=e.input.charCodeAt(++e.position),t=e.position;s!==0&&!ul(s)&&!EE(s);)s=e.input.charCodeAt(++e.position);return e.position===t&&Fr(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),n0.call(e.anchorMap,r)||Fr(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ls(e,!0,-1),!0}function CE(e,t,r,s,a){var n,c,f,p=1,h=!1,E=!1,C,S,x,I,T;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=c=f=Ex===r||rte===r,s&&ls(e,!0,-1)&&(h=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;I5e(e)||C5e(e);)ls(e,!0,-1)?(h=!0,f=n,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||Ex===r)&&(yx===r||tte===r?I=t:I=t+1,T=e.position-e.lineStart,p===1?f&&(Zee(e,T)||E5e(e,T,I))||m5e(e,I)?E=!0:(c&&y5e(e,I)||g5e(e,I)||d5e(e,I)?E=!0:w5e(e)?(E=!0,(e.tag!==null||e.anchor!==null)&&Fr(e,"alias node should not have any properties")):h5e(e,I,yx===r)&&(E=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(E=f&&Zee(e,T))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Fr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),C=0,S=e.implicitTypes.length;C<S;C+=1)if(x=e.implicitTypes[C],x.resolve(e.result)){e.result=x.construct(e.result),e. Line truncated
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new p5e(e,t),s=e.indexOf("\0");for(s!==-1&&(r.position=s,Fr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)B5e(r);return r.documents}function cte(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var s=lte(e,r);if(typeof t!="function")return s;for(var a=0,n=s.length;a<n;a+=1)t(s[a])}function ute(e,t){var r=lte(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new $ee("expected a single document in the stream, but found more")}}function v5e(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),cte(e,t,wp.extend({schema:ete},r))}function S5e(e,t){return ute(e,wp.extend({schema:ete},t))}O2.exports.loadAll=cte;O2.exports.load=ute;O2.exports.safeLoadAll=v5e;O2.exports.safeLoad=S5e});var Fte=G((XPt,jU)=>{"use strict";var M2=Sd(),U2=dE(),D5e=N2(),b5e=yE(),Ete=Object.prototype.toString,Ite=Object.prototype.hasOwnProperty,P5e=9,L2=10,x5e=13,k5e=32,Q5e=33,R5e=34,Cte=35,T5e=37,F5e=38,N5e=39,O5e=42,wte=44,L5e=45,Bte=58,M5e=61,U5e=62,_5e=63,H5e=64,vte=91,Ste=93,j5e=96,Dte=123,G5e=124,bte=125,Yo={};Yo[0]="\\0";Yo[7]="\\a";Yo[8]="\\b";Yo[9]="\\t";Yo[10]="\\n";Yo[11]="\\v";Yo[12]="\\f";Yo[13]="\\r";Yo[27]="\\e";Yo[34]='\\"';Yo[92]="\\\\";Yo[133]="\\N";Yo[160]="\\_";Yo[8232]="\\L";Yo[8233]="\\P";var q5e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function W5e(e,t){var r,s,a,n,c,f,p;if(t===null)return{};for(r={},s=Object.keys(t),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),p=e.compiledTypeMap.fallback[c],p&&Ite.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function Ate(e){var t,r,s;if(t=e.toString(16).toUpperCase(),e<=255)r="x",s=2;else if(e<=65535)r="u",s=4;else if(e<=4294967295)r="U",s=8;else throw new U2("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+M2.repeat("0",s-t.length)+t}function Y5e(e){this.schema=e.schema||D5e,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=M2.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=W5e(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function pte(e,t){for(var r=M2.repeat(" ",t),s=0,a=-1,n="",c,f=e.length;s<f;)a=e.indexOf(`
`,s),a===-1?(c=e.slice(s),s=f):(c=e.slice(s,a+1),s=a+1),c.length&&c!==`
`&&(n+=r),n+=c;return n}function UU(e,t){return`
`+M2.repeat(" ",e.indent*t)}function V5e(e,t){var r,s,a;for(r=0,s=e.implicitTypes.length;r<s;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}function HU(e){return e===k5e||e===P5e}function wE(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function J5e(e){return wE(e)&&!HU(e)&&e!==65279&&e!==x5e&&e!==L2}function hte(e,t){return wE(e)&&e!==65279&&e!==wte&&e!==vte&&e!==Ste&&e!==Dte&&e!==bte&&e!==Bte&&(e!==Cte||t&&J5e(t))}function K5e(e){return wE(e)&&e!==65279&&!HU(e)&&e!==L5e&&e!==_5e&&e!==Bte&&e!==wte&&e!==vte&&e!==Ste&&e!==Dte&&e!==bte&&e!==Cte&&e!==F5e&&e!==O5e&&e!==Q5e&&e!==G5e&&e!==M5e&&e!==U5e&&e!==N5e&&e!==R5e&&e!==T5e&&e!==H5e&&e!==j5e}function Pte(e){var t=/^\n* /;return t.test(e)}var xte=1,kte=2,Qte=3,Rte=4,wx=5;function z5e(e,t,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,C=-1,S=K5e(e.charCodeAt(0))&&!HU(e.charCodeAt(e.length-1));if(t)for(n=0;n<e.length;n++){if(c=e.charCodeAt(n),!wE(c))return wx;f=n>0?e.charCodeAt(n-1):null,S=S&&hte(c,f)}else{for(n=0;n<e.length;n++){if(c=e.charCodeAt(n),c===L2)p=!0,E&&(h=h||n-C-1>s&&e[C+1]!==" ",C=n);else if(!wE(c))return wx;f=n>0?e.charCodeAt(n-1):null,S=S&&hte(c,f)}h=h||E&&n-C-1>s&&e[C+1]!==" "}return!p&&!h?S&&!a(e)?xte:kte:r>9&&Pte(e)?wx:h?Rte:Qte}function X5e(e,t,r,s){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&q5e.indexOf(t)!==-1)return"'"+t+"'";var a=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=s||e.flowLevel>-1&&r>=e.flowLevel;function f(p){return V5e(e,p)}switch(z5e(t,c,e.indent,n,f)){case xte:return t;case kte:return"'"+t.replace(/'/g,"''")+"'";case Qte:return"|"+gte(t,e.indent)+dte(pte(t,a));case Rte:return">"+gte(t,e.indent)+dte(pte(Z5e(t,n),a));case wx:return'"'+$5e(t,n)+'"';default:throw new U2("impossible error: invalid scalar style")}}()}function gte(e,t){var r=Pte(e)?String(t):"",s=e[e.length-1]===`
`,a=s&&(e[e.length-2]===`
`||e===`
`),n=a?"+":s?"":"-";return r+n+`
`}function dte(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Z5e(e,t){for(var r=/(\n+)([^\n]*)/g,s=function(){var h=e.indexOf(`
`);return h=h!==-1?h:e.length,r.lastIndex=h,mte(e.slice(0,h),t)}(),a=e[0]===`
`||e[0]===" ",n,c;c=r.exec(e);){var f=c[1],p=c[2];n=p[0]===" ",s+=f+(!a&&!n&&p!==""?`
`:"")+mte(p,t),a=n}return s}function mte(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p="";s=r.exec(e);)f=s.index,f-a>t&&(n=c>a?c:f,p+=`
`+e.slice(a,n),a=n+1),c=f;return p+=`
`,e.length-a>t&&c>a?p+=e.slice(a,c)+`
`+e.slice(c+1):p+=e.slice(a),p.slice(1)}function $5e(e){for(var t="",r,s,a,n=0;n<e.length;n++){if(r=e.charCodeAt(n),r>=55296&&r<=56319&&(s=e.charCodeAt(n+1),s>=56320&&s<=57343)){t+=Ate((r-55296)*1024+s-56320+65536),n++;continue}a=Yo[r],t+=!a&&wE(r)?e[n]:a||Ate(r)}return t}function e9e(e,t,r){var s="",a=e.tag,n,c;for(n=0,c=r.length;n<c;n+=1)kd(e,t,r[n],!1,!1)&&(n!==0&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=a,e.dump="["+s+"]"}function t9e(e,t,r,s){var a="",n=e.tag,c,f;for(c=0,f=r.length;c<f;c+=1)kd(e,t+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=UU(e,t)),e.dump&&L2===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}function r9e(e,t,r){var s="",a=e.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E="",c!==0&&(E+=", "),e.condenseFlow&&(E+='"'),p=n[c],h=r[p],kd(e,t,p,!1,!1)&&(e.dump.length>1024&&(E+="? "),E+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),kd(e,t,h,!1,!1)&&(E+=e.dump,s+=E));e.tag=a,e.dump="{"+s+"}"}function n9e(e,t,r,s){var a="",n=e.tag,c=Object.keys(r),f,p,h,E,C,S;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new U2("sortKeys must be a boolean or a function");for(f=0,p=c.length;f<p;f+=1)S="",(!s||f!==0)&&(S+=UU(e,t)),h=c[f],E=r[h],kd(e,t+1,h,!0,!0,!0)&&(C=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,C&&(e.dump&&L2===e.dump.charCodeAt(0)?S+="?":S+="? "),S+=e.dump,C&&(S+=UU(e,t)),kd(e,t+1,E,!0,C)&&(e.dump&&L2===e.dump.charCodeAt(0)?S+=":":S+=": ",S+=e.dump,a+=S));e.tag=n,e.dump=a||"{}"}function yte(e,t,r){var s,a,n,c,f,p;for(a=r?e.explicitTypes:e.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof t=="object"&&t instanceof f.instanceOf)&&(!f.predicate||f.predicate(t))){if(e.tag=r?f.tag:"?",f.represent){if(p=e.styleMap[f.tag]||f.defaultStyle,Ete.call(f.represent)==="[object Function]")s=f.represent(t,p);else if(Ite.call(f.represent,p))s=f.represent[p](t,p);else throw new U2("!<"+f.tag+'> tag resolver accepts not "'+p+'" style');e.dump=s}return!0}return!1}function kd(e,t,r,s,a,n){e.tag=null,e.dump=r,yte(e,r,!1)||yte(e,r,!0);var c=Ete.call(e.dump);s&&(s=e.flowLevel<0||e.flowLevel>t);var f=c==="[object Object]"||c==="[object Array]",p,h;if(f&&(p=e.duplicates.indexOf(r),h=p!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(a=!1),h&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&h&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),c==="[object Object]")s&&Object.keys(e.dump).length!==0?(n9e(e,t,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(r9e(e,t,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object Array]"){var E=e.noArrayIndent&&t>0?t-1:t;s&&e.dump.length!==0?(t9e(e,E,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(e9e(e,E,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump))}else if(c==="[object String]")e.tag!=="?"&&X5e(e,e.dump,t,n);else{if(e.skipInvalid)return!1;throw new U2("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function i9e(e,t){var r=[],s=[],a,n;for(_U(e,r,s),a=0,n=s.length;a<n;a+=1)t.duplicates.push(r[s[a]]);t.usedDuplicates=new Array(n)}function _U(e,t,r){var s,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)_U(e[a],t,r);else for(s=Object.keys(e),a=0,n=s.length;a<n;a+=1)_U(e[s[a]],t,r)}function Tte(e,t){t=t||{};var r=new Y5e(t);return r.noRefs||i9e(e,r),kd(r,0,e,!0,!0)?r.dump+`
`:""}function s9e(e,t){return Tte(e,M2.extend({schema:b5e},t))}jU.exports.dump=Tte;jU.exports.safeDump=s9e});var Ote=G((ZPt,Wi)=>{"use strict";var Bx=fte(),Nte=Fte();function vx(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Wi.exports.Type=Ps();Wi.exports.Schema=Dd();Wi.exports.FAILSAFE_SCHEMA=dx();Wi.exports.JSON_SCHEMA=TU();Wi.exports.CORE_SCHEMA=FU();Wi.exports.DEFAULT_SAFE_SCHEMA=yE();Wi.exports.DEFAULT_FULL_SCHEMA=N2();Wi.exports.load=Bx.load;Wi.exports.loadAll=Bx.loadAll;Wi.exports.safeLoad=Bx.safeLoad;Wi.exports.safeLoadAll=Bx.safeLoadAll;Wi.exports.dump=Nte.dump;Wi.exports.safeDump=Nte.safeDump;Wi.exports.YAMLException=dE();Wi.exports.MINIMAL_SCHEMA=dx();Wi.exports.SAFE_SCHEMA=yE();Wi.exports.DEFAULT_SCHEMA=N2();Wi.exports.scan=vx("scan");Wi.exports.parse=vx("parse");Wi.exports.compose=vx("compose");Wi.exports.addConstructor=vx("addConstructor")});var Mte=G(($Pt,Lte)=>{"use strict";var o9e=Ote();Lte.exports=o9e});var _te=G((ext,Ute)=>{"use strict";function a9e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Qd(e,t,r,s){this.message=e,this.expected=t,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Qd)}a9e(Qd,Error);Qd.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+"-"+n(h.parts[C][1]):n(h.parts[C]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(e)+" but "+p(t)+" found."};function l9e(e,t){t=t!==void 0?t:{};var r={},s={Start:uc},a=uc,n=function(ee){return[].concat(...ee)},c="-",f=mn("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},E="#",C=mn("#",!1),S=fu(),x=function(){return{}},I=":",T=mn(":",!1),O=function(ee,ye){return{[ee]:ye}},U=",",V=mn(",",!1),te=function(ee,ye){return ye},ie=function(ee,ye,Oe){return Object.assign({},...[ee].concat(ye).map(mt=>({[mt]:Oe})))},ue=function(ee){return ee},ae=function(ee){return ee},de=Wa("correct indentation"),Ae=" ",Ce=mn(" ",!1),Ee=function(ee){return ee.length===lr*St},g=function(ee){return ee.length===(lr+1)*St},Se=function(){return lr++,!0},Be=function(){return lr--,!0},me=function(){return pa()},ce=Wa("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,De=Xn(["\r",`
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Qe=/^[^\r\n\t ,\][{}:#"']/,st=Xn(["\r",`
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),_=function(){return pa().replace(/^ *| *$/g,"")},tt="--",Ne=mn("--",!1),ke=/^[a-zA-Z\/0-9]/,be=Xn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),je=/^[^\r\n\t :,]/,Re=Xn(["\r",`
`," "," ",":",","],!0,!1),ct="null",Me=mn("null",!1),P=function(){return null},w="true",b=mn("true",!1),y=function(){return!0},F="false",z=mn("false",!1),X=function(){return!1},$=Wa("string"),se='"',xe=mn('"',!1),Fe=function(){return""},ut=function(ee){return ee},Ct=function(ee){return ee.join("")},qt=/^[^"\\\0-\x1F\x7F]/,ir=Xn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',dn=mn('\\"',!1),Pr=function(){return'"'},Cr="\\\\",Or=mn("\\\\",!1),on=function(){return"\\"},li="\\/",Do=mn("\\/",!1),ns=function(){return"/"},so="\\b",bo=mn("\\b",!1),ji=function(){return"\b"},oo="\\f",Po=mn("\\f",!1),TA=function(){return"\f"},gf="\\n",gh=mn("\\n",!1),dh=function(){return`
`},ao="\\r",Gn=mn("\\r",!1),Ns=function(){return"\r"},lo="\\t",ou=mn("\\t",!1),au=function(){return" "},lu="\\u",FA=mn("\\u",!1),NA=function(ee,ye,Oe,mt){return String.fromCharCode(parseInt(`0x${ee}${ye}${Oe}${mt}`))},fa=/^[0-9a-fA-F]/,Aa=Xn([["0","9"],["a","f"],["A","F"]],!1,!1),OA=Wa("blank space"),gr=/^[ \t]/,xo=Xn([" "," "],!1,!1),Ga=Wa("white space"),Ue=/^[ \t\n\r]/,wr=Xn([" "," ",`
`,"\r"],!1,!1),df=`\r
`,LA=mn(`\r
`,!1),MA=`
`,cu=mn(`
`,!1),uu="\r",lc=mn("\r",!1),we=0,Nt=0,cc=[{line:1,column:1}],Oi=0,co=[],Tt=0,Qn;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function pa(){return e.substring(Nt,we)}function Gi(){return Va(Nt,we)}function Li(ee,ye){throw ye=ye!==void 0?ye:Va(Nt,we),mf([Wa(ee)],e.substring(Nt,we),ye)}function qa(ee,ye){throw ye=ye!==void 0?ye:Va(Nt,we),Ja(ee,ye)}function mn(ee,ye){return{type:"literal",text:ee,ignoreCase:ye}}function Xn(ee,ye,Oe){return{type:"class",parts:ee,inverted:ye,ignoreCase:Oe}}function fu(){return{type:"any"}}function mh(){return{type:"end"}}function Wa(ee){return{type:"other",description:ee}}function Ya(ee){var ye=cc[ee],Oe;if(ye)return ye;for(Oe=ee-1;!cc[Oe];)Oe--;for(ye=cc[Oe],ye={line:ye.line,column:ye.column};Oe<ee;)e.charCodeAt(Oe)===10?(ye.line++,ye.column=1):ye.column++,Oe++;return cc[ee]=ye,ye}function Va(ee,ye){var Oe=Ya(ee),mt=Ya(ye);return{start:{offset:ee,line:Oe.line,column:Oe.column},end:{offset:ye,line:mt.line,column:mt.column}}}function $e(ee){we<Oi||(we>Oi&&(Oi=we,co=[]),co.push(ee))}function Ja(ee,ye){return new Qd(ee,null,null,ye)}function mf(ee,ye,Oe){return new Qd(Qd.buildMessage(ee,ye),ee,ye,Oe)}function uc(){var ee;return ee=UA(),ee}function vn(){var ee,ye,Oe;for(ee=we,ye=[],Oe=ha();Oe!==r;)ye.push(Oe),Oe=ha();return ye!==r&&(Nt=ee,ye=n(ye)),ee=ye,ee}function ha(){var ee,ye,Oe,mt,Et;return ee=we,ye=kl(),ye!==r?(e.charCodeAt(we)===45?(Oe=c,we++):(Oe=r,Tt===0&&$e(f)),Oe!==r?(mt=Tn(),mt!==r?(Et=ga(),Et!==r?(Nt=ee,ye=p(Et),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee}function UA(){var ee,ye,Oe;for(ee=we,ye=[],Oe=_A();Oe!==r;)ye.push(Oe),Oe=_A();return ye!==r&&(Nt=ee,ye=h(ye)),ee=ye,ee}function _A(){var ee,ye,Oe,mt,Et,bt,tr,pn,ci;if(ee=we,ye=Tn(),ye===r&&(ye=null),ye!==r){if(Oe=we,e.charCodeAt(we)===35?(mt=E,we++):(mt=r,Tt===0&&$e(C)),mt!==r){if(Et=[],bt=we,tr=we,Tt++,pn=ot(),Tt--,pn===r?tr=void 0:(we=tr,tr=r),tr!==r?(e.length>we?(pn=e.charAt(we),we++):(pn=r,Tt===0&&$e(S)),pn!==r?(tr=[tr,pn],bt=tr):(we=bt,bt=r)):(we=bt,bt=r),bt!==r)for(;bt!==r;)Et.push(bt),bt=we,tr=we,Tt++,pn=ot(),Tt--,pn===r?tr=void 0:(we=tr,tr=r),tr!==r?(e.length>we?(pn=e.charAt(we),we++):(pn=r,Tt===0&&$e(S)),pn!==r?(tr=[tr,pn],bt=tr):(we=bt,bt=r)):(we=bt,bt=r);else Et=r;Et!==r?(mt=[mt,Et],Oe=mt):(we=Oe,Oe=r)}else we=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(mt=[],Et=Ke(),Et!==r)for(;Et!==r;)mt.push(Et),Et=Ke();else mt=r;mt!==r?(Nt=ee,ye=x(),ee=ye):(we=ee,ee=r)}else we=ee,ee=r}else we=ee,ee=r;if(ee===r&&(ee=we,ye=kl(),ye!==r?(Oe=Ka(),Oe!==r?(mt=Tn(),mt===r&&(mt=null),mt!==r?(e.charCodeAt(we)===58?(Et=I,we++):(Et=r,Tt===0&&$e(T)),Et!==r?(bt=Tn(),bt===r&&(bt=null),bt!==r?(tr=ga(),tr!==r?(Nt=ee,ye=O(Oe,tr),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,ye=kl(),ye!==r?(Oe=is(),Oe!==r?(mt=Tn(),mt===r&&(mt=null),mt!==r?(e.charCodeAt(we)===58?(Et=I,we++):(Et=r,Tt===0&&$e(T)),Et!==r?(bt=Tn(),bt===r&&(bt=null),bt!==r?(tr=ga(),tr!==r?(Nt=ee,ye=O(Oe,tr),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))){if(ee=we,ye=kl(),ye!==r)if(Oe=is(),Oe!==r)if(mt=Tn(),mt!==r)if(Et=Au(),Et!==r){if(bt=[],tr=Ke(),tr!==r)for(;tr!==r;)bt.push(tr),tr=Ke();else bt=r;bt!==r?(Nt=ee,ye=O(Oe,Et),ee=ye):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;if(ee===r)if(ee=we,ye=kl(),ye!==r)if(Oe=is(),Oe!==r){if(mt=[],Et=we,bt=Tn(),bt===r&&(bt=null),bt!==r?(e.charCodeAt(we)===44?(tr=U,we++):(tr=r,Tt===0&&$e(V)),tr!==r?(pn=Tn(),pn===r&&(pn=null),pn!==r?(ci=is(),ci!==r?(Nt=Et,bt=te(Oe,ci),Et=bt):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r),Et!==r)for(;Et!==r;)mt.push(Et),Et=we,bt=Tn(),bt===r&&(bt=null),bt!==r?(e.charCodeAt(we)===44?(tr=U,we++):(tr=r,Tt===0&&$e(V)),tr!==r?(pn=Tn(),pn===r&&(pn=null),pn!==r?(ci=is(),ci!==r?(Nt=Et,bt=te(Oe,ci),Et=bt):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r);else mt=r;mt!==r?(Et=Tn(),Et===r&&(Et=null),Et!==r?(e.charCodeAt(we)===58?(bt=I,we++):(bt=r,Tt===0&&$e(T)),bt!==r?(tr=Tn(),tr===r&&(tr=null),tr!==r?(pn=ga(),pn!==r?(Nt=ee,ye=ie(Oe,mt,pn),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r}return ee}function ga(){var ee,ye,Oe,mt,Et,bt,tr;if(ee=we,ye=we,Tt++,Oe=we,mt=ot(),mt!==r?(Et=Ut(),Et!==r?(e.charCodeAt(we)===45?(bt=c,we++):(bt=r,Tt===0&&$e(f)),bt!==r?(tr=Tn(),tr!==r?(mt=[mt,Et,bt,tr],Oe=mt):(we=Oe,Oe=r)):(we=Oe,Oe=r)):(we=Oe,Oe=r)):(we=Oe,Oe=r),Tt--,Oe!==r?(we=ye,ye=void 0):ye=r,ye!==r?(Oe=Ke(),Oe!==r?(mt=Rn(),mt!==r?(Et=vn(),Et!==r?(bt=da(),bt!==r?(Nt=ee,ye=ue(Et),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,ye=ot(),ye!==r?(Oe=Rn(),Oe!==r?(mt=UA(),mt!==r?(Et=da(),Et!==r?(Nt=ee,ye=ue(mt),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))if(ee=we,ye=fc(),ye!==r){if(Oe=[],mt=Ke(),mt!==r)for(;mt!==r;)Oe.push(mt),mt=Ke();else Oe=r;Oe!==r?(Nt=ee,yeLine truncated
`;if(typeof e=="number"||typeof e=="boolean")return`${e.toString()}
`;if(typeof e=="string")return`${jte(e)}
`;if(Array.isArray(e)){if(e.length===0)return`[]
`;let s=" ".repeat(t);return`
${e.map(n=>`${s}- ${GU(n,t+1,!1)}`).join("")}`}if(typeof e=="object"&&e){let[s,a]=e instanceof Sx?[e.data,!1]:[e,!0],n=" ".repeat(t),c=Object.keys(s);a&&c.sort((p,h)=>{let E=Hte.indexOf(p),C=Hte.indexOf(h);return E===-1&&C===-1?p<h?-1:p>h?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!qte(s[p])).map((p,h)=>{let E=s[p],C=jte(p),S=GU(E,t+1,!0),x=h>0||r?n:"",I=C.length>1024?`? ${C}
${x}:`:`${C}:`,T=S.startsWith(`
`)?S:` ${S}`;return`${x}${I}${T}`}).join(t===0?`
`:"")||`
`;return r?`
${f}`:`${f}`}throw new Error(`Unsupported value type (${e})`)}function fl(e){try{let t=GU(e,0,!1);return t!==`
`?t:""}catch(t){throw t.location&&(t.message=t.message.replace(/(\.)?$/,` (line ${t.location.start.line}, column ${t.location.start.column})$1`)),t}}function u9e(e){return e.endsWith(`
`)||(e+=`
`),(0,Gte.parse)(e)}function A9e(e){if(f9e.test(e))return u9e(e);let t=(0,Dx.safeLoad)(e,{schema:Dx.FAILSAFE_SCHEMA,json:!0});if(t==null)return{};if(typeof t!="object")throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function cs(e){return A9e(e)}var Dx,Gte,c9e,Hte,Sx,f9e,Wte=Xe(()=>{Dx=et(Mte()),Gte=et(_te()),c9e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,Hte=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],Sx=class{constructor(t){this.data=t}};fl.PreserveOrdering=Sx;f9e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var _2={};Vt(_2,{parseResolution:()=>px,parseShell:()=>ux,parseSyml:()=>cs,stringifyArgument:()=>xU,stringifyArgumentSegment:()=>kU,stringifyArithmeticExpression:()=>Ax,stringifyCommand:()=>PU,stringifyCommandChain:()=>gE,stringifyCommandChainThen:()=>bU,stringifyCommandLine:()=>fx,stringifyCommandLineThen:()=>DU,stringifyEnvSegment:()=>cx,stringifyRedirectArgument:()=>T2,stringifyResolution:()=>hx,stringifyShell:()=>hE,stringifyShellLine:()=>hE,stringifySyml:()=>fl,stringifyValueArgument:()=>wd});var vc=Xe(()=>{q$();J$();Wte()});var Vte=G((sxt,qU)=>{"use strict";var p9e=e=>{let t=!1,r=!1,s=!1;for(let a=0;a<e.length;a++){let n=e[a];t&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(e=e.slice(0,a)+"-"+e.slice(a),t=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(e=e.slice(0,a-1)+"-"+e.slice(a-1),s=r,r=!1,t=!0):(t=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return e},Yte=(e,t)=>{if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);let r=a=>t.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(e)?e=e.map(a=>a.trim()).filter(a=>a.length).join("-"):e=e.trim(),e.length===0?"":e.length===1?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=p9e(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(e))};qU.exports=Yte;qU.exports.default=Yte});var Jte=G((oxt,h9e)=>{h9e.exports=[{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 Line truncated
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:
$ ${s}
${JU(t)}`}else this.message=`Command not found; did you mean one of:
${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
`)}
${JU(t)}`}},xx=class extends Error{constructor(t,r){super(),this.input=t,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
`)}
${JU(t)}`}},JU=e=>`While running ${e.filter(t=>t!==ni.EndOfInput&&t!==ni.EndOfPartialInput).map(t=>{let r=JSON.stringify(t);return t.match(/\s/)||t.length===0||r!==`"${t}"`?r:t}).join(" ")}`});function g9e(e){let t=e.split(`
`),r=t.filter(a=>a.match(/\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return t.map(a=>a.slice(s).trimRight()).join(`
`)}function Vo(e,{format:t,paragraphs:r}){return e=e.replace(/\r\n?/g,`
`),e=g9e(e),e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
`),e=e.replace(/\n(\n)?\n*/g,(s,a)=>a||" "),r&&(e=e.split(/\n/).map(s=>{let a=s.match(/^\s*[*-][\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`
`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((c,f)=>" ".repeat(n)+(f===0?"- ":" ")+c).join(`
`)}).join(`
`)),e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(s,a,n)=>t.code(a+n+a)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,a,n)=>t.bold(a+n+a)),e?`${e}
`:""}var KU,Zte,$te,zU=Xe(()=>{KU=Array(80).fill("\u2501");for(let e=0;e<=24;++e)KU[KU.length-e]=`\x1B[38;5;${232+e}m\u2501`;Zte={header:e=>`\x1B[1m\u2501\u2501\u2501 ${e}${e.length<75?` ${KU.slice(e.length+5).join("")}`:":"}\x1B[0m`,bold:e=>`\x1B[1m${e}\x1B[22m`,error:e=>`\x1B[31m\x1B[1m${e}\x1B[22m\x1B[39m`,code:e=>`\x1B[36m${e}\x1B[39m`},$te={header:e=>e,bold:e=>e,error:e=>e,code:e=>e}});function Ba(e){return{...e,[H2]:!0}}function Yf(e,t){return typeof e>"u"?[e,t]:typeof e=="object"&&e!==null&&!Array.isArray(e)?[void 0,e]:[e,t]}function Qx(e,{mergeName:t=!1}={}){let r=e.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,s,a]=r;return t&&(a=a[0].toLowerCase()+a.slice(1)),a=s!=="."||!t?`${s.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function j2(e,t){return t.length===1?new it(`${e}${Qx(t[0],{mergeName:!0})}`):new it(`${e}:
${t.map(r=>`
- ${Qx(r)}`).join("")}`)}function Fd(e,t,r){if(typeof r>"u")return t;let s=[],a=[],n=f=>{let p=t;return t=f,n.bind(null,p)};if(!r(t,{errors:s,coercions:a,coercion:n}))throw j2(`Invalid value for ${e}`,s);for(let[,f]of a)f();return t}var H2,Bp=Xe(()=>{kx();H2=Symbol("clipanion/isOption")});var Jo={};Vt(Jo,{KeyRelationship:()=>Vf,TypeAssertionError:()=>s0,applyCascade:()=>W2,as:()=>F9e,assert:()=>Q9e,assertWithErrors:()=>R9e,cascade:()=>Nx,fn:()=>N9e,hasAtLeastOneKey:()=>n_,hasExactLength:()=>ire,hasForbiddenKeys:()=>eqe,hasKeyRelationship:()=>V2,hasMaxLength:()=>L9e,hasMinLength:()=>O9e,hasMutuallyExclusiveKeys:()=>tqe,hasRequiredKeys:()=>$9e,hasUniqueItems:()=>M9e,isArray:()=>Rx,isAtLeast:()=>t_,isAtMost:()=>H9e,isBase64:()=>K9e,isBoolean:()=>B9e,isDate:()=>S9e,isDict:()=>P9e,isEnum:()=>ks,isHexColor:()=>J9e,isISO8601:()=>V9e,isInExclusiveRange:()=>G9e,isInInclusiveRange:()=>j9e,isInstanceOf:()=>k9e,isInteger:()=>r_,isJSON:()=>z9e,isLiteral:()=>tre,isLowerCase:()=>q9e,isMap:()=>b9e,isNegative:()=>U9e,isNullable:()=>Z9e,isNumber:()=>$U,isObject:()=>rre,isOneOf:()=>e_,isOptional:()=>X9e,isPartial:()=>x9e,isPayload:()=>v9e,isPositive:()=>_9e,isRecord:()=>Fx,isSet:()=>D9e,isString:()=>SE,isTuple:()=>Tx,isUUID4:()=>Y9e,isUnknown:()=>ZU,isUpperCase:()=>W9e,makeTrait:()=>nre,makeValidator:()=>Wr,matchesRegExp:()=>q2,softAssert:()=>T9e});function ii(e){return e===null?"null":e===void 0?"undefined":e===""?"an empty string":typeof e=="symbol"?`<${e.toString()}>`:Array.isArray(e)?"an array":JSON.stringify(e)}function vE(e,t){if(e.length===0)return"nothing";if(e.length===1)return ii(e[0]);let r=e.slice(0,-1),s=e[e.length-1],a=e.length>2?`, ${t} `:` ${t} `;return`${r.map(n=>ii(n)).join(", ")}${a}${ii(s)}`}function i0(e,t){var r,s,a;return typeof t=="number"?`${(r=e?.p)!==null&&r!==void 0?r:"."}[${t}]`:d9e.test(t)?`${(s=e?.p)!==null&&s!==void 0?s:""}.${t}`:`${(a=e?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(t)}]`}function XU(e,t,r){return e===1?t:r}function mr({errors:e,p:t}={},r){return e?.push(`${t??"."}: ${r}`),!1}function C9e(e,t){return r=>{e[t]=r}}function Jf(e,t){return r=>{let s=e[t];return e[t]=r,Jf(e,t).bind(null,s)}}function G2(e,t,r){let s=()=>(e(r()),a),a=()=>(e(t),s);return s}function ZU(){return Wr({test:(e,t)=>!0})}function tre(e){return Wr({test:(t,r)=>t!==e?mr(r,`Expected ${ii(e)} (got ${ii(t)})`):!0})}function SE(){return Wr({test:(e,t)=>typeof e!="string"?mr(t,`Expected a string (got ${ii(e)})`):!0})}function ks(e){let t=Array.isArray(e)?e:Object.values(e),r=t.every(a=>typeof a=="string"||typeof a=="number"),s=new Set(t);return s.size===1?tre([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${vE(t,"or")} (got ${ii(a)})`):mr(n,`Expected a valid enumeration value (got ${ii(a)})`)})}function B9e(){return Wr({test:(e,t)=>{var r;if(typeof e!="boolean"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return mr(t,"Unbound coercion result");let s=w9e.get(e);if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return mr(t,`Expected a boolean (got ${ii(e)})`)}return!0}})}function $U(){return Wr({test:(e,t)=>{var r;if(typeof e!="number"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return mr(t,"Unbound coercion result");let s;if(typeof e=="string"){let a;try{a=JSON.parse(e)}catch{}if(typeof a=="number")if(JSON.stringify(a)===e)s=a;else return mr(t,`Received a number that can't be safely represented by the runtime (${e})`)}if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return mr(t,`Expected a number (got ${ii(e)})`)}return!0}})}function v9e(e){return Wr({test:(t,r)=>{var s;if(typeof r?.coercions>"u")return mr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return mr(r,"Unbound coercion result");if(typeof t!="string")return mr(r,`Expected a string (got ${ii(t)})`);let a;try{a=JSON.parse(t)}catch{return mr(r,`Expected a JSON string (got ${ii(t)})`)}let n={value:a};return e(a,Object.assign(Object.assign({},r),{coercion:Jf(n,"value")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:".",r.coercion.bind(null,n.value)]),!0):!1}})}function S9e(){return Wr({test:(e,t)=>{var r;if(!(e instanceof Date)){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return mr(t,"Unbound coercion result");let s;if(typeof e=="string"&&ere.test(e))s=new Date(e);else{let a;if(typeof e=="string"){let n;try{n=JSON.parse(e)}catch{}typeof n=="number"&&(a=n)}else typeof e=="number"&&(a=e);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(t,`Received a timestamp that can't be safely represented by the runtime (${e})`)}if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return mr(t,`Expected a date (got ${ii(e)})`)}return!0}})}function Rx(e,{delimiter:t}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r=="string"&&typeof t<"u"&&typeof s?.coercions<"u"){iLine truncated
`;for(let s of t)r+=`
- ${s}`}super(r)}};Y2={missing:(e,t)=>e.has(t),undefined:(e,t,r)=>e.has(t)&&typeof r[t]<"u",nil:(e,t,r)=>e.has(t)&&r[t]!=null,falsy:(e,t,r)=>e.has(t)&&!!r[t]};(function(e){e.Forbids="Forbids",e.Requires="Requires"})(Vf||(Vf={}));rqe={[Vf.Forbids]:{expect:!1,message:"forbids using"},[Vf.Requires]:{expect:!0,message:"requires using"}}});var at,o0=Xe(()=>{Bp();at=class{constructor(){this.help=!1}static Usage(t){return t}async catch(t){throw t}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Al(),Jo)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw j2("Invalid option schema",p);for(let[,C]of h)C()}else if(r!=null)throw new Error("Invalid command schema");let s=await this.execute();return typeof s<"u"?s:0}};at.isOption=H2;at.Default=[]});function pl(e){VU&&console.log(e)}function ore(){let e={nodes:[]};for(let t=0;t<In.CustomNode;++t)e.nodes.push(Yl());return e}function nqe(e){let t=ore(),r=[],s=t.nodes.length;for(let a of e){r.push(s);for(let n=0;n<a.nodes.length;++n)lre(n)||t.nodes.push(fqe(a.nodes[n],s));s+=a.nodes.length-In.CustomNode+1}for(let a of r)DE(t,In.InitialNode,a);return t}function Nu(e,t){return e.nodes.push(t),e.nodes.length-1}function iqe(e){let t=new Set,r=s=>{if(t.has(s))return;t.add(s);let a=e.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=e.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(In.InitialNode)}function sqe(e,{prefix:t=""}={}){if(VU){pl(`${t}Nodes are:`);for(let r=0;r<e.nodes.length;++r)pl(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}}function oqe(e,t,r=!1){pl(`Running a vm on ${JSON.stringify(t)}`);let s=[{node:In.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];sqe(e,{prefix:" "});let a=[ni.StartOfInput,...t];for(let n=0;n<a.length;++n){let c=a[n],f=c===ni.EndOfInput||c===ni.EndOfPartialInput,p=n-1;pl(` Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:C}of s){pl(` Current node is ${E}`);let S=e.nodes[E];if(E===In.ErrorNode){h.push({node:E,state:C});continue}console.assert(S.shortcuts.length===0,"Shortcuts should have been eliminated by now");let x=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||x)if(x){let I=S.statics[c];for(let{to:T,reducer:O}of I)h.push({node:T,state:typeof O<"u"?Ox(s_,O,C,c,p):C}),pl(` Static transition to ${T} found`)}else pl(" No static transition found");else{let I=!1;for(let T of Object.keys(S.statics))if(T.startsWith(c)){if(c===T)for(let{to:O,reducer:U}of S.statics[T])h.push({node:O,state:typeof U<"u"?Ox(s_,U,C,c,p):C}),pl(` Static transition to ${O} found`);else for(let{to:O}of S.statics[T])h.push({node:O,state:{...C,remainder:T.slice(c.length)}}),pl(` Static transition to ${O} found (partial match)`);I=!0}I||pl(" No partial static transition found")}if(!f)for(let[I,{to:T,reducer:O}]of S.dynamics)Ox(Aqe,I,C,c,p)&&(h.push({node:T,state:typeof O<"u"?Ox(s_,O,C,c,p):C}),pl(` Dynamic transition to ${T} found (via ${I})`))}if(h.length===0&&f&&t.length===1)return[{node:In.InitialNode,state:sre}];if(h.length===0)throw new BE(t,s.filter(({node:E})=>E!==In.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===In.ErrorNode))throw new BE(t,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=lqe(h)}if(s.length>0){pl(" Results:");for(let n of s)pl(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else pl(" No results");return s}function aqe(e,t,{endToken:r=ni.EndOfInput}={}){let s=oqe(e,[...t,r]);return cqe(t,s.map(({state:a})=>a))}function lqe(e){let t=0;for(let{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:r})=>r.path.length===t)}function cqe(e,t){let r=t.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Td||S.requiredOptions.every(x=>x.some(I=>S.options.find(T=>T.name===I))));if(a.length===0)throw new BE(e,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:x})=>!x).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S Line truncated
`),this.context.stdout.write(`
`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
`)}}}});async function dre(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=yre(e);return Sa.from(r,t).runExit(s,a)}async function mre(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=yre(e);return Sa.from(r,t).run(s,a)}function yre(e){let t,r,s,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(s=process.argv.slice(2)),e.length){case 1:r=e[0];break;case 2:e[0]&&e[0].prototype instanceof at||Array.isArray(e[0])?(r=e[0],Array.isArray(e[1])?s=e[1]:a=e[1]):(t=e[0],r=e[1]);break;case 3:Array.isArray(e[2])?(t=e[0],r=e[1],s=e[2]):e[0]&&e[0].prototype instanceof at||Array.isArray(e[0])?(r=e[0],s=e[1],a=e[2]):(t=e[0],r=e[1],a=e[2]);break;default:t=e[0],r=e[1],s=e[2],a=e[3];break}if(typeof s>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function gre(e){return e()}var hre,Sa,Ere=Xe(()=>{Px();Mx();zU();Are();o0();pre();hre=Symbol("clipanion/errorCommand");Sa=class e{constructor({binaryLabel:t,binaryName:r="...",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Lx({binaryName:r}),this.binaryLabel=t,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(t,r={}){let s=new e(r),a=Array.isArray(t)?t:[t];for(let n of a)s.register(n);return s}register(t){var r;let s=new Map,a=new t;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[at.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=t.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<"u")for(let p of f)n.addPath(p);this.registrations.set(t,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:t})}process(t,r){let{input:s,context:a,partial:n}=typeof t=="object"&&Array.isArray(t)?{input:t,context:r}:t,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...e.defaultContext,...a};switch(p.selectedIndex){case Td:{let E=_x.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[x,{transformer:I}]of C.specs.entries())S[x]=I(C.builder,x,p,h);return S}catch(x){throw x[hre]=S,x}}break}}async run(t,r){var s,a;let n,c={...e.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(t))n=t;else try{n=this.process(t,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=fre(c))!==null&&a!==void 0?a:gre,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(t,r){process.exitCode=await this.run(t,r)}definition(t,{colored:r=!1}={}){if(!t.usage)return null;let{usage:s}=this.getUsageByRegistration(t,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(t,{detailed:!0,inlineOptions:!1}),c=typeof t.usage.category<"u"?Vo(t.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof t.usage.description<"u"?Vo(t.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof t.usage.details<"u"?Vo(t.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof t.usage.examples<"u"?t.usage.examples.map(([E,C])=>[Vo(E,{format:this.format(r),paragraphs:!1}),C.replace(/\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:t=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:t});a&&r.push(a)}return r}usage(t=null,{colored:r,detailed:s=!1,prefix:a="$ "}={}){var n;if(t===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(x=>x.length===0))!==null&&n!==void 0?n:!1))if(t){t=null;break}else t=p;else if(E){t=null;continue}}t&&(s=!0)}let c=t!==null&&t instanceof at?t.constructor:t,f="";if(c)if(s){let{description:p="",details:h="",examples:E=[]}=c.usage||{};p!==""&&(f+=Vo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,x=>x.toUpperCase()),f+=`
`),(h!==""||E.length>0)&&(f+=`${this.format(r).header("Usage")}
`,f+=`
`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C}
`,S.length>0){f+=`
`,f+=`${this.format(r).header("Options")}
`;let x=S.reduce((I,T)=>Math.max(I,T.definition.length),0);f+=`
`;for(let{definition:I,description:T}of S)f+=` ${this.format(r).bold(I.padEnd(x))} ${Vo(T,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(f+=`
`,f+=`${this.format(r).header("Details")}
`,f+=`
`,f+=Vo(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`
`,f+=`${this.format(r).header("Examples")}
`;for(let[x,I]of E)f+=`
`,f+=Vo(x,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}
`}else{let p=new Map;for(let[S,{index:x}]of this.registrations.entries()){if(typeof S.usage>"u")continue;let I=typeof S.usage.category<"u"?Vo(S.usage.category,{format:this.format(r),paragraphs:!1}):null,T=p.get(I);typeof T>"u"&&p.set(I,T=[]);let{usage:O}=this.getUsageByIndex(x);T.push({commandClass:S,usage:O})}let h=Array.from(p.keys()).sort((S,x)=>S===null?-1:x===null?1:S.localeCompare(x,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",C=typeof this.binaryVersion<"u";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}
`:f+=`${this.format(r).header(`${this.binaryVersion}`)}
`,f+=` ${this.format(r).bold(a)}${this.binaryName} <command>
`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>
`;for(let S of h){let x=p.get(S).slice().sort((T,O)=>T.usage.localeCompare(O.usage,"en",{usage:"sort",caseFirst:"upper"})),I=S!==null?S.trim():"General commands";f+=`
`,f+=`${this.format(r).header(`${I}`)}
`;for(let{commandClass:T,usage:O}of x){let U=T.usage.description||"undocumented";f+=`
`,f+=` ${this.format(r).bold(O)}
`,f+=` ${Vo(U,{format:this.format(r),paragraphs:!1})}`}}f+=`
`,f+=Vo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return f}error(t,r){var s,{colored:a,command:n=(s=t[hre])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!t||typeof t!="object"||!("stack"in t))&&(t=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(t)})`));let c="",f=t.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}: ${t.message}
`;let p=t.clipanion;return typeof p<"u"?p.type==="usage"&&(c+=`
`,c+=this.usage(n)):t.stack&&(c+=`${t.stack.replace(/^.*\n/,"")}
`),c}format(t){var r;return((r=t??this.enableColors)!==null&&r!==void 0?r:e.defaultContext.colorDepth>1)?Zte:$te}getUsageByRegistration(t,r){let s=this.registrations.get(t);if(typeof s>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(t,r){return this.builder.getBuilderByIndex(t).usage(r)}};Sa.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:ure()}});var J2,Ire=Xe(()=>{o0();J2=class extends at{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
`)}};J2.paths=[["--clipanion=definitions"]]});var K2,Cre=Xe(()=>{o0();K2=class extends at{async execute(){this.context.stdout.write(this.cli.usage())}};K2.paths=[["-h"],["--help"]]});function Hx(e={}){return Ba({definition(t,r){var s;t.addProxy({name:(s=e.name)!==null&&s!==void 0?s:r,required:e.required})},transformer(t,r,s){return s.positionals.map(({value:a})=>a)}})}var a_=Xe(()=>{Bp()});var z2,wre=Xe(()=>{o0();a_();z2=class extends at{constructor(){super(...arguments),this.args=Hx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
`)}};z2.paths=[["--clipanion=tokens"]]});var X2,Bre=Xe(()=>{o0();X2=class extends at{async execute(){var t;this.context.stdout.write(`${(t=this.cli.binaryVersion)!==null&&t!==void 0?t:"<unknown>"}
`)}};X2.paths=[["-v"],["--version"]]});var l_={};Vt(l_,{DefinitionsCommand:()=>J2,HelpCommand:()=>K2,TokensCommand:()=>z2,VersionCommand:()=>X2});var vre=Xe(()=>{Ire();Cre();wre();Bre()});function Sre(e,t,r){let[s,a]=Yf(t,r??{}),{arity:n=1}=a,c=e.split(","),f=new Set(c);return Ba({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<"u"?[...s]:void 0;for(let{name:x,value:I}of E.options)f.has(x)&&(C=x,S=S??[],S.push(I));return typeof S<"u"?Fd(C??h,S,a.validator):S}})}var Dre=Xe(()=>{Bp()});function bre(e,t,r){let[s,a]=Yf(t,r??{}),n=e.split(","),c=new Set(n);return Ba({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var Pre=Xe(()=>{Bp()});function xre(e,t,r){let[s,a]=Yf(t,r??{}),n=e.split(","),c=new Set(n);return Ba({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var kre=Xe(()=>{Bp()});function Qre(e={}){return Ba({definition(t,r){var s;t.addRest({name:(s=e.name)!==null&&s!==void 0?s:r,required:e.required})},transformer(t,r,s){let a=c=>{let f=s.positionals[c];return f.extra===Vl||f.extra===!1&&c<t.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var Rre=Xe(()=>{Mx();Bp()});function pqe(e,t,r){let[s,a]=Yf(t,r??{}),{arity:n=1}=a,c=e.split(","),f=new Set(c);return Ba({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,x=s;typeof a.env<"u"&&C.env[a.env]&&(S=a.env,x=C.env[a.env]);for(let{name:I,value:T}of E.options)f.has(I)&&(S=I,x=T);return typeof x=="string"?Fd(S??h,x,a.validator):x}})}function hqe(e={}){let{required:t=!0}=e;return Ba({definition(r,s){var a;r.addPositional({name:(a=e.name)!==null&&a!==void 0?a:s,required:e.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===Vl||t&&a.positionals[c].extra===!0||!t&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Fd((n=e.name)!==null&&n!==void 0?n:s,f.value,e.validator)}}})}function Tre(e,...t){return typeof e=="string"?pqe(e,...t):hqe(e)}var Fre=Xe(()=>{Mx();Bp()});var he={};Vt(he,{Array:()=>Sre,Boolean:()=>bre,Counter:()=>xre,Proxy:()=>Hx,Rest:()=>Qre,String:()=>Tre,applyValidator:()=>Fd,cleanValidationError:()=>Qx,formatError:()=>j2,isOptionSymbol:()=>H2,makeCommandOption:()=>Ba,rerouteArguments:()=>Yf});var Nre=Xe(()=>{Bp();a_();Dre();Pre();kre();Rre();Fre()});var Z2={};Vt(Z2,{Builtins:()=>l_,Cli:()=>Sa,Command:()=>at,Option:()=>he,UsageError:()=>it,formatMarkdownish:()=>Vo,run:()=>mre,runExit:()=>dre});var Yt=Xe(()=>{kx();zU();o0();Ere();vre();Nre()});var Ore=G((pkt,gqe)=>{gqe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var _re=G((hkt,vp)=>{var Lre=Ie("fs"),u_=Ie("path"),dqe=Ie("os"),mqe=Ie("crypto"),yqe=Ore(),f_=yqe.version,Eqe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Iqe(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
`);let s;for(;(s=Eqe.exec(r))!=null;){let a=s[1],n=s[2]||"";n=n.trim();let c=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(n=n.replace(/\\n/g,`
`),n=n.replace(/\\r/g,"\r")),t[a]=n}return t}function Cqe(e){let t=Ure(e),r=Ws.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let s=Mre(e).split(","),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=vqe(r,f);n=Ws.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return Ws.parse(n)}function wqe(e){console.log(`[dotenv@${f_}][INFO] ${e}`)}function Bqe(e){console.log(`[dotenv@${f_}][WARN] ${e}`)}function c_(e){console.log(`[dotenv@${f_}][DEBUG] ${e}`)}function Mre(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function vqe(e,t){let r;try{r=new URL(t)}catch(f){throw f.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):f}let s=r.password;if(!s)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=e.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function Ure(e){let t=u_.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function Sqe(e){return e[0]==="~"?u_.join(dqe.homedir(),e.slice(1)):e}function Dqe(e){wqe("Loading env from encrypted .env.vault");let t=Ws._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Ws.populate(r,t,e),{parsed:t}}function bqe(e){let t=u_.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug);e&&(e.path!=null&&(t=Sqe(e.path)),e.encoding!=null&&(r=e.encoding));try{let a=Ws.parse(Lre.readFileSync(t,{encoding:r})),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),Ws.populate(n,a,e),{parsed:a}}catch(a){return s&&c_(`Failed to load ${t} ${a.message}`),{error:a}}}function Pqe(e){let t=Ure(e);return Mre(e).length===0?Ws.configDotenv(e):Lre.existsSync(t)?Ws._configVault(e):(Bqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Ws.configDotenv(e))}function xqe(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=mqe.createDecipheriv("aes-256-gcm",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message==="Invalid key length",h=c.message==="Unsupported state or unable to authenticate data";if(f||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function kqe(e,t,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(a===!0&&(e[n]=t[n]),s&&c_(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}var Ws={configDotenv:bqe,_configVault:Dqe,_parseVault:Cqe,config:Pqe,decrypt:xqe,parse:Iqe,populate:kqe};vp.exports.configDotenv=Ws.configDotenv;vp.exports._configVault=Ws._configVault;vp.exports._parseVault=Ws._parseVault;vp.exports.config=Ws.config;vp.exports.decrypt=Ws.decrypt;vp.exports.parse=Ws.parse;vp.exports.populate=Ws.populate;vp.exports=Ws});var jre=G((gkt,Hre)=>{"use strict";Hre.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Nd=G((dkt,A_)=>{"use strict";var Qqe=jre(),Gre=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,s=()=>{r--,t.length>0&&t.shift()()},a=(f,p,...h)=>{r++;let E=Qqe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<e?a(f,p,...h):t.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),c};A_.exports=Gre;A_.exports.default=Gre});function Kf(e){return`YN${e.toString(10).padStart(4,"0")}`}function jx(e){let t=Number(e.slice(2));if(typeof Ir[t]>"u")throw new Error(`Unknown message name: "${e}"`);return t}var Ir,Gx=Xe(()=>{Ir=(Ue=>(Ue[Ue.UNNAMED=0]="UNNAMED",Ue[Ue.EXCEPTION=1]="EXCEPTION",Ue[Ue.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Ue[Ue.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Ue[Ue.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Ue[Ue.BUILD_DISABLED=5]="BUILD_DISABLED",Ue[Ue.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Ue[Ue.MUST_BUILD=7]="MUST_BUILD",Ue[Ue.MUST_REBUILD=8]="MUST_REBUILD",Ue[Ue.BUILD_FAILED=9]="BUILD_FAILED",Ue[Ue.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Ue[Ue.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Ue[Ue.LINKER_NOT_FOUND=12]="LINKER_NOT_FO Line truncated
`,"\r","(",")","!","|","&","^"],!0,!1),ae=function($){return t.queryPattern.test($)},de=function($){return t.checkFn($)},Ae=Re("whitespace"),Ce=/^[ \t\n\r]/,Ee=ke([" "," ",`
`,"\r"],!1,!1),g=0,Se=0,Be=[{line:1,column:1}],me=0,ce=[],Z=0,De;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function Qe(){return e.substring(Se,g)}function st(){return Me(Se,g)}function _($,se){throw se=se!==void 0?se:Me(Se,g),b([Re($)],e.substring(Se,g),se)}function tt($,se){throw se=se!==void 0?se:Me(Se,g),w($,se)}function Ne($,se){return{type:"literal",text:$,ignoreCase:se}}function ke($,se,xe){return{type:"class",parts:$,inverted:se,ignoreCase:xe}}function be(){return{type:"any"}}function je(){return{type:"end"}}function Re($){return{type:"other",description:$}}function ct($){var se=Be[$],xe;if(se)return se;for(xe=$-1;!Be[xe];)xe--;for(se=Be[xe],se={line:se.line,column:se.column};xe<$;)e.charCodeAt(xe)===10?(se.line++,se.column=1):se.column++,xe++;return Be[$]=se,se}function Me($,se){var xe=ct($),Fe=ct(se);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:se,line:Fe.line,column:Fe.column}}}function P($){g<me||(g>me&&(me=g,ce=[]),ce.push($))}function w($,se){return new _d($,null,null,se)}function b($,se,xe){return new _d(_d.buildMessage($,se),$,se,xe)}function y(){var $,se,xe,Fe,ut,Ct,qt,ir;if($=g,se=F(),se!==r){for(xe=[],Fe=g,ut=X(),ut!==r?(e.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&P(c)),Ct===r&&(e.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&P(p)),Ct===r&&(e.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&P(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(ut=[ut,Ct,qt,ir],Fe=ut):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);Fe!==r;)xe.push(Fe),Fe=g,ut=X(),ut!==r?(e.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&P(c)),Ct===r&&(e.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&P(p)),Ct===r&&(e.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&P(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(ut=[ut,Ct,qt,ir],Fe=ut):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);xe!==r?(Se=$,se=C(se,xe),$=se):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,se,xe,Fe,ut,Ct;return $=g,e.charCodeAt(g)===33?(se=S,g++):(se=r,Z===0&&P(x)),se!==r?(xe=F(),xe!==r?(Se=$,se=I(xe),$=se):(g=$,$=r)):(g=$,$=r),$===r&&($=g,e.charCodeAt(g)===40?(se=T,g++):(se=r,Z===0&&P(O)),se!==r?(xe=X(),xe!==r?(Fe=y(),Fe!==r?(ut=X(),ut!==r?(e.charCodeAt(g)===41?(Ct=U,g++):(Ct=r,Z===0&&P(V)),Ct!==r?(Se=$,se=te(Fe),$=se):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,se,xe,Fe,ut;if($=g,se=X(),se!==r){if(xe=g,Fe=[],ie.test(e.charAt(g))?(ut=e.charAt(g),g++):(ut=r,Z===0&&P(ue)),ut!==r)for(;ut!==r;)Fe.push(ut),ie.test(e.charAt(g))?(ut=e.charAt(g),g++):(ut=r,Z===0&&P(ue));else Fe=r;Fe!==r?xe=e.substring(xe,g):xe=Fe,xe!==r?(Se=g,Fe=ae(xe),Fe?Fe=void 0:Fe=r,Fe!==r?(Se=$,se=de(xe),$=se):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,se;for(Z++,$=[],Ce.test(e.charAt(g))?(se=e.charAt(g),g++):(se=r,Z===0&&P(Ee));se!==r;)$.push(se),Ce.test(e.charAt(g))?(se=e.charAt(g),g++):(se=r,Z===0&&P(Ee));return Z--,$===r&&(se=r,Z===0&&P(Ae)),$}if(De=a(),De!==r&&g===e.length)return De;throw De!==r&&g<e.length&&P(je()),b(ce,me<e.length?e.charAt(me):null,me<e.length?Me(me,me+1):Me(me,me))}Hie.exports={SyntaxError:_d,parse:kVe}});var Gie=G(tk=>{var{parse:QVe}=jie();tk.makeParser=(e=/[a-z]+/)=>(t,r)=>QVe(t,{queryPattern:e,checkFn:r});tk.parse=tk.makeParser()});var Wie=G((AQt,qie)=>{"use strict";qie.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightLine truncated
`:`
`)+r,a=s+1,s=e.indexOf(`
`,a)}while(s!==-1);return n+=e.substr(a),n};lse.exports={stringReplaceAll:qVe,stringEncaseCRLFWithFirstIndex:WVe}});var hse=G((IQt,pse)=>{"use strict";var YVe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,use=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,VVe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,JVe=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,KVe=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ase(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):KVe.get(e)||e}function zVe(e,t){let r=[],s=t.trim().split(/\s*,\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(VVe))r.push(a[2].replace(JVe,(f,p,h)=>p?Ase(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function XVe(e){use.lastIndex=0;let t=[],r;for(;(r=use.exec(e))!==null;){let s=r[1];if(r[2]){let a=zVe(s,r[2]);t.push([s].concat(a))}else t.push([s])}return t}function fse(e,t){let r={};for(let a of t)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=e;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}pse.exports=(e,t)=>{let r=[],s=[],a=[];if(t.replace(YVe,(n,c,f,p,h,E)=>{if(c)a.push(Ase(c));else if(p){let C=a.join("");a=[],s.push(r.length===0?C:fse(e,r)(C)),r.push({inverse:f,styles:XVe(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(fse(e,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),s.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var NE=G((CQt,Ise)=>{"use strict";var cB=ik(),{stdout:__,stderr:H_}=ase(),{stringReplaceAll:ZVe,stringEncaseCRLFWithFirstIndex:$Ve}=cse(),{isArray:sk}=Array,dse=["ansi","ansi","ansi256","ansi16m"],FE=Object.create(null),e7e=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=__?__.level:0;e.level=t.level===void 0?r:t.level},j_=class{constructor(t){return mse(t)}},mse=e=>{let t={};return e7e(t,e),t.template=(...r)=>Ese(t.template,...r),Object.setPrototypeOf(t,ok.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=j_,t.template};function ok(e){return mse(e)}for(let[e,t]of Object.entries(cB))FE[e]={get(){let r=ak(this,G_(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};FE.visible={get(){let e=ak(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var yse=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of yse)FE[e]={get(){let{level:t}=this;return function(...r){let s=G_(cB.color[dse[t]][e](...r),cB.color.close,this._styler);return ak(this,s,this._isEmpty)}}};for(let e of yse){let t="bg"+e[0].toUpperCase()+e.slice(1);FE[t]={get(){let{level:r}=this;return function(...s){let a=G_(cB.bgColor[dse[r]][e](...s),cB.bgColor.close,this._styler);return ak(this,a,this._isEmpty)}}}}var t7e=Object.defineProperties(()=>{},{...FE,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),G_=(e,t,r)=>{let s,a;return r===void 0?(s=e,a=t):(s=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:s,closeAll:a,parent:r}},ak=(e,t,r)=>{let s=(...a)=>sk(a[0])&&sk(a[0].raw)?gse(s,Ese(s,...a)):gse(s,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(s,t7e),s._generator=e,s._styler=t,s._isEmpty=r,s},gse=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:s,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=ZVe(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
`);return n!==-1&&(t=$Ve(t,a,s,n)),s+t+a},U_,Ese=(e,...t)=>{let[r]=t;if(!sk(r)||!sk(r.raw))return t.join(" ");let s=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return U_===void 0&&(U_=hse()),U_(e,a.join(""))};Object.defineProperties(ok.prototype,FE);var lk=ok();lk.supportsColor=__;lk.stderr=ok({level:H_?H_.level:0});lk.stderr.supportsColor=H_;Ise.exports=lk});var ck=G(Pc=>{"use strict";Pc.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Pc.find=(e,t)=>e.nodes.find(r=>r.type===t);Pc.exceedsLimit=(e,t,r=1,s)=>s===!1||!Pc.isInteger(e)||!Pc.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=s;Pc.escapeNode=(e,t=0,r)=>{let s=e.nodes[t];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};Pc.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Pc.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Pc.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Pc.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Pc.flatten=(...e)=>{let t=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,t):n!==void 0&&t.push(n)}return t};return r(e),t}});var uk=G((BQt,wse)=>{"use strict";var Cse=ck();wse.exports=(e,t={})=>{let r=(s,a={})=>{let n=t.escapeInvalid&&Cse.isInvalidBrace(a),c=s.invalid===!0&&t.escapeInvalid===!0,f="";if(s.value)return(n||c)&&Cse.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(e)}});var vse=G((vQt,Bse)=>{"use strict";Bse.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var Tse=G((SQt,Rse)=>{"use strict";var Sse=vse(),Hd=(e,t,r)=>{if(Sse(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Sse(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=e+":"+t+"="+a+n+c+f;if(Hd.cache.hasOwnProperty(p))return Hd.cache[p].result;let h=Math.min(e,t),E=Math.max(e,t);if(Math.abs(h-E)===1){let T=e+"|"+t;return s.capture?`(${T})`:s.wrap===!1?T:`(?:${T})`}let C=Qse(e)||Qse(t),S={min:e,max:t,a:h,b:E},x=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let T=E<0?Math.abs(E):1;I=Dse(T,Math.abs(h),S,s),h=S.a=0}return E>=0&&(x=Dse(h,E,S,s)),S.negatives=I,S.positives=x,S.result=r7e(I,x,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&x.length+I.length>1&&(S.result=`(?:${S.result})`),Hd.cache[p]=S,S.result};function r7e(e,t,r){let s=q_(e,t,"-",!1,r)||[],a=q_(t,e,"",!1,r)||[],n=q_(e,t,"-?",!0,r)||[];return s.concat(n).concat(a).join("|")}function n7e(e,t){let r=1,s=1,a=Pse(e,r),n=new Set([t]);for(;e<=a&&a<=t;)n.add(a),r+=1,a=Pse(e,r);for(a=xse(t+1,s)-1;e<a&&a<=t;)n.add(a),s+=1,a=xse(t+1,s)-1;return n=[...n],n.sort(o7e),n}function i7e(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let s=s7e(e,t),a=s.length,n="",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!=="0"||h!=="9"?n+=a7e(p,h,r):c++}return c&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[c],digits:a}}function Dse(e,t,r,s){let a=n7e(e,t),n=[],c=e,f;for(let p=0;p<a.length;p++){let h=a[p],E=i7e(String(c),String(h),s),C="";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+kse(f.count),c=h+1;continue}r.isPadded&&(C=l7e(h,r,s)),E.string=C+E.pattern+kse(E.count),n.push(E),c=h+1,f=E}return n}function q_(e,t,r,s,a){let n=[];for(let c of e){let{string:f}=c;!s&&!bse(t,"string",f)&&n.push(r+f),s&&bse(t,"string",f)&&n.push(r+f)}return n}function s7e(e,t){let r=[];for(let s=0;s<e.length;s++)r.push([e[s],t[s]]);return r}function o7e(e,t){return e>t?1:t>e?-1:0}function bse(e,t,r){return e.some(s=>s[t]===r)}function Pse(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function xse(e,t){return e-e%Math.pow(10,t)}function kse(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function a7e(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function Qse(e){return/^-?(0+)\d/.test(e)}function l7e(e,t,r){if(!t.isPadded)return e;let s=Math.abs(t.maxLen-String(e).length),a=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${s}}`:`0{${s}}`}}Hd.cache={};Hd.clearCache=()=>Hd.cache={};Rse.exports=Hd});var V_=G((DQt,Hse)=>{"use strict";var c7e=Ie("util"),Ose=Tse(),Fse=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u7e=e=>t=>e===!0?Number(t):String(t),W_=e=>typeof e=="numb Line truncated
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var eoe=G((kQt,$se)=>{"use strict";var C7e=uk(),{MAX_LENGTH:zse,CHAR_BACKSLASH:J_,CHAR_BACKTICK:w7e,CHAR_COMMA:B7e,CHAR_DOT:v7e,CHAR_LEFT_PARENTHESES:S7e,CHAR_RIGHT_PARENTHESES:D7e,CHAR_LEFT_CURLY_BRACE:b7e,CHAR_RIGHT_CURLY_BRACE:P7e,CHAR_LEFT_SQUARE_BRACKET:Xse,CHAR_RIGHT_SQUARE_BRACKET:Zse,CHAR_DOUBLE_QUOTE:x7e,CHAR_SINGLE_QUOTE:k7e,CHAR_NO_BREAK_SPACE:Q7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:R7e}=Kse(),T7e=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},s=typeof r.maxLength=="number"?Math.min(zse,r.maxLength):zse;if(e.length>s)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${s})`);let a={type:"root",input:e,nodes:[]},n=[a],c=a,f=a,p=0,h=e.length,E=0,C=0,S,x={},I=()=>e[E++],T=O=>{if(O.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&O.type==="text"){f.value+=O.value;return}return c.nodes.push(O),O.parent=c,O.prev=f,f=O,O};for(T({type:"bos"});E<h;)if(c=n[n.length-1],S=I(),!(S===R7e||S===Q7e)){if(S===J_){T({type:"text",value:(t.keepEscaping?S:"")+I()});continue}if(S===Zse){T({type:"text",value:"\\"+S});continue}if(S===Xse){p++;let O=!0,U;for(;E<h&&(U=I());){if(S+=U,U===Xse){p++;continue}if(U===J_){S+=I();continue}if(U===Zse&&(p--,p===0))break}T({type:"text",value:S});continue}if(S===S7e){c=T({type:"paren",nodes:[]}),n.push(c),T({type:"text",value:S});continue}if(S===D7e){if(c.type!=="paren"){T({type:"text",value:S});continue}c=n.pop(),T({type:"text",value:S}),c=n[n.length-1];continue}if(S===x7e||S===k7e||S===w7e){let O=S,U;for(t.keepQuotes!==!0&&(S="");E<h&&(U=I());){if(U===J_){S+=U+I();continue}if(U===O){t.keepQuotes===!0&&(S+=U);break}S+=U}T({type:"text",value:S});continue}if(S===b7e){C++;let U={type:"brace",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)==="$"||c.dollar===!0,depth:C,commas:0,ranges:0,nodes:[]};c=T(U),n.push(c),T({type:"open",value:S});continue}if(S===P7e){if(c.type!=="brace"){T({type:"text",value:S});continue}let O="close";c=n.pop(),c.close=!0,T({type:O,value:S}),C--,c=n[n.length-1];continue}if(S===B7e&&C>0){if(c.ranges>0){c.ranges=0;let O=c.nodes.shift();c.nodes=[O,{type:"text",value:C7e(c)}]}T({type:"comma",value:S}),c.commas++;continue}if(S===v7e&&C>0&&c.commas===0){let O=c.nodes;if(C===0||O.length===0){T({type:"text",value:S});continue}if(f.type==="dot"){if(c.range=[],f.value+=S,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){O.pop();let U=O[O.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}T({type:"dot",value:S});continue}T({type:"text",value:S})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(V=>{V.nodes||(V.type==="open"&&(V.isOpen=!0),V.type==="close"&&(V.isClose=!0),V.nodes||(V.type="text"),V.invalid=!0)});let O=n[n.length-1],U=O.nodes.indexOf(c);O.nodes.splice(U,1,...c.nodes)}while(n.length>0);return T({type:"eos"}),a};$se.exports=T7e});var noe=G((QQt,roe)=>{"use strict";var toe=uk(),F7e=qse(),N7e=Vse(),O7e=eoe(),Jl=(e,t={})=>{let r=[];if(Array.isArray(e))for(let s of e){let a=Jl.create(s,t);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(Jl.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Jl.parse=(e,t={})=>O7e(e,t);Jl.stringify=(e,t={})=>toe(typeof e=="string"?Jl.parse(e,t):e,t);Jl.compile=(e,t={})=>(typeof e=="string"&&(e=Jl.parse(e,t)),F7e(e,t));Jl.expand=(e,t={})=>{typeof e=="string"&&(e=Jl.parse(e,t));let r=N7e(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Jl.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Jl.compile(e,t):Jl.expand(e,t);roe.exports=Jl});var fB=G((RQt,loe)=>{"use strict";var L7e=Ie("path"),zf="\\\\/",ioe=`[^${zf}]`,Pp="\\.",M7e="\\+",U7e="\\?",Ak="\\/",_7e="(?=.)",soe="[^/]",K_=`(?:${Ak}|$)`,ooe=`(?:^|${Ak})`,z_=`${Pp}{1,2}${K_}`,H7e=`(?!${Pp})`,j7e=`(?!${ooe}${z_})`,G7e=`(?!${Pp}{0,1}${K_})`,q7e=`(?!${z_})`,W7e=`[^.${Ak}]`,Y7e=`${soe}*?`,aoe={DOT_LITERAL:Pp,PLUS_LITERAL:M7e,QMARK_LITERAL:U7e,SLASH_LITERAL:Ak,ONE_CHAR:_7e,QMARK:soe,END_ANCHOR:K_,DOTS_SLASH:z_,NO_DOT:H7e,NO_DOTS:j7e,NO_DOT_SLASH:G7e,NO_DOTS_SLASH:q7e,QMARK_NO_DOT:W7e,STAR:Y7e,START_ANCHOR:ooe},V7e={...aoe,SLASH_LITERAL:`[${zf}]`,QMARK:ioe,STAR:`${ioe}*?`,DOTS_SLASH:`${Pp}{1,2}(?:[${zf}]|$)`,NO_DOT:`(?!${Pp})`,NO_DOTS:`(?!(?:^|[${zf}])${Pp}{1,2}(?:[${zf}]|$))`,NO_DOT_SLASH:`(?!${Pp}{0,1}(?:[${zf}]|$))`,NO_DOTS_SLASH:`(?!${Pp}{1,2}(?:[${zf}]|$))`,QMARK_NO_DOT:`[^.${zf}]`,START_ANCHOR:`(?:^|[${zf}])`,END_ANCHOR:`(?:[${zf}]|$)`},J7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&' Line truncated
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",t!==null?this.reportInfo(null,`${t} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&(t!==null?this.reportInfo(null,`${t} ${n}`):this.reportInfo(null,n))}),r}}});var uI,I8=Xe(()=>{Fc();Zo();uI=class{constructor(t){this.fetchers=t}supports(t,r){return!!this.tryFetcher(t,r)}getLocalPath(t,r){return this.getFetcher(t,r).getLocalPath(t,r)}async fetch(t,r){return await this.getFetcher(t,r).fetch(t,r)}tryFetcher(t,r){let s=this.fetchers.find(a=>a.supports(t,r));return s||null}getFetcher(t,r){let s=this.fetchers.find(a=>a.supports(t,r));if(!s)throw new Lt(11,`${Yr(r.project.configuration,t)} isn't supported by any available fetcher`);return s}}});var em,C8=Xe(()=>{Zo();em=class{constructor(t){this.resolvers=t.filter(r=>r)}supportsDescriptor(t,r){return!!this.tryResolverByDescriptor(t,r)}supportsLocator(t,r){return!!this.tryResolverByLocator(t,r)}shouldPersistResolution(t,r){return this.getResolverByLocator(t,r).shouldPersistResolution(t,r)}bindDescriptor(t,r,s){return this.getResolverByDescriptor(t,s).bindDescriptor(t,r,s)}getResolutionDependencies(t,r){return this.getResolverByDescriptor(t,r).getResolutionDependencies(t,r)}async getCandidates(t,r,s){return await this.getResolverByDescriptor(t,s).getCandidates(t,r,s)}async getSatisfying(t,r,s,a){return this.getResolverByDescriptor(t,a).getSatisfying(t,r,s,a)}async resolve(t,r){return await this.getResolverByLocator(t,r).resolve(t,r)}tryResolverByDescriptor(t,r){let s=this.resolvers.find(a=>a.supportsDescriptor(t,r));return s||null}getResolverByDescriptor(t,r){let s=this.resolvers.find(a=>a.supportsDescriptor(t,r));if(!s)throw new Error(`${oi(r.project.configuration,t)} isn't supported by any available resolver`);return s}tryResolverByLocator(t,r){let s=this.resolvers.find(a=>a.supportsLocator(t,r));return s||null}getResolverByLocator(t,r){let s=this.resolvers.find(a=>a.supportsLocator(t,r));if(!s)throw new Error(`${Yr(r.project.configuration,t)} isn't supported by any available resolver`);return s}}});var fI,w8=Xe(()=>{Dt();Zo();fI=class{supports(t){return!!t.reference.startsWith("virtual:")}getLocalPath(t,r){let s=t.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(s+1),n=Js(t,a);return r.fetcher.getLocalPath(n,r)}async fetch(t,r){let s=t.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(s+1),n=Js(t,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(t,c,r)}getLocatorFilename(t){return oI(t)}async ensureVirtualLink(t,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(t),f=mo.makeVirtualPath(n,c,a),p=new Gf(f,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var TQ,Lce=Xe(()=>{TQ=class e{static{this.protocol="virtual:"}static isVirtualDescriptor(t){return!!t.range.startsWith(e.protocol)}static isVirtualLocator(t){return!!t.reference.startsWith(e.protocol)}supportsDescriptor(t,r){return e.isVirtualDescriptor(t)}supportsLocator(t,r){return e.isVirtualLocator(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(t,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(t,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(t,r,s,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(t,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var AI,B8=Xe(()=>{Dt();$d();AI=class{supports(t){return!!t.reference.startsWith(Ii.protocol)}getLocalPath(t,r){return this.getWorkspace(t,r).cwd}async fetch(t,r){let s=this.getWorkspace(t,r).cwd;return{packageFs:new bn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(t,r){return r.project.getWorkspaceByCwd(t.reference.slice(Ii.protocol.length))}}});function LB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Mce(e){return typeof e>"u"?3:LB(e)?0:Array.isArray(e)?1:2}function D8(e,t){return Object.hasOwn(e,t)}function nZe(e){return LB(e)&&D8(e,"onConflict")&&typeof e.onConflict=="string"}function iZe(e){if(typeof e>"u")return{onConflict:"default",value:e};if(!nZe(e))return{onConflict:"default",value:e};if(D8(e,"value"))return e;let{onConflict:t,...r}=e;return{onConflict:t,value:r}}function Uce(e,t){let r=LB(e)&&D8(e,t)?e[t]:void 0;return iZe(r)}function pI(e,t){return[e,t,_ce]}function b8(e){return Array.isArray(e)?e[2]===_ce:!1}function v8(e,t){if(LB(e)){let r={};for(let s of Object.keys(e))r[s]=v8(e[s],t);return pI(t,r)}return Array.isArray(e)?pI(t,e.map(r=>v8(r,t))):pI(t,e)}function S8(e,t,r,s,a){let n,c=[],f=a,p=0;for(let E=a-Line truncated
Please report this to https://github.com/szmarczak/http2-wrapper/`);I(T)}return}s[0].resolve(x);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=C$e.connect(t,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[Ra]=0,S[yI]=!1;let x=()=>S[Ra]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once("session",O=>{this.tlsSessionCache.set(E,O)}),S.once("error",O=>{for(let{reject:U}of s)U(O);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once("close",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let O=this.sessions[c];O.splice(O.indexOf(S),1),O.length===0&&delete this.sessions[c]}else{let O=new Error("Session closed without receiving a SETTINGS frame");O.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of s)U(O);p()}this._tryToCreateNewSession(c,f)});let T=()=>{if(!(!(c in this.queue)||!x())){for(let O of S[Nc])if(O in this.queue[c]){let{listeners:U}=this.queue[c][O];for(;U.length!==0&&x();)U.shift().resolve(S);let V=this.queue[c];if(V[O].listeners.length===0&&(delete V[O],Object.keys(V).length===0)){delete this.queue[c];break}if(!x())break}}};S.on("origin",()=>{S[Nc]=S.originSet,x()&&(T(),aH(this.sessions[c],S))}),S.once("remoteSettings",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let O=new Error("Agent has been destroyed");for(let U of s)U.reject(O);S.destroy();return}S[Nc]=S.originSet;{let O=this.sessions;if(c in O){let U=O[c];U.splice(v$e(U,S,S$e),0,S)}else O[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit("session",S),T(),p(),S[Ra]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on("remoteSettings",()=>{T(),aH(this.sessions[c],S)})}),S[Vue]=S.request,S.request=(O,U)=>{if(S[yI])throw new Error("The session is gracefully closing. No new streams are allowed.");let V=S[Vue](O,U);return S.ref(),++S[Ra],S[Ra]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,V.once("close",()=>{if(I=x(),--S[Ra],!S.destroyed&&!S.closed&&(D$e(this.sessions[c],S),x()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let te=S[Ra]===0;te&&S.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||S[yI])?S.close():(aH(this.sessions[c],S),T())}}),V}}catch(S){for(let x of s)x.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(t,r,s,a){return new Promise((n,c)=>{this.getSession(t,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(t,r){return e.connect(t,r)}static connect(t,r){r.ALPNProtocols=["h2"];let s=t.port||443,a=t.hostname||t.host;return typeof r.servername>"u"&&(r.servername=a),I$e.connect(s,a,r)}closeFreeSessions(){for(let t of Object.values(this.sessions))for(let r of t)r[Ra]===0&&r.close()}destroy(t){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(t);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return Jue({agent:this,isFree:!0})}get busySessions(){return Jue({agent:this,isFree:!1})}};rm.kCurrentStreamsCount=Ra;rm.kGracefullyClosing=yI;zue.exports={Agent:rm,globalAgent:new rm}});var uH=G((AOt,Xue)=>{"use strict";var{Readable:b$e}=Ie("stream"),cH=class extends b$e{constructor(t,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=t,this.connection=t,this._dumped=!1}_destroy(t){this.req._request.destroy(t)}setTimeout(t,r){return this.req.setTimeout(t,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Xue.exports=cH});var fH=G((pOt,Zue)=>{"use strict";Zue.exports=e=>{let t={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return typeof e.port=="string"&&e.port.length!==0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}});var efe=G((hOt,$ue)=>{"use strict";$ue.exports=(e,t,r)=>{for(let s of r)e.on(s,(...a)=>t.emit(s,...a))}});var rfe=G((gOt,tfe)=>{"use strict";tfe.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var ife=G((mOt,nfe)=>{"use strict";var EI=(e,t,r)=>{nfe.exports[t]=class extends e{constructor(...a){super(typeof r=="string"?r: Line truncated
`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`
`)}${f.reverse().join(`
`)}`}}};Un.RequestError=As;var eR=class extends As{constructor(t){super(`Redirected ${t.options.maxRedirects} times. Aborting.`,{},t),this.name="MaxRedirectsError"}};Un.MaxRedirectsError=eR;var tR=class extends As{constructor(t){super(`Response code ${t.statusCode} (${t.statusMessage})`,{},t.request),this.name="HTTPError"}};Un.HTTPError=tR;var rR=class extends As{constructor(t,r){super(t.message,t,r),this.name="CacheError"}};Un.CacheError=rR;var nR=class extends As{constructor(t,r){super(t.message,t,r),this.name="UploadError"}};Un.UploadError=nR;var iR=class extends As{constructor(t,r,s){super(t.message,t,s),this.name="TimeoutError",this.event=t.event,this.timings=r}};Un.TimeoutError=iR;var VB=class extends As{constructor(t,r){super(t.message,t,r),this.name="ReadError"}};Un.ReadError=VB;var sR=class extends As{constructor(t){super(`Unsupported protocol "${t.url.protocol}"`,{},t),this.name="UnsupportedProtocolError"}};Un.UnsupportedProtocolError=sR;var Oet=["socket","connect","continue","information","upgrade","timeout"],oR=class extends _fe.Duplex{constructor(t,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[CI]=0,this[BI]=0,this.requestInitialized=!1,this[XQ]=new Set,this.redirects=[],this[vI]=!1,this[ZQ]=!1,this[YB]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof NH.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Un.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(t,r,s)}catch(h){lt.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof het.ReadStream&&await Tet(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Eo])===null||h===void 0||h.destroy();return}for(let C of this[YB])C();this[YB].length=0,this.requestInitialized=!0}catch(E){if(E instanceof As){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(t,r,s){var a,n,c,f,p;let h=r;if(lt.default.object(t)&&!lt.default.urlInstance(t))r={...s,...t,...r};else{if(t&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...s,...r},t!==void 0&&(r.url=t),lt.default.urlInstance(r.url)&&(r.url=new C0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),lt.assert.any([lt.default.string,lt.default.undefined],r.method),lt.assert.any([lt.default.object,lt.default.undefined],r.headers),lt.assert.any([lt.default.string,lt.default.urlInstance,lt.default.undefined],r.prefixUrl),lt.assert.any([lt.default.object,lt.default.undefined],r.cookieJar),lt.assert.any([lt.default.object,lt.default.string,lt.default.undefined],r.searchParams),lt.assert.any([lt.default.object,lt.default.string,lt.default.undefined],r.cache),lt.assert.any([lt.default.object,lt.default.number,lt.default.undefined],r.timeout),lt.assert.any([lt.default.object,lt.default.undefined],r.context),lt.assert.any([lt.default.object,lt.default.undefined],r.hooks),lt.assert.any([lt.default.boolean,lt.default.undefined],r.decompress),lt.assert.any([lt.default.boolean,lt.default.undefined],r.ignoreInvalidCookies),lt.assert.any([lt.default.boolean,lt.default.undefined],r.followRedirect),lt.assert.any([lt.default.number,lt.default.undefined],r.maxRedirects),lt.assert.any([lt.default.boolean,lt.default.undefined],r.throwHttpErrors),lt.assert.any([lt.default.boolean,lt.default.undefined],r.http2),lt.assert.any([lt.default.boolean,lt.default.undefined],r.allowGetBody),lt.assert.any([lt.default.string,lt.default.undefined],r.localAddress),lt.assert.any([Yfe.isDnsLookupIpVersion,lt.default.undefined],r.dnsLookupIpVersion),lt.assert.any([lt.default.object,lt.default.undefined],r.https),lt.assert.any([lt.default.boolean,lt.default.undefined],r.rejectUnauthorized),r.https&&(lt.assert.any([lt.default.boolean,lt.default.undefined],r.https.rejectUnauthorized),lt.assert.any([lt.default.function_,lt.default.undefined],r.https.checkServerIdentity),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.certificateAuthority),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.key),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.certificate),lt.assert.any([lt.default.string,lt.default.undefined],r.https.passphrase),lt.assert.any([lt.default.string,lt.default.buffer,lt.default.array,lt.default.undefined],r.httpLine truncated
`)[3];return Ctt(t)}function ZH(){return typeof pR.default.availableParallelism<"u"?pR.default.availableParallelism():Math.max(1,pR.default.cpus().length)}var pR,htt,vAe,gtt,dtt,SAe,DAe,Ett,Itt,hR=Xe(()=>{Dt();pR=et(Ie("os"));gR();kc();htt=Number(process.versions.node.split(".")[0]),vAe=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),gtt=typeof vAe<"u"?async e=>{try{return await $H(vAe,[e],{cwd:J.cwd()}),!0}catch{return!1}}:void 0,dtt="/usr/bin/ldd";Ett=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Itt=/\((\S*)(?::(\d+))(?::(\d+))\)/});function sj(e,t,r,s,a){let n=MB(r);if(s.isArray||s.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>ej(e,`${t}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>ej(e,t,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return ej(e,t,r,s,a)}function ej(e,t,r,s,a){let n=MB(r);switch(s.type){case"ANY":return FQ(n);case"SHAPE":return Dtt(e,t,r,s,a);case"MAP":return btt(e,t,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if("values"in s&&s.values?.includes(n))return n;let f=(()=>{if(s.type==="BOOLEAN"&&typeof n!="string")return wB(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${t}" to be a string, got ${typeof n}`);let p=Yk(n,{env:e.env});switch(s.type){case"ABSOLUTE_PATH":{let h=a,E=P8(r);return E&&E[0]!=="<"&&(h=J.dirname(E)),J.resolve(h,fe.toPortablePath(p))}case"LOCATOR_LOOSE":return Tp(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Tp(p);case"BOOLEAN":return wB(p);case"DURATION":return Vk(p,s.unit);default:return p}})();if("values"in s&&s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(", ")}`);return f}function Dtt(e,t,r,s,a){let n=MB(r);if(typeof n!="object"||Array.isArray(n))throw new it(`Object configuration settings "${t}" must be an object`);let c=oj(e,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${t}.${f}`;if(!s.properties[f])throw new it(`Unrecognized configuration settings found: ${t}.${f} - run "yarn config" to see the list of settings supported in Yarn`);c.set(f,sj(e,h,p,s.properties[f],a))}return c}function btt(e,t,r,s,a){let n=MB(r),c=new Map;if(typeof n!="object"||Array.isArray(n))throw new it(`Map configuration settings "${t}" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${t}['${h}']`,C=s.valueDefinition;c.set(h,sj(e,E,p,C,a))}return c}function oj(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case"SHAPE":{if(t.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(t.properties))s.set(a,oj(e,n));return s}case"MAP":return t.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return t.default===null?null:e.projectCwd===null?Array.isArray(t.default)?t.default.map(s=>J.normalize(s)):J.isAbsolute(t.default)?J.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(s=>J.resolve(e.projectCwd,s)):J.resolve(e.projectCwd,t.default);case"DURATION":return Vk(t.default,t.unit);default:return t.default}}function mR(e,t,r){if(t.type==="SECRET"&&typeof e=="string"&&r.hideSecrets)return Stt;if(t.type==="ABSOLUTE_PATH"&&typeof e=="string"&&r.getNativePaths)return fe.fromPortablePath(e);if(t.isArray&&Array.isArray(e)){let s=[];for(let a of e)s.push(mR(a,t,r));return s}if(t.type==="MAP"&&e instanceof Map){if(e.size===0)return;let s=new Map;for(let[a,n]of e.entries()){let c=mR(n,t.valueDefinition,r);typeof c<"u"&&s.set(a,c)}return s}if(t.type==="SHAPE"&&e instanceof Map){if(e.size===0)return;let s=new Map;for(let[a,n]of e.entries()){let c=t.properties[a],f=mR(n,c,r);typeof f<"u"&&s.set(a,f)}return s}return e}function Ptt(){let e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith(yR)&&(t=(0,PAe.default)(t.slice(yR.length)),e[t]=r);return e}function rj(){let e=`${yR}rc_filename`;for(let[t,r]of Object.entries(process.env))if(t.toLowerCase()===e&&typeof r=="string")return r;return nj}async function bAe(e){try{return await le.readFilePromise(e)}catch{return Buffer.of()}}async function xtt(e,t){return Buffer.compare(...await Promise.all([bAe(e),bAe(t)]))===0}async function ktt(e,t){let[r,s]=await Promise.all([le.statPromise(e),le.statPromise(t)]);return r.dev===s.dev&&r.ino===s.ino}async function Rtt({configuration:e,selfPath:t}){let r=e.get("yarnPath");return e.get("ignorePath")||r===null||r===t||await Qtt(r,t)?null:r}var PAe,Up,xAe,kAe,QAe,tj,Btt,ZB,vtt,_p,yR,nj,Stt,SI,RAe,ij,ER,dR,Qtt,ze,$B=Xe(()=>{Dt();vc();PAe=et(Vte()),Up=et(Rd());Yt();xAe=et(_re()),kAe=Ie("module"),QAe=et(Nd()),tj=Ie("stream");Sce();cI();I8();C8();w8();Lce();B8();$d();jce();OQ();Qc();E0();AR();kc();hR();Np();Zo();Btt=function(){if(!Up.GITHUB_ACTIONS||!process.env.GITHUB_EVE Line truncated
`);return{stdout:n,stderr:c}}makeResolver(){let t=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])t.push(new s);return new em([new TQ,new Ii,...t])}makeFetcher(){let t=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])t.push(new s);return new uI([new fI,new AI,...t])}getLinkers(){let t=[];for(let r of this.plugins.values())for(let s of r.linkers||[])t.push(new s);return t}getSupportedArchitectures(){let t=XB(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(c=>c==="current"?t.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?t.cpu:c));let n=r.get("libc");return n!==null&&(n=Xl(n,c=>c==="current"?t.libc??Xl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:t,stdout:r}){return r.isTTY?t??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let t=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!yl(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new _t;c.load(a,{yamlCompatibilityMode:!0});let f=CB(t,s.identHash),p=[];f.push([s.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,x]of Object.entries(C))p.push({...h,type:"PeerDependencyMeta",selector:E,key:S,value:x})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get("packageExtensions"))r(I0(s,!0),Wk(a),{userProvided:!0});return t}normalizeLocator(t){return yl(t.reference)?Js(t,`${this.get("defaultProtocol")}${t.reference}`):_p.test(t.reference)?Js(t,`${this.get("defaultProtocol")}${t.reference}`):t}normalizeDependency(t){return yl(t.range)?Mn(t,`${this.get("defaultProtocol")}${t.range}`):_p.test(t.range)?Mn(t,`${this.get("defaultProtocol")}${t.range}`):t}normalizeDependencyMap(t){return new Map([...t].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(t,{packageExtensions:r}){let s=xB(t),a=r.get(t.identHash);if(typeof a<"u"){let c=t.version;if(c!==null){for(let[f,p]of a)if(tA(c,f))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof s.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof s.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Zl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:P4(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=xa(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,Mn(f,"*"))}for(let c of s.peerDependencies.values()){if(c.scope==="types")continue;let f=n(c),p=ka("types",f),h=fn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,Mn(p,"*")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(Vs(s.dependencies,([,c])=>dl(c))),s.peerDependencies=new Map(Vs(s.peerDependencies,([,c])=>dl(c))),s}getLimit(t){return Zl(this.limits,t,()=>(0,QAe.default)(this.get(t)))}async triggerHook(t,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=t(a);n&&await n(...r)}}async triggerMultipleHooks(t,r){for(let s of r)await this.triggerHook(t,...s)}async reduceHook(t,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=t(c);f&&(a=await f(a,...s))}return a}async firstHook(t,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=t(a);if(!n)continue;let c=await n(...r);if(typeof c<"u")return c}return null}}});var qr={};Vt(qr,{EndStrategy:()=>uj,ExecError:()=>IR,PipeError:()=>ev,execvp:()=>$H,pipevp:()=>qu});function im(e){return e!==null&&typeof e.fd=="number"}function aj(){}function lj(){for(let e of sm)e.kill()}async function qu(e,t,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":im(n)&&(h[0]=n),im(c)&&(h[1]=c),im(f)&&(h[2]=f);let E=(0,cj.default)(e,t,{cwd:fe.fromPortablePath(r),env:{...s,PWD:fe.fromPortablePath(r)},stdio:h});sm.add(E),sm.size===1&&(process.on("SIGINT",aj),process.on("SIGTERM",lj)),!im(n)&&n!==null&&n.pipe(E.stdin),im(c)||E.stdout.pipe(c,{end:!1}),im(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))im(S)||S.end()};return new Promise((S,x)=>{E.on("error",I=>{sm.delete(E),sm.size===0&&(process.off("SIGINT",aj),pro Line truncated
This command will run a command using Yarn's portable shell.
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await bI(r,[],{cwd:fe.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var $l,KAe=Xe(()=>{$l=class extends Error{constructor(t){super(t),this.name="ShellError"}}});var bR={};Vt(bR,{fastGlobOptions:()=>ZAe,isBraceExpansion:()=>vj,isGlobPattern:()=>Utt,match:()=>_tt,micromatchOptions:()=>DR});function Utt(e){if(!SR.default.scan(e,DR).isGlob)return!1;try{SR.default.parse(e,DR)}catch{return!1}return!0}function _tt(e,{cwd:t,baseFs:r}){return(0,zAe.default)(e,{...ZAe,cwd:fe.fromPortablePath(t),fs:ax(XAe.default,new e0(r))})}function vj(e){return SR.default.scan(e,DR).isBrace}var zAe,XAe,SR,DR,ZAe,$Ae=Xe(()=>{Dt();zAe=et(wQ()),XAe=et(Ie("fs")),SR=et(zo()),DR={strictBrackets:!0},ZAe={onlyDirectories:!1,onlyFiles:!1}});function Sj(){}function Dj(){for(let e of am)e.kill()}function npe(e,t,r,s){return a=>{let n=a[0]instanceof iA.Transform?"pipe":a[0],c=a[1]instanceof iA.Transform?"pipe":a[1],f=a[2]instanceof iA.Transform?"pipe":a[2],p=(0,tpe.default)(e,t,{...s,stdio:[n,c,f]});return am.add(p),am.size===1&&(process.on("SIGINT",Sj),process.on("SIGTERM",Dj)),a[0]instanceof iA.Transform&&a[0].pipe(p.stdin),a[1]instanceof iA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof iA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(am.delete(p),am.size===0&&(process.off("SIGINT",Sj),process.off("SIGTERM",Dj)),E.code){case"ENOENT":a[2].write(`command not found: ${e}
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${e}
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
`),h(1);break}}),p.on("close",E=>{am.delete(p),am.size===0&&(process.off("SIGINT",Sj),process.off("SIGTERM",Dj)),h(E!==null?E:129)})})}}}function ipe(e){return t=>{let r=t[0]==="pipe"?new iA.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}function PR(e,t){return Pj.start(e,t)}function epe(e,t=null){let r=new iA.PassThrough,s=new rpe.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(`
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",e(t!==null?`${t} ${p}`:p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&e(t!==null?`${t} ${n}`:n)}),r}function spe(e,{prefix:t}){return{stdout:epe(r=>e.stdout.write(`${r}
`),e.stdout.isTTY?t:null),stderr:epe(r=>e.stderr.write(`${r}
`),e.stderr.isTTY?t:null)}}var tpe,iA,rpe,am,Mc,bj,Pj,xj=Xe(()=>{tpe=et(SU()),iA=Ie("stream"),rpe=Ie("string_decoder"),am=new Set;Mc=class{constructor(t){this.stream=t}close(){}get(){return this.stream}},bj=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(t){this.stream=t}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},Pj=class e{constructor(t,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=t,this.implementation=r}static start(t,{stdin:r,stdout:s,stderr:a}){let n=new e(null,t);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(t,r=1){let s=new e(this,t),a=new bj;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let t=["ignore","ignore","ignore"];if(this.pipe)t[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");t[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,t[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,t[2]=s.get();let a=this.implementation(t);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let t=[];for(let s=this;s;s=s.ancestor)t.push(s.exec());return(await Promise.all(t))[0]}}});var cv={};Vt(cv,{EntryCommand:()=>iv,ShellError:()=>$l,execute:()=>bI,globUtils:()=>bR});function ope(e,t,r){let s=new ec.PassThrough({autoDestroy:!0});switch(e){case 0:(t&1)===1&&r.stdin.pipe(s,{end:!1}),(t&2)===2&&r.stdin instanceof ec.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(t&1)===1&&r.stdout.pipe(s,{end:!1}),(t&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(t&1)===1&&r.stderr.pipe(s,{end:!1}),(t&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new $l(`Bad file descriptor: "${e}"`)}return s}function kR(e,t={}){let r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}async function jtt(e,t,r){let s=[],a=new ec.PassThrough;return a.on("data",n=>s.push(n)),await QR(e,t,kR(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function ape(e,t,r){let s=e.map(async n=>{let c=await lm(n.args,t,r);return{name:n.name,value:c.join(" ")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function xR(e){return e.match(/[^ \r\n\t]+/g)||[]}async function ppe(e,t,r,s,a=s){switch(e.name){case"$":s(String(process.pid));break;case"#":s(String(t.args.length));break;case"@":if(e.quoted)for(let n of t.args)a(n);else for(let n of t.args){let c=xR(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case"*":{let n=t.args.join(" ");if(e.quoted)s(n);else for(let c of xR(n))a(c)}break;case"PPID":s(String(process.ppid));break;case"RANDOM":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(e.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<t.args.length&&(c=t.args[n]):Object.hasOwn(r.variables,e.name)?c=r.variables[e.name]:Object.hasOwn(r.environment,e.name)&&(c=r.environment[e.name]),typeof c<"u"&&e.alternativeValue?c=(await lm(e.alternativeValue,t,r)).join(" "):typeof c>"u"&&(e.defaultValue?c=(await lm(e.defaultValue,t,r)).join(" "):e.alternativeValue&&(c="")),typeof c>"u")throw f?new $l(`Unbound argument #${n}`):new $l(`Unbound variable "${e.name}"`);if(e.quoted)s(c);else{let p=xR(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&s(h)}}break}}async function ov(e,t,r){if(e.type==="number"){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}else if(e.type==="variable"){let s=[];await ppe({...e,quoted:!0},t,r,n=>s.push(n));let a=Number(s.join(" "));return Number.isNaN(a)?ov({type:"variable",name:s.join(" ")},t,r):ov({type:"number",value:a},t,r)}else return Gtt[e.type](await ov(e.left,t,r),await ov(e.right,t,r))}async function lm(e,t,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let x=JSON.stringify({type:E,fd:C}),I=s.get(x);typeof I>"u"&&s.set(x,I=[]),I.push(S)};for(let E of e){let C=!1;switch(E.type){case"redirection":{let S=await lm(E.args,t,r);for(let x of S)h(E.subtype,E.fd,x)}break;case"argument":for(let S of E.segments)switch(S.type){case"text":c(S.text);break;case"glob":c(S.pattern),C=!0;break;case"shell":{let x=await jtt(S.shell,t,r);if(S.quoted)c(x);else{let I=xR(x);for(let T=0;T<I.length-1;++T)p(I[T]);c(I[I.length-1])}}break;case"variable":await ppe(S,t,r,c,p);break;case"arithmetic":c(String(await ov(S.arithmetic,t,r)));break}break}if(f(),C){let S=a.pop();if(typeof S>"u")throw new Error("Assertion failed: Expected a glob pa Line truncated
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(gE(e))}' has ended
`)})),0}return await cpe(e,t,r)}async function Vtt(e,t,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables["?"]=String(f)},c=async f=>{try{return await Ytt(f.chain,t,r,{background:s&&typeof f.then>"u"})}catch(p){if(!(p instanceof $l))throw p;return r.stderr.write(`${p.message}
`),1}};for(n(await c(e));e.then;){if(r.exitCode!==null)return r.exitCode;switch(e.then.type){case"&&":a===0&&n(await c(e.then.line));break;case"||":a!==0&&n(await c(e.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return a}async function QR(e,t,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of e){if(a=await Vtt(n,t,r,{background:c==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function hpe(e){switch(e.type){case"variable":return e.name==="@"||e.name==="#"||e.name==="*"||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(t=>lv(t))||"alternativeValue"in e&&!!e.alternativeValue&&e.alternativeValue.some(t=>lv(t));case"arithmetic":return kj(e.arithmetic);case"shell":return Qj(e.shell);default:return!1}}function lv(e){switch(e.type){case"redirection":return e.args.some(t=>lv(t));case"argument":return e.segments.some(t=>hpe(t));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function kj(e){switch(e.type){case"variable":return hpe(e);case"number":return!1;default:return kj(e.left)||kj(e.right)}}function Qj(e){return e.some(({command:t})=>{for(;t;){let r=t.chain;for(;r;){let s;switch(r.type){case"subshell":s=Qj(r.subshell);break;case"command":s=r.envs.some(a=>a.args.some(n=>lv(n)))||r.args.some(a=>lv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!t.then)break;t=t.then.line}return!1})}async function bI(e,t=[],{baseFs:r=new Vn,builtins:s={},cwd:a=fe.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=bR}={}){let C={};for(let[I,T]of Object.entries(n))typeof T<"u"&&(C[I]=T);let S=new Map(Htt);for(let[I,T]of Object.entries(s))S.set(I,T);c===null&&(c=new ec.PassThrough,c.end());let x=ux(e,E);if(!Qj(x)&&x.length>0&&t.length>0){let{command:I}=x[x.length-1];for(;I.then;)I=I.then.line;let T=I.chain;for(;T.then;)T=T.then.chain;T.type==="command"&&(T.args=T.args.concat(t.map(O=>({type:"argument",segments:[{type:"text",text:O}]}))))}return await QR(x,{args:t,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var upe,fpe,ec,Ape,Htt,Gtt,sv=Xe(()=>{Dt();vc();upe=et(NE()),fpe=Ie("os"),ec=Ie("stream"),Ape=Ie("timers/promises");JAe();KAe();$Ae();xj();xj();Htt=new Map([["cd",async([e=(0,fpe.homedir)(),...t],r,s)=>{let a=J.resolve(s.cwd,fe.toPortablePath(e));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code==="ENOENT"?new $l(`cd: no such file or directory: ${e}`):c})).isDirectory())throw new $l(`cd: not a directory: ${e}`);return s.cwd=a,0}],["pwd",async(e,t,r)=>(r.stdout.write(`${fe.fromPortablePath(r.cwd)}
`),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,s)=>s.exitCode=parseInt(e??s.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(`${e.join(" ")}
`),0)],["sleep",async([e],t,r)=>{if(typeof e>"u")throw new $l("sleep: missing operand");let s=Number(e);if(Number.isNaN(s))throw new $l(`sleep: invalid time interval '${e}'`);return await(0,Ape.setTimeout)(1e3*s,0)}],["unset",async(e,t,r)=>{for(let s of e)delete r.environment[s],delete r.variables[s];return 0}],["__ysh_run_procedure",async(e,t,r)=>{let s=r.procedures[e[0]];return await PR(s,{stdin:new Mc(r.stdin),stdout:new Mc(r.stdout),stderr:new Mc(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;e[h]!=="--";){let C=e[h++],{type:S,fd:x}=JSON.parse(C),I=V=>{switch(x){case null:case 0:c.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},T=V=>{switch(x){case null:case 1:f.push(V);break;case 2:p.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},O=Number(e[h++]),U=h+O;for(let V=h;V<U;++h,++V)switch(S){case"<":I(()=>t.baseFs.createReadStream(J.resolve(r.cwd,fe.toPortablePath(e[V]))));break;case"<<<":I(()=>{let te=new ec.PassThrough;return process.nextTick(()=>{te.write(`${e[V]}
`),te.end()}),te});break;case"<&":I(()=>ope(Number(e[V]),1,r));break;case">":case">>":{let te=J.resolve(r.cwd,fe.toPortablePath(e[V]));T(te==="/dev/null"?new ec.Writable({autoDestroy:!0,emitClose:!0,write(ie,ue,ae){setImmediate(ae)}}):t.baseFs.createWriteStream(te,S===">>"?{flags:"a"}:void 0))}break;case">&":T(ope(Number(e[V]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${S}"`)}}if(c.length>0){let C=new ec.PassThrough;s=C;let S=x=>{if(x===c.length)C.end();else{let I=c[x]();I.pipe(C,{end:!1}),I.on("end",()=>{S(x+1)})}};S(0)}if(f.length>0){let C=new ec.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new ec.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await PR(av(e.slice(h+1),t,r),{stdin:new Mc(s),stdout:new Mc(a),stderr:new Mc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,x)=>{C.on("error",I=>{x(I)}),C.on("close",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,x)=>{C.on("error",I=>{x(I)}),C.on("close",()=>{S()}),C.end()}))),E}]]);Gtt={addition:(e,t)=>e+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)}});var gpe=G((WMt,RR)=>{function Jtt(){var e=0,t=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,x=13,I=14,T=15,O=16,U=17,V=0,te=1,ie=2,ue=3,ae=4;function de(g,Se){return 55296<=g.charCodeAt(Se)&&g.charCodeAt(Se)<=56319&&56320<=g.charCodeAt(Se+1)&&g.charCodeAt(Se+1)<=57343}function Ae(g,Se){Se===void 0&&(Se=0);var Be=g.charCodeAt(Se);if(55296<=Be&&Be<=56319&&Se<g.length-1){var me=Be,ce=g.charCodeAt(Se+1);return 56320<=ce&&ce<=57343?(me-55296)*1024+(ce-56320)+65536:me}if(56320<=Be&&Be<=57343&&Se>=1){var me=g.charCodeAt(Se-1),ce=Be;return 55296<=me&&me<=56319?(me-55296)*1024+(ce-56320)+65536:ce}return Be}function Ce(g,Se,Be){var me=[g].concat(Se).concat([Be]),ce=me[me.length-2],Z=Be,De=me.lastIndexOf(I);if(De>1&&me.slice(1,De).every(function(_){return _==s})&&[s,x,U].indexOf(g)==-1)return ie;var Qe=me.lastIndexOf(a);if(Qe>0&&me.slice(1,Qe).every(function(_){return _==a})&&[S,a].indexOf(ce)==-1)return me.filter(function(_){return _==a}).length%2==1?ue:ae;if(ce==e&&Z==t)return V;if(ce==r||ce==e||ce==t)return Z==I&&Se.every(function(_){return _==s})?ie:te;if(Z==r||Z==e||Z==t)return te;if(ce==c&&(Z==c||Z==f||Z==h||Z==E))return V;if((ce==h||ce==f)&&(Z==f||Z==p))return V;if((ce==E||ce==p)&&Z==p)return V;if(Z==s||Z==T)return V;if(Z==n)return V;if(ce==S)return V;var st=me.indexOf(s)!=-1?me.lastIndexOf(s)-1:me.length-2;return[x,U].indexOf(me[st])!=-1&&me.slice(st+1,-1).every(function(_){return _==s})&&Z==I||ce==T&&[O,U].indexOf(Z)!=-1?V:Se.indexOf(a)!=-1?ie:ce==a&&Z==a?V:te}this.nextBreak=function(g,Se){if(Se===void 0&&(Se=0),Se<0)return 0;if(Se>=g.length-1)return g.length;for(var Be=Ee(Ae(g,Se)),me=[],ce=Se+1;ce<g.length;ce++)if(!de(g,ce-1)){var Z=Ee(Ae(g,ce));if(Ce(Be,me,Z))return ce;me.push(Z)}return g.length},this.splitGraphemes=function(g){for(var Se=[],Be=0,me;(me=this.nextBreak(g,Be))<g.length;)Se.push(g.slice(Be,me)),Be=me;return Be<g.length&&Se.push(g.slice(Be)),Se},this.iterateGraphemes=function(g){var Se=0,Be={next:function(){var me,ce;return(ce=this.nextBreak(g,Se))<g.length?(me=g.slice(Se,ce),Se=ce,{value:me,done:!1}):Se<g.length?(me=g.slice(Se),Se=g.length,{value:me,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Be[Symbol.iterator]=function(){return Be}),Be},this.countGraphemes=function(g){for(var Se=0,Be=0,me;(me=this.nextBreak(g,Be))<g.length;)Be=me,Se++;return Be<g.length&&Se++,Se};function Ee(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?S:g==13?e:g==10?t:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006|| Line truncated
`,end:e=>`::endgroup::
`}:FR.default.TRAVIS?{start:e=>`travis_fold:start:${e}
`,end:e=>`travis_fold:end:${e}
`}:FR.default.GITLAB?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${e}
`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,wpe=S0!==null,Ipe=new Date,Ztt=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,$tt=e=>e,NR=$tt({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),ert=Ztt&&Object.keys(NR).find(e=>{let t=NR[e];return!(t.date&&(t.date[0]!==Ipe.getDate()||t.date[1]!==Ipe.getMonth()+1))})||"default";Ot=class extends yo{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(SB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get("enableProgressBars")&&!a&&s.isTTY&&s.columns>22){let S=r.get("progressBarStyle")||ert;if(!Object.hasOwn(NR,S))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=NR[S];let x=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*x/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!="string"){let h=c;c=h.message,f=f??h.name}let p=typeof f<"u"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Jd(r.configuration,`Yarn ${An}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s=="function"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,S0!==null&&!this.json&&this.includeInfos&&this.stdout.write(S0.start(r))},reportFooter:f=>{if(this.indent-=1,S0!==null&&!this.json&&this.includeInfos){this.stdout.write(S0.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&f>200?this.reportInfo(null,`\u2514 Completed in ${jt(this.configuration,f,gt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof s=="function"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",c=`${this.formatPrefix(n,"blueBright")}${s}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"redBright")}${s}`,{truncate:!1})}reportFold(r,s){if(!S0)return;let a=`${S0.start(r)}${s}${S0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)ret Line truncated
`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Epe&&(this.progressFrame=(this.progressFrame+1)%ype.length,this.progressTime=r);let s=ype[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${jt(this.configuration,"\u27A4","blueBright")} ${f}${s}${n}${p}
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Epe)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>"u"&&(s=this.configuration.get("preferTruncatedLines")),s&&(r=(0,Cpe.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Bpe(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,s){return this.includePrefix?`${jt(this.configuration,"\u27A4",s)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?Rj(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${Xtt} `}}});var Cn={};Vt(Cn,{PackageManager:()=>Spe,detectPackageManager:()=>Dpe,executePackageAccessibleBinary:()=>Qpe,executePackageScript:()=>OR,executePackageShellcode:()=>Tj,executeWorkspaceAccessibleBinary:()=>art,executeWorkspaceLifecycleScript:()=>xpe,executeWorkspaceScript:()=>Ppe,getPackageAccessibleBinaries:()=>LR,getWorkspaceAccessibleBinaries:()=>kpe,hasPackageScript:()=>irt,hasWorkspaceScript:()=>Fj,isNodeScript:()=>Nj,makeScriptEnv:()=>Av,maybeExecuteWorkspaceLifecycleScript:()=>ort,prepareExternalProject:()=>nrt});async function D0(e,t,r,s=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await le.writeFilePromise(J.format({dir:e,name:t,ext:".cmd"}),a)}await le.writeFilePromise(J.join(e,t),`#!/bin/sh
exec "${r}" ${s.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
`,{mode:493})}async function Dpe(e){let t=await _t.tryFind(e);if(t?.packageManager){let s=PQ(t.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:t.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await le.readFilePromise(J.join(e,Er.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:le.existsSync(J.join(e,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:le.existsSync(J.join(e,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function Av({project:e,locator:t,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=e?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<"u"&&(c[E.toLowerCase()!=="path"?E:"PATH"]=C);let f=fe.fromPortablePath(r);c.BERRY_BIN_FOLDER=fe.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?fe.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([D0(r,"node",process.execPath),...An!==null?[D0(r,"run",process.execPath,[p,"run"]),D0(r,"yarn",process.execPath,[p]),D0(r,"yarnpkg",process.execPath,[p]),D0(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),e&&(c.INIT_CWD=fe.fromPortablePath(e.configuration.startingCwd),c.PROJECT_CWD=fe.fromPortablePath(e.cwd)),c.PATH=c.PATH?`${f}${fe.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${fe.sep}yarn`,c.npm_node_execpath=`${f}${fe.sep}node`,t){if(!e)throw new Error("Assertion failed: Missing project");let E=e.tryWorkspaceByLocator(t),C=E?E.manifest.version??"":e.storedPackages.get(t.locatorHash).version??"";c.npm_package_name=fn(t),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let x=e.storedPackages.get(t.locatorHash);if(!x)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);let I=e.configuration.getLinkers(),T={project:e,report:new Ot({stdout:new b0.PassThrough,configuration:e.configuration})},O=I.find(U=>U.supportsPackage(x,T));if(!O)throw new Error(`The package ${Yr(e.configuration,x)} isn't supported by any of the available linkers`);S=await O.findPackageLocation(x,T)}c.npm_package_json=fe.fromPortablePath(J.join(S,Er.manifest))}let h=An!==null?`yarn/${An}`:`yarn/${kp("@yarnpkg/core").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),e&&await e.configuration.triggerHook(E=>E.setupScriptEnvironment,e,c,async(E,C,S)=>await D0(r,E,C,S)),c}async function nrt(e,t,{configuration:r,report:s,workspace:a=null,locator:n=null}){await rrt(async()=>{await le.mktempPromise(async c=>{let f=J.join(c,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:fe.fromPortablePath(e),report:s}),C=n&&ju(n)?sI(n):n,S=C?ml(C):"an external project";h.write(`Packing ${S} from sources
`);let x=await Dpe(e),I;x!==null?(h.write(`Using ${x.packageManager} for bootstrap. Reason: ${x.reason}
`),I=x.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
`),I="Yarn");let T=I==="Yarn"&&!x?.packageManagerField;await le.mktempPromise(async O=>{let U=await Av({binFolder:O,ignoreCorepack:T,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),te=new Map([["Yarn Classic",async()=>{let ue=a!==null?["workspace",a]:[],ae=J.join(e,Er.manifest),de=await le.readFilePromise(ae),Ae=await qu(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Ae.code!==0)return Ae.code;await le.writeFilePromise(ae,de),await le.appendFilePromise(J.join(e,".npmignore"),`/.yarn
`),h.write(`
`),delete U.NODE_ENV;let Ce=await qu("yarn",["install"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Ce.code!==0)return Ce.code;h.write(`
`);let Ee=await qu("yarn",[...ue,"pack","--filename",fe.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:E});return Ee.code!==0?Ee.code:0}],["Yarn",async()=>{let ue=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ae=J.join(e,Er.lockfile);await le.existsPromise(ae)||await le.writeFilePromise(ae,"");let de=await qu("yarn",[...ue,"pack","--install-if-needed","--filename",fe.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:E});return de.code!==0?de.code:0}],["npm",async()=>{if(a!==null){let Se=new b0.PassThrough,Be=JE(Se);Se.pipe(h,{end:!1});let me=await qu("npm",["--version"],{cwd:e,env:U,stdin:p,stdout:Se,stderr:E,end:0});if(Se.end(),me.code!==0)return h.end(),E.end(),me.code;let ce=(await Be).toString().trim();if(!tA(ce,">=7.x")){let Z=ka(null,"npm"),De=Mn(Z,ce),Qe=Mn(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${oi(r,De)}; please upgrade to ${oi(r,Qe)} (npm has been detected as the primary package manager for ${jt(r,e,gt.PATH)})`)}}let ue=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ae=await qu("npm",["install","--legacy-peer-deps"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ae.code!==0)return ae.code;let de=new b0.PassThrough,Ae=JE(de);de.pipe(h);let Ce=await qu("npm",["pack","--silent",...ue],{cwd:e,env:U,stdin:p,stdout:de,stderr:E});if(Ce.code!==0)return Ce.code;let Ee=(await Ae).toString().trim().replace(/^.*\n/s,""),g=J.resolve(e,fe.toPortablePath(Ee));return await le.renamePromise(g,t),0}]]).get(I);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let ie=await te();if(!(ie===0||typeof ie>"u"))throw le.detachTemp(c),new Lt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${jt(r,f,gt.PATH)})`)})})})}async function irt(e,t,{project:r}){let s=r.tryWorkspaceByLocator(e);if(s!==null)return Fj(s,t);let a=r.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,e)} not found in the project`);return await rA.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new b0.PassThrough,configuration:c})},h=f.find(x=>x.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new bn(E,{baseFs:n});return(await _t.find(vt.dot,{baseFs:C})).scripts.has(t)})}async function OR(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await bpe(e,{project:a,binFolder:p,cwd:s,lifecycleScript:t}),S=h.scripts.get(t);if(typeof S>"u")return 1;let x=async()=>await bI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(T=>T.wrapScriptExecution,x,a,e,t,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function Tj(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{env:h,cwd:E}=await bpe(e,{project:a,binFolder:p,cwd:s});return await bI(t,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function srt(e,{binFolder:t,cwd:r,lifecycleScript:s}){let a=await Av({project:e.project,locator:e.anchoredLocator,binFolder:t,lifecycleScript:s});return await Oj(t,await kpe(e)),typeof r>"u"&&(r=J.dirname(await le.realpathPromise(J.join(e.cwd,"package.json")))),{manifest:e.manifest,binFolder:t,env:a,cwd:r}}async function bpe(e,{project:t,binFolder:r,cwd:s,lifecycleScript:a}){let n=t.tryWorkspaceByLocator(e);if(n!==null)return srt(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);return await rA.openPromise(async f=>{let p=t.configuration,h=t.configuration.getLinkers(),E={project:t,report:new Ot({stdout:new b0.PassThrough,configuration:p})},C=h.find(O=>O.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(t.configuration,c)} isn't supported by any of the available linkers`);let S=await Av({project:t,locator:e,binFolder:r,lifecycleScript:a});await Oj(r,await LR(e,{project:t}));let x=await C.findPackageLocation(c,E),I=new bn(x,{baseFs:f}),T=await _t.find(vt.dot,{baseFs:I});return typeof s>"u"&&(s=x),{manifest:T,binFolder:r,env:S,cwd:s}})}async function Ppe(e,t,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await OR(e.anchoredLocator,t,r,{cwd:s,project:e.project,stdin:a,stdout:n,stderr:c})}function Fj(e,t){return e.manifest.scripts.has(t)}async function xpe(e,t,{cwd:r,report:s}){let{configuration:a}=e.project,n=null;await le.mktempPromise(async c=>{let f=J.join(c,`${t}.log`),p=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${fe.fromPortablePath(e.cwd)}")
`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,e.anchoredLocator),header:p});s.reportInfo(36,`Calling the "${t}" lifecycle script`);let C=await Ppe(e,t,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw le.detachTemp(c),new Lt(36,`${EB(t)} script failed (exit code ${jt(a,C,gt.NUMBER)}, logs can be found here: ${jt(a,f,gt.PATH)}); run ${jt(a,`yarn ${t}`,gt.CODE)} to investigate`)})}async function ort(e,t,r){Fj(e,t)&&await xpe(e,t,r)}function Nj(e){let t=J.extname(e);if(t.match(/\.[cm]?[jt]sx?$/))return!0;if(t===".exe"||t===".bin")return!1;let r=Buffer.alloc(4),s;try{s=le.openSync(e,"r")}catch{return!0}try{le.readSync(s,r,0,r.length,0)}finally{le.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function LR(e,{project:t}){let r=t.configuration,s=new Map,a=t.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,e)} not found in the project`);let n=new b0.Writable,c=r.getLinkers(),f={project:t,report:new Ot({configuration:r,stdout:n})},p=new Set([e.locatorHash]);for(let E of a.dependencies.values()){let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${oi(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=t.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Xl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Xl.skip;let x=null;try{x=await S.findPackageLocation(C,f)}catch(I){if(I.code==="LOCATOR_NOT_INSTALLED")return Xl.skip;throw I}return{dependency:C,packageLocation:x}}));for(let E of h){if(E===Xl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[x,I]of C.bin){let T=J.resolve(S,I);s.set(x,[C,fe.fromPortablePath(T),Nj(T)])}}return s}async function kpe(e){return await LR(e.anchoredLocator,{project:e.project})}async function Oj(e,t){await Promise.all(Array.from(t,([r,[,s,a]])=>a?D0(e,r,process.execPath,[s]):D0(e,r,s,[])))}async function Qpe(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await LR(e,{project:a});let E=h.get(t);if(!E)throw new Error(`Binary not found (${t}) for ${Yr(a.configuration,e)}`);return await le.mktempPromise(async C=>{let[,S]=E,x=await Av({project:a,locator:e,binFolder:C});await Oj(x.BERRY_BIN_FOLDER,h);let I=Nj(fe.toPortablePath(S))?qu(process.execPath,[...p,S,...r],{cwd:s,env:x,stdin:n,stdout:c,stderr:f}):qu(S,r,{cwd:s,env:x,stdin:n,stdout:c,stderr:f}),T;try{T=await I}finally{await le.removePromise(x.BERRY_BIN_FOLDER)}return T.code})}async function art(e,t,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await Qpe(e.anchoredLocator,t,r,{project:e.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var vpe,b0,Spe,trt,rrt,Lj=Xe(()=>{Dt();Dt();nA();sv();zl();vpe=et(Nd()),b0=Ie("stream");cI();Fc();fv();uv();gR();Qc();kc();Np();Zo();Spe=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Spe||{});trt=2,rrt=(0,vpe.default)(trt)});function Int(e,t,r){let s=t,a=t?t.next:e.head,n=new H6(r,s,a,e);return n.next===void 0&&(e.tail=n),n.prev===void 0&&(e.head=n),e.length++,n}function Cnt(e,t){e.tail=new H6(t,e.tail,void 0,e),e.head||(e.head=e.tail),e.length++}function wnt(e,t){e.head=new H6(t,void 0,e.head,e),e.tail||(e.tail=e.head),e.length++}var lhe,Na,pT,T6,che,N6,Em,gT,Ahe,cT,O0,Ope,phe,ym,Ehe,Fv,Ju,g6,vhe,B6,G6,khe,q6,wn,gs,W6,Lv,MI,Il,Nhe,Nv,Y6,El,J6,lrt,crt,Rpe,urt,frt,Art,jp,Gp,P0,MR,pv,UR,Tpe,_R,Fpe,Wu,xI,Ks,hv,TI,zs,Fa,Xs,Mj,HR,ra,es,Uj,_j,Npe,Hj,sA,jj,jR,gv,cm,tc,dv,prt,hrt,grt,drt,uhe,mrt,yrt,Ert,vm,Irt,M0,zu,mv,Jn,Gj,Vp,qj,f6,A6,bv,GR,LI,UI,Wj,FI,U0,Ku,R0,oA,NI,Yj,Yp,yv,Vj,ZR,um,$R,Im,F6,Crt,hT,fhe,wrt,Brt,vrt,Srt,Drt,brt,Prt,O6,Ov,xrt,cA,krt,Lpe,Qrt,Jj,Cm,qR,Kj,L6,hhe,Rrt,Trt,ghe,Frt,Nrt,dhe,Ort,Lrt,Mrt,Urt,_rt,Hrt,jrt,Grt,mhe,yhe,qrt,eT,Wrt,dT,M6,wm,Yrt,fm,zj,Vrt,T0,Jrt,Krt,zrt,F0,Xrt,Zrt,$rt,Xj,ent,Am,uT,tnt,rnt,nnt,int,cn,Che,mT,snt,p6,h6,ont,Uc,pm,qp,Zj,Mpe,aA,Ev,x0,Upe,Ci,Wp,k0,$j,hm,hs,WR,YR,e6,_pe,Hpe,Iv,t6,VR,kI,Q0,JR,gm,KR,zR,jpe,ant,Bm,Pv,lnt,whe,cnt,unt,yT,Bhe,fnt,Gpe,U6,ET,_6,Ant,pnt,qpe,hnt,She,gnt,Wpe,Ype,Vpe,d6,Jpe,Cv,tT,m6,rT,y6,E6,I6,C6,N0,fT,w6,r6,lA,Dhe,dnt,mnt,ynt,Ent,H6,Kpe,zpe,nT,wv,Yu,dm,mm,Bv,n6,Vu,i6,iT,Xpe,v6,S6,sT,oT,Zpe,s6,aT,bhe,o6,IT,j6,Bnt,vnt,Phe,xhe,Snt,Dnt,hUt,bnt,Pnt,xnt,knt,Qnt,Qhe,Rnt,Tnt,Fnt,Rhe,D6,AT,Nnt,The,Ont,Fhe,Ohe,CT,Lnt,Mnt,b6,Lhe,Unt,_nt,a6,$pe,QI,Hnt,jnt,Gnt,qnt,Wnt,Ynt,ehe,P6,the,x6,_c,k6,Q6,lT,rhe,nhe,Dv,ihe,she,l6,L0,Zs,XR,ohe,RI,c6,u6,R6,xv,kv,Qv,Rv,Vnt,Tv,Jnt,Knt,znt,ahe,V6,vv,Mhe,Xnt,Znt,gUt,$nt,eit,tit,rit,nit,Sv,dUt,iit,Uhe=Xe(()=>{lhe=et(Ie("events"),1),Na=et(Ie("fs"),1),pT=Ie("node:events"),T6=et(Ie("node:stream"),1),che=Ie("node:string_decoder"),N6=et(Ie("node:path"),1),Em=et(Ie("node:fs"),1),gT=Ie("path"),Ahe=Ie("events"),cT=et(Ie("assert"),1),O0=Ie("buffer"),Ope=et(Ie("zlib"),1), Line truncated
`,n=Buffer.byteLength(a),c=Math.floor(Math.log(n)/Math.log(10))+1;return n+c>=Math.pow(10,c)&&(c+=1),c+n+a}static parse(t,r,s=!1){return new Ihe(tnt(rnt(t),r),s)}},tnt=(e,t)=>t?Object.assign({},t,e):e,rnt=e=>e.replace(/\n$/,"").split(`
`).reduce(nnt,Object.create(null)),nnt=(e,t)=>{let r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.slice((r+" ").length);let s=t.split("="),a=s.shift();if(!a)return e;let n=a.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),c=s.join("=");return e[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(c)*1e3):/^[0-9]+$/.test(c)?+c:c,e},int=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,cn=int!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/"),Che=class extends vm{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,r){switch(super({}),this.pause(),this.extended=t,this.globalExtended=r,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=cn(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?cn(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#e(t),r&&this.#e(r,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let r=this.remain,s=this.blockRemain;return this.remain=Math.max(0,r-t),this.blockRemain=Math.max(0,s-t),this.ignore?!0:r>=t?super.write(e):super.write(e.subarray(0,r))}#e(e,t=!1){e.path&&(e.path=cn(e.path)),e.linkpath&&(e.linkpath=cn(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([r,s])=>!(s==null||r==="path"&&t))))}},mT=(e,t,r,s={})=>{e.file&&(s.file=e.file),e.cwd&&(s.cwd=e.cwd),s.code=r instanceof Error&&r.code||t,s.tarCode=t,!e.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),e.emit("warn",t,r,s)):r instanceof Error?e.emit("error",Object.assign(r,s)):e.emit("error",Object.assign(new Error(`${t}: ${r}`),s))},snt=1024*1024,p6=Buffer.from([31,139]),h6=Buffer.from([40,181,47,253]),ont=Math.max(p6.length,h6.length),Uc=Symbol("state"),pm=Symbol("writeEntry"),qp=Symbol("readEntry"),Zj=Symbol("nextEntry"),Mpe=Symbol("processEntry"),aA=Symbol("extendedHeader"),Ev=Symbol("globalExtendedHeader"),x0=Symbol("meta"),Upe=Symbol("emitMeta"),Ci=Symbol("buffer"),Wp=Symbol("queue"),k0=Symbol("ended"),$j=Symbol("emittedEnd"),hm=Symbol("emit"),hs=Symbol("unzip"),WR=Symbol("consumeChunk"),YR=Symbol("consumeChunkSub"),e6=Symbol("consumeBody"),_pe=Symbol("consumeMeta"),Hpe=Symbol("consumeHeader"),Iv=Symbol("consuming"),t6=Symbol("bufferConcat"),VR=Symbol("maybeEnd"),kI=Symbol("writing"),Q0=Symbol("aborted"),JR=Symbol("onDone"),gm=Symbol("sawValidEntry"),KR=Symbol("sawNullBlock"),zR=Symbol("sawEOF"),jpe=Symbol("closeStream"),ant=()=>!0,Bm=class extends Ahe.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[Wp]=[];[Ci];[qp];[pm];[Uc]="begin";[x0]="";[aA];[Ev];[k0]=!1;[hs];[Q0]=!1;[gm];[KR]=!1;[zR]=!1;[kI]=!1;[Iv]=!1;[$j]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(JR,()=>{(this[Uc]==="begin"||this[gm]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(JR,e.ondone):this.on(JR,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||snt,this.filter=typeof e.filter=="function"?e.filter:ant;let t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!(e.gzip||e.zstd)&&e.brotli!==void 0?e.brotli:t?void 0:!1;let r=e.file&&(e.file.endsWith(".tar.zst")||e.file.endsWith(".tzst"));this.zstd=!(e.gzip||e.brotli)&&e.zstd!==void 0?e.zstd:r?!0:void 0,this.on("end",()=>this[jpe]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onReadEntry=="function"&&this.on("entry",e.onReadEntry)}warn(e,t,r={}){mT(this,e,t,r)}[Hpe](e,t){this[gm]===void 0&&(this[gm]=!1);let r;try{r=new wm(e,t,this[aA],this[Ev])}catch(s){return this.warn("TAR_ENTRY_INVALID",s)}if(r.nullBlock)this[KR]?(this[zR]=!0,this[Uc]==="begin"&&(this[Uc]="header"),this[hm]("eof")):(this[KR]=!0,this[hm]("nullBlock"));else if(this[KR]=!1,!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{let s=r.type;if(/^(Symbolic)?Link$/.test(s)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(s)&&!/^(Global)?ExtendedHeader$/.test Line truncated
`}),f},s})});var Rs={};Vt(Rs,{emitList:()=>fit,emitTree:()=>e0e,treeNodeToJson:()=>$he,treeNodeToTreeify:()=>Zhe});function Zhe(e,{configuration:t}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,x=[];typeof E<"u"&&x.push(Jd(t,E,2)),typeof C<"u"&&x.push(jt(t,C[0],C[1])),x.length===0&&x.push(Jd(t,`${p}`,2));let I=x.join(": ").trim(),T=`\0${s++}\0`,O=c[`${T}${I}`]={};typeof S<"u"&&a(S,O)}};if(typeof e.children>"u")throw new Error("The root node must only contain children");return a(e.children,r),r}function $he(e){let t=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Kd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[Ait(n)]=t(c));return typeof r.value>"u"?a:{value:Kd(r.value[0],r.value[1]),children:a}};return t(e)}function fit(e,{configuration:t,stdout:r,json:s}){let a=e.map(n=>({value:n}));e0e({children:a},{configuration:t,stdout:r,json:s})}function e0e(e,{configuration:t,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(e.children)?e.children.values():Object.values(e.children??{});for(let f of c)f&&r.write(`${JSON.stringify($he(f))}
`);return}let n=(0,Xhe.asTree)(Zhe(e,{configuration:t}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
$1`).replace(/^│\n/,"")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function Ait(e){return typeof e=="string"?e.replace(/^\0[0-9]+\0/,""):e}var Xhe,t0e=Xe(()=>{Xhe=et(zhe());Qc()});var wT,r0e=Xe(()=>{wT=class{constructor(t){this.releaseFunction=t;this.map=new Map}addOrCreate(t,r){let s=this.map.get(t);if(typeof s<"u"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(t)}`);return s.refCount++,{value:s.value,release:()=>this.release(t)}}else{let a=r();return this.map.set(t,{refCount:1,value:a}),{value:a,release:()=>this.release(t)}}}release(t){let r=this.map.get(t);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(t)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(t)}`);s==1?(this.map.delete(t),this.releaseFunction(r.value)):r.refCount--}}});function _v(e){let t=e.match(pit);if(!t?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=t.groups.cacheVersion?parseInt(t.groups.cacheVersion):null;return{cacheKey:t.groups.cacheKey??null,cacheVersion:r,cacheSpec:t.groups.cacheSpec??null,hash:t.groups.hash}}var n0e,tG,rG,BT,Kr,pit,nG=Xe(()=>{qe();Dt();Dt();nA();n0e=Ie("crypto"),tG=et(Ie("fs"));r0e();Fc();E0();kc();Zo();rG=KE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),BT=KE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Kr=class e{constructor(t,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new wT(t=>{t.discardAndClose()});this.cacheId=`-${(0,n0e.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=t,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=e.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(t,{immutable:r,check:s}={}){let a=new e(t.get("cacheFolder"),{configuration:t,immutable:r,check:s});return await a.setup(),a}static getCacheKey(t){let r=t.get("compressionLevel"),s=r!=="mixed"?`c${r}`:"";return{cacheKey:[BT,s].join(""),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let t=`${this.configuration.get("globalFolder")}/cache`;return t!==this.cwd?t:null}getVersionFilename(t){return`${oI(t)}-${this.cacheKey}.zip`}getChecksumFilename(t,r){let a=_v(r).hash.slice(0,10);return`${oI(t)}-${a}.zip`}isChecksumCompatible(t){if(t===null)return!1;let{cacheVersion:r,cacheSpec:s}=_v(t);if(r===null||r<rG)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<BT&&a==="always"||s!==this.cacheSpec&&a!=="required-only")}getLocatorPath(t,r){return this.mirrorCwd===null?J.resolve(this.cwd,this.getVersionFilename(t)):r===null?J.resolve(this.cwd,this.getVersionFilename(t)):J.resolve(this.cwd,this.getChecksumFilename(t,r))}getLocatorMirrorPath(t){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(t)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await le.existsPromise(this.cwd))throw new Lt(56,"Cache path does not exist.")}else{await le.mkdirPromise(this.cwd,{recursive:!0});let t=J.resolve(this.cwd,".gitignore");await le.changeFilePromise(t,`/.gitignore
*.flock
*.tmp
`)}(this.mirrorCwd||!this.immutable)&&await le.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(t,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(t),p=new Vn,h=()=>{let Ae=new ps,Ce=J.join(vt.root,d8(t));return Ae.mkdirSync(Ce,{recursive:!0}),Ae.writeJsonSync(J.join(Ce,Er.manifest),{name:fn(t),mocked:!0}),Ae},E=async(Ae,{isColdHit:Ce,controlPath:Ee=null})=>{if(Ee===null&&c.unstablePackages?.has(t.locatorHash))return{isValid:!0,hash:null};let g=r&&!Ce?_v(r).cacheKey:this.cacheKey,Se=!c.skipIntegrityCheck||!r?`${g}/${await vQ(Ae)}`:r;if(Ee!==null){let me=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await vQ(Ee)}`:r;if(Se!==me)throw new Lt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Be=null;switch(r!==null&&Se!==r&&(this.check?Be="throw":_v(r).cacheKey!==_v(Se).cacheKey?Be="update":Be=this.configuration.get("checksumBehavior")),Be){case null:case"update":return{isValid:!0,hash:Se};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Lt(18,"The remote archive doesn't match the expected checksum")}},C=async Ae=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,t)}`);let Ce=await n(),Ee=Ce.getRealPath();Ce.saveAndClose(),await le.chmodPromise(Ee,420);let g=await E(Ae,{controlPath:Ee,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},S=async()=>{if(f===null||!await le.existsPromise(f)){let Ae=await n(),Ce=Ae.getRealPath();return Ae.saveAndClose(),{source:"loader",path:Ce}}return{source:"mirror",path:f}},x=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,t)}`);if(this.immutable)throw new Lt(56,`Cache entry required but missing for ${Yr(this.configuration,t)}`);let{path:Ae,source:Ce}=await S(),{hash:Ee}=await E(Ae,{isColdHit:!0}),g=this.getLocatorPath(t,Ee),Se=[];Ce!=="mirror"&&f!==null&&Se.push(async()=>{let me=`${f}${this.cacheId}`;await le.copyFilePromise(Ae,me,tG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(me,420),await le.renamePromise(me,f)}),(!c.mirrorWriteOnly||f===null)&&Se.push(async()=>{let me=`${g}${this.cacheId}`;await le.copyFilePromise(Ae,me,tG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(me,420),await le.renamePromise(me,g)});let Be=c.mirrorWriteOnly?f??g:g;return await Promise.all(Se.map(me=>me())),[!1,Be,Ee]},I=async()=>{let Ce=(async()=>{let Ee=c.unstablePackages?.has(t.locatorHash),g=Ee||!r||this.isChecksumCompatible(r)?this.getLocatorPath(t,r):null,Se=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Be=!!c.mockedPackages?.has(t.locatorHash)&&(!this.check||!Se),me=Be||Se,ce=me?s:a;if(ce&&ce(),me){let Z=null,De=g;if(!Be)if(this.check)Z=await C(De);else{let Qe=await E(De,{isColdHit:!1});if(Qe.isValid)Z=Qe.hash;else return x()}return[Be,De,Z]}else{if(this.immutable&&Ee)throw new Lt(56,`Cache entry required but missing for ${Yr(this.configuration,t)}; consider defining ${pe.pretty(this.configuration,"supportedArchitectures",pe.Type.CODE)} to cache packages for multiple systems`);return x()}})();this.mutexes.set(t.locatorHash,Ce);try{return await Ce}finally{this.mutexes.delete(t.locatorHash)}};for(let Ae;Ae=this.mutexes.get(t.locatorHash);)await Ae;let[T,O,U]=await I();T||this.markedFiles.add(O);let V=()=>this.refCountedZipFsCache.addOrCreate(O,()=>T?h():new ps(O,{baseFs:p,readOnly:!0})),te,ie=new cE(()=>k4(()=>(te=V(),te.value),Ae=>`Failed to open the cache entry for ${Yr(this.configuration,t)}: ${Ae}`),J),ue=new Gf(O,{baseFs:ie,pathUtils:J}),ae=()=>{te?.release()},de=c.unstablePackages?.has(t.locatorHash)?null:U;return[ue,ae,de]}},pit=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var vT,i0e=Xe(()=>{vT=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(vT||{})});var hit,_I,iG=Xe(()=>{Dt();vc();Np();Zo();hit=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(e,t,r,s)=>`${r}#commit=${s}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>`npm:${e}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(e,t)=>xQ({protocol:"npm:",source:null,selector:e,params:{__archiveUrl:t}})],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>`npm:${e}`]],_I=class{constructor(t){this.resolver=t;this.resolutions=null}async setup(t,{report:r}){let s=J.join(t.cwd,Er Line truncated
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`
`),this.stdout.write(`${jt(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
`),this.suggestInstall&&this.stdout.write(`${jt(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
`))}formatNameWithHyperlink(r){return Rj(r,{configuration:this.configuration,json:!1})}}});var HI,sG=Xe(()=>{Zo();HI=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return!!(r.project.storedResolutions.get(t.descriptorHash)||r.project.originalPackages.has(DQ(t).locatorHash))}supportsLocator(t,r){return!!(r.project.originalPackages.has(t.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(t,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(t,r,s){return t}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,s){let a=s.project.storedResolutions.get(t.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(DQ(t).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let s=r.project.originalPackages.get(t.locatorHash);if(!s)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return s}}});function Jp(){}function git(e,t,r,s,a){for(var n=0,c=t.length,f=0,p=0;n<c;n++){var h=t[n];if(h.removed){if(h.value=e.join(s.slice(p,p+h.count)),p+=h.count,n&&t[n-1].added){var C=t[n-1];t[n-1]=t[n],t[n]=C}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(x,I){var T=s[p+I];return T.length>x.length?T:x}),h.value=e.join(E)}else h.value=e.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=t[c-1];return c>1&&typeof S.value=="string"&&(S.added||S.removed)&&e.equals("",S.value)&&(t[c-2].value+=S.value,t.pop()),t}function dit(e){return{newPos:e.newPos,components:e.components.slice(0)}}function mit(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function l0e(e,t,r){return r=mit(r,{ignoreWhitespace:!0}),uG.diff(e,t,r)}function yit(e,t,r){return fG.diff(e,t,r)}function ST(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ST=function(t){return typeof t}:ST=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ST(e)}function oG(e){return Cit(e)||wit(e)||Bit(e)||vit()}function Cit(e){if(Array.isArray(e))return aG(e)}function wit(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Bit(e,t){if(e){if(typeof e=="string")return aG(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aG(e,t)}}function aG(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r<t;r++)s[r]=e[r];return s}function vit(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lG(e,t,r,s,a){t=t||[],r=r||[],s&&(e=s(a,e));var n;for(n=0;n<t.length;n+=1)if(t[n]===e)return r[n];var c;if(Sit.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),r.push(c),n=0;n<e.length;n+=1)c[n]=lG(e[n],t,r,s,a);return t.pop(),r.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),ST(e)==="object"&&e!==null){t.push(e),c={},r.push(c);var f=[],p;for(p in e)e.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=lG(e[p],t,r,s,p);t.pop(),r.pop()}else c=e;return c}function c0e(e,t,r,s,a,n,c){c||(c={}),typeof c.context>"u"&&(c.context=4);var f=yit(r,s,c);if(!f)return;f.push({value:"",lines:[]});function p(U){return U.map(function(V){return" "+V})}for(var h=[],E=0,C=0,S=[],x=1,I=1,T=function(V){var te=f[V],ie=te.lines||te.value.replace(/\n$/,"").split(`
`);if(te.lines=ie,te.added||te.removed){var ue;if(!E){var ae=f[V-1];E=x,C=I,ae&&(S=c.context>0?p(ae.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(ue=S).push.apply(ue,oG(ie.map(function(me){return(te.added?"+":"-")+me}))),te.added?I+=ie.length:x+=ie.length}else{if(E)if(ie.length<=c.context*2&&V<f.length-2){var de;(de=S).push.apply(de,oG(p(ie)))}else{var Ae,Ce=Math.min(ie.length,c.context);(Ae=S).push.apply(Ae,oG(p(ie.slice(0,Ce))));var Ee={oldStart:E,oldLines:x-E+Ce,newStart:C,newLines:I-C+Ce,lines:S};if(V>=f.length-2&&ie.length<=c.context){var g=/\n$/.test(r),Se=/\n$/.test(s),Be=ie.length==0&&S.length>Ee.oldLines;!g&&Be&&r.length>0&&S.splice(Ee.oldLines,0,"\\ No newline at end of file"),(!g&&!Be||!Se)&&S.push("\\ No newline at end of file")}h.push(Ee),E=0,C=0,S=[]}x+=ie.length,I+=ie.length}},O=0;O<f.length;O++)T(O);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:n,hunks:h}}var P_t,o0e,a0e,uG,fG,Eit,Iit,Sit,Hv,cG,AG=Xe(()=>{Jp.prototype={diff:function(t,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={}),this.options=s;var n=this;function c(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=t.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,t,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function x(){for(var T=-1*h;T<=h;T+=2){var O=void 0,U=C[T-1],V=C[T+1],te=(V?V.newPos:0)-T;U&&(C[T-1]=void 0);var ie=U&&U.newPos+1<f,ue=V&&0<=te&&te<p;if(!ie&&!ue){C[T]=void 0;continue}if(!ie||ue&&U.newPos<V.newPos?(O=dit(V),n.pushComponent(O.components,void 0,!0)):(O=U,O.newPos++,n.pushComponent(O.components,!0,void 0)),te=n.extractCommon(O,r,t,T),O.newPos+1>=f&&te+1>=p)return c(git(n,O.components,r,t,n.useLongestToken));C[T]=O}h++}if(a)(function T(){setTimeout(function(){if(h>E)return a();x()||T()},0)})();else for(;h<=E;){var I=x();if(I)return I}},pushComponent:function(t,r,s){var a=t[t.length-1];a&&a.added===r&&a.removed===s?t[t.length-1]={count:a.count+1,added:r,removed:s}:t.push({count:1,added:r,removed:s})},extractCommon:function(t,r,s,a){for(var n=r.length,c=s.length,f=t.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&t.components.push({count:h}),t.newPos=f,p},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],s=0;s<t.length;s++)t[s]&&r.push(t[s]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};P_t=new Jp;o0e=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a0e=/\S/,uG=new Jp;uG.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a0e.test(e)&&!a0e.test(t)};uG.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&o0e.test(t[r])&&o0e.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};fG=new Jp;fG.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?t[t.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),t.push(a))}return t};Eit=new Jp;Eit.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};Iit=new Jp;Iit.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};Sit=Object.prototype.toString,Hv=new Jp;Hv.useLongestToken=!0;Hv.tokenize=fG.tokenize;Hv.castInput=function(e){var t=this.options,r=t.undefinedReplacement,s=t.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>"u"?r:c}:s;return typeof e=="string"?e:JSON.stringify(lG(e,null,null,a),a," ")};Hv.equals=function(e,t){return Jp.prototype.equals.call(Hv,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};cG=new Jp;cG.tokenize=function(e){return e.slice()};cG.join=cG.removeEmpty=function(e){return e}});var DT,u0e=Xe(()=>{Fc();DT=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return this.resolver.supportsDescriptor(t,r)}supportsLocator(t,r){return this.resolver.supportsLocator(t,r)}shouldPersistResolution(t,r){return this.resolver.shouldPersistResolution(t,r)}bindDescriptor(t,r,s){return this.resolver.bindDescriptor(t,r,s)}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,s){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(t,r,s,a){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(t,r){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfLine truncated
`;await le.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=t}}});function Qit({project:e,allDescriptors:t,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,x=new Map,I=new Map,T=new Map,O=new Map,U=new Map(e.workspaces.map(ae=>{let de=ae.anchoredLocator.locatorHash,Ae=s.get(de);if(typeof Ae>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[de,xB(Ae)]})),V=()=>{let ae=le.mktempSync(),de=J.join(ae,"stacktrace.log"),Ae=String(C.length+1).length,Ce=C.map((Ee,g)=>`${`${g+1}.`.padStart(Ae," ")} ${ml(Ee)}
`).join("");throw le.writeFileSync(de,Ce),le.detachTemp(ae),new Lt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${fe.fromPortablePath(de)}`)},te=ae=>{let de=r.get(ae.descriptorHash);if(typeof de>"u")throw new Error("Assertion failed: The resolution should have been registered");let Ae=s.get(de);if(!Ae)throw new Error("Assertion failed: The package could not be found");return Ae},ie=(ae,de,Ae,{top:Ce,optional:Ee})=>{C.length>1e3&&V(),C.push(de);let g=ue(ae,de,Ae,{top:Ce,optional:Ee});return C.pop(),g},ue=(ae,de,Ae,{top:Ce,optional:Ee})=>{if(Ee||n.delete(de.locatorHash),a.has(de.locatorHash))return;a.add(de.locatorHash);let g=s.get(de.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(e.configuration,de)}) should have been registered`);let Se=new Set,Be=new Map,me=[],ce=[],Z=[],De=[];for(let Qe of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Qe.identHash)&&g.locatorHash!==Ce)continue;if(Rp(Qe))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Qe.descriptorHash);let st=Ee;if(!st){let Re=g.dependenciesMeta.get(fn(Qe));if(typeof Re<"u"){let ct=Re.get(null);typeof ct<"u"&&ct.optional&&(st=!0)}}let _=r.get(Qe.descriptorHash);if(!_)throw new Error(`Assertion failed: The resolution (${oi(e.configuration,Qe)}) should have been registered`);let tt=U.get(_)||s.get(_);if(!tt)throw new Error(`Assertion failed: The package (${_}, resolved from ${oi(e.configuration,Qe)}) should have been registered`);if(tt.peerDependencies.size===0){ie(Qe,tt,new Map,{top:Ce,optional:st});continue}let Ne,ke,be=new Set,je=new Map;me.push(()=>{Ne=h8(Qe,de.locatorHash),ke=g8(tt,de.locatorHash),g.dependencies.set(Qe.identHash,Ne),r.set(Ne.descriptorHash,ke.locatorHash),t.set(Ne.descriptorHash,Ne),s.set(ke.locatorHash,ke),xp(T,ke.locatorHash).add(Ne.descriptorHash),Se.add(ke.locatorHash)}),ce.push(()=>{O.set(ke.locatorHash,je);for(let Re of ke.peerDependencies.values()){let Me=Zl(Be,Re.identHash,()=>{let P=Ae.get(Re.identHash)??null,w=g.dependencies.get(Re.identHash);return!w&&QB(de,Re)&&(ae.identHash===de.identHash?w=ae:(w=Mn(de,ae.range),t.set(w.descriptorHash,w),r.set(w.descriptorHash,de.locatorHash),h.delete(w.descriptorHash),P=null)),w||(w=Mn(Re,"missing:")),{subject:de,ident:Re,provided:w,root:!P,requests:new Map,hash:`p${fs(de.locatorHash,Re.identHash).slice(0,6)}`}}).provided;if(Me.range==="missing:"&&ke.dependencies.has(Re.identHash)){ke.peerDependencies.delete(Re.identHash);continue}if(je.set(Re.identHash,{requester:ke,descriptor:Re,meta:ke.peerDependenciesMeta.get(fn(Re)),children:new Map}),ke.dependencies.set(Re.identHash,Me),Rp(Me)){let P=r.get(Me.descriptorHash);xp(I,P).add(ke.locatorHash)}S.set(Me.identHash,Me),Me.range==="missing:"&&be.add(Me.identHash)}ke.dependencies=new Map(Vs(ke.dependencies,([Re,ct])=>fn(ct)))}),Z.push(()=>{if(!s.has(ke.locatorHash))return;let Re=E.get(tt.locatorHash);typeof Re=="number"&&Re>=2&&V();let ct=E.get(tt.locatorHash),Me=typeof ct<"u"?ct+1:1;E.set(tt.locatorHash,Me),ie(Ne,ke,je,{top:Ce,optional:st}),E.set(tt.locatorHash,Me-1)}),De.push(()=>{let Re=r.get(Ne.descriptorHash);if(typeof Re>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let ct=O.get(Re);if(typeof ct>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let Me of Be.values()){let P=ct.get(Me.ident.identHash);P&&(Me.requests.set(Ne.descriptorHash,P),p.set(Me.hash,Me),Me.root||Ae.get(Me.ident.identHash)?.children.set(Ne.descriptorHash,P))}if(s.has(ke.locatorHash))for(let Me of be)ke.dependencies.delete(Me)})}for(let Qe of[...me,...ce])Qe();for(let Qe of Se){Se.delete(Qe);let st=s.get(Qe),_=fs(sI(st).locatorHash,...Array.from(st.dependencies.values(),be=>{let je=be.range!=="missing:"?r.get(be.descriptorHash):"missing:";if(typeof je>"u")throw new Error(`Assertion failed: Expected the resolution for ${oi(e.configuration,be)} to have been registered`);return je===Ce?`${je} (top)`:je})),tt=x.get(_);if(typeof tt>"u"){x.set(_,st);continue}let Ne=xp(T,tt.locatorHash);for(let be of T.get(st.locatorHash)??[])r.set(be,tt.locatorHash),Ne.add(be);s.delete(st.locatorHash),a.delete(st.locatorHash),Se.delete(st.locatorHash);let ke=I.get(st.locatorHash);if(ke!==void 0){let be=xp(I,tt.locatorHash);for(let je of ke)be.add(je),Se.add(je)}}for(let Qe of[...Z,...De])Qe()};for(let ae of e.workspaces){let de=ae.anchoredLocator;h.delete(ae.anchoredDescriptor.descriptorHash),ie(ae.anchoredDescriptor,de,new Map,{top:de.locatorHash,optional:!1})}for(let ae of p.values()){if(!ae.root)continue;let de=s.get(ae.subject.locatorHash);if(typeof de>"u")continue;for(let Ce of ae.requests.values()){let Ee=`p${fs(ae.subject.locatorHash,fn(ae.ident),Ce.requester.locatorHash).slice(0,6)}`;c.set(Ee,{subject:ae.subject.locatorHash,requested:ae.ident,rootRequester:Ce.requester.locatorHash,allRequesters:Array.from(OB(Ce),g=>g.requester.locatorHash)})}let Ae=[...OB(ae)];if(ae.provided.rang Line truncated
${[C,S,x].join(`
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let t=J.join(this.cwd,Er.lockfile),r=this.configuration.get("defaultLanguageName");if(le.existsSync(t)){let s=await le.readFilePromise(t,"utf8");this.lockFileChecksum=p0e(s);let a=cs(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<xT;for(let f of Object.keys(a)){if(f==="__metadata")continue;let p=a[f];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Tp(p.resolution,!0),E=new _t;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,x=p.linkType.toUpperCase(),I=p.conditions??null,T=E.dependencies,O=E.peerDependencies,U=E.dependenciesMeta,V=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let ue=typeof c<"u"&&!p.checksum.includes("/")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,ue)}let ie={...h,version:C,languageName:S,linkType:x,conditions:I,dependencies:T,peerDependencies:O,dependenciesMeta:U,peerDependenciesMeta:V,bin:te};this.originalPackages.set(ie.locatorHash,ie);for(let ue of f.split(bit)){let ae=I0(ue);n<=6&&(ae=this.configuration.normalizeDependency(ae),ae=Mn(ae,ae.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ae.descriptorHash,ae),this.storedResolutions.set(ae.descriptorHash,h.locatorHash)}}}else s.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let t=new Set,r=(0,PT.default)(4),s=async(a,n)=>{if(t.has(n))return a;t.add(n);let c=new jI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(t){let r=this.workspacesByIdent.get(t.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${$i(this.configuration,t.anchoredLocator)}: ${fe.fromPortablePath(t.cwd)} conflicts with ${fe.fromPortablePath(r.cwd)}`);this.workspaces.push(t),this.workspacesByCwd.set(t.cwd,t),this.workspacesByIdent.set(t.anchoredLocator.identHash,t)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(t){J.isAbsolute(t)||(t=J.resolve(this.cwd,t)),t=J.normalize(t).replace(/\/+$/,"");let r=this.workspacesByCwd.get(t);return r||null}getWorkspaceByCwd(t){let r=this.tryWorkspaceByCwd(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByFilePath(t){let r=null;for(let s of this.workspaces)J.relative(s.cwd,t).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(t){let r=this.tryWorkspaceByFilePath(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByIdent(t){let r=this.workspacesByIdent.get(t.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(t){let r=this.tryWorkspaceByIdent(t);if(!r)throw new Error(`Workspace not found (${$i(this.configuration,t)})`);return r}tryWorkspaceByDescriptor(t){if(t.range.startsWith(Ii.protocol)){let s=t.range.slice(Ii.protocol.length);if(s!=="^"&&s!=="~"&&s!=="*"&&!yl(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(t);return r===null||(Rp(t)&&(t=kB(t)),!r.accepts(t.range))?null:r}getWorkspaceByDescriptor(t){let r=this.tryWorkspaceByDescriptor(t);if(r===null)throw new Error(`Workspace not found (${oi(this.configuration,t)})`);return r}tryWorkspaceByLocator(t){let r=this.tryWorkspaceByIdent(t);return r===null||(ju(t)&&(t=sI(t)),r.anchoredLocator.locatorHash!==t.locatorHash)?null:r}getWorkspaceByLocator(t){let r=this.tryWorkspaceByLocator(t);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,t)})`);return r}deleteDescriptor(t){this.storedResolutions.delete(t),this.storedDescriptors.delete(t)}deleteLocator(t){this.originalPackages.delete(t),this.storedPackages.delete(t),this.accessibleLocators.delete(t)}forgetResolution(t){if("descriptorHash"in t){let r=this.storedResolutions.get(t.descriptorHash);this.deleteDescriptor(t.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<"u"&&!s.has(r)&&this.deleteLocator(r)}if("locatorHash"in t){this.deleteLocator(t.locatorHash);for(let[r,s]of this.storedResolutions)s===t.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let t=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=t.shouldPersistResolution(s,{project:this,resolver:t})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let t of this.storedPackages.values())for(let[r,s]of t.dependencies)Rp(s)&&t.dLine truncated
`;switch(tt.type){case 0:Ne+=`# Script name: ${tt.script}
`;break;case 1:Ne+=`# Script code: ${tt.script}
`;break}let ke=null;if(!await le.mktempPromise(async je=>{let Re=J.join(je,"build.log"),{stdout:ct,stderr:Me}=this.configuration.getSubprocessStreams(Re,{header:Ne,prefix:Yr(this.configuration,Z),report:r}),P;try{switch(tt.type){case 0:P=await OR(Z,tt.script,[],{cwd:_,project:this,stdin:ke,stdout:ct,stderr:Me});break;case 1:P=await Tj(Z,tt.script,[],{cwd:_,project:this,stdin:ke,stdout:ct,stderr:Me});break}}catch(y){Me.write(y.stack),P=1}if(ct.end(),Me.end(),P===0)return!0;le.detachTemp(je);let w=`${Yr(this.configuration,Z)} couldn't be built successfully (exit code ${jt(this.configuration,P,gt.NUMBER)}, logs can be found here: ${jt(this.configuration,Re,gt.PATH)})`,b=this.optionalBuilds.has(Z.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),wpe&&r.reportFold(fe.fromPortablePath(Re),le.readFileSync(Re,"utf8")),b}))return!1}return!0});me.push(...st,Promise.allSettled(st).then(_=>{ie.delete(ce),_.every(tt=>tt.status==="fulfilled"&&tt.value===!0)&&Ee.set(Z.locatorHash,Qe)}))}if(await Mu(me),Be===ie.size){let ce=Array.from(ie).map(Z=>{let De=this.storedPackages.get(Z);if(!De)throw new Error("Assertion failed: The package should have been registered");return Yr(this.configuration,De)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ce})`);break}}this.storedBuildState=Ee,this.skippedBuilds=O}async installWithNewReport(t,r){return(await Ot.start({configuration:this.configuration,json:t.json,stdout:t.stdout,forceSectionAlignment:!0,includeLogs:!t.json&&!t.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(t){let r=this.configuration.get("nodeLinker");ze.telemetry?.reportInstall(r);let s=!1;if(await t.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&t.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{t.report.reportWarning(E,C)},reportError:(E,C)=>{t.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status="inactive";let n=J.join(this.cwd,Er.lockfile),c=null;if(t.immutable)try{c=await le.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Lt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await t.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(t)}),await t.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{Tit(this,t.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let x=jt(this.configuration,S,gt.PACKAGE_EXTENSION);switch(S.status){case"inactive":t.report.reportWarning(68,`${x}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":t.report.reportWarning(69,`${x}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=md(c,this.generateLockfile());if(E!==c){let C=c0e(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){t.report.reportSeparator();for(let S of C.hunks){t.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let x of S.lines)x.startsWith("+")?t.report.reportError(28,jt(this.configuration,x,gt.ADDED)):x.startsWith("-")?t.report.reportError(28,jt(this.configuration,x,gt.REMOVED)):t.report.reportInfo(null,jt(this.configuration,x,"grey"))}t.report.reportSeparator()}throw new Lt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status==="active"&&ze.telemetry?.reportPackageExtension(Kd(S,gt.PACKAGE_EXTENSION));await t.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(t)});let f=t.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(f.map(async E=>SQ(E,{cwd:this.cwd})));(typeof t.persistProject>"u"||t.persistProject)&&await this.persist(),await t.report.startTimerPromise("Link step",async()=>{if(t.mode==="update-lockfile"){t.report.reportWarning(73,`Skipped due to ${jt(this.configuration,"mode=update-lockfile",gt.CODE)}`);return}await this.linkEverything(t);let E=await Promise.all(f.map(async C=>SQ(C,{cwd:this.cwd})));for(let C=0;C<f.length;++C)p[C]!==E[C]&&t.report.reportError(64,`The checksum for ${f[C]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await t.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{t.report.r Line truncated
`,`# Manual changes might be lost - proceed with caution!
`].join("")}
`+fl(r)}async persistLockfile(){let t=J.join(this.cwd,Er.lockfile),r="";try{r=await le.readFilePromise(t,"utf8")}catch{}let s=this.generateLockfile(),a=md(r,s);a!==r&&(await le.writeFilePromise(t,a),this.lockFileChecksum=p0e(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let t=[];for(let c of Object.values(gG))t.push(...c);let r=Vd(this,t),s=dG.default.serialize(r),a=fs(s);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await le.mkdirPromise(J.dirname(n),{recursive:!0}),await le.writeFilePromise(n,await xit(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:t=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await kit(await le.readFilePromise(a));n=dG.default.deserialize(c),this.installStateChecksum=fs(c)}catch{r&&await this.applyLightResolution();return}t&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,Vd(n,gG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,Vd(n,gG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let t=(0,PT.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>t(()=>r.persistManifest()))])}async cacheCleanup({cache:t,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let s=new Set([".gitignore"]);if(!Q8(t.cwd,this.cwd)||!await le.existsPromise(t.cwd))return null;let a=[];for(let c of await le.readdirPromise(t.cwd)){if(s.has(c))continue;let f=J.resolve(t.cwd,c);t.markedFiles.has(f)||(t.immutable?r.reportError(56,`${jt(this.configuration,J.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(le.lstatPromise(f).then(async p=>(await le.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function Fit(e){let s=Math.floor(e.timeNow/864e5),a=e.updateInterval*864e5,n=e.state.lastUpdate??e.timeNow+a+Math.floor(a*e.randomInitialInterval),c=n+a,f=e.state.lastTips??s*864e5,p=f+864e5+8*36e5-e.timeZone,h=c<=e.timeNow,E=p<=e.timeNow,C=null;return(h||E||!e.state.lastUpdate||!e.state.lastTips)&&(C={},C.lastUpdate=h?e.timeNow:n,C.lastTips=f,C.blocks=h?{}:e.state.blocks,C.displayedTips=e.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var GI,d0e=Xe(()=>{Dt();uv();E0();AR();kc();Np();GI=class{constructor(t,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=t;let s=this.getRegistryPath();this.isNew=!le.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(t){let r=new Set(this.displayedTips),s=f=>f&&An?tA(An,f):!1,a=t.map((f,p)=>p).filter(f=>t[f]&&s(t[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),t[c]}reportVersion(t){this.reportValue("version",t.replace(/-git\..*/,"-git"))}reportCommandName(t){this.reportValue("commandName",t||"<none>")}reportPluginName(t){this.reportValue("pluginName",t)}reportProject(t){this.reportEnumerator("projectCount",t)}reportInstall(t){this.reportHit("installCount",t)}reportPackageExtension(t){this.reportValue("packageExtension",t)}reportWorkspaceCount(t){this.reportValue("workspaceCount",String(t))}reportDependencyCount(t){this.reportValue("dependencyCount",String(t))}reportValue(t,r){xp(this.values,t).add(r)}reportEnumerator(t,r){xp(this.enumerators,t).add(fs(r))}reportHit(t,r="*"){let s=x4(this.hits,t),a=Zl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let t=this.configuration.get("globalFolder");return J.join(t,"telemetry.json")}sendReport(t){let r=this.getRegistryPath(),s;try{s=le.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=Fit({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{le.mkdirSync(J.dirname(r),{recursive:!0}),le.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${t}?ddsource=yarn`,E=C=>zH(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let x=S;x Line truncated
`),h=c.length;for(h>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());h-- >0;)f=r(e.styles[c[h]],f,p);return f},a=(n,c,f)=>{e.styles[n]=t({name:n,codes:c}),(e.keys[f]||(e.keys[f]=[])).push(n),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(h){e.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,e),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=Uit,e.hasColor=e.hasAnsi=n=>(e.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&e.ansiRegex.test(n)),e.alias=(n,c)=>{let f=typeof c=="string"?e[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),e.styles[n]=f,f.stack=[n]),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(p){e.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,e),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},e.theme=n=>{if(!Mit(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))e.alias(c,n[c]);return e},e.alias("unstyle",n=>typeof n=="string"&&n!==""?(e.ansiRegex.lastIndex=0,n.replace(e.ansiRegex,"")):""),e.alias("noop",n=>n),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=w0e(),e.define=a,e};IG.exports=B0e();IG.exports.create=B0e});var na=G(hn=>{"use strict";var _it=Object.prototype.toString,Hc=Xu(),v0e=!1,CG=[],S0e={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};hn.longest=(e,t)=>e.reduce((r,s)=>Math.max(r,t?s[t].length:s.length),0);hn.hasColor=e=>!!e&&Hc.hasColor(e);var RT=hn.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);hn.nativeType=e=>_it.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"");hn.isAsyncFn=e=>hn.nativeType(e)==="asyncfunction";hn.isPrimitive=e=>e!=null&&typeof e!="object"&&typeof e!="function";hn.resolve=(e,t,...r)=>typeof t=="function"?t.call(e,...r):t;hn.scrollDown=(e=[])=>[...e.slice(1),e[0]];hn.scrollUp=(e=[])=>[e.pop(),...e];hn.reorder=(e=[])=>{let t=e.slice();return t.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),t};hn.swap=(e,t,r)=>{let s=e.length,a=r===s?0:r<0?s-1:r,n=e[t];e[t]=e[a],e[a]=n};hn.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[0]),process.platform==="win32"?r-1:r};hn.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[1]),r};hn.wordWrap=(e,t={})=>{if(!e)return e;typeof t=="number"&&(t={width:t});let{indent:r="",newline:s=`
`+r,width:a=80}=t,n=(s+r).match(/[^\S\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=e.trim(),p=new RegExp(c,"g"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),t.padEnd&&(h=h.map(E=>E.padEnd(a," "))),t.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(s)};hn.unmute=e=>{let t=e.stack.find(s=>Hc.keys.color.includes(s));return t?Hc[t]:e.stack.find(s=>s.slice(2)==="bg")?Hc[t.slice(2)]:s=>s};hn.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"";hn.inverse=e=>{if(!e||!e.stack)return e;let t=e.stack.find(s=>Hc.keys.color.includes(s));if(t){let s=Hc["bg"+hn.pascal(t)];return s?s.black:e}let r=e.stack.find(s=>s.slice(0,2)==="bg");return r?Hc[r.slice(2).toLowerCase()]||e:Hc.none};hn.complement=e=>{if(!e||!e.stack)return e;let t=e.stack.find(s=>Hc.keys.color.includes(s)),r=e.stack.find(s=>s.slice(0,2)==="bg");if(t&&!r)return Hc[S0e[t]||t];if(r){let s=r.slice(2).toLowerCase(),a=S0e[s];return a&&Hc["bg"+hn.pascal(a)]||e}return Hc.none};hn.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),s=t>=12?"pm":"am";t=t%12;let a=t===0?12:t,n=r<10?"0"+r:r;return a+":"+n+" "+s};hn.set=(e={},t="",r)=>t.split(".").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!hn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},e);hn.get=(e={},t="",r)=>{let s=e[t]==null?t.split(".").reduce((a,n)=>a&&a[n],e):e[t];return s??r};hn.mixin=(e,t)=>{if(!RT(e))return t;if(!RT(t))return e;for(let r of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,r);if(s.hasOwnProperty("value"))if(e.hasOwnProperty(r)&&RT(s.value)){let a=Object.getOwnPropertyDescriptor(e,r);RT(a.value)?e[r]=hn.merge({},e[r],t[r]):Reflect.defineProperty(e,r,s)}else Reflect.defineProperty(e,r,s);else Reflect.defineProperty(e,r,s)}return e};hn.merge=(...e)=>{let t={};for(let r of e)hn.mixin(t,r);return t};hn.mixinEmitter=(e,t)=>{let r=t.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a=="function"?hn.define(e,s,a.bind(t)):hn.define(e,s,a)}};hn.onExit=e=>{let t=(r,s)=>{v0e||(v0e=!0,CG.forEach(a=>a()),r===!0&&process.exit(128+s))};CG.length===0&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),CG.push(e)};hn.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})};hn.defineExport=(e,t,r)=>{let s;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var D0e=G(VI=>{"use strict";VI.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};VI.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};VI.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};VI.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};VI.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var x0e=G((s3t,P0e)=>{"use strict";var b0e=Ie("readline"),Hit=D0e(),jit=/^(?:\x1b)([a-zA-Z0-9])$/,Git=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,qit={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function Wit(e){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(e)}function Yit(e){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(e)}var TT=(e="",t={})=>{let r,s={name:t.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e,...t};if(Buffer.isBuffer(e)?e[0]>127&&e[1]===void 0?(e[0]-=128,e="\x1B"+String(e)):e=String(e):e!==void 0&&typeof e!="string"?e=String(e):e||(e=s.sequence||""),s.sequence=s.sequence||e||s.name,e==="\r")s.raw=void 0,s.name="return";else if(e===`
`)s.name="enter";else if(e===" ")s.name="tab";else if(e==="\b"||e==="\x7F"||e==="\x1B\x7F"||e==="\x1B\b")s.name="backspace",s.meta=e.charAt(0)==="\x1B";else if(e==="\x1B"||e==="\x1B\x1B")s.name="escape",s.meta=e.length===2;else if(e===" "||e==="\x1B ")s.name="space",s.meta=e.length===2;else if(e<="")s.name=String.fromCharCode(e.charCodeAt(0)+97-1),s.ctrl=!0;else if(e.length===1&&e>="0"&&e<="9")s.name="number";else if(e.length===1&&e>="a"&&e<="z")s.name=e;else if(e.length===1&&e>="A"&&e<="Z")s.name=e.toLowerCase(),s.shift=!0;else if(r=jit.exec(e))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Git.exec(e)){let a=[...e];a[0]==="\x1B"&&a[1]==="\x1B"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=qit[n],s.shift=Wit(n)||s.shift,s.ctrl=Yit(n)||s.ctrl}return s};TT.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=b0e.createInterface({terminal:!0,input:r});b0e.emitKeypressEvents(r,s);let a=(f,p)=>t(f,TT(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),s.pause(),s.close()}};TT.action=(e,t,r)=>{let s={...Hit,...r};return t.ctrl?(t.action=s.ctrl[t.name],t):t.option&&s.option?(t.action=s.option[t.name],t):t.shift?(t.action=s.shift[t.name],t):(t.action=s.keys[t.name],t)};P0e.exports=TT});var Q0e=G((o3t,k0e)=>{"use strict";k0e.exports=e=>{e.timers=e.timers||{};let t=e.options.timers;if(t)for(let r of Object.keys(t)){let s=t[r];typeof s=="number"&&(s={interval:s}),Vit(e,r,s)}};function Vit(e,t,r={}){let s=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,e.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),e.once("close",()=>s.stop()),s.stop}});var T0e=G((a3t,R0e)=>{"use strict";var{define:Jit,width:Kit}=na(),wG=class{constructor(t){let r=t.options;Jit(this,"_prompt",t),this.type=t.type,this.name=t.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Kit(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=t.symbols,this.styles=t.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let t={...this};return t.status=this.status,t.buffer=Buffer.from(t.buffer),delete t.clone,t}set color(t){this._color=t}get color(){let t=this.prompt.styles;if(this.cancelled)return t.cancelled;if(this.submitted)return t.submitted;let r=this._color||t[this.status];return typeof r=="function"?r:t.pending}set loading(t){this._loading=t}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};R0e.exports=wG});var N0e=G((l3t,F0e)=>{"use strict";var BG=na(),Io=Xu(),vG={default:Io.noop,noop:Io.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||BG.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||BG.complement(this.primary)},primary:Io.cyan,success:Io.green,danger:Io.magenta,strong:Io.bold,warning:Io.yellow,muted:Io.dim,disabled:Io.gray,dark:Io.dim.gray,underline:Io.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set placeholder(e){this._placeholder=e},get placeholder(){return this._placeholder||this.primary.dim},set highlight(e){this._highlight=e},get highlight(){return this._highlight||this.inverse}};vG.merge=(e={})=>{e.styles&&typeof e.styles.enabled=="boolean"&&(Io.enabled=e.styles.enabled),e.styles&&typeof e.styles.visible=="boolean"&&(Io.visible=e.styles.visible);let t=BG.merge({},vG,e.styles);delete t.merge;for(let r of Object.keys(Io))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>Io[r]});for(let r of Object.keys(Io.styles))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>Io[r]});return t};F0e.exports=vG});var L0e=G((c3t,O0e)=>{"use strict";var SG=process.platform==="win32",Kp=Xu(),zit=na(),DG={...Kp.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301", Line truncated
`),h=p[0],E=p[p.length-1],S=(s+(r?" "+r:"")).length,x=S<h.length?h.slice(S+1):"";return{header:c,prompt:h,after:x,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let t=this.state.error||await this.validate(this.value,this.state);if(t!==!0){let r=`
`+this.symbols.pointer+" ";typeof t=="string"?r+=t.trim():r+="Invalid input",this.state.error=`
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(t){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(t))}async close(){this.state.closed=!0;try{let t=this.sections(),r=Math.ceil(t.prompt.length/this.width);t.rest&&this.write(Dm.cursor.down(t.rest.length)),this.write(`
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=kG.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:t,options:r,result:s}=this;if(this.format=()=>t.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(t,r)=>{if(this.once("submit",t),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(t,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[t];n.timer=p;let h=a[t]||n[t]||c[t],E=r&&r[t]!=null?r[t]:await h;if(E==="")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[t]?this.resolve(h,n,r,s):C}async prefix(){let t=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,Cl.isObject(t)&&(t=t[s.status]||t.pending),Cl.hasColor(t)?t:(this.styles[s.status]||this.styles.pending)(t)}async message(){let t=await this.element("message");return Cl.hasColor(t)?t:this.styles.strong(t)}async separator(){let t=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=t[s.status]||t.pending||s.separator,n=await this.resolve(a,s);return Cl.isObject(n)&&(n=n[s.status]||n.pending),Cl.hasColor(n)?n:this.styles.muted(n)}async pointer(t,r){let s=await this.element("pointer",t,r);if(typeof s=="string"&&Cl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?"on":"off"]||s,this.state),p=Cl.hasColor(f)?f:c(f);return n?p:" ".repeat(f.length)}}async indicator(t,r){let s=await this.element("indicator",t,r);if(typeof s=="string"&&Cl.hasColor(s))return s;if(s){let a=this.styles,n=t.enabled===!0,c=n?a.success:a.dark,f=s[n?"on":"off"]||s;return Cl.hasColor(f)?f:c(f)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let t=await this.element("hint");return Cl.hasColor(t)?t:this.styles.muted(t)}}error(t){return this.state.submitted?"":t||this.state.error}format(t){return t}result(t){return t}validate(t){return this.options.required===!0?this.isValue(t):!0}isValue(t){return t!=null&&t!==""}resolve(t,...r){return Cl.resolve(this,t,...r)}get base(){return e.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Cl.height(this.stdout,25)}get width(){return this.options.columns||Cl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(t){this.state.cursor=t}get cursor(){return this.state.cursor}set input(t){this.state.input=t}get input(){return this.state.input}set value(t){this.state.value=t}get value(){let{input:t,value:r}=this.state,s=[r,t].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return t=>new this(t).run()}};function sst(e){let t=a=>e[a]===void 0||typeof e[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(e.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=e.options[a];typeof n=="function"&&t(a)?s.includes(a)||(e[a]=n.bind(e)):typeof e[a]!="function"&&(e[a]=n)}}function ost(e){typeof e=="number"&&(e=[e,e,e,e]);let t=[].concat(e||[]),r=a=>a%2===0?`
`:" ",s=[];for(let a=0;a<4;a++){let n=r(a);t[a]?s.push(n.repeat(t[a])):s.push("")}return s}Y0e.exports=QG});var K0e=G((A3t,J0e)=>{"use strict";var ast=na(),V0e={default(e,t){return t},checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||"",t},input(e,t){throw new Error("input role is not implemented yet")},option(e,t){return V0e.default(e,t)},radio(e,t){throw new Error("radio role is not implemented yet")},separator(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||e.symbols.line.repeat(5),t},spacer(e,t){return t}};J0e.exports=(e,t={})=>{let r=ast.merge({},V0e,t.roles);return r[e]||r.default}});var Wv=G((p3t,Z0e)=>{"use strict";var lst=Xu(),cst=JI(),ust=K0e(),FT=na(),{reorder:RG,scrollUp:fst,scrollDown:Ast,isObject:z0e,swap:pst}=FT,TG=class extends cst{constructor(t){super(t),this.cursorHide(),this.maxSelected=t.maxSelected||1/0,this.multiple=t.multiple||!1,this.initial=t.initial||0,this.delay=t.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:t,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(t)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");z0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(t,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(t,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(t,r,s){if(typeof t=="function"&&(t=await t.call(this,this)),t instanceof Promise&&(t=await t),typeof t=="string"&&(t={name:t}),t.normalized)return t;t.normalized=!0;let a=t.value;if(t=ust(t.role,this.options)(this,t),typeof t.disabled=="string"&&!t.hint&&(t.hint=t.disabled,t.disabled=!0),t.disabled===!0&&t.hint==null&&(t.hint="(disabled)"),t.index!=null)return t;t.name=t.name||t.key||t.title||t.value||t.message,t.message=t.message||t.name||"",t.value=[t.value,t.name].find(this.isValue.bind(this)),t.input="",t.index=r,t.cursor=0,FT.define(t,"parent",s),t.level=s?s.level+1:1,t.indent==null&&(t.indent=s?s.indent+" ":t.indent||""),t.path=s?s.path+"."+t.name:t.name,t.enabled=!!(this.multiple&&!this.isDisabled(t)&&(t.enabled||this.isSelected(t))),this.isDisabled(t)||(this.longest=Math.max(this.longest,lst.unstyle(t.message).length));let c={...t};return t.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))t[h]=c[h];t.input=f,t.value=p},a==null&&typeof t.initial=="function"&&(t.input=await t.initial.call(this,this.state,t,r)),t}async onChoice(t,r){this.emit("choice",t,r,this),typeof t.onChoice=="function"&&await t.onChoice.call(this,this.state,t,r)}async addChoice(t,r,s){let a=await this.toChoice(t,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(t,r,s){let a={name:"New choice name?",editable:!0,newChoice:!0,...t},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(t){return t.indent==null?t.level>1?" ".repeat(t.level-1):"":t.indent}dispatch(t,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(t,r){return typeof r!="boolean"&&(r=t.enabled),r&&!t.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=t.index,t.enabled=r&&!this.isDisabled(t),t)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let t=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!t),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(t=>t.enabled=!t.enabled),this.render())}g(t=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(t.parent&&!t.choices?t.parent:t),this.render()):this.a()}toggle(t,r){if(!t.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!t.enabled),t.enabled=r,t.choices&&t. Line truncated
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(`
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(t=>this.styles.primary(t.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:t,size:r}=this.state,s="",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,""].join(" "),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=" "+h),t&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};$0e.exports=NG});var tge=G((g3t,ege)=>{"use strict";var gst=j0(),dst=(e,t)=>{let r=e.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=t(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},OG=class extends gst{constructor(t){super(t),this.cursorShow()}moveCursor(t){this.state.cursor+=t}dispatch(t){return this.append(t)}space(t){return this.options.multiple?super.space(t):this.append(t)}append(t){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+t+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:t,input:r}=this.state;return r?(this.input=r.slice(0,t-1)+r.slice(t),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:t,input:r}=this.state;return r[t]===void 0?this.alert():(this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.complete())}number(t){return this.append(t)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(t=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,t,r);let s=t.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(t=>this.styles.primary(t.message)).join(", ");if(this.state.submitted){let t=this.value=this.input=this.focused.value;return this.styles.primary(t)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let t=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=dst(this.input,t),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(t=>t.name)),super.submit()}};ege.exports=OG});var MG=G((d3t,rge)=>{"use strict";var LG=na();rge.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:s="",pos:a,showCursor:n=!0,color:c}=t,f=c||e.styles.placeholder,p=LG.inverse(e.styles.primary),h=T=>p(e.styles.black(T)),E=r,C=" ",S=h(C);if(e.blink&&e.blink.off===!0&&(h=T=>T,S=""),n&&a===0&&s===""&&r==="")return h(C);if(n&&a===0&&(r===s||r===""))return h(s[0])+f(s.slice(1));s=LG.isPrimitive(s)?`${s}`:"",r=LG.isPrimitive(r)?`${r}`:"";let x=s&&s.startsWith(r)&&s!==r,I=x?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=""),n===!1&&(I=""),x){let T=e.styles.unstyle(E+I);return E+I+f(s.slice(T.length))}return E+I}});var NT=G((m3t,nge)=>{"use strict";var mst=Xu(),yst=j0(),Est=MG(),UG=class extends yst{constructor(t){super({...t,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(t){return await super.reset(),t===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(t){return!!t&&this.append(t)}append(t){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+t+a.slice(s),r.cursor++,this.render()}delete(){let t=this.focused;if(!t||t.cursor<=0)return this.alert();let{cursor:r,input:s}=t;return t.value=t.input=s.slice(0,r-1)+s.slice(r),t.cursor--,this.render()}deleteForward(){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:s}=t;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return t.value=t.input=a,this.render()}right(){let t=this.focused;return t?t.cursor>=t.input.length?this.alert():(t.cursor++,this.render()):this.alert()}left(){let t=this.focused;return t?t.cursor<=0?this.alert():(t.cursor--,this.render()):this.alert()}space(t,r){return this.dispatch(t,r)}number(t,r){return this.dispatch(t,r)}next(){let t=this.focused;if(!t)return this.alert();let{initial:r,input:s}=t;return r&&r.startsWith(s)&&s!==r?(t.value=t.input=r,t.cursor=t.value.length,this.render()):super.next()}prev(){let t=this.focused;return t?t.cursor===0?super.prev():(t.value=t.input="",t.cursor=0,this.render()):this.alert()}separator(){return""}format(t){return this.state.submitted?"":super.format(t)}pointer(){return""}indicator(t){return t.input?"\u29BF":"\u2299"}async choiceSeparator(t,r){let s=await this.resolve(t.separator,this.state,t,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(t,r){await this.onChoice(t,r);let{state:s,styles:a}=this,{cursor:n,initial:c="",name:f,hint:p,input:h=""}=t,{muted:E,submitted:C,primary:S,danger:x}=a,I=p,T=this.index===r,O=t.validate||(()=>!0),U=await this.choiceSeparator(t,r),V=t.message;this.align==="right"&&(V=V.padStart(this.longest+1," ")),this.align==="left"&&(V=V.padEnd(this.longest+1," "));let te=this.values[f]=h||c,ie=h?"success":"dark";await O.call(t,te,thi Line truncated
`)),this.restore()}set value(t){super.value=t}get value(){return this.cast(super.value)}};cge.exports=HG});var fge=G((C3t,uge)=>{"use strict";var bst=OT(),jG=class extends bst{constructor(t){super(t),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};uge.exports=jG});var pge=G((w3t,Age)=>{"use strict";var Pst=j0(),xst=NT(),KI=xst.prototype,GG=class extends Pst{constructor(t){super({...t,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(t,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(t==="a"||t==="i")?super[t]():KI.dispatch.call(this,t,r)}append(t,r){return KI.append.call(this,t,r)}delete(t,r){return KI.delete.call(this,t,r)}space(t){return this.focused.editable?this.append(t):super.space()}number(t){return this.focused.editable?this.append(t):super.number(t)}next(){return this.focused.editable?KI.next.call(this):super.next()}prev(){return this.focused.editable?KI.prev.call(this):super.prev()}async indicator(t,r){let s=t.indicator||"",a=t.editable?s:super.indicator(t,r);return await this.resolve(a,this.state,t,r)||""}indent(t){return t.role==="heading"?"":t.editable?" ":" "}async renderChoice(t,r){return t.indent="",t.editable?KI.renderChoice.call(this,t,r):super.renderChoice(t,r)}error(){return""}footer(){return this.state.error}async validate(){let t=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),t=await r.validate(s,this.state),t!==!0)break}return t!==!0&&(this.state.error=typeof t=="string"?t:"Invalid Input"),t}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(t=>t.newChoice))return this.alert();this.value={};for(let t of this.choices){let r=t.parent?this.value[t.parent.name]:this.value;if(t.role==="heading"){this.value[t.name]={};continue}t.editable?r[t.name]=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r[t.name]=t.enabled===!0)}return this.base.submit.call(this)}};Age.exports=GG});var bm=G((B3t,hge)=>{"use strict";var kst=JI(),Qst=MG(),{isPrimitive:Rst}=na(),qG=class extends kst{constructor(t){super(t),this.initial=Rst(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(t,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(`
`,r):super.keypress(t,r)}moveCursor(t){this.cursor+=t}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(t,r){if(!t||r.ctrl||r.code)return this.alert();this.append(t)}append(t){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+t+`${s}`.slice(r),this.moveCursor(String(t).length),this.render()}insert(t){this.append(t)}delete(){let{cursor:t,input:r}=this.state;if(t<=0)return this.alert();this.input=`${r}`.slice(0,t-1)+`${r}`.slice(t),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:t,input:r}=this.state;if(r[t]===void 0)return this.alert();this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.render()}cutForward(){let t=this.cursor;if(this.input.length<=t)return this.alert();this.state.clipboard.push(this.input.slice(t)),this.input=this.input.slice(0,t),this.render()}cutLeft(){let t=this.cursor;if(t===0)return this.alert();let r=this.input.slice(0,t),s=this.input.slice(t),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let t=this.initial!=null?String(this.initial):"";if(!t||!t.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(t){return!!t}async format(t=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(t||r):Qst(this,{input:t,initial:r,pos:this.cursor})}async render(){let t=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(" ");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=" "+p),n+=" "+f,this.clear(t),this.write([c,n,h].filter(Boolean).join(`
`)),this.restore()}};hge.exports=qG});var dge=G((v3t,gge)=>{"use strict";var Tst=e=>e.filter((t,r)=>e.lastIndexOf(t)===r),LT=e=>Tst(e).filter(Boolean);gge.exports=(e,t={},r="")=>{let{past:s=[],present:a=""}=t,n,c;switch(e){case"prev":case"undo":return n=s.slice(0,s.length-1),c=s[s.length-1]||"",{past:LT([r,...n]),present:c};case"next":case"redo":return n=s.slice(1),c=s[0]||"",{past:LT([...n,r]),present:c};case"save":return{past:LT([...s,r]),present:""};case"remove":return c=LT(s.filter(f=>f!==r)),a="",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: "${e}"`)}}});var YG=G((S3t,yge)=>{"use strict";var Fst=bm(),mge=dge(),WG=class extends Fst{constructor(t){super(t);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(t){return this.store?(this.data=mge(t,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=mge("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};yge.exports=WG});var Ige=G((D3t,Ege)=>{"use strict";var Nst=bm(),VG=class extends Nst{format(){return""}};Ege.exports=VG});var wge=G((b3t,Cge)=>{"use strict";var Ost=bm(),JG=class extends Ost{constructor(t={}){super(t),this.sep=this.options.separator||/, */,this.initial=t.initial||""}split(t=this.value){return t?String(t).split(this.sep):[]}format(){let t=this.state.submitted?this.styles.primary:r=>r;return this.list.map(t).join(", ")}async submit(t){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};Cge.exports=JG});var vge=G((P3t,Bge)=>{"use strict";var Lst=j0(),KG=class extends Lst{constructor(t){super({...t,multiple:!0})}};Bge.exports=KG});var XG=G((x3t,Sge)=>{"use strict";var Mst=bm(),zG=class extends Mst{constructor(t={}){super({style:"number",...t}),this.min=this.isValue(t.min)?this.toNumber(t.min):-1/0,this.max=this.isValue(t.max)?this.toNumber(t.max):1/0,this.delay=t.delay!=null?t.delay:1e3,this.float=t.float!==!1,this.round=t.round===!0||t.float===!1,this.major=t.major||10,this.minor=t.minor||1,this.initial=t.initial!=null?t.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(t){return!/[-+.]/.test(t)||t==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(t)}number(t){return super.append(t)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(t){let r=t||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(t){let r=t||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(t=this.input){return typeof this.options.format=="function"?this.options.format.call(this,t):this.styles.info(t)}toNumber(t=""){return this.float?+t:Math.round(+t)}isValue(t){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(t)}submit(){let t=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(t||0),super.submit()}};Sge.exports=zG});var bge=G((k3t,Dge)=>{Dge.exports=XG()});var xge=G((Q3t,Pge)=>{"use strict";var Ust=bm(),ZG=class extends Ust{constructor(t){super(t),this.cursorShow()}format(t=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(t.length)):""}};Pge.exports=ZG});var Rge=G((R3t,Qge)=>{"use strict";var _st=Xu(),Hst=Wv(),kge=na(),$G=class extends Hst{constructor(t={}){super(t),this.widths=[].concat(t.messageWidth||50),this.align=[].concat(t.align||"left"),this.linebreak=t.linebreak||!1,this.edgeLength=t.edgeLength||3,this.newline=t.newline||`
`;let r=t.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let t=0;for(let r of this.choices){t=Math.max(t,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],t+3)}async dispatch(t,r){if(this.multiple)return this[r.name]?await this[r.name](t,r):await super.dispatch(t,r);this.alert()}heading(t,r,s){return this.styles.strong(t)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIndex>=this.scale.length-1?this.alert():(t.scaleIndex++,this.render())}left(){let t=this.focused;return t.scaleIndex<=0?this.alert():(t.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(s=>` ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`
`)}renderScaleHeading(t){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,t));let s=this.scaleLength-r.join("").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),f=" ".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(t,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,t,r,s);let a=t.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(t,r){let s=t.scale.map(n=>this.scaleIndicator(t,n,r)),a=this.term==="Hyper"?"":" ";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(t,r){await this.onChoice(t,r);let s=this.index===r,a=await this.pointer(t,r),n=await t.hint;n&&!kge.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\s+$/,"").padEnd(this.widths[0]," "),f=this.newline,p=this.indent(t),h=await this.resolve(t.message,this.state,t,r),E=await this.renderScale(t,r),C=this.margin[1]+this.margin[3];this.scaleLength=_st.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let x=kge.wordWrap(h,{width:this.widths[0],newline:f}).split(`
`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),x=x.map(I=>this.styles.info(I))),x[0]+=E,this.linebreak&&x.push(""),[p+a,x.join(`
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let t=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(t),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(" "))].join(`
`)}async render(){let{submitted:t,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c="";this.options.promptLine!==!1&&(c=[s,n,a,""].join(" "),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),x=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=" "+E),t&&!p&&!C.trim()&&this.multiple&&x!=null&&(c+=this.styles.danger(x)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(`
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIndex;return this.base.submit.call(this)}};Qge.exports=$G});var Nge=G((T3t,Fge)=>{"use strict";var Tge=Xu(),jst=(e="")=>typeof e=="string"?e.replace(/^['"]|['"]$/g,""):"",t5=class{constructor(t){this.name=t.key,this.field=t.field||{},this.value=jst(t.initial||this.field.initial||""),this.message=t.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Gst=async(e={},t={},r=s=>s)=>{let s=new Set,a=e.fields||[],n=e.template,c=[],f=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],x=I=>{I.line=h,c.push(I)};for(x({type:"bos",value:""});E<n.length-1;){let I=C();if(/^[^\S\n ]$/.test(I)){x({type:"text",value:I});continue}if(I===`
`){x({type:"newline",value:I}),h++;continue}if(I==="\\"){I+=C(),x({type:"text",value:I});continue}if((I==="$"||I==="#"||I==="{")&&S()==="{"){let O=C();I+=O;let U={type:"template",open:I,inner:"",close:"",value:I},V;for(;V=C();){if(V==="}"){S()==="}"&&(V+=C()),U.value+=V,U.close=V;break}V===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=V),U.value+=V,U.inner+=V}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,t.hasOwnProperty(U.key)&&(U.initial=t[U.key]),U=r(U),x(U),p.push(U.key),s.add(U.key);let te=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),te||(te=new t5(U),f.push(te)),te.lines.push(U.line-1);continue}let T=c[c.length-1];T.type==="text"&&T.line===h?T.value+=I:x({type:"text",value:I})}return x({type:"eos",value:""}),{input:n,tabstops:c,unique:s,keys:p,items:f}};Fge.exports=async e=>{let t=e.options,r=new Set(t.required===!0?[]:t.required||[]),s={...t.values,...t.initial},{tabstops:a,items:n,keys:c}=await Gst(t,s),f=e5("result",e,t),p=e5("format",e,t),h=e5("validate",e,t,!0),E=e.isValue.bind(e);return async(C={},S=!1)=>{let x=0;C.required=r,C.items=n,C.keys=c,C.output="";let I=async(V,te,ie,ue)=>{let ae=await h(V,te,ie,ue);return ae===!1?"Invalid field "+ie.name:ae};for(let V of a){let te=V.value,ie=V.key;if(V.type!=="template"){te&&(C.output+=te);continue}if(V.type==="template"){let ue=n.find(Ee=>Ee.name===ie);t.required===!0&&C.required.add(ue.name);let ae=[ue.input,C.values[ue.value],ue.value,te].find(E),Ae=(ue.field||{}).message||V.inner;if(S){let Ee=await I(C.values[ie],C,ue,x);if(Ee&&typeof Ee=="string"||Ee===!1){C.invalid.set(ie,Ee);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,ue,x);C.output+=Tge.unstyle(g);continue}ue.placeholder=!1;let Ce=te;te=await p(te,C,ue,x),ae!==te?(C.values[ie]=ae,te=e.styles.typing(ae),C.missing.delete(Ae)):(C.values[ie]=void 0,ae=`<${Ae}>`,te=e.styles.primary(ae),ue.placeholder=!0,C.required.has(ie)&&C.missing.add(Ae)),C.missing.has(Ae)&&C.validating&&(te=e.styles.warning(ae)),C.invalid.has(ie)&&C.validating&&(te=e.styles.danger(ae)),x===C.index&&(Ce!==te?te=e.styles.underline(te):te=e.styles.heading(Tge.unstyle(te))),x++}te&&(C.output+=te)}let T=C.output.split(`
`).map(V=>" "+V),O=n.length,U=0;for(let V of n)C.invalid.has(V.name)&&V.lines.forEach(te=>{T[te][0]===" "&&(T[te]=C.styles.danger(C.symbols.bullet)+T[te].slice(1))}),e.isValue(C.values[V.name])&&U++;return C.completed=(U/O*100).toFixed(0),C.output=T.join(`
`),C.output}};function e5(e,t,r,s){return(a,n,c,f)=>typeof c.field[e]=="function"?c.field[e].call(t,a,n,c,f):[s,a].find(p=>t.isValue(p))}});var Lge=G((F3t,Oge)=>{"use strict";var qst=Xu(),Wst=Nge(),Yst=JI(),r5=class extends Yst{constructor(t){super(t),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Wst(this),await super.initialize()}async reset(t){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},t!==!0&&(await this.initialize(),await this.render())}moveCursor(t){let r=this.getItem();this.cursor+=t,r.cursor+=t}dispatch(t,r){if(!r.code&&!r.ctrl&&t!=null&&this.getItem()){this.append(t,r);return}this.alert()}append(t,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${t}${n}`,this.moveCursor(1),this.render()}delete(){let t=this.getItem();if(this.cursor<=0||!t.input)return this.alert();let r=t.input.slice(this.cursor),s=t.input.slice(0,this.cursor-1);this.input=t.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(t){return t>=this.state.keys.length-1?0:t+1}decrement(t){return t<=0?this.state.keys.length-1:t-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(t){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:t,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,`
`].find(V=>V!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),C=await this.error()||"",S=await this.hint()||"",x=s?"":await this.interpolate(this.state),I=this.state.key=r[t]||"",T=await this.format(I),O=await this.footer();T&&(h+=" "+T),S&&!T&&this.state.completed===0&&(h+=" "+S),this.clear(a);let U=[E,h,x,O,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(t){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:t,missing:r,output:s,values:a}=this.state;if(t.size){let f="";for(let[p,h]of t)f+=`Invalid ${p}: ${h}
`;return this.state.error=f,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let c=qst.unstyle(s).split(`
`).map(f=>f.slice(1)).join(`
`);return this.value={values:a,result:c},super.submit()}};Oge.exports=r5});var Uge=G((N3t,Mge)=>{"use strict";var Vst="(Use <shift>+<up/down> to sort)",Jst=j0(),n5=class extends Jst{constructor(t){super({...t,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Vst].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(t,r){let s=await super.renderChoice(t,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(t=>t.value),super.submit()}};Mge.exports=n5});var Hge=G((O3t,_ge)=>{"use strict";var Kst=Wv(),i5=class extends Kst{constructor(t={}){if(super(t),this.emptyError=t.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`
`)}}async toChoices(...t){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...t);for(let s of r)s.scale=zst(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let t=this.focused,r=t.scale[t.scaleIdx],s=r.selected;return t.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIdx>=t.scale.length-1?this.alert():(t.scaleIdx++,this.render())}left(){let t=this.focused;return t.scaleIdx<=0?this.alert():(t.scaleIdx--,this.render())}indent(){return" "}async renderChoice(t,r){await this.onChoice(t,r);let s=this.index===r,a=this.term==="Hyper",n=a?9:8,c=a?"":" ",f=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+c,E=r+1+".",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(t.message,this.state,t,r),x=this.indent(t),I=x+t.scale.map((te,ie)=>h(ie===t.scaleIdx)).join(f),T=te=>te===t.scaleIdx?C(te):te,O=x+t.scale.map((te,ie)=>T(ie)).join(p),U=()=>[E,S].filter(Boolean).join(" "),V=()=>[U(),I,O," "].filter(Boolean).join(`
`);return s&&(I=this.styles.cyan(I),O=this.styles.cyan(O)),V()}async renderChoices(){if(this.state.submitted)return"";let t=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(t);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:t,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(" ");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=" "+p),h&&!c.includes(h)&&(c+=" "+h),t&&!p&&!E&&this.multiple&&this.type!=="form"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(`
`)),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIdx;return this.base.submit.call(this)}};function zst(e,t={}){if(Array.isArray(t.scale))return t.scale.map(s=>({...s}));let r=[];for(let s=1;s<e+1;s++)r.push({i:s,selected:!1});return r}_ge.exports=i5});var Gge=G((L3t,jge)=>{jge.exports=YG()});var Wge=G((M3t,qge)=>{"use strict";var Xst=OT(),s5=class extends Xst{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(t="",r){switch(t.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let t=s=>this.styles.primary.underline(s);return[this.value?this.disabled:t(this.disabled),this.value?t(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:t}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(" ");this.state.prompt=h,f&&!h.includes(f)&&(h+=" "+f),this.clear(t),this.write([r,h,p].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};qge.exports=s5});var Vge=G((U3t,Yge)=>{"use strict";var Zst=j0(),o5=class extends Zst{constructor(t){if(super(t),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(t,r){let s=await super.toChoices(t,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(t){return t.index===this.options.correctChoice}async result(t){return{selectedAnswer:t,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};Yge.exports=o5});var Kge=G(a5=>{"use strict";var Jge=na(),Ts=(e,t)=>{Jge.defineExport(a5,e,t),Jge.defineExport(a5,e.toLowerCase(),t)};Ts("AutoComplete",()=>tge());Ts("BasicAuth",()=>lge());Ts("Confirm",()=>fge());Ts("Editable",()=>pge());Ts("Form",()=>NT());Ts("Input",()=>YG());Ts("Invisible",()=>Ige());Ts("List",()=>wge());Ts("MultiSelect",()=>vge());Ts("Numeral",()=>bge());Ts("Password",()=>xge());Ts("Scale",()=>Rge());Ts("Select",()=>j0());Ts("Snippet",()=>Lge());Ts("Sort",()=>Uge());Ts("Survey",()=>Hge());Ts("Text",()=>Gge());Ts("Toggle",()=>Wge());Ts("Quiz",()=>Vge())});var Xge=G((H3t,zge)=>{zge.exports={ArrayPrompt:Wv(),AuthPrompt:_G(),BooleanPrompt:OT(),NumberPrompt:XG(),StringPrompt:bm()}});var Vv=G((j3t,$ge)=>{"use strict";var Zge=Ie("assert"),c5=Ie("events"),G0=na(),$u=class extends c5{constructor(t,r){super(),this.options=G0.merge({},t),this.answers={...r}}register(t,r){if(G0.isObject(t)){for(let a of Object.keys(t))this.register(a,t[a]);return this}Zge.equal(typeof r,"function","expected a function");let s=t.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(t=[]){for(let r of[].concat(t))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(G0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(t){typeof t=="function"&&(t=await t.call(this));let r=G0.merge({},this.options,t),{type:s,name:a}=t,{set:n,get:c}=G0;if(typeof s=="function"&&(s=await s.call(this,t,this.answers)),!s)return this.answers[a];Zge(this.prompts[s],`Prompt "${s}" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",E=>{this.emit("answer",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill==="show"&&await f.submit()):p=f.value=await f.run(),p}use(t){return t.call(this,this),this}set Prompt(t){this._Prompt=t}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(t){this._Prompt=t}static get Prompt(){return this._Prompt||JI()}static get prompts(){return Kge()}static get types(){return Xge()}static get prompt(){let t=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(t.emit(...c),n(...c)),a.prompt(r)};return G0.mixinEmitter(t,new c5),t}};G0.mixinEmitter($u,new c5);var l5=$u.prompts;for(let e of Object.keys(l5)){let t=e.toLowerCase(),r=s=>new l5[e](s).run();$u.prompt[t]=r,$u[t]=r,$u[e]||Reflect.defineProperty($u,e,{get:()=>l5[e]})}var Yv=e=>{G0.defineExport($u,e,()=>$u.types[e])};Yv("ArrayPrompt");Yv("AuthPrompt");Yv("BooleanPrompt");Yv("NumberPrompt");Yv("StringPrompt");$ge.exports=$u});var ade=G((fHt,aot)=>{aot.exports={name:"@yarnpkg/cli",version:"4.15.0",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-catalog":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-jsr":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspa Line truncated
${V} at ${te}`:`
${V}`}).join("");h.push({text:`Conflict detected in constraint targeting ${pe.pretty(e.configuration,x,pe.Type.CODE)}; conflicting values are:${T}`,fixable:!1})}else{let[[T]]=I,O=Pa(S,x);if(JSON.stringify(O)===JSON.stringify(T))continue;if(!s){let U=typeof O>"u"?`Missing field ${pe.pretty(e.configuration,x,pe.Type.CODE)}; expected ${pe.pretty(e.configuration,T,pe.Type.INSPECT)}`:typeof T>"u"?`Extraneous field ${pe.pretty(e.configuration,x,pe.Type.CODE)} currently set to ${pe.pretty(e.configuration,O,pe.Type.INSPECT)}`:`Invalid field ${pe.pretty(e.configuration,x,pe.Type.CODE)}; expected ${pe.pretty(e.configuration,T,pe.Type.INSPECT)}, found ${pe.pretty(e.configuration,O,pe.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof T>"u"?f0(S,x):Yd(S,x,T),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function Vde(e,{configuration:t}){let r={children:[]};for(let[s,a]of e){let n=[];for(let f of a){let p=f.text.split(/\n/);f.fixable&&(p[0]=`${pe.pretty(t,"\u2699","gray")} ${p[0]}`),n.push({value:pe.tuple(pe.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:pe.tuple(pe.Type.NO_HINT,h)}))})}let c={value:pe.tuple(pe.Type.LOCATOR,s.anchoredLocator),children:Ge.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=Ge.sortMap(r.children,s=>s.value[1]),r}var OC,rat,nat,iat,iS=Xe(()=>{qe();zl();OC=class{constructor(t){this.indexedFields=t;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let t of this.indexedFields)this.indexes[t]=new Map}insert(t){this.items.push(t);for(let r of this.indexedFields){let s=Object.hasOwn(t,r)?t[r]:void 0;if(typeof s>"u")continue;Ge.getArrayWithDefault(this.indexes[r],s).push(t)}return t}find(t){if(typeof t>"u")return this.items;let r=Object.entries(t);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<"u"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},rat=/^[0-9]+$/,nat=/^[a-zA-Z0-9_]+$/,iat=new Set(["scripts",..._t.allDependencies])});var Jde=G((J9t,q5)=>{var aat;(function(e){var t=function(){return{"append/2":[new e.type.Rule(new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("L")]),new e.type.Term("foldl",[new e.type.Term("append",[]),new e.type.Var("X"),new e.type.Term("[]",[]),new e.type.Var("L")]))],"append/3":[new e.type.Rule(new e.type.Term("append",[new e.type.Term("[]",[]),new e.type.Var("X"),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("append",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("S")])]),new e.type.Term("append",[new e.type.Var("T"),new e.type.Var("X"),new e.type.Var("S")]))],"member/2":[new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("_")])]),null),new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("_"),new e.type.Var("Xs")])]),new e.type.Term("member",[new e.type.Var("X"),new e.type.Var("Xs")]))],"permutation/2":[new e.type.Rule(new e.type.Term("permutation",[new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("permutation",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("permutation",[new e.type.Var("T"),new e.type.Var("P")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("P")]),new e.type.Term("append",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("Y")]),new e.type.Var("S")])])]))],"maplist/2":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("X")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("Xs")])]))],"maplist/3":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs")])]))],"maplist/4":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Ter Line truncated
`+p:"")),c.error.method="_execFileSync",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),ai.unlinkSync(h),ai.unlinkSync(E),ai.unlinkSync(C),ai.unlinkSync(S),c}function fat(e){var t,r={},s,a={env:process.env,encoding:e.encoding};if(q0||(km?process.env.PSModulePath?(q0="powershell.exe",qT=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(q0="cscript.exe",qT=["//nologo",__dirname+"\\read.cs.js"]):(q0="/bin/sh",qT=[__dirname+"/read.sh"])),km&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),V5.execFileSync){t=$de(e),sS&&sS("execFileSync",t);try{r.input=V5.execFileSync(q0,t,a)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Xde+(s?`
`+s:"")),r.error.method="execFileSync",r.error.program=q0,r.error.args=t,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=uat(e,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),e.display=""),r}function z5(e){var t="",r=e.display,s=!e.display&&e.keyIn&&e.hideEchoBack&&!e.mask;function a(){var n=fat(e);if(n.error)throw n.error;return n.input}return K5&&K5(e),function(){var n,c,f;function p(){return n||(n=process.binding("fs"),c=process.binding("constants")),n}if(typeof Xp=="string")if(Xp=null,km){if(f=function(h){var E=h.replace(/^\D+/,"").split("."),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),Xp=process.stdin.fd,MC=process.stdin._handle;else try{Xp=p().open("CONIN$",c.O_RDWR,parseInt("0666",8)),MC=new Kde(Xp,!0)}catch{}if(process.stdout.isTTY)tf=process.stdout.fd;else{try{tf=ai.openSync("\\\\.\\CON","w")}catch{}if(typeof tf!="number")try{tf=p().open("CONOUT$",c.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Xp=ai.openSync("/dev/tty","r"),MC=process.stdin._handle}catch{}}else try{Xp=ai.openSync("/dev/tty","r"),MC=new Kde(Xp,!1)}catch{}if(process.stdout.isTTY)tf=process.stdout.fd;else try{tf=ai.openSync("/dev/tty","w")}catch{}}}(),function(){var n,c,f=!e.hideEchoBack&&!e.keyIn,p,h,E,C,S;WT="";function x(I){return I===zde?!0:MC.setRawMode(I)!==0?!1:(zde=I,!0)}if(Zde||!MC||typeof tf!="number"&&(e.display||!f)){t=a();return}if(e.display&&(ai.writeSync(tf,e.display),e.display=""),!e.displayOnly){if(!x(!f)){t=a();return}for(h=e.keyIn?1:e.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),e.keyIn&&e.limit&&(c=new RegExp("[^"+e.limit+"]","g"+(e.caseSensitive?"":"i")));;){E=0;try{E=ai.readSync(Xp,p,0,h)}catch(I){if(I.code!=="EOF"){x(!1),t+=a();return}}if(E>0?(C=p.toString(e.encoding,0,E),WT+=C):(C=`
`,WT+="\0"),C&&typeof(S=(C.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(C=S,n=!0),C&&(C=C.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),C&&c&&(C=C.replace(c,"")),C&&(f||(e.hideEchoBack?e.mask&&ai.writeSync(tf,new Array(C.length+1).join(e.mask)):ai.writeSync(tf,C)),t+=C),!e.keyIn&&n||e.keyIn&&t.length>=h)break}!f&&!s&&ai.writeSync(tf,`
`),x(!1)}}(),e.print&&!s&&e.print(r+(e.displayOnly?"":(e.hideEchoBack?new Array(t.length+1).join(e.mask):t)+`
`),e.encoding),e.displayOnly?"":$5=e.keepWhitespace||e.keyIn?t:t.trim()}function Aat(e,t){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!t||t(a))&&r.push(a))}return s(e),r}function e9(e){return e.replace(/[\x00-\x7f]/g,function(t){return"\\x"+("00"+t.charCodeAt().toString(16)).substr(-2)})}function $s(){var e=Array.prototype.slice.call(arguments),t,r;return e.length&&typeof e[0]=="boolean"&&(r=e.shift(),r&&(t=Object.keys(J5),e.unshift(J5))),e.reduce(function(s,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(t=Object.keys(a)),t.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":c=c!=null?c+"":"",c&&n!=="limitMessage"&&(c=c.replace(/[\r\n]/g,"")),s[n]=c;break;case"bufferSize":!isNaN(c=parseInt(c,10))&&typeof c=="number"&&(s[n]=c);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!c;break;case"limit":case"trueValue":case"falseValue":s[n]=Aat(c,function(f){var p=typeof f;return p==="string"||p==="number"||p==="function"||f instanceof RegExp}).map(function(f){return typeof f=="string"?f.replace(/[\r\n]/g,""):f});break;case"print":case"phContent":case"preCheck":s[n]=typeof c=="function"?c:void 0;break;case"prompt":case"display":s[n]=c??"";break}})),s},{})}function X5(e,t,r){return t.some(function(s){var a=typeof s;return a==="string"?r?e===s:e.toLowerCase()===s.toLowerCase():a==="number"?parseFloat(e)===s:a==="function"?s(e):s instanceof RegExp?s.test(e):!1})}function t9(e,t){var r=W0.normalize(km?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return e=W0.normalize(e),t?e.replace(/^~(?=\/|\\|$)/,r):e.replace(new RegExp("^"+e9(r)+"(?=\\/|\\\\|$)",km?"i":""),"~")}function UC(e,t){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(c,f,p,h,E,C){var S;return f||typeof(S=t(E))!="string"?p:S?(h||"")+S+(C||""):""}return e.replace(s,n).replace(a,n)}function eme(e,t,r){var s,a=[],n=-1,c=0,f="",p;function h(E,C){return C.length>3?(E.push(C[0]+"..."+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=e.reduce(function(E,C){return E.concat((C+"").split(""))},[]).reduce(function(E,C){var S,x;return t||(C=C.toLowerCase()),S=/^\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(x=C.charCodeAt(0),S&&S===n&&x===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=x),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function tme(e,t){return e.join(e.length>2?", ":t?" / ":"/")}function rme(e,t){var r,s,a={},n;if(t.phContent&&(r=t.phContent(e,t)),typeof r!="string")switch(e){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=t.hasOwnProperty(e)?typeof t[e]=="boolean"?t[e]?"on":"off":t[e]+"":"";break;case"limit":case"trueValue":case"falseValue":s=t[t.hasOwnProperty(e+"Src")?e+"Src":e],t.keyIn?(a=eme(s,t.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f==="string"||f==="number"}),r=tme(s,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=t[t.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||e!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=$5;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),e==="CWD"?r=W0.basename(r):e==="cwdHome"&&(r=t9(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+e.replace(/^./,function(c){return c.toUpperCase()})+"String"]();break;default:typeof(n=(e.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=xm[xm.length-n]||"")}return r}function nme(e){var t=/^(.)-(.)$/.exec(e),r="",s,a,n,c;if(!t)return null;for(s=t[1].charCodeAt(0),a=t[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function Z5(e){var t=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,s="",a=[],n;for(e=e.trim();r=t.exec(e);)n=r[3]||r[4]||"",r[1]&&(a.push(s),s=""),s+=n;return s&&a.push(s),a}function ime(e,t){return t.trueValue.length&&X5(e,t.trueValue,t.caseSensitive)?!0:t.falseValue.length&&X5(e,t.falseValue,t.caseSensitive)?!1:e}function sme(e){var t,r,s,a,n,c,f;function p(E){return rme(E,e)}function h(E){e.display+=(/[^\r\n]$/.test(e.display)?`
`:"")+E}for(e.limitSrc=e.limit,e.displaySrc=e.display,e.limit="",e.display=UC(e.display+"",p);;){if(t=z5(e),r=!1,s="",e.defaultInput&&!t&&(t=e.defaultInput),e.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(t))?(n=xm[0]||"",a[1]?r=!0:t=n,h(n+`
`),r||(e.displayOnly=!0,z5(e),e.displayOnly=!1)):t&&t!==xm[xm.length-1]&&(xm=[t])),!r&&e.cd&&t)switch(c=Z5(t),c[0].toLowerCase()){case"cd":if(c[1])try{process.chdir(t9(c[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&e.preCheck&&(f=e.preCheck(t,e),t=f.res,f.forceNext&&(r=!0)),!r){if(!e.limitSrc.length||X5(t,e.limitSrc,e.caseSensitive))break;e.limitMessage&&(s=UC(e.limitMessage,p))}h((s?s+`
`:"")+UC(e.displaySrc+"",p))}return ime(t,e)}$r._DBG_set_useExt=function(e){Zde=e};$r._DBG_set_checkOptions=function(e){K5=e};$r._DBG_set_checkMethod=function(e){sS=e};$r._DBG_clearHistory=function(){$5="",xm=[]};$r.setDefaultOptions=function(e){return J5=$s(!0,e),$s(!0)};$r.question=function(e,t){return sme($s($s(!0,t),{display:e}))};$r.prompt=function(e){var t=$s(!0,e);return t.display=t.prompt,sme(t)};$r.keyIn=function(e,t){var r=$s($s(!0,t),{display:e,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a==="string"||a==="number"}).map(function(s){return UC(s+"",nme)}),r.limit=e9(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c==="string"||c==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=UC(r.display+"",function(s){return rme(s,r)}),ime(z5(r),r)};$r.questionEMail=function(e,t){return e==null&&(e="Input e-mail address: "),$r.question(e,$s({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},t,{keepWhitespace:!1,cd:!1}))};$r.questionNewPassword=function(e,t){var r,s,a,n=$s({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},t,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?s+"..."+a:null}}),c,f,p,h,E,C,S;for(t=t||{},c=UC(t.charlist?t.charlist+"":"$<!-~>",nme),(isNaN(s=parseInt(t.min,10))||typeof s!="number")&&(s=12),(isNaN(a=parseInt(t.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+e9(c)+"]{"+s+","+a+"}$"),r=eme([c],n.caseSensitive,!0),r.text=tme(r.values,r.suppressed),f=t.confirmMessage!=null?t.confirmMessage:"Reinput a same one to confirm it: ",p=t.unmatchMessage!=null?t.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",e==null&&(e="Input new password: "),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(e,n),n.limit=[C,""],n.limitMessage=p,S=$r.question(f,n);return C};function ome(e,t,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return $r.question(e,$s({limitMessage:"Input valid number, please."},t,{limit:a,cd:!1})),s}$r.questionInt=function(e,t){return ome(e,t,function(r){return parseInt(r,10)})};$r.questionFloat=function(e,t){return ome(e,t,parseFloat)};$r.questionPath=function(e,t){var r,s="",a=$s({hideEchoBack:!1,limitMessage:`$<error(
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},t,{keepWhitespace:!1,limit:function(n){var c,f,p;n=t9(n,!0),s="";function h(E){E.split(/\/|\\/).reduce(function(C,S){var x=W0.resolve(C+=S+W0.sep);if(!ai.existsSync(x))ai.mkdirSync(x);else if(!ai.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return C},"")}try{if(c=ai.existsSync(n),r=c?ai.realpathSync(n):W0.resolve(n),!t.hasOwnProperty("exists")&&!c||typeof t.exists=="boolean"&&t.exists!==c)return s=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&t.create&&(t.isDirectory?h(r):(h(W0.dirname(r)),ai.closeSync(ai.openSync(r,"w"))),r=ai.realpathSync(r)),c&&(t.min||t.max||t.isFile||t.isDirectory)){if(f=ai.statSync(r),t.isFile&&!f.isFile())return s="Not file: "+r,!1;if(t.isDirectory&&!f.isDirectory())return s="Not directory: "+r,!1;if(t.min&&f.size<+t.min||t.max&&f.size>+t.max)return s="Size "+f.size+" is out of range: "+r,!1}if(typeof t.validate=="function"&&(p=t.validate(r))!==!0)return typeof p=="string"&&(s=p),!1}catch(E){return s=E+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:t.hasOwnProperty(n)?t[n]+"":""}});return t=t||{},e==null&&(e='Input path (you can "cd" and "pwd"): '),$r.question(e,a),r};function ame(e,t){var r={},s={};return typeof e=="object"?(Object.keys(e).forEach(function(a){typeof e[a]=="function"&&(s[t.caseSensitive?a:a.toLowerCase()]=e[a])}),r.preCheck=function(a){var n;return r.args=Z5(a),n=r.args[0]||"",t.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return t.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=Z5(a),r.hRes=typeof e=="function"?e.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(e,t){var r=$s({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),s=ame(e,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(e,t){for(var r=$s({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},t);!e($r.prompt(r)););};$r.promptCLLoop=function(e,t){var r=$s({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),s=ame(e,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(e){return $r.prompt($s({hideEchoBack:!1,history:!0},e,{prompt:function(){return km?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function lme(e,t,r){var s;return e==null&&(e="Are you sure? "),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=$r.keyIn(e,$s(t,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}$r.keyInYN=function(e,t){return lme(e,t)};$r.keyInYNStrict=function(e,t){return lme(e,t,"yn")};$r.keyInPause=function(e,t){e==null&&(e="Continue..."),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s+$/,"")+" (Hit any key)"),$r.keyIn(e,$s({limit:null},t,{hideEchoBack:!0,mask:""}))};$r.keyInSelect=function(e,t,r){var s=$s({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?e.length+"":p==="firstItem"?(e[0]+"").trim():p==="lastItem"?(e[e.length-1]+"").trim():null}}),a="",n={},c=49,f=`
`;if(!Array.isArray(e)||!e.length||e.length>35)throw"`items` must be Array (max length: 35).";return e.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+="["+E+"] "+(p+"").trim()+`
`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,f+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
`),s.limit=a,f+=`
`,t==null&&(t="Choose one from list: "),(t+="")&&((!r||r.guide!==!1)&&(t=t.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),f+=t),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return WT};function oS(e,t){var r;return t.length&&(r={},r[e]=t[0]),$r.setDefaultOptions(r)[e]}$r.setPrint=function(){return oS("print",arguments)};$r.setPrompt=function(){return oS("prompt",arguments)};$r.setEncoding=function(){return oS("encoding",arguments)};$r.setMask=function(){return oS("mask",arguments)};$r.setBufferSize=function(){return oS("bufferSize",arguments)}});var r9=G((z9t,rc)=>{(function(){var e={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y==="read")return null;F={path:w,text:"",type:b,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var se=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(se=se/256>>>0,se=(se&255)<<8|z&255):(se=se&255,se=(z&255)<<8|se&255),this.text.length===$?this.text+=c(se):this.text=this.text.substring(0,$)+c(se)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(w,b){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,b){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,b,y){var F=Ie("fs"),z=F.openSync(w,y[0]);return y==="read"&&!F.existsSync(w)?null:{get:function(X,$){var se=new Buffer(X);return F.readSync(z,se,0,X,$),se.toString()},put:function(X,$){var se=Buffer.from(X);if($==="end_of_file")F.writeSync(z,se);else{if($==="past_end_of_file")return null;F.writeSync(z,se,0,se.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(w,b){for(var y,F=cme();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,b){return process.stdout.write(w),!0},flush:function(){return!0}};var t;Array.prototype.indexOf?t=function(w,b){return w.indexOf(b)}:t=function(w,b){for(var y=w.length,F=0;F<y;F++)if(b===w[F])return F;return-1};var r=function(w,b){if(w.length!==0){for(var y=w[0],F=w.length,z=1;z<F;z++)y=b(y,w[z]);return y}},s;Array.prototype.map?s=function(w,b){return w.map(b)}:s=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)y.push(b(w[z]));return y};var a;Array.prototype.filter?a=function(w,b){return w.filter(b)}:a=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)b(w[z])&&y.push(w[z]);return y};var n;String.prototype.codePointAt?n=function(w,b){return w.codePointAt(b)}:n=function(w,b){return w.charCodeAt(b)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function C(w){var b=[],y=!1;return w.replace(h,function(F,z,X,$,se,xe,Fe,ut,Ct,qt,ir,Pt,dn,Pr,Cr,Or,on){switch(!0){case Ct!==void 0:return b.push(parseInt(Ct,16)),"";case qt!==void 0:return b.push(parseInt(qt,8)),"";case ir!==void 0:case Pt!==void 0:case dn!==void 0:case Pr!==void 0:case Cr!==void 0:return b.push(n(F.substr(1),0)),"";case on!==void 0:return b.push(n(on,0)),"";case Or!==void 0:y=!0;default:return b.push(E[F]),""}}),y?null:b}function S(w,b){var y="";if(w.length<2)return w;try{w=w.replace(/\\([0-7]+)\\/g,function($,se){return c(parseInt(se,8))}),w=w.replace(/\\x([0-9a-fA-F]+)\\/g,function($,se){return c(parseInt(se,16))})}catch{return null}for(var F=0;F<w.length;F++){var z=w.charAt(F),X=w.charAt(F+1);if(z===b&&X===b)F++,y+=b;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
`,"\r"," ","\v"].indexOf(X)!==-1)switch(F+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function x(w){for(var b="",y=0;y<w.length;y++)switch(w.charAt(y)){case"'":b+="\\'";break;case"\\":b+="\\\\";break;case"\b":b+="\\b";break;case"\f":b+="\\f";break;case`
`:b+="\\n";break;case"\r":b+="\\r";break;case" ":b+="\\t";break;case"\v":b+="\\v";break;default:b+=w.charAt(y);break}return b}function I(w){var b=w.substr(2);switch(w.substr(0,2).toLowerCase()){case"0x":return parseInt(b,16);case"0b":return parseInt(b,2);case"0o":return parseInt(b,8);case"0'":return C(b)[0];default:return parseFloat(w)}}var T={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function O(w,b){return w.get_flag("char_conversion").id==="on"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,X=[],$=!1;if(w){var se=this.tokens[w-1];y=se.len,b=O(this.thread,this.text.substr(se.len)),F=se.line,z=se.start}else b=this.text;if(/^\s*$/.test(b))return null;for(;b!=="";){var xe=[],Fe=!1;if(/^\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\n/,""),$=!0;continue}for(var ut in T)if(T.hasOwnProperty(ut)){var Ct=T[ut].exec(b);Ct&&xe.push({value:Ct[0],name:ut,matches:Ct})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:"lexical",line:F,start:z}]);var se=r(xe,function(Pr,Cr){return Pr.value.length>=Cr.value.length?Pr:Cr});switch(se.start=z,se.line=F,b=b.replace(se.value,""),z+=se.value.length,y+=se.value.length,se.name){case"atom":se.raw=se.value,se.value.charAt(0)==="'"&&(se.value=S(se.value.substr(1,se.value.length-2),"'"),se.value===null&&(se.name="lexical",se.value="unknown escape sequence"));break;case"number":se.float=se.value.substring(0,2)!=="0x"&&se.value.match(/[.eE]/)!==null&&se.value!=="0'.",se.value=I(se.value),se.blank=Fe;break;case"string":var qt=se.value.charAt(0);se.value=S(se.value.substr(1,se.value.length-2),qt),se.value===null&&(se.name="lexical",se.value="unknown escape sequence");break;case"whitespace":var ir=X[X.length-1];ir&&(ir.space=!0),Fe=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(se=X.pop(),se.name="atom",se.value="{}",se.raw="{}",se.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(se=X.pop(),se.name="atom",se.value="[]",se.raw="[]",se.space=!1);break}se.len=y,X.push(se),Fe=!1}var Pt=this.set_last_tokens(X);return Pt.length===0?null:Pt};function V(w,b,y,F,z){if(!b[y])return{type:f,value:P.error.syntax(b[y-1],"expression expected",!0)};var X;if(F==="0"){var $=b[y];switch($.name){case"number":return{type:p,len:y+1,value:new P.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new P.type.Var($.value)};case"string":var se;switch(w.get_flag("double_quotes").id){case"atom":se=new _($.value,[]);break;case"codes":se=new _("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)se=new _(".",[new P.type.Num(n($.value,xe),!1),se]);break;case"chars":se=new _("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)se=new _(".",[new P.type.Term($.value.charAt(xe),[]),se]);break}return{type:p,len:y+1,value:se};case"l_paren":var Pt=V(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:f,derived:!0,value:P.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],") or operator expected",!b[Pt.len])};case"l_bracket":var Pt=V(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new _("{}",[Pt.value]),Pt):{type:f,derived:!0,value:P.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],"} or operator expected",!b[Pt.len])}}var Fe=te(w,b,y,z);return Fe.type===p||Fe.derived||(Fe=ie(w,b,y),Fe.type===p||Fe.derived)?Fe:{type:f,derived:!1,value:P.error.syntax(b[y],"unexpected token")}}var ut=w.__get_max_priority(),Ct=w.__get_next_priority(F),qt=y;if(b[y].name==="atom"&&b[y+1]&&(b[y].space||b[y+1].name!=="l_paren")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf("fy")>-1){var Pt=V(w,b,y,F,z);if(Pt.type!==f)return $.value==="-"&&!$.space&&P.type.is_number(Pt.value)?{value:new P.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new P.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}else if(ir&&ir.indexOf("fx")>-1){var Pt=V(w,b,y,Ct,z);if(Pt.type!==f)return{value:new P.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}}y=qt;var Pt=V(w,b,y,Ct,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name==="atom"&&w.__lookup_operator_classes(F,$.value)||b[y].name==="bar"&&w.__lookup_operator_classes(F,"|"))){var dn=Ct,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf("xf")>-1Line truncated
`;b+=`
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)b+=this.rules[key][y].toString(w),b+=`
`;return b},De.prototype.clone=function(){return new De(this.id)},Qe.prototype.clone=function(){return new Qe(this.value,this.is_float)},_.prototype.clone=function(){return new _(this.id,s(this.args,function(w){return w.clone()}))},Ne.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},ke.prototype.clone=function(){var w={};for(var b in this.links)this.links.hasOwnProperty(b)&&(w[b]=this.links[b].clone());return new ke(w)},be.prototype.clone=function(){return new be(this.goal.clone(),this.substitution.clone(),this.parent)},je.prototype.clone=function(){return new je(this.head.clone(),this.body!==null?this.body.clone():null)},De.prototype.equals=function(w){return P.type.is_variable(w)&&this.id===w.id},Qe.prototype.equals=function(w){return P.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},_.prototype.equals=function(w){if(!P.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(w.args[b]))return!1;return!0},Ne.prototype.equals=function(w){return P.type.is_stream(w)&&this.id===w.id},ke.prototype.equals=function(w){var b;if(!P.type.is_substitution(w))return!1;for(b in this.links)if(this.links.hasOwnProperty(b)&&(!w.links[b]||!this.links[b].equals(w.links[b])))return!1;for(b in w.links)if(w.links.hasOwnProperty(b)&&!this.links[b])return!1;return!0},be.prototype.equals=function(w){return P.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},je.prototype.equals=function(w){return P.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},De.prototype.rename=function(w){return w.get_free_variable(this)},Qe.prototype.rename=function(w){return this},_.prototype.rename=function(w){return new _(this.id,s(this.args,function(b){return b.rename(w)}))},Ne.prototype.rename=function(w){return this},je.prototype.rename=function(w){return new je(this.head.rename(w),this.body!==null?this.body.rename(w):null)},De.prototype.variables=function(){return[this.id]},Qe.prototype.variables=function(){return[]},_.prototype.variables=function(){return[].concat.apply([],s(this.args,function(w){return w.variables()}))},Ne.prototype.variables=function(){return[]},je.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},De.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Qe.prototype.apply=function(w){return this},_.prototype.apply=function(w){if(this.indicator==="./2"){for(var b=[],y=this;y.indicator==="./2";)b.push(y.args[0].apply(w)),y=y.args[1];for(var F=y.apply(w),z=b.length-1;z>=0;z--)F=new _(".",[b[z],F]);return F}return new _(this.id,s(this.args,function(X){return X.apply(w)}),this.ref)},Ne.prototype.apply=function(w){return this},je.prototype.apply=function(w){return new je(this.head.apply(w),this.body!==null?this.body.apply(w):null)},ke.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new ke(y)},_.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},_.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new _(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new _(",",[w,this.args[1]]):w},_.prototype.search=function(w){if(P.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;b<this.args.length;b++)if(P.type.is_term(this.args[b])&&this.args[b].search(w))return!0;return!1},Re.prototype.get_current_input=function(){return this.current_input},ct.prototype.get_current_input=function(){return this.session.get_current_input()},Re.prototype.get_current_output=function(){return this.current_output},ct.prototype.get_current_output=function(){return this.session.get_current_output()},Re.prototype.set_current_input=function(w){this.current_input=w},ct.prototype.set_current_input=function(w){return this.session.set_current_input(w)},Re.prototype.set_current_output=function(w){this.current_input=w},ct.prototype.set_current_output=function(w){return this.session.set_current_output(w)},Re.prototype.get_stream_by_alias=function(w){return this.streams[w]},ct.prototype.get_stream_by_alias=function(w){return this.session.get_stream_by_alias(w)},Re.prototype.file_system_open=function(w,b,y){return this.file_system.open(w,b,y)},ct.prototype.file_system_open=function(w,b,y){return this.session.file_system_open(w,b,y)},Re.prototype.get_char_conversion=function(w){return this.__char_conversion[w]||w},ct.prototype.get_char_conversion=function(w){return this.session.get_char_conversion(w)},Re.prototype.parse=function(w){return this.thread.parse(w)},ct.prototype.parse=function(w){var b=new U(this);b.new_text(w);var y=b.get_tokens();if(y===null)return!1;var F=V(this,y,0,this.__get_max_priority(),!1);return F Line truncated
`,[])])])),b.substitution,b)])},"nl/1":function(w,b,y){var F=y.args[0];w.prepend([new be(b.goal.replace(new _("put_char",[F,new _(`
`,[])])),b.substitution,b)])},"get_byte/1":function(w,b,y){var F=y.args[0];w.prepend([new be(b.goal.replace(new _(",",[new _("current_input",[new De("S")]),new _("get_byte",[new De("S"),F])])),b.substitution,b)])},"get_byte/2":function(w,b,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))w.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")w.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){w.throw_error(P.error.representation("byte",y.indicator));return}X.position++}w.prepend([new be(b.goal.replace(new _("=",[new Qe($,!1),z])),b.substitution,b)])}},"peek_byte/1":function(w,b,y){var F=y.args[0];w.prepend([new be(b.goal.replace(new _(",",[new _("current_input",[new De("S")]),new _("peek_byte",[new De("S"),F])])),b.substitution,b)])},"peek_byte/2":function(w,b,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))w.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")w.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){w.throw_error(P.error.representation("byte",y.indicator));return}w.prepend([new be(b.goal.replace(new _("=",[new Qe($,!1),z])),b.substitution,b)])}},"put_byte/1":function(w,b,y){var F=y.args[0];w.prepend([new be(b.goal.replace(new _(",",[new _("current_output",[new De("S")]),new _("put_byte",[new De("S"),F])])),b.substitution,b)])},"put_byte/2":function(w,b,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);P.type.is_variable(F)||P.type.is_variable(z)?w.throw_error(P.error.instantiation(y.indicator)):P.type.is_byte(z)?!P.type.is_variable(F)&&!P.type.is_stream(F)&&!P.type.is_atom(F)?w.throw_error(P.error.domain("stream_or_alias",F,y.indicator)):!P.type.is_stream(X)||X.stream===null?w.throw_error(P.error.existence("stream",F,y.indicator)):X.input?w.throw_error(P.error.permission("output","stream",F,y.indicator)):X.type==="text"?w.throw_error(P.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,w.success(b)):w.throw_error(P.error.type("byte",z,y.indicator))},"read/1":function(w,b,y){var F=y.args[0];w.prepend([new be(b.goal.replace(new _(",",[new _("current_input",[new De("S")]),new _("read_term",[new De("S"),F,new _("[]",[])])])),b.substitution,b)])},"read/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new be(b.goal.replace(new _("read_term",[F,z,new _("[]",[])])),b.substitution,b)])},"read_term/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new be(b.goal.replace(new _(",",[new _("current_input",[new De("S")]),new _("read_term",[new De("S"),F,z])])),b.substitution,b)])},"read_term/3":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F)||P.type.is_variable(X))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_list(X))w.throw_error(P.error.type("list",X,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream($)||$.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if($.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if($.type==="binary")w.throw_error(P.error.permission("input","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{for(var se={},xe=X,Fe; Line truncated
`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;t+=`workspace(${V0(s)}).
`,t+=`workspace_ident(${V0(s)}, ${V0(j.stringifyIdent(r.anchoredLocator))}).
`,t+=`workspace_version(${V0(s)}, ${V0(r.manifest.version)}).
`;for(let a of gme)for(let n of r.manifest[a].values())t+=`workspace_has_dependency(${V0(s)}, ${V0(j.stringifyIdent(n))}, ${V0(n.range)}, ${a}).
`}return t+=`workspace(_) :- false.
`,t+=`workspace_ident(_, _) :- false.
`,t+=`workspace_version(_, _) :- false.
`,t+=`workspace_has_dependency(_, _, _, _) :- false.
`,t}getDeclarations(){let t="";return t+=`gen_enforced_dependency(_, _, _, _) :- false.
`,t+=`gen_enforced_field(_, _, _) :- false.
`,t}get fullSource(){return`${this.getProjectDatabase()}
${this.source}
${this.getDeclarations()}`}createSession(){return new i9(this.project,this.fullSource)}async processClassic(){let t=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(t),enforcedFields:await this.genEnforcedFields(t)}}async process(){let{enforcedDependencies:t,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of t){let p=nS([f,j.stringifyIdent(n)]),h=Ge.getMapWithDefault(s,a.cwd);Ge.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=nS(n),p=Ge.getMapWithDefault(s,a.cwd);Ge.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(t){let r=[];for await(let s of t.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=J.resolve(this.project.cwd,Qm(s.links.WorkspaceCwd)),n=Qm(s.links.DependencyIdent),c=Qm(s.links.DependencyRange),f=Qm(s.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=j.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return Ge.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>j.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>j.stringifyIdent(s)])}async genEnforcedFields(t){let r=[];for await(let s of t.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=J.resolve(this.project.cwd,Qm(s.links.WorkspaceCwd)),n=Qm(s.links.FieldPath),c=dat(s.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return Ge.sortMap(r,[({workspace:s})=>j.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(t){let r=this.createSession();for await(let s of r.makeQuery(t)){let a={};for(let[n,c]of Object.entries(s.links))n!=="_"&&(a[n]=Qm(c));yield a}}}});var bme=G(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});function BS(e){let t=[...e.caches],r=t.shift();return r===void 0?Dme():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>BS({caches:t}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>BS({caches:t}).set(s,a))},delete(s){return r.delete(s).catch(()=>BS({caches:t}).delete(s))},clear(){return r.clear().catch(()=>BS({caches:t}).clear())}}}function Dme(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}KT.createFallbackableCache=BS;KT.createNullCache=Dme});var xme=G((TYt,Pme)=>{Pme.exports=bme()});var kme=G(E9=>{"use strict";Object.defineProperty(E9,"__esModule",{value:!0});function Nat(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}E9.createInMemoryCache=Nat});var Rme=G((NYt,Qme)=>{Qme.exports=kme()});var Fme=G(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});function Oat(e,t,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===I9.WithinHeaders?s:{}},queryParameters(){return e===I9.WithinQueryParameters?s:{}}}}function Lat(e){let t=0,r=()=>(t++,new Promise(s=>{setTimeout(()=>{s(e(r))},Math.min(100*t,1e3))}));return e(r)}function Tme(e,t=(r,s)=>Promise.resolve()){return Object.assign(e,{wait(r){return Tme(e.then(s=>Promise.all([t(s,r),s])).then(s=>s[1]))}})}function Mat(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[r],e[r]=s}return e}function Uat(e,t){return t&&Object.keys(t).forEach(r=>{e[r]=t[r](e)}),e}function _at(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}var Hat="4.22.1",jat=e=>()=>e.transporter.requester.destroy(),I9={WithinQueryParameters:0,WithinHeaders:1};rf.AuthMode=I9;rf.addMethods=Uat;rf.createAuth=Oat;rf.createRetryablePromise=Lat;rf.createWaitablePromise=Tme;rf.destroy=jat;rf.encode=_at;rf.shuffle=Mat;rf.version=Hat});var vS=G((LYt,Nme)=>{Nme.exports=Fme()});var Ome=G(C9=>{"use strict";Object.defineProperty(C9,"__esModule",{value:!0});var Gat={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};C9.MethodEnum=Gat});var SS=G((UYt,Lme)=>{Lme.exports=Ome()});var Zme=G(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});var Ume=SS();function w9(e,t){let r=e||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","head Line truncated
`;f!==s&&(s=f,e.write(KEe.default.eraseLines(r)+f),r=f.split(`
`).length)};return n.clear=()=>{e.write(KEe.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,t||(zEe.default.show(),a=!1)},n};LS.default={create:Lut}});var $Ee=G((bVt,Mut)=>{Mut.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"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:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var rIe=G(nc=>{"use strict";var tIe=$Ee(),AA=process.env;Object.defineProperty(nc,"_vendors",{value:tIe.map(function(e){return e.constant})});nc.name=null;nc.isPR=null;tIe.forEach(function(e){var t=Array.isArray(e.env)?e.env:[e.env],r=t.every(function(s){return eIe(s)});if(nc[e.constant]=r,r)switch(nc.name=e.name,typeof e.pr){case"string":nc.isPR=!!AA[e.pr];break;case"object":"env"in e.pr?nc.isPR=e.pr.env in AA&&AA[e.pr.env]!==e.pr.ne:"any"in e.pr?nc.isPR=e.pr.any.some(function(s){return!!AA[s]}):nc.isPR=eIe(e.pr);break;default:nc.isPR=null}});nc.isCI=!!(AA.CI||AA.CONTINUOUS_INTEGRATION||AA.BUILD_NUMBER||AA.RUN_ID||nc.name);function eIe(e){return typeof e=="string"?!!AA[e]:Object.keys(e).every(function(t){return AA[t]===e[t]})}});var iIe=G((xVt,nIe)=>{"use strict";nIe.exports=rIe().isCI});var oIe=G((kVt,sIe)=>{"use strict";var Uut=e=>{let t=new Set;do for(let r of Reflect.ownKeys(e))t.add([e,r]);while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t};sIe.exports=(e,{include:t,exclude:r}={})=>{let s=a=>{let n=c=>typeof c=="string"?a===c:c.test(a);return t?t.some(n):r?!r.some(n):!0};for(let[a,n]of Uut(e.constructor.prototype)){if(n==="constructor"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value=="function"&&(e[n]=e[n].bind(e))}return e}});var AIe=G(Kn=>{"use strict";var lw,_S,gF,aq;typeof performance=="object"&&typeof performance.now=="function"?(aIe=performance,Kn.unstable_now=function(){return aIe.now()}):(tq=Date,lIe=tq.now(),Kn.unstable_now=function(){return tq.now()-lIe});var aIe,tq,lIe;typeof window>"u"||typeof MessageChannel!="function"?(aw=null,rq=null,nq=function(){if(aw!==null)try{var e=Kn.unstable_now();aw(!0,e),aw=null}catch(t){throw setTimeout(nq,0),t}},lw=function(e){aw!==null?setTimeout(lw,0,e):(aw=e,setTimeout(nq,0))},_S=function(e,t){rq=setTimeout(e,t)},gF=function(){clearTimeout(rq)},Kn.unstable_shouldYield=function(){return!1},aq=Kn.unstable_forceFrameRate=function(){}):(cIe=window.setTimeout,uIe=window.clearTimeout,typeof console<"u"&&(fIe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof fIe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),MS=!1,US=null,AF=-1,iq=5,sq=0,Kn.unstable_shouldYield=function(){return Kn.unstable_now()>=sq},aq=function(){},Kn.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):iq=0<e?Math Line truncated
`+uu+v}var we=!1;function Nt(v,D){if(!v||we)return"";we=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(D)if(D=function(){throw Error()},Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(ht){var H=ht}Reflect.construct(v,[],D)}else{try{D.call()}catch(ht){H=ht}v.call(D.prototype)}else{try{throw Error()}catch(ht){H=ht}v()}}catch(ht){if(ht&&H&&typeof ht.stack=="string"){for(var Y=ht.stack.split(`
`),ne=H.stack.split(`
`),ve=Y.length-1,_e=ne.length-1;1<=ve&&0<=_e&&Y[ve]!==ne[_e];)_e--;for(;1<=ve&&0<=_e;ve--,_e--)if(Y[ve]!==ne[_e]){if(ve!==1||_e!==1)do if(ve--,_e--,0>_e||Y[ve]!==ne[_e])return`
`+Y[ve].replace(" at new "," at ");while(1<=ve&&0<=_e);break}}}finally{we=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?lc(v):""}var cc=[],Oi=-1;function co(v){return{current:v}}function Tt(v){0>Oi||(v.current=cc[Oi],cc[Oi]=null,Oi--)}function Qn(v,D){Oi++,cc[Oi]=v.current,v.current=D}var pa={},Gi=co(pa),Li=co(!1),qa=pa;function mn(v,D){var Q=v.type.contextTypes;if(!Q)return pa;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var Y={},ne;for(ne in Q)Y[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=Y),Y}function Xn(v){return v=v.childContextTypes,v!=null}function fu(){Tt(Li),Tt(Gi)}function mh(v,D,Q){if(Gi.current!==pa)throw Error(c(168));Qn(Gi,D),Qn(Li,Q)}function Wa(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var Y in H)if(!(Y in v))throw Error(c(108,g(D)||"Unknown",Y));return s({},Q,H)}function Ya(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||pa,qa=Gi.current,Qn(Gi,v),Qn(Li,Li.current),!0}function Va(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=Wa(v,D,qa),H.__reactInternalMemoizedMergedChildContext=v,Tt(Li),Tt(Gi),Qn(Gi,v)):Tt(Li),Qn(Li,Q)}var $e=null,Ja=null,mf=n.unstable_now;mf();var uc=0,vn=8;function ha(v){if(1&v)return vn=15,1;if(2&v)return vn=14,2;if(4&v)return vn=13,4;var D=24&v;return D!==0?(vn=12,D):v&32?(vn=11,32):(D=192&v,D!==0?(vn=10,D):v&256?(vn=9,256):(D=3584&v,D!==0?(vn=8,D):v&4096?(vn=7,4096):(D=4186112&v,D!==0?(vn=6,D):(D=62914560&v,D!==0?(vn=5,D):v&67108864?(vn=4,67108864):v&134217728?(vn=3,134217728):(D=805306368&v,D!==0?(vn=2,D):1073741824&v?(vn=1,1073741824):(vn=8,v))))))}function UA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function _A(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function ga(v,D){var Q=v.pendingLanes;if(Q===0)return vn=0;var H=0,Y=0,ne=v.expiredLanes,ve=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,Y=vn=15;else if(ne=Q&134217727,ne!==0){var ht=ne&~ve;ht!==0?(H=ha(ht),Y=vn):(_e&=ne,_e!==0&&(H=ha(_e),Y=vn))}else ne=Q&~ve,ne!==0?(H=ha(ne),Y=vn):_e!==0&&(H=ha(_e),Y=vn);if(H===0)return 0;if(H=31-is(H),H=Q&((0>H?0:1<<H)<<1)-1,D!==0&&D!==H&&!(D&ve)){if(ha(D),Y<=vn)return D;vn=Y}if(D=v.entangledLanes,D!==0)for(v=v.entanglements,D&=H;0<D;)Q=31-is(D),Y=1<<Q,H|=v[Q],D&=~Y;return H}function kl(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Ut(v,D){switch(v){case 15:return 1;case 14:return 2;case 12:return v=Rn(24&~D),v===0?Ut(10,D):v;case 10:return v=Rn(192&~D),v===0?Ut(8,D):v;case 8:return v=Rn(3584&~D),v===0&&(v=Rn(4186112&~D),v===0&&(v=512)),v;case 2:return D=Rn(805306368&~D),D===0&&(D=268435456),D}throw Error(c(358,v))}function Rn(v){return v&-v}function da(v){for(var D=[],Q=0;31>Q;Q++)D.push(v);return D}function Ka(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-is(D),v[D]=Q}var is=Math.clz32?Math.clz32:Ac,fc=Math.log,Au=Math.LN2;function Ac(v){return v===0?32:31-(fc(v)/Au|0)|0}var za=n.unstable_runWithPriority,Mi=n.unstable_scheduleCallback,Bs=n.unstable_cancelCallback,Ql=n.unstable_shouldYield,yf=n.unstable_requestPaint,pc=n.unstable_now,Bi=n.unstable_getCurrentPriorityLevel,Tn=n.unstable_ImmediatePriority,hc=n.unstable_UserBlockingPriority,Ke=n.unstable_NormalPriority,ot=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},ee=yf!==void 0?yf:function(){},ye=null,Oe=null,mt=!1,Et=pc(),bt=1e4>Et?pc:function(){return pc()-Et};function tr(){switch(Bi()){case Tn:return 99;case hc:return 98;case Ke:return 97;case ot:return 96;case St:return 95;default:throw Error(c(332))}}function pn(v){switch(v){case 99:return Tn;case 98:return hc;case 97:return Ke;case 96:return ot;case 95:return St;default:throw Error(c(332))}}function ci(v,D){return v=pn(v),za(v,D)}function qi(v,D,Q){return v=pn(v),Mi(v,D,Q)}function Fn(){if(Oe!==null){var v=Oe;Oe=null,Bs(v)}Xa()}function Xa(){if(!mt&&ye!==null){mt=!0;var v=0;try{var D=ye;ci(99,function(){for(;v<D.length;v++){var Q=D[v];do Q=Q(!0);while(Q!==null)}}),ye=null}catch(Q){throw ye!==null&&(ye=ye.slice(v+1)),Mi(Tn,Fn),Q}finally{mt=!1}}}var Iy=f.ReactCurrentBatchConfig;function q1(v,D){return v===D&&(v!==0||1/v===1/D)||v!==v&&D!==D}var ko=typeof Object.is=="function"?Object.is:q1,Cy=Object.prototype.hasOwnProperty;function yh(v,D){if(ko(v,D))return!0;if(typeof v!="object"||v===null||typeof D!="object"||D===null)return!1;var Q=Object.keys(v),H=Object.keys(D);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!Cy.call(D,Q[H])||!ko(v[Q[H]],D[Q[H]]))return!1;return!0}function W1(v){switch(v.tag){case 5:return lc(v.type);case 16:return lc("Lazy" Line truncated
Error generating stack: `+ne.message+`
`+ne.stack}return{value:v,source:D,stack:Y}}function Wg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var xL=typeof WeakMap=="function"?WeakMap:Map;function z1(v,D,Q){Q=Tl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){Gy||(Gy=!0,u2=H),Wg(v,D)},Q}function Yg(v,D,Q){Q=Tl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var Y=D.value;Q.payload=function(){return Wg(v,D),H(Y)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(dc===null?dc=new Set([this]):dc.add(this),Wg(v,D));var ve=D.stack;this.componentDidCatch(D.value,{componentStack:ve!==null?ve:""})}),Q}var kL=typeof WeakSet=="function"?WeakSet:Set;function X1(v){var D=v.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(Q){Rf(v,Q)}else D.current=null}function Ry(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:Qo(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Ns(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Qh(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function uP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var Y=v;H=Y.next,Y=Y.tag,Y&4&&Y&1&&(vP(Q,v),UL(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:Qo(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&vy(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Qe(Q.child.stateNode);break;case 1:v=Q.child.stateNode}vy(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&so(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:X&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&cu(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function fP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?gh(H):ao(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?dh(H):Gn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function Ty(v,D){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount($e,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,Y=H.destroy;if(H=H.tag,Y!==void 0)if(H&4)vP(D,Q);else{H=D;try{Y()}catch(ne){Rf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(X1(D),v=D.stateNode,typeof v.componentWillUnmount=="function")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){Rf(D,ne)}break;case 5:X1(D);break;case 4:F?gP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=ou(D),FA(D,v))}}function AP(v,D){for(var Q=D;;)if(Ty(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Fy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function pP(v){return v.tag===5||v.tag===3||v.tag===4}function hP(v){if(F){e:{for(var D=v.return;D!==null;){if(pP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(gf(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||pP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?Z1(v,Q,D):$1(v,Q,D)}}function Z1(v,D,Q){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,D?oo(Q,v,D):Do(Q,v);else if(H!==4&&(v=v.child,v!==null))for(Z1(v,D,Q),v=v.sibling;v!==null;)Z1(v,D,Q),v=v.sibling}function $1(v,D,Q){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,D?ji(Q,v,D):li(Q,v);els Line truncated
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Ss!==5&&(Ss=2),ht=qg(ht,_e),Zt=ve;do{switch(Zt.tag){case 3:ne=ht,Zt.flags|=4096,D&=-D,Zt.lanes|=D;var ti=z1(Zt,ne,D);By(Zt,ti);break e;case 1:ne=ht;var Qr=Zt.type,Nn=Zt.stateNode;if(!(Zt.flags&64)&&(typeof Qr.getDerivedStateFromError=="function"||Nn!==null&&typeof Nn.componentDidCatch=="function"&&(dc===null||!dc.has(Nn)))){Zt.flags|=4096,D&=-D,Zt.lanes|=D;var Hn=Yg(Zt,ne,D);By(Zt,Hn);break e}}Zt=Zt.return}while(Zt!==null)}BP(Q)}catch(zr){D=zr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function CP(){var v=Hy.current;return Hy.current=kt,v===null?kt:v}function rd(v,D){var Q=xr;xr|=16;var H=CP();fo===v&&Ms===D||Nh(v,D);do try{NL();break}catch(Y){IP(v,Y)}while(!0);if(Rg(),xr=Q,Hy.current=H,Xi!==null)throw Error(c(261));return fo=null,Ms=0,Ss}function NL(){for(;Xi!==null;)wP(Xi)}function OL(){for(;Xi!==null&&!Ql();)wP(Xi)}function wP(v){var D=bP(v.alternate,v,ep);v.memoizedProps=v.pendingProps,D===null?BP(v):Xi=D,n2.current=null}function BP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=PL(D),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=bL(Q,D,ep),Q!==null){Xi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ep&1073741824||!(Q.mode&4)){for(var H=0,Y=Q.child;Y!==null;)H|=Y.lanes|Y.childLanes,Y=Y.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1<D.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=D:v.firstEffect=D,v.lastEffect=D))}if(D=D.sibling,D!==null){Xi=D;return}Xi=D=v}while(D!==null);Ss===0&&(Ss=5)}function tp(v){var D=tr();return ci(99,LL.bind(null,v,D)),null}function LL(v,D){do Bu();while(Xg!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,Y=H,ne=v.pendingLanes&~Y;v.pendingLanes=Y,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=Y,v.mutableReadLanes&=Y,v.entangledLanes&=Y,Y=v.entanglements;for(var ve=v.eventTimes,_e=v.expirationTimes;0<ne;){var ht=31-is(ne),Wt=1<<ht;Y[ht]=0,ve[ht]=-1,_e[ht]=-1,ne&=~Wt}if(Cu!==null&&!(H&24)&&Cu.has(v)&&Cu.delete(v),v===fo&&(Xi=fo=null,Ms=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){Y=xr,xr|=32,n2.current=null,ed=tt(v.containerInfo),td=!1,sr=H;do try{ML()}catch(We){if(sr===null)throw Error(c(330));Rf(sr,We),sr=sr.nextEffect}while(sr!==null);ed=null,sr=H;do try{for(ve=v;sr!==null;){var Sr=sr.flags;if(Sr&16&&F&&gf(sr.stateNode),Sr&128){var Lr=sr.alternate;if(Lr!==null){var Zt=Lr.ref;Zt!==null&&(typeof Zt=="function"?Zt(null):Zt.current=null)}}switch(Sr&1038){case 2:hP(sr),sr.flags&=-3;break;case 6:hP(sr),sr.flags&=-3,e2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,e2(sr.alternate,sr);break;case 4:e2(sr.alternate,sr);break;case 8:_e=ve,ne=sr,F?gP(_e,ne):AP(_e,ne);var Zn=ne.alternate;Fy(ne),Zn!==null&&Fy(Zn)}sr=sr.nextEffect}}catch(We){if(sr===null)throw Error(c(330));Rf(sr,We),sr=sr.nextEffect}while(sr!==null);td&&ut(),Ne(v.containerInfo),v.current=Q,sr=H;do try{for(Sr=v;sr!==null;){var Ei=sr.flags;if(Ei&36&&uP(Sr,sr.alternate,sr),Ei&128){Lr=void 0;var il=sr.ref;if(il!==null){var rt=sr.stateNode;switch(sr.tag){case 5:Lr=Qe(rt);break;default:Lr=rt}typeof il=="function"?il(Lr):il.current=Lr}}sr=sr.nextEffect}}catch(We){if(sr===null)throw Error(c(330));Rf(sr,We),sr=sr.nextEffect}while(sr!==null);sr=null,ee(),xr=Y}else v.current=Q;if(Qf)Qf=!1,Xg=v,Zg=D;else for(sr=H;sr!==null;)D=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(Ei=sr,Ei.sibling=null,Ei.stateNode=null),sr=D;if(H=v.pendingLanes,H===0&&(dc=null),H===1?v===p2?$g++:($g=0,p2=v):$g=0,Q=Q.stateNode,Ja&&typeof Ja.onCommitFiberRoot=="function")try{Ja.onCommitFiberRoot($e,Q,void 0,(Q.current.flags&64)===64)}catch{}if(Ia(v,bt()),Gy)throw Gy=!1,v=u2,u2=null,v;return xr&8||Fn(),null}function ML(){for(;sr!==null;){var v=sr.alternate;td||ed===null||(sr.flags&8?De(sr,ed)&&(td=!0,Fe()):sr.tag===13&&QL(v,sr)&&De(sr,ed)&&(td=!0,Fe()));var D=sr.flags;D&256&&Ry(v,sr),!(D&512)||Qf||(Qf=!0,qi(97,function(){return Bu(),null})),sr=sr.nextEffect}}function Bu(){if(Zg!==90){var v=97<Zg?97:Zg;return Zg=90,ci(v,_L)}return!1}function UL(v,D){f2.push(D,v),Qf||(Qf=!0,qi(97,function(){return Bu(),null}))}function vP(v,D){A2.push(D,v),Qf||(Qf=!0,qi(97,function(){return Bu(),null}))}function _L(){if(Xg===null)return!1;var v=Xg;if(Xg=null,xr&48)throw Error(c(331));var D=xr;xr|=32;var Q=A2;A2=[];for(var H=0;H<Q.length;H+=2){var Y=Q[H],ne=Q[H+1],ve=Y.destroy;if(Y.destroy=void 0,typeof ve=="function")try{ve()}catch(ht){if(ne===null)throw Error(c(330));Rf(ne,ht)}}for(Q=f2,f2=[],H=0;H<Q.length;H+=2){Y=Q[H],ne=Q[H+1];try{va Line truncated
`+(H.join(" > ")+`
No matching component was found for:
`)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Qe(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:YL,findFiberByHostInstance:v.findFiberByHostInstance||VL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{$e=D.inject(v),Ja=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=r2(v,D);var Y=on(v,Q,H).disconnect;return{disconnect:function(){Y()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=uc;try{return uc=v,D()}finally{uc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(kf(),Fn())}},r.updateContainer=function(v,D,Q,H){var Y=D.current,ne=Oo(),ve=Ds(Y);e:if(Q){Q=Q._reactInternals;t:{if(Se(Q)!==Q||Q.tag!==1)throw Error(c(170));var _e=Q;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(Xn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(c(171))}if(Q.tag===1){var ht=Q.type;if(Xn(ht)){Q=Wa(Q,ht,_e);break e}}Q=_e}else Q=pa;return D.context===null?D.context=Q:D.pendingContext=Q,D=Tl(ne,ve),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),Fl(Y,D),Ul(Y,ve,ne),ve},r}});var dIe=G((FVt,gIe)=>{"use strict";gIe.exports=hIe()});var yIe=G((NVt,mIe)=>{"use strict";var jut={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};mIe.exports=jut});var wIe=G((OVt,CIe)=>{"use strict";var Gut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},yF=function(){function e(t,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,s){return r&&e(t.prototype,r),s&&e(t,s),t}}();function pq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var sf=yIe(),qut=function(){function e(t,r,s,a,n,c){hq(this,e),this.left=t,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return yF(e,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),e}(),EIe=function(){yF(e,null,[{key:"fromJS",value:function(r){var s=r.width,a=r.height;return new e(s,a)}}]);function e(t,r){hq(this,e),this.width=t,this.height=r}return yF(e,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toStri Line truncated
`+Module.extraStackTrace()),demangleAll(e)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t();continue}var r=t.func;typeof r=="number"?t.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(t.arg===void 0?null:t.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}Module.addOnPreRun=addOnPreRun;function addOnInit(e){__ATINIT__.unshift(e)}Module.addOnInit=addOnInit;function addOnPreMain(e){__ATMAIN__.unshift(e)}Module.addOnPreMain=addOnPreMain;function addOnExit(e){__ATEXIT__.unshift(e)}Module.addOnExit=addOnExit;function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(e,t,r){var s=r>0?r:lengthBytesUTF8(e)+1,a=new Array(s),n=stringToUTF8Array(e,a,0,a.length);return t&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(e){for(var t=[],r=0;r<e.length;r++){var s=e[r];s>255&&(s&=255),t.push(String.fromCharCode(s))}return t.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(e,t,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,a;r&&(a=t+lengthBytesUTF8(e),s=HEAP8[a]),stringToUTF8(e,t,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(e,t){HEAP8.set(e,t)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(e,t,r){for(var s=0;s<e.length;++s)HEAP8[t++>>0]=e.charCodeAt(s);r||(HEAP8[t>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function e(t,r){var s=t>>>16,a=t&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(e){return froundBuffer[0]=e,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(e){e=e>>>0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.cei Line truncated
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+e+") at "+stackTrace()+t;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,e)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Lm=G((MVt,vIe)=>{"use strict";var Wut=wIe(),Yut=BIe(),gq=!1,dq=null;Yut({},function(e,t){if(!gq){if(gq=!0,e)throw e;dq=t}});if(!gq)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");vIe.exports=Wut(dq.bind,dq.lib)});var yq=G((UVt,mq)=>{"use strict";var SIe=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);mq.exports=SIe;mq.exports.default=SIe});var bIe=G((_Vt,DIe)=>{"use strict";DIe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E Line truncated
`))t=Math.max(t,zut(r));return t};Iq.exports=xIe;Iq.exports.default=xIe});var kIe=G(qS=>{"use strict";var Xut=qS&&qS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qS,"__esModule",{value:!0});var Zut=Xut(Cq()),wq={};qS.default=e=>{if(e.length===0)return{width:0,height:0};if(wq[e])return wq[e];let t=Zut.default(e),r=e.split(`
`).length;return wq[e]={width:t,height:r},{width:t,height:r}}});var QIe=G(WS=>{"use strict";var $ut=WS&&WS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(WS,"__esModule",{value:!0});var xn=$ut(Lm()),eft=(e,t)=>{"position"in t&&e.setPositionType(t.position==="absolute"?xn.default.POSITION_TYPE_ABSOLUTE:xn.default.POSITION_TYPE_RELATIVE)},tft=(e,t)=>{"marginLeft"in t&&e.setMargin(xn.default.EDGE_START,t.marginLeft||0),"marginRight"in t&&e.setMargin(xn.default.EDGE_END,t.marginRight||0),"marginTop"in t&&e.setMargin(xn.default.EDGE_TOP,t.marginTop||0),"marginBottom"in t&&e.setMargin(xn.default.EDGE_BOTTOM,t.marginBottom||0)},rft=(e,t)=>{"paddingLeft"in t&&e.setPadding(xn.default.EDGE_LEFT,t.paddingLeft||0),"paddingRight"in t&&e.setPadding(xn.default.EDGE_RIGHT,t.paddingRight||0),"paddingTop"in t&&e.setPadding(xn.default.EDGE_TOP,t.paddingTop||0),"paddingBottom"in t&&e.setPadding(xn.default.EDGE_BOTTOM,t.paddingBottom||0)},nft=(e,t)=>{var r;"flexGrow"in t&&e.setFlexGrow((r=t.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in t&&e.setFlexShrink(typeof t.flexShrink=="number"?t.flexShrink:1),"flexDirection"in t&&(t.flexDirection==="row"&&e.setFlexDirection(xn.default.FLEX_DIRECTION_ROW),t.flexDirection==="row-reverse"&&e.setFlexDirection(xn.default.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection==="column"&&e.setFlexDirection(xn.default.FLEX_DIRECTION_COLUMN),t.flexDirection==="column-reverse"&&e.setFlexDirection(xn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in t&&(typeof t.flexBasis=="number"?e.setFlexBasis(t.flexBasis):typeof t.flexBasis=="string"?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),"alignItems"in t&&((t.alignItems==="stretch"||!t.alignItems)&&e.setAlignItems(xn.default.ALIGN_STRETCH),t.alignItems==="flex-start"&&e.setAlignItems(xn.default.ALIGN_FLEX_START),t.alignItems==="center"&&e.setAlignItems(xn.default.ALIGN_CENTER),t.alignItems==="flex-end"&&e.setAlignItems(xn.default.ALIGN_FLEX_END)),"alignSelf"in t&&((t.alignSelf==="auto"||!t.alignSelf)&&e.setAlignSelf(xn.default.ALIGN_AUTO),t.alignSelf==="flex-start"&&e.setAlignSelf(xn.default.ALIGN_FLEX_START),t.alignSelf==="center"&&e.setAlignSelf(xn.default.ALIGN_CENTER),t.alignSelf==="flex-end"&&e.setAlignSelf(xn.default.ALIGN_FLEX_END)),"justifyContent"in t&&((t.justifyContent==="flex-start"||!t.justifyContent)&&e.setJustifyContent(xn.default.JUSTIFY_FLEX_START),t.justifyContent==="center"&&e.setJustifyContent(xn.default.JUSTIFY_CENTER),t.justifyContent==="flex-end"&&e.setJustifyContent(xn.default.JUSTIFY_FLEX_END),t.justifyContent==="space-between"&&e.setJustifyContent(xn.default.JUSTIFY_SPACE_BETWEEN),t.justifyContent==="space-around"&&e.setJustifyContent(xn.default.JUSTIFY_SPACE_AROUND))},ift=(e,t)=>{var r,s;"width"in t&&(typeof t.width=="number"?e.setWidth(t.width):typeof t.width=="string"?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),"height"in t&&(typeof t.height=="number"?e.setHeight(t.height):typeof t.height=="string"?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),"minWidth"in t&&(typeof t.minWidth=="string"?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth((r=t.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in t&&(typeof t.minHeight=="string"?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight((s=t.minHeight)!==null&&s!==void 0?s:0))},sft=(e,t)=>{"display"in t&&e.setDisplay(t.display==="flex"?xn.default.DISPLAY_FLEX:xn.default.DISPLAY_NONE)},oft=(e,t)=>{if("borderStyle"in t){let r=typeof t.borderStyle=="string"?1:0;e.setBorder(xn.default.EDGE_TOP,r),e.setBorder(xn.default.EDGE_BOTTOM,r),e.setBorder(xn.default.EDGE_LEFT,r),e.setBorder(xn.default.EDGE_RIGHT,r)}};WS.default=(e,t={})=>{eft(e,t),tft(e,t),rft(e,t),nft(e,t),ift(e,t),sft(e,t),oft(e,t)}});var FIe=G((WVt,TIe)=>{"use strict";var YS=GS(),aft=gk(),lft=ik(),vq=new Set(["\x1B","\x9B"]),cft=39,RIe=e=>`${vq.values().next().value}[${e}m`,uft=e=>e.split(" ").map(t=>YS(t)),Bq=(e,t,r)=>{let s=[...t],a=!1,n=YS(aft(e[e.length-1]));for(let[c,f]of s.entries()){let p=YS(f);if(n+p<=r?e[e.length-1]+=f:(e.push(f),n=0),vq.has(f))a=!0;else if(a&&f==="m"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(e.push(""),n=0))}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},fft=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(YS(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Aft=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let s="",a="",n,c=uft(e),f=[""];for(let[p,h]of e.split(" ").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=YS(f[f.length-1]);if(p!==0&&(E>=t&&(r.wordWrap===!1||r.trim===!1)&&(f.push(""),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=" ",E++)),r.hard&&c[p]>t){let C=t-E,S=1+Math.floor((c[p]-C-1)/t);Math.floor((c[p]-1)/t)<S&&f.push(""),Bq(f,h,t);continue}if(E+c[p]>t&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<t){Bq(f,h,t);continue}f.push("")}if(E+c[p]>t&&r.wordWrap===!1){Bq(f,h,t);continue}f[f. Line truncated
`);for(let[p,h]of[...s].entries()){if(a+=h,vq.has(h)){let C=parseFloat(/\d[^m]*/.exec(s.slice(p,p+4)));n=C===cft?null:C}let E=lft.codes.get(Number(n));n&&E&&(s[p+1]===`
`?a+=RIe(E):h===`
`&&(a+=RIe(n)))}return a};TIe.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
`).split(`
`).map(s=>Aft(s,t,r)).join(`
`)});var LIe=G((YVt,OIe)=>{"use strict";var NIe="[\uD800-\uDBFF][\uDC00-\uDFFF]",pft=e=>e&&e.exact?new RegExp(`^${NIe}$`):new RegExp(NIe,"g");OIe.exports=pft});var Sq=G((VVt,HIe)=>{"use strict";var hft=yq(),gft=LIe(),MIe=ik(),_Ie=["\x1B","\x9B"],EF=e=>`${_Ie[0]}[${e}m`,UIe=(e,t,r)=>{let s=[];e=[...e];for(let a of e){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let c=MIe.codes.get(parseInt(a,10));if(c){let f=e.indexOf(c.toString());f>=0?e.splice(f,1):s.push(EF(t?c:n))}else if(t){s.push(EF(0));break}else s.push(EF(n))}if(t&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=EF(MIe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join("")};HIe.exports=(e,t,r)=>{let s=[...e.normalize()],a=[];r=typeof r=="number"?r:s.length;let n=!1,c,f=0,p="";for(let[h,E]of s.entries()){let C=!1;if(_Ie.includes(E)){let S=/\d[^m]*/.exec(e.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E==="m"&&(n=!1,C=!0);if(!n&&!C&&++f,!gft({exact:!0}).test(E)&&hft(E.codePointAt())&&++f,f>t&&f<=r)p+=E;else if(f===t&&!n&&c!==void 0)p=UIe(a);else if(f>=r){p+=UIe(a,!0,c);break}}return p}});var GIe=G((JVt,jIe)=>{"use strict";var X0=Sq(),dft=GS();function IF(e,t,r){if(e.charAt(t)===" ")return t;for(let s=1;s<=3;s++)if(r){if(e.charAt(t+s)===" ")return t+s}else if(e.charAt(t-s)===" ")return t-s;return t}jIe.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c="\u2026",f=1;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return c;let p=dft(e);if(p<=t)return e;if(s==="start"){if(n){let h=IF(e,p-t+1,!0);return c+X0(e,h,p).trim()}return a===!0&&(c+=" ",f=2),c+X0(e,p-t+f,p)}if(s==="middle"){a===!0&&(c=" "+c+" ",f=3);let h=Math.floor(t/2);if(n){let E=IF(e,h),C=IF(e,p-(t-h)+1,!0);return X0(e,0,E)+c+X0(e,C,p).trim()}return X0(e,0,h)+c+X0(e,p-(t-h)+f,p)}if(s==="end"){if(n){let h=IF(e,t-1);return X0(e,0,h)+c}return a===!0&&(c=" "+c,f=2),X0(e,0,t-f)+c}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var bq=G(VS=>{"use strict";var qIe=VS&&VS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(VS,"__esModule",{value:!0});var mft=qIe(FIe()),yft=qIe(GIe()),Dq={};VS.default=(e,t,r)=>{let s=e+String(t)+String(r);if(Dq[s])return Dq[s];let a=e;if(r==="wrap"&&(a=mft.default(e,t,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=yft.default(e,t,{position:n})}return Dq[s]=a,a}});var xq=G(Pq=>{"use strict";Object.defineProperty(Pq,"__esModule",{value:!0});var WIe=e=>{let t="";if(e.childNodes.length>0)for(let r of e.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=WIe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),t+=s}return t};Pq.default=WIe});var kq=G(bi=>{"use strict";var JS=bi&&bi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bi,"__esModule",{value:!0});bi.setTextNodeValue=bi.createTextNode=bi.setStyle=bi.setAttribute=bi.removeChildNode=bi.insertBeforeNode=bi.appendChildNode=bi.createNode=bi.TEXT_NAME=void 0;var Eft=JS(Lm()),YIe=JS(kIe()),Ift=JS(QIe()),Cft=JS(bq()),wft=JS(xq());bi.TEXT_NAME="#text";bi.createNode=e=>{var t;let r={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:e==="ink-virtual-text"?void 0:Eft.default.Node.create()};return e==="ink-text"&&((t=r.yogaNode)===null||t===void 0||t.setMeasureFunc(Bft.bind(null,r))),r};bi.appendChildNode=(e,t)=>{var r;t.parentNode&&bi.removeChildNode(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&((r=e.yogaNode)===null||r===void 0||r.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&CF(e)};bi.insertBeforeNode=(e,t,r)=>{var s,a;t.parentNode&&bi.removeChildNode(t.parentNode,t),t.parentNode=e;let n=e.childNodes.indexOf(r);if(n>=0){e.childNodes.splice(n,0,t),t.yogaNode&&((s=e.yogaNode)===null||s===void 0||s.insertChild(t.yogaNode,n));return}e.childNodes.push(t),t.yogaNode&&((a=e.yogaNode)===null||a===void 0||a.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&CF(e)};bi.removeChildNode=(e,t)=>{var r,s;t.yogaNode&&((s=(r=t.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(t.yogaNode)),t.parentNode=null;let a=e.childNodes.indexOf(t);a>=0&&e.childNodes.splice(a,1),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&CF(e)};bi.setAttribute=(e,t,r)=>{e.attributes[t]=r};bi.setStyle=(e,t)=>{e.style=t,e.yogaNode&&Ift.default(e.yogaNode,t)};bi.createTextNode=e=>{let t={nodeName:"#text",nodeValue:e,yogaLine truncated
`).repeat(n-2),E=Tq.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,"foreground");s.write(e,t,p,{transformers:[]}),s.write(e,t+1,h,{transformers:[]}),s.write(e+a-1,t+1,h,{transformers:[]}),s.write(e,t+n-1,E,{transformers:[]})}}});var lCe=G(eD=>{"use strict";var Mm=eD&&eD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(eD,"__esModule",{value:!0});var Qft=Mm(Lm()),Rft=Mm(Cq()),Tft=Mm(eCe()),Fft=Mm(bq()),Nft=Mm(tCe()),Oft=Mm(xq()),Lft=Mm(oCe()),Mft=(e,t)=>{var r;let s=(r=e.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();t=`
`.repeat(n)+Tft.default(t,a)}return t},aCe=(e,t,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&e.internal_static)return;let{yogaNode:p}=e;if(p){if(p.getDisplay()===Qft.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof e.internal_transform=="function"&&(C=[e.internal_transform,...c]),e.nodeName==="ink-text"){let S=Oft.default(e);if(S.length>0){let x=Rft.default(S),I=Nft.default(p);if(x>I){let T=(s=e.style.textWrap)!==null&&s!==void 0?s:"wrap";S=Fft.default(S,I,T)}S=Mft(e,S),t.write(h,E,S,{transformers:C})}return}if(e.nodeName==="ink-box"&&Lft.default(h,E,e,t),e.nodeName==="ink-root"||e.nodeName==="ink-box")for(let S of e.childNodes)aCe(S,t,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};eD.default=aCe});var fCe=G(tD=>{"use strict";var uCe=tD&&tD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tD,"__esModule",{value:!0});var cCe=uCe(Sq()),Uft=uCe(GS()),Fq=class{constructor(t){this.writes=[];let{width:r,height:s}=t;this.width=r,this.height=s}write(t,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:t,y:r,text:s,transformers:n})}get(){let t=[];for(let s=0;s<this.height;s++)t.push(" ".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`
`),h=0;for(let E of p){let C=t[n+h];if(!C)continue;let S=Uft.default(E);for(let x of f)E=x(E);t[n+h]=cCe.default(C,0,a)+E+cCe.default(C,a+S),h++}}return{output:t.map(s=>s.trimRight()).join(`
`),height:t.length}}};tD.default=Fq});var hCe=G(rD=>{"use strict";var Nq=rD&&rD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rD,"__esModule",{value:!0});var _ft=Nq(Lm()),ACe=Nq(lCe()),pCe=Nq(fCe());rD.default=(e,t)=>{var r;if(e.yogaNode.setWidth(t),e.yogaNode){e.yogaNode.calculateLayout(void 0,void 0,_ft.default.DIRECTION_LTR);let s=new pCe.default({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});ACe.default(e,s,{skipStaticElements:!0});let a;!((r=e.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new pCe.default({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),ACe.default(e.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var yCe=G((l7t,mCe)=>{"use strict";var gCe=Ie("stream"),dCe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Oq={},Hft=e=>{let t=new gCe.PassThrough,r=new gCe.PassThrough;t.write=a=>e("stdout",a),r.write=a=>e("stderr",a);let s=new console.Console(t,r);for(let a of dCe)Oq[a]=console[a],console[a]=s[a];return()=>{for(let a of dCe)console[a]=Oq[a];Oq={}}};mCe.exports=Hft});var Mq=G(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});Lq.default=new WeakMap});var _q=G(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});var jft=gn(),ECe=jft.createContext({exit:()=>{}});ECe.displayName="InternalAppContext";Uq.default=ECe});var jq=G(Hq=>{"use strict";Object.defineProperty(Hq,"__esModule",{value:!0});var Gft=gn(),ICe=Gft.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});ICe.displayName="InternalStdinContext";Hq.default=ICe});var qq=G(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var qft=gn(),CCe=qft.createContext({stdout:void 0,write:()=>{}});CCe.displayName="InternalStdoutContext";Gq.default=CCe});var Yq=G(Wq=>{"use strict";Object.defineProperty(Wq,"__esModule",{value:!0});var Wft=gn(),wCe=Wft.createContext({stderr:void 0,write:()=>{}});wCe.displayName="InternalStderrContext";Wq.default=wCe});var vF=G(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var Yft=gn(),BCe=Yft.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});BCe.displayName="InternalFocusContext";Vq.default=BCe});var SCe=G((g7t,vCe)=>{"use strict";var Vft=/[|\\{}()[\]^$+*?.-]/g;vCe.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(Vft,"\\$&")}});var xCe=G((d7t,PCe)=>{"use strict";var Jft=SCe(),Kft=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",bCe=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(e=>new RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));bCe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Jq=class e{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=e.nodeInternals()),"cwd"in t||(t.cwd=Kft),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,zft(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...bCe]}clean(t,r=0){r=" ".repeat(r),Array.isArray(t)||(t=t.split(`
`)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let s=!1,a=null,n=[];return t.forEach(c=>{if(c=c.replace(/\\/g,"/"),this._internals.some(p=>p.test(c)))return;let f=/^\s*at /.test(c);s?c=c.trimEnd().replace(/^(\s+)at /,"$1"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,""),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}
`).join("")}captureString(t,r=this.captureString){typeof t=="function"&&(r=t,t=1/0);let{stackTraceLimit:s}=Error;t&&(Error.stackTraceLimit=t);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(t,r=this.capture){typeof t=="function"&&(r=t,t=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,t&&(Error.stackTraceLimit=t);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(t=this.at){let[r]=this.capture(1,t);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};DCe(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(t){let r=t&&t.match(Xft);if(!r)return null;let s=r[1]==="new",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]==="native",x=r[11]===")",I,T={};if(E&&(T.line=Number(E)),C&&(T.column=Number(C)),x&&h){let O=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")O++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(O--,O===-1&&h.charAt(U-1)===" ")){let V=h.slice(0,U-1);h=h.slice(U+1),a+=` (${V}`;break}}if(a){let O=a.match(Zft);O&&(a=O[1],I=O[2])}return DCe(T,h,this._cwd),s&&(T.constructor=!0),n&&(T.evalOrigin=n,T.evalLine=f,T.evalColumn=p,T.evalFile=c&&c.replace(/\\/g,"/")),S&&(T.native=!0),a&&(T.function=a),I&&a!==I&&(T.method=I),T}};function DCe(e,t,r){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${r}/`)&&(t=t.slice(r.length+1)),e.file=t)}function zft(e){if(e.length===0)return[];let t=e.map(r=>Jft(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Xft=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Zft=/^(.*?) \[as (.*?)\]$/;PCe.exports=Jq});var QCe=G((m7t,kCe)=>{"use strict";kCe.exports=(e,t)=>e.replace(/^\t+/gm,r=>" ".repeat(r.length*(t||2)))});var TCe=G((y7t,RCe)=>{"use strict";var $ft=QCe(),eAt=(e,t)=>{let r=[],s=e-t,a=e+t;for(let n=s;n<=a;n++)r.push(n);return r};RCe.exports=(e,t,r)=>{if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");if(e=$ft(e).split(/\r?\n/),!(t>e.length))return r={around:3,...r},eAt(t,r.around).filter(s=>e[s-1]!==void 0).map(s=>({line:s,value:e[s-1]}))}});var SF=G(of=>{"use strict";var tAt=of&&of.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),rAt=of&&of.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),nAt=of&&of.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&tAt(t,e,r);return rAt(t,e),t},iAt=of&&of.__rest||function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r};Object.defineProperty(of,"__esModule",{value:!0});var FCe=nAt(gn()),Kq=FCe.forwardRef((e,t)=>{var{children:r}=e,s=iAt(e,["children"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return FCe.default.createElement("ink-box",{ref:t,style:a},r)});Kq.displayName="Box";Kq.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};of.default=Kq});var Zq=G(nD=>{"use strict";var zq=nD&&nD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nD,"__esModule",{value:!0});var sAt=zq(gn()),cw=zq(NE()),NCe=zq(Rq()),Xq=({color:e,backgroundColor:t,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=cw.default.dim(C)),e&&(C=NCe.default(C,e,"foreground")),t&&(C=NCe.default(C,t,"background")),s&&(C=cw.default.bold(C)),a&&(C=cw.default.italic(C)),n&&(C=cw.default.underline(C)),c&&(C=cw.default.strikethrough(C)),f&&(C=cw.default.inverse(C)),C);return sAt.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
`).slice(1):void 0,r=t?MCe.parseLine(t[0]):void 0,s,a=0;if(r?.file&&r?.line&&OCe.existsSync(r.file)){let n=OCe.readFileSync(r.file,"utf8");if(s=cAt.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Fs.default.createElement($p.default,{flexDirection:"column",padding:1},Fs.default.createElement($p.default,null,Fs.default.createElement(hA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Fs.default.createElement(hA.default,null," ",e.message)),r&&Fs.default.createElement($p.default,{marginTop:1},Fs.default.createElement(hA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Fs.default.createElement($p.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:c})=>Fs.default.createElement($p.default,{key:n},Fs.default.createElement($p.default,{width:a+1},Fs.default.createElement(hA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),Fs.default.createElement(hA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+c)))),e.stack&&Fs.default.createElement($p.default,{marginTop:1,flexDirection:"column"},e.stack.split(`
`).slice(1).map(n=>{let c=MCe.parseLine(n);return c?Fs.default.createElement($p.default,{key:n},Fs.default.createElement(hA.default,{dimColor:!0},"- "),Fs.default.createElement(hA.default,{dimColor:!0,bold:!0},c.function),Fs.default.createElement(hA.default,{dimColor:!0,color:"gray"}," ","(",c.file,":",c.line,":",c.column,")")):Fs.default.createElement($p.default,{key:n},Fs.default.createElement(hA.default,{dimColor:!0},"- "),Fs.default.createElement(hA.default,{dimColor:!0,bold:!0},n))})))};af.default=uAt});var HCe=G(lf=>{"use strict";var fAt=lf&&lf.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),AAt=lf&&lf.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pAt=lf&&lf.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&fAt(t,e,r);return AAt(t,e),t},_m=lf&&lf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0});var Um=pAt(gn()),_Ce=_m(eq()),hAt=_m(_q()),gAt=_m(jq()),dAt=_m(qq()),mAt=_m(Yq()),yAt=_m(vF()),EAt=_m(UCe()),IAt=" ",CAt="\x1B[Z",wAt="\x1B",DF=class extends Um.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=t=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),t){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=t=>{t===""&&this.props.exitOnCtrlC&&this.handleExit(),t===wAt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(t===IAt&&this.focusNext(),t===CAt&&this.focusPrevious())},this.handleExit=t=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(t)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=t=>{this.setState(r=>r.focusables.some(a=>a?.id===t)?{activeFocusId:t}:r)},this.focusNext=()=>{this.setState(t=>{var r;let s=(r=t.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(t)||s}})},this.focusPrevious=()=>{this.setState(t=>{var r;let s=(r=t.focusables[t.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(t)||s}})},this.addFocusable=(t,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=t),{activeFocusId:a,focusables:[...s.focusables,{id:t,isActive:!0}]}})},this.removeFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==t)}))},this.activateFocusable=t=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==t?s:{id:t,isActive:!0})}))},this.deactivateFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==t?s:{id:t,isActive:!1})}))},this.findNextFocusable=t=>{var r;let s=t.focusables.findIndex(a=>a.id===t.activeFocusId);for(let a=s+1;a<t.focusables.length;a++)if(!((r=t.focusables[a])===null||r===void 0)&&r.isActive)return t.focusables[a].id},this.findPreviousFocusable=t=>{var r;let s=t.focusables.findIndex(a=>a.id===t.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=t.focusables[a])===null||r===void 0)&&r.isActive)return t.focusables[a].id}}static getDerivedStateFromError(t){return{error:t}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Um.default.createElement(hAt.default.Provider,{value:{exit:this.handleExit}},Um.default.createElement(gAt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Um.default.createElement(dAt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Um.default.createElement(mAt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Um.default.createElement(yAt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Um.default.createElement(EAt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){_Ce.default.hide(this.props.stdout)}componentWillUnmount(){_Ce.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(t){this.handleExit(t)}};lf.default=DF;DF.displayName="InternalApp"});var qCe=G(cf=>{"use strict";var BAt=cf&&cf.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),vAt=cf&&cf.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),SAt=cf&&cf.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&BAt(t,e,r);return vAt(t,e),t},uf=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0});var DAt=uf(gn()),jCe=OEe(),bAt=uf(ZEe()),PAt=uf(K9()),xAt=uf(iIe()),kAt=uf(oIe()),$q=uf(ZIe()),QAt=uf(hCe()),RAt=uf($9()),TAt=uf(yCe()),FAt=SAt(kq()),NAt=uf(Mq()),OAt=uf(HCe()),uw=process.env.CI==="false"?!1:xAt.default,GCe=()=>{},eW=class{constructor(t){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=QAt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(uw){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(PAt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},kAt.default(this),this.options=t,this.rootNode=FAt.createNode("ink-root"),this.rootNode.onRender=t.debug?this.onRender:jCe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=bAt.default.create(t.stdout),this.throttledLog=t.debug?this.log:jCe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=$q.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=RAt.default(this.unmount,{alwaysLast:!1}),t.patchConsole&&this.patchConsole(),uw||(t.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{t.stdout.off("resize",this.onRender)})}render(t){let r=DAt.default.createElement(OAt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},t);$q.default.updateContainer(r,this.container,null,GCe)}writeToStdout(t){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(t+this.fullStaticOutput+this.lastOutput);return}if(uw){this.options.stdout.write(t);return}this.log.clear(),this.options.stdout.write(t),this.log(this.lastOutput)}}writeToStderr(t){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(t),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(uw){this.options.stderr.write(t);return}this.log.clear(),this.options.stderr.write(t),this.log(this.lastOutput)}}unmount(t){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),uw?this.options.stdout.write(this.lastOutput+`
`):this.options.debug||this.log.done(),this.isUnmounted=!0,$q.default.updateContainer(null,this.container,null,GCe),NAt.default.delete(this.options.stdout),t instanceof Error?this.rejectExitPromise(t):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((t,r)=>{this.resolveExitPromise=t,this.rejectExitPromise=r})),this.exitPromise}clear(){!uw&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=TAt.default((t,r)=>{t==="stdout"&&this.writeToStdout(r),t==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};cf.default=eW});var YCe=G(sD=>{"use strict";var WCe=sD&&sD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sD,"__esModule",{value:!0});var LAt=WCe(qCe()),bF=WCe(Mq()),MAt=Ie("stream"),UAt=(e,t)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},_At(t)),s=HAt(r.stdout,()=>new LAt.default(r));return s.render(e),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>bF.default.delete(r.stdout),clear:s.clear}};sD.default=UAt;var _At=(e={})=>e instanceof MAt.Stream?{stdout:e,stdin:process.stdin}:e,HAt=(e,t)=>{let r;return bF.default.has(e)?r=bF.default.get(e):(r=t(),bF.default.set(e,r)),r}});var JCe=G(eh=>{"use strict";var jAt=eh&&eh.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),GAt=eh&&eh.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qAt=eh&&eh.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&jAt(t,e,r);return GAt(t,e),t};Object.defineProperty(eh,"__esModule",{value:!0});var oD=qAt(gn()),VCe=e=>{let{items:t,children:r,style:s}=e,[a,n]=oD.useState(0),c=oD.useMemo(()=>t.slice(a),[t,a]);oD.useLayoutEffect(()=>{n(t.length)},[t.length]);let f=c.map((h,E)=>r(h,a+E)),p=oD.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return oD.default.createElement("ink-box",{internal_static:!0,style:p},f)};VCe.displayName="Static";eh.default=VCe});var zCe=G(aD=>{"use strict";var WAt=aD&&aD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aD,"__esModule",{value:!0});var YAt=WAt(gn()),KCe=({children:e,transform:t})=>e==null?null:YAt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:t},e);KCe.displayName="Transform";aD.default=KCe});var ZCe=G(lD=>{"use strict";var VAt=lD&&lD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lD,"__esModule",{value:!0});var JAt=VAt(gn()),XCe=({count:e=1})=>JAt.default.createElement("ink-text",null,`
`.repeat(e));XCe.displayName="Newline";lD.default=XCe});var twe=G(cD=>{"use strict";var $Ce=cD&&cD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cD,"__esModule",{value:!0});var KAt=$Ce(gn()),zAt=$Ce(SF()),ewe=()=>KAt.default.createElement(zAt.default,{flexGrow:1});ewe.displayName="Spacer";cD.default=ewe});var PF=G(uD=>{"use strict";var XAt=uD&&uD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uD,"__esModule",{value:!0});var ZAt=gn(),$At=XAt(jq()),ept=()=>ZAt.useContext($At.default);uD.default=ept});var nwe=G(fD=>{"use strict";var tpt=fD&&fD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fD,"__esModule",{value:!0});var rwe=gn(),rpt=tpt(PF()),npt=(e,t={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=rpt.default();rwe.useEffect(()=>{if(t.isActive!==!1)return s(!0),()=>{s(!1)}},[t.isActive,s]),rwe.useEffect(()=>{if(t.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f==="\x1B[A",downArrow:f==="\x1B[B",leftArrow:f==="\x1B[D",rightArrow:f==="\x1B[C",pageDown:f==="\x1B[6~",pageUp:f==="\x1B[5~",return:f==="\r",escape:f==="\x1B",ctrl:!1,shift:!1,tab:f===" "||f==="\x1B[Z",backspace:f==="\b",delete:f==="\x7F"||f==="\x1B[3~",meta:!1};f<=""&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith("\x1B")&&(f=f.slice(1),p.meta=!0);let h=f>="A"&&f<="Z",E=f>="\u0410"&&f<="\u042F";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=""),(!(f==="c"&&p.ctrl)||!a)&&e(f,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[t.isActive,r,a,e])};fD.default=npt});var iwe=G(AD=>{"use strict";var ipt=AD&&AD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(AD,"__esModule",{value:!0});var spt=gn(),opt=ipt(_q()),apt=()=>spt.useContext(opt.default);AD.default=apt});var swe=G(pD=>{"use strict";var lpt=pD&&pD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pD,"__esModule",{value:!0});var cpt=gn(),upt=lpt(qq()),fpt=()=>cpt.useContext(upt.default);pD.default=fpt});var owe=G(hD=>{"use strict";var Apt=hD&&hD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hD,"__esModule",{value:!0});var ppt=gn(),hpt=Apt(Yq()),gpt=()=>ppt.useContext(hpt.default);hD.default=gpt});var lwe=G(dD=>{"use strict";var awe=dD&&dD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dD,"__esModule",{value:!0});var gD=gn(),dpt=awe(vF()),mpt=awe(PF()),ypt=({isActive:e=!0,autoFocus:t=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=mpt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=gD.useContext(dpt.default),C=gD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return gD.useEffect(()=>(c(C,{autoFocus:t}),()=>{f(C)}),[C,t]),gD.useEffect(()=>{e?p(C):h(C)},[e,C]),gD.useEffect(()=>{if(!(!s||!e))return a(!0),()=>{a(!1)}},[e]),{isFocused:!!C&&n===C,focus:E}};dD.default=ypt});var cwe=G(mD=>{"use strict";var Ept=mD&&mD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mD,"__esModule",{value:!0});var Ipt=gn(),Cpt=Ept(vF()),wpt=()=>{let e=Ipt.useContext(Cpt.default);return{enableFocus:e.enableFocus,disableFocus:e.disableFocus,focusNext:e.focusNext,focusPrevious:e.focusPrevious,focus:e.focus}};mD.default=wpt});var uwe=G(tW=>{"use strict";Object.defineProperty(tW,"__esModule",{value:!0});tW.default=e=>{var t,r,s,a;return{width:(r=(t=e.yogaNode)===null||t===void 0?void 0:t.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=e.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var qc=G(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var Bpt=YCe();Object.defineProperty(wo,"render",{enumerable:!0,get:function(){return Bpt.default}});var vpt=SF();Object.defineProperty(wo,"Box",{enumerable:!0,get:function(){return vpt.default}});var Spt=Zq();Object.defineProperty(wo,"Text",{enumerable:!0,get:function(){return Spt.default}});var Dpt=JCe();Object.defineProperty(wo,"Static",{enumerable:!0,get:function(){return Dpt.default}});var bpt=zCe();Object.defineProperty(wo,"Transform",{enumerable:!0,get:function(){return bpt.default}});var Ppt=ZCe();Object.defineProperty(wo,"Newline",{enumerable:!0,get:function(){return Ppt.default}});var xpt=twe();Object.defineProperty(wo,"Spacer",{enumerable:!0,get:function(){return xpt.default}});var kpt=nwe();Object.defineProperty(wo,"useInput",{enumerable:!0,get:function(){return kpt.default}});var Qpt=iwe();Object.defineProperty(wo,"useApp",{enumerable:!0,get:function(){return Qpt.default}});var Rpt=PF();Object.defineProperty(wo,"useStdin",{enumerable:!0,get:function(){return Rpt.default}});var Tpt=swe();Object.defineProperty(wo,"useStdout",{enumerable:!0,get:function(){return Tpt.default}});var Fpt=owe();Object.defineProperty(wo,"useStderr",{enumerable:!0,get:function(){ Line truncated
`:"";return c?C+=`@IF EXIST ${c} (\r
${c} ${p} ${a} ${E}%*\r
) ELSE (\r
@SETLOCAL\r
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
${f} ${p} ${a} ${E}%*\r
)\r
`:C+=`@${f} ${p} ${a} ${E}%*\r
`,C}function $ht(e,t,r){let s=Vc.relative(Vc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let c=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",p=VW(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,s=c):(a=c,f="",s="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
case \`uname\` in
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
esac
`,C=r.nodePath?`export NODE_PATH="${p}"
`:"";return n?E+=`${C}if [ -x ${n} ]; then
exec ${n} ${f} ${s} ${h}"$@"
else
exec ${a} ${f} ${s} ${h}"$@"
fi
`:E+=`${C}${a} ${f} ${s} ${h}"$@"
exit $?
`,E}function e0t(e,t,r){let s=Vc.relative(Vc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,c;s=s.split("\\").join("/");let f=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,p=r.args||"",h=VW(r.nodePath),E=h.win32,C=h.posix;n?(c=`"$basedir/${r.prog}$exe"`,s=f):(n=f,p="",s="");let S=r.progArgs?`${r.progArgs.join(" ")} `:"",x=`#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
${r.nodePath?`$env_node_path=$env:NODE_PATH
$env:NODE_PATH="${E}"
`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}`;return r.nodePath&&(x+=` else {
$env:NODE_PATH="${C}"
}`),c?x+=`
$ret=0
if (Test-Path ${c}) {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${c} ${p} ${s} ${S}$args
} else {
& ${c} ${p} ${s} ${S}$args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${s} ${S}$args
} else {
& ${n} ${p} ${s} ${S}$args
}
$ret=$LASTEXITCODE
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $ret
`:x+=`
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${s} ${S}$args
} else {
& ${n} ${p} ${s} ${S}$args
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $LASTEXITCODE
`,x}function t0t(e,t){return t.fs_.chmod(e,493)}function VW(e){if(!e)return{win32:"",posix:""};let t=typeof e=="string"?e.split(Vc.delimiter):Array.from(e),r={};for(let s=0;s<t.length;s++){let a=t[s].split("/").join("\\"),n=w1e()?t[s].split("\\").join("/").replace(/^([^:\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):t[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}v1e.exports=YW});var lY=G((KZt,q1e)=>{q1e.exports=Ie("stream")});var J1e=G((zZt,V1e)=>{"use strict";function W1e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,s)}return r}function L0t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W1e(Object(r),!0).forEach(function(s){M0t(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W1e(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function M0t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U0t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y1e(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function _0t(e,t,r){return t&&Y1e(e.prototype,t),r&&Y1e(e,r),e}var H0t=Ie("buffer"),ZF=H0t.Buffer,j0t=Ie("util"),cY=j0t.inspect,G0t=cY&&cY.custom||"inspect";function q0t(e,t,r){ZF.prototype.copy.call(e,t,r)}V1e.exports=function(){function e(){U0t(this,e),this.head=null,this.tail=null,this.length=0}return _0t(e,[{key:"push",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,a=""+s.data;s=s.next;)a+=r+s.data;return a}},{key:"concat",value:function(r){if(this.length===0)return ZF.alloc(0);for(var s=ZF.allocUnsafe(r>>>0),a=this.head,n=0;a;)q0t(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:"consume",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var s=ZF.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:G0t,value:function(r,s){return cY(this,L0t({},s,{depth:0,customInspect:!1}))}}]),e}()});var fY=G((XZt,z1e)=>{"use strict";function W0t(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(uY,this,e)):process.nextTick(uY,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(n){!t&&n?r._writableState?r._writableState.errorEmitted?process.nextTick($F,r):(r._writableState.errorEmitted=!0,process.nextTick(K1e,r,n)):process.nextTick(K1e,r,n):t?(process.nextTick($F,r),t(n)):process.nextTick($F,r)}),this)}function K1e(e,t){uY(e,t),$F(e)}function $F(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Y0t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function uY(e,t){e.emit("error",t)}function V0t(e,t){var r=e._readableState,s=e._writableState;r&& Line truncated
`)),e.linkname&&(t+=UY(" linkpath="+e.linkname+`
`));var r=e.pax;if(r)for(var s in r)t+=UY(" "+s+"="+r[s]+`
`);return Buffer.from(t)};Qw.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var s=parseInt(e.slice(0,r).toString(),10);if(!s)return t;var a=e.slice(r+1,s-1).toString(),n=a.indexOf("=");if(n===-1)return t;t[a.slice(0,n)]=a.slice(n+1),e=e.slice(s)}return t};Qw.encode=function(e){var t=Udt(512),r=e.name,s="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;s+=s?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(Ag(e.mode&Wdt,6),100),t.write(Ag(e.uid,6),108),t.write(Ag(e.gid,6),116),t.write(Ag(e.size,11),124),t.write(Ag(e.mtime.getTime()/1e3|0,11),136),t[156]=z2e+Jdt(e.type),e.linkname&&t.write(e.linkname,157),X2e.copy(t,ab),jdt.copy(t,_Y),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(Ag(e.devmajor||0,6),329),t.write(Ag(e.devminor||0,6),337),s&&t.write(s,345),t.write(Ag($2e(t),6),148),t)};Qw.decode=function(e,t,r){var s=e[156]===0?0:e[156]-z2e,a=kw(e,0,100,t),n=pg(e,100,8),c=pg(e,108,8),f=pg(e,116,8),p=pg(e,124,12),h=pg(e,136,12),E=Vdt(s),C=e[157]===0?null:kw(e,157,100,t),S=kw(e,265,32),x=kw(e,297,32),I=pg(e,329,8),T=pg(e,337,8),O=$2e(e);if(O===8*32)return null;if(O!==pg(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(X2e.compare(e,ab,ab+6)===0)e[345]&&(a=kw(e,345,155,t)+"/"+a);else if(!(Gdt.compare(e,ab,ab+6)===0&&qdt.compare(e,_Y,_Y+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&a&&a[a.length-1]==="/"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:x,devmajor:I,devminor:T}}});var oBe=G((m$t,sBe)=>{var tBe=Ie("util"),zdt=K2e(),lb=HY(),rBe=xw().Writable,nBe=xw().PassThrough,iBe=function(){},eBe=function(e){return e&=511,e&&512-e},Xdt=function(e,t){var r=new hN(e,t);return r.end(),r},Zdt=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},hN=function(e,t){this._parent=e,this.offset=t,nBe.call(this,{autoDestroy:!1})};tBe.inherits(hN,nBe);hN.prototype.destroy=function(e){this._parent.destroy(e)};var lh=function(e){if(!(this instanceof lh))return new lh(e);rBe.call(this,e),e=e||{},this._offset=0,this._buffer=zdt(),this._missing=0,this._partial=!1,this._onparse=iBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,s=function(){t._continue()},a=function(S){if(t._locked=!1,S)return t.destroy(S);t._stream||s()},n=function(){t._stream=null;var S=eBe(t._header.size);S?t._parse(S,c):t._parse(512,C),t._locked||s()},c=function(){t._buffer.consume(eBe(t._header.size)),t._parse(512,C),s()},f=function(){var S=t._header.size;t._paxGlobal=lb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=t._header.size;t._pax=lb.decodePax(r.slice(0,S)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(S),n()},h=function(){var S=t._header.size;this._gnuLongPath=lb.decodeLongPath(r.slice(0,S),e.filenameEncoding),r.consume(S),n()},E=function(){var S=t._header.size;this._gnuLongLinkPath=lb.decodeLongPath(r.slice(0,S),e.filenameEncoding),r.consume(S),n()},C=function(){var S=t._offset,x;try{x=t._header=lb.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(I){t.emit("error",I)}if(r.consume(512),!x){t._parse(512,C),s();return}if(x.type==="gnu-long-path"){t._parse(x.size,h),s();return}if(x.type==="gnu-long-link-path"){t._parse(x.size,E),s();return}if(x.type==="pax-global-header"){t._parse(x.size,f),s();return}if(x.type==="pax-header"){t._parse(x.size,p),s();return}if(t._gnuLongPath&&(x.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(x.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=x=Zdt(x,t._pax),t._pax=null),t._locked=!0,!x.size||x.type==="directory"){t._parse(512,C),t.emit("entry",x,Xdt(t,S),a);return}t._stream=new hN(t,S),t.emit("entry",x,t._stream,a),t._parse(x.size,n),s()};this._onheader=C,this._parse(512,C)};tBe.inherits(lh,rBe);lh.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};lh.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};lh.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=iBe,this._overflow?this._write(this._overflow,void 0,e):e()}};lh.prototype._write=function(e,t,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(e.length&&(this._partial=!0),e.length<n)return this._missing-=e.length,this._overflow=null,s?s.write(e,r):(a.append(e), Line truncated
Wanted: ${this.expectedSize}
Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${t}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=t,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#t=this.size,this.emit("size",this.size),this.#e=t,this.emit("integrity",t),r&&(this.#s=r,this.emit("verified",r))}},fh=class{get isHash(){return!0}constructor(t,r){let s=r?.strict;this.source=t.trim(),this.digest="",this.algorithm="",this.options=[];let a=this.source.match(s?kmt:xmt);if(!a||s&&!iV.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(t,r){let s=sc(t,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(t){return t?.strict&&!(iV.includes(this.algorithm)&&this.digest.match(Pmt)&&this.options.every(r=>r.match(Qmt)))?"":`${this.algorithm}-${this.digest}${mb(this.options)}`}};function PBe(e,t,r,s){let a=e!=="",n=!1,c="",f=s.length-1;for(let h=0;h<f;h++){let E=fh.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=t)}let p=fh.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?e+t+c:e+c}var ey=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(t){let r=t?.sep||" ",s="";if(t?.strict){r=r.replace(/\S+/g," ");for(let a of iV)this[a]&&(s=PBe(s,r,t,this[a]))}else for(let a of Object.keys(this))s=PBe(s,r,t,this[a]);return s}concat(t,r){let s=typeof t=="string"?t:gb(t,r);return sc(`${this.toString(r)} ${s}`,r)}hexDigest(){return sc(this,{single:!0}).hexDigest()}merge(t,r){let s=sc(t,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[a]=s[a]}match(t,r){let s=sc(t,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(t,r){let s=t?.pickAlgorithm||Umt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};wA.exports.parse=sc;function sc(e,t){if(!e)return null;if(typeof e=="string")return nV(e,t);if(e.algorithm&&e.digest){let r=new ey;return r[e.algorithm]=[e],nV(gb(r,t),t)}else return nV(gb(e,t),t)}function nV(e,t){if(t?.single)return new fh(e,t);let r=e.trim().split(/\s+/).reduce((s,a)=>{let n=new fh(a,t);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new ey);return r.isEmpty()?null:r}wA.exports.stringify=gb;function gb(e,t){return e.algorithm&&e.digest?fh.prototype.toString.call(e,t):typeof e=="string"?gb(sc(e,t),t):ey.prototype.toString.call(e,t)}wA.exports.fromHex=Rmt;function Rmt(e,t,r){let s=mb(r?.options);return sc(`${t}-${Buffer.from(e,"hex").toString("base64")}${s}`,r)}wA.exports.fromData=Tmt;function Tmt(e,t){let r=t?.algorithms||[...oV],s=mb(t?.options);return r.reduce((a,n)=>{let c=db.createHash(n).update(e).digest("base64"),f=new fh(`${n}-${c}${s}`,t);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new ey)}wA.exports.fromStream=Fmt;function Fmt(e,t){let r=aV(t);return new Promise((s,a)=>{e.pipe(r),e.on("error",a),r.on("error",a);let n;r.on("integrity",c=>{n=c}),r.on("end",()=>s(n)),r.resume()})}wA.exports.checkData=Nmt;function Nmt(e,t,r){if(t=sc(t,r),!t||!Object.keys(t).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=t.pickAlgorithm(r),a=db.createHash(s).update(e).digest("base64"),n=sc({algorithm:s,digest:a}),c=n.match(t,r);if(r=r||{},c||!r.error)return c;if(typeof r.size=="number"&&e.length!==r.size){let f=new Error(`data size mismatch when checking ${t}.
Wanted: ${r.size}
Found: ${e.length}`);throw f.code="EBADSIZE",f.found=e.length,f.expected=r.size,f.sri=t,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${t}, but got ${n}. (${e.length} bytes)`);throw f.code="EINTEGRITY",f.found=n,f.expected=t,f.algorithm=s,f.sri=t,f}}wA.exports.checkStream=Omt;function Omt(e,t,r){if(r=r||Object.create(null),r.integrity=t,t=sc(t,r),!t||!Object.keys(t).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=aV(r);return new Promise((a,n)=>{e.pipe(s),e.on("error",n),s.on("error",n);let c;s.on("verified",f=>{c=f}),s.on("end",()=>a(c)),s.resume()})}wA.exports.integrityStream=aV;function aV(e=Object.create(null)){return new sV(e)}wA.exports.create=Lmt;function Lmt(e){let t=e?.algorithms||[...oV],r=mb(e?.options),s=t.map(db.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return t.reduce((n,c)=>{let f=s.shift().digest("base64"),p=new fh(`${c}-${f}${r}`,e);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new ey)}}}var Mmt=db.getHashes(),xBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(e=>Mmt.includes(e));function Umt(e,t){return xBe.indexOf(e.toLowerCase())>=xBe.indexOf(t.toLowerCase())?e:t}});var lV=G(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});gg.Signature=gg.Envelope=void 0;gg.Envelope={fromJSON(e){return{payload:PN(e.payload)?Buffer.from(QBe(e.payload)):Buffer.alloc(0),payloadType:PN(e.payloadType)?globalThis.String(e.payloadType):"",signatures:globalThis.Array.isArray(e?.signatures)?e.signatures.map(t=>gg.Signature.fromJSON(t)):[]}},toJSON(e){let t={};return e.payload.length!==0&&(t.payload=RBe(e.payload)),e.payloadType!==""&&(t.payloadType=e.payloadType),e.signatures?.length&&(t.signatures=e.signatures.map(r=>gg.Signature.toJSON(r))),t}};gg.Signature={fromJSON(e){return{sig:PN(e.sig)?Buffer.from(QBe(e.sig)):Buffer.alloc(0),keyid:PN(e.keyid)?globalThis.String(e.keyid):""}},toJSON(e){let t={};return e.sig.length!==0&&(t.sig=RBe(e.sig)),e.keyid!==""&&(t.keyid=e.keyid),t}};function QBe(e){return Uint8Array.from(globalThis.Buffer.from(e,"base64"))}function RBe(e){return globalThis.Buffer.from(e).toString("base64")}function PN(e){return e!=null}});var FBe=G(xN=>{"use strict";Object.defineProperty(xN,"__esModule",{value:!0});xN.Timestamp=void 0;xN.Timestamp={fromJSON(e){return{seconds:TBe(e.seconds)?globalThis.String(e.seconds):"0",nanos:TBe(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!=="0"&&(t.seconds=e.seconds),e.nanos!==0&&(t.nanos=Math.round(e.nanos)),t}};function TBe(e){return e!=null}});var Lw=G(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.TimeRange=Ur.X509CertificateChain=Ur.SubjectAlternativeName=Ur.X509Certificate=Ur.DistinguishedName=Ur.ObjectIdentifierValuePair=Ur.ObjectIdentifier=Ur.PublicKeyIdentifier=Ur.PublicKey=Ur.RFC3161SignedTimestamp=Ur.LogId=Ur.MessageSignature=Ur.HashOutput=Ur.SubjectAlternativeNameType=Ur.PublicKeyDetails=Ur.HashAlgorithm=void 0;Ur.hashAlgorithmFromJSON=OBe;Ur.hashAlgorithmToJSON=LBe;Ur.publicKeyDetailsFromJSON=MBe;Ur.publicKeyDetailsToJSON=UBe;Ur.subjectAlternativeNameTypeFromJSON=_Be;Ur.subjectAlternativeNameTypeToJSON=HBe;var _mt=FBe(),Sl;(function(e){e[e.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",e[e.SHA2_256=1]="SHA2_256",e[e.SHA2_384=2]="SHA2_384",e[e.SHA2_512=3]="SHA2_512",e[e.SHA3_256=4]="SHA3_256",e[e.SHA3_384=5]="SHA3_384"})(Sl||(Ur.HashAlgorithm=Sl={}));function OBe(e){switch(e){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return Sl.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return Sl.SHA2_256;case 2:case"SHA2_384":return Sl.SHA2_384;case 3:case"SHA2_512":return Sl.SHA2_512;case 4:case"SHA3_256":return Sl.SHA3_256;case 5:case"SHA3_384":return Sl.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+e+" for enum HashAlgorithm")}}function LBe(e){switch(e){case Sl.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case Sl.SHA2_256:return"SHA2_256";case Sl.SHA2_384:return"SHA2_384";case Sl.SHA2_512:return"SHA2_512";case Sl.SHA3_256:return"SHA3_256";case Sl.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+e+" for enum HashAlgorithm")}}var sn;(function(e){e[e.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",e[e.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",e[e.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",e[e.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",e[e.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",e[e.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",e[e.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",e[e.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",e[e.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",e[e.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",e[e.PKIX_RS Line truncated
`).forEach(r=>{r.match(Ryt)||r.match(Tyt)||(t+=r)}),Buffer.from(t,"base64")}function Nyt(e,t="CERTIFICATE"){let s=e.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${t}-----`,...s,`-----END ${t}-----`].join(`
`).concat(`
`)}});var XN=G(jw=>{"use strict";Object.defineProperty(jw,"__esModule",{value:!0});jw.SHA2_HASH_ALGOS=jw.ECDSA_SIGNATURE_ALGOS=void 0;jw.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};jw.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var bV=G(ZN=>{"use strict";Object.defineProperty(ZN,"__esModule",{value:!0});ZN.RFC3161TimestampVerificationError=void 0;var DV=class extends Error{};ZN.RFC3161TimestampVerificationError=DV});var mve=G(DA=>{"use strict";var Oyt=DA&&DA.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,a)}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),Lyt=DA&&DA.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Myt=DA&&DA.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Oyt(t,e,r);return Lyt(t,e),t};Object.defineProperty(DA,"__esModule",{value:!0});DA.TSTInfo=void 0;var dve=Myt(Hw()),Uyt=XN(),_yt=bV(),PV=class{constructor(t){this.root=t}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let t=this.messageImprintObj.subs[0].subs[0].toOID();return Uyt.SHA2_HASH_ALGOS[t]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(t){let r=dve.digest(this.messageImprintHashAlgorithm,t);if(!dve.bufferEqual(r,this.messageImprintHashedMessage))throw new _yt.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};DA.TSTInfo=PV});var Eve=G(bA=>{"use strict";var Hyt=bA&&bA.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,a)}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),jyt=bA&&bA.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gyt=bA&&bA.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Hyt(t,e,r);return jyt(t,e),t};Object.defineProperty(bA,"__esModule",{value:!0});bA.RFC3161Timestamp=void 0;var qyt=JN(),xV=Gyt(Hw()),yve=XN(),Bb=bV(),Wyt=mve(),Yyt="1.2.840.113549.1.7.2",Vyt="1.2.840.113549.1.9.16.1.4",Jyt="1.2.840.113549.1.9.4",kV=class e{constructor(t){this.root=t}static parse(t){let r=qyt.ASN1Obj.parseBuffer(t);return new e(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let t=this.signerDigestAlgorithmObj.subs[0].toOID();return yve.SHA2_HASH_ALGOS[t]}get signatureAlgorithm(){let t=this.signatureAlgorithmObj.subs[0].toOID();return yve.ECDSA_SIGNATURE_ALGOS[t]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new Wyt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(t,r){if(!this.timeStampTokenObj)throw new Bb.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==Yyt)throw new Bb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==Vyt)throw new Bb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(t),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let t=xV.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!xV.bufferEqual(t,r))throw new Bb.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(t){let r=this.signedAttrsObj.toDER();if(r[0]=49,!xV.verify(r,t,this.signatureValue,this.signatureAlgorithm))throw new Bb.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let t=this.signedDataObj;return t.subs[t.subs.length-1]}get sig Line truncated
globstar while`,t,S,r,x,I),this.matchOne(t.slice(S),r.slice(x),s))return this.debug("globstar found match!",S,p,I),!0;if(I==="."||I===".."||!a.dot&&I.charAt(0)==="."){this.debug("dot detected!",t,S,r,x);break}this.debug("globstar swallow a segment, and continue"),S++}return!!(s&&(this.debug(`
>>> no match, partial?`,t,S,r,x),S===p))}let T;if(typeof E=="string"?(T=C===E,this.debug("string match",E,C,T)):(T=E.test(C),this.debug("pattern match",E,C,T)),!T)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&t[c]==="";throw new Error("wtf?")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(t){(0,xO.assertValidPattern)(t);let r=this.options;if(t==="**")return pr.GLOBSTAR;if(t==="")return"";let s,a=null;(s=t.match(pwt))?a=r.dot?gwt:hwt:(s=t.match(nwt))?a=(r.nocase?r.dot?awt:owt:r.dot?swt:iwt)(s[1]):(s=t.match(dwt))?a=(r.nocase?r.dot?ywt:mwt:r.dot?Ewt:Iwt)(s):(s=t.match(lwt))?a=r.dot?uwt:cwt:(s=t.match(fwt))&&(a=Awt);let n=fDe.AST.fromGlob(t,this.options).toMMPattern();return a&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?wwt:r.dot?Bwt:vwt,a=new Set(r.nocase?["i"]:[]),n=t.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(""))a.add(C);return typeof E=="string"?kwt(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],x=h[C-1];E!==pr.GLOBSTAR||x===pr.GLOBSTAR||(x===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]="(?:\\/|"+s+"\\/)?"+S:h[C]=s:S===void 0?h[C-1]=x+"(?:\\/|"+s+")?":S!==pr.GLOBSTAR&&(h[C-1]=x+"(?:\\/|\\/"+s+"\\/)"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join("/")}).join("|"),[c,f]=t.length>1?["(?:",")"]:["",""];n="^"+c+n+f+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let a=this.slashSplit(t);this.debug(this.pattern,"split",a);let n=this.set;this.debug(this.pattern,"set",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return pr.minimatch.defaults(t).Minimatch}};pr.Minimatch=fy;var Qwt=x7();Object.defineProperty(pr,"AST",{enumerable:!0,get:function(){return Qwt.AST}});var Rwt=k7();Object.defineProperty(pr,"escape",{enumerable:!0,get:function(){return Rwt.escape}});var Twt=vO();Object.defineProperty(pr,"unescape",{enumerable:!0,get:function(){return Twt.unescape}});pr.minimatch.AST=fDe.AST;pr.minimatch.Minimatch=fy;pr.minimatch.escape=ewt.escape;pr.minimatch.unescape=twt.unescape});var T7=G(ru=>{"use strict";var dDe=ru&&ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});ru.SuccinctRoles=ru.DelegatedRole=ru.Role=ru.TOP_LEVEL_ROLE_NAMES=void 0;var mDe=dDe(Ie("crypto")),Fwt=gDe(),kO=dDe(Ie("util")),QO=kA(),Ay=hf();ru.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var Mb=class e{constructor(t){let{keyIDs:r,threshold:s,unrecognizedFields:a}=t;if(Nwt(r))throw new QO.ValueError("duplicate key IDs found");if(s<1)throw new QO.ValueError("threshold must be at least 1");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(t){return t instanceof e?this.threshold===t.threshold&&kO.default.isDeepStrictEqual(this.keyIDs,t.keyIDs)&&kO.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(t){let{keyids:r,threshold:s,...a}=t;if(!Ay.guard.isStringArray(r))throw new TypeError("keyids must be an array");if(typeof s!="number")throw new TypeError("threshold must be a number");return new e({keyIDs:r,threshold:s,unrecognizedFields:a})}};ru.Role=Mb;function Nwt(e){return new Set(e).size!==e.length}var Q7=class e extends Mb{constructor(t){super(t);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=t;if(this.name=r,this.terminating=s,t.paths&&t.pathHashPrefixes)throw new QO.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=a,this.pathHashPrefixes=n}equals(t){return t instanceof e?super.equals(t)&&this.name===t.name&&this.terminating===t.terminating&&kO.default.isDeepStrictEqual(this.paths,t.paths)&&kO.default.isDeepStrictEqual(this.pathHashPrefixes,t.pathHashPrefixes):!1}isDelegatedPath(t){if(this.paths)return this.paths.some(r=>Lwt(t,r));if(this.pathHashPrefixes){let s=mDe.default.createHash("sha256").update(t).digest("hex");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let t={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(t.paths=this.paths),this.pathHashPrefixes&&(t.path_hash_prefixes=this.pathHashPrefixes),t}static fro Line truncated
`).join(`
`+n),e.push(a+"m+"+GO.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=U1t()+t+" "+e[0]}function U1t(){return io.inspectOpts.hideDate?"":new Date().toISOString()+" "}function _1t(...e){return process.stderr.write(jO.formatWithOptions(io.inspectOpts,...e)+`
`)}function H1t(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function j1t(){return process.env.DEBUG}function G1t(e){e.inspectOpts={};let t=Object.keys(io.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=io.inspectOpts[t[r]]}GO.exports=$7()(io);var{formatters:RDe}=GO.exports;RDe.o=function(e){return this.inspectOpts.colors=this.useColors,jO.inspect(e,this.inspectOpts).split(`
`).map(t=>t.trim()).join(" ")};RDe.O=function(e){return this.inspectOpts.colors=this.useColors,jO.inspect(e,this.inspectOpts)}});var tJ=G((Ltr,eJ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?eJ.exports=QDe():eJ.exports=TDe()});var WO=G(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.DownloadHTTPError=Ki.DownloadLengthMismatchError=Ki.DownloadError=Ki.ExpiredMetadataError=Ki.EqualVersionError=Ki.BadVersionError=Ki.RepositoryError=Ki.PersistError=Ki.RuntimeError=Ki.ValueError=void 0;var rJ=class extends Error{};Ki.ValueError=rJ;var nJ=class extends Error{};Ki.RuntimeError=nJ;var iJ=class extends Error{};Ki.PersistError=iJ;var _b=class extends Error{};Ki.RepositoryError=_b;var qO=class extends _b{};Ki.BadVersionError=qO;var sJ=class extends qO{};Ki.EqualVersionError=sJ;var oJ=class extends _b{};Ki.ExpiredMetadataError=oJ;var Hb=class extends Error{};Ki.DownloadError=Hb;var aJ=class extends Hb{};Ki.DownloadLengthMismatchError=aJ;var lJ=class extends Hb{constructor(t,r){super(t),this.statusCode=r}};Ki.DownloadHTTPError=lJ});var NDe=G(l1=>{"use strict";var uJ=l1&&l1.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l1,"__esModule",{value:!0});l1.withTempFile=void 0;var cJ=uJ(Ie("fs/promises")),q1t=uJ(Ie("os")),FDe=uJ(Ie("path")),W1t=async e=>Y1t(async t=>e(FDe.default.join(t,"tempfile")));l1.withTempFile=W1t;var Y1t=async e=>{let t=await cJ.default.realpath(q1t.default.tmpdir()),r=await cJ.default.mkdtemp(t+FDe.default.sep);try{return await e(r)}finally{await cJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var AJ=G(Pg=>{"use strict";var VO=Pg&&Pg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pg,"__esModule",{value:!0});Pg.DefaultFetcher=Pg.BaseFetcher=void 0;var V1t=VO(tJ()),ODe=VO(Ie("fs")),J1t=VO(oO()),K1t=VO(Ie("util")),LDe=WO(),z1t=NDe(),X1t=(0,V1t.default)("tuf:fetch"),YO=class{async downloadFile(t,r,s){return(0,z1t.withTempFile)(async a=>{let n=await this.fetch(t),c=0,f=ODe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new LDe.DownloadLengthMismatchError("Max length reached");await Z1t(f,h)}}finally{await K1t.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(t,r){return this.downloadFile(t,r,async s=>{let a=ODe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};Pg.BaseFetcher=YO;var fJ=class extends YO{constructor(t={}){super(),this.timeout=t.timeout,this.retry=t.retry}async fetch(t){X1t("GET %s",t);let r=await(0,J1t.default)(t,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new LDe.DownloadHTTPError("Failed to download",r.status);return r.body}};Pg.DefaultFetcher=fJ;var Z1t=async(e,t)=>new Promise((r,s)=>{e.write(t,a=>{a&&s(a),r(!0)})})});var MDe=G(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:!0});JO.defaultConfig=void 0;JO.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var UDe=G(KO=>{"use strict";Object.defineProperty(KO,"__esModule",{value:!0});KO.TrustedMetadataStore=void 0;var ws=UO(),Hi=WO(),pJ=class{constructor(t){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(t)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(t){return this.trustedSet[t]}updateRoot(t){let r=JSON.parse(t.toString("utf8")),s=ws.Metadata.fromJSON(ws.MetadataKind.Root,r);if(s.signed.type!=ws.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(ws.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(ws.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(t){if(this.snapshot)throw new Hi.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError("Final root.json is expired");let r=JSON.parse(t.toString("utf8")),s=ws.Metadata.fromJSON(ws.MetadataKind.Timestamp,r);if(s.signed.type!=ws.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(ws.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Hi.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Hi.EqualVersionError(`New timestamp version ${s.sLine truncated
`,oBt=/\u2014 (\S+) (\S+)\n/g;function aBt(e,t){let r=(0,sBt.filterTLogAuthorities)(t,{targetDate:new Date(Number(e.integratedTime)*1e3)}),s=e.inclusionProof,a=NJ.fromString(s.checkpoint.envelope),n=OJ.fromString(a.note);if(!lBt(a,r))throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!FJ.crypto.bufferEqual(n.logHash,s.rootHash))throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}function lBt(e,t){let r=Buffer.from(e.note,"utf-8");return e.signatures.every(s=>{let a=t.find(n=>FJ.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?FJ.crypto.verify(r,a.publicKey,s.signature):!1})}var NJ=class e{constructor(t,r){this.note=t,this.signatures=r}static fromString(t){if(!t.includes(TJ))throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=t.indexOf(TJ),s=t.slice(0,r+1),n=t.slice(r+TJ.length).matchAll(oBt),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,"base64");if(E.length<5)throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new e(s,c)}},OJ=class e{constructor(t,r,s,a){this.origin=t,this.logSize=r,this.logHash=s,this.rest=a}static fromString(t){let r=t.trimEnd().split(`
`);if(r.length<3)throw new A1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],"base64"),c=r.slice(3);return new e(s,a,n,c)}}});var lbe=G(HJ=>{"use strict";Object.defineProperty(HJ,"__esModule",{value:!0});HJ.verifyMerkleInclusion=fBt;var _J=Pl(),MJ=So(),cBt=Buffer.from([0]),uBt=Buffer.from([1]);function fBt(e){let t=e.inclusionProof,r=BigInt(t.logIndex),s=BigInt(t.treeSize);if(r<0n||r>=s)throw new MJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${r}`});let{inner:a,border:n}=ABt(r,s);if(t.hashes.length!==a+n)throw new MJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=t.hashes.slice(0,a),f=t.hashes.slice(a),p=yBt(e.canonicalizedBody),h=hBt(pBt(p,c,r),f);if(!_J.crypto.bufferEqual(h,t.rootHash))throw new MJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function ABt(e,t){let r=gBt(e,t),s=dBt(e>>BigInt(r));return{inner:r,border:s}}function pBt(e,t,r){return t.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?UJ(a,s):UJ(s,a),e)}function hBt(e,t){return t.reduce((r,s)=>UJ(s,r),e)}function gBt(e,t){return mBt(e^t-BigInt(1))}function dBt(e){return e.toString(2).split("1").length-1}function mBt(e){return e===0n?0:e.toString(2).length}function UJ(e,t){return _J.crypto.digest("sha256",uBt,e,t)}function yBt(e){return _J.crypto.digest("sha256",cBt,e)}});var ube=G(jJ=>{"use strict";Object.defineProperty(jJ,"__esModule",{value:!0});jJ.verifyTLogSET=CBt;var cbe=Pl(),EBt=So(),IBt=dy();function CBt(e,t){if(!(0,IBt.filterTLogAuthorities)(t,{logID:e.logId.keyId,targetDate:new Date(Number(e.integratedTime)*1e3)}).some(a=>{let n=wBt(e),c=Buffer.from(cbe.json.canonicalize(n),"utf8"),f=e.inclusionPromise.signedEntryTimestamp;return cbe.crypto.verify(c,a.publicKey,f)}))throw new EBt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function wBt(e){let{integratedTime:t,logIndex:r,logId:s,canonicalizedBody:a}=e;return{body:a.toString("base64"),integratedTime:Number(t),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var fbe=G(WJ=>{"use strict";Object.defineProperty(WJ,"__esModule",{value:!0});WJ.verifyRFC3161Timestamp=SBt;var GJ=Pl(),qJ=So(),BBt=QJ(),vBt=dy();function SBt(e,t,r){let s=e.signingTime;if(r=(0,vBt.filterCertAuthorities)(r,{start:s,end:s}),r=bBt(r,{serialNumber:e.signerSerialNumber,issuer:e.signerIssuer}),!r.some(n=>{try{return DBt(e,t,n),!0}catch{return!1}}))throw new qJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}function DBt(e,t,r){let[s,...a]=r.certChain,n=GJ.crypto.createPublicKey(s.publicKey),c=e.signingTime;try{new BBt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new qJ.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new qJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp was signed with an expired certificate"});e.verify(t,n)}function bBt(e,t){return e.filter(r=>r.certChain.length>0&&GJ.crypto.bufferEqual(r.certChain[0].serialNumber,t.serialNumber)&&GJ.crypto.bufferEqual(r.certChain[0].issuer,t.issuer))}});var Abe=G(cL=>{"use strict";Object.defineProperty(cL,"__esModule",{value:!0});cL.verifyTSATimestamp=TBt;cL.verifyTLogTimestamp=FBt;var PBt=So(),xBt=abe(),kBt=lbe(),QBt=ube(),RBt=fbe();function TBt(e,t,r){return(0,RBt.verifyRFC3161Timestamp)(e,t,r),{type:"timestamp-authority",logID:e.signerSerialNumber,timestamp:e.signingTime}}function FBt(e,t){let r=!1;if(NBt(e)&&((0,QBt.verifyTLogSET)(e,t),r=!0),OBt(e)&&((0,kBt.verifyMerkleInclusion)(e),(0,xBt.verifyCheckpoint)(e,t),r=!0),!r)throw new PBt.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:e.logId.keyId,timestamp:new Date(Number(e.integratedTime)*1e3)}}function NBt(e){return e.inclusionPromise!==void 0}function OBt(e){return e.inclusionProof!==void 0}});var pbe=G(YJ=>{"use strict";Object.defineProperty(YJ,"__esModule",{value:!0});YJ.verifyDSSETLogBody=LBt;var uL=So();function LBt(e,t){switch(e.apiVersion){case"0.0.1":return MBt(e,t);default:throw new uL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${e.apiVersion}`})}}function MBt(e,t){if(e.spec.signatures?.length!==1)throw new uL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=e.spec.signatures[0].signature;if(!t.compareSignature(Buffer.from(r,"base64")))throw new uL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=e.spec.payloadHash?.value||"";if(!t.compareDigest(Buffer.from(s,"hex")))throw new uL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}});var hbe=G(JJ=>{"use strict";Object.defineProperty(JJ,"__esModule",{value:!0});JJ.verify Line truncated
Try running the command again with the package name prefixed: ${pe.pretty(r,"yarn add",pe.Type.CODE)} ${pe.pretty(r,j.makeDescriptor(j.makeIdent(null,"my-package"),`${ie[0]}...`),pe.Type.DESCRIPTOR)}`);if(!te)throw new it(`The ${pe.pretty(r,V,pe.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ue=iot(a,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ue.map(async de=>{let Ae=await zv(te,{project:s,workspace:a,cache:n,fixed:c,target:de,modifier:h,strategies:E,maxResults:C});return{request:te,suggestedDescriptors:Ae,target:de}}))})).then(V=>V.flat()),I=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async V=>{for(let{request:te,suggestedDescriptors:{suggestions:ie,rejections:ue}}of x)if(ie.filter(de=>de.descriptor!==null).length===0){let[de]=ue;if(typeof de>"u")throw new Error("Assertion failed: Expected an error to have been set");s.configuration.get("enableNetwork")?V.reportError(27,`${j.prettyDescriptor(r,te)} can't be resolved to a satisfying range`):V.reportError(27,`${j.prettyDescriptor(r,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),V.reportSeparator(),V.reportExceptionOnce(de)}});if(I.hasErrors())return I.exitCode();let T=!1,O=[],U=[];for(let{suggestedDescriptors:{suggestions:V},target:te}of x){let ie,ue=V.filter(Ce=>Ce.descriptor!==null),ae=ue[0].descriptor,de=ue.every(Ce=>j.areDescriptorsEqual(Ce.descriptor,ae));ue.length===1||de?ie=ae:(T=!0,{answer:ie}=await(0,sde.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:V.map(({descriptor:Ce,name:Ee,reason:g})=>Ce?{name:Ee,hint:g,descriptor:Ce}:{name:Ee,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Ce){return this.find(Ce,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ae=a.manifest[te].get(ie.identHash);(typeof Ae>"u"||Ae.descriptorHash!==ie.descriptorHash)&&(a.manifest[te].set(ie.identHash,ie),this.optional&&(te==="dependencies"?a.manifest.ensureDependencyMeta({...ie,range:"unknown"}).optional=!0:te==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:"unknown"}).optional=!0)),typeof Ae>"u"?O.push([a,te,ie,E]):U.push([a,te,Ae,ie]))}return await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyAddition,O),await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyReplacement,U),T&&this.context.stdout.write(`
`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function iot(e,t,{dev:r,peer:s,preferDev:a,optional:n}){let c=e.manifest.dependencies.has(t.identHash),f=e.manifest.devDependencies.has(t.identHash),p=e.manifest.peerDependencies.has(t.identHash);if((r||s)&&c)throw new it(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new it(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new it(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new it(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new it(`Package "${j.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:f?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}qe();qe();Yt();var XI=class extends At{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=he.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=at.Usage({description:"get the path to a binary script",details:`
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await Cn.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new it(`Couldn't find a binary named "${this.name}" for package "${j.prettyLocator(r,a)}"`);let[,p]=f;return this.context.stdout.write(`${p}
`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await Cn.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:j.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h," ")} ${j.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};qe();Dt();Yt();var ZI=class extends At{constructor(){super(...arguments);this.mirror=he.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=he.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=at.Usage({description:"remove the shared cache files",details:`
This command will remove all the files from the cache.
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new it("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let s=await Kr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await le.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await le.removePromise(s.cwd)})).exitCode()}};qe();Yt();zl();var h5=Ie("util"),$I=class extends At{constructor(){super(...arguments);this.why=he.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=he.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=he.String()}static{this.paths=[["config","get"]]}static{this.usage=at.Usage({description:"read a configuration settings",details:`
This command will print a configuration setting.
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(s)>"u")throw new it(`Couldn't find a configuration settings named "${s}"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=Ge.convertMapsToIndexableObjects(c),p=a?Pa(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
`),h.exitCode();h5.inspect.styles.name="cyan",this.context.stdout.write(`${(0,h5.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
`)}return h.exitCode()}};qe();Yt();zl();var g5=Ie("util"),eC=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=he.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=he.String();this.value=he.String()}static{this.paths=[["config","set"]]}static{this.usage=at.Usage({description:"change a configuration settings",details:`
This command will set a configuration setting.
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new it("This setting only affects the file it's in, and thus cannot be set from the CLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let T=u0(I);return Yd(T,this.name,f),T}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=Ge.convertMapsToIndexableObjects(E),S=n?Pa(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{g5.inspect.styles.name="cyan",I.reportInfo(0,`Successfully set ${this.name} to ${(0,g5.inspect)(S,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};qe();Yt();zl();var tC=class extends At{constructor(){super(...arguments);this.home=he.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=he.String()}static{this.paths=[["config","unset"]]}static{this.usage=at.Usage({description:"unset a configuration setting",details:`
This command will unset a configuration setting.
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!dB(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?u0(C):{...C};return f0(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};qe();Dt();Yt();var UT=Ie("util"),rC=class extends At{constructor(){super(...arguments);this.noDefaults=he.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=he.Boolean("-v,--verbose",{hidden:!0});this.why=he.Boolean("--why",{hidden:!0});this.names=he.Rest()}static{this.paths=[["config"]]}static{this.usage=at.Usage({description:"display the current configuration",details:`
This command prints the current active configuration settings.
`,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await PI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key "${p}" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&f.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??"<default>",S=C&&C[0]!=="<"?fe.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),x=r.sources.get(C)??"<default>",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),T={Description:{label:"Description",value:pe.tuple(pe.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:pe.tuple(x[0]==="<"?pe.Type.CODE:pe.Type.PATH,x)}};h[C]={value:pe.tuple(pe.Type.CODE,C),children:T};let O=(U,V)=>{for(let[te,ie]of V)if(ie instanceof Map){let ue={};U[te]={children:ue},O(ue,ie)}else U[te]={label:te,value:pe.tuple(pe.Type.NO_HINT,(0,UT.inspect)(ie,p))}};I instanceof Map?O(T,I):T.Value={label:"Value",value:pe.tuple(pe.Type.NO_HINT,(0,UT.inspect)(I,p))}}a.length!==1&&(n=void 0),Rs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let f=a[0],p=(0,UT.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
`),this.context.stdout.write(`${p}
`)}return c.exitCode()}};qe();Yt();Al();var _T={};Vt(_T,{Strategy:()=>Xv,acceptedStrategies:()=>sot,dedupe:()=>d5});qe();qe();var ode=et(zo()),Xv=(t=>(t.HIGHEST="highest",t))(Xv||{}),sot=new Set(Object.values(Xv)),oot={highest:async(e,t,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of e.storedResolutions){let E=e.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);Ge.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(Ge.mapAndFilter(e.storedDescriptors.values(),p=>j.isVirtualDescriptor(p)?Ge.mapAndFilter.skip:[p.descriptorHash,Ge.makeDeferred()]));for(let p of e.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=e.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=e.originalPackages.get(E);if(typeof C>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),x=Object.fromEntries(await Ge.allSettledSafe(Object.entries(S).map(async([te,ie])=>{let ue=f.get(ie.descriptorHash);if(typeof ue>"u")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let ae=await ue.promise;if(!ae)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ae.updatedPackage]})));if(t.length&&!ode.default.isMatch(j.stringifyIdent(p),t)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let T=[...I].map(te=>{let ie=e.originalPackages.get(te);if(typeof ie>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ie}),O=await r.getSatisfying(p,x,T,a),U=O.locators?.[0];if(typeof U>"u"||!O.sorted)return C;let V=e.originalPackages.get(U.locatorHash);if(typeof V>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return V}).then(async S=>{let x=await e.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:x})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function d5(e,{strategy:t,patterns:r,cache:s,report:a}){let{configuration:n}=e,c=new Qi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:e.storedChecksums,fetcher:p,project:e,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:e,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let C=oot[t],S=await C(e,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),x=yo.progressViaCounter(S.length);await a.reportProgress(x);let I=0;await Promise.all(S.map(U=>U.then(V=>{if(V===null||V.currentPackage.locatorHash===V.updatedPackage.locatorHash)return;I++;let{descriptor:te,currentPackage:ie,updatedPackage:ue}=V;a.reportInfo(0,`${j.prettyDescriptor(n,te)} can be deduped from ${j.prettyLocator(n,ie)} to ${j.prettyLocator(n,ue)}`),a.reportJson({descriptor:j.stringifyDescriptor(te),currentResolution:j.stringifyLocator(ie),updatedResolution:j.stringifyLocator(ue)}),e.storedResolutions.set(te.descriptorHash,ue.locatorHash)}).finally(()=>x.tick())));let T;switch(I){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${I} packages`}let O=pe.pretty(n,t,pe.Type.CODE);return a.reportInfo(0,`${T} can be deduped using the ${O} strategy`),I})}var nC=class extends At{constructor(){super(...arguments);this.strategy=he.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:ks(Xv)});this.check=he.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:ks(Oa)});this.patterns=he.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=at.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never dow Line truncated
`)}};var sC=class extends At{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};qe();Dt();Yt();var oC=class extends At{constructor(){super(...arguments);this.leadingArgument=he.String();this.args=he.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!j.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,fe.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};qe();var aC=class extends At{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${An||"<unknown>"}
`)}};qe();qe();Yt();var lC=class extends At{constructor(){super(...arguments);this.commandName=he.String();this.args=he.Proxy()}static{this.paths=[["exec"]]}static{this.usage=at.Usage({description:"execute a shell script",details:`
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState(),await Cn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};qe();Yt();Al();var cC=class extends At{constructor(){super(...arguments);this.hash=he.String({required:!1,validator:Nx(SE(),[q2(/^p[0-9a-f]{6}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=at.Usage({description:"explain a set of peer requirements",details:`
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
**Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\`yarn explain peer-requirements\`).
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<"u"?await lot(this.hash,s,{stdout:this.context.stdout}):await cot(s,{stdout:this.context.stdout})}};async function lot(e,t,r){let s=t.peerRequirementNodes.get(e);if(typeof s>"u")throw new Error(`No peerDependency requirements found for hash: "${e}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:pe.tuple(pe.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[j.stringifyLocator(h.requester),n(h)]))}),c=t.peerWarnings.find(p=>p.hash===e);return(await Ot.start({configuration:t.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=pe.mark(t.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${pe.pretty(t.configuration,s.subject,pe.Type.LOCATOR)} is requested to provide ${pe.pretty(t.configuration,s.ident,pe.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,pe.pretty(t.configuration,s.subject,pe.Type.LOCATOR)),Rs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[j.stringifyLocator(C.requester),n(C)]))},{configuration:t.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range==="missing:"){let C=c?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${pe.pretty(t.configuration,s.subject,pe.Type.LOCATOR)} does not provide ${pe.pretty(t.configuration,s.ident,pe.Type.IDENT)}${C}.`)}else{let C=t.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error("Assertion failed: Expected the descriptor to be registered");let S=t.storedPackages.get(C);if(!S)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${pe.pretty(t.configuration,s.subject,pe.Type.LOCATOR)} provides ${pe.pretty(t.configuration,s.ident,pe.Type.IDENT)} with version ${j.prettyReference(t.configuration,S.version??"0.0.0")}, ${c?"which does not satisfy all requests.":"which satisfies all requests"}`),c?.type===3&&(c.range?p.reportInfo(0,` The combined requested range is ${pe.pretty(t.configuration,c.range,pe.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function cot(e,t){return(await Ot.start({configuration:e.configuration,stdout:t.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=pe.mark(e.configuration),n=Ge.sortMap(e.peerRequirementNodes,[([,c])=>j.stringifyLocator(c.subject),([,c])=>j.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=e.peerWarnings.find(E=>E.hash===c.hash),p=[...j.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",c.provided.range!=="missing:"){let E=e.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let C=e.storedPackages.get(E);if(!C)throw new Error("Assertion failed: Expected the provided package to have been registered");let S=`${pe.pretty(e.configuration,c.hash,pe.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${j.prettyLocator(e.configuration,c.subject)} provides ${j.prettyLocator(e.configuration,C)} to ${j.prettyLocator(e.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${pe.pretty(e.configuration,c.hash,pe.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${j.prettyLocator(e.configuration,c.subject)} doesn't provide ${j.prettyIdent(e.configuration,c.ident)} to ${j.prettyLocator(e.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}qe();Yt();Al();qe();qe();Dt();Yt();var lde=et(pi()),uC=class extends At{constructor(){super(...arguments);this.useYarnPath=he.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=he.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=he.String()}static{this.paths=[["set","version"]]}static{this.usage=at.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set th Line truncated
${t}`)})}let f=e.projectCwd??e.startingCwd,p=J.resolve(f,".yarn/releases"),h=J.resolve(p,`yarn-${t}.cjs`),E=J.relative(e.startingCwd,h),C=Ge.isTaggedYarnVersion(t),S=e.get("yarnPath"),x=!C,I=x||!!S||!!a;if(a===!1){if(x)throw new Lt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${pe.applyHyperlink(e,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${pe.applyHyperlink(e,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),I=!0);if(I){let te=await c();s.reportInfo(0,`Saving the new release in ${pe.pretty(e,E,"magenta")}`),await le.removePromise(J.dirname(h)),await le.mkdirPromise(J.dirname(h),{recursive:!0}),await le.writeFilePromise(h,te,{mode:493}),await ze.updateConfiguration(f,{yarnPath:J.relative(f,h)})}else await le.removePromise(J.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let T=await _t.tryFind(f)||new _t;T.packageManager=`yarn@${C?t:await Zv(e,"stable")}`;let O={};T.exportTo(O);let U=J.join(f,_t.fileName),V=`${JSON.stringify(O,null,T.indent)}
`;return await le.changeFilePromise(U,V,{automaticNewlines:!0}),{bundleVersion:t}}function cde(e){return Ir[jx(e)]}var fot=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function Aot(e){let r=`https://repo.yarnpkg.com/${Ge.isTaggedYarnVersion(An)?An:await Zv(e,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await nn.get(r,{configuration:e});return new Map(Array.from(s.toString().matchAll(fot),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=cde(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var fC=class extends At{constructor(){super(...arguments);this.code=he.String({required:!1,validator:W2(SE(),[q2(/^YN[0-9]{4}$/)])});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=at.Usage({description:"explain an error code",details:`
When the code argument is specified, this command prints its name and its details.
When used without arguments, this command lists all error codes and their names.
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let s=cde(this.code),a=pe.pretty(r,s,pe.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await Aot(r)).get(this.code),p=typeof f<"u"?pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
You can help us by editing this page on GitHub \u{1F642}:
${pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}
`):this.context.stdout.write(`${n}
${p}
`)}else{let s={children:Ge.mapAndFilter(Object.entries(Ir),([a,n])=>Number.isNaN(Number(a))?Ge.mapAndFilter.skip:{label:Kf(Number(a)),value:pe.tuple(pe.Type.CODE,n)})};Rs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};qe();Dt();Yt();var ude=et(zo()),AC=class extends At{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=he.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=he.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=he.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=he.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=he.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=he.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=he.Rest()}static{this.paths=[["info"]]}static{this.usage=at.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(ie,{recursive:ue})=>{let ae=ie.anchoredLocator.locatorHash,de=new Map,Ae=[ae];for(;Ae.length>0;){let Ce=Ae.shift();if(de.has(Ce))continue;let Ee=s.storedPackages.get(Ce);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the package to be registered");if(de.set(Ce,Ee),j.isVirtualLocator(Ee)&&Ae.push(j.devirtualizeLocator(Ee).locatorHash),!(!ue&&Ce!==ae))for(let g of Ee.dependencies.values()){let Se=s.storedResolutions.get(g.descriptorHash);if(typeof Se>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ae.push(Se)}}return de.values()},p=({recursive:ie})=>{let ue=new Map;for(let ae of s.workspaces)for(let de of f(ae,{recursive:ie}))ue.set(de.locatorHash,de);return ue.values()},h=({all:ie,recursive:ue})=>ie&&ue?s.storedPackages.values():ie?p({recursive:ue}):f(a,{recursive:ue}),E=({all:ie,recursive:ue})=>{let ae=h({all:ie,recursive:ue}),de=this.patterns.map(Ee=>{let g=j.parseLocator(Ee),Se=ude.default.makeRe(j.stringifyIdent(g)),Be=j.isVirtualLocator(g),me=Be?j.devirtualizeLocator(g):g;return ce=>{let Z=j.stringifyIdent(ce);if(!Se.test(Z))return!1;if(g.reference==="unknown")return!0;let De=j.isVirtualLocator(ce),Qe=De?j.devirtualizeLocator(ce):ce;return!(Be&&De&&g.reference!==ce.reference||me.reference!==Qe.reference)}}),Ae=Ge.sortMap([...ae],Ee=>j.stringifyLocator(Ee));return{selection:Ae.filter(Ee=>de.length===0||de.some(g=>g(Ee))),sortedLookup:Ae}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new it("No package matched your request");let x=new Map;if(this.dependents)for(let ie of S)for(let ue of ie.dependencies.values()){let ae=s.storedResolutions.get(ue.descriptorHash);if(typeof ae>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ge.getArrayWithDefault(x,ae).push(ie)}let I=new Map;for(let ie of S){if(!j.isVirtualLocator(ie))continue;let ue=j.devirtualizeLocator(ie);Ge.getArrayWithDefault(I,ue.locatorHash).push(ie)}let T={},O={children:T},U=r.makeFetcher(),V={project:s,fetcher:U,cache:n,checksums:s.storedChecksum Line truncated
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
`,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};qe();Yt();var dC=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
Check only the plugins from https.
If this command detects any plugin differences in the CI environment, it will throw an error.
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await nn.get(f.spec,{configuration:r}),h=Ln.makeHash(p);if(f.checksum===h)continue;let E=pe.pretty(r,f.path,pe.Type.PATH),C=pe.pretty(r,f.spec,pe.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};qe();qe();Dt();Yt();var gde=Ie("os");qe();Dt();Yt();var fde=Ie("os");qe();vc();Yt();var mot="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Pm(e,t){let r=await nn.get(mot,{configuration:e}),s=cs(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!t||kr.satisfiesWithPrereleases(t,n.range??"<4.0.0-rc.1")))}var mC=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Pm(r,An);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=" [experimental]"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var yot=/^[0-9]+$/,Eot=process.platform==="win32";function Ade(e){return yot.test(e)?`pull/${e}/head`:e}var Iot=({repository:e,branch:t},r)=>[["git","init",fe.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin","--depth=1",Ade(t)],["git","reset","--hard","FETCH_HEAD"]],Cot=({branch:e})=>[["git","fetch","origin","--depth=1",Ade(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],wot=({plugins:e,noMinify:t},r,s)=>[["yarn","build:cli",...new Array().concat(...e.map(a=>["--plugin",J.resolve(s,a)])),...t?["--no-minify"]:[],"|"],[Eot?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",fe.fromPortablePath(r),"|"]],yC=class extends At{constructor(){super(...arguments);this.installPath=he.String("--path",{description:"The path where the repository should be cloned to"});this.repository=he.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=he.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=he.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=he.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=he.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=he.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=he.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=at.Usage({description:"build Yarn from master",details:`
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
`,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),a=typeof this.installPath<"u"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,fde.tmpdir)()),"yarnpkg-sources",Ln.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await E5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator();let f=await qr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);le.existsSync(p)||(await $v(wot(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await le.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await m5(r,null,async()=>h,{report:c});this.skipPlugins||await Bot(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function $v(e,{configuration:t,context:r,target:s}){for(let[a,...n]of e){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await qr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${pe.pretty(t,` $ ${[a,...n].join(" ")}`,"grey")}
`);try{await qr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function E5(e,{configuration:t,report:r,target:s}){let a=!1;if(!e.force&&le.existsSync(J.join(s,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await $v(Cot(e),{configuration:t,context:e.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await le.removePromise(s),await le.mkdirPromise(s,{recursive:!0}),await $v(Iot(e,s),{configuration:t,context:e.context,target:s}))}async function Bot(e,t,{project:r,report:s,target:a}){let n=await Pm(r.configuration,t),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await I5(f,e,{project:r,report:s,target:a})}qe();qe();Dt();Yt();var pde=et(pi()),hde=Ie("vm");var EC=class extends At{constructor(){super(...arguments);this.name=he.String();this.checksum=he.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
Three types of plugin references are accepted:
- If the plugin is stored within the Yarn repository, it can be referenced by name.
- Third-party plugins can be referenced directly through their public urls.
- Local plugins can be referenced by their path on the disk.
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Rt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||fe.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,fe.toPortablePath(this.name));a.reportInfo(0,`Reading ${pe.pretty(r,p,pe.Type.PATH)}`),c=J.relative(n.cwd,p),f=await le.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Lt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=j.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!pde.default.valid(h.reference))throw new Lt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=j.stringifyIdent(h),C=await Pm(r,An);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${j.prettyIdent(r,h)} on the remote registry.
`;throw r.plugins.has(E)?S+=`A plugin named ${j.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${pe.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",pe.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${pe.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",pe.Type.URL)}).`,new Lt(51,S)}c=E,p=C[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):An!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${An}/`))}a.reportInfo(0,`Downloading ${pe.pretty(r,p,"green")}`),f=await nn.get(p,{configuration:r})}await C5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function C5(e,t,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,hde.runInNewContext)(t.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=J.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${pe.pretty(n,h,"magenta")}`),await le.mkdirPromise(J.dirname(E),{recursive:!0}),await le.writeFilePromise(E,t);let C={path:h,spec:e};r&&(C.checksum=Ln.makeHash(t)),await ze.addPlugin(s.cwd,[C])}var vot=({pluginName:e,noMinify:t},r)=>[["yarn",`build:${e}`,...t?["--no-minify"]:[],"|"]],IC=class extends At{constructor(){super(...arguments);this.installPath=he.String("--path",{description:"The path where the repository should be cloned to"});this.repository=he.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=he.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=he.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=he.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=he.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
The plugins can be referenced by their short name if sourced from the official Yarn repository.
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<"u"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,gde.tmpdir)()),"yarnpkg-sources",Ln.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Rt.find(r,this.context.cwd),f=j.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=j.stringifyIdent(f),h=await Pm(r,An);if(!Object.hasOwn(h,p))throw new Lt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await E5(this,{configuration:r,report:n,target:s}),await I5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function I5(e,{context:t,noMinify:r},{project:s,report:a,target:n}){let c=e.replace(/@yarnpkg\//,""),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await $v(vot({pluginName:c,noMinify:r},n),{configuration:f,context:t,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${c}/bundles/${e}.js`),h=await le.readFilePromise(p);await C5(e,h,{project:s,report:a})}qe();Dt();Yt();var CC=class extends At{constructor(){super(...arguments);this.name=he.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=j.parseIdent(c);if(!r.plugins.has(c))throw new it(`${j.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=J.resolve(s.cwd,p);le.existsSync(h)&&(n.reportInfo(0,`Removing ${pe.pretty(r,p,pe.Type.PATH)}...`),await le.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};qe();Yt();var wC=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=at.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
`,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};qe();qe();Yt();var BC=class extends At{constructor(){super(...arguments);this.idents=he.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=at.Usage({description:"rebuild the project's native packages",details:`
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(j.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new Qi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};qe();qe();qe();Yt();var w5=et(zo());Al();var vC=class extends At{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:ks(Oa)});this.patterns=he.Rest()}static{this.paths=[["remove"]]}static{this.usage=at.Usage({description:"remove dependencies from the project",details:`
This command will remove the packages matching the specified patterns from the current workspace.
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let I of this.patterns){let T=!1,O=j.parseIdent(I);for(let U of c){let V=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,w5.default)(V,I))U.manifest.peerDependenciesMeta.delete(te),h=!0,T=!0;for(let te of f){let ie=U.manifest.getForScope(te),ue=[...ie.values()].map(ae=>j.stringifyIdent(ae));for(let ae of(0,w5.default)(ue,j.stringifyIdent(O))){let{identHash:de}=j.parseIdent(ae),Ae=ie.get(de);if(typeof Ae>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(de),E.push([U,te,Ae]),h=!0,T=!0}}}T||p.push(I)}let C=p.length>1?"Patterns":"Pattern",S=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new it(`${C} ${pe.prettyList(r,p,pe.Type.CODE)} ${S} match any packages referenced by ${x} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};qe();qe();Yt();var dde=Ie("util"),SC=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=Ge.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E," ")} ${(0,dde.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};qe();qe();Yt();var DC=class extends At{constructor(){super(...arguments);this.inspect=he.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=he.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=he.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=he.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=he.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=he.Boolean("--silent",{hidden:!0});this.scriptName=he.String();this.args=he.Proxy()}static{this.paths=[["run"]]}static{this.usage=at.Usage({description:"run a script defined in the package.json",details:`
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await Cn.hasPackageScript(c,this.scriptName,{project:s}))return await Cn.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await Cn.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await Cn.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await Cn.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new it("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,C]of qI)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new it(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new it(`Couldn't find a script named "${this.scriptName}".`)}}};qe();qe();Yt();var bC=class extends At{constructor(){super(...arguments);this.descriptor=he.String();this.resolution=he.String()}static{this.paths=[["set","resolution"]]}static{this.usage=at.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 npm:1.5.0"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=j.parseDescriptor(this.descriptor,!0),f=j.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};qe();Dt();Yt();var mde=et(zo()),PC=class extends At{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=he.Rest()}static{this.paths=[["unlink"]]}static{this.usage=at.Usage({description:"disconnect the local project from another one",details:`
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,fe.toPortablePath(p));if(Ge.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Rt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let x of C.workspaces)x.manifest.name&&f.add(j.stringifyIdent(x.anchoredLocator));if(f.size===0)throw new it("No workspace found to be unlinked in the target project")}else{if(!S.manifest.name)throw new it("The target workspace doesn't have a name and thus cannot be unlinked");f.add(j.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,mde.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};qe();qe();qe();Yt();var yde=et(Vv()),B5=et(zo());Al();var xC=class extends At{constructor(){super(...arguments);this.interactive=he.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=he.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=he.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=he.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=he.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.noTimeGate=he.Boolean("--no-time-gate",!1,{description:"Disable the minimum release age check for this command"});this.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:ks(Oa)});this.patterns=he.Rest()}static{this.paths=[["up"]]}static{this.usage=at.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously li Line truncated
${ae}`):O.reportError(27,`${j.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
${ae}`)}else ie.length>1&&!f&&O.reportError(27,`${j.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(x.hasErrors())return x.exitCode();let I=!1,T=[];for(let[O,U,,{suggestions:V}]of S){let te,ie=V.filter(Ae=>Ae.descriptor!==null),ue=ie[0].descriptor,ae=ie.every(Ae=>j.areDescriptorsEqual(Ae.descriptor,ue));ie.length===1||ae?te=ue:(I=!0,{answer:te}=await(0,yde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${j.prettyWorkspace(r,O)} \u276F ${U}?`,choices:V.map(({descriptor:Ae,name:Ce,reason:Ee})=>Ae?{name:Ce,hint:Ee,descriptor:Ae}:{name:Ce,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(Ae){return this.find(Ae,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let de=O.manifest[U].get(te.identHash);if(typeof de>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(de.descriptorHash!==te.descriptorHash)O.manifest[U].set(te.identHash,te),T.push([O,U,de,te]);else{let Ae=r.makeResolver(),Ce={project:s,resolver:Ae},Ee=r.normalizeDependency(de),g=Ae.bindDescriptor(Ee,O.anchoredLocator,Ce);s.forgetResolution(g)}}return await r.triggerMultipleHooks(O=>O.afterWorkspaceDependencyReplacement,T),I&&this.context.stdout.write(`
`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};qe();qe();Yt();var kC=class extends At{constructor(){super(...arguments);this.recursive=he.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=he.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=he.String()}static{this.paths=[["why"]]}static{this.usage=at.Usage({description:"display the reason why a package is needed",details:`
This command prints the exact reasons why a package appears in the dependency tree. Specify a version or range to determine why the dependency tree contains a specific version of a package. This is particularly useful when trying to find out why your project depends on lower versions.
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
`,examples:[["Explain why lodash is used in your project","$0 why lodash"],["Explain why version 3.3.1 of lodash is in your project","$0 why lodash@3.3.1"],["Explain why version 3.X of lodash is in your project","$0 why lodash@^3"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=j.parseDescriptor(this.package,!1);if(n.range!=="unknown"&&kr.validRange(n.range)===null)throw new it(`Expected a valid semver range, got ${n.range}`);let c=this.recursive?Dot(s,n,{configuration:r,peers:this.peers}):Sot(s,n,{configuration:r,peers:this.peers});Rs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function Sot(e,t,{configuration:r,peers:s}){let a=Ge.sortMap(e.storedPackages.values(),f=>j.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error("Assertion failed: The resolution should have been registered");let S=e.storedPackages.get(C);if(!S)throw new Error("Assertion failed: The package should have been registered");if(!j.areIdentsEqual(S,t)||!j.isPackageInRange(S,t.range))continue;{let I=j.stringifyLocator(f);n[I]={value:[f,pe.Type.LOCATOR],children:p}}let x=j.stringifyLocator(S);p[x]={value:[{descriptor:E,locator:S},pe.Type.DEPENDENT]}}}return c}function Dot(e,t,{configuration:r,peers:s}){let a=Ge.sortMap(e.workspaces,S=>j.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),j.areIdentsEqual(S,t)&&j.isPackageInRange(S,t.range))return c.add(S.locatorHash),!0;let x=!1;for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let T=e.storedResolutions.get(I.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let O=e.storedPackages.get(T);if(!O)throw new Error("Assertion failed: The package should have been registered");f(O)&&(x=!0)}return x&&c.add(S.locatorHash),x};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,x,I)=>{if(!c.has(S.locatorHash))return;let T=I!==null?pe.tuple(pe.Type.DEPENDENT,{locator:S,descriptor:I}):pe.tuple(pe.Type.LOCATOR,S),O={},U={value:T,children:O},V=j.stringifyLocator(S);if(x[V]=U,!(I!==null&&e.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let te of S.dependencies.values()){if(!s&&S.peerDependencies.has(te.identHash))continue;let ie=e.storedResolutions.get(te.descriptorHash);if(!ie)throw new Error("Assertion failed: The resolution should have been registered");let ue=e.storedPackages.get(ie);if(!ue)throw new Error("Assertion failed: The package should have been registered");C(ue,O,te)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}qe();var T5={};Vt(T5,{GitFetcher:()=>tS,GitResolver:()=>rS,default:()=>Vot,gitUtils:()=>La});qe();Dt();var La={};Vt(La,{TreeishProtocols:()=>eS,clone:()=>R5,fetchBase:()=>Ude,fetchChangedFiles:()=>_de,fetchChangedWorkspaces:()=>Wot,fetchRoot:()=>Mde,isGitUrl:()=>TC,lsRemote:()=>Lde,normalizeLocator:()=>qot,normalizeRepoUrl:()=>QC,resolveUrl:()=>Q5,splitRepoUrl:()=>zp,validateRepoUrl:()=>k5});qe();Dt();Yt();zl();var Nde=et(Rde()),RC=et(Ie("querystring")),P5=et(pi());function b5(e,t,r){let s=e.indexOf(r);return e.lastIndexOf(t,s>-1?s:1/0)}function Tde(e){try{return new URL(e)}catch{return}}function jot(e){let t=b5(e,"@","#"),r=b5(e,":","#");return r>t&&(e=`${e.slice(0,r)}/${e.slice(r+1)}`),b5(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`ssh://${e}`),e}function Fde(e){return Tde(e)||Tde(jot(e))}function QC(e,{git:t=!1}={}){if(e=e.replace(/^git\+https:/,"https:"),e=e.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),e=e.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let r=Fde(e);r&&(e=r.href),e=e.replace(/^git\+([^:]+):/,"$1:")}return e}function Ode(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Got=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],eS=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(eS||{});function TC(e){return e?Got.some(t=>!!e.match(t)):!1}function zp(e){e=QC(e);let t=e.indexOf("#");if(t===-1)return{repo:e,treeish:{p Line truncated
This command will run a given sub-command on a single workspace.
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[j.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new it(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
- ${p.join(`
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var Jot={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Hde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[ZI,$I,eC,tC,bC,yC,uC,FC,iC,sC,oC,aC,zI,XI,rC,nC,lC,cC,fC,AC,pC,hC,PC,gC,dC,IC,EC,CC,mC,wC,BC,vC,SC,DC,xC,kC,NC]},Kot=Jot;var M5={};Vt(M5,{default:()=>$ot});qe();qe();var N5="catalog:";var O5=e=>e.startsWith(N5),zot=e=>e.range.slice(N5.length)||null,jde=e=>e===null?"default catalog":`catalog "${e}"`,Xot=e=>e.scope?`@${e.scope}/${e.name}`:e.name,L5=(e,t,r,s)=>{let a=zot(t),n;if(a===null)n=e.configuration.get("catalog");else try{let E=e.configuration.get("catalogs");E&&(n=E.get(a))}catch{n=void 0}if(!n||n.size===0)throw new Lt(82,`${j.prettyDescriptor(e.configuration,t)}: ${jde(a)} not found or empty`);let c=Xot(t),f=n.get(c);if(!f)throw new Lt(82,`${j.prettyDescriptor(e.configuration,t)}: entry not found in ${jde(a)}`);let p=e.configuration.normalizeDependency(j.makeDescriptor(t,f));return r.supportsDescriptor(p,s)?r.bindDescriptor(p,e.topLevelWorkspace.anchoredLocator,s):p};var Zot={configuration:{catalog:{description:"The default catalog of packages",type:"MAP",valueDefinition:{description:"The catalog of packages",type:"STRING"}},catalogs:{description:"Named catalogs of packages",type:"MAP",valueDefinition:{description:"A named catalog",type:"MAP",valueDefinition:{description:"Package version in the catalog",type:"STRING"}}}},hooks:{beforeWorkspacePacking:(e,t)=>{let r=e.project,s=r.configuration.makeResolver(),a={project:r,resolver:s,report:new Qi};for(let n of _t.allDependencies){let c=t[n];if(c)for(let[f,p]of Object.entries(c)){if(typeof p!="string"||!O5(p))continue;let h=j.parseIdent(f),E=j.makeDescriptor(h,p),C=L5(r,E,s,a),{protocol:S,source:x,params:I,selector:T}=j.parseRange(j.convertToManifestRange(C.range));S===e.project.configuration.get("defaultProtocol")&&(S=null),c[f]=j.makeRange({protocol:S,source:x,params:I,selector:T})}}},reduceDependency:async(e,t,r,s,{resolver:a,resolveOptions:n})=>O5(e.range)?L5(t,e,a,n):e}},$ot=Zot;var G5={};Vt(G5,{default:()=>tat});qe();var Qt={optional:!0},U5=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],Line truncated
This command will output all matches to the given prolog query.
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(".")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((x,[I])=>Math.max(x,I.length),0);for(let x=0;x<C;x++){let[I,T]=E[x];p.reportInfo(null,`${yat(x,C)}${I.padEnd(S," ")} = ${mat(T)}`)}p.reportJson(h)}})).exitCode()}};function mat(e){return typeof e!="string"?`${e}`:e.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?e:`'${e}'`}function yat(e,t){let r=e===0,s=e===t-1;return r&&s?"":r?"\u250C ":s?"\u2514 ":"\u2502 "}qe();Yt();var jC=class extends At{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}static{this.paths=[["constraints","source"]]}static{this.usage=at.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};qe();qe();Yt();iS();var GC=class extends At{constructor(){super(...arguments);this.fix=he.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=at.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new LC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(lS(),aS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=jT(s,E,{fix:this.fix}),x=[];for(let[I,T]of C){let O=I.manifest.indent;I.manifest=new _t,I.manifest.indent=O,I.manifest.load(T),x.push(I.persistManifest())}if(await Promise.all(x),!(C.size>0&&h>1)){c=Vde(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let T of I)T.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=Ge.sortMap(c.children,h=>h.value[1]),Rs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};iS();var Eat={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[HC,jC,GC],hooks:{async validateProjectAfterInstall(e,{reportError:t}){if(!e.configuration.get("enableConstraintsChecks"))return;let r=await e.loadUserConfig(),s;if(r?.constraints)s=new LC(e);else{let{Constraints:c}=await Promise.resolve().then(()=>(lS(),aS));s=await c.find(e)}let a=await s.process();if(!a)return;let{remainingErrors:n}=jT(e,a);if(n.size!==0)if(e.configuration.isCI)for(let[c,f]of n)for(let p of f)t(84,`${pe.pretty(e.configuration,c.anchoredLocator,pe.Type.IDENT)}: ${p.text}`);else t(84,`Constraint check failed; run ${pe.pretty(e.configuration,"yarn constraints",pe.Type.CODE)} for more details`)}}},Iat=Eat;var a9={};Vt(a9,{CreateCommand:()=>qC,DlxCommand:()=>WC,default:()=>wat});qe();Yt();var qC=class extends At{constructor(){super(...arguments);this.pkg=he.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=he.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=he.String();this.args=he.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let s=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=j.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?j.makeIdent(a.scope,`create-${a.name}`):j.makeIdent(null,`create-${a.name}`),c=j.stringifyIdent(n);return a.range!=="unknown"&&(c+=`@${a.range}`),this.cli.run(["dlx",...r,c,...this.args])}};qe();qe();Dt();Yt();var WC=class extends At{constructor(){super(...arguments);this.packages=he.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=he.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=he.String();this.args=he.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=at.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-vite to scaffold a new Vite project","yarn dlx create-vite"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return ze.telemetry=null,await le.mktempPromise(async r=>{let s=J.join(r,`dlx-${process.pid}`);await le.mkdirPromise(s),await le.writeFilePromise(J.join(s,"package.json"),`{}
`),await le.writeFilePromise(J.join(s,"yarn.lock"),"");let a=J.join(s,".yarnrc.yml"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Kf(68),level:pe.LogLevel.Discard}]},p=n!==null?J.join(n,".yarnrc.yml"):null;p!==null&&le.existsSync(p)?(await le.copyFilePromise(p,a),await ze.updateConfiguration(s,O=>{let U=Ge.toMerged(O,f);return Array.isArray(O.plugins)&&(U.plugins=O.plugins.map(V=>{let te=typeof V=="string"?V:V.path,ie=fe.isAbsolute(te)?te:fe.resolve(fe.fromPortablePath(n),te);return typeof V=="string"?ie:{path:ie,spec:V.spec}})),U})):await le.writeJsonPromise(a,f);let h=this.packages??[this.command],E=j.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`
`);let S=await ze.find(s,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,s);if(I===null)throw new ar(x.cwd,s);await x.restoreInstallState();let T=await Cn.getWorkspaceAccessibleBinaries(I);return T.has(E)===!1&&T.size===1&&typeof this.packages>"u"&&(E=Array.from(T)[0][0]),await Cn.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var Cat={commands:[qC,WC]},wat=Cat;var u9={};Vt(u9,{ExecFetcher:()=>uS,ExecResolver:()=>fS,default:()=>Sat,execUtils:()=>YT});qe();qe();qe();Dt();var fA="exec:";var YT={};Vt(YT,{loadGeneratorFile:()=>cS,makeLocator:()=>c9,makeSpec:()=>Eme,parseSpec:()=>l9});qe();Dt();function l9(e){let{params:t,selector:r}=j.parseRange(e),s=fe.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?j.parseLocator(t.locator):null,path:s}}function Eme({parentLocator:e,path:t,generatorHash:r,protocol:s}){let a=e!==null?{locator:j.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:s,source:t,selector:t,params:{...n,...a}})}function c9(e,{parentLocator:t,path:r,generatorHash:s,protocol:a}){return j.makeLocator(e,Eme({parentLocator:t,path:r,generatorHash:s,protocol:a}))}async function cS(e,t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(e,{protocol:t}),n=J.isAbsolute(a)?{packageFs:new bn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new bn(vt.root),prefixPath:J.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.join(c.prefixPath,a);return await f.readFilePromise(p,"utf8")}var uS=class{supports(t,r){return!!t.reference.startsWith(fA)}getLocalPath(t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(t.reference,{protocol:fA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:c}}async fetchFromDisk(t,r){let s=r.project.getDependencyMeta(t,null);if(!r.project.configuration.get("enableScripts")&&!s.built)throw new Lt(4,`${j.prettyLocator(r.project.configuration,t)} can't be built with the exec: protocol because all scripts have been disabled.`);let a=await cS(t.reference,fA,r);return le.mktempPromise(async n=>{let c=J.join(n,"generator.js");return await le.writeFilePromise(c,a),le.mktempPromise(async f=>{if(await this.generatePackage(f,t,c,r),!le.existsSync(J.join(f,"build")))throw new Error("The script should have generated a build directory");return await ds.makeArchiveFromDirectory(J.join(f,"build"),{prefixPath:j.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(t,r,s,a){return await le.mktempPromise(async n=>{let c=await Cn.makeScriptEnv({project:a.project,binFolder:n}),f=J.join(t,"runtime.js");return await le.mktempPromise(async p=>{let h=J.join(p,"buildfile.log"),E=J.join(t,"generator"),C=J.join(t,"build");await le.mkdirPromise(E),await le.mkdirPromise(C);let S={tempDir:fe.fromPortablePath(E),buildDir:fe.fromPortablePath(C),locator:j.stringifyLocator(r)};await le.writeFilePromise(f,`
// Expose 'Module' as a global variable
Object.defineProperty(global, 'Module', {
get: () => require('module'),
configurable: true,
enumerable: false,
});
// Expose non-hidden built-in modules as global variables
for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
Object.defineProperty(global, name, {
get: () => require(name),
configurable: true,
enumerable: false,
});
}
// Expose the 'execEnv' global variable
Object.defineProperty(global, 'execEnv', {
value: {
...${JSON.stringify(S)},
},
enumerable: true,
});
`);let x=c.NODE_OPTIONS||"",I=/\s*--require\s+\S*\.pnp\.c?js\s*/g;x=x.replace(I," ").trim(),c.NODE_OPTIONS=x;let{stdout:T,stderr:O}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${j.stringifyLocator(r)})
`,prefix:j.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await qr.pipevp(process.execPath,["--require",fe.fromPortablePath(f),fe.fromPortablePath(s),j.stringifyIdent(r)],{cwd:t,env:c,stdin:null,stdout:T,stderr:O});if(U!==0)throw le.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${pe.pretty(a.project.configuration,h,pe.Type.PATH)})`)})})}};qe();qe();qe();var Bat=2,fS=class{supportsDescriptor(t,r){return!!t.range.startsWith(fA)}supportsLocator(t,r){return!!t.reference.startsWith(fA)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){if(s.project.tryWorkspaceByLocator(r)===null)throw new Lt(57,`${j.prettyLocator(s.project.configuration,r)} lists ${j.prettyDescriptor(s.project.configuration,t)} as dependency, but only workspaces can depend on exec: packages.`);return j.bindDescriptor(t,{locator:j.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=l9(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await cS(j.makeRange({protocol:fA,source:a,selector:a,params:{locator:j.stringifyLocator(n)}}),fA,s.fetchOptions),f=Ln.makeHash(`${Bat}`,c).slice(0,6);return[c9(t,{parentLocator:n,path:a,generatorHash:f,protocol:fA})]}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await Ge.releaseAfterUseAsync(async()=>await _t.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var vat={fetchers:[uS],resolvers:[fS]},Sat=vat;var A9={};Vt(A9,{FileFetcher:()=>gS,FileResolver:()=>dS,TarballFileFetcher:()=>mS,TarballFileResolver:()=>yS,default:()=>Pat,fileUtils:()=>Rm});qe();Dt();var YC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,AS=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,ts="file:";var Rm={};Vt(Rm,{fetchArchiveFromLocator:()=>hS,makeArchiveFromLocator:()=>VT,makeBufferFromLocator:()=>f9,makeLocator:()=>VC,makeSpec:()=>Ime,parseSpec:()=>pS});qe();Dt();function pS(e){let{params:t,selector:r}=j.parseRange(e),s=fe.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?j.parseLocator(t.locator):null,path:s}}function Ime({parentLocator:e,path:t,hash:r,protocol:s}){let a=e!==null?{locator:j.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:s,source:t,selector:t,params:{...n,...a}})}function VC(e,{parentLocator:t,path:r,hash:s,protocol:a}){return j.makeLocator(e,Ime({parentLocator:t,path:r,hash:s,protocol:a}))}async function hS(e,t){let{parentLocator:r,path:s}=j.parseFileStyleRange(e.reference,{protocol:ts}),a=J.isAbsolute(s)?{packageFs:new bn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await t.fetcher.fetch(r,t),n=a.localPath?{packageFs:new bn(vt.root),prefixPath:J.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=J.join(n.prefixPath,s);return await Ge.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function VT(e,{protocol:t,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=j.parseFileStyleRange(e.reference,{protocol:t}),c=J.isAbsolute(n)?{packageFs:new bn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new bn(vt.root),prefixPath:J.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=J.join(f.prefixPath,n);return await Ge.releaseAfterUseAsync(async()=>await ds.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:j.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),f.releaseFs)}async function f9(e,{protocol:t,fetchOptions:r}){return(await VT(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var gS=class{supports(t,r){return!!t.reference.startsWith(ts)}getLocalPath(t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(t.reference,{protocol:ts});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFro Line truncated
`,{automaticNewlines:!0});let h=[p],E=J.join(this.context.cwd,"README.md");if(le.existsSync(E)||(await le.writeFilePromise(E,`# ${j.stringifyIdent(n.name)}
`),h.push(E)),!s||s.cwd===this.context.cwd){let C=J.join(this.context.cwd,Er.lockfile);le.existsSync(C)||(await le.writeFilePromise(C,""),h.push(C));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(ue=>`${ue}
`).join(""),I=J.join(this.context.cwd,".gitignore");le.existsSync(I)||(await le.writeFilePromise(I,x),h.push(I));let O=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(ue=>`${ue}
`).join(""),U=J.join(this.context.cwd,".gitattributes");le.existsSync(U)||(await le.writeFilePromise(U,O),h.push(U));let V={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};Ge.mergeIntoTarget(V,r.get("initEditorConfig"));let te=`root = true
`;for(let[ue,ae]of Object.entries(V)){te+=`
[${ue}]
`;for(let[de,Ae]of Object.entries(ae)){let Ce=de.replace(/[A-Z]/g,Ee=>`_${Ee.toLowerCase()}`);te+=`${Ce} = ${Ae}
`}}let ie=J.join(this.context.cwd,".editorconfig");le.existsSync(ie)||(await le.writeFilePromise(ie,te),h.push(ie)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),le.existsSync(J.join(this.context.cwd,".git"))||(await qr.execvp("git",["init"],{cwd:this.context.cwd}),await qr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await qr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var JC=class extends J0{constructor(){super(...arguments);this.initializer=he.String();this.argv=he.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(`
`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var Tat={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[J0,JC]},Fat=Tat;var hW={};Vt(hW,{SearchCommand:()=>Aw,UpgradeInteractiveCommand:()=>pw,default:()=>qpt});qe();var Sme=et(Ie("os"));function KC({stdout:e}){if(Sme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!e.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Yt();var Lye=et(N9()),O9={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Qct=(0,Lye.default)(O9.appId,O9.apiKey).initIndex(O9.indexName),L9=async(e,t=0)=>await Qct.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10});var CD=["regular","dev","peer"],Aw=class extends At{static{this.paths=[["search"]]}static{this.usage=at.Usage({category:"Interactive commands",description:"open the search interface",details:`
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
`,examples:[["Open the search window","yarn search"]]})}async execute(){KC(this.context);let{Gem:t}=await Promise.resolve().then(()=>(xF(),nW)),{ScrollableItems:r}=await Promise.resolve().then(()=>(TF(),RF)),{useKeypress:s}=await Promise.resolve().then(()=>(fw(),iW)),{useMinistore:a}=await Promise.resolve().then(()=>(cW(),lW)),{renderForm:n}=await Promise.resolve().then(()=>(LF(),OF)),{default:c}=await Promise.resolve().then(()=>et(wwe())),{Box:f,Text:p}=await Promise.resolve().then(()=>et(qc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>et(gn())),S=await ze.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(f,{flexDirection:"row"},h.createElement(f,{flexDirection:"column",width:48},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),T=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),O=({hit:Ae,active:Ce})=>{let[Ee,g]=a(Ae.name,null);s({active:Ce},(me,ce)=>{if(ce.name!=="space")return;if(!Ee){g(CD[0]);return}let Z=CD.indexOf(Ee)+1;Z===CD.length?g(null):g(CD[Z])},[Ee,g]);let Se=j.parseIdent(Ae.name),Be=j.prettyIdent(S,Se);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Be)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},Ae.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},Ae.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,Ae.humanDownloadsLast30Days)))},U=({name:Ae,active:Ce})=>{let[Ee]=a(Ae,null),g=j.parseIdent(Ae);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0}," - ",j.prettyIdent(S,g))),CD.map(Se=>h.createElement(f,{key:Se,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(t,{active:Ee===Se})," ",h.createElement(p,{bold:!0},Se)))))},V=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ie=await n(({useSubmit:Ae})=>{let Ce=a();Ae(Ce);let Ee=Array.from(Ce.keys()).filter(_=>Ce.get(_)!==null),[g,Se]=C(""),[Be,me]=C(0),[ce,Z]=C([]),De=_=>{_.match(/\t| /)||Se(_)},Qe=async()=>{me(0);let _=await L9(g);_.query===g&&Z(_.hits)},st=async()=>{let _=await L9(g,Be+1);_.query===g&&_.page-1===Be&&(me(_.page),Z([...ce,..._.hits]))};return E(()=>{g?Qe():Z([])},[g]),h.createElement(f,{flexDirection:"column"},h.createElement(x,null),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(I,null)),ce.length?h.createElement(r,{radius:2,loop:!1,children:ce.map(_=>h.createElement(O,{key:_.name,hit:_,active:!1})),willReachEnd:st}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(T,null)),Ee.length?Ee.map(_=>h.createElement(U,{key:_,name:_,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(V,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>"u")return 1;let ue=Array.from(ie.keys()).filter(Ae=>ie.get(Ae)==="regular"),ae=Array.from(ie.keys()).filter(Ae=>ie.get(Ae)==="dev"),de=Array.from(ie.keys()).filter(Ae=>ie.get(Ae)==="peer");return ue.length&&await this.cli.run(["add",...ue]),ae.length&&await this.cli.run(["add","--dev",...ae]),de&&await this.cli.run(["add","--peer",...de]),0}};qe();Yt();AG();var xwe=et(pi());Al();var Pwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function kwe(e,t){return e.length>0?[e.slice(0,t)].concat(kwe(e.slice(t),t)):[]}var pw=class extends At{constructor(){super(...arguments);this.mode=he.String("--mode",{description:"Change what artifacts installs genera Line truncated
${E}, next tree:
${PD(f)}`);let S=Fwe(f);if(S)throw new Error(`${S}, after hoisting finished:
${PD(f)}`)}return n.debugLevel>=2&&console.log(PD(f)),iht(f)},Xpt=e=>{let t=e[e.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(t),r},Zpt=e=>{let t=e[e.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of e)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(t,a),r},Rwe=(e,t)=>{if(t.decoupled)return t;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:x,hoistedFrom:I,hoistedTo:T}=t,O={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:x,hoistedFrom:new Map(I),hoistedTo:new Map(T)},U=O.dependencies.get(r);return U&&U.ident==O.ident&&O.dependencies.set(r,O),e.dependencies.set(O.name,O),O},$pt=(e,t)=>{let r=new Map([[e.name,[e.ident]]]);for(let a of e.dependencies.values())e.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(t.keys());s.sort((a,n)=>{let c=t.get(a),f=t.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!e.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},yW=e=>{let t=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!e.peerNames.has(n)){let c=e.dependencies.get(n);c&&!t.has(c)&&r(c,a)}t.add(s)}};for(let s of e.dependencies.values())e.peerNames.has(s.name)||r(s);return t},IW=(e,t,r,s,a,n=new Set)=>{let c=t[t.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=sht(c),p=$pt(c,f),h=e==c?new Map:a.fastLookupPossible?Xpt(t):Zpt(t),E,C=!1,S=!1,x=new Map(Array.from(p.entries()).map(([T,O])=>[T,O[0]])),I=new Map;do{let T=rht(e,t,r,h,x,p,s,I,a);T.isGraphChanged&&(S=!0),T.anotherRoundNeeded&&(C=!0),E=!1;for(let[O,U]of p)U.length>1&&!c.dependencies.has(O)&&(x.delete(O),U.shift(),x.set(O,U[0]),E=!0)}while(E);for(let T of c.dependencies.values())if(!c.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let O=IW(e,[...t,T],r,I,a);O.isGraphChanged&&(S=!0),O.anotherRoundNeeded&&(C=!0),r.delete(T.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},eht=e=>{for(let[t,r]of e.dependencies)if(!e.peerNames.has(t)&&r.ident!==e.ident)return!0;return!1},tht=(e,t,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(t).map(O=>Bo(O)).join("\u2192")}`);let x=r[r.length-1],T=!(s.ident===x.ident);if(p&&!T&&(C="- self-reference"),T&&(T=s.dependencyKind!==1,p&&!T&&(C="- workspace")),T&&s.dependencyKind===2&&(T=!eht(s),p&&!T&&(C="- external soft link with unhoisted dependencies")),T&&(T=!e.peerNames.has(s.name),p&&!T&&(C=`- cannot shadow peer: ${Bo(e.originalDependencies.get(s.name).locator)} at ${E}`)),T){let O=!1,U=a.get(s.name);if(O=!U||U.ident===s.ident,p&&!O&&(C=`- filled by: ${Bo(U.locator)} at ${E}`),O)for(let V=r.length-1;V>=1;V--){let ie=r[V].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){O=!1;let ue=f.get(x);ue||(ue=new Set,f.set(x,ue)),ue.add(s.name),p&&(C=`- filled by ${Bo(ie.locator)} at ${r.slice(0,V).map(ae=>Bo(ae.locator)).join("\u2192")}`);break}}T=O}if(T&&(T=n.get(s.name)===s.ident,p&&!T&&(C=`- filled by: ${Bo(c.get(s.name)[0])} at ${E}`)),T){let O=!0,U=new Set(s.peerNames);for(let V=r.length-1;V>=1;V--){let te=r[V];for(let ie of U){if(te.peerNames.has(ie)&&te.originalDependencies.has(ie))continue;let ue=te.dependencies.get(ie);ue&&e.dependencies.get(ie)!==ue&&(V===r.length-1?S.add(ue):(S=null,O=!1,p&&(C=`- peer dependency ${Bo(ue.locator)} from parent ${Bo(te.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!O)break}T=O}if(T&&!h)for(let O of s.hoistedDependencies.values()){let U=a.get(O.name)||e.dependencies.get(O.name);if(!U||O.ident!==U.ident){T=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${Bo(O.locator)}, available: ${Bo(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:T?0:1,reason:C}},_F=e=>`${e.name}@${e.locator}`,rht=(e,t,r,s,a,n,c,f,p)=>{let h=t[t.length-1],E=new Set,C=!1,S=!1,x=(U,V,te,ie,ue)=>{if(E.has(ie))return;let ae=[...V,_F(ie)],de=[...te,_F(ie)],Ae=new Map,Ce=new Map;for(let me of yW(ie)){let ce=tht(h,r,[h,...U,ie],me,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Ce.set(me,ce),ce.isHoistable===2)for(let Z of ce.dependsOn){let Line truncated
${PD(e)}`)}let Be=yW(ie);for(let me of Be)if(Ee.has(me)){let ce=Ce.get(me);if((a.get(me.name)===me.ident||!ie.reasons.has(me.name))&&ce.isHoistable!==0&&ie.reasons.set(me.name,ce.reason),!me.isHoistBorder&&de.indexOf(_F(me))<0){E.add(ie);let De=Rwe(ie,me);x([...U,ie],ae,de,De,T),E.delete(ie)}}},I,T=new Set(yW(h)),O=Array.from(t).map(U=>_F(U));do{I=T,T=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let V=Rwe(h,U);x([],Array.from(r),O,V,T)}}while(T.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},Fwe=e=>{let t=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>Bo(S.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&t.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(", ")}`:""}`,T=`${x?` hoisted to ${x}`:""}`,O=`${C()}${I}`;E?E.ident!==h.ident&&t.push(`${O} - broken require promise for ${h.name}${T}: expected ${h.ident}, but found: ${E.ident}`):t.push(`${O} - broken require promise: no required dependency ${h.name}${T} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(e,e.dependencies,e),t.join(`
`)},nht=(e,t)=>{let{identName:r,name:s,reference:a,peerNames:n}=e,c={name:s,references:new Set([a]),locator:EW(r,a),ident:Qwe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[e,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:x,identName:I,reference:T,peerNames:O,hoistPriority:U,dependencyKind:V}=h,te=t.hoistingLimits.get(E.locator);C={name:x,references:new Set([T]),locator:EW(I,T),ident:Qwe(I,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(O),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(x):!1,hoistPriority:U||0,dependencyKind:V||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let x=new Set,I=T=>{if(!x.has(T)){x.add(T),T.decoupled=!1;for(let O of T.dependencies.values())T.peerNames.has(O.name)||I(O)}};I(C)}else for(let x of h.dependencies)p(x,C)};for(let h of e.dependencies)p(h,c);return c},CW=e=>e.substring(0,e.indexOf("@",1)),iht=e=>{let t={name:e.name,identName:CW(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:CW(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of e.dependencies.values())s(a,e,t);return t},sht=e=>{let t=new Map,r=new Set([e]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=t.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},t.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of e.dependencies.values())e.peerNames.has(c.name)||n(e,c);return t},Bo=e=>{if(!e)return"none";let t=e.indexOf("@",1),r=e.substring(0,t);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=e.substring(t+1);if(s==="workspace:.")return".";if(s){let a=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var PD=e=>{let t=0,r=(a,n,c="")=>{if(t>5e4||n.has(a))return"";t++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let C=a.reasons.get(E.name),S=CW(E.locator);p+=`${c}${h<f.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(S!==E.name?`a:${E.name}:`:"")+Bo(E.locator)+(C?` ${C}`:"")}
`,p+=r(E,n,`${c}${h<f.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(e,new Set)+(t>5e4?`
Tree is too large, part of the tree has been dunped
`:"")};var xD=(s=>(s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none",s))(xD||{}),Nwe="node_modules",eg="$wsroot$";var kD=(e,t)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=aht(e,t),c=null;if(a.length===0){let f=Twe(r,{hoistingLimits:s});c=cht(e,f,t)}return{tree:c,errors:a,preserveSymlinksRequired:n}},gA=e=>`${e.name}@${e.reference}`,BW=e=>{let t=new Map;for(let[r,s]of e.entries())if(!s.dirList){let a=t.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},t.set(s.locator,a)),a.locations.push(r)}for(let r of t.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(J.delimiter).length,c=a.split(J.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return t},Owe=(e,t)=>{let r=j.isVirtualLocator(e)?j.devirtualizeLocator(e):e,s=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t;return j.areLocatorsEqual(r,s)},wW=(e,t,r,s)=>{if(e.linkType!=="SOFT")return!1;let a=fe.toPortablePath(r.resolveVirtual&&t.reference&&t.reference.startsWith("virtual:")?r.resolveVirtual(e.packageLocation):e.packageLocation);return J.contains(s,a)===null},oht=e=>{let t=e.getPackageInformation(e.topLevel);if(t===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(e.findPackageLocator(t.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=fe.toPortablePath(t.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=e.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,x)=>{let I=gA(S);if(p.has(I))return;p.add(I);let T=e.getPackageInformation(S);if(T){let O=x?gA(x):"";if(gA(S)!==O&&T.linkType==="SOFT"&&!S.reference.startsWith("link:")&&!wW(T,S,e,s)){let U=Lwe(T,S,e);(!f.get(U)||S.reference.startsWith("workspace:"))&&f.set(U,S)}for(let[U,V]of T.packageDependencies)V!==null&&(T.packagePeers.has(U)||h(e.getLocator(U,V),S))}};for(let S of c)h(S,null);let E=s.split(J.sep);for(let S of f.values()){let x=e.getPackageInformation(S),T=fe.toPortablePath(x.packageLocation.slice(0,-1)).split(J.sep).slice(E.length),O=n;for(let U of T){let V=O.children.get(U);V||(V={children:new Map},O.children.set(U,V)),O=V}O.workspaceLocator=S}let C=(S,x)=>{if(S.workspaceLocator){let I=gA(x),T=a.get(I);T||(T=new Set,a.set(I,T)),T.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||x)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},aht=(e,t)=>{let r=[],s=!1,a=new Map,n=oht(e),c=e.getPackageInformation(e.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=e.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=fe.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(x,I)=>`${gA(I)}:${x}`,S=(x,I,T,O,U,V,te,ie)=>{let ue=C(x,T),ae=E.get(ue),de=!!ae;!de&&T.name===f.name&&T.reference===f.reference&&(ae=h,E.set(ue,h));let Ae=wW(I,T,e,p);if(!ae){let me=0;Ae?me=2:I.linkType==="SOFT"&&T.name.endsWith(eg)&&(me=1),ae={name:x,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:me===1?new Set:I.packagePeers,dependencyKind:me},E.set(ue,ae)}let Ce;if(Ae?Ce=2:U.linkType==="SOFT"?Ce=1:Ce=0,ae.hoistPriority=Math.max(ae.hoistPriority||0,Ce),ie&&!Ae){let me=gA({name:O.identName,reference:O.reference}),ce=a.get(me)||new Set;a.set(me,ce),ce.add(ae.name)}let Ee=new Map(I.packageDependencies);if(t.project){let me=t.project.workspacesByCwd.get(fe.toPortablePath(I.packageLocation.slice(0,-1)));if(me){let ce=new Set([...Array.from(me.manifest.peerDependencies.values(),Z=>j.stringifyIdent(Z)),...Array.from(me.manifest.peerDependenciesMeta.keys())]);for(let Z of ce)Ee.has(Z)||(Ee.set(Z,V.get(Z)||null),ae.peerNames.add(Z))}}let g=gA({name:T.name.replace(eg,""),reference:T.reference}),Se=n.get(g);if(Se)for(let me of Se)Ee.set(`${me.name}${eg}`,me.reference);(I!==U||I.linkType!=="SOFT"||!Ae&&(!t.selfReferencesByCwd||t.selfReferencesByCwd.get(te)))&&O.dependencies.add(ae);let Be=T!==f&&I.linkType==="SOFT"&&!T.name.endsWith(eg)&&!Ae;if(!de&&!Be){let me=new Map;for(let[ce,Z]of Ee)if(Z!==null){let De=e.getLocator(ce,Z),Qe=e.getLocator(ce.replace(eg,""),Z),st=e.getPackageInformation(Qe);if(st===null)throw new Error("Assertion failed: Expected the package to have been registered");let _=wW(st,De,e,p);if(t.validateExternalSoftLinks&&t.project&&_){st.packageDependencies.size>0&&(s=!0);for(let[je,Re]of st.packageDependencies)if(Re!==null){let ct=j.parseLocator(Array.isArray(Re)?`${Re[0]}@${Re[1]}`:`${je}@${Re}`);if(gA(ct)!==gA(De)){let Me=Ee.get(je);if(Me){let P=j.parseLocator(Array.isArray(Me)?`${Me[0]}@${Me[1]}`:`${je}@${Me}`);Owe(P,ct)||r.push({messageName:71,text:`Cannot link ${j.prettyIdent(t.project.configuration,j.parseIdent(De.name))} into ${j.pretLine truncated
`;for(let n=0,c=e.length;n<c;++n)a+=s+HF(String(n),e[n],t,s).replace(/^ +/,""),n+1<c&&(a+=","),a+=`
`;return a+=r,a+="]",a}function Aht(e,t,r){let s=Object.keys(e),a="";a+="{";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=e[p];typeof h>"u"||(f!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=HF(p,h,t,r).replace(/^ +/g,""),f+=1)}return a+="}",a}function pht(e,t,r){let s=Object.keys(e),a=`${r} `,n="";n+=r,n+=`{
`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=e[h];typeof E>"u"||(c!==0&&(n+=",",n+=`
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=HF(h,E,t,a).replace(/^ +/g,""),c+=1)}return c!==0&&(n+=`
`),n+=r,n+="}",n}function HF(e,t,r,s){let{next:a}=Mwe[r],n=a[e]||a["*"];return Uwe(t,n,s)}function Uwe(e,t,r){let{collapsed:s}=Mwe[t];return Array.isArray(e)?s?uht(e,t,r):fht(e,t,r):typeof e=="object"&&e!==null?s?Aht(e,t,r):pht(e,t,r):JSON.stringify(e)}function _we(e){return Uwe(e,"TOP_LEVEL","")}function QD(e,t){let r=Array.from(e);Array.isArray(t)||(t=[t]);let s=[];for(let n of t)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function hht(e){let t=new Map,r=QD(e.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=t.get(s);typeof n>"u"&&t.set(s,n=new Set),n.add(a)}return Array.from(t).map(([s,a])=>[s,Array.from(a)])}function ght(e){return QD(e.fallbackPool||[],([t])=>t)}function dht(e){let t=[],r=e.dependencyTreeRoots.find(s=>e.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation==="./");for(let[s,a]of QD(e.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(s===null)continue;let n=[];t.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of QD(a,([S])=>S===null?"0":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,V]of p)S.push([U,V]);let x=QD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,O={packageLocation:f,packageDependencies:x,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,O]),r&&s===r.name&&c===r.reference&&t.unshift([null,[[null,O]]])}}return t}function RD(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,pnpZipBackend:e.pnpZipBackend,fallbackExclusionList:hht(e),fallbackPool:ght(e),packageRegistryData:dht(e)}}var Gwe=et(jwe());function qwe(e,t){return[e?`${e}
`:"",`/* eslint-disable */
`,`// @ts-nocheck
`,`"use strict";
`,`
`,t,`
`,(0,Gwe.default)()].join("")}function mht(e){return JSON.stringify(e,null,2)}function yht(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
`)}'`}function Eht(e){return[`const RAW_RUNTIME_STATE =
`,`${yht(_we(e))};
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
`,`}
`].join("")}function Iht(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` const fs = require('fs');
`,` const path = require('path');
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)});
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
`,`}
`].join("")}function Wwe(e){let t=RD(e),r=Eht(t);return qwe(e.shebang,r)}function Ywe(e){let t=RD(e),r=Iht(),s=qwe(e.shebang,r);return{dataFile:mht(t),loaderFile:s}}Dt();function SW(e,{basePath:t}){let r=fe.toPortablePath(t),s=J.resolve(r),a=e.ignorePatternData!==null?new RegExp(e.ignorePatternData):null,n=new Map,c=new Map(e.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([x,I])=>{if(C===null!=(x===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let T=I.discardFromLookup??!1,O={name:C,reference:x},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&T,T||(U.locator=O)):n.set(I.packageLocation,{locator:O,discardFromLookup:T});let V=null;return[x,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:T,get packageLocation(){return V||(V=J.join(s,I.packageLocation))}}]}))])),f=new Map(e.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(e.fallbackPool),h=e.dependencyTreeRoots,E=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:e.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}Dt();Dt();var ih=Ie("module"),Wm=Ie("url"),OW=Ie("util");var oa=Ie("url");var zwe=et(Ie("assert"));var DW=Array.isArray,TD=JSON.stringify,FD=Object.getOwnPropertyNames,qm=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),bW=(e,t)=>RegExp.prototype.exec.call(e,t),PW=(e,...t)=>RegExp.prototype[Symbol.replace].apply(e,t),tg=(e,...t)=>String.prototype.endsWith.apply(e,t),xW=(e,...t)=>String.prototype.includes.apply(e,t),kW=(e,...t)=>String.prototype.lastIndexOf.apply(e,t),ND=(e,...t)=>String.prototype.indexOf.apply(e,t),Vwe=(e,...t)=>String.prototype.replace.apply(e,t),rg=(e,...t)=>String.prototype.slice.apply(e,t),dA=(e,...t)=>String.prototype.startsWith.apply(e,t),Jwe=Map,Kwe=JSON.parse;function OD(e,t,r){return class extends r{constructor(...s){super(t(...s)),this.code=e,this.name=`${r.name} [${e}]`}}}var Xwe=OD("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError),QW=OD("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),Zwe=OD("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,a=void 0)=>{let n=typeof r=="string"&&!s&&r.length&&!dA(r,"./");return t==="."?((0,zwe.default)(s===!1),`Invalid "exports" main target ${TD(r)} defined in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${TD(r)} defined for '${t}' in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),LD=OD("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),$we=OD("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);var GF=Ie("url");function e1e(e,t){let r=Object.create(null);for(let s=0;s<t.length;s++){let a=t[s];qm(e,a)&&(r[a]=e[a])}return r}var jF=new Jwe;function Cht(e,t,r,s){let a=jF.get(e);if(a!==void 0)return a;let n=s(e);if(n===void 0){let x={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return jF.set(e,x),x}let c;try{c=Kwe(n)}catch(x){throw new LD(e,(r?`"${t}" from `:"")+(0,GF.fileURLToPath)(r||t),x.message)}let{imports:f,main:p,name:h,type:E}=e1e(c,["imports","main","name","type"]),C=qm(c,"exports")?c.exports:void 0;(typeof f!="object"||f===null)&&(f=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let S={pjsonPath:e,exists:!0,main:p,name:h,type:E,exports:C,imports:f};return jF.set(e,S),S}function t1e(e,t){let r=new URL("./package.json",e);for(;;){let n=r.pathname;if(tg(n,"node_modules/package.json"))break;let c=Cht((0,GF.fileURLToPath)(r),e,void 0,t);if(c.exists)return c;let f=r;if(r=new URL("../package.json",r),r.pathname===f.pathname)break}let s=(0,GF.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return jF.set(s,a),a}function wht(e,t,r){throw new Xwe(e,t&&(0,oa.fileURLToPath)(new URL(".",t)),(0,oa.fileURLToPath)(r))}function Bht(e,t,r,s){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,oa.fileURLToPath)(t)}`;throw new QW(e,a,s&&(0,oa.fileURLToPath)(s))}function MD(e,t,r,s,a){throw typeof t=="object"&&t!==null?t=TD(t,null,""):t=`${t}`,new Zwe((0,oa.fileURLToPath)(new URL(".",r)),e,t,s,a&&(0,oa.fileURLToPath)(a))}var r1e=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f Line truncated
`),r;c=e[++n]}else if(c===" "&&!s){a=!0;continue}else if(c==='"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&t.push(`invalid value for NODE_OPTIONS (unterminated string)
`),r}Dt();var[vo,Yc]=process.versions.node.split(".").map(e=>parseInt(e,10)),p1e=vo>19||vo===19&&Yc>=2||vo===18&&Yc>=13,KKt=vo===20&&Yc<6||vo===19&&Yc>=3,zKt=vo>19||vo===19&&Yc>=6,XKt=vo>=21||vo===20&&Yc>=10||vo===18&&Yc>=19,ZKt=vo>=21||vo===20&&Yc>=10||vo===18&&Yc>=20,$Kt=vo>=22,ezt=vo===26&&Yc<1||vo===25&&Yc>=7||vo===24&&Yc>=15;function NW(e){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send){let t=e.map(r=>fe.fromPortablePath(mo.resolveVirtual(r)));if(p1e)process.send({"watch:require":t});else for(let r of t)process.send({"watch:require":r})}}function LW(e,t){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,c=/\/$/,f=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(e.enableTopLevelFallback===!0&&h.push(p),t.compatibilityMode!==!1)for(let Ne of["react-scripts","gatsby"]){let ke=e.packageRegistry.get(Ne);if(ke)for(let be of ke.keys()){if(be===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Ne,reference:be})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:x}=e;function I(Ne,ke){return{fn:Ne,args:ke,error:null,result:null}}function T(Ne){let ke=process.stderr?.hasColors?.()??process.stdout.isTTY,be=(ct,Me)=>`\x1B[${ct}m${Me}\x1B[0m`,je=Ne.error;console.error(je?be("31;1",`\u2716 ${Ne.error?.message.replace(/\n.*/s,"")}`):be("33;1","\u203C Resolution")),Ne.args.length>0&&console.error();for(let ct of Ne.args)console.error(` ${be("37;1","In \u2190")} ${(0,OW.inspect)(ct,{colors:ke,compact:!0})}`);Ne.result&&(console.error(),console.error(` ${be("37;1","Out \u2192")} ${(0,OW.inspect)(Ne.result,{colors:ke,compact:!0})}`));let Re=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Re.length>0){console.error();for(let ct of Re)console.error(` ${be("38;5;244",ct)}`)}console.error()}function O(Ne,ke){if(t.allowDebug===!1)return ke;if(Number.isFinite(s)){if(s>=2)return(...be)=>{let je=I(Ne,be);try{return je.result=ke(...be)}catch(Re){throw je.error=Re}finally{T(je)}};if(s>=1)return(...be)=>{try{return ke(...be)}catch(je){let Re=I(Ne,be);throw Re.error=je,T(Re),je}}}return ke}function U(Ne){let ke=g(Ne);if(!ke)throw ys("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return ke}function V(Ne){if(Ne.name===null)return!0;for(let ke of e.dependencyTreeRoots)if(ke.name===Ne.name&&ke.reference===Ne.reference)return!0;return!1}let te=new Set(["node","require",...A1e("--conditions")]);function ie(Ne,ke=te,be){let je=me(J.join(Ne,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(je===null)throw ys("INTERNAL",`The locator that owns the "${Ne}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Re}=U(je),ct=J.join(Re,Er.manifest);if(!t.fakeFs.existsSync(ct))return null;let Me=JSON.parse(t.fakeFs.readFileSync(ct,"utf8"));if(Me.exports==null)return null;let P=J.contains(Re,Ne);if(P===null)throw ys("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");P!=="."&&!f.test(P)&&(P=`./${P}`);try{let w=o1e({packageJSONUrl:(0,Wm.pathToFileURL)(fe.fromPortablePath(ct)),packageSubpath:P,exports:Me.exports,base:be?(0,Wm.pathToFileURL)(fe.fromPortablePath(be)):null,conditions:ke});return fe.toPortablePath((0,Wm.fileURLToPath)(w))}catch(w){throw ys("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:ff(Ne),locator:je,pkgJson:Me,subpath:ff(P),conditions:ke},w.code)}}function ue(Ne,ke,{extensions:be}){let je;try{ke.push(Ne),je=t.fakeFs.statSync(Ne)}catch{}if(je&&!je.isDirectory())return t.fakeFs.realpathSync(Ne);if(je&&je.isDirectory()){let Re;try{Re=JSON.parse(t.fakeFs.readFileSync(J.join(Ne,Er.manifest),"utf8"))}catch{}let ct;if(Re&&Re.main&&(ct=J.resolve(Ne,Re.main)),ct&&ct!==Ne){let Me=ue(ct,ke,{extensions:be});if(Me!==null)return Me}}for(let Re=0,ct=be.length;Re<ct;Re++){let Me=`${Ne}${be[Re]}`;if(ke.push(Me),t.fakeFs.existsSync(Me))return Me}if(je&&je.isDirectory())for(let Re=0,ct=be.length;Re<ct;Re++){let Me=J.format({dir:Ne,name:"index",ext:be[Re]});if(ke.push(Me),t.fakeFs.existsSync(Me))return Me}return null}function ae(Ne){let ke=new ih.Module(Ne,null);return ke.filename=Ne,ke.paths=ih.Module._nodeModulePaths(Ne),ke}function de(Ne,ke){return ke.endsWith("/")&&(ke=J.join(ke,"internal.js")),ih.Module._resolveFilename(fe.fromPortablePath(Ne),ae(fe.fromPortablePath(ke)),!1,{plugnplay:!1})}function Ae(Ne){if(C===null)return!1;let ke=J.contains(e.basePath,Ne);return ke===null?!1:!!C.test(ke.replace(/\/$/,""))}let Ce={std:3,resolveVirtual:1,getAllLocators:1},Ee=p;function g({name:Ne,reference:ke}){let be=S.get(Ne);if(!be)return null;let je=be.get(ke);return je||null}function Se({name:Ne,reference:ke}){let be=[];for(let[je,Re]of S)if(je!==null)for(let[ct,Me]of Re)ct===null||Me.packageDependencies.get(Ne)!==ke||Line truncated
Require request: "${je}"
Required by: ${Re}
`,{request:je,issuer:Re});return fe.toPortablePath(P)}let ct,Me=Ne.match(a);if(Me){if(!ke)throw ys("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:je,issuer:Re});let[,P,w]=Me,b=me(ke);if(!b){let Fe=de(Ne,ke);if(Fe===!1)throw ys("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
Require path: "${je}"
Required by: ${Re}
`,{request:je,issuer:Re});return fe.toPortablePath(Fe)}let F=U(b).packageDependencies.get(P),z=null;if(F==null&&b.name!==null){let Fe=e.fallbackExclusionList.get(b.name);if(!Fe||!Fe.has(b.reference)){for(let Ct=0,qt=h.length;Ct<qt;++Ct){let Pt=U(h[Ct]).packageDependencies.get(P);if(Pt!=null){r?z=Pt:F=Pt;break}}if(e.enableTopLevelFallback&&F==null&&z===null){let Ct=e.fallbackPool.get(P);Ct!=null&&(z=Ct)}}}let X=null;if(F===null)if(V(b))X=ys("MISSING_PEER_DEPENDENCY",`Your application tried to access ${P} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P});else{let Fe=Be(P,b);Fe.every(ut=>V(ut))?X=ys("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${P} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${b.name}@${b.reference} (via ${Re})
${Fe.map(ut=>`Ancestor breaking the chain: ${ut.name}@${ut.reference}
`).join("")}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},b),dependencyName:P,brokenAncestors:Fe}):X=ys("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${P} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${b.name}@${b.reference} (via ${Re})
${Fe.map(ut=>`Ancestor breaking the chain: ${ut.name}@${ut.reference}
`).join("")}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},b),dependencyName:P,brokenAncestors:Fe})}else F===void 0&&(!be&&(0,ih.isBuiltin)(Ne)?V(b)?X=ys("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${P} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P}):X=ys("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${P}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${P} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},b),dependencyName:P}):V(b)?X=ys("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P}):X=ys("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${P}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${b.name}@${b.reference} (via ${Re})
`,{request:je,issuer:Re,issuerLocator:Object.assign({},b),dependencyName:P}));if(F==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=z;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&s!==0&&(E.add(Fe),process.emitWarning(X))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:P,reference:F},se=U($);if(!se.packageLocation)throw ys("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
Required package: ${$.name}@${$.reference}${$.name!==je?` (via "${je}")`:""}
Required by: ${b.name}@${b.reference} (via ${Re})
`,{request:je,issuer:Re,dependencyLocator:Object.assign({},$)});let xe=se.packageLocation;w?ct=J.join(xe,w):ct=xe}else if(J.isAbsolute(Ne))ct=J.normalize(Ne);else{if(!ke)throw ys("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:je,issuer:Re});let P=J.resolve(ke);ke.match(c)?ct=J.normalize(J.join(P,Ne)):ct=J.normalize(J.join(J.dirname(P),Ne))}return J.normalize(ct)}function De(Ne,ke,be=te,je){if(n.test(Ne))return ke;let Re=ie(ke,be,je);return Re?J.normalize(Re):ke}function Qe(Ne,{extensions:ke=Object.keys(ih.Module._extensions)}={}){let be=[],je=ue(Ne,be,{extensions:ke});if(je)return NW([je]),J.normalize(je);{NW(be);let Re=ff(Ne),ct=me(Ne);if(ct){let{packageLocation:Me}=U(ct),P=!0;try{t.fakeFs.accessSync(Me)}catch(w){if(w?.code==="ENOENT")P=!1;else{let b=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw ys("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${b}).
Missing package: ${ct.name}@${ct.reference}
Expected package location: ${ff(Me)}
`,{unqualifiedPath:Re,extensions:ke})}}if(!P){let w=Me.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ys("QUALIFIED_PATH_RESOLUTION_FAILED",`${w}
Missing package: ${ct.name}@${ct.reference}
Expected package location: ${ff(Me)}
`,{unqualifiedPath:Re,extensions:ke})}}throw ys("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
Source path: ${Re}
${be.map(Me=>`Not found: ${ff(Me)}
`).join("")}`,{unqualifiedPath:Re,extensions:ke})}}function st(Ne,ke,be){if(!ke)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let je=a1e({name:Ne,base:(0,Wm.pathToFileURL)(fe.fromPortablePath(ke)),conditions:be.conditions??te,readFileSyncFn:ce});if(je instanceof URL)return Qe(fe.toPortablePath((0,Wm.fileURLToPath)(je)),{extensions:be.extensions});if(je.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return _(je,ke,be)}function _(Ne,ke,be={}){try{if(Ne.startsWith("#"))return st(Ne,ke,be);let{considerBuiltins:je,extensions:Re,conditions:ct}=be,Me=Z(Ne,ke,{considerBuiltins:je});if(Ne==="pnpapi")return Me;if(Me===null)return null;let P=()=>ke!==null?Ae(ke):!1,w=(!je||!(0,ih.isBuiltin)(Ne))&&!P()?De(Ne,Me,ct,ke):Me;return Qe(w,{extensions:Re})}catch(je){throw Object.hasOwn(je,"pnpCode")&&Object.assign(je.data,{request:ff(Ne),issuer:ke&&ff(ke)}),je}}function tt(Ne){let ke=J.normalize(Ne),be=mo.resolveVirtual(ke);return be!==ke?be:null}return{VERSIONS:Ce,topLevel:Ee,getLocator:(Ne,ke)=>Array.isArray(ke)?{name:ke[0],reference:ke[1]}:{name:Ne,reference:ke},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){let Ne=[];for(let[ke,be]of S)for(let je of be.keys())ke!==null&&je!==null&&Ne.push({name:ke,reference:je});return Ne},getPackageInformation:Ne=>{let ke=g(Ne);if(ke===null)return null;let be=fe.fromPortablePath(ke.packageLocation);return{...ke,packageLocation:be}},findPackageLocator:Ne=>me(fe.toPortablePath(Ne)),resolveToUnqualified:O("resolveToUnqualified",(Ne,ke,be)=>{let je=ke!==null?fe.toPortablePath(ke):null,Re=Z(fe.toPortablePath(Ne),je,be);return Re===null?null:fe.fromPortablePath(Re)}),resolveUnqualified:O("resolveUnqualified",(Ne,ke)=>fe.fromPortablePath(Qe(fe.toPortablePath(Ne),ke))),resolveRequest:O("resolveRequest",(Ne,ke,be)=>{let je=ke!==null?fe.toPortablePath(ke):null,Re=_(fe.toPortablePath(Ne),je,be);return Re===null?null:fe.fromPortablePath(Re)}),resolveVirtual:O("resolveVirtual",Ne=>{let ke=tt(fe.toPortablePath(Ne));return ke!==null?fe.fromPortablePath(ke):null})}}Dt();var h1e=(e,t,r)=>{let s=RD(e),a=SW(s,{basePath:t}),n=fe.join(t,Er.pnpCjs);return LW(a,{fakeFs:r,pnpapiResolution:n})};var UW=et(d1e());Yt();var mA={};Vt(mA,{checkManifestCompatibility:()=>m1e,extractBuildRequest:()=>qF,getExtractHint:()=>_W,hasBindingGyp:()=>HW});qe();Dt();function m1e(e){return j.isPackageCompatible(e,Ui.getArchitectureSet())}function qF(e,t,r,{configuration:s}){let a=[];for(let n of["preinstall","install","postinstall"])t.manifest.scripts.has(n)&&a.push({type:0,script:n});return!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:e.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${j.prettyLocator(s,e)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${j.prettyLocator(s,e)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${j.prettyLocator(s,e)} lists build scripts, but all build scripts have been disabled.`)}:m1e(e)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${j.prettyLocator(s,e)} The ${Ui.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var Tht=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function _W(e){return e.packageFs.getExtractHint({relevantExtensions:Tht})}function HW(e){let t=J.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}var HD={};Vt(HD,{getUnpluggedPath:()=>_D});qe();Dt();function _D(e,{configuration:t}){return J.resolve(t.get("pnpUnpluggedFolder"),j.slugifyLocator(e))}var Fht=new Set([j.makeIdent(null,"open").identHash,j.makeIdent(null,"opn").identHash]),ng=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let s=ig(r.project).cjs;if(!le.existsSync(s))throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=Ge.getFactoryWithDefault(this.pnpCache,s,()=>Ge.dynamicRequire(s,{cachingStrategy:Ge.CachingStrategy.FsTime})),n={name:j.stringifyIdent(t),reference:t.reference},c=a.getPackageInformation(n);if(!c)throw new it(`Couldn't find ${j.prettyLocator(r.project.configuration,t)} in the currently installed PnP map - running an install might help`);return fe.toPortablePath(c.packageLocation)}async findPackageLocator(t,r){if(!this.isEnabled(r))return nullLine truncated
`,n+=`# cause your node_modules installation to become invalidated.
`,n+=`
`,n+=`__metadata:
`,n+=` version: ${k1e}
`,n+=` nmMode: ${s.value}
`;let c=Array.from(t.keys()).sort(),f=j.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(let E of c){let C=t.get(E);n+=`
`,n+=`${JSON.stringify(E)}:
`,n+=` locations:
`;for(let S of C.locations){let x=J.contains(e.cwd,S);if(x===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` - ${JSON.stringify(x)}
`}if(C.aliases.length>0){n+=` aliases:
`;for(let S of C.aliases)n+=` - ${JSON.stringify(S)}
`}if(E===f&&r.size>0){n+=` bin:
`;for(let[S,x]of r){let I=J.contains(e.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` ${JSON.stringify(I)}:
`;for(let[T,O]of x){let U=J.relative(J.join(S,Pi),O);n+=` ${JSON.stringify(T)}: ${JSON.stringify(U)}
`}}}}let p=e.cwd,h=J.join(p,Pi,XW);try{a&&await le.removePromise(h),await le.changeFilePromise(h,n,{automaticNewlines:!0})}finally{n0t(e)}}async function o0t(e){let t=e.cwd,r=J.join(t,Pi,XW);try{let s=await le.statPromise(r);return`${s.mtimeMs}:${s.size}`}catch{return null}}async function Q1e(e,{unrollAliases:t=!1}={}){let r=e.cwd,s=J.join(r,Pi,XW),a;try{a=await le.statPromise(s)}catch{}if(!a)return null;let n=cs(await le.readFilePromise(s,"utf8"));if(n.__metadata.version>k1e)return null;let c=n.__metadata.nmMode||"classic",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(x=>J.join(r,x)),S=E.bin;if(S)for(let[x,I]of Object.entries(S)){let T=J.join(r,fe.toPortablePath(x)),O=Ge.getMapWithDefault(p,T);for(let[U,V]of Object.entries(I))O.set(U,fe.toPortablePath([T,Pi,V].join(J.sep)))}if(f.set(h,{target:vt.dot,linkType:"HARD",locations:C,aliases:E.aliases||[]}),t&&E.aliases)for(let x of E.aliases){let{scope:I,name:T}=j.parseLocator(h),O=j.makeLocator(j.makeIdent(I,T),x),U=j.stringifyLocator(O);f.set(U,{target:vt.dot,linkType:"HARD",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:R1e(f,{skipPrefix:e.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var Ew=async(e,t)=>{if(e.split(J.sep).indexOf(Pi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${e}`);try{let r;if(!t.innerLoop&&(r=await le.lstatPromise(e),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!t.isWorkspaceDir)){await le.unlinkPromise(e);return}let s=await le.readdirPromise(e,{withFileTypes:!0});for(let n of s){let c=J.join(e,n.name);n.isDirectory()?(n.name!==Pi||t&&t.innerLoop)&&await Ew(c,{innerLoop:!0,contentsOnly:!1}):await le.unlinkPromise(c)}let a=!t.innerLoop&&t.isWorkspaceDir&&r?.isSymbolicLink();!t.contentsOnly&&!a&&await le.rmdirPromise(e)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},D1e=4,VF=(e,{skipPrefix:t})=>{let r=J.contains(t,e);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${e} which is outside project root: ${t}`);let s=r.split(J.sep).filter(p=>p!==""),a=s.indexOf(Pi),n=s.slice(0,a).join(J.sep),c=J.join(t,n),f=s.slice(a);return{locationRoot:c,segments:f}},R1e=(e,{skipPrefix:t})=>{let r=new Map;if(e===null)return r;let s=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of e.entries()){if(n.linkType==="SOFT"&&J.contains(t,n.target)!==null){let f=Ge.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=VF(c,{skipPrefix:t}),h=Ge.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let C=p[E];if(C!=="."){let S=Ge.getFactoryWithDefault(h.children,C,s);h.children.set(C,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},$W=async(e,t,r)=>{if(process.platform==="win32"&&r==="junctions"){let s;try{s=await le.lstatPromise(e)}catch{}if(!s||s.isDirectory()){await le.symlinkPromise(e,t,"junction");return}}await le.symlinkPromise(J.relative(J.dirname(t),e),t)};async function T1e(e,t,r){let s=J.join(e,`${zW.default.randomBytes(16).toString("hex")}.tmp`);try{await le.writeFilePromise(s,r);try{await le.linkPromise(s,t)}catch{}}finally{await le.unlinkPromise(s)}}async function a0t({srcPath:e,dstPath:t,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&s&&r.digest){let f=J.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await le.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-r0t))if(await Ln.checksumFile(f,{baseFs:le,algorithm:"sha1"})!==r.digest){let C=J.join(s,`${zW.default.randomBytes(16).toString("hex")}.tmp`);await le.renamePromise(f,C);let S=await a.readFilePromise(e);await le.writeFilePromise(C,S);try{await le.linkPromise(C,f),r.mtimeMs=new Date().getTime(),await le.unlinkPromise(C)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await le.linkPromise(f,t),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(e);await T1e(s,f,h),r.mtimeMs=new Date().getTime();try{await le.linkPromise(f,t)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(e,t))}}}else await a.copyFilePromise(e,t);let c=r.mode&511;c!==420&&await le.chmodPromise(t,c)}}var l0t=async(e,t,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await le.mkdirPromise(e,{recursive:!0});let f=async(E=vt.dot)=>{let C=J.join(t,E),S=await r.readdirPromise(C,{withFileTypes:!0}),x=new Map;for(let I of S){let T=J.join(E,I.name),O,U=J.join(C,I.name);if(I.isFile()){if(O={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let V=await Ln.checksumFile(U,{baseFs:r,algorithm:"sha1"});O.digest=V}}else if(I.isDirectory())O={kind:"directory"};else if(I.isSymbolicLink())O={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(x. Line truncated
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:s}=await(0,sY.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
`),s}function KF(e){if(e.originalError?.name!=="HTTPError")return!1;try{return(e.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function ww(e){return{"npm-otp":e}}async function N0t(e,{configuration:t,ident:r}){let s=null;if(process.env.GITLAB_CI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.CIRCLECI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.GITHUB_ACTIONS){if(!(process.env.ACTIONS_ID_TOKEN_REQUEST_URL&&process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN))return null;let a=`npm:${new URL(e).host.replace("registry.yarnpkg.com","registry.npmjs.org").replace("yarn.npmjs.org","registry.npmjs.org")}`,n=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);n.searchParams.append("audience",a),s=(await nn.get(n.href,{configuration:t,jsonResponse:!0,headers:{Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).value}if(!s)return null;try{return(await nn.post(`${e}/-/npm/v1/oidc/token/exchange/package${WD(r)}`,null,{configuration:t,jsonResponse:!0,headers:{Authorization:`Bearer ${s}`}})).token||null}catch{}return null}var VD=class{supports(t,r){if(!t.reference.startsWith(ei))return!1;let{selector:s,params:a}=j.parseRange(t.reference);return!(!j1e.default.valid(s)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),checksum:c}}async fetchFromNetwork(t,r){let{params:s}=j.parseRange(t.reference);if(s===null||typeof s.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Jm(s.__archiveUrl,{customErrorMessage:Vm,configuration:r.project.configuration,ident:t});return await ds.convertToZip(a,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(t),stripComponents:1})}};qe();var JD=class{supportsDescriptor(t,r){return!(!t.range.startsWith(ei)||!j.tryParseDescriptor(t.range.slice(ei.length),!0))}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Unreachable")}bindDescriptor(t,r,s){return t}getResolutionDependencies(t,r){let s=r.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ei.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(t,r,s){let a=s.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ei.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(t,r,s,a){let n=a.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ei.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(t,r){throw new Error("Unreachable")}};qe();qe();var G1e=et(pi());var sh=class e{supports(t,r){if(!t.reference.startsWith(ei))return!1;let s=new URL(t.reference);return!(!G1e.default.valid(s.pathname)||s.searchParams.has("__archiveUrl"))}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),checksum:c}}async fetchFromNetwork(t,r){let s;try{s=await Jm(e.getLocatorUrl(t),{customErrorMessage:Vm,configuration:r.project.configuration,ident:t})}catch{s=await Jm(e.getLocatorUrl(t).replace(/%2f/g,"/"),{customErrorMessage:Vm,configuration:r.project.configuration,ident:t})}return await ds.convertToZip(s,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(t),stripComponents:1})}static isConventionalTarballUrl(t,r,{configuration:s}){let a=Iw(t.scope,{configuration:s}),n=e.getLocatorUrl(t);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(t){let r=kr.clean(t.reference.slice(ei.length));if(r===null)throw new Lt(10,"The npm semver resolver got selected, but the version isn't semver");let s=encodeURIComponent(t.name),a=encodeURIComponent(r);return`${WD(t)}/-/${s}-${a}.tgz`}};qe();qe();qe();var aY=et(pi());var zF=j.makeIdent(null,"node-gyp"),O0t=/\b(node-gyp|prebuild-install)\b/,KD=class{supportsDescriptor(t,r){return t.range.startsWith(ei)?!!kr.validRange(t.range.slice(ei.length)):!1}supportsLocator(t,r){if(!t.rLine truncated
https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:yvt,subject:e,predicateType:Ivt,predicate:{buildType:`${vvt}/${Svt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Lt(91,"Provenance generation is only supported in GitHub Actions and GitLab CI");return kbe.attest(Buffer.from(JSON.stringify(r)),mvt,t)};async function Dvt(e,t,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=e.manifest.name,p=e.manifest.version,h=j.stringifyIdent(f),E=Rbe.default.fromData(t,{algorithms:["sha1","sha512"]}),C=r??Tbe(e,f),S=await Fbe(e),x=await IA.genPackageManifest(e),I=`${h}-${p}.tgz`,T=new URL(`${Jc(a)}/${h}/-/${I}`),O={[I]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,"%40")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},V=await Qbe([U]),te=JSON.stringify(V);O[`${h}-${p}.sigstore`]={content_type:V.mediaType,data:te,length:te.length}}return{_id:h,_attachments:O,name:h,access:C,"dist-tags":{[s]:p},versions:{[p]:{...x,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:T.toString()}}},readme:S}}async function bvt(e){try{let{stdout:t}=await qr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:e});return t.trim()===""?void 0:t.trim()}catch{return} Line truncated
`;try{a=await le.readFilePromise(t,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var tK={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},Nbe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Pvt={npmMinimalAgeGate:{description:"Minimum age of a package version according to the publish date on the npm registry to be considered for installation",type:"DURATION",unit:"m",default:"1d"},npmPreapprovedPackages:{description:"Array of package descriptors or package name glob patterns to exclude from the minimum release age check",type:"STRING",isArray:!0,default:[]}},xvt={configuration:{...tK,...Nbe,...Pvt,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...tK,...Nbe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:Jc,valueDefinition:{description:"",type:"SHAPE",properties:{...tK}}}},fetchers:[VD,sh],resolvers:[JD,KD,zD]},kvt=xvt;var AK={};Vt(AK,{NpmAuditCommand:()=>y1,NpmInfoCommand:()=>E1,NpmLoginCommand:()=>I1,NpmLogoutCommand:()=>w1,NpmPublishCommand:()=>B1,NpmTagAddCommand:()=>S1,NpmTagListCommand:()=>v1,NpmTagRemoveCommand:()=>D1,NpmWhoamiCommand:()=>b1,default:()=>jvt,npmAuditTypes:()=>zb,npmAuditUtils:()=>gL});qe();qe();Yt();var aK=et(zo());Al();var zb={};Vt(zb,{Environment:()=>Jb,Severity:()=>Kb});var Jb=(s=>(s.All="all",s.Production="production",s.Development="development",s))(Jb||{}),Kb=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Kb||{});var gL={};Vt(gL,{allSeverities:()=>m1,getPackages:()=>oK,getReportTree:()=>iK,getSeverityInclusions:()=>nK,getTopLevelDependencies:()=>sK});qe();var Obe=et(pi());var m1=["info","low","moderate","high","critical"];function nK(e){if(typeof e>"u")return new Set(m1);let t=m1.indexOf(e),r=m1.slice(t);return new Set(r)}function iK(e){let t={},r={children:t};for(let[s,a]of Ge.sortMap(Object.entries(e),n=>n[0]))for(let n of Ge.sortMap(a,c=>`${c.id}`))t[`${s}/${n.id}`]={value:pe.tuple(pe.Type.IDENT,j.parseIdent(s)),children:{ID:typeof n.id<"u"&&{label:"ID",value:pe.tuple(pe.Type.ID,n.id)},Issue:{label:"Issue",value:pe.tuple(pe.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:pe.tuple(pe.Type.URL,n.url)},Severity:{label:"Severity",value:pe.tuple(pe.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:pe.tuple(pe.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(Obe.default.compare).map(c=>({value:pe.tuple(pe.Type.REFERENCE,c)}))},Dependents:{label:"Dependents",children:Ge.sortMap(n.dependents,c=>j.stringifyLocator(c)).map(c=>({value:pe.tuple(pe.Type.LOCATOR,c)}))}}};return r}function sK(e,t,{all:r,environment:s}){let a=[],n=r?e.workspaces:[t],c=["all","production"].includes(s),f=["all","development"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function oK(e,t,{recursive:r}){let s=new Map,a=new Set,n=[],c=e.configuration.makeResolver(),f={project:e,resolver:c},p=(h,E)=>{let C=e.storedResolutions.get(E.descriptorHash);if(typeof C>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(C))a.add(C);else return;let S=e.storedPackages.get(C);if(typeof S>"u")throw new Error("Assertion failed: The package should have been registered");let x=j.ensureDevirtualizedDescriptor(E);if(c.supportsDescriptor(x,f)){let T=c.getResolutionDependencies(x,f);if(Object.keys(T).length>0)for(let O of Object.values(T))p(h,O)}if(j.ensureDevirtualizedLocator(S).reference.startsWith("npm:")&&S.version!==null){let T=j.stringifyIdent(S),O=Ge.getMapWithDefault(s,T);Ge.getArrayWithDefault(O,S.version).push(h)}if(r)for(let T of S.dependencies.values())n.push([S,T])};for(let{workspace:h,dependency:E}of t)n.push([h.anchoredLocator,E]);for(;n.length>0;){let[h,E]=n.shift();p(h,E)}return s}var y1=class extends At{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=he.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=he.String("--environment","all",{description:"Which environments to cover",validator:ks(Jb)});this.json=he.Boolean("- Line truncated
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${m1.map(r=>`\`${r}\``).join(", ")}.
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=sK(s,a,{all:this.all,environment:this.environment}),c=oK(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[O,U]of c)f.some(V=>aK.default.isMatch(O,V))||(p[O]=[...U.keys()]);let h=gi.getAuditRegistry({configuration:r}),E,C=await uA.start({configuration:r,stdout:this.context.stdout},async()=>{let O=en.post("/-/npm/v1/security/advisories/bulk",p,{authType:en.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,ie])=>{let ue=await en.getPackageMetadata(j.parseIdent(te),{project:s});return Ge.mapAndFilter(ie,ae=>{let{deprecated:de}=ue.versions[ae];return de?[te,ae,de]:Ge.mapAndFilter.skip})})),V=await O;for(let[te,ie,ue]of U.flat(1))Object.hasOwn(V,te)&&V[te].some(ae=>kr.satisfiesWithPrereleases(ie,ae.vulnerable_versions))||(V[te]??=[],V[te].push({id:`${te} (deprecation)`,title:(typeof ue=="string"?ue:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ie}));E=V});if(C.hasErrors())return C.exitCode();let S=nK(this.severity),x=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),I=Object.create(null);for(let[O,U]of Object.entries(E)){let V=U.filter(te=>!aK.default.isMatch(`${te.id}`,x)&&S.has(te.severity));V.length>0&&(I[O]=V.map(te=>{let ie=c.get(O);if(typeof ie>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let ue=[...ie.keys()].filter(de=>kr.satisfiesWithPrereleases(de,te.vulnerable_versions)),ae=new Map;for(let de of ue)for(let Ae of ie.get(de))ae.set(Ae.locatorHash,Ae);return{...te,versions:ue,dependents:[...ae.values()]}}))}let T=Object.keys(I).length>0;return T?(Rs.emitTree(iK(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async O=>{O.reportInfo(1,"No audit suggestions")}),T?1:0)}};qe();qe();Dt();Yt();var lK=et(pi()),cK=Ie("util"),E1=class extends At{constructor(){super(...arguments);this.fields=he.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=he.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=at.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react Line truncated
`),this.context.stdout.write(`${(0,cK.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
`);return f.exitCode()}};function uK(e){if(Array.isArray(e)){let t=[];for(let r of e)r=uK(r),r&&t.push(r);return t}else if(typeof e=="object"&&e!==null){let t={};for(let r of Object.keys(e)){if(r.startsWith("_"))continue;let s=uK(e[r]);s&&(t[r]=s)}return t}else return e||null}qe();qe();Yt();var fK=et(Vv()),I1=class extends At{constructor(){super(...arguments);this.scope=he.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=he.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=he.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"});this.webLogin=he.Boolean("--web-login",{description:"Enable web login"})}static{this.paths=[["npm","login"]]}static{this.usage=at.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await dL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await Nvt({registry:s,configuration:r,report:n,webLogin:this.webLogin,stdin:this.context.stdin,stdout:this.context.stdout});return await Lvt(s,c,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function dL({scope:e,publish:t,configuration:r,cwd:s}){return e&&t?gi.getScopeRegistry(e,{configuration:r,type:gi.RegistryType.PUBLISH_REGISTRY}):e?gi.getScopeRegistry(e,{configuration:r}):t?gi.getPublishRegistry((await WI(r,s)).manifest,{configuration:r}):gi.getDefaultRegistry({configuration:r})}async function Qvt(e,t){let r;try{r=await en.post("/-/v1/login",null,{configuration:t,registry:e,authType:en.AuthType.NO_AUTH,jsonResponse:!0,headers:{"npm-auth-type":"web"}})}catch{return null}return r}async function Rvt(e,t){let r=await nn.request(e,null,{configuration:t,jsonResponse:!0});if(r.statusCode===202){let s=r.headers["retry-after"]??"1";return{type:"waiting",sleep:parseInt(s,10)}}return r.statusCode===200?{type:"success",token:r.body.token}:null}async function Tvt({registry:e,configuration:t,report:r}){let s=await Qvt(e,t);if(!s)return null;if(Ui.openUrl){r.reportInfo(0,"Starting the web login process..."),r.reportSeparator();let{openNow:a}=await(0,fK.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open your browser now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});r.reportSeparator(),(!a||!await Ui.openUrl(s.loginUrl))&&(r.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice:"),r.reportWarning(0,pe.pretty(t,s.loginUrl,pe.Type.URL)),r.reportSeparator())}for(;;){let a=await Rvt(s.doneUrl,t);if(a===null)return null;if(a.type==="waiting")await new Promise(n=>setTimeout(n,a.sleep*1e3));else return a.token}}var Fvt=["https://registry.yarnpkg.com","https://registry.npmjs.org"];async function Nvt(e){if(e.webLogin??Fvt.includes(e.registry)){let t=await Tvt(e);if(t!==null)return t}return await Ovt(e)}async function Ovt({registry:e,configuration:t,report:r,stdin:s,stdout:a}){let n=await Mvt({configuration:t,registry:e,report:r,stdin:s,stdout:a}),c=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,f={_id:`org.couchdb.user:${n.name}`,name:n.name,password:n.password,type:"user",roles:[],date:new Date().toISOString()},p={attemptedAs:n.name,configuration:t,registry:e,jsonResponse:!0,authType:en.AuthType.NO_AUTH};try{return(await en.put(c,f,p)).token}catch(x){if(!(x.originalError?.name==="HTTPError"&&x.originalError?.response.statusCode===409))throw x}let h={...p,authType:en.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${n.name}:${n.password}`).toString("base64")}`}},E=await en.get(c,h);for(let[x,I]of Object.entries(E))(!f[x]||x==="roles")&&(f[x]=I);let C=`${c}/-rev/${f._rev}`;return(await en.put(C,f,h)).token}async function Lvt(e,t,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=Ge.isIndexableObject(f)?f:{},h=p[c],E=Ge.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npLine truncated
This command will list all tags of a package from the npm registry.
If the package is not specified, Yarn will default to the current workspace.
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=j.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new it(`Missing 'name' field in ${fe.fromPortablePath(J.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await Xb(n,r),p={children:Ge.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:pe.tuple(pe.Type.RESOLUTION,{descriptor:j.makeDescriptor(n,h),locator:j.makeLocator(n,E)})}))};return Rs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Xb(e,t){let r=`/-/package${en.getIdentUrl(e)}/dist-tags`;return en.get(r,{configuration:t,ident:e,jsonResponse:!0,customErrorMessage:en.customPackageError})}var S1=class extends At{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=at.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=j.parseDescriptor(this.package,!0),c=n.range;if(!Mbe.default.valid(c))throw new it(`The range ${pe.pretty(r,n.range,pe.Type.RANGE)} must be a valid semver version`);let f=gi.getPublishRegistry(a.manifest,{configuration:r}),p=pe.pretty(r,n,pe.Type.IDENT),h=pe.pretty(r,c,pe.Type.RANGE),E=pe.pretty(r,this.tag,pe.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let x=await Xb(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};qe();Yt();var D1=class extends At{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=at.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
This command will remove a tag from a package from the npm registry.
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new it("The 'latest' tag cannot be removed.");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=j.parseIdent(this.package),c=gi.getPublishRegistry(a.manifest,{configuration:r}),f=pe.pretty(r,this.tag,pe.Type.CODE),p=pe.pretty(r,n,pe.Type.IDENT),h=await Xb(n,r);if(!Object.hasOwn(h,this.tag))throw new it(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};qe();qe();Yt();var b1=class extends At{constructor(){super(...arguments);this.scope=he.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=he.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=at.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=gi.getScopeRegistry(this.scope,{configuration:r,type:gi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=gi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=gi.getPublishRegistry((await WI(r,this.context.cwd)).manifest,{configuration:r}):s=gi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await en.get("/-/whoami",{configuration:r,registry:s,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?j.makeIdent(this.scope,""):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var Hvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmPublishProvenance:{description:"Whether to generate provenance for the published packages",type:"BOOLEAN",default:!1},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[y1,E1,I1,w1,B1,S1,v1,D1,b1]},jvt=Hvt;var EK={};Vt(EK,{PatchCommand:()=>T1,PatchCommitCommand:()=>R1,PatchFetcher:()=>rP,PatchResolver:()=>nP,default:()=>oSt,patchUtils:()=>yy});qe();qe();Dt();nA();var yy={};Vt(yy,{applyPatchFile:()=>yL,diffFolders:()=>mK,ensureUnpatchedDescriptor:()=>pK,ensureUnpatchedLocator:()=>IL,extractPackageToDisk:()=>dK,extractPatchFlags:()=>Wbe,isParentRequired:()=>gK,isPatchDescriptor:()=>EL,isPatchLocator:()=>Qg,loadPatchFiles:()=>tP,makeDescriptor:()=>CL,makeLocator:()=>hK,makePatchHash:()=>yK,parseDescriptor:()=>$b,parseLocator:()=>eP,parsePatchFile:()=>Zb,unpatchDescriptor:()=>nSt,unpatchLocator:()=>iSt});qe();Dt();qe();Dt();var Gvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function P1(e){return J.relative(vt.root,J.resolve(vt.root,fe.toPortablePath(e)))}function qvt(e){let t=e.trim().match(Gvt);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var Wvt=420,Yvt=493;var Ube=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Vvt=e=>({header:qvt(e),parts:[]}),Jvt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function Kvt(e){let t=[],r=Line truncated
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
`):"";await t.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[Ai.SAFE_TIME,Ai.SAFE_TIME]}),await t.writeFilePromise(a.path,n,{mode:a.mode}),await t.utimesPromise(a.path,Ai.SAFE_TIME,Ai.SAFE_TIME)}break;case"patch":await k1(t,a.path,async()=>{await eSt(a,{baseFs:t,dryRun:r})});break;case"mode change":{let c=(await t.statPromise(a.path)).mode;if(_be(a.newMode)!==_be(c))continue;await k1(t,a.path,async()=>{await t.chmodPromise(a.path,a.newMode)})}break;default:Ge.assertNever(a);break}}function _be(e){return(e&64)>0}function Hbe(e){return e.replace(/\s+$/,"")}function $vt(e,t){return Hbe(e)===Hbe(t)}async function eSt({hunks:e,path:t},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(t).mode,c=(await r.readFileSync(t,"utf8")).split(/\n/),f=[],p=0,h=0;for(let C of e){let S=Math.max(h,C.header.patched.start+p),x=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),T=Math.max(x,I),O=0,U=0,V=null;for(;O<=T;){if(O<=x&&(U=S-O,V=jbe(C,c,U),V!==null)){O=-O;break}if(O<=I&&(U=S+O,V=jbe(C,c,U),V!==null))break;O+=1}if(V===null)throw new x1(e.indexOf(C),C);f.push(V),p+=O,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case"splice":{let x=S.index+E;c.splice(x,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case"pop":c.pop();break;case"push":c.push(S.line);break;default:Ge.assertNever(S);break}await r.writeFilePromise(t,c.join(`
`),{mode:a})}function jbe(e,t,r){let s=[];for(let a of e.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let c=t[r];if(c==null||!$vt(c,n))return null;r+=1}a.type==="deletion"&&(s.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case"insertion":s.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:Ge.assertNever(a.type);break}return s}var rSt=/^builtin<([^>]+)>$/;function Q1(e,t){let{protocol:r,source:s,selector:a,params:n}=j.parseRange(e);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let c=a?a.split(/&/).map(E=>fe.toPortablePath(E)):[],f=n&&typeof n.locator=="string"?j.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=t(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function EL(e){return e.range.startsWith("patch:")}function Qg(e){return e.reference.startsWith("patch:")}function $b(e){let{sourceItem:t,...r}=Q1(e.range,j.parseDescriptor);return{...r,sourceDescriptor:t}}function eP(e){let{sourceItem:t,...r}=Q1(e.reference,j.parseLocator);return{...r,sourceLocator:t}}function nSt(e){let{sourceItem:t}=Q1(e.range,j.parseDescriptor);return t}function iSt(e){let{sourceItem:t}=Q1(e.reference,j.parseLocator);return t}function pK(e){if(!EL(e))return e;let{sourceItem:t}=Q1(e.range,j.parseDescriptor);return t}function IL(e){if(!Qg(e))return e;let{sourceItem:t}=Q1(e.reference,j.parseLocator);return t}function Gbe({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=e!==null?{locator:j.stringifyLocator(e)}:{},f=typeof s<"u"?{version:s}:{},p=typeof a<"u"?{hash:a}:{};return j.makeRange({protocol:"patch:",source:n(t),selector:r.join("&"),params:{...f,...p,...c}})}function CL(e,{parentLocator:t,sourceDescriptor:r,patchPaths:s}){return j.makeDescriptor(e,Gbe({parentLocator:t,sourceItem:r,patchPaths:s},j.stringifyDescriptor))}function hK(e,{parentLocator:t,sourcePackage:r,patchPaths:s,patchHash:a}){return j.makeLocator(e,Gbe({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},j.stringifyLocator))}function qbe({onAbsolute:e,onRelative:t,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(rSt);return c!==null?s(c[1]):a.startsWith("~/")?r(a.slice(2)):J.isAbsolute(a)?e(a):t(a)}function Wbe(e){let t=e.lastIndexOf("!");return{optional:(t!==-1?new Set(e.slice(0,t).split(/!/)):new Set).has("optional")}}function gK(e){return qbe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},e)}async function tP(e,t,r){let s=e!==null?await r.fetcher.fetch(e,r):null,a=s&&s.localPath?{packageFs:new bn(vt.root),prefixPath:J.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await Ge.releaseAfterUseAsync(async()=>await Promise.all(t.map(async c=>{let f=Wbe(c),p=await qbe({onAbsolute:async h=>await le.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),"utf8")},onProject:async h=>await le.readFilePromise(J.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,`
`));return n}async function dK(e,{cache:t,project:r}){let s=r.storedPackages.get(e.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=IL(e),n=r.storedChecksums,c=new Qi,f=await le.mktempPromise(),p=J.join(f,"source"),h=J.join(f,"user"),E=J.join(f,".yarn-patch.json"),C=r.configuration.makeFetcher(),S=[];try{let x,I;if(e.locatorHash===a.locatorHash){let T=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c});S.push(()=>T.releaseFs?.()),x=T,I=T}else x=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>x.releaseFs?.()),I=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([le.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),le.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),le.writeJsonPromise(E,{locator:j.stringifyLocator(e),version:s.version})])}finally{for(let x of S)x()}return le.detachTemp(f),h}async function mK(e,t){let r=fe.fromPortablePath(e).replace(/\\/g,"/"),s=fe.fromPortablePath(t).replace(/\\/g,"/"),{stdout:a,stderr:n}=await qr.execvp("git",["-c","core.safecrlf=false","-c","core.quotePath=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:fe.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
The following error was reported by 'git':
${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${Ge.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${Ge.escapeRegExp(`/${c(s)}/`)}`,"g"),"$1/").replace(new RegExp(Ge.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(Ge.escapeRegExp(`${s}/`),"g"),"")}function yK(e,t){let r=[];for(let{source:s}of e){if(s===null)continue;let a=Zb(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&t!==null&&!kr.satisfiesWithPrereleases(t,c)||r.push(JSON.stringify(f))}}return Ln.makeHash(`${3}`,...r).slice(0,6)}qe();function Ybe(e,{configuration:t,report:r}){for(let s of e.parts)for(let a of s.lines)switch(s.type){case"context":r.reportInfo(null,` ${pe.pretty(t,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${pe.pretty(t,a,pe.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${pe.pretty(t,a,pe.Type.ADDED)}`);break;default:Ge.assertNever(s.type)}}var rP=class{supports(t,r){return!!Qg(t)}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:c}}async patchPackage(t,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=eP(t),f=await tP(s,c,r),p=await le.mktempPromise(),h=J.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),C=j.getIdentVendorPath(t),S=new ps(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await Ge.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:x,optional:I}of f){if(x===null)continue;let T=new ps(h,{level:r.project.configuration.get("compressionLevel")}),O=new bn(J.resolve(vt.root,C),{baseFs:T});try{await yL(Zb(x),{baseFs:O,version:n})}catch(U){if(!(U instanceof x1))throw U;let V=r.project.configuration.get("enableInlineHunks"),te=!V&&!I?" (set enableInlineHunks for details)":"",ie=`${j.prettyLocator(r.project.configuration,t)}: ${U.message}${te}`,ue=ae=>{V&&Ybe(U.hunk,{configuration:r.project.configuration,report:ae})};if(T.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:ue});continue}else throw new Lt(66,ie,ue)}T.saveAndClose()}return new ps(h,{level:r.project.configuration.get("compressionLevel")})}};qe();var nP=class{supportsDescriptor(t,r){return!!EL(t)}supportsLocator(t,r){return!!Qg(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){let{patchPaths:a}=$b(t);return a.every(n=>!gK(n))?t:j.bindDescriptor(t,{locator:j.stringifyLocator(r)})}getResolutionDependencies(t,r){let{sourceDescriptor:s}=$b(t);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(t,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=$b(t),c=await tP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=yK(c,f.version);return[hK(t,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let{sourceLocator:s}=eP(t);return{...await r.resolver.resolve(s,r),...t}}};qe();Dt();Yt();var R1=class extends At{constructor(){super(...arguments);this.save=he.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=he.String()}static{this.paths=[["patch-commit"]]}static{this.usage=at.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=J.resolve(this.context.cwd,fe.toPortablePath(this.patchFolder)),c=J.join(n,"../source"),f=J.join(n,"../.yarn-patch.json");if(!le.existsSLine truncated
${f.map(p=>`
- ${j.prettyLocator(r,p)}`).join("")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new it("No package found in the project for the given locator");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=IL(c),h=await dK(c,{cache:n,project:s});f.reportJson({locator:j.stringifyLocator(p),path:fe.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${j.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${pe.pretty(r,fe.fromPortablePath(h),"magenta")}`),f.reportInfo(0,`Once you are done run ${pe.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${fe.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var sSt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[R1,T1],fetchers:[rP],resolvers:[nP]},oSt=sSt;var wK={};Vt(wK,{PnpmLinker:()=>iP,default:()=>ASt});qe();Dt();Yt();var iP=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(t.locatorHash);if(typeof n>"u")throw new it(`Couldn't find ${j.prettyLocator(r.project.configuration,t)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=t.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=t,f=t;do{f=c,c=J.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(t){return new IK(t)}isEnabled(t){return t.project.configuration.get("nodeLinker")==="pnpm"}},IK=class{constructor(t){this.opts=t;this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.asyncActions=new Ge.AsyncActions(t.project.configuration.get("pnpmInstallConcurrency")),this.indexFolderPromise=$P(le,{indexPath:J.join(t.project.configuration.get("globalFolder"),"index")})}attachCustomData(t){}async installPackage(t,r,s){switch(t.linkType){case"SOFT":return this.installPackageSoft(t,r,s);case"HARD":return this.installPackageHard(t,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(t,r,s){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(t)?J.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(t.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(t,r,s){let a=lSt(t,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,j.stringifyLocator(t)),this.customData.pathsByLocator.set(t.locatorHash,a),s.holdFetchResult(this.asyncActions.set(t.locatorHash,async()=>{await le.mkdirPromise(n,{recursive:!0}),await le.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t,p={manifest:await _t.tryFind(r.prefixPath,{baseFs:r.packageFs})??new _t,misc:{hasBindingGyp:mA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,t.version),E=mA.extractBuildRequest(t,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(t,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!Vbe(t,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(t.locatorHash);if(typeof s>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${j.stringifyLocator(t)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(t.locatorHash,async n=>{await le.mkdirPromise(a,{recursive:!0});let c=await cSt(a),f=new Map(c),p=[n],h=(C,S)=>{let x=S;Vbe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),x=j.devirtualizeLocator(S));let I=this.customDLine truncated
${hSt}
`,"--",...s],{cwd:e,strict:!0})},async makeReset(e,t){let r=t.map(s=>fe.fromPortablePath(s.path));await qr.execvp("git",["reset","HEAD","--",...r],{cwd:e,strict:!0})}};var ESt=[Xbe],F1=class extends At{constructor(){super(...arguments);this.commit=he.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=he.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=he.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=he.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=at.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),{driver:a,root:n}=await ISt(s.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of CSt(n,C))f.add(S);let p=new Set([r.get("rcFilename"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
`);else for(let C of h)this.context.stdout.write(`${fe.fromPortablePath(C.path)}
`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function ISt(e){let t=null,r=null;for(let s of ESt)if((r=await s.findRoot(e))!==null){t=s;break}if(t===null||r===null)throw new it("No stage driver has been found for your current project");return{driver:t,root:r}}function CSt(e,t){let r=[];if(t===null)return r;for(;;){(t===e||t.startsWith(`${e}/`))&&r.push(t);let s;try{s=le.statSync(t)}catch{break}if(s.isSymbolicLink())t=J.resolve(J.dirname(t),le.readlinkSync(t));else break}return r}var wSt={commands:[F1]},BSt=wSt;var kK={};Vt(kK,{default:()=>QSt});qe();qe();Dt();var ePe=et(pi());qe();var Zbe=et(N9()),vSt="e8e1bd300d860104bb8c58453ffa1eb4",SSt="OFCNCOG2CU",$be=async(e,t)=>{let r=j.stringifyIdent(e),a=DSt(t).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},DSt=e=>(0,Zbe.default)(SSt,vSt,{requester:{async send(r){try{let s=await nn.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var tPe=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,bSt=async(e,t,r,s)=>{if(r.scope==="types")return;let{project:a}=e,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(le.existsSync(J.join(e.cwd,"tsconfig.json"))||le.existsSync(J.join(a.cwd,"tsconfig.json")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new Qi};if(!await $be(r,n))return;let E=tPe(r),C=j.parseRange(r.range).selector;if(!kr.validRange(C)){let O=n.normalizeDependency(r),U=await f.getCandidates(O,{},p);C=j.parseRange(U[0].reference).selector}let S=ePe.default.coerce(C);if(S===null)return;let x=`${ef.Modifier.CARET}${S.major}`,I=j.makeDescriptor(j.makeIdent("types",E),x),T=Ge.mapAndFind(a.workspaces,O=>{let U=O.manifest.dependencies.get(r.identHash)?.descriptorHash,V=O.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&V!==r.descriptorHash)return Ge.mapAndFind.skip;let te=[];for(let ie of _t.allDependencies){let ue=O.manifest[ie].get(I.identHash);typeof ue>"u"||te.push([ie,ue])}return te.length===0?Ge.mapAndFind.skip:te});if(typeof T<"u")for(let[O,U]of T)e.manifest[O].set(U.identHash,U);else{try{let O=n.normalizeDependency(I);if((await f.getCandidates(O,{},p)).length===0)return}catch{return}e.manifest[ef.Target.DEVELOPMENT].set(I.identHash,I)}},PSt=async(e,t,r)=>{if(r.scope==="types")return;let{project:s}=e,{configuration:a}=s;if(!(a.get("tsEnableAutoTypes")??(le.existsSync(J.join(e.cwd,"tsconfig.json"))||le.existsSync(J.join(s.cwd,"tsconfig.json")))))return;let c=tPe(r),f=j.makeIdent("types",c);for(let p of _t.allDependencies)typeof e.manifest[p].get(f.identHash)>"u"||e.manifest[p].delete(f.identHash)},xSt=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.publishConfig&&t.publishConfig.types&&(t.types=t.publishConfig.types)},kSt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:bSt,afterWorkspaceDependencyRemoval:PSt,beforeWorkspacePacking:xSt}},QSt=kSt;var NK={};Vt(NK,{VersionApplyCommand:()=>M1,VersionCheckCommand:()=>U1,VersionCommand:()=>_1,default:()=>OSt,versionUtils:()=>L1});qe();qe();Yt();var L1={};Vt(L1,{Decision:()=>N1,applyPrerelease:()=>rPe,applyReleases:()=>FK,applyStrategy:()=>sP,clearVersionFiles:()=>QK,getUndecidedDependentWorkspaces:()=>aP,getUndecidedWorkspaces:()=>vL,openVersionFile:()=>O1,requireMoreDecisions:()=>TSt,resolveVersionFiles:()=>oP,suggestStrategy:()=>TK,updateVersionFiles:()=>RK,validateReleaseDecision:()=>Ey});qe();Dt();vc();Yt();zl();var RA=et(pi()),RSt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,N1=(h=>(h.UNDECIDED="undecided",h.DECLINE="decline",h.MAJOR="major",h.MINOR="minor",h.PATCH="patch",h.PREMAJOR="premajor",h.PREMINOR="preminor",h.PREPATCH="prepatch",h.PRERELEASE="prerelease",h))(N1||{});function Ey(e){let t=RA.default.valid(e);return t||Ge.validateEnum(C4(N1,"UNDECIDED"),e)}async function oP(e,{prerelease:t=null}={}){let r=new Map,s=e.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return r;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=J.join(s,n),f=await le.readFilePromise(c,"utf8"),p=cs(f);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let C=j.parseIdent(h),S=e.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definitioLine truncated
- ${f.map(x=>fe.fromPortablePath(x)).join(`
- `)}`);let p=new Set(Ge.mapAndFilter(n,x=>{let I=e.tryWorkspaceByFilePath(x);return I===null?Ge.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!t)return null;let h=f.length===1?f[0]:J.join(c,`${Ln.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=le.existsSync(h)?await le.readFilePromise(h,"utf8"):"{}",C=cs(E),S=new Map;for(let x of C.declined||[]){let I=j.parseIdent(x),T=e.getWorkspaceByIdent(I);S.set(T,"decline")}for(let[x,I]of Object.entries(C.releases||{})){let T=j.parseIdent(x),O=e.getWorkspaceByIdent(T);S.set(O,Ey(I))}return{project:e,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(x=>x.manifest.version!==null)),releases:S,async saveAll(){let x={},I=[],T=[];for(let O of e.workspaces){if(O.manifest.version===null)continue;let U=j.stringifyIdent(O.anchoredLocator),V=S.get(O);V==="decline"?I.push(U):typeof V<"u"?x[U]=Ey(V):p.has(O)&&T.push(U)}await le.mkdirPromise(J.dirname(h),{recursive:!0}),await le.changeFilePromise(h,fl(new fl.PreserveOrdering({releases:Object.keys(x).length>0?x:void 0,declined:I.length>0?I:void 0,undecided:T.length>0?T:void 0})))}}}function TSt(e){return vL(e).size>0||aP(e).length>0}function vL(e){let t=new Set;for(let r of e.changedWorkspaces)r.manifest.version!==null&&(e.releases.has(r)||t.add(r));return t}function aP(e,{include:t=new Set}={}){let r=[],s=new Map(Ge.mapAndFilter([...e.releases],([n,c])=>c==="decline"?Ge.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(Ge.mapAndFilter([...e.releases],([n,c])=>c!=="decline"?Ge.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of e.project.workspaces)if(!(!t.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of _t.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=e.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function TK(e,t){let r=RA.default.clean(t);for(let s of Object.values(N1))if(s!=="undecided"&&s!=="decline"&&RA.default.inc(e,s)===r)return s;return null}function sP(e,t){if(RA.default.valid(t))return t;if(e===null)throw new it(`Cannot apply the release strategy "${t}" unless the workspace already has a valid version`);if(!RA.default.valid(e))throw new it(`Cannot apply the release strategy "${t}" on a non-semver version (${e})`);let r=RA.default.inc(e,t);if(r===null)throw new it(`Cannot apply the release strategy "${t}" on the specified version (${e})`);return r}function FK(e,t,{report:r,exact:s}){let a=new Map;for(let n of e.workspaces)for(let c of _t.allDependencies)for(let f of n.manifest[c].values()){let p=e.tryWorkspaceByDescriptor(f);if(p===null||!t.has(p))continue;Ge.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of t){let f=n.manifest.version;n.manifest.version=c,RA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?j.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${j.prettyLocator(e.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:fe.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>"u"))for(let[E,C,S]of h){let x=E.manifest[C].get(S);if(typeof x>"u")throw new Error("Assertion failed: The dependency should have existed");let I=x.range,T=!1;if(I.startsWith(Ii.protocol)&&(I=I.slice(Ii.protocol.length),T=!0,I===n.relativeCwd))continue;let O=I.match(RSt);if(!O){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${j.prettyLocator(e.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${O[1]}${c}`;T&&(U=`${Ii.protocol}${U}`);let V=j.makeDescriptor(x,U);E.manifest[C].set(S,V)}}}var FSt=new Map([["%n",{extract:e=>e.length>=1?[e[0],e.slice(1)]:null,generate:(e=0)=>`${e+1}`}]]);function rPe(e,{current:t,prerelease:r}){let s=new RA.default.SemVer(t),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==e&&(a.length=0);let c=!0,f=r.split(/\./g);for(let p of f){let h=FSt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${e}-${n.join(".")}`}var M1=class extends At{constructor(){super(...arguments);this.all=he.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=he.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=he.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=he.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=he.Boolean("-R,--recursive",{description:"ReleLine truncated
This command will apply the deferred version changes and remove their definitions from the repository.
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
By default only the current workspace will be bumped, but you can configure this behavior by using one of:
- \`--recursive\` to also apply the version bump on its dependencies
- \`--all\` to apply the version bump on all packages in the repository
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await oP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let x=h.get(S);typeof x<"u"&&E.set(S,x)}}if(E.size===0){let C=h.size>0?" Did you want to add --all?":"";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}FK(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await QK(s):await RK(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};qe();Dt();Yt();var SL=et(pi());var U1=class extends At{constructor(){super(...arguments);this.interactive=he.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=at.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){KC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(xF(),nW)),{ScrollableItems:s}=await Promise.resolve().then(()=>(TF(),RF)),{FocusRequest:a}=await Promise.resolve().then(()=>(oW(),hwe)),{useListInput:n}=await Promise.resolve().then(()=>(QF(),gwe)),{renderForm:c}=await Promise.resolve().then(()=>(LF(),OF)),{Box:f,Text:p}=await Promise.resolve().then(()=>et(qc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>et(gn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,this.context.cwd);if(!I)throw new ar(x.cwd,this.context.cwd);await x.restoreInstallState();let T=await O1(x);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new it("This command can only be run on Git repositories");let O=()=>h.createElement(f,{flexDirection:"row",paddingBottom:1},h.createElement(f,{flexDirection:"column",width:60},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:de,active:Ae,decision:Ce,setDecision:Ee})=>{let g=de.manifest.raw.stableVersion??de.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${j.prettyLocator(S,de.anchoredLocator)})`);if(SL.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let Se=["undecided","decline","patch","minor","major"];n(Ce,Se,{active:Ae,minus:"left",plus:"right",set:Ee});let Be=Ce==="undecided"?h.createElement(p,{color:"yellow"},g):Ce==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},SL.default.valid(Ce)?Ce:SL.default.inc(g,Ce)));return h.createElement(f,{flexDirection:"column"},h.createElement(f,null,h.createElement(p,null,j.prettyLocator(S,de.anchoredLocator)," - ",Be)),h.createElement(f,null,Se.map(meLine truncated
`)},p=()=>{let Ee=this.from.map(g=>j1.default.matcher(g));return s.workspaces.filter(g=>{let Se=j.stringifyIdent(g.anchoredLocator),Be=g.relativeCwd;return Ee.some(me=>me(Se)||me(Be))})},h=[];if(this.since?(f("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await La.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(f("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(f("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(f("Option --all is set; selecting all workspaces"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ee of h)f(`
- ${Ee.relativeCwd}
${j.prettyLocator(r,Ee.anchoredLocator)}`);h.length>0&&f("")}let E;if(this.recursive?this.since?(f("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependents()]).flat())):(f("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ee of E)f(`
- ${Ee.relativeCwd}
${j.prettyLocator(r,Ee.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(":")){for(let Ee of s.workspaces)if(Ee.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ee of h){if(c&&!Ee.manifest.scripts.has(c)&&!S&&!(await Cn.getWorkspaceAccessibleBinaries(Ee)).has(c)){f(`Excluding ${Ee.relativeCwd} because it doesn't have a "${c}" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ee.cwd===a.cwd)){if(this.include.length>0&&!j1.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.include)&&!j1.default.isMatch(Ee.relativeCwd,this.include)){f(`Excluding ${Ee.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(j1.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.exclude)||j1.default.isMatch(Ee.relativeCwd,this.exclude))){f(`Excluding ${Ee.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ee.manifest.private===!0){f(`Excluding ${Ee.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ee)}}if(C.sort((Ee,g)=>j.stringifyIdent(Ee.anchoredLocator).localeCompare(j.stringifyIdent(g.anchoredLocator))),this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),I=x>0,T=x>1,O=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Ui.availableParallelism()/2):1,U=O===1?!1:this.parallel,V=U?this.interlaced:!0,te=(0,iPe.default)(O),ie=new Map,ue=new Set,ae=0,de=null,Ae=!1,Ce=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ee=>{let g=async(Se,{commandIndex:Be})=>{if(Ae)return-1;!U&&T&&Be>1&&Ee.reportSeparator();let me=LSt(Se,{configuration:r,label:I,commandIndex:Be}),[ce,Z]=nPe(Ee,{prefix:me,interlaced:V}),[De,Qe]=nPe(Ee,{prefix:me,interlaced:V});try{T&&Ee.reportInfo(null,`${me?`${me} `:""}Process started`);let st=Date.now(),_=await this.cli.run([this.commandName,...this.args],{cwd:Se.cwd,stdout:ce,stderr:De})||0;ce.end(),De.end(),await Z,await Qe;let tt=Date.now();if(T){let Ne=r.get("enableTimers")?`, completed in ${pe.pretty(r,tt-st,pe.Type.DURATION)}`:"";Ee.reportInfo(null,`${me?`${me} `:""}Process exited (exit code ${_})${Ne}`)}return _===130&&(Ae=!0,de=_),_}catch(st){throw ce.end(),De.end(),await Z,await Qe,st}};for(let Se of C)ie.set(Se.anchoredLocator.locatorHash,Se);for(;ie.size>0&&!Ee.hasErrors();){let Se=[];for(let[Z,De]of ie){if(ue.has(De.anchoredDescriptor.descriptorHash))continue;let Qe=!0;if(this.topological||this.topologicalDev){let st=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let _ of st.values()){let tt=s.tryWorkspaceByDescriptor(_);if(Qe=tt===null||!ie.has(tt.anchoredLocator.locatorHash),!Qe)break}}if(Qe&&(ue.add(De.anchoredDescriptor.descriptorHash),Se.push(te(async()=>{let st=await g(De,{commandIndex:++ae});return ie.delete(Z),ue.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:st}})),!U))break}if(Se.length===0){let Z=Array.from(ie.values()).map(De=>j.prettyLocator(r,De.anchoredLocator)).join(", ");Ee.reportError(3,`Dependency cycle detected (${Z})`);return}let Be=await Promise.all(Se);Be.forEach(({workspace:Z,exitCode:De})=>{De!==0&&Ee.reportError(0,`The command failed in workspace ${j.prettyLocator(r,Z.anchoredLocator)} with exit code ${De}`)});let ce=Be.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof ce<"u"&&Ee.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return de!==null?de:Ce.exitCode()}};function nPe(e,{prefix:t,interlaced:r}){let s=e.createStreamReporter(t),a=new Ge.DefaultStream;a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()});let n=new Promise(f=>{s.on("finish",()=>{f(a.active)})});if(r)return[a,n];let c=new Ge.BufferStream;return c.pipe(a,{end:!1}),c.on("finish",()=>{a.end()}),[c,n]}function LSt(e,{configuration:t,commandIndex:r,label:s}){if(!s)return null;let n=`[${j.stringifyIdent(e.anchoredLocator)}]:`,c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[r%c.length];return pe.pretty(t,n,f)}var MSt={commands:[H1,G1]},USt=MSt;var YI=()=>({modules:new Map([["@yarnpkg/cli",Gv],["@yarnpkg/core",jv],["@yarnpkg/fslib",R2],["@yarnpkg/libzip",nv],["@yarnpkg/parsers",_2],["@yarnpkg/shell",cv],["clipanion",Z2],["semver",_St],["typanion",Jo],["@yarnpkg/plugin-essentials",F5],["@yarnpkg/plugin-catalog",M5],["@yarnpkg/plugin-compat",G5],["@yarnpkg/plugin-constraints",o9],["@yarnpkg/plugin-dlx",a9],["@yarnpkg/plugin-exec",u9],["@yarnpkg/plugin-file",A9],["@yarnpkg/plugin-git",T5],["@yarnpkg/plugin-github",g9],["@yarnpkg/plugin-http",d9],["@yarnpkg/plugin-init",m9],["@yarnpkg/plugin-interactive-tools",hW],["@yarnpkg/plugin-jsr",dW],["@yarnpkg/plugin-link",mW],["@yarnpkg/plugin-nm",rY],["@yarnpkg/plugin-npm",rK],["@yarnpkg/plugin-npm-cli",AK],["@yarnpkg/plugin-pack",KY],["@yarnpkg/plugin-patch",EK],["@yarnpkg/plugin-pnp",GW],["@yarnpkg/plugin-pnpm",wK],["@yarnpkg/plugin-stage",xK],["@yarnpkg/pluginLine truncated
Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await WSt(a,e,{selfPath:r,pluginConfiguration:s})}catch(c){Sa.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off("beforeExit",n),await le.rmtempPromise()}}QT(process.argv.slice(2),{cwd:J.cwd(),selfPath:fe.toPortablePath(fe.resolve(process.argv[1])),pluginConfiguration:YI()});})();
/**
@license
Copyright (c) 2015, Rebecca Turner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
/**
@license
Copyright Node.js contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
/**
@license
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
@license
Copyright Joyent, Inc. and other Node contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*! Bundled license information:
is-number/index.js:
(*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*)
to-regex-range/index.js:
(*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*)
fill-range/index.js:
(*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-extglob/index.js:
(*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-glob/index.js:
(*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
queue-microtask/index.js:
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
run-parallel/index.js:
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
git-url-parse/lib/index.js:
(*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*)
object-assign/index.js:
(*
object-assign
(c) Sindre Sorhus
@license MIT
*)
react/cjs/react.production.min.js:
(** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
scheduler/cjs/scheduler.production.min.js:
(** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
react-reconciler/cjs/react-reconciler.production.min.js:
(** @license React v0.26.2
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
is-windows/index.js:
(*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*)
*/
+944
View File
@@ -0,0 +1,944 @@
#!/usr/bin/env node
/* eslint-disable */
//prettier-ignore
(()=>{var Cje=Object.create;var sU=Object.defineProperty;var wje=Object.getOwnPropertyDescriptor;var Bje=Object.getOwnPropertyNames;var vje=Object.getPrototypeOf,Sje=Object.prototype.hasOwnProperty;var Ie=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xe=(e,t)=>()=>(e&&(t=e(e=0)),t);var G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vt=(e,t)=>{for(var r in t)sU(e,r,{get:t[r],enumerable:!0})},bje=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Bje(t))!Sje.call(e,a)&&a!==r&&sU(e,a,{get:()=>t[a],enumerable:!(s=wje(t,a))||s.enumerable});return e};var et=(e,t,r)=>(r=e!=null?Cje(vje(e)):{},bje(t||!e||!e.__esModule?sU(r,"default",{value:e,enumerable:!0}):r,e));var pi={};Vt(pi,{SAFE_TIME:()=>gZ,S_IFDIR:()=>ZP,S_IFLNK:()=>$P,S_IFMT:()=>Hf,S_IFREG:()=>R2});var Hf,ZP,R2,$P,gZ,mZ=Xe(()=>{Hf=61440,ZP=16384,R2=32768,$P=40960,gZ=456789e3});var or={};Vt(or,{EBADF:()=>Yo,EBUSY:()=>Dje,EEXIST:()=>Tje,EINVAL:()=>xje,EISDIR:()=>Rje,ENOENT:()=>kje,ENOSYS:()=>Pje,ENOTDIR:()=>Qje,ENOTEMPTY:()=>Nje,EOPNOTSUPP:()=>Oje,EROFS:()=>Fje,ERR_DIR_CLOSED:()=>oU});function vc(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function Dje(e){return vc("EBUSY",e)}function Pje(e,t){return vc("ENOSYS",`${e}, ${t}`)}function xje(e){return vc("EINVAL",`invalid argument, ${e}`)}function Yo(e){return vc("EBADF",`bad file descriptor, ${e}`)}function kje(e){return vc("ENOENT",`no such file or directory, ${e}`)}function Qje(e){return vc("ENOTDIR",`not a directory, ${e}`)}function Rje(e){return vc("EISDIR",`illegal operation on a directory, ${e}`)}function Tje(e){return vc("EEXIST",`file already exists, ${e}`)}function Fje(e){return vc("EROFS",`read-only filesystem, ${e}`)}function Nje(e){return vc("ENOTEMPTY",`directory not empty, ${e}`)}function Oje(e){return vc("EOPNOTSUPP",`operation not supported, ${e}`)}function oU(){return vc("ERR_DIR_CLOSED","Directory handle was closed")}var ex=Xe(()=>{});var ll={};Vt(ll,{BigIntStatsEntry:()=>uE,DEFAULT_MODE:()=>cU,DirEntry:()=>aU,StatEntry:()=>cE,areStatsEqual:()=>uU,clearStats:()=>tx,convertToBigIntStats:()=>Mje,makeDefaultStats:()=>yZ,makeEmptyStats:()=>Lje});function yZ(){return new cE}function Lje(){return tx(yZ())}function tx(e){for(let t in e)if(Object.hasOwn(e,t)){let r=e[t];typeof r=="number"?e[t]=0:typeof r=="bigint"?e[t]=BigInt(0):lU.types.isDate(r)&&(e[t]=new Date(0))}return e}function Mje(e){let t=new uE;for(let r in e)if(Object.hasOwn(e,r)){let s=e[r];typeof s=="number"?t[r]=BigInt(Math.floor(s)):lU.types.isDate(s)&&(t[r]=new Date(s))}return t.atimeNs=t.atimeMs*BigInt(1e6)+BigInt(Math.floor(e.atimeMs%1*1e3))*BigInt(1e3),t.mtimeNs=t.mtimeMs*BigInt(1e6)+BigInt(Math.floor(e.mtimeMs%1*1e3))*BigInt(1e3),t.ctimeNs=t.ctimeMs*BigInt(1e6)+BigInt(Math.floor(e.ctimeMs%1*1e3))*BigInt(1e3),t.birthtimeNs=t.birthtimeMs*BigInt(1e6)+BigInt(Math.floor(e.birthtimeMs%1*1e3))*BigInt(1e3),t}function uU(e,t){if(e.atimeMs!==t.atimeMs||e.birthtimeMs!==t.birthtimeMs||e.blksize!==t.blksize||e.blocks!==t.blocks||e.ctimeMs!==t.ctimeMs||e.dev!==t.dev||e.gid!==t.gid||e.ino!==t.ino||e.isBlockDevice()!==t.isBlockDevice()||e.isCharacterDevice()!==t.isCharacterDevice()||e.isDirectory()!==t.isDirectory()||e.isFIFO()!==t.isFIFO()||e.isFile()!==t.isFile()||e.isSocket()!==t.isSocket()||e.isSymbolicLink()!==t.isSymbolicLink()||e.mode!==t.mode||e.mtimeMs!==t.mtimeMs||e.nlink!==t.nlink||e.rdev!==t.rdev||e.size!==t.size||e.uid!==t.uid)return!1;let r=e,s=t;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var lU,cU,aU,cE,uE,fU=Xe(()=>{lU=et(Ie("util")),cU=33188,aU=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},cE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=cU;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},uE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtLine truncated
`).length,s=t.length-r;return r>s?`\r
`:`
`}function Ig(e,t){return t.replace(/\r?\n/g,Xje(e))}var DZ,PZ,Ip,jf,Cg=Xe(()=>{DZ=Ie("crypto"),PZ=Ie("os");hU();cl();Ip=class{constructor(t){this.pathUtils=t}async*genTraversePromise(t,{stableSort:r=!1}={}){let s=[t];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(t,{algorithm:r="sha512"}={}){let s=await this.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,DZ.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await this.closePromise(s)}}async removePromise(t,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(t)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(t);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(t,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(t);break}catch(c){if(c.code!=="EBUSY"&&c.code!=="ENOTEMPTY")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(t)}removeSync(t,{recursive:r=!0}={}){let s;try{s=this.lstatSync(t)}catch(a){if(a.code==="ENOENT")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(t))this.removeSync(this.pathUtils.resolve(t,a));this.rmdirSync(t)}else this.unlinkSync(t)}async mkdirpPromise(t,{chmod:r,utimes:s}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(t,{chmod:r,utimes:s}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(t,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await CZ(this,t,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(t,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(t);if(n.isDirectory()){this.mkdirpSync(t);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(t,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(t);let p=s.readFileSync(r);this.writeFileSync(t,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(t);let p=s.readlinkSync(r);this.symlinkSync(rx(this.pathUtils,p),t)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let f=n.mode&511;this.chmodSync(t,f)}async changeFilePromise(t,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(t,r,s):this.changeFileTextPromise(t,r,s)}async changeFileBufferPromise(t,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(t)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(t,r,{mode:s})}async changeFileTextPromise(t,r,{automaticNewlines:s,mode:a}={}){let n="";try{n=await this.readFilePromise(t,"utf8")}catch{}let c=s?Ig(n,r):r;n!==c&&await this.writeFilePromise(t,c,{mode:a})}changeFileSync(t,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(t,r,s):this.changeFileTextSync(t,r,s)}changeFileBufferSync(t,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(t)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(t,r,{mode:s})}changeFileTextSync(t,r,{automaticNewlines:s=!1,mode:a}={}){let n="";try{n=this.readFileSync(t,"utf8")}catch{}let c=s?Ig(n,r):r;n!==c&&this.writeFileSync(t,c,{mode:a})}async movePromise(t,r){try{await this.renamePromise(t,r)}catch(s){if(s.code==="EXDEV")await this.copyPromise(r,t),await this.removePromise(t);else throw s}}moveSync(t,r){try{this.renameSync(t,r)}catch(s){if(s.code==="EXDEV")this.copySync(r,t),this.removeSync(t);else throw s}}async lockPromise(t,r){let s=`${t}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,"wx")}catch(p){if(p.code==="EEXIST"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw Line truncated
`)}writeJsonSync(t,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(t,`${JSON.stringify(r,null,a)}
`)}async preserveTimePromise(t,r){let s=await this.lstatPromise(t),a=await r();typeof a<"u"&&(t=a),await this.lutimesPromise(t,s.atime,s.mtime)}async preserveTimeSync(t,r){let s=this.lstatSync(t),a=r();typeof a<"u"&&(t=a),this.lutimesSync(t,s.atime,s.mtime)}},jf=class extends Ip{constructor(){super(K)}}});var Gs,Cp=Xe(()=>{Cg();Gs=class extends Ip{getExtractHint(t){return this.baseFs.getExtractHint(t)}resolve(t){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(t)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(t,r,s){return this.baseFs.openPromise(this.mapToBase(t),r,s)}openSync(t,r,s){return this.baseFs.openSync(this.mapToBase(t),r,s)}async opendirPromise(t,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(t),r),{path:t})}opendirSync(t,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(t),r),{path:t})}async readPromise(t,r,s,a,n){return await this.baseFs.readPromise(t,r,s,a,n)}readSync(t,r,s,a,n){return this.baseFs.readSync(t,r,s,a,n)}async writePromise(t,r,s,a,n){return typeof r=="string"?await this.baseFs.writePromise(t,r,s):await this.baseFs.writePromise(t,r,s,a,n)}writeSync(t,r,s,a,n){return typeof r=="string"?this.baseFs.writeSync(t,r,s):this.baseFs.writeSync(t,r,s,a,n)}async closePromise(t){return this.baseFs.closePromise(t)}closeSync(t){this.baseFs.closeSync(t)}createReadStream(t,r){return this.baseFs.createReadStream(t!==null?this.mapToBase(t):t,r)}createWriteStream(t,r){return this.baseFs.createWriteStream(t!==null?this.mapToBase(t):t,r)}async realpathPromise(t){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(t)))}realpathSync(t){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(t)))}async existsPromise(t){return this.baseFs.existsPromise(this.mapToBase(t))}existsSync(t){return this.baseFs.existsSync(this.mapToBase(t))}accessSync(t,r){return this.baseFs.accessSync(this.mapToBase(t),r)}async accessPromise(t,r){return this.baseFs.accessPromise(this.mapToBase(t),r)}async statPromise(t,r){return this.baseFs.statPromise(this.mapToBase(t),r)}statSync(t,r){return this.baseFs.statSync(this.mapToBase(t),r)}async fstatPromise(t,r){return this.baseFs.fstatPromise(t,r)}fstatSync(t,r){return this.baseFs.fstatSync(t,r)}lstatPromise(t,r){return this.baseFs.lstatPromise(this.mapToBase(t),r)}lstatSync(t,r){return this.baseFs.lstatSync(this.mapToBase(t),r)}async fchmodPromise(t,r){return this.baseFs.fchmodPromise(t,r)}fchmodSync(t,r){return this.baseFs.fchmodSync(t,r)}async chmodPromise(t,r){return this.baseFs.chmodPromise(this.mapToBase(t),r)}chmodSync(t,r){return this.baseFs.chmodSync(this.mapToBase(t),r)}async fchownPromise(t,r,s){return this.baseFs.fchownPromise(t,r,s)}fchownSync(t,r,s){return this.baseFs.fchownSync(t,r,s)}async chownPromise(t,r,s){return this.baseFs.chownPromise(this.mapToBase(t),r,s)}chownSync(t,r,s){return this.baseFs.chownSync(this.mapToBase(t),r,s)}async renamePromise(t,r){return this.baseFs.renamePromise(this.mapToBase(t),this.mapToBase(r))}renameSync(t,r){return this.baseFs.renameSync(this.mapToBase(t),this.mapToBase(r))}async copyFilePromise(t,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(t),this.mapToBase(r),s)}copyFileSync(t,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(t),this.mapToBase(r),s)}async appendFilePromise(t,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(t),r,s)}appendFileSync(t,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(t),r,s)}async writeFilePromise(t,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(t),r,s)}writeFileSync(t,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(t),r,s)}async unlinkPromise(t){return this.baseFs.unlinkPromise(this.mapToBase(t))}unlinkSync(t){return this.baseFs.unlinkSync(this.mapToBase(t))}async utimesPromise(t,r,s){return this.baseFs.utimesPromise(this.mapToBase(t),r,s)}utimesSync(t,r,s){return this.baseFs.utimesSync(this.mapToBase(t),r,s)}async lutimesPromise(t,r,s){return this.baseFs.lutimesPromise(this.mapToBase(t),r,s)}lutimesSync(t,r,s){return this.baseFs.lutimesSync(this.mapToBase(t),r,s)}async mkdirPromise(t,r){return this.baseFs.mkdirPromise(this.mapToBase(t),r)}mkdirSync(t,r){return this.baseFs.mkdirSync(this.mapToBase(t),r)}async rmdirPromise(t,r){return this.baseFs.rmdirPromise(this.mapToBase(t),r)}rmdirSync(t,r){return this.baseFs.rmdirSync(this.mapToBase(t),r)}async rmPromise(t,r){return this.baseFs.rmPromise(this.mapToBase(t),r)}rmSync(t,r){return this.baseFs.rmSync(this.mapToBase(t),r)}async linkPromise(t,r){return this.baseFs.linkPromise(this.mapToBase(t),this.mapToBase(r))}linkSync(t,r){return this.baseFs.linkSync(this.mapToBase(t),this.mapToBase(r))}async symlinkPromise(t,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(t))return this.baseFs.symlinkPromise(this.mapToBase(t),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),t)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkP Line truncated
`,NA=ur(`\\
`,!1),OA=function(){return""},Aa="\\",pa=ur("\\",!1),LA=/^[\\$"`]/,gr=zi(["\\","$",'"',"`"],!1,!1),ko=function(N){return N},qa="\\a",Ue=ur("\\a",!1),wr=function(){return"a"},gf="\\b",MA=ur("\\b",!1),UA=function(){return"\b"},cu=/^[Ee]/,uu=zi(["E","e"],!1,!1),cc=function(){return"\x1B"},we="\\f",Ot=ur("\\f",!1),uc=function(){return"\f"},Oi="\\n",fo=ur("\\n",!1),Tt=function(){return`
`},Rn="\\r",ha=ur("\\r",!1),Gi=function(){return"\r"},Li="\\t",Ya=ur("\\t",!1),yn=function(){return" "},Zn="\\v",fu=ur("\\v",!1),Eh=function(){return"\v"},Wa=/^[\\'"?]/,Va=zi(["\\","'",'"',"?"],!1,!1),Ka=function(N){return String.fromCharCode(parseInt(N,16))},$e="\\x",Ja=ur("\\x",!1),mf="\\u",fc=ur("\\u",!1),Sn="\\U",da=ur("\\U",!1),_A=function(N){return String.fromCodePoint(parseInt(N,16))},HA=/^[0-7]/,ga=zi([["0","7"]],!1,!1),Ql=/^[0-9a-fA-f]/,Ut=zi([["0","9"],["a","f"],["A","f"]],!1,!1),Tn=Cf(),ma="{}",za=ur("{}",!1),ss=function(){return"{}"},Ac="-",Au=ur("-",!1),pc="+",Xa=ur("+",!1),Mi=".",vs=ur(".",!1),Rl=function(N,J,re){return{type:"number",value:(N==="-"?-1:1)*parseFloat(J.join("")+"."+re.join(""))}},yf=function(N,J){return{type:"number",value:(N==="-"?-1:1)*parseInt(J.join(""))}},hc=function(N){return{type:"variable",...N}},Bi=function(N){return{type:"variable",name:N}},Fn=function(N){return N},dc="*",ze=ur("*",!1),at="/",St=ur("/",!1),lr=function(N,J,re){return{type:J==="*"?"multiplication":"division",right:re}},te=function(N,J){return J.reduce((re,de)=>({left:re,...de}),N)},ye=function(N,J,re){return{type:J==="+"?"addition":"subtraction",right:re}},Oe="$((",mt=ur("$((",!1),Et="))",Dt=ur("))",!1),tr=function(N){return N},pn="$(",ui=ur("$(",!1),qi=function(N){return N},Nn="${",Za=ur("${",!1),By=":-",J1=ur(":-",!1),Qo=function(N,J){return{name:N,defaultValue:J}},vy=":-}",Ih=ur(":-}",!1),z1=function(N){return{name:N,defaultValue:[]}},Ro=":+",Ch=ur(":+",!1),wh=function(N,J){return{name:N,alternativeValue:J}},pu=":+}",Bh=ur(":+}",!1),Nd=function(N){return{name:N,alternativeValue:[]}},Od=function(N){return{name:N}},Ld="$",Sy=ur("$",!1),Ef=function(N){return t.isGlobPattern(N)},To=function(N){return N},Tl=/^[a-zA-Z0-9_]/,vh=zi([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Md=function(){return xy()},Fl=/^[$@*?#a-zA-Z0-9_\-]/,Nl=zi(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),by=/^[()}<>$|&; \t"']/,jA=zi(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Dy=/^[<>&; \t"']/,Py=zi(["<",">","&",";"," "," ",'"',"'"],!1,!1),GA=/^[ \t]/,qA=zi([" "," "],!1,!1),Y=0,xt=0,YA=[{line:1,column:1}],Fo=0,If=[],yt=0,hu;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function xy(){return e.substring(xt,Y)}function Ud(){return wf(xt,Y)}function X1(N,J){throw J=J!==void 0?J:wf(xt,Y),WA([_d(N)],e.substring(xt,Y),J)}function Sh(N,J){throw J=J!==void 0?J:wf(xt,Y),mi(N,J)}function ur(N,J){return{type:"literal",text:N,ignoreCase:J}}function zi(N,J,re){return{type:"class",parts:N,inverted:J,ignoreCase:re}}function Cf(){return{type:"any"}}function $a(){return{type:"end"}}function _d(N){return{type:"other",description:N}}function du(N){var J=YA[N],re;if(J)return J;for(re=N-1;!YA[re];)re--;for(J=YA[re],J={line:J.line,column:J.column};re<N;)e.charCodeAt(re)===10?(J.line++,J.column=1):J.column++,re++;return YA[N]=J,J}function wf(N,J){var re=du(N),de=du(J);return{start:{offset:N,line:re.line,column:re.column},end:{offset:J,line:de.line,column:de.column}}}function wt(N){Y<Fo||(Y>Fo&&(Fo=Y,If=[]),If.push(N))}function mi(N,J){return new vg(N,null,null,J)}function WA(N,J,re){return new vg(vg.buildMessage(N,J),N,J,re)}function el(){var N,J,re;for(N=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=ya(),re===r&&(re=null),re!==r?(xt=N,J=n(re),N=J):(Y=N,N=r)):(Y=N,N=r),N}function ya(){var N,J,re,de,Ke;if(N=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=Hd(),de!==r?(Ke=tl(),Ke===r&&(Ke=null),Ke!==r?(xt=N,J=c(J,de,Ke),N=J):(Y=N,N=r)):(Y=N,N=r)):(Y=N,N=r)}else Y=N,N=r;if(N===r)if(N=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=Hd(),de===r&&(de=null),de!==r?(xt=N,J=f(J,de),N=J):(Y=N,N=r)):(Y=N,N=r)}else Y=N,N=r;return N}function tl(){var N,J,re,de,Ke;for(N=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=ya(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=N,J=p(re),N=J):(Y=N,N=r)}else Y=N,N=r;else Y=N,N=r;return N}function Hd(){var N;return e.charCodeAt(Y)===59?(N=h,Y++):(N=r,yt===0&&wt(E)),N===r&&(e.charCodeAt(Y)===38?(N=C,Y++):(N=r,yt===0&&wt(S))),N}function bh(){var N,J,re;return N=Y,J=VA(),J!==r?(re=jd(),re===r&&(re=null),re!==r?(xt=N,J=x(J,re),N=J):(Y=N,N=r)):(Y=N,N=r),N}function jd(){var N,J,re,de,Ke,pt,mr;for(N=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=ky(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=bh(),Ke!==r){for(pt=[],mr=kt();mr!==r;)pt.push(mr),mr=kt();pt!==r?(xt=N,J=I(re,Ke),N=J):(Y=N,N=r)}else Y=N,N=r;else Y=N,N=r}else Y=N,N=r;else Y=N,N=r;return N}function ky(){var N;return e.substr(Y,2)===T?(N=T,Y+=2):(N=r,yt===0&&wt(O)),N===r&&(e.substr(Y,2)===U?(N=U,Y+=2):(N=r,yt===0&&wt(V))),N}function VA(){var N,J,re;return N=Y,J=Bf(),J!==r?(re=Gd(),re===r&&(re=null),re!==r?(xt=N,J=$(J,re),N=J):(Y=N,N=r)):(Y=N,N=r),N}function Gd(){var N,J,re,de,Ke,pt,mr;for(N=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)iLine truncated
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),k6e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(Y$,([e,t])=>[e,`"$'${t}'"`])]),W$=e=>Y$.get(e)??`\\x${e.charCodeAt(0).toString(16).padStart(2,"0")}`,Q6e=e=>k6e.get(e)??`"$'${W$(e)}'"`});var J$=G((SPt,K$)=>{"use strict";function R6e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function bg(e,t,r,s){this.message=e,this.expected=t,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,bg)}R6e(bg,Error);bg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+"-"+n(h.parts[C][1]):n(h.parts[C]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(e)+" but "+p(t)+" found."};function T6e(e,t){t=t!==void 0?t:{};var r={},s={resolution:ke},a=ke,n="/",c=Be("/",!1),f=function(Me,P){return{from:Me,descriptor:P}},p=function(Me){return{descriptor:Me}},h="@",E=Be("@",!1),C=function(Me,P){return{fullName:Me,description:P}},S=function(Me){return{fullName:Me}},x=function(){return Ce()},I=/^[^\/@]/,T=me(["/","@"],!0,!1),O=/^[^\/]/,U=me(["/"],!0,!1),V=0,$=0,ie=[{line:1,column:1}],fe=0,ae=[],ge=0,he;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function Ce(){return e.substring($,V)}function Ee(){return ot($,V)}function d(Me,P){throw P=P!==void 0?P:ot($,V),Ne([be(Me)],e.substring($,V),P)}function Se(Me,P){throw P=P!==void 0?P:ot($,V),tt(Me,P)}function Be(Me,P){return{type:"literal",text:Me,ignoreCase:P}}function me(Me,P,w){return{type:"class",parts:Me,inverted:P,ignoreCase:w}}function ue(){return{type:"any"}}function Z(){return{type:"end"}}function be(Me){return{type:"other",description:Me}}function Qe(Me){var P=ie[Me],w;if(P)return P;for(w=Me-1;!ie[w];)w--;for(P=ie[w],P={line:P.line,column:P.column};w<Me;)e.charCodeAt(w)===10?(P.line++,P.column=1):P.column++,w++;return ie[Me]=P,P}function ot(Me,P){var w=Qe(Me),D=Qe(P);return{start:{offset:Me,line:w.line,column:w.column},end:{offset:P,line:D.line,column:D.column}}}function _(Me){V<fe||(V>fe&&(fe=V,ae=[]),ae.push(Me))}function tt(Me,P){return new bg(Me,null,null,P)}function Ne(Me,P,w){return new bg(bg.buildMessage(Me,P),Me,P,w)}function ke(){var Me,P,w,D;return Me=V,P=De(),P!==r?(e.charCodeAt(V)===47?(w=n,V++):(w=r,ge===0&&_(c)),w!==r?(D=De(),D!==r?($=Me,P=f(P,D),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=De(),P!==r&&($=Me,P=p(P)),Me=P),Me}function De(){var Me,P,w,D;return Me=V,P=je(),P!==r?(e.charCodeAt(V)===64?(w=h,V++):(w=r,ge===0&&_(E)),w!==r?(D=ct(),D!==r?($=Me,P=C(P,D),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=je(),P!==r&&($=Me,P=S(P)),Me=P),Me}function je(){var Me,P,w,D,y;return Me=V,e.charCodeAt(V)===64?(P=h,V++):(P=r,ge===0&&_(E)),P!==r?(w=Re(),w!==r?(e.charCodeAt(V)===47?(D=n,V++):(D=r,ge===0&&_(c)),D!==r?(y=Re(),y!==r?($=Me,P=x(),Me=P):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r)):(V=Me,Me=r),Me===r&&(Me=V,P=Re(),P!==r&&($=Me,P=x()),Me=P),Me}function Re(){var Me,P,w;if(Me=V,P=[],I.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,ge===0&&_(T)),w!==r)for(;w!==r;)P.push(w),I.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,ge===0&&_(T));else P=r;return P!==r&&($=Me,P=x()),Me=P,Me}function ct(){var Me,P,w;if(Me=V,P=[],O.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,ge===0&&_(U)),w!==r)for(;w!==r;)P.push(w),O.test(e.charAt(V))?(w=e.charAt(V),V++):(w=r,ge===0&&_(U));else P=r;return P!==r&&($=Me,P=x()),Me=P,Me}if(he=a(),he!==r&&V===e.length)return he;throw he!==r&&V<e.length&&_(Z()),Ne(ae,fe<e.length?e.charAt(fe):null,fe<e.length?ot(fe,fe+1):ot(fe,fe))}K$.exports={SyntaxError:bg,parse:T6e}});function mx(e){let t=e.match(/^\*{1,2}\/(.*)/);if(t)throwLine truncated
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=" ... ",a+=5;break}for(n="",c=this.position;c<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=" ... ",c-=5;break}return f=this.buffer.slice(a,c),eee.repeat(" ",t)+s+f+n+`
`+eee.repeat(" ",t+this.position-a+s.length)+"^"};FU.prototype.toString=function(t){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(s+=`:
`+r)),s};tee.exports=FU});var xs=G((kPt,iee)=>{"use strict";var nee=EE(),U6e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],_6e=["scalar","sequence","mapping"];function H6e(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(s){t[String(s)]=r})}),t}function j6e(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(U6e.indexOf(r)===-1)throw new nee('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=H6e(t.styleAliases||null),_6e.indexOf(this.kind)===-1)throw new nee('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}iee.exports=j6e});var xg=G((QPt,oee)=>{"use strict";var see=Pg(),Ex=EE(),G6e=xs();function NU(e,t,r){var s=[];return e.include.forEach(function(a){r=NU(a,t,r)}),e[t].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function q6e(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function s(a){e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(s);return e}function IE(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Ex("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=NU(this,"implicit",[]),this.compiledExplicit=NU(this,"explicit",[]),this.compiledTypeMap=q6e(this.compiledImplicit,this.compiledExplicit)}IE.DEFAULT=null;IE.create=function(){var t,r;switch(arguments.length){case 1:t=IE.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new Ex("Wrong number of arguments for Schema.create function")}if(t=see.toArray(t),r=see.toArray(r),!t.every(function(s){return s instanceof IE}))throw new Ex("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(s){return s instanceof G6e}))throw new Ex("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new IE({include:t,explicit:r})};oee.exports=IE});var lee=G((RPt,aee)=>{"use strict";var Y6e=xs();aee.exports=new Y6e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var uee=G((TPt,cee)=>{"use strict";var W6e=xs();cee.exports=new W6e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var Aee=G((FPt,fee)=>{"use strict";var V6e=xs();fee.exports=new V6e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ix=G((NPt,pee)=>{"use strict";var K6e=xg();pee.exports=new K6e({explicit:[lee(),uee(),Aee()]})});var dee=G((OPt,hee)=>{"use strict";var J6e=xs();function z6e(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function X6e(){return null}function Z6e(e){return e===null}hee.exports=new J6e("tag:yaml.org,2002:null",{kind:"scalar",resolve:z6e,construct:X6e,predicate:Z6e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var mee=G((LPt,gee)=>{"use strict";var $6e=xs();function eGe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function tGe(e){return e==="true"||e==="True"||e==="TRUE"}function rGe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}gee.exports=new $6e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eGe,construct:tGe,predicate:rGe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var Eee=G((MPt,yee)=>{"use strict";var nGe=Pg(),iGe=xs();function sGe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function oGe(e){return 48<=e&&e<=55}function aGe(e){return 48<=e&&e<=57}function lGe(e){if(e===null)return!1;var t=e.length,r=0,s=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;s=!0}return s&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!sGe(e.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}for(;r<t;r++)if(a=e[r],a!=="_"){if(!oGe(e.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(a===":")break;if(!aGe(e.charCodeAt(r)))return!1;s=!0}return!s||a==="_"?!1:a!==":"?!0:/^( Line truncated
\r`;function DGe(e){if(e===null)return!1;var t,r,s=0,a=e.length,n=MU;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;s+=6}return s%8===0}function PGe(e){var t,r,s=e.replace(/[\r\n=]/g,""),a=s.length,n=MU,c=0,f=[];for(t=0;t<a;t++)t%4===0&&t&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(t));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),kg?kg.from?kg.from(f):new kg(f):f}function xGe(e){var t="",r=0,s,a,n=e.length,c=MU;for(s=0;s<n;s++)s%3===0&&s&&(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]),r=(r<<8)+e[s];return a=n%3,a===0?(t+=c[r>>18&63],t+=c[r>>12&63],t+=c[r>>6&63],t+=c[r&63]):a===2?(t+=c[r>>10&63],t+=c[r>>4&63],t+=c[r<<2&63],t+=c[64]):a===1&&(t+=c[r>>2&63],t+=c[r<<4&63],t+=c[64],t+=c[64]),t}function kGe(e){return kg&&kg.isBuffer(e)}Ree.exports=new bGe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:DGe,construct:PGe,predicate:kGe,represent:xGe})});var Nee=G((WPt,Fee)=>{"use strict";var QGe=xs(),RGe=Object.prototype.hasOwnProperty,TGe=Object.prototype.toString;function FGe(e){if(e===null)return!0;var t=[],r,s,a,n,c,f=e;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,TGe.call(a)!=="[object Object]")return!1;for(n in a)if(RGe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}function NGe(e){return e!==null?e:[]}Fee.exports=new QGe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:FGe,construct:NGe})});var Lee=G((VPt,Oee)=>{"use strict";var OGe=xs(),LGe=Object.prototype.toString;function MGe(e){if(e===null)return!0;var t,r,s,a,n,c=e;for(n=new Array(c.length),t=0,r=c.length;t<r;t+=1){if(s=c[t],LGe.call(s)!=="[object Object]"||(a=Object.keys(s),a.length!==1))return!1;n[t]=[a[0],s[a[0]]]}return!0}function UGe(e){if(e===null)return[];var t,r,s,a,n,c=e;for(n=new Array(c.length),t=0,r=c.length;t<r;t+=1)s=c[t],a=Object.keys(s),n[t]=[a[0],s[a[0]]];return n}Oee.exports=new OGe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:MGe,construct:UGe})});var Uee=G((KPt,Mee)=>{"use strict";var _Ge=xs(),HGe=Object.prototype.hasOwnProperty;function jGe(e){if(e===null)return!0;var t,r=e;for(t in r)if(HGe.call(r,t)&&r[t]!==null)return!1;return!0}function GGe(e){return e!==null?e:{}}Mee.exports=new _Ge("tag:yaml.org,2002:set",{kind:"mapping",resolve:jGe,construct:GGe})});var CE=G((JPt,_ee)=>{"use strict";var qGe=xg();_ee.exports=new qGe({include:[LU()],implicit:[Pee(),kee()],explicit:[Tee(),Nee(),Lee(),Uee()]})});var jee=G((zPt,Hee)=>{"use strict";var YGe=xs();function WGe(){return!0}function VGe(){}function KGe(){return""}function JGe(e){return typeof e>"u"}Hee.exports=new YGe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:WGe,construct:VGe,predicate:JGe,represent:KGe})});var qee=G((XPt,Gee)=>{"use strict";var zGe=xs();function XGe(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),s="";return!(t[0]==="/"&&(r&&(s=r[1]),s.length>3||t[t.length-s.length-1]!=="/"))}function ZGe(e){var t=e,r=/\/([gim]*)$/.exec(e),s="";return t[0]==="/"&&(r&&(s=r[1]),t=t.slice(1,t.length-s.length-1)),new RegExp(t,s)}function $Ge(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function e5e(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Gee.exports=new zGe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:XGe,construct:ZGe,predicate:e5e,represent:$Ge})});var Vee=G((ZPt,Wee)=>{"use strict";var Cx;try{Yee=Ie,Cx=Yee("esprima")}catch{typeof window<"u"&&(Cx=window.esprima)}var Yee,t5e=xs();function r5e(e){if(e===null)return!1;try{var t="("+e+")",r=Cx.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function n5e(e){var t="("+e+")",r=Cx.parse(t,{range:!0}),s=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(s,t.slice(a[0]+1,a[1]-1)):new Function(s,"return "+t.slice(a[0],a[1]))}function i5e(e){return e.toString()}function s5e(e){return Object.prototype.toString.call(e)==="[object Function]"}Wee.exports=new t5e("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r5e,construct:n5e,predicate:s5e,represent:i5e})});var _2=G((ext,Jee)=>{"use strict";var Kee=xg();Jee.exports=Kee.DEFAULT=new Kee({include:[CE()],explicit:[jee(),qee(),Vee()]})});var hte=G((txt,H2)=>{"use strict";var Bp=Pg(),rte=EE(),o5e=ree(),nte=CE(),a5e=_2(),s0=Object.prototype.hasOwnProperty,wx=1,ite=2,ste=3,Bx=4,UU=1,l5e=2,zee=3,c5e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84 Line truncated
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function d5e(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var lte=new Array(256),cte=new Array(256);for(Qg=0;Qg<256;Qg++)lte[Qg]=Zee(Qg)?1:0,cte[Qg]=Zee(Qg);var Qg;function g5e(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a5e,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ute(e,t){return new rte(t,new o5e(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Nr(e,t){throw ute(e,t)}function vx(e,t){e.onWarning&&e.onWarning.call(null,ute(e,t))}var $ee={YAML:function(t,r,s){var a,n,c;t.version!==null&&Nr(t,"duplication of %YAML directive"),s.length!==1&&Nr(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),a===null&&Nr(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Nr(t,"unacceptable YAML version of the document"),t.version=s[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&vx(t,"unsupported YAML version of the document")},TAG:function(t,r,s){var a,n;s.length!==2&&Nr(t,"TAG directive accepts exactly two arguments"),a=s[0],n=s[1],ote.test(a)||Nr(t,"ill-formed tag handle (first argument) of the TAG directive"),s0.call(t.tagMap,a)&&Nr(t,'there is a previously declared suffix for "'+a+'" tag handle'),ate.test(n)||Nr(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[a]=n}};function i0(e,t,r,s){var a,n,c,f;if(t<r){if(f=e.input.slice(t,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Nr(e,"expected valid JSON character");else c5e.test(f)&&Nr(e,"the stream contains non-printable characters");e.result+=f}}function ete(e,t,r,s){var a,n,c,f;for(Bp.isObject(r)||Nr(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],s0.call(t,n)||(t[n]=r[n],s[n]=!0)}function BE(e,t,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Nr(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Xee(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&Xee(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)ete(e,t,n[p],r);else ete(e,t,n,r);else!e.json&&!s0.call(r,a)&&s0.call(t,a)&&(e.line=c||e.line,e.position=f||e.position,Nr(e,"duplicated mapping key")),t[a]=n,delete r[a];return t}function _U(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Nr(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function cs(e,t,r){for(var s=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Rg(a);)a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Yf(a))for(_U(e),a=e.input.charCodeAt(e.position),s++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&s!==0&&e.lineIndent<r&&vx(e,"deficient indentation"),s}function Sx(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||fl(r)))}function HU(e,t){t===1?e.result+=" ":t>1&&(e.result+=Bp.repeat(`
`,t-1))}function m5e(e,t,r){var s,a,n,c,f,p,h,E,C=e.kind,S=e.result,x;if(x=e.input.charCodeAt(e.position),fl(x)||wE(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=e.input.charCodeAt(e.position+1),fl(a)||r&&wE(a)))return!1;for(e.kind="scalar",e.result="",n=c=e.position,f=!1;x!==0;){if(x===58){if(a=e.input.charCodeAt(e.position+1),fl(a)||r&&wE(a))break}else if(x===35){if(s=e.input.charCodeAt(e.position-1),fl(s))break}else{if(e.position===e.lineStart&&Sx(e)||r&&wE(x))break;if(Yf(x))if(p=e.line,h=e.lineStart,E=e.lineIndent,cs(e,!1,-1),e.lineIndent>=t){f=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=p,e.lineStart=h,e.lineIndent=E;break}}f&&(i0(e,n,c,!1),HU(e,e.line-p),n=c=e.position,f=!1),Rg(x)||(c=e.position+1),x=e.input.charCodeAt(++e.position)}return i0(e,n,c,!1),e.result?!0:(e.kind=C,e.result=S,!1)}function y5e(e,t){var r,s,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,s=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(i0(e,s,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)s=e.position,e.position++,a=e.position;else return!0;else Yf(r)?(i0(e,s,a,!0),HU(e,cs(e,!1,t)),s=a=e.position):e.position===e.lineStart&&Sx(e)?Nr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Nr(e,"unexpected end of the stream within a single quoted scalar")}function E5e(e,t){var r,s,a,n,c,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=s=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return i0(e,r,e.position,!0),e.position++,!0;if(f===92){if(i0(e,r,e.position,!0),f=e.input.charCodeAt(++e.position),Yf(f))cs(e,!1,t);else if(f<256&&lte[f])e.result+=cte[f],e.position++;else if((c=p5e(f))>0){for(a=c,n=0;a>0;a--)f=e.input.charCodeAt(++e.position),(c=A5e(f))>=0?n=(n<<4)+c:Nr(e,"expected hexadecimal character");e.result+=d5e(n),e.position++}else Nr(e,"unknown escape sequence");r=s=e.position}else Yf(f)?(i0(e,r,s,!0),HU(e,cs(e,!1,t)),r=s=e.position):e.position===e.lineStart&&Sx(e)?Nr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,s=e.position)}Nr(e,"unexpected end of the stream within a double quoted scalar")}function I5e(e,t){var r=!0,s,a=e.tag,n,c=e.anchor,f,p,h,E,C,S={},x,I,T,O;if(O=e.input.charCodeAt(e.position),O===91)p=93,C=!1,n=[];else if(O===123)p=125,C=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),O=e.input.charCodeAt(++e.position);O!==0;){if(cs(e,!0,t),O=e.input.charCodeAt(e.position),O===p)return e.position++,e.tag=a,e.anchor=c,e.kind=C?"mapping":"sequence",e.result=n,!0;r||Nr(e,"missed comma between flow collection entries"),I=x=T=null,h=E=!1,O===63&&(f=e.input.charCodeAt(e.position+1),fl(f)&&(h=E=!0,e.position++,cs(e,!0,t))),s=e.line,vE(e,t,wx,!1,!0),I=e.tag,x=e.result,cs(e,!0,t),O=e.input.charCodeAt(e.position),(E||e.line===s)&&O===58&&(h=!0,O=e.input.charCodeAt(++e.position),cs(e,!0,t),vE(e,t,wx,!1,!0),T=e.result),C?BE(e,n,S,I,x,T):h?n.push(BE(e,null,S,I,x,T)):n.push(x),cs(e,!0,t),O=e.input.charCodeAt(e.position),O===44?(r=!0,O=e.input.charCodeAt(++e.position)):r=!1}Nr(e,"unexpected end of the stream within a flow collection")}function C5e(e,t){var r,s,a=UU,n=!1,c=!1,f=t,p=0,h=!1,E,C;if(C=e.input.charCodeAt(e.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(e.kind="scalar",e.result="";C!==0;)if(C=e.input.charCodeAt(++e.position),C===43||C===45)UU===a?a=C===43?zee:l5e:Nr(e,"repeat of a chomping mode identifier");else if((E=h5e(C))>=0)E===0?Nr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Nr(e,"repeat of an indentation width identifier"):(f=t+E-1,c=!0);else break;if(Rg(C)){do C=e.input.charCodeAt(++e.position);while(Rg(C));if(C===35)do C=e.input.charCodeAt(++e.position);while(!Yf(C)&&C!==0)}for(;C!==0;){for(_U(e),e.lineIndent=0,C=e.input.charCodeAt(e.position);(!c||e.lineIndent<f)&&C===32;)e.lineIndent++,C=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>f&&(f=e.lineIndent),Yf(C)){p++;continue}if(e.lineIndent<f){a===zee?e.result+=Bp.repeat(`
`,n?1+p:p):a===UU&&n&&(e.result+=`
`);break}for(s?Rg(C)?(h=!0,e.result+=Bp.repeat(`
`,n?1+p:p)):h?(h=!1,e.result+=Bp.repeat(`
`,p+1)):p===0?n&&(e.result+=" "):e.result+=Bp.repeat(`
`,p):e.result+=Bp.repeat(`
`,n?1+p:p),n=!0,c=!0,p=0,r=e.position;!Yf(C)&&C!==0;)C=e.input.charCodeAt(++e.position);i0(e,r,e.position,!1)}return!0}function tte(e,t){var r,s=e.tag,a=e.anchor,n=[],c,f=!1,p;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(e.position);p!==0&&!(p!==45||(c=e.input.charCodeAt(e.position+1),!fl(c)));){if(f=!0,e.position++,cs(e,!0,-1)&&e.lineIndent<=t){n.push(null),p=e.input.charCodeAt(e.position);continue}if(r=e.line,vE(e,t,ste,!1,!0),n.push(e.result),cs(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)Nr(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return f?(e.tag=s,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}function w5e(e,t,r){var s,a,n,c,f=e.tag,p=e.anchor,h={},E={},C=null,S=null,x=null,I=!1,T=!1,O;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),O=e.input.charCodeAt(e.position);O!==0;){if(s=e.input.charCodeAt(e.position+1),n=e.line,c=e.position,(O===63||O===58)&&fl(s))O===63?(I&&(BE(e,h,E,C,S,null),C=S=x=null),T=!0,I=!0,a=!0):I?(I=!1,a=!0):Nr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,O=s;else if(vE(e,r,ite,!1,!0))if(e.line===n){for(O=e.input.charCodeAt(e.position);Rg(O);)O=e.input.charCodeAt(++e.position);if(O===58)O=e.input.charCodeAt(++e.position),fl(O)||Nr(e,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(BE(e,h,E,C,S,null),C=S=x=null),T=!0,I=!1,a=!1,C=e.tag,S=e.result;else if(T)Nr(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)Nr(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0;else break;if((e.line===n||e.lineIndent>t)&&(vE(e,t,Bx,!0,a)&&(I?S=e.result:x=e.result),I||(BE(e,h,E,C,S,x,n,c),C=S=x=null),cs(e,!0,-1),O=e.input.charCodeAt(e.position)),e.lineIndent>t&&O!==0)Nr(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return I&&BE(e,h,E,C,S,null),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=h),T}function B5e(e){var t,r=!1,s=!1,a,n,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&Nr(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(r=!0,c=e.input.charCodeAt(++e.position)):c===33?(s=!0,a="!!",c=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(n=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):Nr(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!fl(c);)c===33&&(s?Nr(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),ote.test(a)||Nr(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),f5e.test(n)&&Nr(e,"tag suffix cannot contain flow indicator characters")}return n&&!ate.test(n)&&Nr(e,"tag name cannot contain such characters: "+n),r?e.tag=n:s0.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:Nr(e,'undeclared tag handle "'+a+'"'),!0}function v5e(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Nr(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!fl(r)&&!wE(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Nr(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function S5e(e){var t,r,s;if(s=e.input.charCodeAt(e.position),s!==42)return!1;for(s=e.input.charCodeAt(++e.position),t=e.position;s!==0&&!fl(s)&&!wE(s);)s=e.input.charCodeAt(++e.position);return e.position===t&&Nr(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),s0.call(e.anchorMap,r)||Nr(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],cs(e,!0,-1),!0}function vE(e,t,r,s,a){var n,c,f,p=1,h=!1,E=!1,C,S,x,I,T;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=c=f=Bx===r||ste===r,s&&cs(e,!0,-1)&&(h=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;B5e(e)||v5e(e);)cs(e,!0,-1)?(h=!0,f=n,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||Bx===r)&&(wx===r||ite===r?I=t:I=t+1,T=e.position-e.lineStart,p===1?f&&(tte(e,T)||w5e(e,T,I))||I5e(e,I)?E=!0:(c&&C5e(e,I)||y5e(e,I)||E5e(e,I)?E=!0:S5e(e)?(E=!0,(e.tag!==null||e.anchor!==null)&&Nr(e,"alias node should not have any properties")):m5e(e,I,wx===r)&&(E=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(E=f&&tte(e,T))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Nr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),C=0,S=e.implicitTypes.length;C<S;C+=1)if(x=e.implicitTypes[C],x.resolve(e.result)){e.result=x.construct(e.result),e. Line truncated
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new g5e(e,t),s=e.indexOf("\0");for(s!==-1&&(r.position=s,Nr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)b5e(r);return r.documents}function Ate(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var s=fte(e,r);if(typeof t!="function")return s;for(var a=0,n=s.length;a<n;a+=1)t(s[a])}function pte(e,t){var r=fte(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new rte("expected a single document in the stream, but found more")}}function D5e(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),Ate(e,t,Bp.extend({schema:nte},r))}function P5e(e,t){return pte(e,Bp.extend({schema:nte},t))}H2.exports.loadAll=Ate;H2.exports.load=pte;H2.exports.safeLoadAll=D5e;H2.exports.safeLoad=P5e});var Lte=G((rxt,YU)=>{"use strict";var G2=Pg(),q2=EE(),x5e=_2(),k5e=CE(),wte=Object.prototype.toString,Bte=Object.prototype.hasOwnProperty,Q5e=9,j2=10,R5e=13,T5e=32,F5e=33,N5e=34,vte=35,O5e=37,L5e=38,M5e=39,U5e=42,Ste=44,_5e=45,bte=58,H5e=61,j5e=62,G5e=63,q5e=64,Dte=91,Pte=93,Y5e=96,xte=123,W5e=124,kte=125,Vo={};Vo[0]="\\0";Vo[7]="\\a";Vo[8]="\\b";Vo[9]="\\t";Vo[10]="\\n";Vo[11]="\\v";Vo[12]="\\f";Vo[13]="\\r";Vo[27]="\\e";Vo[34]='\\"';Vo[92]="\\\\";Vo[133]="\\N";Vo[160]="\\_";Vo[8232]="\\L";Vo[8233]="\\P";var V5e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function K5e(e,t){var r,s,a,n,c,f,p;if(t===null)return{};for(r={},s=Object.keys(t),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),p=e.compiledTypeMap.fallback[c],p&&Bte.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function dte(e){var t,r,s;if(t=e.toString(16).toUpperCase(),e<=255)r="x",s=2;else if(e<=65535)r="u",s=4;else if(e<=4294967295)r="U",s=8;else throw new q2("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+G2.repeat("0",s-t.length)+t}function J5e(e){this.schema=e.schema||x5e,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=G2.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=K5e(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function gte(e,t){for(var r=G2.repeat(" ",t),s=0,a=-1,n="",c,f=e.length;s<f;)a=e.indexOf(`
`,s),a===-1?(c=e.slice(s),s=f):(c=e.slice(s,a+1),s=a+1),c.length&&c!==`
`&&(n+=r),n+=c;return n}function jU(e,t){return`
`+G2.repeat(" ",e.indent*t)}function z5e(e,t){var r,s,a;for(r=0,s=e.implicitTypes.length;r<s;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}function qU(e){return e===T5e||e===Q5e}function SE(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function X5e(e){return SE(e)&&!qU(e)&&e!==65279&&e!==R5e&&e!==j2}function mte(e,t){return SE(e)&&e!==65279&&e!==Ste&&e!==Dte&&e!==Pte&&e!==xte&&e!==kte&&e!==bte&&(e!==vte||t&&X5e(t))}function Z5e(e){return SE(e)&&e!==65279&&!qU(e)&&e!==_5e&&e!==G5e&&e!==bte&&e!==Ste&&e!==Dte&&e!==Pte&&e!==xte&&e!==kte&&e!==vte&&e!==L5e&&e!==U5e&&e!==F5e&&e!==W5e&&e!==H5e&&e!==j5e&&e!==M5e&&e!==N5e&&e!==O5e&&e!==q5e&&e!==Y5e}function Qte(e){var t=/^\n* /;return t.test(e)}var Rte=1,Tte=2,Fte=3,Nte=4,bx=5;function $5e(e,t,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,C=-1,S=Z5e(e.charCodeAt(0))&&!qU(e.charCodeAt(e.length-1));if(t)for(n=0;n<e.length;n++){if(c=e.charCodeAt(n),!SE(c))return bx;f=n>0?e.charCodeAt(n-1):null,S=S&&mte(c,f)}else{for(n=0;n<e.length;n++){if(c=e.charCodeAt(n),c===j2)p=!0,E&&(h=h||n-C-1>s&&e[C+1]!==" ",C=n);else if(!SE(c))return bx;f=n>0?e.charCodeAt(n-1):null,S=S&&mte(c,f)}h=h||E&&n-C-1>s&&e[C+1]!==" "}return!p&&!h?S&&!a(e)?Rte:Tte:r>9&&Qte(e)?bx:h?Nte:Fte}function e9e(e,t,r,s){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&V5e.indexOf(t)!==-1)return"'"+t+"'";var a=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=s||e.flowLevel>-1&&r>=e.flowLevel;function f(p){return z5e(e,p)}switch($5e(t,c,e.indent,n,f)){case Rte:return t;case Tte:return"'"+t.replace(/'/g,"''")+"'";case Fte:return"|"+yte(t,e.indent)+Ete(gte(t,a));case Nte:return">"+yte(t,e.indent)+Ete(gte(t9e(t,n),a));case bx:return'"'+r9e(t,n)+'"';default:throw new q2("impossible error: invalid scalar style")}}()}function yte(e,t){var r=Qte(e)?String(t):"",s=e[e.length-1]===`
`,a=s&&(e[e.length-2]===`
`||e===`
`),n=a?"+":s?"":"-";return r+n+`
`}function Ete(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function t9e(e,t){for(var r=/(\n+)([^\n]*)/g,s=function(){var h=e.indexOf(`
`);return h=h!==-1?h:e.length,r.lastIndex=h,Ite(e.slice(0,h),t)}(),a=e[0]===`
`||e[0]===" ",n,c;c=r.exec(e);){var f=c[1],p=c[2];n=p[0]===" ",s+=f+(!a&&!n&&p!==""?`
`:"")+Ite(p,t),a=n}return s}function Ite(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p="";s=r.exec(e);)f=s.index,f-a>t&&(n=c>a?c:f,p+=`
`+e.slice(a,n),a=n+1),c=f;return p+=`
`,e.length-a>t&&c>a?p+=e.slice(a,c)+`
`+e.slice(c+1):p+=e.slice(a),p.slice(1)}function r9e(e){for(var t="",r,s,a,n=0;n<e.length;n++){if(r=e.charCodeAt(n),r>=55296&&r<=56319&&(s=e.charCodeAt(n+1),s>=56320&&s<=57343)){t+=dte((r-55296)*1024+s-56320+65536),n++;continue}a=Vo[r],t+=!a&&SE(r)?e[n]:a||dte(r)}return t}function n9e(e,t,r){var s="",a=e.tag,n,c;for(n=0,c=r.length;n<c;n+=1)Tg(e,t,r[n],!1,!1)&&(n!==0&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=a,e.dump="["+s+"]"}function i9e(e,t,r,s){var a="",n=e.tag,c,f;for(c=0,f=r.length;c<f;c+=1)Tg(e,t+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=jU(e,t)),e.dump&&j2===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}function s9e(e,t,r){var s="",a=e.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E="",c!==0&&(E+=", "),e.condenseFlow&&(E+='"'),p=n[c],h=r[p],Tg(e,t,p,!1,!1)&&(e.dump.length>1024&&(E+="? "),E+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Tg(e,t,h,!1,!1)&&(E+=e.dump,s+=E));e.tag=a,e.dump="{"+s+"}"}function o9e(e,t,r,s){var a="",n=e.tag,c=Object.keys(r),f,p,h,E,C,S;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new q2("sortKeys must be a boolean or a function");for(f=0,p=c.length;f<p;f+=1)S="",(!s||f!==0)&&(S+=jU(e,t)),h=c[f],E=r[h],Tg(e,t+1,h,!0,!0,!0)&&(C=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,C&&(e.dump&&j2===e.dump.charCodeAt(0)?S+="?":S+="? "),S+=e.dump,C&&(S+=jU(e,t)),Tg(e,t+1,E,!0,C)&&(e.dump&&j2===e.dump.charCodeAt(0)?S+=":":S+=": ",S+=e.dump,a+=S));e.tag=n,e.dump=a||"{}"}function Cte(e,t,r){var s,a,n,c,f,p;for(a=r?e.explicitTypes:e.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof t=="object"&&t instanceof f.instanceOf)&&(!f.predicate||f.predicate(t))){if(e.tag=r?f.tag:"?",f.represent){if(p=e.styleMap[f.tag]||f.defaultStyle,wte.call(f.represent)==="[object Function]")s=f.represent(t,p);else if(Bte.call(f.represent,p))s=f.represent[p](t,p);else throw new q2("!<"+f.tag+'> tag resolver accepts not "'+p+'" style');e.dump=s}return!0}return!1}function Tg(e,t,r,s,a,n){e.tag=null,e.dump=r,Cte(e,r,!1)||Cte(e,r,!0);var c=wte.call(e.dump);s&&(s=e.flowLevel<0||e.flowLevel>t);var f=c==="[object Object]"||c==="[object Array]",p,h;if(f&&(p=e.duplicates.indexOf(r),h=p!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(a=!1),h&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&h&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),c==="[object Object]")s&&Object.keys(e.dump).length!==0?(o9e(e,t,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(s9e(e,t,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump));else if(c==="[object Array]"){var E=e.noArrayIndent&&t>0?t-1:t;s&&e.dump.length!==0?(i9e(e,E,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(n9e(e,E,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump))}else if(c==="[object String]")e.tag!=="?"&&e9e(e,e.dump,t,n);else{if(e.skipInvalid)return!1;throw new q2("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function a9e(e,t){var r=[],s=[],a,n;for(GU(e,r,s),a=0,n=s.length;a<n;a+=1)t.duplicates.push(r[s[a]]);t.usedDuplicates=new Array(n)}function GU(e,t,r){var s,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)GU(e[a],t,r);else for(s=Object.keys(e),a=0,n=s.length;a<n;a+=1)GU(e[s[a]],t,r)}function Ote(e,t){t=t||{};var r=new J5e(t);return r.noRefs||a9e(e,r),Tg(r,0,e,!0,!0)?r.dump+`
`:""}function l9e(e,t){return Ote(e,G2.extend({schema:k5e},t))}YU.exports.dump=Ote;YU.exports.safeDump=l9e});var Ute=G((nxt,Yi)=>{"use strict";var Dx=hte(),Mte=Lte();function Px(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Yi.exports.Type=xs();Yi.exports.Schema=xg();Yi.exports.FAILSAFE_SCHEMA=Ix();Yi.exports.JSON_SCHEMA=OU();Yi.exports.CORE_SCHEMA=LU();Yi.exports.DEFAULT_SAFE_SCHEMA=CE();Yi.exports.DEFAULT_FULL_SCHEMA=_2();Yi.exports.load=Dx.load;Yi.exports.loadAll=Dx.loadAll;Yi.exports.safeLoad=Dx.safeLoad;Yi.exports.safeLoadAll=Dx.safeLoadAll;Yi.exports.dump=Mte.dump;Yi.exports.safeDump=Mte.safeDump;Yi.exports.YAMLException=EE();Yi.exports.MINIMAL_SCHEMA=Ix();Yi.exports.SAFE_SCHEMA=CE();Yi.exports.DEFAULT_SCHEMA=_2();Yi.exports.scan=Px("scan");Yi.exports.parse=Px("parse");Yi.exports.compose=Px("compose");Yi.exports.addConstructor=Px("addConstructor")});var Hte=G((ixt,_te)=>{"use strict";var c9e=Ute();_te.exports=c9e});var Gte=G((sxt,jte)=>{"use strict";function u9e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Fg(e,t,r,s){this.message=e,this.expected=t,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Fg)}u9e(Fg,Error);Fg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+"-"+n(h.parts[C][1]):n(h.parts[C]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(e)+" but "+p(t)+" found."};function f9e(e,t){t=t!==void 0?t:{};var r={},s={Start:fc},a=fc,n=function(te){return[].concat(...te)},c="-",f=yn("-",!1),p=function(te){return te},h=function(te){return Object.assign({},...te)},E="#",C=yn("#",!1),S=fu(),x=function(){return{}},I=":",T=yn(":",!1),O=function(te,ye){return{[te]:ye}},U=",",V=yn(",",!1),$=function(te,ye){return ye},ie=function(te,ye,Oe){return Object.assign({},...[te].concat(ye).map(mt=>({[mt]:Oe})))},fe=function(te){return te},ae=function(te){return te},ge=Wa("correct indentation"),he=" ",Ce=yn(" ",!1),Ee=function(te){return te.length===lr*St},d=function(te){return te.length===(lr+1)*St},Se=function(){return lr++,!0},Be=function(){return lr--,!0},me=function(){return ha()},ue=Wa("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,be=Zn(["\r",`
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Qe=/^[^\r\n\t ,\][{}:#"']/,ot=Zn(["\r",`
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),_=function(){return ha().replace(/^ *| *$/g,"")},tt="--",Ne=yn("--",!1),ke=/^[a-zA-Z\/0-9]/,De=Zn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),je=/^[^\r\n\t :,]/,Re=Zn(["\r",`
`," "," ",":",","],!0,!1),ct="null",Me=yn("null",!1),P=function(){return null},w="true",D=yn("true",!1),y=function(){return!0},F="false",z=yn("false",!1),X=function(){return!1},ee=Wa("string"),se='"',xe=yn('"',!1),Fe=function(){return""},ut=function(te){return te},Ct=function(te){return te.join("")},Yt=/^[^"\\\0-\x1F\x7F]/,ir=Zn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',mn=yn('\\"',!1),Pr=function(){return'"'},Cr="\\\\",Lr=yn("\\\\",!1),on=function(){return"\\"},ci="\\/",Do=yn("\\/",!1),is=function(){return"/"},ao="\\b",Po=yn("\\b",!1),ji=function(){return"\b"},lo="\\f",xo=yn("\\f",!1),FA=function(){return"\f"},df="\\n",mh=yn("\\n",!1),yh=function(){return`
`},co="\\r",qn=yn("\\r",!1),Ns=function(){return"\r"},uo="\\t",ou=yn("\\t",!1),au=function(){return" "},lu="\\u",NA=yn("\\u",!1),OA=function(te,ye,Oe,mt){return String.fromCharCode(parseInt(`0x${te}${ye}${Oe}${mt}`))},Aa=/^[0-9a-fA-F]/,pa=Zn([["0","9"],["a","f"],["A","F"]],!1,!1),LA=Wa("blank space"),gr=/^[ \t]/,ko=Zn([" "," "],!1,!1),qa=Wa("white space"),Ue=/^[ \t\n\r]/,wr=Zn([" "," ",`
`,"\r"],!1,!1),gf=`\r
`,MA=yn(`\r
`,!1),UA=`
`,cu=yn(`
`,!1),uu="\r",cc=yn("\r",!1),we=0,Ot=0,uc=[{line:1,column:1}],Oi=0,fo=[],Tt=0,Rn;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function ha(){return e.substring(Ot,we)}function Gi(){return Ka(Ot,we)}function Li(te,ye){throw ye=ye!==void 0?ye:Ka(Ot,we),mf([Wa(te)],e.substring(Ot,we),ye)}function Ya(te,ye){throw ye=ye!==void 0?ye:Ka(Ot,we),Ja(te,ye)}function yn(te,ye){return{type:"literal",text:te,ignoreCase:ye}}function Zn(te,ye,Oe){return{type:"class",parts:te,inverted:ye,ignoreCase:Oe}}function fu(){return{type:"any"}}function Eh(){return{type:"end"}}function Wa(te){return{type:"other",description:te}}function Va(te){var ye=uc[te],Oe;if(ye)return ye;for(Oe=te-1;!uc[Oe];)Oe--;for(ye=uc[Oe],ye={line:ye.line,column:ye.column};Oe<te;)e.charCodeAt(Oe)===10?(ye.line++,ye.column=1):ye.column++,Oe++;return uc[te]=ye,ye}function Ka(te,ye){var Oe=Va(te),mt=Va(ye);return{start:{offset:te,line:Oe.line,column:Oe.column},end:{offset:ye,line:mt.line,column:mt.column}}}function $e(te){we<Oi||(we>Oi&&(Oi=we,fo=[]),fo.push(te))}function Ja(te,ye){return new Fg(te,null,null,ye)}function mf(te,ye,Oe){return new Fg(Fg.buildMessage(te,ye),te,ye,Oe)}function fc(){var te;return te=_A(),te}function Sn(){var te,ye,Oe;for(te=we,ye=[],Oe=da();Oe!==r;)ye.push(Oe),Oe=da();return ye!==r&&(Ot=te,ye=n(ye)),te=ye,te}function da(){var te,ye,Oe,mt,Et;return te=we,ye=Ql(),ye!==r?(e.charCodeAt(we)===45?(Oe=c,we++):(Oe=r,Tt===0&&$e(f)),Oe!==r?(mt=Fn(),mt!==r?(Et=ga(),Et!==r?(Ot=te,ye=p(Et),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r),te}function _A(){var te,ye,Oe;for(te=we,ye=[],Oe=HA();Oe!==r;)ye.push(Oe),Oe=HA();return ye!==r&&(Ot=te,ye=h(ye)),te=ye,te}function HA(){var te,ye,Oe,mt,Et,Dt,tr,pn,ui;if(te=we,ye=Fn(),ye===r&&(ye=null),ye!==r){if(Oe=we,e.charCodeAt(we)===35?(mt=E,we++):(mt=r,Tt===0&&$e(C)),mt!==r){if(Et=[],Dt=we,tr=we,Tt++,pn=at(),Tt--,pn===r?tr=void 0:(we=tr,tr=r),tr!==r?(e.length>we?(pn=e.charAt(we),we++):(pn=r,Tt===0&&$e(S)),pn!==r?(tr=[tr,pn],Dt=tr):(we=Dt,Dt=r)):(we=Dt,Dt=r),Dt!==r)for(;Dt!==r;)Et.push(Dt),Dt=we,tr=we,Tt++,pn=at(),Tt--,pn===r?tr=void 0:(we=tr,tr=r),tr!==r?(e.length>we?(pn=e.charAt(we),we++):(pn=r,Tt===0&&$e(S)),pn!==r?(tr=[tr,pn],Dt=tr):(we=Dt,Dt=r)):(we=Dt,Dt=r);else Et=r;Et!==r?(mt=[mt,Et],Oe=mt):(we=Oe,Oe=r)}else we=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(mt=[],Et=ze(),Et!==r)for(;Et!==r;)mt.push(Et),Et=ze();else mt=r;mt!==r?(Ot=te,ye=x(),te=ye):(we=te,te=r)}else we=te,te=r}else we=te,te=r;if(te===r&&(te=we,ye=Ql(),ye!==r?(Oe=za(),Oe!==r?(mt=Fn(),mt===r&&(mt=null),mt!==r?(e.charCodeAt(we)===58?(Et=I,we++):(Et=r,Tt===0&&$e(T)),Et!==r?(Dt=Fn(),Dt===r&&(Dt=null),Dt!==r?(tr=ga(),tr!==r?(Ot=te,ye=O(Oe,tr),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r),te===r&&(te=we,ye=Ql(),ye!==r?(Oe=ss(),Oe!==r?(mt=Fn(),mt===r&&(mt=null),mt!==r?(e.charCodeAt(we)===58?(Et=I,we++):(Et=r,Tt===0&&$e(T)),Et!==r?(Dt=Fn(),Dt===r&&(Dt=null),Dt!==r?(tr=ga(),tr!==r?(Ot=te,ye=O(Oe,tr),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r),te===r))){if(te=we,ye=Ql(),ye!==r)if(Oe=ss(),Oe!==r)if(mt=Fn(),mt!==r)if(Et=Au(),Et!==r){if(Dt=[],tr=ze(),tr!==r)for(;tr!==r;)Dt.push(tr),tr=ze();else Dt=r;Dt!==r?(Ot=te,ye=O(Oe,Et),te=ye):(we=te,te=r)}else we=te,te=r;else we=te,te=r;else we=te,te=r;else we=te,te=r;if(te===r)if(te=we,ye=Ql(),ye!==r)if(Oe=ss(),Oe!==r){if(mt=[],Et=we,Dt=Fn(),Dt===r&&(Dt=null),Dt!==r?(e.charCodeAt(we)===44?(tr=U,we++):(tr=r,Tt===0&&$e(V)),tr!==r?(pn=Fn(),pn===r&&(pn=null),pn!==r?(ui=ss(),ui!==r?(Ot=Et,Dt=$(Oe,ui),Et=Dt):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r),Et!==r)for(;Et!==r;)mt.push(Et),Et=we,Dt=Fn(),Dt===r&&(Dt=null),Dt!==r?(e.charCodeAt(we)===44?(tr=U,we++):(tr=r,Tt===0&&$e(V)),tr!==r?(pn=Fn(),pn===r&&(pn=null),pn!==r?(ui=ss(),ui!==r?(Ot=Et,Dt=$(Oe,ui),Et=Dt):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r)):(we=Et,Et=r);else mt=r;mt!==r?(Et=Fn(),Et===r&&(Et=null),Et!==r?(e.charCodeAt(we)===58?(Dt=I,we++):(Dt=r,Tt===0&&$e(T)),Dt!==r?(tr=Fn(),tr===r&&(tr=null),tr!==r?(pn=ga(),pn!==r?(Ot=te,ye=ie(Oe,mt,pn),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)}else we=te,te=r;else we=te,te=r}return te}function ga(){var te,ye,Oe,mt,Et,Dt,tr;if(te=we,ye=we,Tt++,Oe=we,mt=at(),mt!==r?(Et=Ut(),Et!==r?(e.charCodeAt(we)===45?(Dt=c,we++):(Dt=r,Tt===0&&$e(f)),Dt!==r?(tr=Fn(),tr!==r?(mt=[mt,Et,Dt,tr],Oe=mt):(we=Oe,Oe=r)):(we=Oe,Oe=r)):(we=Oe,Oe=r)):(we=Oe,Oe=r),Tt--,Oe!==r?(we=ye,ye=void 0):ye=r,ye!==r?(Oe=ze(),Oe!==r?(mt=Tn(),mt!==r?(Et=Sn(),Et!==r?(Dt=ma(),Dt!==r?(Ot=te,ye=fe(Et),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r),te===r&&(te=we,ye=at(),ye!==r?(Oe=Tn(),Oe!==r?(mt=_A(),mt!==r?(Et=ma(),Et!==r?(Ot=te,ye=fe(mt),te=ye):(we=te,te=r)):(we=te,te=r)):(we=te,te=r)):(we=te,te=r),te===r))if(te=we,ye=Ac(),ye!==r){if(Oe=[],mt=ze(),mt!==r)for(;mt!==r;)Oe.push(mt),mt=ze();else Oe=r;Oe!==r?(Ot=te,ye=aLine truncated
`;if(typeof e=="number"||typeof e=="boolean")return`${e.toString()}
`;if(typeof e=="string")return`${Yte(e)}
`;if(Array.isArray(e)){if(e.length===0)return`[]
`;let s=" ".repeat(t);return`
${e.map(n=>`${s}- ${WU(n,t+1,!1)}`).join("")}`}if(typeof e=="object"&&e){let[s,a]=e instanceof xx?[e.data,!1]:[e,!0],n=" ".repeat(t),c=Object.keys(s);a&&c.sort((p,h)=>{let E=qte.indexOf(p),C=qte.indexOf(h);return E===-1&&C===-1?p<h?-1:p>h?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!Vte(s[p])).map((p,h)=>{let E=s[p],C=Yte(p),S=WU(E,t+1,!0),x=h>0||r?n:"",I=C.length>1024?`? ${C}
${x}:`:`${C}:`,T=S.startsWith(`
`)?S:` ${S}`;return`${x}${I}${T}`}).join(t===0?`
`:"")||`
`;return r?`
${f}`:`${f}`}throw new Error(`Unsupported value type (${e})`)}function Al(e){try{let t=WU(e,0,!1);return t!==`
`?t:""}catch(t){throw t.location&&(t.message=t.message.replace(/(\.)?$/,` (line ${t.location.start.line}, column ${t.location.start.column})$1`)),t}}function p9e(e){return e.endsWith(`
`)||(e+=`
`),(0,Wte.parse)(e)}function d9e(e){if(h9e.test(e))return p9e(e);let t=(0,kx.safeLoad)(e,{schema:kx.FAILSAFE_SCHEMA,json:!0});if(t==null)return{};if(typeof t!="object")throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function us(e){return d9e(e)}var kx,Wte,A9e,qte,xx,h9e,Kte=Xe(()=>{kx=et(Hte()),Wte=et(Gte()),A9e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,qte=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],xx=class{constructor(t){this.data=t}};Al.PreserveOrdering=xx;h9e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var Y2={};Vt(Y2,{parseResolution:()=>mx,parseShell:()=>hx,parseSyml:()=>us,stringifyArgument:()=>RU,stringifyArgumentSegment:()=>TU,stringifyArithmeticExpression:()=>gx,stringifyCommand:()=>QU,stringifyCommandChain:()=>yE,stringifyCommandChainThen:()=>kU,stringifyCommandLine:()=>dx,stringifyCommandLineThen:()=>xU,stringifyEnvSegment:()=>px,stringifyRedirectArgument:()=>M2,stringifyResolution:()=>yx,stringifyShell:()=>mE,stringifyShellLine:()=>mE,stringifySyml:()=>Al,stringifyValueArgument:()=>Sg});var Sc=Xe(()=>{V$();X$();Kte()});var zte=G((uxt,VU)=>{"use strict";var g9e=e=>{let t=!1,r=!1,s=!1;for(let a=0;a<e.length;a++){let n=e[a];t&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(e=e.slice(0,a)+"-"+e.slice(a),t=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(e=e.slice(0,a-1)+"-"+e.slice(a-1),s=r,r=!1,t=!0):(t=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return e},Jte=(e,t)=>{if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);let r=a=>t.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(e)?e=e.map(a=>a.trim()).filter(a=>a.length).join("-"):e=e.trim(),e.length===0?"":e.length===1?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=g9e(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(e))};VU.exports=Jte;VU.exports.default=Jte});var Xte=G((fxt,m9e)=>{m9e.exports=[{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 Line truncated
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:
$ ${s}
${XU(t)}`}else this.message=`Command not found; did you mean one of:
${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
`)}
${XU(t)}`}},Tx=class extends Error{constructor(t,r){super(),this.input=t,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
`)}
${XU(t)}`}},XU=e=>`While running ${e.filter(t=>t!==ii.EndOfInput&&t!==ii.EndOfPartialInput).map(t=>{let r=JSON.stringify(t);return t.match(/\s/)||t.length===0||r!==`"${t}"`?r:t}).join(" ")}`});function y9e(e){let t=e.split(`
`),r=t.filter(a=>a.match(/\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return t.map(a=>a.slice(s).trimRight()).join(`
`)}function Ko(e,{format:t,paragraphs:r}){return e=e.replace(/\r\n?/g,`
`),e=y9e(e),e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
`),e=e.replace(/\n(\n)?\n*/g,(s,a)=>a||" "),r&&(e=e.split(/\n/).map(s=>{let a=s.match(/^\s*[*-][\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`
`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((c,f)=>" ".repeat(n)+(f===0?"- ":" ")+c).join(`
`)}).join(`
`)),e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(s,a,n)=>t.code(a+n+a)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,a,n)=>t.bold(a+n+a)),e?`${e}
`:""}var ZU,tre,rre,$U=Xe(()=>{ZU=Array(80).fill("\u2501");for(let e=0;e<=24;++e)ZU[ZU.length-e]=`\x1B[38;5;${232+e}m\u2501`;tre={header:e=>`\x1B[1m\u2501\u2501\u2501 ${e}${e.length<75?` ${ZU.slice(e.length+5).join("")}`:":"}\x1B[0m`,bold:e=>`\x1B[1m${e}\x1B[22m`,error:e=>`\x1B[31m\x1B[1m${e}\x1B[22m\x1B[39m`,code:e=>`\x1B[36m${e}\x1B[39m`},rre={header:e=>e,bold:e=>e,error:e=>e,code:e=>e}});function va(e){return{...e,[W2]:!0}}function Wf(e,t){return typeof e>"u"?[e,t]:typeof e=="object"&&e!==null&&!Array.isArray(e)?[void 0,e]:[e,t]}function Nx(e,{mergeName:t=!1}={}){let r=e.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,s,a]=r;return t&&(a=a[0].toLowerCase()+a.slice(1)),a=s!=="."||!t?`${s.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function V2(e,t){return t.length===1?new st(`${e}${Nx(t[0],{mergeName:!0})}`):new st(`${e}:
${t.map(r=>`
- ${Nx(r)}`).join("")}`)}function Lg(e,t,r){if(typeof r>"u")return t;let s=[],a=[],n=f=>{let p=t;return t=f,n.bind(null,p)};if(!r(t,{errors:s,coercions:a,coercion:n}))throw V2(`Invalid value for ${e}`,s);for(let[,f]of a)f();return t}var W2,vp=Xe(()=>{Fx();W2=Symbol("clipanion/isOption")});var qs={};Vt(qs,{KeyRelationship:()=>Vf,TypeAssertionError:()=>a0,applyCascade:()=>J2,as:()=>L9e,assert:()=>F9e,assertWithErrors:()=>N9e,cascade:()=>l0,fn:()=>M9e,hasAtLeastOneKey:()=>o_,hasExactLength:()=>are,hasForbiddenKeys:()=>nqe,hasKeyRelationship:()=>X2,hasMaxLength:()=>_9e,hasMinLength:()=>U9e,hasMutuallyExclusiveKeys:()=>iqe,hasRequiredKeys:()=>rqe,hasUniqueItems:()=>H9e,isArray:()=>Ox,isAtLeast:()=>i_,isAtMost:()=>q9e,isBase64:()=>Z9e,isBoolean:()=>b9e,isDate:()=>P9e,isDict:()=>Q9e,isEnum:()=>Qs,isHexColor:()=>X9e,isISO8601:()=>z9e,isInExclusiveRange:()=>W9e,isInInclusiveRange:()=>Y9e,isInstanceOf:()=>T9e,isInteger:()=>s_,isJSON:()=>$9e,isLiteral:()=>ire,isLowerCase:()=>V9e,isMap:()=>k9e,isNegative:()=>j9e,isNullable:()=>tqe,isNumber:()=>r_,isObject:()=>sre,isOneOf:()=>n_,isOptional:()=>eqe,isPartial:()=>R9e,isPayload:()=>D9e,isPositive:()=>G9e,isRecord:()=>Mx,isSet:()=>x9e,isString:()=>Jf,isTuple:()=>Lx,isUUID4:()=>J9e,isUnknown:()=>t_,isUpperCase:()=>K9e,makeTrait:()=>ore,makeValidator:()=>Wr,matchesRegExp:()=>Sp,softAssert:()=>O9e});function si(e){return e===null?"null":e===void 0?"undefined":e===""?"an empty string":typeof e=="symbol"?`<${e.toString()}>`:Array.isArray(e)?"an array":JSON.stringify(e)}function DE(e,t){if(e.length===0)return"nothing";if(e.length===1)return si(e[0]);let r=e.slice(0,-1),s=e[e.length-1],a=e.length>2?`, ${t} `:` ${t} `;return`${r.map(n=>si(n)).join(", ")}${a}${si(s)}`}function o0(e,t){var r,s,a;return typeof t=="number"?`${(r=e?.p)!==null&&r!==void 0?r:"."}[${t}]`:E9e.test(t)?`${(s=e?.p)!==null&&s!==void 0?s:""}.${t}`:`${(a=e?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(t)}]`}function e_(e,t,r){return e===1?t:r}function yr({errors:e,p:t}={},r){return e?.push(`${t??"."}: ${r}`),!1}function v9e(e,t){return r=>{e[t]=r}}function Kf(e,t){return r=>{let s=e[t];return e[t]=r,Kf(e,t).bind(null,s)}}function K2(e,t,r){let s=()=>(e(r()),a),a=()=>(e(t),s);return s}function t_(){return Wr({test:(e,t)=>!0})}function ire(e){return Wr({test:(t,r)=>t!==e?yr(r,`Expected ${si(e)} (got ${si(t)})`):!0})}function Jf(){return Wr({test:(e,t)=>typeof e!="string"?yr(t,`Expected a string (got ${si(e)})`):!0})}function Qs(e){let t=Array.isArray(e)?e:Object.values(e),r=t.every(a=>typeof a=="string"||typeof a=="number"),s=new Set(t);return s.size===1?ire([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?yr(n,`Expected one of ${DE(t,"or")} (got ${si(a)})`):yr(n,`Expected a valid enumeration value (got ${si(a)})`)})}function b9e(){return Wr({test:(e,t)=>{var r;if(typeof e!="boolean"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return yr(t,"Unbound coercion result");let s=S9e.get(e);if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return yr(t,`Expected a boolean (got ${si(e)})`)}return!0}})}function r_(){return Wr({test:(e,t)=>{var r;if(typeof e!="number"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return yr(t,"Unbound coercion result");let s;if(typeof e=="string"){let a;try{a=JSON.parse(e)}catch{}if(typeof a=="number")if(JSON.stringify(a)===e)s=a;else return yr(t,`Received a number that can't be safely represented by the runtime (${e})`)}if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return yr(t,`Expected a number (got ${si(e)})`)}return!0}})}function D9e(e){return Wr({test:(t,r)=>{var s;if(typeof r?.coercions>"u")return yr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return yr(r,"Unbound coercion result");if(typeof t!="string")return yr(r,`Expected a string (got ${si(t)})`);let a;try{a=JSON.parse(t)}catch{return yr(r,`Expected a JSON string (got ${si(t)})`)}let n={value:a};return e(a,Object.assign(Object.assign({},r),{coercion:Kf(n,"value")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:".",r.coercion.bind(null,n.value)]),!0):!1}})}function P9e(){return Wr({test:(e,t)=>{var r;if(!(e instanceof Date)){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return yr(t,"Unbound coercion result");let s;if(typeof e=="string"&&nre.test(e))s=new Date(e);else{let a;if(typeof e=="string"){let n;try{n=JSON.parse(e)}catch{}typeof n=="number"&&(a=n)}else typeof e=="number"&&(a=e);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return yr(t,`Received a timestamp that can't be safely represented by the runtime (${e})`)}if(typeof s<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,s)]),!0}return yr(t,`Expected a date (got ${si(e)})`)}return!0}})}function Ox(e,{delimiter:t}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r=="string"&&typeof t<"u"&&typeof s?.coercions<"u"){iLine truncated
`;for(let s of t)r+=`
- ${s}`}super(r)}};z2={missing:(e,t)=>e.has(t),undefined:(e,t,r)=>e.has(t)&&typeof r[t]<"u",nil:(e,t,r)=>e.has(t)&&r[t]!=null,falsy:(e,t,r)=>e.has(t)&&!!r[t]};(function(e){e.Forbids="Forbids",e.Requires="Requires"})(Vf||(Vf={}));sqe={[Vf.Forbids]:{expect:!1,message:"forbids using"},[Vf.Requires]:{expect:!0,message:"requires using"}}});var it,c0=Xe(()=>{vp();it=class{constructor(){this.help=!1}static Usage(t){return t}async catch(t){throw t}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Jo(),qs)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw V2("Invalid option schema",p);for(let[,C]of h)C()}else if(r!=null)throw new Error("Invalid command schema");let s=await this.execute();return typeof s<"u"?s:0}};it.isOption=W2;it.Default=[]});function pl(e){zU&&console.log(e)}function cre(){let e={nodes:[]};for(let t=0;t<Cn.CustomNode;++t)e.nodes.push(Vl());return e}function oqe(e){let t=cre(),r=[],s=t.nodes.length;for(let a of e){r.push(s);for(let n=0;n<a.nodes.length;++n)fre(n)||t.nodes.push(hqe(a.nodes[n],s));s+=a.nodes.length-Cn.CustomNode+1}for(let a of r)PE(t,Cn.InitialNode,a);return t}function Nu(e,t){return e.nodes.push(t),e.nodes.length-1}function aqe(e){let t=new Set,r=s=>{if(t.has(s))return;t.add(s);let a=e.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=e.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(Cn.InitialNode)}function lqe(e,{prefix:t=""}={}){if(zU){pl(`${t}Nodes are:`);for(let r=0;r<e.nodes.length;++r)pl(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}}function cqe(e,t,r=!1){pl(`Running a vm on ${JSON.stringify(t)}`);let s=[{node:Cn.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];lqe(e,{prefix:" "});let a=[ii.StartOfInput,...t];for(let n=0;n<a.length;++n){let c=a[n],f=c===ii.EndOfInput||c===ii.EndOfPartialInput,p=n-1;pl(` Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:C}of s){pl(` Current node is ${E}`);let S=e.nodes[E];if(E===Cn.ErrorNode){h.push({node:E,state:C});continue}console.assert(S.shortcuts.length===0,"Shortcuts should have been eliminated by now");let x=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||x)if(x){let I=S.statics[c];for(let{to:T,reducer:O}of I)h.push({node:T,state:typeof O<"u"?Ux(l_,O,C,c,p):C}),pl(` Static transition to ${T} found`)}else pl(" No static transition found");else{let I=!1;for(let T of Object.keys(S.statics))if(T.startsWith(c)){if(c===T)for(let{to:O,reducer:U}of S.statics[T])h.push({node:O,state:typeof U<"u"?Ux(l_,U,C,c,p):C}),pl(` Static transition to ${O} found`);else for(let{to:O}of S.statics[T])h.push({node:O,state:{...C,remainder:T.slice(c.length)}}),pl(` Static transition to ${O} found (partial match)`);I=!0}I||pl(" No partial static transition found")}if(!f)for(let[I,{to:T,reducer:O}]of S.dynamics)Ux(dqe,I,C,c,p)&&(h.push({node:T,state:typeof O<"u"?Ux(l_,O,C,c,p):C}),pl(` Dynamic transition to ${T} found (via ${I})`))}if(h.length===0&&f&&t.length===1)return[{node:Cn.InitialNode,state:lre}];if(h.length===0)throw new bE(t,s.filter(({node:E})=>E!==Cn.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===Cn.ErrorNode))throw new bE(t,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=fqe(h)}if(s.length>0){pl(" Results:");for(let n of s)pl(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else pl(" No results");return s}function uqe(e,t,{endToken:r=ii.EndOfInput}={}){let s=cqe(e,[...t,r]);return Aqe(t,s.map(({state:a})=>a))}function fqe(e){let t=0;for(let{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:r})=>r.path.length===t)}function Aqe(e,t){let r=t.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Og||S.requiredOptions.every(x=>x.some(I=>S.options.find(T=>T.name===I))));if(a.length===0)throw new bE(e,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:x})=>!x).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S Line truncated
`),this.context.stdout.write(`
`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
`)}}}});async function Ere(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cre(e);return ba.from(r,t).runExit(s,a)}async function Ire(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cre(e);return ba.from(r,t).run(s,a)}function Cre(e){let t,r,s,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(s=process.argv.slice(2)),e.length){case 1:r=e[0];break;case 2:e[0]&&e[0].prototype instanceof it||Array.isArray(e[0])?(r=e[0],Array.isArray(e[1])?s=e[1]:a=e[1]):(t=e[0],r=e[1]);break;case 3:Array.isArray(e[2])?(t=e[0],r=e[1],s=e[2]):e[0]&&e[0].prototype instanceof it||Array.isArray(e[0])?(r=e[0],s=e[1],a=e[2]):(t=e[0],r=e[1],a=e[2]);break;default:t=e[0],r=e[1],s=e[2],a=e[3];break}if(typeof s>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function yre(e){return e()}var mre,ba,wre=Xe(()=>{Rx();Hx();$U();dre();c0();gre();mre=Symbol("clipanion/errorCommand");ba=class e{constructor({binaryLabel:t,binaryName:r="...",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new _x({binaryName:r}),this.binaryLabel=t,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(t,r={}){let s=new e(r),a=Array.isArray(t)?t:[t];for(let n of a)s.register(n);return s}register(t){var r;let s=new Map,a=new t;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[it.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=t.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<"u")for(let p of f)n.addPath(p);this.registrations.set(t,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:t})}process(t,r){let{input:s,context:a,partial:n}=typeof t=="object"&&Array.isArray(t)?{input:t,context:r}:t,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...e.defaultContext,...a};switch(p.selectedIndex){case Og:{let E=Gx.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[x,{transformer:I}]of C.specs.entries())S[x]=I(C.builder,x,p,h);return S}catch(x){throw x[mre]=S,x}}break}}async run(t,r){var s,a;let n,c={...e.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(t))n=t;else try{n=this.process(t,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=hre(c))!==null&&a!==void 0?a:yre,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(t,r){process.exitCode=await this.run(t,r)}definition(t,{colored:r=!1}={}){if(!t.usage)return null;let{usage:s}=this.getUsageByRegistration(t,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(t,{detailed:!0,inlineOptions:!1}),c=typeof t.usage.category<"u"?Ko(t.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof t.usage.description<"u"?Ko(t.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof t.usage.details<"u"?Ko(t.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof t.usage.examples<"u"?t.usage.examples.map(([E,C])=>[Ko(E,{format:this.format(r),paragraphs:!1}),C.replace(/\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:t=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:t});a&&r.push(a)}return r}usage(t=null,{colored:r,detailed:s=!1,prefix:a="$ "}={}){var n;if(t===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(x=>x.length===0))!==null&&n!==void 0?n:!1))if(t){t=null;break}else t=p;else if(E){t=null;continue}}t&&(s=!0)}let c=t!==null&&t instanceof it?t.constructor:t,f="";if(c)if(s){let{description:p="",details:h="",examples:E=[]}=c.usage||{};p!==""&&(f+=Ko(p,{format:this.format(r),paragraphs:!1}).replace(/^./,x=>x.toUpperCase()),f+=`
`),(h!==""||E.length>0)&&(f+=`${this.format(r).header("Usage")}
`,f+=`
`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C}
`,S.length>0){f+=`
`,f+=`${this.format(r).header("Options")}
`;let x=S.reduce((I,T)=>Math.max(I,T.definition.length),0);f+=`
`;for(let{definition:I,description:T}of S)f+=` ${this.format(r).bold(I.padEnd(x))} ${Ko(T,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(f+=`
`,f+=`${this.format(r).header("Details")}
`,f+=`
`,f+=Ko(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`
`,f+=`${this.format(r).header("Examples")}
`;for(let[x,I]of E)f+=`
`,f+=Ko(x,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}
`}else{let p=new Map;for(let[S,{index:x}]of this.registrations.entries()){if(typeof S.usage>"u")continue;let I=typeof S.usage.category<"u"?Ko(S.usage.category,{format:this.format(r),paragraphs:!1}):null,T=p.get(I);typeof T>"u"&&p.set(I,T=[]);let{usage:O}=this.getUsageByIndex(x);T.push({commandClass:S,usage:O})}let h=Array.from(p.keys()).sort((S,x)=>S===null?-1:x===null?1:S.localeCompare(x,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",C=typeof this.binaryVersion<"u";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}
`:f+=`${this.format(r).header(`${this.binaryVersion}`)}
`,f+=` ${this.format(r).bold(a)}${this.binaryName} <command>
`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>
`;for(let S of h){let x=p.get(S).slice().sort((T,O)=>T.usage.localeCompare(O.usage,"en",{usage:"sort",caseFirst:"upper"})),I=S!==null?S.trim():"General commands";f+=`
`,f+=`${this.format(r).header(`${I}`)}
`;for(let{commandClass:T,usage:O}of x){let U=T.usage.description||"undocumented";f+=`
`,f+=` ${this.format(r).bold(O)}
`,f+=` ${Ko(U,{format:this.format(r),paragraphs:!1})}`}}f+=`
`,f+=Ko("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return f}error(t,r){var s,{colored:a,command:n=(s=t[mre])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!t||typeof t!="object"||!("stack"in t))&&(t=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(t)})`));let c="",f=t.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}: ${t.message}
`;let p=t.clipanion;return typeof p<"u"?p.type==="usage"&&(c+=`
`,c+=this.usage(n)):t.stack&&(c+=`${t.stack.replace(/^.*\n/,"")}
`),c}format(t){var r;return((r=t??this.enableColors)!==null&&r!==void 0?r:e.defaultContext.colorDepth>1)?tre:rre}getUsageByRegistration(t,r){let s=this.registrations.get(t);if(typeof s>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(t,r){return this.builder.getBuilderByIndex(t).usage(r)}};ba.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:pre()}});var Z2,Bre=Xe(()=>{c0();Z2=class extends it{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
`)}};Z2.paths=[["--clipanion=definitions"]]});var $2,vre=Xe(()=>{c0();$2=class extends it{async execute(){this.context.stdout.write(this.cli.usage())}};$2.paths=[["-h"],["--help"]]});function qx(e={}){return va({definition(t,r){var s;t.addProxy({name:(s=e.name)!==null&&s!==void 0?s:r,required:e.required})},transformer(t,r,s){return s.positionals.map(({value:a})=>a)}})}var u_=Xe(()=>{vp()});var eB,Sre=Xe(()=>{c0();u_();eB=class extends it{constructor(){super(...arguments),this.args=qx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
`)}};eB.paths=[["--clipanion=tokens"]]});var tB,bre=Xe(()=>{c0();tB=class extends it{async execute(){var t;this.context.stdout.write(`${(t=this.cli.binaryVersion)!==null&&t!==void 0?t:"<unknown>"}
`)}};tB.paths=[["-v"],["--version"]]});var f_={};Vt(f_,{DefinitionsCommand:()=>Z2,HelpCommand:()=>$2,TokensCommand:()=>eB,VersionCommand:()=>tB});var Dre=Xe(()=>{Bre();vre();Sre();bre()});function Pre(e,t,r){let[s,a]=Wf(t,r??{}),{arity:n=1}=a,c=e.split(","),f=new Set(c);return va({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<"u"?[...s]:void 0;for(let{name:x,value:I}of E.options)f.has(x)&&(C=x,S=S??[],S.push(I));return typeof S<"u"?Lg(C??h,S,a.validator):S}})}var xre=Xe(()=>{vp()});function kre(e,t,r){let[s,a]=Wf(t,r??{}),n=e.split(","),c=new Set(n);return va({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var Qre=Xe(()=>{vp()});function Rre(e,t,r){let[s,a]=Wf(t,r??{}),n=e.split(","),c=new Set(n);return va({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var Tre=Xe(()=>{vp()});function Fre(e={}){return va({definition(t,r){var s;t.addRest({name:(s=e.name)!==null&&s!==void 0?s:r,required:e.required})},transformer(t,r,s){let a=c=>{let f=s.positionals[c];return f.extra===Kl||f.extra===!1&&c<t.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var Nre=Xe(()=>{Hx();vp()});function gqe(e,t,r){let[s,a]=Wf(t,r??{}),{arity:n=1}=a,c=e.split(","),f=new Set(c);return va({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,x=s;typeof a.env<"u"&&C.env[a.env]&&(S=a.env,x=C.env[a.env]);for(let{name:I,value:T}of E.options)f.has(I)&&(S=I,x=T);return typeof x=="string"?Lg(S??h,x,a.validator):x}})}function mqe(e={}){let{required:t=!0}=e;return va({definition(r,s){var a;r.addPositional({name:(a=e.name)!==null&&a!==void 0?a:s,required:e.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===Kl||t&&a.positionals[c].extra===!0||!t&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Lg((n=e.name)!==null&&n!==void 0?n:s,f.value,e.validator)}}})}function Ore(e,...t){return typeof e=="string"?gqe(e,...t):mqe(e)}var Lre=Xe(()=>{Hx();vp()});var pe={};Vt(pe,{Array:()=>Pre,Boolean:()=>kre,Counter:()=>Rre,Proxy:()=>qx,Rest:()=>Fre,String:()=>Ore,applyValidator:()=>Lg,cleanValidationError:()=>Nx,formatError:()=>V2,isOptionSymbol:()=>W2,makeCommandOption:()=>va,rerouteArguments:()=>Wf});var Mre=Xe(()=>{vp();u_();xre();Qre();Tre();Nre();Lre()});var rB={};Vt(rB,{Builtins:()=>f_,Cli:()=>ba,Command:()=>it,Option:()=>pe,UsageError:()=>st,formatMarkdownish:()=>Ko,run:()=>Ire,runExit:()=>Ere});var jt=Xe(()=>{Fx();$U();c0();wre();Dre();Mre()});var Ure=G((ykt,yqe)=>{yqe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Gre=G((Ekt,bp)=>{var _re=Ie("fs"),p_=Ie("path"),Eqe=Ie("os"),Iqe=Ie("crypto"),Cqe=Ure(),h_=Cqe.version,wqe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Bqe(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
`);let s;for(;(s=wqe.exec(r))!=null;){let a=s[1],n=s[2]||"";n=n.trim();let c=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(n=n.replace(/\\n/g,`
`),n=n.replace(/\\r/g,"\r")),t[a]=n}return t}function vqe(e){let t=jre(e),r=Ws.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let s=Hre(e).split(","),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=Dqe(r,f);n=Ws.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return Ws.parse(n)}function Sqe(e){console.log(`[dotenv@${h_}][INFO] ${e}`)}function bqe(e){console.log(`[dotenv@${h_}][WARN] ${e}`)}function A_(e){console.log(`[dotenv@${h_}][DEBUG] ${e}`)}function Hre(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Dqe(e,t){let r;try{r=new URL(t)}catch(f){throw f.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):f}let s=r.password;if(!s)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=e.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function jre(e){let t=p_.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function Pqe(e){return e[0]==="~"?p_.join(Eqe.homedir(),e.slice(1)):e}function xqe(e){Sqe("Loading env from encrypted .env.vault");let t=Ws._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Ws.populate(r,t,e),{parsed:t}}function kqe(e){let t=p_.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug);e&&(e.path!=null&&(t=Pqe(e.path)),e.encoding!=null&&(r=e.encoding));try{let a=Ws.parse(_re.readFileSync(t,{encoding:r})),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),Ws.populate(n,a,e),{parsed:a}}catch(a){return s&&A_(`Failed to load ${t} ${a.message}`),{error:a}}}function Qqe(e){let t=jre(e);return Hre(e).length===0?Ws.configDotenv(e):_re.existsSync(t)?Ws._configVault(e):(bqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Ws.configDotenv(e))}function Rqe(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=Iqe.createDecipheriv("aes-256-gcm",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message==="Invalid key length",h=c.message==="Unsupported state or unable to authenticate data";if(f||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function Tqe(e,t,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(a===!0&&(e[n]=t[n]),s&&A_(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}var Ws={configDotenv:kqe,_configVault:xqe,_parseVault:vqe,config:Qqe,decrypt:Rqe,parse:Bqe,populate:Tqe};bp.exports.configDotenv=Ws.configDotenv;bp.exports._configVault=Ws._configVault;bp.exports._parseVault=Ws._parseVault;bp.exports.config=Ws.config;bp.exports.decrypt=Ws.decrypt;bp.exports.parse=Ws.parse;bp.exports.populate=Ws.populate;bp.exports=Ws});var Yre=G((Ikt,qre)=>{"use strict";qre.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Mg=G((Ckt,d_)=>{"use strict";var Fqe=Yre(),Wre=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,s=()=>{r--,t.length>0&&t.shift()()},a=(f,p,...h)=>{r++;let E=Fqe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<e?a(f,p,...h):t.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),c};d_.exports=Wre;d_.exports.default=Wre});function zf(e){return`YN${e.toString(10).padStart(4,"0")}`}function Yx(e){let t=Number(e.slice(2));if(typeof pr[t]>"u")throw new Error(`Unknown message name: "${e}"`);return t}var pr,Wx=Xe(()=>{pr=(Ue=>(Ue[Ue.UNNAMED=0]="UNNAMED",Ue[Ue.EXCEPTION=1]="EXCEPTION",Ue[Ue.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Ue[Ue.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Ue[Ue.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Ue[Ue.BUILD_DISABLED=5]="BUILD_DISABLED",Ue[Ue.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Ue[Ue.MUST_BUILD=7]="MUST_BUILD",Ue[Ue.MUST_REBUILD=8]="MUST_REBUILD",Ue[Ue.BUILD_FAILED=9]="BUILD_FAILED",Ue[Ue.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Ue[Ue.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Ue[Ue.LINKER_NOT_FOUND=12]="LINKER_NOT_FO Line truncated
`,"\r","(",")","!","|","&","^"],!0,!1),ae=function(ee){return t.queryPattern.test(ee)},ge=function(ee){return t.checkFn(ee)},he=Re("whitespace"),Ce=/^[ \t\n\r]/,Ee=ke([" "," ",`
`,"\r"],!1,!1),d=0,Se=0,Be=[{line:1,column:1}],me=0,ue=[],Z=0,be;if("startRule"in t){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=s[t.startRule]}function Qe(){return e.substring(Se,d)}function ot(){return Me(Se,d)}function _(ee,se){throw se=se!==void 0?se:Me(Se,d),D([Re(ee)],e.substring(Se,d),se)}function tt(ee,se){throw se=se!==void 0?se:Me(Se,d),w(ee,se)}function Ne(ee,se){return{type:"literal",text:ee,ignoreCase:se}}function ke(ee,se,xe){return{type:"class",parts:ee,inverted:se,ignoreCase:xe}}function De(){return{type:"any"}}function je(){return{type:"end"}}function Re(ee){return{type:"other",description:ee}}function ct(ee){var se=Be[ee],xe;if(se)return se;for(xe=ee-1;!Be[xe];)xe--;for(se=Be[xe],se={line:se.line,column:se.column};xe<ee;)e.charCodeAt(xe)===10?(se.line++,se.column=1):se.column++,xe++;return Be[ee]=se,se}function Me(ee,se){var xe=ct(ee),Fe=ct(se);return{start:{offset:ee,line:xe.line,column:xe.column},end:{offset:se,line:Fe.line,column:Fe.column}}}function P(ee){d<me||(d>me&&(me=d,ue=[]),ue.push(ee))}function w(ee,se){return new Gg(ee,null,null,se)}function D(ee,se,xe){return new Gg(Gg.buildMessage(ee,se),ee,se,xe)}function y(){var ee,se,xe,Fe,ut,Ct,Yt,ir;if(ee=d,se=F(),se!==r){for(xe=[],Fe=d,ut=X(),ut!==r?(e.charCodeAt(d)===124?(Ct=n,d++):(Ct=r,Z===0&&P(c)),Ct===r&&(e.charCodeAt(d)===38?(Ct=f,d++):(Ct=r,Z===0&&P(p)),Ct===r&&(e.charCodeAt(d)===94?(Ct=h,d++):(Ct=r,Z===0&&P(E)))),Ct!==r?(Yt=X(),Yt!==r?(ir=F(),ir!==r?(ut=[ut,Ct,Yt,ir],Fe=ut):(d=Fe,Fe=r)):(d=Fe,Fe=r)):(d=Fe,Fe=r)):(d=Fe,Fe=r);Fe!==r;)xe.push(Fe),Fe=d,ut=X(),ut!==r?(e.charCodeAt(d)===124?(Ct=n,d++):(Ct=r,Z===0&&P(c)),Ct===r&&(e.charCodeAt(d)===38?(Ct=f,d++):(Ct=r,Z===0&&P(p)),Ct===r&&(e.charCodeAt(d)===94?(Ct=h,d++):(Ct=r,Z===0&&P(E)))),Ct!==r?(Yt=X(),Yt!==r?(ir=F(),ir!==r?(ut=[ut,Ct,Yt,ir],Fe=ut):(d=Fe,Fe=r)):(d=Fe,Fe=r)):(d=Fe,Fe=r)):(d=Fe,Fe=r);xe!==r?(Se=ee,se=C(se,xe),ee=se):(d=ee,ee=r)}else d=ee,ee=r;return ee}function F(){var ee,se,xe,Fe,ut,Ct;return ee=d,e.charCodeAt(d)===33?(se=S,d++):(se=r,Z===0&&P(x)),se!==r?(xe=F(),xe!==r?(Se=ee,se=I(xe),ee=se):(d=ee,ee=r)):(d=ee,ee=r),ee===r&&(ee=d,e.charCodeAt(d)===40?(se=T,d++):(se=r,Z===0&&P(O)),se!==r?(xe=X(),xe!==r?(Fe=y(),Fe!==r?(ut=X(),ut!==r?(e.charCodeAt(d)===41?(Ct=U,d++):(Ct=r,Z===0&&P(V)),Ct!==r?(Se=ee,se=$(Fe),ee=se):(d=ee,ee=r)):(d=ee,ee=r)):(d=ee,ee=r)):(d=ee,ee=r)):(d=ee,ee=r),ee===r&&(ee=z())),ee}function z(){var ee,se,xe,Fe,ut;if(ee=d,se=X(),se!==r){if(xe=d,Fe=[],ie.test(e.charAt(d))?(ut=e.charAt(d),d++):(ut=r,Z===0&&P(fe)),ut!==r)for(;ut!==r;)Fe.push(ut),ie.test(e.charAt(d))?(ut=e.charAt(d),d++):(ut=r,Z===0&&P(fe));else Fe=r;Fe!==r?xe=e.substring(xe,d):xe=Fe,xe!==r?(Se=d,Fe=ae(xe),Fe?Fe=void 0:Fe=r,Fe!==r?(Se=ee,se=ge(xe),ee=se):(d=ee,ee=r)):(d=ee,ee=r)}else d=ee,ee=r;return ee}function X(){var ee,se;for(Z++,ee=[],Ce.test(e.charAt(d))?(se=e.charAt(d),d++):(se=r,Z===0&&P(Ee));se!==r;)ee.push(se),Ce.test(e.charAt(d))?(se=e.charAt(d),d++):(se=r,Z===0&&P(Ee));return Z--,ee===r&&(se=r,Z===0&&P(he)),ee}if(be=a(),be!==r&&d===e.length)return be;throw be!==r&&d<e.length&&P(je()),D(ue,me<e.length?e.charAt(me):null,me<e.length?Me(me,me+1):Me(me,me))}qie.exports={SyntaxError:Gg,parse:TVe}});var Wie=G(ik=>{var{parse:FVe}=Yie();ik.makeParser=(e=/[a-z]+/)=>(t,r)=>FVe(t,{queryPattern:e,checkFn:r});ik.parse=ik.makeParser()});var Kie=G((mQt,Vie)=>{"use strict";Vie.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyLine truncated
`:`
`)+r,a=s+1,s=e.indexOf(`
`,a)}while(s!==-1);return n+=e.substr(a),n};fse.exports={stringReplaceAll:VVe,stringEncaseCRLFWithFirstIndex:KVe}});var mse=G((SQt,gse)=>{"use strict";var JVe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,pse=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,zVe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,XVe=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ZVe=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function dse(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):ZVe.get(e)||e}function $Ve(e,t){let r=[],s=t.trim().split(/\s*,\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(zVe))r.push(a[2].replace(XVe,(f,p,h)=>p?dse(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function e7e(e){pse.lastIndex=0;let t=[],r;for(;(r=pse.exec(e))!==null;){let s=r[1];if(r[2]){let a=$Ve(s,r[2]);t.push([s].concat(a))}else t.push([s])}return t}function hse(e,t){let r={};for(let a of t)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=e;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}gse.exports=(e,t)=>{let r=[],s=[],a=[];if(t.replace(JVe,(n,c,f,p,h,E)=>{if(c)a.push(dse(c));else if(p){let C=a.join("");a=[],s.push(r.length===0?C:hse(e,r)(C)),r.push({inverse:f,styles:e7e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(hse(e,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),s.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var LE=G((bQt,Bse)=>{"use strict";var pB=ak(),{stdout:G_,stderr:q_}=use(),{stringReplaceAll:t7e,stringEncaseCRLFWithFirstIndex:r7e}=Ase(),{isArray:lk}=Array,Ese=["ansi","ansi","ansi256","ansi16m"],OE=Object.create(null),n7e=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=G_?G_.level:0;e.level=t.level===void 0?r:t.level},Y_=class{constructor(t){return Ise(t)}},Ise=e=>{let t={};return n7e(t,e),t.template=(...r)=>wse(t.template,...r),Object.setPrototypeOf(t,ck.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Y_,t.template};function ck(e){return Ise(e)}for(let[e,t]of Object.entries(pB))OE[e]={get(){let r=uk(this,W_(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};OE.visible={get(){let e=uk(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Cse=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of Cse)OE[e]={get(){let{level:t}=this;return function(...r){let s=W_(pB.color[Ese[t]][e](...r),pB.color.close,this._styler);return uk(this,s,this._isEmpty)}}};for(let e of Cse){let t="bg"+e[0].toUpperCase()+e.slice(1);OE[t]={get(){let{level:r}=this;return function(...s){let a=W_(pB.bgColor[Ese[r]][e](...s),pB.bgColor.close,this._styler);return uk(this,a,this._isEmpty)}}}}var i7e=Object.defineProperties(()=>{},{...OE,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),W_=(e,t,r)=>{let s,a;return r===void 0?(s=e,a=t):(s=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:s,closeAll:a,parent:r}},uk=(e,t,r)=>{let s=(...a)=>lk(a[0])&&lk(a[0].raw)?yse(s,wse(s,...a)):yse(s,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(s,i7e),s._generator=e,s._styler=t,s._isEmpty=r,s},yse=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:s,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=t7e(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
`);return n!==-1&&(t=r7e(t,a,s,n)),s+t+a},j_,wse=(e,...t)=>{let[r]=t;if(!lk(r)||!lk(r.raw))return t.join(" ");let s=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return j_===void 0&&(j_=mse()),j_(e,a.join(""))};Object.defineProperties(ck.prototype,OE);var fk=ck();fk.supportsColor=G_;fk.stderr=ck({level:q_?q_.level:0});fk.stderr.supportsColor=q_;Bse.exports=fk});var Ak=G(xc=>{"use strict";xc.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;xc.find=(e,t)=>e.nodes.find(r=>r.type===t);xc.exceedsLimit=(e,t,r=1,s)=>s===!1||!xc.isInteger(e)||!xc.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=s;xc.escapeNode=(e,t=0,r)=>{let s=e.nodes[t];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};xc.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);xc.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;xc.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;xc.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);xc.flatten=(...e)=>{let t=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,t):n!==void 0&&t.push(n)}return t};return r(e),t}});var pk=G((PQt,Sse)=>{"use strict";var vse=Ak();Sse.exports=(e,t={})=>{let r=(s,a={})=>{let n=t.escapeInvalid&&vse.isInvalidBrace(a),c=s.invalid===!0&&t.escapeInvalid===!0,f="";if(s.value)return(n||c)&&vse.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(e)}});var Dse=G((xQt,bse)=>{"use strict";bse.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var Ose=G((kQt,Nse)=>{"use strict";var Pse=Dse(),qg=(e,t,r)=>{if(Pse(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Pse(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=e+":"+t+"="+a+n+c+f;if(qg.cache.hasOwnProperty(p))return qg.cache[p].result;let h=Math.min(e,t),E=Math.max(e,t);if(Math.abs(h-E)===1){let T=e+"|"+t;return s.capture?`(${T})`:s.wrap===!1?T:`(?:${T})`}let C=Fse(e)||Fse(t),S={min:e,max:t,a:h,b:E},x=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let T=E<0?Math.abs(E):1;I=xse(T,Math.abs(h),S,s),h=S.a=0}return E>=0&&(x=xse(h,E,S,s)),S.negatives=I,S.positives=x,S.result=s7e(I,x,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&x.length+I.length>1&&(S.result=`(?:${S.result})`),qg.cache[p]=S,S.result};function s7e(e,t,r){let s=V_(e,t,"-",!1,r)||[],a=V_(t,e,"",!1,r)||[],n=V_(e,t,"-?",!0,r)||[];return s.concat(n).concat(a).join("|")}function o7e(e,t){let r=1,s=1,a=Qse(e,r),n=new Set([t]);for(;e<=a&&a<=t;)n.add(a),r+=1,a=Qse(e,r);for(a=Rse(t+1,s)-1;e<a&&a<=t;)n.add(a),s+=1,a=Rse(t+1,s)-1;return n=[...n],n.sort(c7e),n}function a7e(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let s=l7e(e,t),a=s.length,n="",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!=="0"||h!=="9"?n+=u7e(p,h,r):c++}return c&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[c],digits:a}}function xse(e,t,r,s){let a=o7e(e,t),n=[],c=e,f;for(let p=0;p<a.length;p++){let h=a[p],E=a7e(String(c),String(h),s),C="";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+Tse(f.count),c=h+1;continue}r.isPadded&&(C=f7e(h,r,s)),E.string=C+E.pattern+Tse(E.count),n.push(E),c=h+1,f=E}return n}function V_(e,t,r,s,a){let n=[];for(let c of e){let{string:f}=c;!s&&!kse(t,"string",f)&&n.push(r+f),s&&kse(t,"string",f)&&n.push(r+f)}return n}function l7e(e,t){let r=[];for(let s=0;s<e.length;s++)r.push([e[s],t[s]]);return r}function c7e(e,t){return e>t?1:t>e?-1:0}function kse(e,t,r){return e.some(s=>s[t]===r)}function Qse(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Rse(e,t){return e-e%Math.pow(10,t)}function Tse(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function u7e(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function Fse(e){return/^-?(0+)\d/.test(e)}function f7e(e,t,r){if(!t.isPadded)return e;let s=Math.abs(t.maxLen-String(e).length),a=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${s}}`:`0{${s}}`}}qg.cache={};qg.clearCache=()=>qg.cache={};Nse.exports=qg});var z_=G((QQt,qse)=>{"use strict";var A7e=Ie("util"),Use=Ose(),Lse=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),p7e=e=>t=>e===!0?Number(t):String(t),K_=e=>typeof e=="numb Line truncated
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var noe=G((NQt,roe)=>{"use strict";var v7e=pk(),{MAX_LENGTH:$se,CHAR_BACKSLASH:X_,CHAR_BACKTICK:S7e,CHAR_COMMA:b7e,CHAR_DOT:D7e,CHAR_LEFT_PARENTHESES:P7e,CHAR_RIGHT_PARENTHESES:x7e,CHAR_LEFT_CURLY_BRACE:k7e,CHAR_RIGHT_CURLY_BRACE:Q7e,CHAR_LEFT_SQUARE_BRACKET:eoe,CHAR_RIGHT_SQUARE_BRACKET:toe,CHAR_DOUBLE_QUOTE:R7e,CHAR_SINGLE_QUOTE:T7e,CHAR_NO_BREAK_SPACE:F7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:N7e}=Zse(),O7e=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},s=typeof r.maxLength=="number"?Math.min($se,r.maxLength):$se;if(e.length>s)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${s})`);let a={type:"root",input:e,nodes:[]},n=[a],c=a,f=a,p=0,h=e.length,E=0,C=0,S,x={},I=()=>e[E++],T=O=>{if(O.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&O.type==="text"){f.value+=O.value;return}return c.nodes.push(O),O.parent=c,O.prev=f,f=O,O};for(T({type:"bos"});E<h;)if(c=n[n.length-1],S=I(),!(S===N7e||S===F7e)){if(S===X_){T({type:"text",value:(t.keepEscaping?S:"")+I()});continue}if(S===toe){T({type:"text",value:"\\"+S});continue}if(S===eoe){p++;let O=!0,U;for(;E<h&&(U=I());){if(S+=U,U===eoe){p++;continue}if(U===X_){S+=I();continue}if(U===toe&&(p--,p===0))break}T({type:"text",value:S});continue}if(S===P7e){c=T({type:"paren",nodes:[]}),n.push(c),T({type:"text",value:S});continue}if(S===x7e){if(c.type!=="paren"){T({type:"text",value:S});continue}c=n.pop(),T({type:"text",value:S}),c=n[n.length-1];continue}if(S===R7e||S===T7e||S===S7e){let O=S,U;for(t.keepQuotes!==!0&&(S="");E<h&&(U=I());){if(U===X_){S+=U+I();continue}if(U===O){t.keepQuotes===!0&&(S+=U);break}S+=U}T({type:"text",value:S});continue}if(S===k7e){C++;let U={type:"brace",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)==="$"||c.dollar===!0,depth:C,commas:0,ranges:0,nodes:[]};c=T(U),n.push(c),T({type:"open",value:S});continue}if(S===Q7e){if(c.type!=="brace"){T({type:"text",value:S});continue}let O="close";c=n.pop(),c.close=!0,T({type:O,value:S}),C--,c=n[n.length-1];continue}if(S===b7e&&C>0){if(c.ranges>0){c.ranges=0;let O=c.nodes.shift();c.nodes=[O,{type:"text",value:v7e(c)}]}T({type:"comma",value:S}),c.commas++;continue}if(S===D7e&&C>0&&c.commas===0){let O=c.nodes;if(C===0||O.length===0){T({type:"text",value:S});continue}if(f.type==="dot"){if(c.range=[],f.value+=S,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){O.pop();let U=O[O.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}T({type:"dot",value:S});continue}T({type:"text",value:S})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(V=>{V.nodes||(V.type==="open"&&(V.isOpen=!0),V.type==="close"&&(V.isClose=!0),V.nodes||(V.type="text"),V.invalid=!0)});let O=n[n.length-1],U=O.nodes.indexOf(c);O.nodes.splice(U,1,...c.nodes)}while(n.length>0);return T({type:"eos"}),a};roe.exports=O7e});var ooe=G((OQt,soe)=>{"use strict";var ioe=pk(),L7e=Vse(),M7e=zse(),U7e=noe(),Jl=(e,t={})=>{let r=[];if(Array.isArray(e))for(let s of e){let a=Jl.create(s,t);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(Jl.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Jl.parse=(e,t={})=>U7e(e,t);Jl.stringify=(e,t={})=>ioe(typeof e=="string"?Jl.parse(e,t):e,t);Jl.compile=(e,t={})=>(typeof e=="string"&&(e=Jl.parse(e,t)),L7e(e,t));Jl.expand=(e,t={})=>{typeof e=="string"&&(e=Jl.parse(e,t));let r=M7e(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Jl.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Jl.compile(e,t):Jl.expand(e,t);soe.exports=Jl});var dB=G((LQt,foe)=>{"use strict";var _7e=Ie("path"),Xf="\\\\/",aoe=`[^${Xf}]`,kp="\\.",H7e="\\+",j7e="\\?",dk="\\/",G7e="(?=.)",loe="[^/]",Z_=`(?:${dk}|$)`,coe=`(?:^|${dk})`,$_=`${kp}{1,2}${Z_}`,q7e=`(?!${kp})`,Y7e=`(?!${coe}${$_})`,W7e=`(?!${kp}{0,1}${Z_})`,V7e=`(?!${$_})`,K7e=`[^.${dk}]`,J7e=`${loe}*?`,uoe={DOT_LITERAL:kp,PLUS_LITERAL:H7e,QMARK_LITERAL:j7e,SLASH_LITERAL:dk,ONE_CHAR:G7e,QMARK:loe,END_ANCHOR:Z_,DOTS_SLASH:$_,NO_DOT:q7e,NO_DOTS:Y7e,NO_DOT_SLASH:W7e,NO_DOTS_SLASH:V7e,QMARK_NO_DOT:K7e,STAR:J7e,START_ANCHOR:coe},z7e={...uoe,SLASH_LITERAL:`[${Xf}]`,QMARK:aoe,STAR:`${aoe}*?`,DOTS_SLASH:`${kp}{1,2}(?:[${Xf}]|$)`,NO_DOT:`(?!${kp})`,NO_DOTS:`(?!(?:^|[${Xf}])${kp}{1,2}(?:[${Xf}]|$))`,NO_DOT_SLASH:`(?!${kp}{0,1}(?:[${Xf}]|$))`,NO_DOTS_SLASH:`(?!${kp}{1,2}(?:[${Xf}]|$))`,QMARK_NO_DOT:`[^.${Xf}]`,START_ANCHOR:`(?:^|[${Xf}])`,END_ANCHOR:`(?:[${Xf}]|$)`},X7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&' Line truncated
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",t!==null?this.reportInfo(null,`${t} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&(t!==null?this.reportInfo(null,`${t} ${n}`):this.reportInfo(null,n))}),r}}});var AI,B8=Xe(()=>{Nc();$o();AI=class{constructor(t){this.fetchers=t}supports(t,r){return!!this.tryFetcher(t,r)}getLocalPath(t,r){return this.getFetcher(t,r).getLocalPath(t,r)}async fetch(t,r){return await this.getFetcher(t,r).fetch(t,r)}tryFetcher(t,r){let s=this.fetchers.find(a=>a.supports(t,r));return s||null}getFetcher(t,r){let s=this.fetchers.find(a=>a.supports(t,r));if(!s)throw new Lt(11,`${Vr(r.project.configuration,t)} isn't supported by any available fetcher`);return s}}});var nm,v8=Xe(()=>{$o();nm=class{constructor(t){this.resolvers=t.filter(r=>r)}supportsDescriptor(t,r){return!!this.tryResolverByDescriptor(t,r)}supportsLocator(t,r){return!!this.tryResolverByLocator(t,r)}shouldPersistResolution(t,r){return this.getResolverByLocator(t,r).shouldPersistResolution(t,r)}bindDescriptor(t,r,s){return this.getResolverByDescriptor(t,s).bindDescriptor(t,r,s)}getResolutionDependencies(t,r){return this.getResolverByDescriptor(t,r).getResolutionDependencies(t,r)}async getCandidates(t,r,s){return await this.getResolverByDescriptor(t,s).getCandidates(t,r,s)}async getSatisfying(t,r,s,a){return this.getResolverByDescriptor(t,a).getSatisfying(t,r,s,a)}async resolve(t,r){return await this.getResolverByLocator(t,r).resolve(t,r)}tryResolverByDescriptor(t,r){let s=this.resolvers.find(a=>a.supportsDescriptor(t,r));return s||null}getResolverByDescriptor(t,r){let s=this.resolvers.find(a=>a.supportsDescriptor(t,r));if(!s)throw new Error(`${ai(r.project.configuration,t)} isn't supported by any available resolver`);return s}tryResolverByLocator(t,r){let s=this.resolvers.find(a=>a.supportsLocator(t,r));return s||null}getResolverByLocator(t,r){let s=this.resolvers.find(a=>a.supportsLocator(t,r));if(!s)throw new Error(`${Vr(r.project.configuration,t)} isn't supported by any available resolver`);return s}}});var pI,S8=Xe(()=>{bt();$o();pI=class{supports(t){return!!t.reference.startsWith("virtual:")}getLocalPath(t,r){let s=t.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(s+1),n=Js(t,a);return r.fetcher.getLocalPath(n,r)}async fetch(t,r){let s=t.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(s+1),n=Js(t,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(t,c,r)}getLocatorFilename(t){return lI(t)}async ensureVirtualLink(t,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(t),f=Eo.makeVirtualPath(n,c,a),p=new Gf(f,{baseFs:r.packageFs,pathUtils:K});return{...r,packageFs:p}}}});var OQ,_ce=Xe(()=>{OQ=class e{static{this.protocol="virtual:"}static isVirtualDescriptor(t){return!!t.range.startsWith(e.protocol)}static isVirtualLocator(t){return!!t.reference.startsWith(e.protocol)}supportsDescriptor(t,r){return e.isVirtualDescriptor(t)}supportsLocator(t,r){return e.isVirtualLocator(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(t,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(t,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(t,r,s,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(t,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var hI,b8=Xe(()=>{bt();rm();hI=class{supports(t){return!!t.reference.startsWith(Ii.protocol)}getLocalPath(t,r){return this.getWorkspace(t,r).cwd}async fetch(t,r){let s=this.getWorkspace(t,r).cwd;return{packageFs:new Pn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(t,r){return r.project.getWorkspaceByCwd(t.reference.slice(Ii.protocol.length))}}});function HB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Hce(e){return typeof e>"u"?3:HB(e)?0:Array.isArray(e)?1:2}function x8(e,t){return Object.hasOwn(e,t)}function oZe(e){return HB(e)&&x8(e,"onConflict")&&typeof e.onConflict=="string"}function aZe(e){if(typeof e>"u")return{onConflict:"default",value:e};if(!oZe(e))return{onConflict:"default",value:e};if(x8(e,"value"))return e;let{onConflict:t,...r}=e;return{onConflict:t,value:r}}function jce(e,t){let r=HB(e)&&x8(e,t)?e[t]:void 0;return aZe(r)}function dI(e,t){return[e,t,Gce]}function k8(e){return Array.isArray(e)?e[2]===Gce:!1}function D8(e,t){if(HB(e)){let r={};for(let s of Object.keys(e))r[s]=D8(e[s],t);return dI(t,r)}return Array.isArray(e)?dI(t,e.map(r=>D8(r,t))):dI(t,e)}function P8(e,t,r,s,a){let n,c=[],f=a,p=0;for(let E=a-Line truncated
Please report this to https://github.com/szmarczak/http2-wrapper/`);I(T)}return}s[0].resolve(x);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=v$e.connect(t,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[Ta]=0,S[II]=!1;let x=()=>S[Ta]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once("session",O=>{this.tlsSessionCache.set(E,O)}),S.once("error",O=>{for(let{reject:U}of s)U(O);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once("close",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let O=this.sessions[c];O.splice(O.indexOf(S),1),O.length===0&&delete this.sessions[c]}else{let O=new Error("Session closed without receiving a SETTINGS frame");O.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of s)U(O);p()}this._tryToCreateNewSession(c,f)});let T=()=>{if(!(!(c in this.queue)||!x())){for(let O of S[Oc])if(O in this.queue[c]){let{listeners:U}=this.queue[c][O];for(;U.length!==0&&x();)U.shift().resolve(S);let V=this.queue[c];if(V[O].listeners.length===0&&(delete V[O],Object.keys(V).length===0)){delete this.queue[c];break}if(!x())break}}};S.on("origin",()=>{S[Oc]=S.originSet,x()&&(T(),uH(this.sessions[c],S))}),S.once("remoteSettings",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let O=new Error("Agent has been destroyed");for(let U of s)U.reject(O);S.destroy();return}S[Oc]=S.originSet;{let O=this.sessions;if(c in O){let U=O[c];U.splice(D$e(U,S,P$e),0,S)}else O[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit("session",S),T(),p(),S[Ta]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on("remoteSettings",()=>{T(),uH(this.sessions[c],S)})}),S[zue]=S.request,S.request=(O,U)=>{if(S[II])throw new Error("The session is gracefully closing. No new streams are allowed.");let V=S[zue](O,U);return S.ref(),++S[Ta],S[Ta]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,V.once("close",()=>{if(I=x(),--S[Ta],!S.destroyed&&!S.closed&&(x$e(this.sessions[c],S),x()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let $=S[Ta]===0;$&&S.unref(),$&&(this._freeSessionsCount>this.maxFreeSessions||S[II])?S.close():(uH(this.sessions[c],S),T())}}),V}}catch(S){for(let x of s)x.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(t,r,s,a){return new Promise((n,c)=>{this.getSession(t,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(t,r){return e.connect(t,r)}static connect(t,r){r.ALPNProtocols=["h2"];let s=t.port||443,a=t.hostname||t.host;return typeof r.servername>"u"&&(r.servername=a),B$e.connect(s,a,r)}closeFreeSessions(){for(let t of Object.values(this.sessions))for(let r of t)r[Ta]===0&&r.close()}destroy(t){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(t);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return Xue({agent:this,isFree:!0})}get busySessions(){return Xue({agent:this,isFree:!1})}};sm.kCurrentStreamsCount=Ta;sm.kGracefullyClosing=II;$ue.exports={Agent:sm,globalAgent:new sm}});var pH=G((mOt,efe)=>{"use strict";var{Readable:k$e}=Ie("stream"),AH=class extends k$e{constructor(t,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=t,this.connection=t,this._dumped=!1}_destroy(t){this.req._request.destroy(t)}setTimeout(t,r){return this.req.setTimeout(t,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};efe.exports=AH});var hH=G((yOt,tfe)=>{"use strict";tfe.exports=e=>{let t={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return typeof e.port=="string"&&e.port.length!==0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}});var nfe=G((EOt,rfe)=>{"use strict";rfe.exports=(e,t,r)=>{for(let s of r)e.on(s,(...a)=>t.emit(s,...a))}});var sfe=G((IOt,ife)=>{"use strict";ife.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var afe=G((wOt,ofe)=>{"use strict";var CI=(e,t,r)=>{ofe.exports[t]=class extends e{constructor(...a){super(typeof r=="string"?r:r(a Line truncated
`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`
`)}${f.reverse().join(`
`)}`}}};_n.RequestError=ps;var nR=class extends ps{constructor(t){super(`Redirected ${t.options.maxRedirects} times. Aborting.`,{},t),this.name="MaxRedirectsError"}};_n.MaxRedirectsError=nR;var iR=class extends ps{constructor(t){super(`Response code ${t.statusCode} (${t.statusMessage})`,{},t.request),this.name="HTTPError"}};_n.HTTPError=iR;var sR=class extends ps{constructor(t,r){super(t.message,t,r),this.name="CacheError"}};_n.CacheError=sR;var oR=class extends ps{constructor(t,r){super(t.message,t,r),this.name="UploadError"}};_n.UploadError=oR;var aR=class extends ps{constructor(t,r,s){super(t.message,t,s),this.name="TimeoutError",this.event=t.event,this.timings=r}};_n.TimeoutError=aR;var XB=class extends ps{constructor(t,r){super(t.message,t,r),this.name="ReadError"}};_n.ReadError=XB;var lR=class extends ps{constructor(t){super(`Unsupported protocol "${t.url.protocol}"`,{},t),this.name="UnsupportedProtocolError"}};_n.UnsupportedProtocolError=lR;var Uet=["socket","connect","continue","information","upgrade","timeout"],cR=class extends Gfe.Duplex{constructor(t,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[BI]=0,this[SI]=0,this.requestInitialized=!1,this[eR]=new Set,this.redirects=[],this[bI]=!1,this[tR]=!1,this[zB]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof MH.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),_n.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(t,r,s)}catch(h){lt.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof met.ReadStream&&await Oet(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Co])===null||h===void 0||h.destroy();return}for(let C of this[zB])C();this[zB].length=0,this.requestInitialized=!0}catch(E){if(E instanceof ps){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(t,r,s){var a,n,c,f,p;let h=r;if(lt.default.object(t)&&!lt.default.urlInstance(t))r={...s,...t,...r};else{if(t&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...s,...r},t!==void 0&&(r.url=t),lt.default.urlInstance(r.url)&&(r.url=new v0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),lt.assert.any([lt.default.string,lt.default.undefined],r.method),lt.assert.any([lt.default.object,lt.default.undefined],r.headers),lt.assert.any([lt.default.string,lt.default.urlInstance,lt.default.undefined],r.prefixUrl),lt.assert.any([lt.default.object,lt.default.undefined],r.cookieJar),lt.assert.any([lt.default.object,lt.default.string,lt.default.undefined],r.searchParams),lt.assert.any([lt.default.object,lt.default.string,lt.default.undefined],r.cache),lt.assert.any([lt.default.object,lt.default.number,lt.default.undefined],r.timeout),lt.assert.any([lt.default.object,lt.default.undefined],r.context),lt.assert.any([lt.default.object,lt.default.undefined],r.hooks),lt.assert.any([lt.default.boolean,lt.default.undefined],r.decompress),lt.assert.any([lt.default.boolean,lt.default.undefined],r.ignoreInvalidCookies),lt.assert.any([lt.default.boolean,lt.default.undefined],r.followRedirect),lt.assert.any([lt.default.number,lt.default.undefined],r.maxRedirects),lt.assert.any([lt.default.boolean,lt.default.undefined],r.throwHttpErrors),lt.assert.any([lt.default.boolean,lt.default.undefined],r.http2),lt.assert.any([lt.default.boolean,lt.default.undefined],r.allowGetBody),lt.assert.any([lt.default.string,lt.default.undefined],r.localAddress),lt.assert.any([Jfe.isDnsLookupIpVersion,lt.default.undefined],r.dnsLookupIpVersion),lt.assert.any([lt.default.object,lt.default.undefined],r.https),lt.assert.any([lt.default.boolean,lt.default.undefined],r.rejectUnauthorized),r.https&&(lt.assert.any([lt.default.boolean,lt.default.undefined],r.https.rejectUnauthorized),lt.assert.any([lt.default.function_,lt.default.undefined],r.https.checkServerIdentity),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.certificateAuthority),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.key),lt.assert.any([lt.default.string,lt.default.object,lt.default.array,lt.default.undefined],r.https.certificate),lt.assert.any([lt.default.string,lt.default.undefined],r.https.passphrase),lt.assert.any([lt.default.string,lt.default.buffer,lt.default.array,lt.default.undefined],r.httpLine truncated
`)[3];return vtt(t)}function tj(){return typeof gR.default.availableParallelism<"u"?gR.default.availableParallelism():Math.max(1,gR.default.cpus().length)}var gR,mtt,DAe,ytt,Ett,PAe,xAe,wtt,Btt,mR=Xe(()=>{bt();gR=et(Ie("os"));yR();Qc();mtt=Number(process.versions.node.split(".")[0]),DAe=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),ytt=typeof DAe<"u"?async e=>{try{return await rj(DAe,[e],{cwd:K.cwd()}),!0}catch{return!1}}:void 0,Ett="/usr/bin/ldd";wtt=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Btt=/\((\S*)(?::(\d+))(?::(\d+))\)/});function lj(e,t,r,s,a){let n=jB(r);if(s.isArray||s.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>nj(e,`${t}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>nj(e,t,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return nj(e,t,r,s,a)}function nj(e,t,r,s,a){let n=jB(r);switch(s.type){case"ANY":return LQ(n);case"SHAPE":return xtt(e,t,r,s,a);case"MAP":return ktt(e,t,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if("values"in s&&s.values?.includes(n))return n;let f=(()=>{if(s.type==="BOOLEAN"&&typeof n!="string")return bB(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${t}" to be a string, got ${typeof n}`);let p=Jk(n,{env:e.env});switch(s.type){case"ABSOLUTE_PATH":{let h=a,E=Q8(r);return E&&E[0]!=="<"&&(h=K.dirname(E)),K.resolve(h,Ae.toPortablePath(p))}case"LOCATOR_LOOSE":return Np(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Np(p);case"BOOLEAN":return bB(p);case"DURATION":return zk(p,s.unit);default:return p}})();if("values"in s&&s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(", ")}`);return f}function xtt(e,t,r,s,a){let n=jB(r);if(typeof n!="object"||Array.isArray(n))throw new st(`Object configuration settings "${t}" must be an object`);let c=cj(e,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${t}.${f}`;if(!s.properties[f])throw new st(`Unrecognized configuration settings found: ${t}.${f} - run "yarn config" to see the list of settings supported in Yarn`);c.set(f,lj(e,h,p,s.properties[f],a))}return c}function ktt(e,t,r,s,a){let n=jB(r),c=new Map;if(typeof n!="object"||Array.isArray(n))throw new st(`Map configuration settings "${t}" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${t}['${h}']`,C=s.valueDefinition;c.set(h,lj(e,E,p,C,a))}return c}function cj(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case"SHAPE":{if(t.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(t.properties))s.set(a,cj(e,n));return s}case"MAP":return t.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return t.default===null?null:e.projectCwd===null?Array.isArray(t.default)?t.default.map(s=>K.normalize(s)):K.isAbsolute(t.default)?K.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(s=>K.resolve(e.projectCwd,s)):K.resolve(e.projectCwd,t.default);case"DURATION":return zk(t.default,t.unit);default:return t.default}}function IR(e,t,r){if(t.type==="SECRET"&&typeof e=="string"&&r.hideSecrets)return Ptt;if(t.type==="ABSOLUTE_PATH"&&typeof e=="string"&&r.getNativePaths)return Ae.fromPortablePath(e);if(t.isArray&&Array.isArray(e)){let s=[];for(let a of e)s.push(IR(a,t,r));return s}if(t.type==="MAP"&&e instanceof Map){if(e.size===0)return;let s=new Map;for(let[a,n]of e.entries()){let c=IR(n,t.valueDefinition,r);typeof c<"u"&&s.set(a,c)}return s}if(t.type==="SHAPE"&&e instanceof Map){if(e.size===0)return;let s=new Map;for(let[a,n]of e.entries()){let c=t.properties[a],f=IR(n,c,r);typeof f<"u"&&s.set(a,f)}return s}return e}function Qtt(){let e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith(CR)&&(t=(0,QAe.default)(t.slice(CR.length)),e[t]=r);return e}function sj(){let e=`${CR}rc_filename`;for(let[t,r]of Object.entries(process.env))if(t.toLowerCase()===e&&typeof r=="string")return r;return oj}async function kAe(e){try{return await le.readFilePromise(e)}catch{return Buffer.of()}}async function Rtt(e,t){return Buffer.compare(...await Promise.all([kAe(e),kAe(t)]))===0}async function Ttt(e,t){let[r,s]=await Promise.all([le.statPromise(e),le.statPromise(t)]);return r.dev===s.dev&&r.ino===s.ino}async function Ntt({configuration:e,selfPath:t}){let r=e.get("yarnPath");return e.get("ignorePath")||r===null||r===t||await Ftt(r,t)?null:r}var QAe,Hp,RAe,TAe,FAe,ij,btt,rv,Dtt,jp,CR,oj,Ptt,DI,NAe,aj,wR,ER,Ftt,Je,nv=Xe(()=>{bt();Sc();QAe=et(zte()),Hp=et(Ng());jt();RAe=et(Gre()),TAe=Ie("module"),FAe=et(Mg()),ij=Ie("stream");Pce();fI();B8();v8();S8();_ce();b8();rm();Yce();UQ();Rc();w0();dR();Qc();mR();Lp();$o();btt=function(){if(!Hp.GITHUB_ACTIONS||!process.env.GITHUB_EVE Line truncated
`);return{stdout:n,stderr:c}}makeResolver(){let t=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])t.push(new s);return new nm([new OQ,new Ii,...t])}makeFetcher(){let t=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])t.push(new s);return new AI([new pI,new hI,...t])}getLinkers(){let t=[];for(let r of this.plugins.values())for(let s of r.linkers||[])t.push(new s);return t}getSupportedArchitectures(){let t=tv(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(c=>c==="current"?t.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?t.cpu:c));let n=r.get("libc");return n!==null&&(n=Zl(n,c=>c==="current"?t.libc??Zl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:t,stdout:r}){return r.isTTY?t??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let t=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!yl(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new _t;c.load(a,{yamlCompatibilityMode:!0});let f=SB(t,s.identHash),p=[];f.push([s.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,x]of Object.entries(C))p.push({...h,type:"PeerDependencyMeta",selector:E,key:S,value:x})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get("packageExtensions"))r(B0(s,!0),Kk(a),{userProvided:!0});return t}normalizeLocator(t){return yl(t.reference)?Js(t,`${this.get("defaultProtocol")}${t.reference}`):jp.test(t.reference)?Js(t,`${this.get("defaultProtocol")}${t.reference}`):t}normalizeDependency(t){return yl(t.range)?Un(t,`${this.get("defaultProtocol")}${t.range}`):jp.test(t.range)?Un(t,`${this.get("defaultProtocol")}${t.range}`):t}normalizeDependencyMap(t){return new Map([...t].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(t,{packageExtensions:r}){let s=TB(t),a=r.get(t.identHash);if(typeof a<"u"){let c=t.version;if(c!==null){for(let[f,p]of a)if(rA(c,f))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof s.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof s.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",$l(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:Q4(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=ka(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,Un(f,"*"))}for(let c of s.peerDependencies.values()){if(c.scope==="types")continue;let f=n(c),p=Qa("types",f),h=fn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,Un(p,"*")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(Ks(s.dependencies,([,c])=>gl(c))),s.peerDependencies=new Map(Ks(s.peerDependencies,([,c])=>gl(c))),s}getLimit(t){return $l(this.limits,t,()=>(0,FAe.default)(this.get(t)))}async triggerHook(t,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=t(a);n&&await n(...r)}}async triggerMultipleHooks(t,r){for(let s of r)await this.triggerHook(t,...s)}async reduceHook(t,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=t(c);f&&(a=await f(a,...s))}return a}async firstHook(t,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=t(a);if(!n)continue;let c=await n(...r);if(typeof c<"u")return c}return null}}});var Yr={};Vt(Yr,{EndStrategy:()=>pj,ExecError:()=>BR,PipeError:()=>iv,execvp:()=>rj,pipevp:()=>qu});function am(e){return e!==null&&typeof e.fd=="number"}function uj(){}function fj(){for(let e of lm)e.kill()}async function qu(e,t,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":am(n)&&(h[0]=n),am(c)&&(h[1]=c),am(f)&&(h[2]=f);let E=(0,Aj.default)(e,t,{cwd:Ae.fromPortablePath(r),env:{...s,PWD:Ae.fromPortablePath(r)},stdio:h});lm.add(E),lm.size===1&&(process.on("SIGINT",uj),process.on("SIGTERM",fj)),!am(n)&&n!==null&&n.pipe(E.stdin),am(c)||E.stdout.pipe(c,{end:!1}),am(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))am(S)||S.end()};return new Promise((S,x)=>{E.on("error",I=>{lm.delete(E),lm.size===0&&(process.off("SIGINT",uj),pro Line truncated
This command will run a command using Yarn's portable shell.
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await xI(r,[],{cwd:Ae.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var ec,ZAe=Xe(()=>{ec=class extends Error{constructor(t){super(t),this.name="ShellError"}}});var kR={};Vt(kR,{fastGlobOptions:()=>tpe,isBraceExpansion:()=>Dj,isGlobPattern:()=>jtt,match:()=>Gtt,micromatchOptions:()=>xR});function jtt(e){if(!PR.default.scan(e,xR).isGlob)return!1;try{PR.default.parse(e,xR)}catch{return!1}return!0}function Gtt(e,{cwd:t,baseFs:r}){return(0,$Ae.default)(e,{...tpe,cwd:Ae.fromPortablePath(t),fs:fx(epe.default,new r0(r))})}function Dj(e){return PR.default.scan(e,xR).isBrace}var $Ae,epe,PR,xR,tpe,rpe=Xe(()=>{bt();$Ae=et(SQ()),epe=et(Ie("fs")),PR=et(Xo()),xR={strictBrackets:!0},tpe={onlyDirectories:!1,onlyFiles:!1}});function Pj(){}function xj(){for(let e of um)e.kill()}function ope(e,t,r,s){return a=>{let n=a[0]instanceof sA.Transform?"pipe":a[0],c=a[1]instanceof sA.Transform?"pipe":a[1],f=a[2]instanceof sA.Transform?"pipe":a[2],p=(0,ipe.default)(e,t,{...s,stdio:[n,c,f]});return um.add(p),um.size===1&&(process.on("SIGINT",Pj),process.on("SIGTERM",xj)),a[0]instanceof sA.Transform&&a[0].pipe(p.stdin),a[1]instanceof sA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof sA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(um.delete(p),um.size===0&&(process.off("SIGINT",Pj),process.off("SIGTERM",xj)),E.code){case"ENOENT":a[2].write(`command not found: ${e}
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${e}
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
`),h(1);break}}),p.on("close",E=>{um.delete(p),um.size===0&&(process.off("SIGINT",Pj),process.off("SIGTERM",xj)),h(E!==null?E:129)})})}}}function ape(e){return t=>{let r=t[0]==="pipe"?new sA.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}function QR(e,t){return Qj.start(e,t)}function npe(e,t=null){let r=new sA.PassThrough,s=new spe.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(`
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",e(t!==null?`${t} ${p}`:p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&e(t!==null?`${t} ${n}`:n)}),r}function lpe(e,{prefix:t}){return{stdout:npe(r=>e.stdout.write(`${r}
`),e.stdout.isTTY?t:null),stderr:npe(r=>e.stderr.write(`${r}
`),e.stderr.isTTY?t:null)}}var ipe,sA,spe,um,Uc,kj,Qj,Rj=Xe(()=>{ipe=et(PU()),sA=Ie("stream"),spe=Ie("string_decoder"),um=new Set;Uc=class{constructor(t){this.stream=t}close(){}get(){return this.stream}},kj=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(t){this.stream=t}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},Qj=class e{constructor(t,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=t,this.implementation=r}static start(t,{stdin:r,stdout:s,stderr:a}){let n=new e(null,t);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(t,r=1){let s=new e(this,t),a=new kj;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let t=["ignore","ignore","ignore"];if(this.pipe)t[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");t[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,t[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,t[2]=s.get();let a=this.implementation(t);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let t=[];for(let s=this;s;s=s.ancestor)t.push(s.exec());return(await Promise.all(t))[0]}}});var pv={};Vt(pv,{EntryCommand:()=>lv,ShellError:()=>ec,execute:()=>xI,globUtils:()=>kR});function cpe(e,t,r){let s=new tc.PassThrough({autoDestroy:!0});switch(e){case 0:(t&1)===1&&r.stdin.pipe(s,{end:!1}),(t&2)===2&&r.stdin instanceof tc.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(t&1)===1&&r.stdout.pipe(s,{end:!1}),(t&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(t&1)===1&&r.stderr.pipe(s,{end:!1}),(t&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new ec(`Bad file descriptor: "${e}"`)}return s}function TR(e,t={}){let r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}async function Ytt(e,t,r){let s=[],a=new tc.PassThrough;return a.on("data",n=>s.push(n)),await FR(e,t,TR(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function upe(e,t,r){let s=e.map(async n=>{let c=await fm(n.args,t,r);return{name:n.name,value:c.join(" ")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function RR(e){return e.match(/[^ \r\n\t]+/g)||[]}async function gpe(e,t,r,s,a=s){switch(e.name){case"$":s(String(process.pid));break;case"#":s(String(t.args.length));break;case"@":if(e.quoted)for(let n of t.args)a(n);else for(let n of t.args){let c=RR(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case"*":{let n=t.args.join(" ");if(e.quoted)s(n);else for(let c of RR(n))a(c)}break;case"PPID":s(String(process.ppid));break;case"RANDOM":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(e.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<t.args.length&&(c=t.args[n]):Object.hasOwn(r.variables,e.name)?c=r.variables[e.name]:Object.hasOwn(r.environment,e.name)&&(c=r.environment[e.name]),typeof c<"u"&&e.alternativeValue?c=(await fm(e.alternativeValue,t,r)).join(" "):typeof c>"u"&&(e.defaultValue?c=(await fm(e.defaultValue,t,r)).join(" "):e.alternativeValue&&(c="")),typeof c>"u")throw f?new ec(`Unbound argument #${n}`):new ec(`Unbound variable "${e.name}"`);if(e.quoted)s(c);else{let p=RR(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&s(h)}}break}}async function uv(e,t,r){if(e.type==="number"){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}else if(e.type==="variable"){let s=[];await gpe({...e,quoted:!0},t,r,n=>s.push(n));let a=Number(s.join(" "));return Number.isNaN(a)?uv({type:"variable",name:s.join(" ")},t,r):uv({type:"number",value:a},t,r)}else return Wtt[e.type](await uv(e.left,t,r),await uv(e.right,t,r))}async function fm(e,t,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let x=JSON.stringify({type:E,fd:C}),I=s.get(x);typeof I>"u"&&s.set(x,I=[]),I.push(S)};for(let E of e){let C=!1;switch(E.type){case"redirection":{let S=await fm(E.args,t,r);for(let x of S)h(E.subtype,E.fd,x)}break;case"argument":for(let S of E.segments)switch(S.type){case"text":c(S.text);break;case"glob":c(S.pattern),C=!0;break;case"shell":{let x=await Ytt(S.shell,t,r);if(S.quoted)c(x);else{let I=RR(x);for(let T=0;T<I.length-1;++T)p(I[T]);c(I[I.length-1])}}break;case"variable":await gpe(S,t,r,c,p);break;case"arithmetic":c(String(await uv(S.arithmetic,t,r)));break}break}if(f(),C){let S=a.pop();if(typeof S>"u")throw new Error("Assertion failed: Expected a glob pa Line truncated
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(yE(e))}' has ended
`)})),0}return await Ape(e,t,r)}async function ztt(e,t,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables["?"]=String(f)},c=async f=>{try{return await Jtt(f.chain,t,r,{background:s&&typeof f.then>"u"})}catch(p){if(!(p instanceof ec))throw p;return r.stderr.write(`${p.message}
`),1}};for(n(await c(e));e.then;){if(r.exitCode!==null)return r.exitCode;switch(e.then.type){case"&&":a===0&&n(await c(e.then.line));break;case"||":a!==0&&n(await c(e.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return a}async function FR(e,t,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of e){if(a=await ztt(n,t,r,{background:c==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function mpe(e){switch(e.type){case"variable":return e.name==="@"||e.name==="#"||e.name==="*"||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(t=>Av(t))||"alternativeValue"in e&&!!e.alternativeValue&&e.alternativeValue.some(t=>Av(t));case"arithmetic":return Tj(e.arithmetic);case"shell":return Fj(e.shell);default:return!1}}function Av(e){switch(e.type){case"redirection":return e.args.some(t=>Av(t));case"argument":return e.segments.some(t=>mpe(t));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function Tj(e){switch(e.type){case"variable":return mpe(e);case"number":return!1;default:return Tj(e.left)||Tj(e.right)}}function Fj(e){return e.some(({command:t})=>{for(;t;){let r=t.chain;for(;r;){let s;switch(r.type){case"subshell":s=Fj(r.subshell);break;case"command":s=r.envs.some(a=>a.args.some(n=>Av(n)))||r.args.some(a=>Av(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!t.then)break;t=t.then.line}return!1})}async function xI(e,t=[],{baseFs:r=new Kn,builtins:s={},cwd:a=Ae.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=kR}={}){let C={};for(let[I,T]of Object.entries(n))typeof T<"u"&&(C[I]=T);let S=new Map(qtt);for(let[I,T]of Object.entries(s))S.set(I,T);c===null&&(c=new tc.PassThrough,c.end());let x=hx(e,E);if(!Fj(x)&&x.length>0&&t.length>0){let{command:I}=x[x.length-1];for(;I.then;)I=I.then.line;let T=I.chain;for(;T.then;)T=T.then.chain;T.type==="command"&&(T.args=T.args.concat(t.map(O=>({type:"argument",segments:[{type:"text",text:O}]}))))}return await FR(x,{args:t,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ppe,hpe,tc,dpe,qtt,Wtt,cv=Xe(()=>{bt();Sc();ppe=et(LE()),hpe=Ie("os"),tc=Ie("stream"),dpe=Ie("timers/promises");XAe();ZAe();rpe();Rj();Rj();qtt=new Map([["cd",async([e=(0,hpe.homedir)(),...t],r,s)=>{let a=K.resolve(s.cwd,Ae.toPortablePath(e));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code==="ENOENT"?new ec(`cd: no such file or directory: ${e}`):c})).isDirectory())throw new ec(`cd: not a directory: ${e}`);return s.cwd=a,0}],["pwd",async(e,t,r)=>(r.stdout.write(`${Ae.fromPortablePath(r.cwd)}
`),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,s)=>s.exitCode=parseInt(e??s.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(`${e.join(" ")}
`),0)],["sleep",async([e],t,r)=>{if(typeof e>"u")throw new ec("sleep: missing operand");let s=Number(e);if(Number.isNaN(s))throw new ec(`sleep: invalid time interval '${e}'`);return await(0,dpe.setTimeout)(1e3*s,0)}],["unset",async(e,t,r)=>{for(let s of e)delete r.environment[s],delete r.variables[s];return 0}],["__ysh_run_procedure",async(e,t,r)=>{let s=r.procedures[e[0]];return await QR(s,{stdin:new Uc(r.stdin),stdout:new Uc(r.stdout),stderr:new Uc(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;e[h]!=="--";){let C=e[h++],{type:S,fd:x}=JSON.parse(C),I=V=>{switch(x){case null:case 0:c.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},T=V=>{switch(x){case null:case 1:f.push(V);break;case 2:p.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},O=Number(e[h++]),U=h+O;for(let V=h;V<U;++h,++V)switch(S){case"<":I(()=>t.baseFs.createReadStream(K.resolve(r.cwd,Ae.toPortablePath(e[V]))));break;case"<<<":I(()=>{let $=new tc.PassThrough;return process.nextTick(()=>{$.write(`${e[V]}
`),$.end()}),$});break;case"<&":I(()=>cpe(Number(e[V]),1,r));break;case">":case">>":{let $=K.resolve(r.cwd,Ae.toPortablePath(e[V]));T($==="/dev/null"?new tc.Writable({autoDestroy:!0,emitClose:!0,write(ie,fe,ae){setImmediate(ae)}}):t.baseFs.createWriteStream($,S===">>"?{flags:"a"}:void 0))}break;case">&":T(cpe(Number(e[V]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${S}"`)}}if(c.length>0){let C=new tc.PassThrough;s=C;let S=x=>{if(x===c.length)C.end();else{let I=c[x]();I.pipe(C,{end:!1}),I.on("end",()=>{S(x+1)})}};S(0)}if(f.length>0){let C=new tc.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new tc.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await QR(fv(e.slice(h+1),t,r),{stdin:new Uc(s),stdout:new Uc(a),stderr:new Uc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,x)=>{C.on("error",I=>{x(I)}),C.on("close",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,x)=>{C.on("error",I=>{x(I)}),C.on("close",()=>{S()}),C.end()}))),E}]]);Wtt={addition:(e,t)=>e+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)}});var ype=G((zMt,NR)=>{function Xtt(){var e=0,t=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,x=13,I=14,T=15,O=16,U=17,V=0,$=1,ie=2,fe=3,ae=4;function ge(d,Se){return 55296<=d.charCodeAt(Se)&&d.charCodeAt(Se)<=56319&&56320<=d.charCodeAt(Se+1)&&d.charCodeAt(Se+1)<=57343}function he(d,Se){Se===void 0&&(Se=0);var Be=d.charCodeAt(Se);if(55296<=Be&&Be<=56319&&Se<d.length-1){var me=Be,ue=d.charCodeAt(Se+1);return 56320<=ue&&ue<=57343?(me-55296)*1024+(ue-56320)+65536:me}if(56320<=Be&&Be<=57343&&Se>=1){var me=d.charCodeAt(Se-1),ue=Be;return 55296<=me&&me<=56319?(me-55296)*1024+(ue-56320)+65536:ue}return Be}function Ce(d,Se,Be){var me=[d].concat(Se).concat([Be]),ue=me[me.length-2],Z=Be,be=me.lastIndexOf(I);if(be>1&&me.slice(1,be).every(function(_){return _==s})&&[s,x,U].indexOf(d)==-1)return ie;var Qe=me.lastIndexOf(a);if(Qe>0&&me.slice(1,Qe).every(function(_){return _==a})&&[S,a].indexOf(ue)==-1)return me.filter(function(_){return _==a}).length%2==1?fe:ae;if(ue==e&&Z==t)return V;if(ue==r||ue==e||ue==t)return Z==I&&Se.every(function(_){return _==s})?ie:$;if(Z==r||Z==e||Z==t)return $;if(ue==c&&(Z==c||Z==f||Z==h||Z==E))return V;if((ue==h||ue==f)&&(Z==f||Z==p))return V;if((ue==E||ue==p)&&Z==p)return V;if(Z==s||Z==T)return V;if(Z==n)return V;if(ue==S)return V;var ot=me.indexOf(s)!=-1?me.lastIndexOf(s)-1:me.length-2;return[x,U].indexOf(me[ot])!=-1&&me.slice(ot+1,-1).every(function(_){return _==s})&&Z==I||ue==T&&[O,U].indexOf(Z)!=-1?V:Se.indexOf(a)!=-1?ie:ue==a&&Z==a?V:$}this.nextBreak=function(d,Se){if(Se===void 0&&(Se=0),Se<0)return 0;if(Se>=d.length-1)return d.length;for(var Be=Ee(he(d,Se)),me=[],ue=Se+1;ue<d.length;ue++)if(!ge(d,ue-1)){var Z=Ee(he(d,ue));if(Ce(Be,me,Z))return ue;me.push(Z)}return d.length},this.splitGraphemes=function(d){for(var Se=[],Be=0,me;(me=this.nextBreak(d,Be))<d.length;)Se.push(d.slice(Be,me)),Be=me;return Be<d.length&&Se.push(d.slice(Be)),Se},this.iterateGraphemes=function(d){var Se=0,Be={next:function(){var me,ue;return(ue=this.nextBreak(d,Se))<d.length?(me=d.slice(Se,ue),Se=ue,{value:me,done:!1}):Se<d.length?(me=d.slice(Se),Se=d.length,{value:me,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Be[Symbol.iterator]=function(){return Be}),Be},this.countGraphemes=function(d){for(var Se=0,Be=0,me;(me=this.nextBreak(d,Be))<d.length;)Be=me,Se++;return Be<d.length&&Se++,Se};function Ee(d){return 1536<=d&&d<=1541||d==1757||d==1807||d==2274||d==3406||d==69821||70082<=d&&d<=70083||d==72250||72326<=d&&d<=72329||d==73030?S:d==13?e:d==10?t:0<=d&&d<=9||11<=d&&d<=12||14<=d&&d<=31||127<=d&&d<=159||d==173||d==1564||d==6158||d==8203||8206<=d&&d<=8207||d==8232||d==8233||8234<=d&&d<=8238||8288<=d&&d<=8292||d==8293||8294<=d&&d<=8303||55296<=d&&d<=57343||d==65279||65520<=d&&d<=65528||65529<=d&&d<=65531||113824<=d&&d<=113827||119155<=d&&d<=119162||d==917504||d==917505||917506<=d&&d<=917535||917632<=d&&d<=917759||918e3<=d&&d<=921599?r:768<=d&&d<=879||1155<=d&&d<=1159||1160<=d&&d<=1161||1425<=d&&d<=1469||d==1471||1473<=d&&d<=1474||1476<=d&&d<=1477||d==1479||1552<=d&&d<=1562||1611<=d&&d<=1631||d==1648||1750<=d&&d<=1756||1759<=d&&d<=1764||1767<=d&&d<=1768||1770<=d&&d<=1773||d==1809||1840<=d&&d<=1866||1958<=d&&d<=1968||2027<=d&&d<=2035||2070<=d&&d<=2073||2075<=d&&d<=2083||2085<=d&&d<=2087||2089<=d&&d<=2093||2137<=d&&d<=2139||2260<=d&&d<=2273||2275<=d&&d<=2306||d==2362||d==2364||2369<=d&&d<=2376||d==2381||2385<=d&&d<=2391||2402<=d&&d<=2403||d==2433||d==2492||d==2494||2497<=d&&d<=2500||d==2509||d==2519||2530<=d&&d<=2531||2561<=d&&d<=2562||d==2620||2625<=d&&d<=2626||2631<=d&&d<=2632||2635<=d&&d<=2637||d==2641||2672<=d&&d<=2673||d==2677||2689<=d&&d<=2690||d==2748||2753<=d&&d<=2757||2759<=d&&d<=2760||d==2765||2786<=d&&d<=2787||2810<=d&&d<=2815||d==2817||d==2876||d==2878||d==2879||2881<=d&&d<=2884||d==2893||d==2902||d==2903||2914<=d&&d<=2915||d==2946||d==3006||d==3008|| Line truncated
`,end:e=>`::endgroup::
`}:LR.default.TRAVIS?{start:e=>`travis_fold:start:${e}
`,end:e=>`travis_fold:end:${e}
`}:LR.default.GITLAB?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${e}
`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Spe=P0!==null,Bpe=new Date,trt=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,rrt=e=>e,MR=rrt({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),nrt=trt&&Object.keys(MR).find(e=>{let t=MR[e];return!(t.date&&(t.date[0]!==Bpe.getDate()||t.date[1]!==Bpe.getMonth()+1))})||"default";Ft=class extends Io{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(xB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get("enableProgressBars")&&!a&&s.isTTY&&s.columns>22){let S=r.get("progressBarStyle")||nrt;if(!Object.hasOwn(MR,S))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=MR[S];let x=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*x/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!="string"){let h=c;c=h.message,f=f??h.name}let p=typeof f<"u"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Xg(r.configuration,`Yarn ${An}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s=="function"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,P0!==null&&!this.json&&this.includeInfos&&this.stdout.write(P0.start(r))},reportFooter:f=>{if(this.indent-=1,P0!==null&&!this.json&&this.includeInfos){this.stdout.write(P0.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&f>200?this.reportInfo(null,`\u2514 Completed in ${Gt(this.configuration,f,dt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof s=="function"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",c=`${this.formatPrefix(n,"blueBright")}${s}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"redBright")}${s}`,{truncate:!1})}reportFold(r,s){if(!P0)return;let a=`${P0.start(r)}${s}${P0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)ret Line truncated
`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>wpe&&(this.progressFrame=(this.progressFrame+1)%Cpe.length,this.progressTime=r);let s=Cpe[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Gt(this.configuration,"\u27A4","blueBright")} ${f}${s}${n}${p}
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},wpe)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>"u"&&(s=this.configuration.get("preferTruncatedLines")),s&&(r=(0,vpe.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?bpe(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,s){return this.includePrefix?`${Gt(this.configuration,"\u27A4",s)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?Nj(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${ert} `}}});var wn={};Vt(wn,{PackageManager:()=>Ppe,detectPackageManager:()=>xpe,executePackageAccessibleBinary:()=>Fpe,executePackageScript:()=>UR,executePackageShellcode:()=>Oj,executeWorkspaceAccessibleBinary:()=>urt,executeWorkspaceLifecycleScript:()=>Rpe,executeWorkspaceScript:()=>Qpe,getPackageAccessibleBinaries:()=>_R,getWorkspaceAccessibleBinaries:()=>Tpe,hasPackageScript:()=>art,hasWorkspaceScript:()=>Lj,isNodeScript:()=>Mj,makeScriptEnv:()=>gv,maybeExecuteWorkspaceLifecycleScript:()=>crt,prepareExternalProject:()=>ort});async function x0(e,t,r,s=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await le.writeFilePromise(K.format({dir:e,name:t,ext:".cmd"}),a)}await le.writeFilePromise(K.join(e,t),`#!/bin/sh
exec "${r}" ${s.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
`,{mode:493})}async function xpe(e){let t=await _t.tryFind(e);if(t?.packageManager){let s=QQ(t.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:t.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await le.readFilePromise(K.join(e,Ir.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:le.existsSync(K.join(e,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:le.existsSync(K.join(e,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function gv({project:e,locator:t,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=e?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<"u"&&(c[E.toLowerCase()!=="path"?E:"PATH"]=C);let f=Ae.fromPortablePath(r);c.BERRY_BIN_FOLDER=Ae.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?Ae.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([x0(r,"node",process.execPath),...An!==null?[x0(r,"run",process.execPath,[p,"run"]),x0(r,"yarn",process.execPath,[p]),x0(r,"yarnpkg",process.execPath,[p]),x0(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),e&&(c.INIT_CWD=Ae.fromPortablePath(e.configuration.startingCwd),c.PROJECT_CWD=Ae.fromPortablePath(e.cwd)),c.PATH=c.PATH?`${f}${Ae.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${Ae.sep}yarn`,c.npm_node_execpath=`${f}${Ae.sep}node`,t){if(!e)throw new Error("Assertion failed: Missing project");let E=e.tryWorkspaceByLocator(t),C=E?E.manifest.version??"":e.storedPackages.get(t.locatorHash).version??"";c.npm_package_name=fn(t),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let x=e.storedPackages.get(t.locatorHash);if(!x)throw new Error(`Package for ${Vr(e.configuration,t)} not found in the project`);let I=e.configuration.getLinkers(),T={project:e,report:new Ft({stdout:new k0.PassThrough,configuration:e.configuration})},O=I.find(U=>U.supportsPackage(x,T));if(!O)throw new Error(`The package ${Vr(e.configuration,x)} isn't supported by any of the available linkers`);S=await O.findPackageLocation(x,T)}c.npm_package_json=Ae.fromPortablePath(K.join(S,Ir.manifest))}let h=An!==null?`yarn/${An}`:`yarn/${Rp("@yarnpkg/core").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),e&&await e.configuration.triggerHook(E=>E.setupScriptEnvironment,e,c,async(E,C,S)=>await x0(r,E,C,S)),c}async function ort(e,t,{configuration:r,report:s,workspace:a=null,locator:n=null}){await srt(async()=>{await le.mktempPromise(async c=>{let f=K.join(c,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:Ae.fromPortablePath(e),report:s}),C=n&&ju(n)?aI(n):n,S=C?ml(C):"an external project";h.write(`Packing ${S} from sources
`);let x=await xpe(e),I;x!==null?(h.write(`Using ${x.packageManager} for bootstrap. Reason: ${x.reason}
`),I=x.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
`),I="Yarn");let T=I==="Yarn"&&!x?.packageManagerField;await le.mktempPromise(async O=>{let U=await gv({binFolder:O,ignoreCorepack:T,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),$=new Map([["Yarn Classic",async()=>{let fe=a!==null?["workspace",a]:[],ae=K.join(e,Ir.manifest),ge=await le.readFilePromise(ae),he=await qu(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(he.code!==0)return he.code;await le.writeFilePromise(ae,ge),await le.appendFilePromise(K.join(e,".npmignore"),`/.yarn
`),h.write(`
`),delete U.NODE_ENV;let Ce=await qu("yarn",["install"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Ce.code!==0)return Ce.code;h.write(`
`);let Ee=await qu("yarn",[...fe,"pack","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:E});return Ee.code!==0?Ee.code:0}],["Yarn",async()=>{let fe=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ae=K.join(e,Ir.lockfile);await le.existsPromise(ae)||await le.writeFilePromise(ae,"");let ge=await qu("yarn",[...fe,"pack","--install-if-needed","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:E});return ge.code!==0?ge.code:0}],["npm",async()=>{if(a!==null){let Se=new k0.PassThrough,Be=zE(Se);Se.pipe(h,{end:!1});let me=await qu("npm",["--version"],{cwd:e,env:U,stdin:p,stdout:Se,stderr:E,end:0});if(Se.end(),me.code!==0)return h.end(),E.end(),me.code;let ue=(await Be).toString().trim();if(!rA(ue,">=7.x")){let Z=Qa(null,"npm"),be=Un(Z,ue),Qe=Un(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${ai(r,be)}; please upgrade to ${ai(r,Qe)} (npm has been detected as the primary package manager for ${Gt(r,e,dt.PATH)})`)}}let fe=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ae=await qu("npm",["install","--legacy-peer-deps"],{cwd:e,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ae.code!==0)return ae.code;let ge=new k0.PassThrough,he=zE(ge);ge.pipe(h);let Ce=await qu("npm",["pack","--silent",...fe],{cwd:e,env:U,stdin:p,stdout:ge,stderr:E});if(Ce.code!==0)return Ce.code;let Ee=(await he).toString().trim().replace(/^.*\n/s,""),d=K.resolve(e,Ae.toPortablePath(Ee));return await le.renamePromise(d,t),0}]]).get(I);if(typeof $>"u")throw new Error("Assertion failed: Unsupported workflow");let ie=await $();if(!(ie===0||typeof ie>"u"))throw le.detachTemp(c),new Lt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Gt(r,f,dt.PATH)})`)})})})}async function art(e,t,{project:r}){let s=r.tryWorkspaceByLocator(e);if(s!==null)return Lj(s,t);let a=r.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Vr(r.configuration,e)} not found in the project`);return await nA.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ft({stdout:new k0.PassThrough,configuration:c})},h=f.find(x=>x.supportsPackage(a,p));if(!h)throw new Error(`The package ${Vr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Pn(E,{baseFs:n});return(await _t.find(vt.dot,{baseFs:C})).scripts.has(t)})}async function UR(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await kpe(e,{project:a,binFolder:p,cwd:s,lifecycleScript:t}),S=h.scripts.get(t);if(typeof S>"u")return 1;let x=async()=>await xI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(T=>T.wrapScriptExecution,x,a,e,t,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function Oj(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{env:h,cwd:E}=await kpe(e,{project:a,binFolder:p,cwd:s});return await xI(t,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function lrt(e,{binFolder:t,cwd:r,lifecycleScript:s}){let a=await gv({project:e.project,locator:e.anchoredLocator,binFolder:t,lifecycleScript:s});return await Uj(t,await Tpe(e)),typeof r>"u"&&(r=K.dirname(await le.realpathPromise(K.join(e.cwd,"package.json")))),{manifest:e.manifest,binFolder:t,env:a,cwd:r}}async function kpe(e,{project:t,binFolder:r,cwd:s,lifecycleScript:a}){let n=t.tryWorkspaceByLocator(e);if(n!==null)return lrt(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Vr(t.configuration,e)} not found in the project`);return await nA.openPromise(async f=>{let p=t.configuration,h=t.configuration.getLinkers(),E={project:t,report:new Ft({stdout:new k0.PassThrough,configuration:p})},C=h.find(O=>O.supportsPackage(c,E));if(!C)throw new Error(`The package ${Vr(t.configuration,c)} isn't supported by any of the available linkers`);let S=await gv({project:t,locator:e,binFolder:r,lifecycleScript:a});await Uj(r,await _R(e,{project:t}));let x=await C.findPackageLocation(c,E),I=new Pn(x,{baseFs:f}),T=await _t.find(vt.dot,{baseFs:I});return typeof s>"u"&&(s=x),{manifest:T,binFolder:r,env:S,cwd:s}})}async function Qpe(e,t,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await UR(e.anchoredLocator,t,r,{cwd:s,project:e.project,stdin:a,stdout:n,stderr:c})}function Lj(e,t){return e.manifest.scripts.has(t)}async function Rpe(e,t,{cwd:r,report:s}){let{configuration:a}=e.project,n=null;await le.mktempPromise(async c=>{let f=K.join(c,`${t}.log`),p=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${Ae.fromPortablePath(e.cwd)}")
`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Vr(a,e.anchoredLocator),header:p});s.reportInfo(36,`Calling the "${t}" lifecycle script`);let C=await Qpe(e,t,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw le.detachTemp(c),new Lt(36,`${BB(t)} script failed (exit code ${Gt(a,C,dt.NUMBER)}, logs can be found here: ${Gt(a,f,dt.PATH)}); run ${Gt(a,`yarn ${t}`,dt.CODE)} to investigate`)})}async function crt(e,t,r){Lj(e,t)&&await Rpe(e,t,r)}function Mj(e){let t=K.extname(e);if(t.match(/\.[cm]?[jt]sx?$/))return!0;if(t===".exe"||t===".bin")return!1;let r=Buffer.alloc(4),s;try{s=le.openSync(e,"r")}catch{return!0}try{le.readSync(s,r,0,r.length,0)}finally{le.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function _R(e,{project:t}){let r=t.configuration,s=new Map,a=t.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Vr(r,e)} not found in the project`);let n=new k0.Writable,c=r.getLinkers(),f={project:t,report:new Ft({configuration:r,stdout:n})},p=new Set([e.locatorHash]);for(let E of a.dependencies.values()){let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ai(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=t.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Zl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Zl.skip;let x=null;try{x=await S.findPackageLocation(C,f)}catch(I){if(I.code==="LOCATOR_NOT_INSTALLED")return Zl.skip;throw I}return{dependency:C,packageLocation:x}}));for(let E of h){if(E===Zl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[x,I]of C.bin){let T=K.resolve(S,I);s.set(x,[C,Ae.fromPortablePath(T),Mj(T)])}}return s}async function Tpe(e){return await _R(e.anchoredLocator,{project:e.project})}async function Uj(e,t){await Promise.all(Array.from(t,([r,[,s,a]])=>a?x0(e,r,process.execPath,[s]):x0(e,r,s,[])))}async function Fpe(e,t,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await _R(e,{project:a});let E=h.get(t);if(!E)throw new Error(`Binary not found (${t}) for ${Vr(a.configuration,e)}`);return await le.mktempPromise(async C=>{let[,S]=E,x=await gv({project:a,locator:e,binFolder:C});await Uj(x.BERRY_BIN_FOLDER,h);let I=Mj(Ae.toPortablePath(S))?qu(process.execPath,[...p,S,...r],{cwd:s,env:x,stdin:n,stdout:c,stderr:f}):qu(S,r,{cwd:s,env:x,stdin:n,stdout:c,stderr:f}),T;try{T=await I}finally{await le.removePromise(x.BERRY_BIN_FOLDER)}return T.code})}async function urt(e,t,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await Fpe(e.anchoredLocator,t,r,{project:e.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var Dpe,k0,Ppe,irt,srt,_j=Xe(()=>{bt();bt();iA();cv();Xl();Dpe=et(Mg()),k0=Ie("stream");fI();Nc();dv();hv();yR();Rc();Qc();Lp();$o();Ppe=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Ppe||{});irt=2,srt=(0,Dpe.default)(irt)});function Bnt(e,t,r){let s=t,a=t?t.next:e.head,n=new q6(r,s,a,e);return n.next===void 0&&(e.tail=n),n.prev===void 0&&(e.head=n),e.length++,n}function vnt(e,t){e.tail=new q6(t,e.tail,void 0,e),e.head||(e.head=e.tail),e.length++}function Snt(e,t){e.head=new q6(t,void 0,e.head,e),e.tail||(e.tail=e.head),e.length++}var fhe,Oa,gT,O6,Ahe,M6,wm,yT,dhe,AT,U0,Upe,ghe,Cm,whe,Mv,Ku,y6,Dhe,b6,W6,The,V6,Bn,gs,K6,Hv,_I,Il,Mhe,Uv,J6,El,X6,frt,Art,Npe,prt,hrt,drt,qp,Yp,Q0,HR,mv,jR,Ope,GR,Lpe,Yu,QI,zs,yv,NI,Xs,Na,Zs,Hj,qR,na,es,jj,Gj,Mpe,qj,oA,Yj,YR,Ev,Am,rc,Iv,grt,mrt,yrt,Ert,phe,Irt,Crt,wrt,Dm,Brt,H0,zu,Cv,Jn,Wj,Jp,Vj,h6,d6,Qv,WR,UI,HI,Kj,OI,j0,Ju,N0,aA,LI,Jj,Kp,wv,zj,tT,pm,rT,Bm,L6,vrt,mT,hhe,Srt,brt,Drt,Prt,xrt,krt,Qrt,U6,_v,Rrt,uA,Trt,_pe,Frt,Xj,vm,VR,Zj,_6,mhe,Nrt,Ort,yhe,Lrt,Mrt,Ehe,Urt,_rt,Hrt,jrt,Grt,qrt,Yrt,Wrt,Ihe,Che,Vrt,nT,Krt,ET,H6,Sm,Jrt,hm,$j,zrt,O0,Xrt,Zrt,$rt,L0,ent,tnt,rnt,e6,nnt,dm,pT,int,snt,ont,ant,cn,vhe,IT,lnt,g6,m6,cnt,_c,gm,Wp,t6,Hpe,lA,Bv,R0,jpe,Ci,Vp,T0,r6,mm,ds,KR,JR,n6,Gpe,qpe,vv,i6,zR,RI,F0,XR,ym,ZR,$R,Ype,unt,bm,Rv,fnt,She,Ant,pnt,CT,bhe,hnt,Wpe,j6,wT,G6,dnt,gnt,Vpe,mnt,Phe,ynt,Kpe,Jpe,zpe,E6,Xpe,Sv,iT,I6,sT,C6,w6,B6,v6,M0,hT,S6,s6,cA,xhe,Ent,Int,Cnt,wnt,q6,Zpe,$pe,oT,bv,Wu,Em,Im,Dv,o6,Vu,a6,aT,ehe,D6,P6,lT,cT,the,l6,uT,khe,c6,BT,Y6,bnt,Dnt,Qhe,Rhe,Pnt,xnt,EUt,knt,Qnt,Rnt,Tnt,Fnt,Fhe,Nnt,Ont,Lnt,Nhe,x6,dT,Mnt,Ohe,Unt,Lhe,Uhe,vT,_nt,Hnt,k6,_he,jnt,Gnt,u6,rhe,TI,qnt,Ynt,Wnt,Vnt,Knt,Jnt,nhe,Q6,ihe,R6,Hc,T6,F6,fT,she,ohe,kv,ahe,lhe,f6,_0,$s,eT,che,FI,A6,p6,N6,Tv,Fv,Nv,Ov,znt,Lv,Xnt,Znt,$nt,uhe,z6,Pv,Hhe,eit,tit,IUt,rit,nit,iit,sit,oit,xv,CUt,ait,jhe=Xe(()=>{fhe=et(Ie("events"),1),Oa=et(Ie("fs"),1),gT=Ie("node:events"),O6=et(Ie("node:stream"),1),Ahe=Ie("node:string_decoder"),M6=et(Ie("node:path"),1),wm=et(Ie("node:fs"),1),yT=Ie("path"),dhe=Ie("events"),AT=et(Ie("assert"),1),U0=Ie("buffer"),Upe=et(Ie("zlib"),1), Line truncated
`,n=Buffer.byteLength(a),c=Math.floor(Math.log(n)/Math.log(10))+1;return n+c>=Math.pow(10,c)&&(c+=1),c+n+a}static parse(t,r,s=!1){return new Bhe(int(snt(t),r),s)}},int=(e,t)=>t?Object.assign({},t,e):e,snt=e=>e.replace(/\n$/,"").split(`
`).reduce(ont,Object.create(null)),ont=(e,t)=>{let r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.slice((r+" ").length);let s=t.split("="),a=s.shift();if(!a)return e;let n=a.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),c=s.join("=");return e[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(c)*1e3):/^[0-9]+$/.test(c)?+c:c,e},ant=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,cn=ant!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/"),vhe=class extends Dm{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,r){switch(super({}),this.pause(),this.extended=t,this.globalExtended=r,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=cn(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?cn(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#e(t),r&&this.#e(r,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let r=this.remain,s=this.blockRemain;return this.remain=Math.max(0,r-t),this.blockRemain=Math.max(0,s-t),this.ignore?!0:r>=t?super.write(e):super.write(e.subarray(0,r))}#e(e,t=!1){e.path&&(e.path=cn(e.path)),e.linkpath&&(e.linkpath=cn(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([r,s])=>!(s==null||r==="path"&&t))))}},IT=(e,t,r,s={})=>{e.file&&(s.file=e.file),e.cwd&&(s.cwd=e.cwd),s.code=r instanceof Error&&r.code||t,s.tarCode=t,!e.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),e.emit("warn",t,r,s)):r instanceof Error?e.emit("error",Object.assign(r,s)):e.emit("error",Object.assign(new Error(`${t}: ${r}`),s))},lnt=1024*1024,g6=Buffer.from([31,139]),m6=Buffer.from([40,181,47,253]),cnt=Math.max(g6.length,m6.length),_c=Symbol("state"),gm=Symbol("writeEntry"),Wp=Symbol("readEntry"),t6=Symbol("nextEntry"),Hpe=Symbol("processEntry"),lA=Symbol("extendedHeader"),Bv=Symbol("globalExtendedHeader"),R0=Symbol("meta"),jpe=Symbol("emitMeta"),Ci=Symbol("buffer"),Vp=Symbol("queue"),T0=Symbol("ended"),r6=Symbol("emittedEnd"),mm=Symbol("emit"),ds=Symbol("unzip"),KR=Symbol("consumeChunk"),JR=Symbol("consumeChunkSub"),n6=Symbol("consumeBody"),Gpe=Symbol("consumeMeta"),qpe=Symbol("consumeHeader"),vv=Symbol("consuming"),i6=Symbol("bufferConcat"),zR=Symbol("maybeEnd"),RI=Symbol("writing"),F0=Symbol("aborted"),XR=Symbol("onDone"),ym=Symbol("sawValidEntry"),ZR=Symbol("sawNullBlock"),$R=Symbol("sawEOF"),Ype=Symbol("closeStream"),unt=()=>!0,bm=class extends dhe.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[Vp]=[];[Ci];[Wp];[gm];[_c]="begin";[R0]="";[lA];[Bv];[T0]=!1;[ds];[F0]=!1;[ym];[ZR]=!1;[$R]=!1;[RI]=!1;[vv]=!1;[r6]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(XR,()=>{(this[_c]==="begin"||this[ym]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(XR,e.ondone):this.on(XR,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||lnt,this.filter=typeof e.filter=="function"?e.filter:unt;let t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!(e.gzip||e.zstd)&&e.brotli!==void 0?e.brotli:t?void 0:!1;let r=e.file&&(e.file.endsWith(".tar.zst")||e.file.endsWith(".tzst"));this.zstd=!(e.gzip||e.brotli)&&e.zstd!==void 0?e.zstd:r?!0:void 0,this.on("end",()=>this[Ype]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onReadEntry=="function"&&this.on("entry",e.onReadEntry)}warn(e,t,r={}){IT(this,e,t,r)}[qpe](e,t){this[ym]===void 0&&(this[ym]=!1);let r;try{r=new Sm(e,t,this[lA],this[Bv])}catch(s){return this.warn("TAR_ENTRY_INVALID",s)}if(r.nullBlock)this[ZR]?(this[$R]=!0,this[_c]==="begin"&&(this[_c]="header"),this[mm]("eof")):(this[ZR]=!0,this[mm]("nullBlock"));else if(this[ZR]=!1,!r.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r});else if(!r.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:r});else{let s=r.type;if(/^(Symbolic)?Link$/.test(s)&&!r.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r});else if(!/^(Symbolic)?Link$/.test(s)&&!/^(Global)?ExtendedHeader$/.test Line truncated
`}),f},s})});var ts={};Vt(ts,{emitList:()=>hit,emitTree:()=>n0e,treeNodeToJson:()=>r0e,treeNodeToTreeify:()=>t0e});function t0e(e,{configuration:t}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,x=[];typeof E<"u"&&x.push(Xg(t,E,2)),typeof C<"u"&&x.push(Gt(t,C[0],C[1])),x.length===0&&x.push(Xg(t,`${p}`,2));let I=x.join(": ").trim(),T=`\0${s++}\0`,O=c[`${T}${I}`]={};typeof S<"u"&&a(S,O)}};if(typeof e.children>"u")throw new Error("The root node must only contain children");return a(e.children,r),r}function r0e(e){let t=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Zg(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[dit(n)]=t(c));return typeof r.value>"u"?a:{value:Zg(r.value[0],r.value[1]),children:a}};return t(e)}function hit(e,{configuration:t,stdout:r,json:s}){let a=e.map(n=>({value:n}));n0e({children:a},{configuration:t,stdout:r,json:s})}function n0e(e,{configuration:t,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(e.children)?e.children.values():Object.values(e.children??{});for(let f of c)f&&r.write(`${JSON.stringify(r0e(f))}
`);return}let n=(0,e0e.asTree)(t0e(e,{configuration:t}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
$1`).replace(/^│\n/,"")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function dit(e){return typeof e=="string"?e.replace(/^\0[0-9]+\0/,""):e}var e0e,i0e=Xe(()=>{e0e=et($he());Rc()});var ST,s0e=Xe(()=>{ST=class{constructor(t){this.releaseFunction=t;this.map=new Map}addOrCreate(t,r){let s=this.map.get(t);if(typeof s<"u"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(t)}`);return s.refCount++,{value:s.value,release:()=>this.release(t)}}else{let a=r();return this.map.set(t,{refCount:1,value:a}),{value:a,release:()=>this.release(t)}}}release(t){let r=this.map.get(t);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(t)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(t)}`);s==1?(this.map.delete(t),this.releaseFunction(r.value)):r.refCount--}}});function qv(e){let t=e.match(git);if(!t?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=t.groups.cacheVersion?parseInt(t.groups.cacheVersion):null;return{cacheKey:t.groups.cacheKey??null,cacheVersion:r,cacheSpec:t.groups.cacheSpec??null,hash:t.groups.hash}}var o0e,iG,sG,bT,zr,git,oG=Xe(()=>{Ge();bt();bt();iA();o0e=Ie("crypto"),iG=et(Ie("fs"));s0e();Nc();w0();Qc();$o();sG=XE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),bT=XE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),zr=class e{constructor(t,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new ST(t=>{t.discardAndClose()});this.cacheId=`-${(0,o0e.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=t,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=e.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(t,{immutable:r,check:s}={}){let a=new e(t.get("cacheFolder"),{configuration:t,immutable:r,check:s});return await a.setup(),a}static getCacheKey(t){let r=t.get("compressionLevel"),s=r!=="mixed"?`c${r}`:"";return{cacheKey:[bT,s].join(""),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let t=`${this.configuration.get("globalFolder")}/cache`;return t!==this.cwd?t:null}getVersionFilename(t){return`${lI(t)}-${this.cacheKey}.zip`}getChecksumFilename(t,r){let a=qv(r).hash.slice(0,10);return`${lI(t)}-${a}.zip`}isChecksumCompatible(t){if(t===null)return!1;let{cacheVersion:r,cacheSpec:s}=qv(t);if(r===null||r<sG)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<bT&&a==="always"||s!==this.cacheSpec&&a!=="required-only")}getLocatorPath(t,r){return this.mirrorCwd===null?K.resolve(this.cwd,this.getVersionFilename(t)):r===null?K.resolve(this.cwd,this.getVersionFilename(t)):K.resolve(this.cwd,this.getChecksumFilename(t,r))}getLocatorMirrorPath(t){let r=this.mirrorCwd;return r!==null?K.resolve(r,this.getVersionFilename(t)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await le.existsPromise(this.cwd))throw new Lt(56,"Cache path does not exist.")}else{await le.mkdirPromise(this.cwd,{recursive:!0});let t=K.resolve(this.cwd,".gitignore");await le.changeFilePromise(t,`/.gitignore
*.flock
*.tmp
`)}(this.mirrorCwd||!this.immutable)&&await le.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(t,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(t),p=new Kn,h=()=>{let he=new hs,Ce=K.join(vt.root,E8(t));return he.mkdirSync(Ce,{recursive:!0}),he.writeJsonSync(K.join(Ce,Ir.manifest),{name:fn(t),mocked:!0}),he},E=async(he,{isColdHit:Ce,controlPath:Ee=null})=>{if(Ee===null&&c.unstablePackages?.has(t.locatorHash))return{isValid:!0,hash:null};let d=r&&!Ce?qv(r).cacheKey:this.cacheKey,Se=!c.skipIntegrityCheck||!r?`${d}/${await DQ(he)}`:r;if(Ee!==null){let me=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await DQ(Ee)}`:r;if(Se!==me)throw new Lt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Be=null;switch(r!==null&&Se!==r&&(this.check?Be="throw":qv(r).cacheKey!==qv(Se).cacheKey?Be="update":Be=this.configuration.get("checksumBehavior")),Be){case null:case"update":return{isValid:!0,hash:Se};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Lt(18,"The remote archive doesn't match the expected checksum")}},C=async he=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Vr(this.configuration,t)}`);let Ce=await n(),Ee=Ce.getRealPath();Ce.saveAndClose(),await le.chmodPromise(Ee,420);let d=await E(he,{controlPath:Ee,isColdHit:!1});if(!d.isValid)throw new Error("Assertion failed: Expected a valid checksum");return d.hash},S=async()=>{if(f===null||!await le.existsPromise(f)){let he=await n(),Ce=he.getRealPath();return he.saveAndClose(),{source:"loader",path:Ce}}return{source:"mirror",path:f}},x=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Vr(this.configuration,t)}`);if(this.immutable)throw new Lt(56,`Cache entry required but missing for ${Vr(this.configuration,t)}`);let{path:he,source:Ce}=await S(),{hash:Ee}=await E(he,{isColdHit:!0}),d=this.getLocatorPath(t,Ee),Se=[];Ce!=="mirror"&&f!==null&&Se.push(async()=>{let me=`${f}${this.cacheId}`;await le.copyFilePromise(he,me,iG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(me,420),await le.renamePromise(me,f)}),(!c.mirrorWriteOnly||f===null)&&Se.push(async()=>{let me=`${d}${this.cacheId}`;await le.copyFilePromise(he,me,iG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(me,420),await le.renamePromise(me,d)});let Be=c.mirrorWriteOnly?f??d:d;return await Promise.all(Se.map(me=>me())),[!1,Be,Ee]},I=async()=>{let Ce=(async()=>{let Ee=c.unstablePackages?.has(t.locatorHash),d=Ee||!r||this.isChecksumCompatible(r)?this.getLocatorPath(t,r):null,Se=d!==null?this.markedFiles.has(d)||await p.existsPromise(d):!1,Be=!!c.mockedPackages?.has(t.locatorHash)&&(!this.check||!Se),me=Be||Se,ue=me?s:a;if(ue&&ue(),me){let Z=null,be=d;if(!Be)if(this.check)Z=await C(be);else{let Qe=await E(be,{isColdHit:!1});if(Qe.isValid)Z=Qe.hash;else return x()}return[Be,be,Z]}else{if(this.immutable&&Ee)throw new Lt(56,`Cache entry required but missing for ${Vr(this.configuration,t)}; consider defining ${ce.pretty(this.configuration,"supportedArchitectures",ce.Type.CODE)} to cache packages for multiple systems`);return x()}})();this.mutexes.set(t.locatorHash,Ce);try{return await Ce}finally{this.mutexes.delete(t.locatorHash)}};for(let he;he=this.mutexes.get(t.locatorHash);)await he;let[T,O,U]=await I();T||this.markedFiles.add(O);let V=()=>this.refCountedZipFsCache.addOrCreate(O,()=>T?h():new hs(O,{baseFs:p,readOnly:!0})),$,ie=new AE(()=>T4(()=>($=V(),$.value),he=>`Failed to open the cache entry for ${Vr(this.configuration,t)}: ${he}`),K),fe=new Gf(O,{baseFs:ie,pathUtils:K}),ae=()=>{$?.release()},ge=c.unstablePackages?.has(t.locatorHash)?null:U;return[fe,ae,ge]}},git=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var DT,a0e=Xe(()=>{DT=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(DT||{})});var mit,jI,aG=Xe(()=>{bt();Sc();Lp();$o();mit=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(e,t,r,s)=>`${r}#commit=${s}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>`npm:${e}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(e,t)=>RQ({protocol:"npm:",source:null,selector:e,params:{__archiveUrl:t}})],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>`npm:${e}`]],jI=class{constructor(t){this.resolver=t;this.resolutions=null}async setup(t,{report:r}){let s=K.join(t.cwd,Ir.loc Line truncated
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`
`),this.stdout.write(`${Gt(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
`),this.suggestInstall&&this.stdout.write(`${Gt(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
`))}formatNameWithHyperlink(r){return Nj(r,{configuration:this.configuration,json:!1})}}});var GI,lG=Xe(()=>{$o();GI=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return!!(r.project.storedResolutions.get(t.descriptorHash)||r.project.originalPackages.has(xQ(t).locatorHash))}supportsLocator(t,r){return!!(r.project.originalPackages.has(t.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(t,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(t,r,s){return t}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,s){let a=s.project.storedResolutions.get(t.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(xQ(t).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let s=r.project.originalPackages.get(t.locatorHash);if(!s)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return s}}});function zp(){}function yit(e,t,r,s,a){for(var n=0,c=t.length,f=0,p=0;n<c;n++){var h=t[n];if(h.removed){if(h.value=e.join(s.slice(p,p+h.count)),p+=h.count,n&&t[n-1].added){var C=t[n-1];t[n-1]=t[n],t[n]=C}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(x,I){var T=s[p+I];return T.length>x.length?T:x}),h.value=e.join(E)}else h.value=e.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=t[c-1];return c>1&&typeof S.value=="string"&&(S.added||S.removed)&&e.equals("",S.value)&&(t[c-2].value+=S.value,t.pop()),t}function Eit(e){return{newPos:e.newPos,components:e.components.slice(0)}}function Iit(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function f0e(e,t,r){return r=Iit(r,{ignoreWhitespace:!0}),pG.diff(e,t,r)}function Cit(e,t,r){return hG.diff(e,t,r)}function PT(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?PT=function(t){return typeof t}:PT=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PT(e)}function cG(e){return vit(e)||Sit(e)||bit(e)||Dit()}function vit(e){if(Array.isArray(e))return uG(e)}function Sit(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function bit(e,t){if(e){if(typeof e=="string")return uG(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uG(e,t)}}function uG(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r<t;r++)s[r]=e[r];return s}function Dit(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fG(e,t,r,s,a){t=t||[],r=r||[],s&&(e=s(a,e));var n;for(n=0;n<t.length;n+=1)if(t[n]===e)return r[n];var c;if(Pit.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),r.push(c),n=0;n<e.length;n+=1)c[n]=fG(e[n],t,r,s,a);return t.pop(),r.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),PT(e)==="object"&&e!==null){t.push(e),c={},r.push(c);var f=[],p;for(p in e)e.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=fG(e[p],t,r,s,p);t.pop(),r.pop()}else c=e;return c}function A0e(e,t,r,s,a,n,c){c||(c={}),typeof c.context>"u"&&(c.context=4);var f=Cit(r,s,c);if(!f)return;f.push({value:"",lines:[]});function p(U){return U.map(function(V){return" "+V})}for(var h=[],E=0,C=0,S=[],x=1,I=1,T=function(V){var $=f[V],ie=$.lines||$.value.replace(/\n$/,"").split(`
`);if($.lines=ie,$.added||$.removed){var fe;if(!E){var ae=f[V-1];E=x,C=I,ae&&(S=c.context>0?p(ae.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(fe=S).push.apply(fe,cG(ie.map(function(me){return($.added?"+":"-")+me}))),$.added?I+=ie.length:x+=ie.length}else{if(E)if(ie.length<=c.context*2&&V<f.length-2){var ge;(ge=S).push.apply(ge,cG(p(ie)))}else{var he,Ce=Math.min(ie.length,c.context);(he=S).push.apply(he,cG(p(ie.slice(0,Ce))));var Ee={oldStart:E,oldLines:x-E+Ce,newStart:C,newLines:I-C+Ce,lines:S};if(V>=f.length-2&&ie.length<=c.context){var d=/\n$/.test(r),Se=/\n$/.test(s),Be=ie.length==0&&S.length>Ee.oldLines;!d&&Be&&r.length>0&&S.splice(Ee.oldLines,0,"\\ No newline at end of file"),(!d&&!Be||!Se)&&S.push("\\ No newline at end of file")}h.push(Ee),E=0,C=0,S=[]}x+=ie.length,I+=ie.length}},O=0;O<f.length;O++)T(O);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:n,hunks:h}}var T_t,c0e,u0e,pG,hG,wit,Bit,Pit,Yv,AG,dG=Xe(()=>{zp.prototype={diff:function(t,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={}),this.options=s;var n=this;function c(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=t.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,t,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function x(){for(var T=-1*h;T<=h;T+=2){var O=void 0,U=C[T-1],V=C[T+1],$=(V?V.newPos:0)-T;U&&(C[T-1]=void 0);var ie=U&&U.newPos+1<f,fe=V&&0<=$&&$<p;if(!ie&&!fe){C[T]=void 0;continue}if(!ie||fe&&U.newPos<V.newPos?(O=Eit(V),n.pushComponent(O.components,void 0,!0)):(O=U,O.newPos++,n.pushComponent(O.components,!0,void 0)),$=n.extractCommon(O,r,t,T),O.newPos+1>=f&&$+1>=p)return c(yit(n,O.components,r,t,n.useLongestToken));C[T]=O}h++}if(a)(function T(){setTimeout(function(){if(h>E)return a();x()||T()},0)})();else for(;h<=E;){var I=x();if(I)return I}},pushComponent:function(t,r,s){var a=t[t.length-1];a&&a.added===r&&a.removed===s?t[t.length-1]={count:a.count+1,added:r,removed:s}:t.push({count:1,added:r,removed:s})},extractCommon:function(t,r,s,a){for(var n=r.length,c=s.length,f=t.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&t.components.push({count:h}),t.newPos=f,p},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],s=0;s<t.length;s++)t[s]&&r.push(t[s]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};T_t=new zp;c0e=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u0e=/\S/,pG=new zp;pG.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!u0e.test(e)&&!u0e.test(t)};pG.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&c0e.test(t[r])&&c0e.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};hG=new zp;hG.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?t[t.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),t.push(a))}return t};wit=new zp;wit.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};Bit=new zp;Bit.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};Pit=Object.prototype.toString,Yv=new zp;Yv.useLongestToken=!0;Yv.tokenize=hG.tokenize;Yv.castInput=function(e){var t=this.options,r=t.undefinedReplacement,s=t.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>"u"?r:c}:s;return typeof e=="string"?e:JSON.stringify(fG(e,null,null,a),a," ")};Yv.equals=function(e,t){return zp.prototype.equals.call(Yv,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};AG=new zp;AG.tokenize=function(e){return e.slice()};AG.join=AG.removeEmpty=function(e){return e}});var xT,p0e=Xe(()=>{Nc();xT=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return this.resolver.supportsDescriptor(t,r)}supportsLocator(t,r){return this.resolver.supportsLocator(t,r)}shouldPersistResolution(t,r){return this.resolver.shouldPersistResolution(t,r)}bindDescriptor(t,r,s){return this.resolver.bindDescriptor(t,r,s)}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,s){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(t,r,s,a){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(t,r){throw new Lt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}}); Line truncated
`;await le.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=t}}});function Fit({project:e,allDescriptors:t,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,x=new Map,I=new Map,T=new Map,O=new Map,U=new Map(e.workspaces.map(ae=>{let ge=ae.anchoredLocator.locatorHash,he=s.get(ge);if(typeof he>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ge,TB(he)]})),V=()=>{let ae=le.mktempSync(),ge=K.join(ae,"stacktrace.log"),he=String(C.length+1).length,Ce=C.map((Ee,d)=>`${`${d+1}.`.padStart(he," ")} ${ml(Ee)}
`).join("");throw le.writeFileSync(ge,Ce),le.detachTemp(ae),new Lt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${Ae.fromPortablePath(ge)}`)},$=ae=>{let ge=r.get(ae.descriptorHash);if(typeof ge>"u")throw new Error("Assertion failed: The resolution should have been registered");let he=s.get(ge);if(!he)throw new Error("Assertion failed: The package could not be found");return he},ie=(ae,ge,he,{top:Ce,optional:Ee})=>{C.length>1e3&&V(),C.push(ge);let d=fe(ae,ge,he,{top:Ce,optional:Ee});return C.pop(),d},fe=(ae,ge,he,{top:Ce,optional:Ee})=>{if(Ee||n.delete(ge.locatorHash),a.has(ge.locatorHash))return;a.add(ge.locatorHash);let d=s.get(ge.locatorHash);if(!d)throw new Error(`Assertion failed: The package (${Vr(e.configuration,ge)}) should have been registered`);let Se=new Set,Be=new Map,me=[],ue=[],Z=[],be=[];for(let Qe of Array.from(d.dependencies.values())){if(d.peerDependencies.has(Qe.identHash)&&d.locatorHash!==Ce)continue;if(Fp(Qe))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Qe.descriptorHash);let ot=Ee;if(!ot){let Re=d.dependenciesMeta.get(fn(Qe));if(typeof Re<"u"){let ct=Re.get(null);typeof ct<"u"&&ct.optional&&(ot=!0)}}let _=r.get(Qe.descriptorHash);if(!_)throw new Error(`Assertion failed: The resolution (${ai(e.configuration,Qe)}) should have been registered`);let tt=U.get(_)||s.get(_);if(!tt)throw new Error(`Assertion failed: The package (${_}, resolved from ${ai(e.configuration,Qe)}) should have been registered`);if(tt.peerDependencies.size===0){ie(Qe,tt,new Map,{top:Ce,optional:ot});continue}let Ne,ke,De=new Set,je=new Map;me.push(()=>{Ne=m8(Qe,ge.locatorHash),ke=y8(tt,ge.locatorHash),d.dependencies.set(Qe.identHash,Ne),r.set(Ne.descriptorHash,ke.locatorHash),t.set(Ne.descriptorHash,Ne),s.set(ke.locatorHash,ke),Qp(T,ke.locatorHash).add(Ne.descriptorHash),Se.add(ke.locatorHash)}),ue.push(()=>{O.set(ke.locatorHash,je);for(let Re of ke.peerDependencies.values()){let Me=$l(Be,Re.identHash,()=>{let P=he.get(Re.identHash)??null,w=d.dependencies.get(Re.identHash);return!w&&NB(ge,Re)&&(ae.identHash===ge.identHash?w=ae:(w=Un(ge,ae.range),t.set(w.descriptorHash,w),r.set(w.descriptorHash,ge.locatorHash),h.delete(w.descriptorHash),P=null)),w||(w=Un(Re,"missing:")),{subject:ge,ident:Re,provided:w,root:!P,requests:new Map,hash:`p${As(ge.locatorHash,Re.identHash).slice(0,6)}`}}).provided;if(Me.range==="missing:"&&ke.dependencies.has(Re.identHash)){ke.peerDependencies.delete(Re.identHash);continue}if(je.set(Re.identHash,{requester:ke,descriptor:Re,meta:ke.peerDependenciesMeta.get(fn(Re)),children:new Map}),ke.dependencies.set(Re.identHash,Me),Fp(Me)){let P=r.get(Me.descriptorHash);Qp(I,P).add(ke.locatorHash)}S.set(Me.identHash,Me),Me.range==="missing:"&&De.add(Me.identHash)}ke.dependencies=new Map(Ks(ke.dependencies,([Re,ct])=>fn(ct)))}),Z.push(()=>{if(!s.has(ke.locatorHash))return;let Re=E.get(tt.locatorHash);typeof Re=="number"&&Re>=2&&V();let ct=E.get(tt.locatorHash),Me=typeof ct<"u"?ct+1:1;E.set(tt.locatorHash,Me),ie(Ne,ke,je,{top:Ce,optional:ot}),E.set(tt.locatorHash,Me-1)}),be.push(()=>{let Re=r.get(Ne.descriptorHash);if(typeof Re>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let ct=O.get(Re);if(typeof ct>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let Me of Be.values()){let P=ct.get(Me.ident.identHash);P&&(Me.requests.set(Ne.descriptorHash,P),p.set(Me.hash,Me),Me.root||he.get(Me.ident.identHash)?.children.set(Ne.descriptorHash,P))}if(s.has(ke.locatorHash))for(let Me of De)ke.dependencies.delete(Me)})}for(let Qe of[...me,...ue])Qe();for(let Qe of Se){Se.delete(Qe);let ot=s.get(Qe),_=As(aI(ot).locatorHash,...Array.from(ot.dependencies.values(),De=>{let je=De.range!=="missing:"?r.get(De.descriptorHash):"missing:";if(typeof je>"u")throw new Error(`Assertion failed: Expected the resolution for ${ai(e.configuration,De)} to have been registered`);return je===Ce?`${je} (top)`:je})),tt=x.get(_);if(typeof tt>"u"){x.set(_,ot);continue}let Ne=Qp(T,tt.locatorHash);for(let De of T.get(ot.locatorHash)??[])r.set(De,tt.locatorHash),Ne.add(De);s.delete(ot.locatorHash),a.delete(ot.locatorHash),Se.delete(ot.locatorHash);let ke=I.get(ot.locatorHash);if(ke!==void 0){let De=Qp(I,tt.locatorHash);for(let je of ke)De.add(je),Se.add(je)}}for(let Qe of[...Z,...be])Qe()};for(let ae of e.workspaces){let ge=ae.anchoredLocator;h.delete(ae.anchoredDescriptor.descriptorHash),ie(ae.anchoredDescriptor,ge,new Map,{top:ge.locatorHash,optional:!1})}for(let ae of p.values()){if(!ae.root)continue;let ge=s.get(ae.subject.locatorHash);if(typeof ge>"u")continue;for(let Ce of ae.requests.values()){let Ee=`p${As(ae.subject.locatorHash,fn(ae.ident),Ce.requester.locatorHash).slice(0,6)}`;c.set(Ee,{subject:ae.subject.locatorHash,requested:ae.ident,rootRequester:Ce.requester.locatorHash,allRequesters:Array.from(_B(Ce),d=>d.requester.locatorHash)})}let he=[..._B(ae)];if(ae.provided.range Line truncated
${[C,S,x].join(`
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let t=K.join(this.cwd,Ir.lockfile),r=this.configuration.get("defaultLanguageName");if(le.existsSync(t)){let s=await le.readFilePromise(t,"utf8");this.lockFileChecksum=g0e(s);let a=us(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<RT;for(let f of Object.keys(a)){if(f==="__metadata")continue;let p=a[f];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Np(p.resolution,!0),E=new _t;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,x=p.linkType.toUpperCase(),I=p.conditions??null,T=E.dependencies,O=E.peerDependencies,U=E.dependenciesMeta,V=E.peerDependenciesMeta,$=E.bin;if(p.checksum!=null){let fe=typeof c<"u"&&!p.checksum.includes("/")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,fe)}let ie={...h,version:C,languageName:S,linkType:x,conditions:I,dependencies:T,peerDependencies:O,dependenciesMeta:U,peerDependenciesMeta:V,bin:$};this.originalPackages.set(ie.locatorHash,ie);for(let fe of f.split(kit)){let ae=B0(fe);n<=6&&(ae=this.configuration.normalizeDependency(ae),ae=Un(ae,ae.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ae.descriptorHash,ae),this.storedResolutions.set(ae.descriptorHash,h.locatorHash)}}}else s.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let t=new Set,r=(0,QT.default)(4),s=async(a,n)=>{if(t.has(n))return a;t.add(n);let c=new qI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(t){let r=this.workspacesByIdent.get(t.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${$i(this.configuration,t.anchoredLocator)}: ${Ae.fromPortablePath(t.cwd)} conflicts with ${Ae.fromPortablePath(r.cwd)}`);this.workspaces.push(t),this.workspacesByCwd.set(t.cwd,t),this.workspacesByIdent.set(t.anchoredLocator.identHash,t)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(t){K.isAbsolute(t)||(t=K.resolve(this.cwd,t)),t=K.normalize(t).replace(/\/+$/,"");let r=this.workspacesByCwd.get(t);return r||null}getWorkspaceByCwd(t){let r=this.tryWorkspaceByCwd(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByFilePath(t){let r=null;for(let s of this.workspaces)K.relative(s.cwd,t).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(t){let r=this.tryWorkspaceByFilePath(t);if(!r)throw new Error(`Workspace not found (${t})`);return r}tryWorkspaceByIdent(t){let r=this.workspacesByIdent.get(t.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(t){let r=this.tryWorkspaceByIdent(t);if(!r)throw new Error(`Workspace not found (${$i(this.configuration,t)})`);return r}tryWorkspaceByDescriptor(t){if(t.range.startsWith(Ii.protocol)){let s=t.range.slice(Ii.protocol.length);if(s!=="^"&&s!=="~"&&s!=="*"&&!yl(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(t);return r===null||(Fp(t)&&(t=FB(t)),!r.accepts(t.range))?null:r}getWorkspaceByDescriptor(t){let r=this.tryWorkspaceByDescriptor(t);if(r===null)throw new Error(`Workspace not found (${ai(this.configuration,t)})`);return r}tryWorkspaceByLocator(t){let r=this.tryWorkspaceByIdent(t);return r===null||(ju(t)&&(t=aI(t)),r.anchoredLocator.locatorHash!==t.locatorHash)?null:r}getWorkspaceByLocator(t){let r=this.tryWorkspaceByLocator(t);if(!r)throw new Error(`Workspace not found (${Vr(this.configuration,t)})`);return r}deleteDescriptor(t){this.storedResolutions.delete(t),this.storedDescriptors.delete(t)}deleteLocator(t){this.originalPackages.delete(t),this.storedPackages.delete(t),this.accessibleLocators.delete(t)}forgetResolution(t){if("descriptorHash"in t){let r=this.storedResolutions.get(t.descriptorHash);this.deleteDescriptor(t.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<"u"&&!s.has(r)&&this.deleteLocator(r)}if("locatorHash"in t){this.deleteLocator(t.locatorHash);for(let[r,s]of this.storedResolutions)s===t.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let t=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=t.shouldPersistResolution(s,{project:this,resolver:t})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let t of this.storedPackages.values())for(let[r,s]of t.dependencies)Fp(s)&&t.depLine truncated
`;switch(tt.type){case 0:Ne+=`# Script name: ${tt.script}
`;break;case 1:Ne+=`# Script code: ${tt.script}
`;break}let ke=null;if(!await le.mktempPromise(async je=>{let Re=K.join(je,"build.log"),{stdout:ct,stderr:Me}=this.configuration.getSubprocessStreams(Re,{header:Ne,prefix:Vr(this.configuration,Z),report:r}),P;try{switch(tt.type){case 0:P=await UR(Z,tt.script,[],{cwd:_,project:this,stdin:ke,stdout:ct,stderr:Me});break;case 1:P=await Oj(Z,tt.script,[],{cwd:_,project:this,stdin:ke,stdout:ct,stderr:Me});break}}catch(y){Me.write(y.stack),P=1}if(ct.end(),Me.end(),P===0)return!0;le.detachTemp(je);let w=`${Vr(this.configuration,Z)} couldn't be built successfully (exit code ${Gt(this.configuration,P,dt.NUMBER)}, logs can be found here: ${Gt(this.configuration,Re,dt.PATH)})`,D=this.optionalBuilds.has(Z.locatorHash);return D?r.reportInfo(9,w):r.reportError(9,w),Spe&&r.reportFold(Ae.fromPortablePath(Re),le.readFileSync(Re,"utf8")),D}))return!1}return!0});me.push(...ot,Promise.allSettled(ot).then(_=>{ie.delete(ue),_.every(tt=>tt.status==="fulfilled"&&tt.value===!0)&&Ee.set(Z.locatorHash,Qe)}))}if(await Mu(me),Be===ie.size){let ue=Array.from(ie).map(Z=>{let be=this.storedPackages.get(Z);if(!be)throw new Error("Assertion failed: The package should have been registered");return Vr(this.configuration,be)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ue})`);break}}this.storedBuildState=Ee,this.skippedBuilds=O}async installWithNewReport(t,r){return(await Ft.start({configuration:this.configuration,json:t.json,stdout:t.stdout,forceSectionAlignment:!0,includeLogs:!t.json&&!t.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(t){let r=this.configuration.get("nodeLinker");Je.telemetry?.reportInstall(r);let s=!1;if(await t.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&t.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{t.report.reportWarning(E,C)},reportError:(E,C)=>{t.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status="inactive";let n=K.join(this.cwd,Ir.lockfile),c=null;if(t.immutable)try{c=await le.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Lt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await t.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(t)}),await t.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{Oit(this,t.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let x=Gt(this.configuration,S,dt.PACKAGE_EXTENSION);switch(S.status){case"inactive":t.report.reportWarning(68,`${x}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":t.report.reportWarning(69,`${x}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=Ig(c,this.generateLockfile());if(E!==c){let C=A0e(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){t.report.reportSeparator();for(let S of C.hunks){t.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let x of S.lines)x.startsWith("+")?t.report.reportError(28,Gt(this.configuration,x,dt.ADDED)):x.startsWith("-")?t.report.reportError(28,Gt(this.configuration,x,dt.REMOVED)):t.report.reportInfo(null,Gt(this.configuration,x,"grey"))}t.report.reportSeparator()}throw new Lt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status==="active"&&Je.telemetry?.reportPackageExtension(Zg(S,dt.PACKAGE_EXTENSION));await t.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(t)});let f=t.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(f.map(async E=>PQ(E,{cwd:this.cwd})));(typeof t.persistProject>"u"||t.persistProject)&&await this.persist(),await t.report.startTimerPromise("Link step",async()=>{if(t.mode==="update-lockfile"){t.report.reportWarning(73,`Skipped due to ${Gt(this.configuration,"mode=update-lockfile",dt.CODE)}`);return}await this.linkEverything(t);let E=await Promise.all(f.map(async C=>PQ(C,{cwd:this.cwd})));for(let C=0;C<f.length;++C)p[C]!==E[C]&&t.report.reportError(64,`The checksum for ${f[C]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await t.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{t.report.r Line truncated
`,`# Manual changes might be lost - proceed with caution!
`].join("")}
`+Al(r)}async persistLockfile(){let t=K.join(this.cwd,Ir.lockfile),r="";try{r=await le.readFilePromise(t,"utf8")}catch{}let s=this.generateLockfile(),a=Ig(r,s);a!==r&&(await le.writeFilePromise(t,a),this.lockFileChecksum=g0e(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let t=[];for(let c of Object.values(yG))t.push(...c);let r=zg(this,t),s=EG.default.serialize(r),a=As(s);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await le.mkdirPromise(K.dirname(n),{recursive:!0}),await le.writeFilePromise(n,await Rit(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:t=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await Tit(await le.readFilePromise(a));n=EG.default.deserialize(c),this.installStateChecksum=As(c)}catch{r&&await this.applyLightResolution();return}t&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,zg(n,yG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,zg(n,yG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let t=(0,QT.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>t(()=>r.persistManifest()))])}async cacheCleanup({cache:t,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let s=new Set([".gitignore"]);if(!F8(t.cwd,this.cwd)||!await le.existsPromise(t.cwd))return null;let a=[];for(let c of await le.readdirPromise(t.cwd)){if(s.has(c))continue;let f=K.resolve(t.cwd,c);t.markedFiles.has(f)||(t.immutable?r.reportError(56,`${Gt(this.configuration,K.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(le.lstatPromise(f).then(async p=>(await le.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function Lit(e){let s=Math.floor(e.timeNow/864e5),a=e.updateInterval*864e5,n=e.state.lastUpdate??e.timeNow+a+Math.floor(a*e.randomInitialInterval),c=n+a,f=e.state.lastTips??s*864e5,p=f+864e5+8*36e5-e.timeZone,h=c<=e.timeNow,E=p<=e.timeNow,C=null;return(h||E||!e.state.lastUpdate||!e.state.lastTips)&&(C={},C.lastUpdate=h?e.timeNow:n,C.lastTips=f,C.blocks=h?{}:e.state.blocks,C.displayedTips=e.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var YI,E0e=Xe(()=>{bt();hv();w0();dR();Qc();Lp();YI=class{constructor(t,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=t;let s=this.getRegistryPath();this.isNew=!le.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(t){let r=new Set(this.displayedTips),s=f=>f&&An?rA(An,f):!1,a=t.map((f,p)=>p).filter(f=>t[f]&&s(t[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),t[c]}reportVersion(t){this.reportValue("version",t.replace(/-git\..*/,"-git"))}reportCommandName(t){this.reportValue("commandName",t||"<none>")}reportPluginName(t){this.reportValue("pluginName",t)}reportProject(t){this.reportEnumerator("projectCount",t)}reportInstall(t){this.reportHit("installCount",t)}reportPackageExtension(t){this.reportValue("packageExtension",t)}reportWorkspaceCount(t){this.reportValue("workspaceCount",String(t))}reportDependencyCount(t){this.reportValue("dependencyCount",String(t))}reportValue(t,r){Qp(this.values,t).add(r)}reportEnumerator(t,r){Qp(this.enumerators,t).add(As(r))}reportHit(t,r="*"){let s=R4(this.hits,t),a=$l(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let t=this.configuration.get("globalFolder");return K.join(t,"telemetry.json")}sendReport(t){let r=this.getRegistryPath(),s;try{s=le.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=Lit({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{le.mkdirSync(K.dirname(r),{recursive:!0}),le.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${t}?ddsource=yarn`,E=C=>$H(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let x=S;x Line truncated
`),h=c.length;for(h>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());h-- >0;)f=r(e.styles[c[h]],f,p);return f},a=(n,c,f)=>{e.styles[n]=t({name:n,codes:c}),(e.keys[f]||(e.keys[f]=[])).push(n),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(h){e.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,e),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=jit,e.hasColor=e.hasAnsi=n=>(e.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&e.ansiRegex.test(n)),e.alias=(n,c)=>{let f=typeof c=="string"?e[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),e.styles[n]=f,f.stack=[n]),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(p){e.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,e),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},e.theme=n=>{if(!Hit(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))e.alias(c,n[c]);return e},e.alias("unstyle",n=>typeof n=="string"&&n!==""?(e.ansiRegex.lastIndex=0,n.replace(e.ansiRegex,"")):""),e.alias("noop",n=>n),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=S0e(),e.define=a,e};BG.exports=b0e();BG.exports.create=b0e});var ia=G(hn=>{"use strict";var Git=Object.prototype.toString,jc=Xu(),D0e=!1,vG=[],P0e={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};hn.longest=(e,t)=>e.reduce((r,s)=>Math.max(r,t?s[t].length:s.length),0);hn.hasColor=e=>!!e&&jc.hasColor(e);var NT=hn.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);hn.nativeType=e=>Git.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"");hn.isAsyncFn=e=>hn.nativeType(e)==="asyncfunction";hn.isPrimitive=e=>e!=null&&typeof e!="object"&&typeof e!="function";hn.resolve=(e,t,...r)=>typeof t=="function"?t.call(e,...r):t;hn.scrollDown=(e=[])=>[...e.slice(1),e[0]];hn.scrollUp=(e=[])=>[e.pop(),...e];hn.reorder=(e=[])=>{let t=e.slice();return t.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),t};hn.swap=(e,t,r)=>{let s=e.length,a=r===s?0:r<0?s-1:r,n=e[t];e[t]=e[a],e[a]=n};hn.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[0]),process.platform==="win32"?r-1:r};hn.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[1]),r};hn.wordWrap=(e,t={})=>{if(!e)return e;typeof t=="number"&&(t={width:t});let{indent:r="",newline:s=`
`+r,width:a=80}=t,n=(s+r).match(/[^\S\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=e.trim(),p=new RegExp(c,"g"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),t.padEnd&&(h=h.map(E=>E.padEnd(a," "))),t.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(s)};hn.unmute=e=>{let t=e.stack.find(s=>jc.keys.color.includes(s));return t?jc[t]:e.stack.find(s=>s.slice(2)==="bg")?jc[t.slice(2)]:s=>s};hn.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"";hn.inverse=e=>{if(!e||!e.stack)return e;let t=e.stack.find(s=>jc.keys.color.includes(s));if(t){let s=jc["bg"+hn.pascal(t)];return s?s.black:e}let r=e.stack.find(s=>s.slice(0,2)==="bg");return r?jc[r.slice(2).toLowerCase()]||e:jc.none};hn.complement=e=>{if(!e||!e.stack)return e;let t=e.stack.find(s=>jc.keys.color.includes(s)),r=e.stack.find(s=>s.slice(0,2)==="bg");if(t&&!r)return jc[P0e[t]||t];if(r){let s=r.slice(2).toLowerCase(),a=P0e[s];return a&&jc["bg"+hn.pascal(a)]||e}return jc.none};hn.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),s=t>=12?"pm":"am";t=t%12;let a=t===0?12:t,n=r<10?"0"+r:r;return a+":"+n+" "+s};hn.set=(e={},t="",r)=>t.split(".").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!hn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},e);hn.get=(e={},t="",r)=>{let s=e[t]==null?t.split(".").reduce((a,n)=>a&&a[n],e):e[t];return s??r};hn.mixin=(e,t)=>{if(!NT(e))return t;if(!NT(t))return e;for(let r of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,r);if(s.hasOwnProperty("value"))if(e.hasOwnProperty(r)&&NT(s.value)){let a=Object.getOwnPropertyDescriptor(e,r);NT(a.value)?e[r]=hn.merge({},e[r],t[r]):Reflect.defineProperty(e,r,s)}else Reflect.defineProperty(e,r,s);else Reflect.defineProperty(e,r,s)}return e};hn.merge=(...e)=>{let t={};for(let r of e)hn.mixin(t,r);return t};hn.mixinEmitter=(e,t)=>{let r=t.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a=="function"?hn.define(e,s,a.bind(t)):hn.define(e,s,a)}};hn.onExit=e=>{let t=(r,s)=>{D0e||(D0e=!0,vG.forEach(a=>a()),r===!0&&process.exit(128+s))};vG.length===0&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),vG.push(e)};hn.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})};hn.defineExport=(e,t,r)=>{let s;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var x0e=G(JI=>{"use strict";JI.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};JI.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};JI.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};JI.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};JI.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var R0e=G((u3t,Q0e)=>{"use strict";var k0e=Ie("readline"),qit=x0e(),Yit=/^(?:\x1b)([a-zA-Z0-9])$/,Wit=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Vit={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function Kit(e){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(e)}function Jit(e){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(e)}var OT=(e="",t={})=>{let r,s={name:t.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e,...t};if(Buffer.isBuffer(e)?e[0]>127&&e[1]===void 0?(e[0]-=128,e="\x1B"+String(e)):e=String(e):e!==void 0&&typeof e!="string"?e=String(e):e||(e=s.sequence||""),s.sequence=s.sequence||e||s.name,e==="\r")s.raw=void 0,s.name="return";else if(e===`
`)s.name="enter";else if(e===" ")s.name="tab";else if(e==="\b"||e==="\x7F"||e==="\x1B\x7F"||e==="\x1B\b")s.name="backspace",s.meta=e.charAt(0)==="\x1B";else if(e==="\x1B"||e==="\x1B\x1B")s.name="escape",s.meta=e.length===2;else if(e===" "||e==="\x1B ")s.name="space",s.meta=e.length===2;else if(e<="")s.name=String.fromCharCode(e.charCodeAt(0)+97-1),s.ctrl=!0;else if(e.length===1&&e>="0"&&e<="9")s.name="number";else if(e.length===1&&e>="a"&&e<="z")s.name=e;else if(e.length===1&&e>="A"&&e<="Z")s.name=e.toLowerCase(),s.shift=!0;else if(r=Yit.exec(e))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Wit.exec(e)){let a=[...e];a[0]==="\x1B"&&a[1]==="\x1B"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=Vit[n],s.shift=Kit(n)||s.shift,s.ctrl=Jit(n)||s.ctrl}return s};OT.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=k0e.createInterface({terminal:!0,input:r});k0e.emitKeypressEvents(r,s);let a=(f,p)=>t(f,OT(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),s.pause(),s.close()}};OT.action=(e,t,r)=>{let s={...qit,...r};return t.ctrl?(t.action=s.ctrl[t.name],t):t.option&&s.option?(t.action=s.option[t.name],t):t.shift?(t.action=s.shift[t.name],t):(t.action=s.keys[t.name],t)};Q0e.exports=OT});var F0e=G((f3t,T0e)=>{"use strict";T0e.exports=e=>{e.timers=e.timers||{};let t=e.options.timers;if(t)for(let r of Object.keys(t)){let s=t[r];typeof s=="number"&&(s={interval:s}),zit(e,r,s)}};function zit(e,t,r={}){let s=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,e.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),e.once("close",()=>s.stop()),s.stop}});var O0e=G((A3t,N0e)=>{"use strict";var{define:Xit,width:Zit}=ia(),SG=class{constructor(t){let r=t.options;Xit(this,"_prompt",t),this.type=t.type,this.name=t.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Zit(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=t.symbols,this.styles=t.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let t={...this};return t.status=this.status,t.buffer=Buffer.from(t.buffer),delete t.clone,t}set color(t){this._color=t}get color(){let t=this.prompt.styles;if(this.cancelled)return t.cancelled;if(this.submitted)return t.submitted;let r=this._color||t[this.status];return typeof r=="function"?r:t.pending}set loading(t){this._loading=t}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};N0e.exports=SG});var M0e=G((p3t,L0e)=>{"use strict";var bG=ia(),wo=Xu(),DG={default:wo.noop,noop:wo.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||bG.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||bG.complement(this.primary)},primary:wo.cyan,success:wo.green,danger:wo.magenta,strong:wo.bold,warning:wo.yellow,muted:wo.dim,disabled:wo.gray,dark:wo.dim.gray,underline:wo.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set placeholder(e){this._placeholder=e},get placeholder(){return this._placeholder||this.primary.dim},set highlight(e){this._highlight=e},get highlight(){return this._highlight||this.inverse}};DG.merge=(e={})=>{e.styles&&typeof e.styles.enabled=="boolean"&&(wo.enabled=e.styles.enabled),e.styles&&typeof e.styles.visible=="boolean"&&(wo.visible=e.styles.visible);let t=bG.merge({},DG,e.styles);delete t.merge;for(let r of Object.keys(wo))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>wo[r]});for(let r of Object.keys(wo.styles))t.hasOwnProperty(r)||Reflect.defineProperty(t,r,{get:()=>wo[r]});return t};L0e.exports=DG});var _0e=G((h3t,U0e)=>{"use strict";var PG=process.platform==="win32",Xp=Xu(),$it=ia(),xG={...Xp.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301", Line truncated
`),h=p[0],E=p[p.length-1],S=(s+(r?" "+r:"")).length,x=S<h.length?h.slice(S+1):"";return{header:c,prompt:h,after:x,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let t=this.state.error||await this.validate(this.value,this.state);if(t!==!0){let r=`
`+this.symbols.pointer+" ";typeof t=="string"?r+=t.trim():r+="Invalid input",this.state.error=`
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(t){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(t))}async close(){this.state.closed=!0;try{let t=this.sections(),r=Math.ceil(t.prompt.length/this.width);t.rest&&this.write(xm.cursor.down(t.rest.length)),this.write(`
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=TG.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:t,options:r,result:s}=this;if(this.format=()=>t.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(t,r)=>{if(this.once("submit",t),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(t,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[t];n.timer=p;let h=a[t]||n[t]||c[t],E=r&&r[t]!=null?r[t]:await h;if(E==="")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[t]?this.resolve(h,n,r,s):C}async prefix(){let t=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,Cl.isObject(t)&&(t=t[s.status]||t.pending),Cl.hasColor(t)?t:(this.styles[s.status]||this.styles.pending)(t)}async message(){let t=await this.element("message");return Cl.hasColor(t)?t:this.styles.strong(t)}async separator(){let t=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=t[s.status]||t.pending||s.separator,n=await this.resolve(a,s);return Cl.isObject(n)&&(n=n[s.status]||n.pending),Cl.hasColor(n)?n:this.styles.muted(n)}async pointer(t,r){let s=await this.element("pointer",t,r);if(typeof s=="string"&&Cl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?"on":"off"]||s,this.state),p=Cl.hasColor(f)?f:c(f);return n?p:" ".repeat(f.length)}}async indicator(t,r){let s=await this.element("indicator",t,r);if(typeof s=="string"&&Cl.hasColor(s))return s;if(s){let a=this.styles,n=t.enabled===!0,c=n?a.success:a.dark,f=s[n?"on":"off"]||s;return Cl.hasColor(f)?f:c(f)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let t=await this.element("hint");return Cl.hasColor(t)?t:this.styles.muted(t)}}error(t){return this.state.submitted?"":t||this.state.error}format(t){return t}result(t){return t}validate(t){return this.options.required===!0?this.isValue(t):!0}isValue(t){return t!=null&&t!==""}resolve(t,...r){return Cl.resolve(this,t,...r)}get base(){return e.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Cl.height(this.stdout,25)}get width(){return this.options.columns||Cl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(t){this.state.cursor=t}get cursor(){return this.state.cursor}set input(t){this.state.input=t}get input(){return this.state.input}set value(t){this.state.value=t}get value(){let{input:t,value:r}=this.state,s=[r,t].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return t=>new this(t).run()}};function lst(e){let t=a=>e[a]===void 0||typeof e[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(e.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=e.options[a];typeof n=="function"&&t(a)?s.includes(a)||(e[a]=n.bind(e)):typeof e[a]!="function"&&(e[a]=n)}}function cst(e){typeof e=="number"&&(e=[e,e,e,e]);let t=[].concat(e||[]),r=a=>a%2===0?`
`:" ",s=[];for(let a=0;a<4;a++){let n=r(a);t[a]?s.push(n.repeat(t[a])):s.push("")}return s}J0e.exports=FG});var Z0e=G((m3t,X0e)=>{"use strict";var ust=ia(),z0e={default(e,t){return t},checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||"",t},input(e,t){throw new Error("input role is not implemented yet")},option(e,t){return z0e.default(e,t)},radio(e,t){throw new Error("radio role is not implemented yet")},separator(e,t){return t.disabled="",t.indicator=[t.indicator," "].find(r=>r!=null),t.message=t.message||e.symbols.line.repeat(5),t},spacer(e,t){return t}};X0e.exports=(e,t={})=>{let r=ust.merge({},z0e,t.roles);return r[e]||r.default}});var Jv=G((y3t,tde)=>{"use strict";var fst=Xu(),Ast=zI(),pst=Z0e(),LT=ia(),{reorder:NG,scrollUp:hst,scrollDown:dst,isObject:$0e,swap:gst}=LT,OG=class extends Ast{constructor(t){super(t),this.cursorHide(),this.maxSelected=t.maxSelected||1/0,this.multiple=t.multiple||!1,this.initial=t.initial||0,this.delay=t.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:t,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(t)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");$0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(t,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(t,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(t,r,s){if(typeof t=="function"&&(t=await t.call(this,this)),t instanceof Promise&&(t=await t),typeof t=="string"&&(t={name:t}),t.normalized)return t;t.normalized=!0;let a=t.value;if(t=pst(t.role,this.options)(this,t),typeof t.disabled=="string"&&!t.hint&&(t.hint=t.disabled,t.disabled=!0),t.disabled===!0&&t.hint==null&&(t.hint="(disabled)"),t.index!=null)return t;t.name=t.name||t.key||t.title||t.value||t.message,t.message=t.message||t.name||"",t.value=[t.value,t.name].find(this.isValue.bind(this)),t.input="",t.index=r,t.cursor=0,LT.define(t,"parent",s),t.level=s?s.level+1:1,t.indent==null&&(t.indent=s?s.indent+" ":t.indent||""),t.path=s?s.path+"."+t.name:t.name,t.enabled=!!(this.multiple&&!this.isDisabled(t)&&(t.enabled||this.isSelected(t))),this.isDisabled(t)||(this.longest=Math.max(this.longest,fst.unstyle(t.message).length));let c={...t};return t.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))t[h]=c[h];t.input=f,t.value=p},a==null&&typeof t.initial=="function"&&(t.input=await t.initial.call(this,this.state,t,r)),t}async onChoice(t,r){this.emit("choice",t,r,this),typeof t.onChoice=="function"&&await t.onChoice.call(this,this.state,t,r)}async addChoice(t,r,s){let a=await this.toChoice(t,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(t,r,s){let a={name:"New choice name?",editable:!0,newChoice:!0,...t},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(t){return t.indent==null?t.level>1?" ".repeat(t.level-1):"":t.indent}dispatch(t,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(t,r){return typeof r!="boolean"&&(r=t.enabled),r&&!t.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=t.index,t.enabled=r&&!this.isDisabled(t),t)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let t=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!t),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(t=>t.enabled=!t.enabled),this.render())}g(t=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(t.parent&&!t.choices?t.parent:t),this.render()):this.a()}toggle(t,r){if(!t.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!t.enabled),t.enabled=r,t.choices&&t. Line truncated
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(`
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(t=>this.styles.primary(t.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:t,size:r}=this.state,s="",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,""].join(" "),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=" "+h),t&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};rde.exports=MG});var ide=G((I3t,nde)=>{"use strict";var yst=Y0(),Est=(e,t)=>{let r=e.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=t(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},UG=class extends yst{constructor(t){super(t),this.cursorShow()}moveCursor(t){this.state.cursor+=t}dispatch(t){return this.append(t)}space(t){return this.options.multiple?super.space(t):this.append(t)}append(t){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+t+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:t,input:r}=this.state;return r?(this.input=r.slice(0,t-1)+r.slice(t),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:t,input:r}=this.state;return r[t]===void 0?this.alert():(this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.complete())}number(t){return this.append(t)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(t=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,t,r);let s=t.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(t=>this.styles.primary(t.message)).join(", ");if(this.state.submitted){let t=this.value=this.input=this.focused.value;return this.styles.primary(t)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let t=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Est(this.input,t),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(t=>t.name)),super.submit()}};nde.exports=UG});var HG=G((C3t,sde)=>{"use strict";var _G=ia();sde.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:s="",pos:a,showCursor:n=!0,color:c}=t,f=c||e.styles.placeholder,p=_G.inverse(e.styles.primary),h=T=>p(e.styles.black(T)),E=r,C=" ",S=h(C);if(e.blink&&e.blink.off===!0&&(h=T=>T,S=""),n&&a===0&&s===""&&r==="")return h(C);if(n&&a===0&&(r===s||r===""))return h(s[0])+f(s.slice(1));s=_G.isPrimitive(s)?`${s}`:"",r=_G.isPrimitive(r)?`${r}`:"";let x=s&&s.startsWith(r)&&s!==r,I=x?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=""),n===!1&&(I=""),x){let T=e.styles.unstyle(E+I);return E+I+f(s.slice(T.length))}return E+I}});var MT=G((w3t,ode)=>{"use strict";var Ist=Xu(),Cst=Y0(),wst=HG(),jG=class extends Cst{constructor(t){super({...t,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(t){return await super.reset(),t===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(t){return!!t&&this.append(t)}append(t){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+t+a.slice(s),r.cursor++,this.render()}delete(){let t=this.focused;if(!t||t.cursor<=0)return this.alert();let{cursor:r,input:s}=t;return t.value=t.input=s.slice(0,r-1)+s.slice(r),t.cursor--,this.render()}deleteForward(){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:s}=t;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return t.value=t.input=a,this.render()}right(){let t=this.focused;return t?t.cursor>=t.input.length?this.alert():(t.cursor++,this.render()):this.alert()}left(){let t=this.focused;return t?t.cursor<=0?this.alert():(t.cursor--,this.render()):this.alert()}space(t,r){return this.dispatch(t,r)}number(t,r){return this.dispatch(t,r)}next(){let t=this.focused;if(!t)return this.alert();let{initial:r,input:s}=t;return r&&r.startsWith(s)&&s!==r?(t.value=t.input=r,t.cursor=t.value.length,this.render()):super.next()}prev(){let t=this.focused;return t?t.cursor===0?super.prev():(t.value=t.input="",t.cursor=0,this.render()):this.alert()}separator(){return""}format(t){return this.state.submitted?"":super.format(t)}pointer(){return""}indicator(t){return t.input?"\u29BF":"\u2299"}async choiceSeparator(t,r){let s=await this.resolve(t.separator,this.state,t,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(t,r){await this.onChoice(t,r);let{state:s,styles:a}=this,{cursor:n,initial:c="",name:f,hint:p,input:h=""}=t,{muted:E,submitted:C,primary:S,danger:x}=a,I=p,T=this.index===r,O=t.validate||(()=>!0),U=await this.choiceSeparator(t,r),V=t.message;this.align==="right"&&(V=V.padStart(this.longest+1," ")),this.align==="left"&&(V=V.padEnd(this.longest+1," "));let $=this.values[f]=h||c,ie=h?"success":"dark";await O.call(t,$,this. Line truncated
`)),this.restore()}set value(t){super.value=t}get value(){return this.cast(super.value)}};Ade.exports=qG});var hde=G((b3t,pde)=>{"use strict";var kst=UT(),YG=class extends kst{constructor(t){super(t),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};pde.exports=YG});var gde=G((D3t,dde)=>{"use strict";var Qst=Y0(),Rst=MT(),XI=Rst.prototype,WG=class extends Qst{constructor(t){super({...t,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(t,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(t==="a"||t==="i")?super[t]():XI.dispatch.call(this,t,r)}append(t,r){return XI.append.call(this,t,r)}delete(t,r){return XI.delete.call(this,t,r)}space(t){return this.focused.editable?this.append(t):super.space()}number(t){return this.focused.editable?this.append(t):super.number(t)}next(){return this.focused.editable?XI.next.call(this):super.next()}prev(){return this.focused.editable?XI.prev.call(this):super.prev()}async indicator(t,r){let s=t.indicator||"",a=t.editable?s:super.indicator(t,r);return await this.resolve(a,this.state,t,r)||""}indent(t){return t.role==="heading"?"":t.editable?" ":" "}async renderChoice(t,r){return t.indent="",t.editable?XI.renderChoice.call(this,t,r):super.renderChoice(t,r)}error(){return""}footer(){return this.state.error}async validate(){let t=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),t=await r.validate(s,this.state),t!==!0)break}return t!==!0&&(this.state.error=typeof t=="string"?t:"Invalid Input"),t}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(t=>t.newChoice))return this.alert();this.value={};for(let t of this.choices){let r=t.parent?this.value[t.parent.name]:this.value;if(t.role==="heading"){this.value[t.name]={};continue}t.editable?r[t.name]=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r[t.name]=t.enabled===!0)}return this.base.submit.call(this)}};dde.exports=WG});var km=G((P3t,mde)=>{"use strict";var Tst=zI(),Fst=HG(),{isPrimitive:Nst}=ia(),VG=class extends Tst{constructor(t){super(t),this.initial=Nst(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(t,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(`
`,r):super.keypress(t,r)}moveCursor(t){this.cursor+=t}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(t,r){if(!t||r.ctrl||r.code)return this.alert();this.append(t)}append(t){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+t+`${s}`.slice(r),this.moveCursor(String(t).length),this.render()}insert(t){this.append(t)}delete(){let{cursor:t,input:r}=this.state;if(t<=0)return this.alert();this.input=`${r}`.slice(0,t-1)+`${r}`.slice(t),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:t,input:r}=this.state;if(r[t]===void 0)return this.alert();this.input=`${r}`.slice(0,t)+`${r}`.slice(t+1),this.render()}cutForward(){let t=this.cursor;if(this.input.length<=t)return this.alert();this.state.clipboard.push(this.input.slice(t)),this.input=this.input.slice(0,t),this.render()}cutLeft(){let t=this.cursor;if(t===0)return this.alert();let r=this.input.slice(0,t),s=this.input.slice(t),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let t=this.initial!=null?String(this.initial):"";if(!t||!t.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(t){return!!t}async format(t=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(t||r):Fst(this,{input:t,initial:r,pos:this.cursor})}async render(){let t=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(" ");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=" "+p),n+=" "+f,this.clear(t),this.write([c,n,h].filter(Boolean).join(`
`)),this.restore()}};mde.exports=VG});var Ede=G((x3t,yde)=>{"use strict";var Ost=e=>e.filter((t,r)=>e.lastIndexOf(t)===r),_T=e=>Ost(e).filter(Boolean);yde.exports=(e,t={},r="")=>{let{past:s=[],present:a=""}=t,n,c;switch(e){case"prev":case"undo":return n=s.slice(0,s.length-1),c=s[s.length-1]||"",{past:_T([r,...n]),present:c};case"next":case"redo":return n=s.slice(1),c=s[0]||"",{past:_T([...n,r]),present:c};case"save":return{past:_T([...s,r]),present:""};case"remove":return c=_T(s.filter(f=>f!==r)),a="",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: "${e}"`)}}});var JG=G((k3t,Cde)=>{"use strict";var Lst=km(),Ide=Ede(),KG=class extends Lst{constructor(t){super(t);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(t){return this.store?(this.data=Ide(t,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Ide("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};Cde.exports=KG});var Bde=G((Q3t,wde)=>{"use strict";var Mst=km(),zG=class extends Mst{format(){return""}};wde.exports=zG});var Sde=G((R3t,vde)=>{"use strict";var Ust=km(),XG=class extends Ust{constructor(t={}){super(t),this.sep=this.options.separator||/, */,this.initial=t.initial||""}split(t=this.value){return t?String(t).split(this.sep):[]}format(){let t=this.state.submitted?this.styles.primary:r=>r;return this.list.map(t).join(", ")}async submit(t){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};vde.exports=XG});var Dde=G((T3t,bde)=>{"use strict";var _st=Y0(),ZG=class extends _st{constructor(t){super({...t,multiple:!0})}};bde.exports=ZG});var e5=G((F3t,Pde)=>{"use strict";var Hst=km(),$G=class extends Hst{constructor(t={}){super({style:"number",...t}),this.min=this.isValue(t.min)?this.toNumber(t.min):-1/0,this.max=this.isValue(t.max)?this.toNumber(t.max):1/0,this.delay=t.delay!=null?t.delay:1e3,this.float=t.float!==!1,this.round=t.round===!0||t.float===!1,this.major=t.major||10,this.minor=t.minor||1,this.initial=t.initial!=null?t.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(t){return!/[-+.]/.test(t)||t==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(t)}number(t){return super.append(t)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(t){let r=t||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(t){let r=t||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(t=this.input){return typeof this.options.format=="function"?this.options.format.call(this,t):this.styles.info(t)}toNumber(t=""){return this.float?+t:Math.round(+t)}isValue(t){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(t)}submit(){let t=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(t||0),super.submit()}};Pde.exports=$G});var kde=G((N3t,xde)=>{xde.exports=e5()});var Rde=G((O3t,Qde)=>{"use strict";var jst=km(),t5=class extends jst{constructor(t){super(t),this.cursorShow()}format(t=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(t.length)):""}};Qde.exports=t5});var Nde=G((L3t,Fde)=>{"use strict";var Gst=Xu(),qst=Jv(),Tde=ia(),r5=class extends qst{constructor(t={}){super(t),this.widths=[].concat(t.messageWidth||50),this.align=[].concat(t.align||"left"),this.linebreak=t.linebreak||!1,this.edgeLength=t.edgeLength||3,this.newline=t.newline||`
`;let r=t.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let t=0;for(let r of this.choices){t=Math.max(t,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],t+3)}async dispatch(t,r){if(this.multiple)return this[r.name]?await this[r.name](t,r):await super.dispatch(t,r);this.alert()}heading(t,r,s){return this.styles.strong(t)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIndex>=this.scale.length-1?this.alert():(t.scaleIndex++,this.render())}left(){let t=this.focused;return t.scaleIndex<=0?this.alert():(t.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(s=>` ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`
`)}renderScaleHeading(t){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,t));let s=this.scaleLength-r.join("").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),f=" ".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(t,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,t,r,s);let a=t.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(t,r){let s=t.scale.map(n=>this.scaleIndicator(t,n,r)),a=this.term==="Hyper"?"":" ";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(t,r){await this.onChoice(t,r);let s=this.index===r,a=await this.pointer(t,r),n=await t.hint;n&&!Tde.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\s+$/,"").padEnd(this.widths[0]," "),f=this.newline,p=this.indent(t),h=await this.resolve(t.message,this.state,t,r),E=await this.renderScale(t,r),C=this.margin[1]+this.margin[3];this.scaleLength=Gst.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let x=Tde.wordWrap(h,{width:this.widths[0],newline:f}).split(`
`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),x=x.map(I=>this.styles.info(I))),x[0]+=E,this.linebreak&&x.push(""),[p+a,x.join(`
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let t=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(t),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(" "))].join(`
`)}async render(){let{submitted:t,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c="";this.options.promptLine!==!1&&(c=[s,n,a,""].join(" "),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),x=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=" "+E),t&&!p&&!C.trim()&&this.multiple&&x!=null&&(c+=this.styles.danger(x)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(`
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIndex;return this.base.submit.call(this)}};Fde.exports=r5});var Mde=G((M3t,Lde)=>{"use strict";var Ode=Xu(),Yst=(e="")=>typeof e=="string"?e.replace(/^['"]|['"]$/g,""):"",i5=class{constructor(t){this.name=t.key,this.field=t.field||{},this.value=Yst(t.initial||this.field.initial||""),this.message=t.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Wst=async(e={},t={},r=s=>s)=>{let s=new Set,a=e.fields||[],n=e.template,c=[],f=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],x=I=>{I.line=h,c.push(I)};for(x({type:"bos",value:""});E<n.length-1;){let I=C();if(/^[^\S\n ]$/.test(I)){x({type:"text",value:I});continue}if(I===`
`){x({type:"newline",value:I}),h++;continue}if(I==="\\"){I+=C(),x({type:"text",value:I});continue}if((I==="$"||I==="#"||I==="{")&&S()==="{"){let O=C();I+=O;let U={type:"template",open:I,inner:"",close:"",value:I},V;for(;V=C();){if(V==="}"){S()==="}"&&(V+=C()),U.value+=V,U.close=V;break}V===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=V),U.value+=V,U.inner+=V}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,t.hasOwnProperty(U.key)&&(U.initial=t[U.key]),U=r(U),x(U),p.push(U.key),s.add(U.key);let $=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),$||($=new i5(U),f.push($)),$.lines.push(U.line-1);continue}let T=c[c.length-1];T.type==="text"&&T.line===h?T.value+=I:x({type:"text",value:I})}return x({type:"eos",value:""}),{input:n,tabstops:c,unique:s,keys:p,items:f}};Lde.exports=async e=>{let t=e.options,r=new Set(t.required===!0?[]:t.required||[]),s={...t.values,...t.initial},{tabstops:a,items:n,keys:c}=await Wst(t,s),f=n5("result",e,t),p=n5("format",e,t),h=n5("validate",e,t,!0),E=e.isValue.bind(e);return async(C={},S=!1)=>{let x=0;C.required=r,C.items=n,C.keys=c,C.output="";let I=async(V,$,ie,fe)=>{let ae=await h(V,$,ie,fe);return ae===!1?"Invalid field "+ie.name:ae};for(let V of a){let $=V.value,ie=V.key;if(V.type!=="template"){$&&(C.output+=$);continue}if(V.type==="template"){let fe=n.find(Ee=>Ee.name===ie);t.required===!0&&C.required.add(fe.name);let ae=[fe.input,C.values[fe.value],fe.value,$].find(E),he=(fe.field||{}).message||V.inner;if(S){let Ee=await I(C.values[ie],C,fe,x);if(Ee&&typeof Ee=="string"||Ee===!1){C.invalid.set(ie,Ee);continue}C.invalid.delete(ie);let d=await f(C.values[ie],C,fe,x);C.output+=Ode.unstyle(d);continue}fe.placeholder=!1;let Ce=$;$=await p($,C,fe,x),ae!==$?(C.values[ie]=ae,$=e.styles.typing(ae),C.missing.delete(he)):(C.values[ie]=void 0,ae=`<${he}>`,$=e.styles.primary(ae),fe.placeholder=!0,C.required.has(ie)&&C.missing.add(he)),C.missing.has(he)&&C.validating&&($=e.styles.warning(ae)),C.invalid.has(ie)&&C.validating&&($=e.styles.danger(ae)),x===C.index&&(Ce!==$?$=e.styles.underline($):$=e.styles.heading(Ode.unstyle($))),x++}$&&(C.output+=$)}let T=C.output.split(`
`).map(V=>" "+V),O=n.length,U=0;for(let V of n)C.invalid.has(V.name)&&V.lines.forEach($=>{T[$][0]===" "&&(T[$]=C.styles.danger(C.symbols.bullet)+T[$].slice(1))}),e.isValue(C.values[V.name])&&U++;return C.completed=(U/O*100).toFixed(0),C.output=T.join(`
`),C.output}};function n5(e,t,r,s){return(a,n,c,f)=>typeof c.field[e]=="function"?c.field[e].call(t,a,n,c,f):[s,a].find(p=>t.isValue(p))}});var _de=G((U3t,Ude)=>{"use strict";var Vst=Xu(),Kst=Mde(),Jst=zI(),s5=class extends Jst{constructor(t){super(t),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Kst(this),await super.initialize()}async reset(t){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},t!==!0&&(await this.initialize(),await this.render())}moveCursor(t){let r=this.getItem();this.cursor+=t,r.cursor+=t}dispatch(t,r){if(!r.code&&!r.ctrl&&t!=null&&this.getItem()){this.append(t,r);return}this.alert()}append(t,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${t}${n}`,this.moveCursor(1),this.render()}delete(){let t=this.getItem();if(this.cursor<=0||!t.input)return this.alert();let r=t.input.slice(this.cursor),s=t.input.slice(0,this.cursor-1);this.input=t.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(t){return t>=this.state.keys.length-1?0:t+1}decrement(t){return t<=0?this.state.keys.length-1:t-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(t){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:t,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,`
`].find(V=>V!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),C=await this.error()||"",S=await this.hint()||"",x=s?"":await this.interpolate(this.state),I=this.state.key=r[t]||"",T=await this.format(I),O=await this.footer();T&&(h+=" "+T),S&&!T&&this.state.completed===0&&(h+=" "+S),this.clear(a);let U=[E,h,x,O,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(t){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:t,missing:r,output:s,values:a}=this.state;if(t.size){let f="";for(let[p,h]of t)f+=`Invalid ${p}: ${h}
`;return this.state.error=f,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let c=Vst.unstyle(s).split(`
`).map(f=>f.slice(1)).join(`
`);return this.value={values:a,result:c},super.submit()}};Ude.exports=s5});var jde=G((_3t,Hde)=>{"use strict";var zst="(Use <shift>+<up/down> to sort)",Xst=Y0(),o5=class extends Xst{constructor(t){super({...t,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,zst].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(t,r){let s=await super.renderChoice(t,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(t=>t.value),super.submit()}};Hde.exports=o5});var qde=G((H3t,Gde)=>{"use strict";var Zst=Jv(),a5=class extends Zst{constructor(t={}){if(super(t),this.emptyError=t.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`
`)}}async toChoices(...t){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...t);for(let s of r)s.scale=$st(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let t=this.focused,r=t.scale[t.scaleIdx],s=r.selected;return t.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let t=this.focused;return t.scaleIdx>=t.scale.length-1?this.alert():(t.scaleIdx++,this.render())}left(){let t=this.focused;return t.scaleIdx<=0?this.alert():(t.scaleIdx--,this.render())}indent(){return" "}async renderChoice(t,r){await this.onChoice(t,r);let s=this.index===r,a=this.term==="Hyper",n=a?9:8,c=a?"":" ",f=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=$=>($?this.styles.success("\u25C9"):"\u25EF")+c,E=r+1+".",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(t.message,this.state,t,r),x=this.indent(t),I=x+t.scale.map(($,ie)=>h(ie===t.scaleIdx)).join(f),T=$=>$===t.scaleIdx?C($):$,O=x+t.scale.map(($,ie)=>T(ie)).join(p),U=()=>[E,S].filter(Boolean).join(" "),V=()=>[U(),I,O," "].filter(Boolean).join(`
`);return s&&(I=this.styles.cyan(I),O=this.styles.cyan(O)),V()}async renderChoices(){if(this.state.submitted)return"";let t=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(t);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:t,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(" ");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=" "+p),h&&!c.includes(h)&&(c+=" "+h),t&&!p&&!E&&this.multiple&&this.type!=="form"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(`
`)),this.restore()}submit(){this.value={};for(let t of this.choices)this.value[t.name]=t.scaleIdx;return this.base.submit.call(this)}};function $st(e,t={}){if(Array.isArray(t.scale))return t.scale.map(s=>({...s}));let r=[];for(let s=1;s<e+1;s++)r.push({i:s,selected:!1});return r}Gde.exports=a5});var Wde=G((j3t,Yde)=>{Yde.exports=JG()});var Kde=G((G3t,Vde)=>{"use strict";var eot=UT(),l5=class extends eot{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(t="",r){switch(t.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let t=s=>this.styles.primary.underline(s);return[this.value?this.disabled:t(this.disabled),this.value?t(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:t}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(" ");this.state.prompt=h,f&&!h.includes(f)&&(h+=" "+f),this.clear(t),this.write([r,h,p].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};Vde.exports=l5});var zde=G((q3t,Jde)=>{"use strict";var tot=Y0(),c5=class extends tot{constructor(t){if(super(t),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(t,r){let s=await super.toChoices(t,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(t){return t.index===this.options.correctChoice}async result(t){return{selectedAnswer:t,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};Jde.exports=c5});var Zde=G(u5=>{"use strict";var Xde=ia(),Ts=(e,t)=>{Xde.defineExport(u5,e,t),Xde.defineExport(u5,e.toLowerCase(),t)};Ts("AutoComplete",()=>ide());Ts("BasicAuth",()=>fde());Ts("Confirm",()=>hde());Ts("Editable",()=>gde());Ts("Form",()=>MT());Ts("Input",()=>JG());Ts("Invisible",()=>Bde());Ts("List",()=>Sde());Ts("MultiSelect",()=>Dde());Ts("Numeral",()=>kde());Ts("Password",()=>Rde());Ts("Scale",()=>Nde());Ts("Select",()=>Y0());Ts("Snippet",()=>_de());Ts("Sort",()=>jde());Ts("Survey",()=>qde());Ts("Text",()=>Wde());Ts("Toggle",()=>Kde());Ts("Quiz",()=>zde())});var ege=G((W3t,$de)=>{$de.exports={ArrayPrompt:Jv(),AuthPrompt:GG(),BooleanPrompt:UT(),NumberPrompt:e5(),StringPrompt:km()}});var Xv=G((V3t,rge)=>{"use strict";var tge=Ie("assert"),A5=Ie("events"),W0=ia(),$u=class extends A5{constructor(t,r){super(),this.options=W0.merge({},t),this.answers={...r}}register(t,r){if(W0.isObject(t)){for(let a of Object.keys(t))this.register(a,t[a]);return this}tge.equal(typeof r,"function","expected a function");let s=t.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(t=[]){for(let r of[].concat(t))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(W0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(t){typeof t=="function"&&(t=await t.call(this));let r=W0.merge({},this.options,t),{type:s,name:a}=t,{set:n,get:c}=W0;if(typeof s=="function"&&(s=await s.call(this,t,this.answers)),!s)return this.answers[a];tge(this.prompts[s],`Prompt "${s}" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",E=>{this.emit("answer",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill==="show"&&await f.submit()):p=f.value=await f.run(),p}use(t){return t.call(this,this),this}set Prompt(t){this._Prompt=t}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(t){this._Prompt=t}static get Prompt(){return this._Prompt||zI()}static get prompts(){return Zde()}static get types(){return ege()}static get prompt(){let t=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(t.emit(...c),n(...c)),a.prompt(r)};return W0.mixinEmitter(t,new A5),t}};W0.mixinEmitter($u,new A5);var f5=$u.prompts;for(let e of Object.keys(f5)){let t=e.toLowerCase(),r=s=>new f5[e](s).run();$u.prompt[t]=r,$u[t]=r,$u[e]||Reflect.defineProperty($u,e,{get:()=>f5[e]})}var zv=e=>{W0.defineExport($u,e,()=>$u.types[e])};zv("ArrayPrompt");zv("AuthPrompt");zv("BooleanPrompt");zv("NumberPrompt");zv("StringPrompt");rge.exports=$u});var uge=G((gHt,uot)=>{uot.exports={name:"@yarnpkg/cli",version:"4.16.0",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-catalog":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-jsr":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspa Line truncated
${V} at ${$}`:`
${V}`}).join("");h.push({text:`Conflict detected in constraint targeting ${ce.pretty(e.configuration,x,ce.Type.CODE)}; conflicting values are:${T}`,fixable:!1})}else{let[[T]]=I,O=xa(S,x);if(JSON.stringify(O)===JSON.stringify(T))continue;if(!s){let U=typeof O>"u"?`Missing field ${ce.pretty(e.configuration,x,ce.Type.CODE)}; expected ${ce.pretty(e.configuration,T,ce.Type.INSPECT)}`:typeof T>"u"?`Extraneous field ${ce.pretty(e.configuration,x,ce.Type.CODE)} currently set to ${ce.pretty(e.configuration,O,ce.Type.INSPECT)}`:`Invalid field ${ce.pretty(e.configuration,x,ce.Type.CODE)}; expected ${ce.pretty(e.configuration,T,ce.Type.INSPECT)}, found ${ce.pretty(e.configuration,O,ce.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof T>"u"?h0(S,x):Jg(S,x,T),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function zge(e,{configuration:t}){let r={children:[]};for(let[s,a]of e){let n=[];for(let f of a){let p=f.text.split(/\n/);f.fixable&&(p[0]=`${ce.pretty(t,"\u2699","gray")} ${p[0]}`),n.push({value:ce.tuple(ce.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:ce.tuple(ce.Type.NO_HINT,h)}))})}let c={value:ce.tuple(ce.Type.LOCATOR,s.anchoredLocator),children:qe.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=qe.sortMap(r.children,s=>s.value[1]),r}var MC,sat,oat,aat,lS=Xe(()=>{Ge();Xl();MC=class{constructor(t){this.indexedFields=t;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let t of this.indexedFields)this.indexes[t]=new Map}insert(t){this.items.push(t);for(let r of this.indexedFields){let s=Object.hasOwn(t,r)?t[r]:void 0;if(typeof s>"u")continue;qe.getArrayWithDefault(this.indexes[r],s).push(t)}return t}find(t){if(typeof t>"u")return this.items;let r=Object.entries(t);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<"u"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},sat=/^[0-9]+$/,oat=/^[a-zA-Z0-9_]+$/,aat=new Set(["scripts",..._t.allDependencies])});var Xge=G(($9t,V5)=>{var uat;(function(e){var t=function(){return{"append/2":[new e.type.Rule(new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("L")]),new e.type.Term("foldl",[new e.type.Term("append",[]),new e.type.Var("X"),new e.type.Term("[]",[]),new e.type.Var("L")]))],"append/3":[new e.type.Rule(new e.type.Term("append",[new e.type.Term("[]",[]),new e.type.Var("X"),new e.type.Var("X")]),null),new e.type.Rule(new e.type.Term("append",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("S")])]),new e.type.Term("append",[new e.type.Var("T"),new e.type.Var("X"),new e.type.Var("S")]))],"member/2":[new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("_")])]),null),new e.type.Rule(new e.type.Term("member",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("_"),new e.type.Var("Xs")])]),new e.type.Term("member",[new e.type.Var("X"),new e.type.Var("Xs")]))],"permutation/2":[new e.type.Rule(new e.type.Term("permutation",[new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("permutation",[new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("T")]),new e.type.Var("S")]),new e.type.Term(",",[new e.type.Term("permutation",[new e.type.Var("T"),new e.type.Var("P")]),new e.type.Term(",",[new e.type.Term("append",[new e.type.Var("X"),new e.type.Var("Y"),new e.type.Var("P")]),new e.type.Term("append",[new e.type.Var("X"),new e.type.Term(".",[new e.type.Var("H"),new e.type.Var("Y")]),new e.type.Var("S")])])]))],"maplist/2":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("X"),new e.type.Var("Xs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("X")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("Xs")])]))],"maplist/3":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Term("[]",[])]),null),new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Term(".",[new e.type.Var("A"),new e.type.Var("As")]),new e.type.Term(".",[new e.type.Var("B"),new e.type.Var("Bs")])]),new e.type.Term(",",[new e.type.Term("call",[new e.type.Var("P"),new e.type.Var("A"),new e.type.Var("B")]),new e.type.Term("maplist",[new e.type.Var("P"),new e.type.Var("As"),new e.type.Var("Bs")])]))],"maplist/4":[new e.type.Rule(new e.type.Term("maplist",[new e.type.Var("_"),new e.type.Term("[]",[]),new e.type.Ter Line truncated
`+p:"")),c.error.method="_execFileSync",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),li.unlinkSync(h),li.unlinkSync(E),li.unlinkSync(C),li.unlinkSync(S),c}function hat(e){var t,r={},s,a={env:process.env,encoding:e.encoding};if(V0||(Tm?process.env.PSModulePath?(V0="powershell.exe",VT=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(V0="cscript.exe",VT=["//nologo",__dirname+"\\read.cs.js"]):(V0="/bin/sh",VT=[__dirname+"/read.sh"])),Tm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),z5.execFileSync){t=rme(e),cS&&cS("execFileSync",t);try{r.input=z5.execFileSync(V0,t,a)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(eme+(s?`
`+s:"")),r.error.method="execFileSync",r.error.program=V0,r.error.args=t,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=pat(e,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),e.display=""),r}function $5(e){var t="",r=e.display,s=!e.display&&e.keyIn&&e.hideEchoBack&&!e.mask;function a(){var n=hat(e);if(n.error)throw n.error;return n.input}return Z5&&Z5(e),function(){var n,c,f;function p(){return n||(n=process.binding("fs"),c=process.binding("constants")),n}if(typeof $p=="string")if($p=null,Tm){if(f=function(h){var E=h.replace(/^\D+/,"").split("."),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),$p=process.stdin.fd,_C=process.stdin._handle;else try{$p=p().open("CONIN$",c.O_RDWR,parseInt("0666",8)),_C=new Zge($p,!0)}catch{}if(process.stdout.isTTY)tf=process.stdout.fd;else{try{tf=li.openSync("\\\\.\\CON","w")}catch{}if(typeof tf!="number")try{tf=p().open("CONOUT$",c.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{$p=li.openSync("/dev/tty","r"),_C=process.stdin._handle}catch{}}else try{$p=li.openSync("/dev/tty","r"),_C=new Zge($p,!1)}catch{}if(process.stdout.isTTY)tf=process.stdout.fd;else try{tf=li.openSync("/dev/tty","w")}catch{}}}(),function(){var n,c,f=!e.hideEchoBack&&!e.keyIn,p,h,E,C,S;KT="";function x(I){return I===$ge?!0:_C.setRawMode(I)!==0?!1:($ge=I,!0)}if(tme||!_C||typeof tf!="number"&&(e.display||!f)){t=a();return}if(e.display&&(li.writeSync(tf,e.display),e.display=""),!e.displayOnly){if(!x(!f)){t=a();return}for(h=e.keyIn?1:e.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),e.keyIn&&e.limit&&(c=new RegExp("[^"+e.limit+"]","g"+(e.caseSensitive?"":"i")));;){E=0;try{E=li.readSync($p,p,0,h)}catch(I){if(I.code!=="EOF"){x(!1),t+=a();return}}if(E>0?(C=p.toString(e.encoding,0,E),KT+=C):(C=`
`,KT+="\0"),C&&typeof(S=(C.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(C=S,n=!0),C&&(C=C.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),C&&c&&(C=C.replace(c,"")),C&&(f||(e.hideEchoBack?e.mask&&li.writeSync(tf,new Array(C.length+1).join(e.mask)):li.writeSync(tf,C)),t+=C),!e.keyIn&&n||e.keyIn&&t.length>=h)break}!f&&!s&&li.writeSync(tf,`
`),x(!1)}}(),e.print&&!s&&e.print(r+(e.displayOnly?"":(e.hideEchoBack?new Array(t.length+1).join(e.mask):t)+`
`),e.encoding),e.displayOnly?"":r9=e.keepWhitespace||e.keyIn?t:t.trim()}function dat(e,t){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!t||t(a))&&r.push(a))}return s(e),r}function n9(e){return e.replace(/[\x00-\x7f]/g,function(t){return"\\x"+("00"+t.charCodeAt().toString(16)).substr(-2)})}function eo(){var e=Array.prototype.slice.call(arguments),t,r;return e.length&&typeof e[0]=="boolean"&&(r=e.shift(),r&&(t=Object.keys(X5),e.unshift(X5))),e.reduce(function(s,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(t=Object.keys(a)),t.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":c=c!=null?c+"":"",c&&n!=="limitMessage"&&(c=c.replace(/[\r\n]/g,"")),s[n]=c;break;case"bufferSize":!isNaN(c=parseInt(c,10))&&typeof c=="number"&&(s[n]=c);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!c;break;case"limit":case"trueValue":case"falseValue":s[n]=dat(c,function(f){var p=typeof f;return p==="string"||p==="number"||p==="function"||f instanceof RegExp}).map(function(f){return typeof f=="string"?f.replace(/[\r\n]/g,""):f});break;case"print":case"phContent":case"preCheck":s[n]=typeof c=="function"?c:void 0;break;case"prompt":case"display":s[n]=c??"";break}})),s},{})}function e9(e,t,r){return t.some(function(s){var a=typeof s;return a==="string"?r?e===s:e.toLowerCase()===s.toLowerCase():a==="number"?parseFloat(e)===s:a==="function"?s(e):s instanceof RegExp?s.test(e):!1})}function i9(e,t){var r=K0.normalize(Tm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return e=K0.normalize(e),t?e.replace(/^~(?=\/|\\|$)/,r):e.replace(new RegExp("^"+n9(r)+"(?=\\/|\\\\|$)",Tm?"i":""),"~")}function HC(e,t){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(c,f,p,h,E,C){var S;return f||typeof(S=t(E))!="string"?p:S?(h||"")+S+(C||""):""}return e.replace(s,n).replace(a,n)}function nme(e,t,r){var s,a=[],n=-1,c=0,f="",p;function h(E,C){return C.length>3?(E.push(C[0]+"..."+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=e.reduce(function(E,C){return E.concat((C+"").split(""))},[]).reduce(function(E,C){var S,x;return t||(C=C.toLowerCase()),S=/^\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(x=C.charCodeAt(0),S&&S===n&&x===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=x),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function ime(e,t){return e.join(e.length>2?", ":t?" / ":"/")}function sme(e,t){var r,s,a={},n;if(t.phContent&&(r=t.phContent(e,t)),typeof r!="string")switch(e){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=t.hasOwnProperty(e)?typeof t[e]=="boolean"?t[e]?"on":"off":t[e]+"":"";break;case"limit":case"trueValue":case"falseValue":s=t[t.hasOwnProperty(e+"Src")?e+"Src":e],t.keyIn?(a=nme(s,t.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f==="string"||f==="number"}),r=ime(s,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=t[t.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||e!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=r9;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),e==="CWD"?r=K0.basename(r):e==="cwdHome"&&(r=i9(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+e.replace(/^./,function(c){return c.toUpperCase()})+"String"]();break;default:typeof(n=(e.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Rm[Rm.length-n]||"")}return r}function ome(e){var t=/^(.)-(.)$/.exec(e),r="",s,a,n,c;if(!t)return null;for(s=t[1].charCodeAt(0),a=t[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function t9(e){var t=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,s="",a=[],n;for(e=e.trim();r=t.exec(e);)n=r[3]||r[4]||"",r[1]&&(a.push(s),s=""),s+=n;return s&&a.push(s),a}function ame(e,t){return t.trueValue.length&&e9(e,t.trueValue,t.caseSensitive)?!0:t.falseValue.length&&e9(e,t.falseValue,t.caseSensitive)?!1:e}function lme(e){var t,r,s,a,n,c,f;function p(E){return sme(E,e)}function h(E){e.display+=(/[^\r\n]$/.test(e.display)?`
`:"")+E}for(e.limitSrc=e.limit,e.displaySrc=e.display,e.limit="",e.display=HC(e.display+"",p);;){if(t=$5(e),r=!1,s="",e.defaultInput&&!t&&(t=e.defaultInput),e.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(t))?(n=Rm[0]||"",a[1]?r=!0:t=n,h(n+`
`),r||(e.displayOnly=!0,$5(e),e.displayOnly=!1)):t&&t!==Rm[Rm.length-1]&&(Rm=[t])),!r&&e.cd&&t)switch(c=t9(t),c[0].toLowerCase()){case"cd":if(c[1])try{process.chdir(i9(c[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&e.preCheck&&(f=e.preCheck(t,e),t=f.res,f.forceNext&&(r=!0)),!r){if(!e.limitSrc.length||e9(t,e.limitSrc,e.caseSensitive))break;e.limitMessage&&(s=HC(e.limitMessage,p))}h((s?s+`
`:"")+HC(e.displaySrc+"",p))}return ame(t,e)}en._DBG_set_useExt=function(e){tme=e};en._DBG_set_checkOptions=function(e){Z5=e};en._DBG_set_checkMethod=function(e){cS=e};en._DBG_clearHistory=function(){r9="",Rm=[]};en.setDefaultOptions=function(e){return X5=eo(!0,e),eo(!0)};en.question=function(e,t){return lme(eo(eo(!0,t),{display:e}))};en.prompt=function(e){var t=eo(!0,e);return t.display=t.prompt,lme(t)};en.keyIn=function(e,t){var r=eo(eo(!0,t),{display:e,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a==="string"||a==="number"}).map(function(s){return HC(s+"",ome)}),r.limit=n9(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c==="string"||c==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=HC(r.display+"",function(s){return sme(s,r)}),ame($5(r),r)};en.questionEMail=function(e,t){return e==null&&(e="Input e-mail address: "),en.question(e,eo({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},t,{keepWhitespace:!1,cd:!1}))};en.questionNewPassword=function(e,t){var r,s,a,n=eo({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},t,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?s+"..."+a:null}}),c,f,p,h,E,C,S;for(t=t||{},c=HC(t.charlist?t.charlist+"":"$<!-~>",ome),(isNaN(s=parseInt(t.min,10))||typeof s!="number")&&(s=12),(isNaN(a=parseInt(t.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+n9(c)+"]{"+s+","+a+"}$"),r=nme([c],n.caseSensitive,!0),r.text=ime(r.values,r.suppressed),f=t.confirmMessage!=null?t.confirmMessage:"Reinput a same one to confirm it: ",p=t.unmatchMessage!=null?t.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",e==null&&(e="Input new password: "),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=en.question(e,n),n.limit=[C,""],n.limitMessage=p,S=en.question(f,n);return C};function cme(e,t,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return en.question(e,eo({limitMessage:"Input valid number, please."},t,{limit:a,cd:!1})),s}en.questionInt=function(e,t){return cme(e,t,function(r){return parseInt(r,10)})};en.questionFloat=function(e,t){return cme(e,t,parseFloat)};en.questionPath=function(e,t){var r,s="",a=eo({hideEchoBack:!1,limitMessage:`$<error(
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},t,{keepWhitespace:!1,limit:function(n){var c,f,p;n=i9(n,!0),s="";function h(E){E.split(/\/|\\/).reduce(function(C,S){var x=K0.resolve(C+=S+K0.sep);if(!li.existsSync(x))li.mkdirSync(x);else if(!li.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return C},"")}try{if(c=li.existsSync(n),r=c?li.realpathSync(n):K0.resolve(n),!t.hasOwnProperty("exists")&&!c||typeof t.exists=="boolean"&&t.exists!==c)return s=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&t.create&&(t.isDirectory?h(r):(h(K0.dirname(r)),li.closeSync(li.openSync(r,"w"))),r=li.realpathSync(r)),c&&(t.min||t.max||t.isFile||t.isDirectory)){if(f=li.statSync(r),t.isFile&&!f.isFile())return s="Not file: "+r,!1;if(t.isDirectory&&!f.isDirectory())return s="Not directory: "+r,!1;if(t.min&&f.size<+t.min||t.max&&f.size>+t.max)return s="Size "+f.size+" is out of range: "+r,!1}if(typeof t.validate=="function"&&(p=t.validate(r))!==!0)return typeof p=="string"&&(s=p),!1}catch(E){return s=E+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:t.hasOwnProperty(n)?t[n]+"":""}});return t=t||{},e==null&&(e='Input path (you can "cd" and "pwd"): '),en.question(e,a),r};function ume(e,t){var r={},s={};return typeof e=="object"?(Object.keys(e).forEach(function(a){typeof e[a]=="function"&&(s[t.caseSensitive?a:a.toLowerCase()]=e[a])}),r.preCheck=function(a){var n;return r.args=t9(a),n=r.args[0]||"",t.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return t.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=t9(a),r.hRes=typeof e=="function"?e.apply(a,r.args):!0,{res:a,forceNext:!1}},r}en.promptCL=function(e,t){var r=eo({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),s=ume(e,r);return r.limit=s.limit,r.preCheck=s.preCheck,en.prompt(r),s.args};en.promptLoop=function(e,t){for(var r=eo({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},t);!e(en.prompt(r)););};en.promptCLLoop=function(e,t){var r=eo({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),s=ume(e,r);for(r.limit=s.limit,r.preCheck=s.preCheck;en.prompt(r),!s.hRes;);};en.promptSimShell=function(e){return en.prompt(eo({hideEchoBack:!1,history:!0},e,{prompt:function(){return Tm?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function fme(e,t,r){var s;return e==null&&(e="Are you sure? "),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=en.keyIn(e,eo(t,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}en.keyInYN=function(e,t){return fme(e,t)};en.keyInYNStrict=function(e,t){return fme(e,t,"yn")};en.keyInPause=function(e,t){e==null&&(e="Continue..."),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s+$/,"")+" (Hit any key)"),en.keyIn(e,eo({limit:null},t,{hideEchoBack:!0,mask:""}))};en.keyInSelect=function(e,t,r){var s=eo({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?e.length+"":p==="firstItem"?(e[0]+"").trim():p==="lastItem"?(e[e.length-1]+"").trim():null}}),a="",n={},c=49,f=`
`;if(!Array.isArray(e)||!e.length||e.length>35)throw"`items` must be Array (max length: 35).";return e.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+="["+E+"] "+(p+"").trim()+`
`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,f+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
`),s.limit=a,f+=`
`,t==null&&(t="Choose one from list: "),(t+="")&&((!r||r.guide!==!1)&&(t=t.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),f+=t),n[en.keyIn(f,s).toLowerCase()]};en.getRawInput=function(){return KT};function uS(e,t){var r;return t.length&&(r={},r[e]=t[0]),en.setDefaultOptions(r)[e]}en.setPrint=function(){return uS("print",arguments)};en.setPrompt=function(){return uS("prompt",arguments)};en.setEncoding=function(){return uS("encoding",arguments)};en.setMask=function(){return uS("mask",arguments)};en.setBufferSize=function(){return uS("bufferSize",arguments)}});var s9=G((tqt,nc)=>{(function(){var e={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,D,y){var F=tau_file_system.files[w];if(!F){if(y==="read")return null;F={path:w,text:"",type:D,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var ee=n(this.text[Math.floor(z/2)],0);return z%2===0?ee&255:ee/256>>>0},put_byte:function(z,X){var ee=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<ee)return null;var se=this.text.length===ee?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(se=se/256>>>0,se=(se&255)<<8|z&255):(se=se&255,se=(z&255)<<8|se&255),this.text.length===ee?this.text+=c(se):this.text=this.text.substring(0,ee)+c(se)+this.text.substring(ee+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(w,D){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,D){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,D,y){var F=Ie("fs"),z=F.openSync(w,y[0]);return y==="read"&&!F.existsSync(w)?null:{get:function(X,ee){var se=new Buffer(X);return F.readSync(z,se,0,X,ee),se.toString()},put:function(X,ee){var se=Buffer.from(X);if(ee==="end_of_file")F.writeSync(z,se);else{if(ee==="past_end_of_file")return null;F.writeSync(z,se,0,se.length,ee)}return!0},get_byte:function(X){return null},put_byte:function(X,ee){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(w,D){for(var y,F=Ame();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,D){return process.stdout.write(w),!0},flush:function(){return!0}};var t;Array.prototype.indexOf?t=function(w,D){return w.indexOf(D)}:t=function(w,D){for(var y=w.length,F=0;F<y;F++)if(D===w[F])return F;return-1};var r=function(w,D){if(w.length!==0){for(var y=w[0],F=w.length,z=1;z<F;z++)y=D(y,w[z]);return y}},s;Array.prototype.map?s=function(w,D){return w.map(D)}:s=function(w,D){for(var y=[],F=w.length,z=0;z<F;z++)y.push(D(w[z]));return y};var a;Array.prototype.filter?a=function(w,D){return w.filter(D)}:a=function(w,D){for(var y=[],F=w.length,z=0;z<F;z++)D(w[z])&&y.push(w[z]);return y};var n;String.prototype.codePointAt?n=function(w,D){return w.codePointAt(D)}:n=function(w,D){return w.charCodeAt(D)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function C(w){var D=[],y=!1;return w.replace(h,function(F,z,X,ee,se,xe,Fe,ut,Ct,Yt,ir,Pt,mn,Pr,Cr,Lr,on){switch(!0){case Ct!==void 0:return D.push(parseInt(Ct,16)),"";case Yt!==void 0:return D.push(parseInt(Yt,8)),"";case ir!==void 0:case Pt!==void 0:case mn!==void 0:case Pr!==void 0:case Cr!==void 0:return D.push(n(F.substr(1),0)),"";case on!==void 0:return D.push(n(on,0)),"";case Lr!==void 0:y=!0;default:return D.push(E[F]),""}}),y?null:D}function S(w,D){var y="";if(w.length<2)return w;try{w=w.replace(/\\([0-7]+)\\/g,function(ee,se){return c(parseInt(se,8))}),w=w.replace(/\\x([0-9a-fA-F]+)\\/g,function(ee,se){return c(parseInt(se,16))})}catch{return null}for(var F=0;F<w.length;F++){var z=w.charAt(F),X=w.charAt(F+1);if(z===D&&X===D)F++,y+=D;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
`,"\r"," ","\v"].indexOf(X)!==-1)switch(F+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function x(w){for(var D="",y=0;y<w.length;y++)switch(w.charAt(y)){case"'":D+="\\'";break;case"\\":D+="\\\\";break;case"\b":D+="\\b";break;case"\f":D+="\\f";break;case`
`:D+="\\n";break;case"\r":D+="\\r";break;case" ":D+="\\t";break;case"\v":D+="\\v";break;default:D+=w.charAt(y);break}return D}function I(w){var D=w.substr(2);switch(w.substr(0,2).toLowerCase()){case"0x":return parseInt(D,16);case"0b":return parseInt(D,2);case"0o":return parseInt(D,8);case"0'":return C(D)[0];default:return parseFloat(w)}}var T={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function O(w,D){return w.get_flag("char_conversion").id==="on"?D.replace(/./g,function(y){return w.get_char_conversion(y)}):D}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var D,y=0,F=0,z=0,X=[],ee=!1;if(w){var se=this.tokens[w-1];y=se.len,D=O(this.thread,this.text.substr(se.len)),F=se.line,z=se.start}else D=this.text;if(/^\s*$/.test(D))return null;for(;D!=="";){var xe=[],Fe=!1;if(/^\n/.exec(D)!==null){F++,z=0,y++,D=D.replace(/\n/,""),ee=!0;continue}for(var ut in T)if(T.hasOwnProperty(ut)){var Ct=T[ut].exec(D);Ct&&xe.push({value:Ct[0],name:ut,matches:Ct})}if(!xe.length)return this.set_last_tokens([{value:D,matches:[],name:"lexical",line:F,start:z}]);var se=r(xe,function(Pr,Cr){return Pr.value.length>=Cr.value.length?Pr:Cr});switch(se.start=z,se.line=F,D=D.replace(se.value,""),z+=se.value.length,y+=se.value.length,se.name){case"atom":se.raw=se.value,se.value.charAt(0)==="'"&&(se.value=S(se.value.substr(1,se.value.length-2),"'"),se.value===null&&(se.name="lexical",se.value="unknown escape sequence"));break;case"number":se.float=se.value.substring(0,2)!=="0x"&&se.value.match(/[.eE]/)!==null&&se.value!=="0'.",se.value=I(se.value),se.blank=Fe;break;case"string":var Yt=se.value.charAt(0);se.value=S(se.value.substr(1,se.value.length-2),Yt),se.value===null&&(se.name="lexical",se.value="unknown escape sequence");break;case"whitespace":var ir=X[X.length-1];ir&&(ir.space=!0),Fe=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(se=X.pop(),se.name="atom",se.value="{}",se.raw="{}",se.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(se=X.pop(),se.name="atom",se.value="[]",se.raw="[]",se.space=!1);break}se.len=y,X.push(se),Fe=!1}var Pt=this.set_last_tokens(X);return Pt.length===0?null:Pt};function V(w,D,y,F,z){if(!D[y])return{type:f,value:P.error.syntax(D[y-1],"expression expected",!0)};var X;if(F==="0"){var ee=D[y];switch(ee.name){case"number":return{type:p,len:y+1,value:new P.type.Num(ee.value,ee.float)};case"variable":return{type:p,len:y+1,value:new P.type.Var(ee.value)};case"string":var se;switch(w.get_flag("double_quotes").id){case"atom":se=new _(ee.value,[]);break;case"codes":se=new _("[]",[]);for(var xe=ee.value.length-1;xe>=0;xe--)se=new _(".",[new P.type.Num(n(ee.value,xe),!1),se]);break;case"chars":se=new _("[]",[]);for(var xe=ee.value.length-1;xe>=0;xe--)se=new _(".",[new P.type.Term(ee.value.charAt(xe),[]),se]);break}return{type:p,len:y+1,value:se};case"l_paren":var Pt=V(w,D,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:D[Pt.len]&&D[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:f,derived:!0,value:P.error.syntax(D[Pt.len]?D[Pt.len]:D[Pt.len-1],") or operator expected",!D[Pt.len])};case"l_bracket":var Pt=V(w,D,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:D[Pt.len]&&D[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new _("{}",[Pt.value]),Pt):{type:f,derived:!0,value:P.error.syntax(D[Pt.len]?D[Pt.len]:D[Pt.len-1],"} or operator expected",!D[Pt.len])}}var Fe=$(w,D,y,z);return Fe.type===p||Fe.derived||(Fe=ie(w,D,y),Fe.type===p||Fe.derived)?Fe:{type:f,derived:!1,value:P.error.syntax(D[y],"unexpected token")}}var ut=w.__get_max_priority(),Ct=w.__get_next_priority(F),Yt=y;if(D[y].name==="atom"&&D[y+1]&&(D[y].space||D[y+1].name!=="l_paren")){var ee=D[y++],ir=w.__lookup_operator_classes(F,ee.value);if(ir&&ir.indexOf("fy")>-1){var Pt=V(w,D,y,F,z);if(Pt.type!==f)return ee.value==="-"&&!ee.space&&P.type.is_number(Pt.value)?{value:new P.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new P.type.Term(ee.value,[Pt.value]),len:Pt.len,type:p};X=Pt}else if(ir&&ir.indexOf("fx")>-1){var Pt=V(w,D,y,Ct,z);if(Pt.type!==f)return{value:new P.type.Term(ee.value,[Pt.value]),len:Pt.len,type:p};X=Pt}}y=Yt;var Pt=V(w,D,y,Ct,z);if(Pt.type===p){y=Pt.len;var ee=D[y];if(D[y]&&(D[y].name==="atom"&&w.__lookup_operator_classes(F,ee.value)||D[y].name==="bar"&&w.__lookup_operator_classes(F,"|"))){var mn=Ct,Pr=F,ir=w.__lookup_operator_classes(F,ee.value);ifLine truncated
`;D+=`
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)D+=this.rules[key][y].toString(w),D+=`
`;return D},be.prototype.clone=function(){return new be(this.id)},Qe.prototype.clone=function(){return new Qe(this.value,this.is_float)},_.prototype.clone=function(){return new _(this.id,s(this.args,function(w){return w.clone()}))},Ne.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},ke.prototype.clone=function(){var w={};for(var D in this.links)this.links.hasOwnProperty(D)&&(w[D]=this.links[D].clone());return new ke(w)},De.prototype.clone=function(){return new De(this.goal.clone(),this.substitution.clone(),this.parent)},je.prototype.clone=function(){return new je(this.head.clone(),this.body!==null?this.body.clone():null)},be.prototype.equals=function(w){return P.type.is_variable(w)&&this.id===w.id},Qe.prototype.equals=function(w){return P.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},_.prototype.equals=function(w){if(!P.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var D=0;D<this.args.length;D++)if(!this.args[D].equals(w.args[D]))return!1;return!0},Ne.prototype.equals=function(w){return P.type.is_stream(w)&&this.id===w.id},ke.prototype.equals=function(w){var D;if(!P.type.is_substitution(w))return!1;for(D in this.links)if(this.links.hasOwnProperty(D)&&(!w.links[D]||!this.links[D].equals(w.links[D])))return!1;for(D in w.links)if(w.links.hasOwnProperty(D)&&!this.links[D])return!1;return!0},De.prototype.equals=function(w){return P.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},je.prototype.equals=function(w){return P.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},be.prototype.rename=function(w){return w.get_free_variable(this)},Qe.prototype.rename=function(w){return this},_.prototype.rename=function(w){return new _(this.id,s(this.args,function(D){return D.rename(w)}))},Ne.prototype.rename=function(w){return this},je.prototype.rename=function(w){return new je(this.head.rename(w),this.body!==null?this.body.rename(w):null)},be.prototype.variables=function(){return[this.id]},Qe.prototype.variables=function(){return[]},_.prototype.variables=function(){return[].concat.apply([],s(this.args,function(w){return w.variables()}))},Ne.prototype.variables=function(){return[]},je.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},be.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Qe.prototype.apply=function(w){return this},_.prototype.apply=function(w){if(this.indicator==="./2"){for(var D=[],y=this;y.indicator==="./2";)D.push(y.args[0].apply(w)),y=y.args[1];for(var F=y.apply(w),z=D.length-1;z>=0;z--)F=new _(".",[D[z],F]);return F}return new _(this.id,s(this.args,function(X){return X.apply(w)}),this.ref)},Ne.prototype.apply=function(w){return this},je.prototype.apply=function(w){return new je(this.head.apply(w),this.body!==null?this.body.apply(w):null)},ke.prototype.apply=function(w){var D,y={};for(D in this.links)this.links.hasOwnProperty(D)&&(y[D]=this.links[D].apply(w));return new ke(y)},_.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},_.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new _(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new _(",",[w,this.args[1]]):w},_.prototype.search=function(w){if(P.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var D=0;D<this.args.length;D++)if(P.type.is_term(this.args[D])&&this.args[D].search(w))return!0;return!1},Re.prototype.get_current_input=function(){return this.current_input},ct.prototype.get_current_input=function(){return this.session.get_current_input()},Re.prototype.get_current_output=function(){return this.current_output},ct.prototype.get_current_output=function(){return this.session.get_current_output()},Re.prototype.set_current_input=function(w){this.current_input=w},ct.prototype.set_current_input=function(w){return this.session.set_current_input(w)},Re.prototype.set_current_output=function(w){this.current_input=w},ct.prototype.set_current_output=function(w){return this.session.set_current_output(w)},Re.prototype.get_stream_by_alias=function(w){return this.streams[w]},ct.prototype.get_stream_by_alias=function(w){return this.session.get_stream_by_alias(w)},Re.prototype.file_system_open=function(w,D,y){return this.file_system.open(w,D,y)},ct.prototype.file_system_open=function(w,D,y){return this.session.file_system_open(w,D,y)},Re.prototype.get_char_conversion=function(w){return this.__char_conversion[w]||w},ct.prototype.get_char_conversion=function(w){return this.session.get_char_conversion(w)},Re.prototype.parse=function(w){return this.thread.parse(w)},ct.prototype.parse=function(w){var D=new U(this);D.new_text(w);var y=D.get_tokens();if(y===null)return!1;var F=V(this,y,0,this.__get_max_priority(),!1);return F Line truncated
`,[])])])),D.substitution,D)])},"nl/1":function(w,D,y){var F=y.args[0];w.prepend([new De(D.goal.replace(new _("put_char",[F,new _(`
`,[])])),D.substitution,D)])},"get_byte/1":function(w,D,y){var F=y.args[0];w.prepend([new De(D.goal.replace(new _(",",[new _("current_input",[new be("S")]),new _("get_byte",[new be("S"),F])])),D.substitution,D)])},"get_byte/2":function(w,D,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))w.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")w.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var ee;if(X.position==="end_of_stream")ee="end_of_file",X.position="past_end_of_stream";else{if(ee=X.stream.get_byte(X.position),ee===null){w.throw_error(P.error.representation("byte",y.indicator));return}X.position++}w.prepend([new De(D.goal.replace(new _("=",[new Qe(ee,!1),z])),D.substitution,D)])}},"peek_byte/1":function(w,D,y){var F=y.args[0];w.prepend([new De(D.goal.replace(new _(",",[new _("current_input",[new be("S")]),new _("peek_byte",[new be("S"),F])])),D.substitution,D)])},"peek_byte/2":function(w,D,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))w.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")w.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var ee;if(X.position==="end_of_stream")ee="end_of_file",X.position="past_end_of_stream";else if(ee=X.stream.get_byte(X.position),ee===null){w.throw_error(P.error.representation("byte",y.indicator));return}w.prepend([new De(D.goal.replace(new _("=",[new Qe(ee,!1),z])),D.substitution,D)])}},"put_byte/1":function(w,D,y){var F=y.args[0];w.prepend([new De(D.goal.replace(new _(",",[new _("current_output",[new be("S")]),new _("put_byte",[new be("S"),F])])),D.substitution,D)])},"put_byte/2":function(w,D,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);P.type.is_variable(F)||P.type.is_variable(z)?w.throw_error(P.error.instantiation(y.indicator)):P.type.is_byte(z)?!P.type.is_variable(F)&&!P.type.is_stream(F)&&!P.type.is_atom(F)?w.throw_error(P.error.domain("stream_or_alias",F,y.indicator)):!P.type.is_stream(X)||X.stream===null?w.throw_error(P.error.existence("stream",F,y.indicator)):X.input?w.throw_error(P.error.permission("output","stream",F,y.indicator)):X.type==="text"?w.throw_error(P.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,w.success(D)):w.throw_error(P.error.type("byte",z,y.indicator))},"read/1":function(w,D,y){var F=y.args[0];w.prepend([new De(D.goal.replace(new _(",",[new _("current_input",[new be("S")]),new _("read_term",[new be("S"),F,new _("[]",[])])])),D.substitution,D)])},"read/2":function(w,D,y){var F=y.args[0],z=y.args[1];w.prepend([new De(D.goal.replace(new _("read_term",[F,z,new _("[]",[])])),D.substitution,D)])},"read_term/2":function(w,D,y){var F=y.args[0],z=y.args[1];w.prepend([new De(D.goal.replace(new _(",",[new _("current_input",[new be("S")]),new _("read_term",[new be("S"),F,z])])),D.substitution,D)])},"read_term/3":function(w,D,y){var F=y.args[0],z=y.args[1],X=y.args[2],ee=P.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(P.type.is_variable(F)||P.type.is_variable(X))w.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_list(X))w.throw_error(P.error.type("list",X,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))w.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(ee)||ee.stream===null)w.throw_error(P.error.existence("stream",F,y.indicator));else if(ee.output)w.throw_error(P.error.permission("input","stream",F,y.indicator));else if(ee.type==="binary")w.throw_error(P.error.permission("input","binary_stream",F,y.indicator));else if(ee.position==="past_end_of_stream"&&ee.eof_action==="error")w.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{for(v Line truncated
`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;t+=`workspace(${z0(s)}).
`,t+=`workspace_ident(${z0(s)}, ${z0(j.stringifyIdent(r.anchoredLocator))}).
`,t+=`workspace_version(${z0(s)}, ${z0(r.manifest.version)}).
`;for(let a of yme)for(let n of r.manifest[a].values())t+=`workspace_has_dependency(${z0(s)}, ${z0(j.stringifyIdent(n))}, ${z0(n.range)}, ${a}).
`}return t+=`workspace(_) :- false.
`,t+=`workspace_ident(_, _) :- false.
`,t+=`workspace_version(_, _) :- false.
`,t+=`workspace_has_dependency(_, _, _, _) :- false.
`,t}getDeclarations(){let t="";return t+=`gen_enforced_dependency(_, _, _, _) :- false.
`,t+=`gen_enforced_field(_, _, _) :- false.
`,t}get fullSource(){return`${this.getProjectDatabase()}
${this.source}
${this.getDeclarations()}`}createSession(){return new a9(this.project,this.fullSource)}async processClassic(){let t=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(t),enforcedFields:await this.genEnforcedFields(t)}}async process(){let{enforcedDependencies:t,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of t){let p=aS([f,j.stringifyIdent(n)]),h=qe.getMapWithDefault(s,a.cwd);qe.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=aS(n),p=qe.getMapWithDefault(s,a.cwd);qe.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(t){let r=[];for await(let s of t.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=K.resolve(this.project.cwd,Fm(s.links.WorkspaceCwd)),n=Fm(s.links.DependencyIdent),c=Fm(s.links.DependencyRange),f=Fm(s.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=j.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return qe.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>j.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>j.stringifyIdent(s)])}async genEnforcedFields(t){let r=[];for await(let s of t.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=K.resolve(this.project.cwd,Fm(s.links.WorkspaceCwd)),n=Fm(s.links.FieldPath),c=Eat(s.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return qe.sortMap(r,[({workspace:s})=>j.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(t){let r=this.createSession();for await(let s of r.makeQuery(t)){let a={};for(let[n,c]of Object.entries(s.links))n!=="_"&&(a[n]=Fm(c));yield a}}}});var kme=G(ZT=>{"use strict";Object.defineProperty(ZT,"__esModule",{value:!0});function DS(e){let t=[...e.caches],r=t.shift();return r===void 0?xme():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>DS({caches:t}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>DS({caches:t}).set(s,a))},delete(s){return r.delete(s).catch(()=>DS({caches:t}).delete(s))},clear(){return r.clear().catch(()=>DS({caches:t}).clear())}}}function xme(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}ZT.createFallbackableCache=DS;ZT.createNullCache=xme});var Rme=G((MWt,Qme)=>{Qme.exports=kme()});var Tme=G(w9=>{"use strict";Object.defineProperty(w9,"__esModule",{value:!0});function Mat(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}w9.createInMemoryCache=Mat});var Nme=G((_Wt,Fme)=>{Fme.exports=Tme()});var Lme=G(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});function Uat(e,t,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===B9.WithinHeaders?s:{}},queryParameters(){return e===B9.WithinQueryParameters?s:{}}}}function _at(e){let t=0,r=()=>(t++,new Promise(s=>{setTimeout(()=>{s(e(r))},Math.min(100*t,1e3))}));return e(r)}function Ome(e,t=(r,s)=>Promise.resolve()){return Object.assign(e,{wait(r){return Ome(e.then(s=>Promise.all([t(s,r),s])).then(s=>s[1]))}})}function Hat(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[r],e[r]=s}return e}function jat(e,t){return t&&Object.keys(t).forEach(r=>{e[r]=t[r](e)}),e}function Gat(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}var qat="4.22.1",Yat=e=>()=>e.transporter.requester.destroy(),B9={WithinQueryParameters:0,WithinHeaders:1};rf.AuthMode=B9;rf.addMethods=jat;rf.createAuth=Uat;rf.createRetryablePromise=_at;rf.createWaitablePromise=Ome;rf.destroy=Yat;rf.encode=Gat;rf.shuffle=Hat;rf.version=qat});var PS=G((jWt,Mme)=>{Mme.exports=Lme()});var Ume=G(v9=>{"use strict";Object.defineProperty(v9,"__esModule",{value:!0});var Wat={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};v9.MethodEnum=Wat});var xS=G((qWt,_me)=>{_me.exports=Ume()});var tye=G(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});var jme=xS();function S9(e,t){let r=e||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","head Line truncated
`;f!==s&&(s=f,e.write(ZEe.default.eraseLines(r)+f),r=f.split(`
`).length)};return n.clear=()=>{e.write(ZEe.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,t||($Ee.default.show(),a=!1)},n};HS.default={create:_ut}});var rIe=G((RVt,Hut)=>{Hut.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"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:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var sIe=G(ic=>{"use strict";var iIe=rIe(),pA=process.env;Object.defineProperty(ic,"_vendors",{value:iIe.map(function(e){return e.constant})});ic.name=null;ic.isPR=null;iIe.forEach(function(e){var t=Array.isArray(e.env)?e.env:[e.env],r=t.every(function(s){return nIe(s)});if(ic[e.constant]=r,r)switch(ic.name=e.name,typeof e.pr){case"string":ic.isPR=!!pA[e.pr];break;case"object":"env"in e.pr?ic.isPR=e.pr.env in pA&&pA[e.pr.env]!==e.pr.ne:"any"in e.pr?ic.isPR=e.pr.any.some(function(s){return!!pA[s]}):ic.isPR=nIe(e.pr);break;default:ic.isPR=null}});ic.isCI=!!(pA.CI||pA.CONTINUOUS_INTEGRATION||pA.BUILD_NUMBER||pA.RUN_ID||ic.name);function nIe(e){return typeof e=="string"?!!pA[e]:Object.keys(e).every(function(t){return pA[t]===e[t]})}});var aIe=G((FVt,oIe)=>{"use strict";oIe.exports=sIe().isCI});var cIe=G((NVt,lIe)=>{"use strict";var jut=e=>{let t=new Set;do for(let r of Reflect.ownKeys(e))t.add([e,r]);while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t};lIe.exports=(e,{include:t,exclude:r}={})=>{let s=a=>{let n=c=>typeof c=="string"?a===c:c.test(a);return t?t.some(n):r?!r.some(n):!0};for(let[a,n]of jut(e.constructor.prototype)){if(n==="constructor"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value=="function"&&(e[n]=e[n].bind(e))}return e}});var dIe=G(zn=>{"use strict";var uw,qS,yF,uq;typeof performance=="object"&&typeof performance.now=="function"?(uIe=performance,zn.unstable_now=function(){return uIe.now()}):(iq=Date,fIe=iq.now(),zn.unstable_now=function(){return iq.now()-fIe});var uIe,iq,fIe;typeof window>"u"||typeof MessageChannel!="function"?(cw=null,sq=null,oq=function(){if(cw!==null)try{var e=zn.unstable_now();cw(!0,e),cw=null}catch(t){throw setTimeout(oq,0),t}},uw=function(e){cw!==null?setTimeout(uw,0,e):(cw=e,setTimeout(oq,0))},qS=function(e,t){sq=setTimeout(e,t)},yF=function(){clearTimeout(sq)},zn.unstable_shouldYield=function(){return!1},uq=zn.unstable_forceFrameRate=function(){}):(AIe=window.setTimeout,pIe=window.clearTimeout,typeof console<"u"&&(hIe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof hIe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),jS=!1,GS=null,dF=-1,aq=5,lq=0,zn.unstable_shouldYield=function(){return zn.unstable_now()>=lq},uq=function(){},zn.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):aq=0<e?Math Line truncated
`+uu+v}var we=!1;function Ot(v,b){if(!v||we)return"";we=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error()},Object.defineProperty(b.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(b,[])}catch(ht){var H=ht}Reflect.construct(v,[],b)}else{try{b.call()}catch(ht){H=ht}v.call(b.prototype)}else{try{throw Error()}catch(ht){H=ht}v()}}catch(ht){if(ht&&H&&typeof ht.stack=="string"){for(var W=ht.stack.split(`
`),ne=H.stack.split(`
`),ve=W.length-1,_e=ne.length-1;1<=ve&&0<=_e&&W[ve]!==ne[_e];)_e--;for(;1<=ve&&0<=_e;ve--,_e--)if(W[ve]!==ne[_e]){if(ve!==1||_e!==1)do if(ve--,_e--,0>_e||W[ve]!==ne[_e])return`
`+W[ve].replace(" at new "," at ");while(1<=ve&&0<=_e);break}}}finally{we=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?cc(v):""}var uc=[],Oi=-1;function fo(v){return{current:v}}function Tt(v){0>Oi||(v.current=uc[Oi],uc[Oi]=null,Oi--)}function Rn(v,b){Oi++,uc[Oi]=v.current,v.current=b}var ha={},Gi=fo(ha),Li=fo(!1),Ya=ha;function yn(v,b){var Q=v.type.contextTypes;if(!Q)return ha;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===b)return H.__reactInternalMemoizedMaskedChildContext;var W={},ne;for(ne in Q)W[ne]=b[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=b,v.__reactInternalMemoizedMaskedChildContext=W),W}function Zn(v){return v=v.childContextTypes,v!=null}function fu(){Tt(Li),Tt(Gi)}function Eh(v,b,Q){if(Gi.current!==ha)throw Error(c(168));Rn(Gi,b),Rn(Li,Q)}function Wa(v,b,Q){var H=v.stateNode;if(v=b.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var W in H)if(!(W in v))throw Error(c(108,d(b)||"Unknown",W));return s({},Q,H)}function Va(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||ha,Ya=Gi.current,Rn(Gi,v),Rn(Li,Li.current),!0}function Ka(v,b,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=Wa(v,b,Ya),H.__reactInternalMemoizedMergedChildContext=v,Tt(Li),Tt(Gi),Rn(Gi,v)):Tt(Li),Rn(Li,Q)}var $e=null,Ja=null,mf=n.unstable_now;mf();var fc=0,Sn=8;function da(v){if(1&v)return Sn=15,1;if(2&v)return Sn=14,2;if(4&v)return Sn=13,4;var b=24&v;return b!==0?(Sn=12,b):v&32?(Sn=11,32):(b=192&v,b!==0?(Sn=10,b):v&256?(Sn=9,256):(b=3584&v,b!==0?(Sn=8,b):v&4096?(Sn=7,4096):(b=4186112&v,b!==0?(Sn=6,b):(b=62914560&v,b!==0?(Sn=5,b):v&67108864?(Sn=4,67108864):v&134217728?(Sn=3,134217728):(b=805306368&v,b!==0?(Sn=2,b):1073741824&v?(Sn=1,1073741824):(Sn=8,v))))))}function _A(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function HA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function ga(v,b){var Q=v.pendingLanes;if(Q===0)return Sn=0;var H=0,W=0,ne=v.expiredLanes,ve=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,W=Sn=15;else if(ne=Q&134217727,ne!==0){var ht=ne&~ve;ht!==0?(H=da(ht),W=Sn):(_e&=ne,_e!==0&&(H=da(_e),W=Sn))}else ne=Q&~ve,ne!==0?(H=da(ne),W=Sn):_e!==0&&(H=da(_e),W=Sn);if(H===0)return 0;if(H=31-ss(H),H=Q&((0>H?0:1<<H)<<1)-1,b!==0&&b!==H&&!(b&ve)){if(da(b),W<=Sn)return b;Sn=W}if(b=v.entangledLanes,b!==0)for(v=v.entanglements,b&=H;0<b;)Q=31-ss(b),W=1<<Q,H|=v[Q],b&=~W;return H}function Ql(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Ut(v,b){switch(v){case 15:return 1;case 14:return 2;case 12:return v=Tn(24&~b),v===0?Ut(10,b):v;case 10:return v=Tn(192&~b),v===0?Ut(8,b):v;case 8:return v=Tn(3584&~b),v===0&&(v=Tn(4186112&~b),v===0&&(v=512)),v;case 2:return b=Tn(805306368&~b),b===0&&(b=268435456),b}throw Error(c(358,v))}function Tn(v){return v&-v}function ma(v){for(var b=[],Q=0;31>Q;Q++)b.push(v);return b}function za(v,b,Q){v.pendingLanes|=b;var H=b-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,b=31-ss(b),v[b]=Q}var ss=Math.clz32?Math.clz32:pc,Ac=Math.log,Au=Math.LN2;function pc(v){return v===0?32:31-(Ac(v)/Au|0)|0}var Xa=n.unstable_runWithPriority,Mi=n.unstable_scheduleCallback,vs=n.unstable_cancelCallback,Rl=n.unstable_shouldYield,yf=n.unstable_requestPaint,hc=n.unstable_now,Bi=n.unstable_getCurrentPriorityLevel,Fn=n.unstable_ImmediatePriority,dc=n.unstable_UserBlockingPriority,ze=n.unstable_NormalPriority,at=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},te=yf!==void 0?yf:function(){},ye=null,Oe=null,mt=!1,Et=hc(),Dt=1e4>Et?hc:function(){return hc()-Et};function tr(){switch(Bi()){case Fn:return 99;case dc:return 98;case ze:return 97;case at:return 96;case St:return 95;default:throw Error(c(332))}}function pn(v){switch(v){case 99:return Fn;case 98:return dc;case 97:return ze;case 96:return at;case 95:return St;default:throw Error(c(332))}}function ui(v,b){return v=pn(v),Xa(v,b)}function qi(v,b,Q){return v=pn(v),Mi(v,b,Q)}function Nn(){if(Oe!==null){var v=Oe;Oe=null,vs(v)}Za()}function Za(){if(!mt&&ye!==null){mt=!0;var v=0;try{var b=ye;ui(99,function(){for(;v<b.length;v++){var Q=b[v];do Q=Q(!0);while(Q!==null)}}),ye=null}catch(Q){throw ye!==null&&(ye=ye.slice(v+1)),Mi(Fn,Nn),Q}finally{mt=!1}}}var By=f.ReactCurrentBatchConfig;function J1(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var Qo=typeof Object.is=="function"?Object.is:J1,vy=Object.prototype.hasOwnProperty;function Ih(v,b){if(Qo(v,b))return!0;if(typeof v!="object"||v===null||typeof b!="object"||b===null)return!1;var Q=Object.keys(v),H=Object.keys(b);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!vy.call(b,Q[H])||!Qo(v[Q[H]],b[Q[H]]))return!1;return!0}function z1(v){switch(v.tag){case 5:return cc(v.type);case 16:return cc("Lazy" Line truncated
Error generating stack: `+ne.message+`
`+ne.stack}return{value:v,source:b,stack:W}}function Kd(v,b){try{console.error(b.value)}catch(Q){setTimeout(function(){throw Q})}}var RL=typeof WeakMap=="function"?WeakMap:Map;function t2(v,b,Q){Q=Fl(-1,Q),Q.tag=3,Q.payload={element:null};var H=b.value;return Q.callback=function(){Wy||(Wy=!0,d2=H),Kd(v,b)},Q}function Jd(v,b,Q){Q=Fl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var W=b.value;Q.payload=function(){return Kd(v,b),H(W)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(mc===null?mc=new Set([this]):mc.add(this),Kd(v,b));var ve=b.stack;this.componentDidCatch(b.value,{componentStack:ve!==null?ve:""})}),Q}var TL=typeof WeakSet=="function"?WeakSet:Set;function r2(v){var b=v.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(Q){Rf(v,Q)}else b.current=null}function Ny(v,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=b.stateNode,b=v.getSnapshotBeforeUpdate(b.elementType===b.type?Q:Ro(b.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=b}return;case 3:F&&b.flags&256&&Ns(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Th(v,b){if(b=b.updateQueue,b=b!==null?b.lastEffect:null,b!==null){var Q=b=b.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==b)}}function hP(v,b,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(b=Q.updateQueue,b=b!==null?b.lastEffect:null,b!==null){v=b=b.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==b)}if(b=Q.updateQueue,b=b!==null?b.lastEffect:null,b!==null){v=b=b.next;do{var W=v;H=W.next,W=W.tag,W&4&&W&1&&(PP(Q,v),jL(Q,v)),v=H}while(v!==b)}return;case 1:v=Q.stateNode,Q.flags&4&&(b===null?v.componentDidMount():(H=Q.elementType===Q.type?b.memoizedProps:Ro(Q.type,b.memoizedProps),v.componentDidUpdate(H,b.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),b=Q.updateQueue,b!==null&&Dy(Q,b,v);return;case 3:if(b=Q.updateQueue,b!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Qe(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Dy(Q,b,v)}return;case 5:v=Q.stateNode,b===null&&Q.flags&4&&ao(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:X&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&cu(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function dP(v,b){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;b?mh(H):co(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,b?yh(H):qn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function Oy(v,b){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount($e,b)}catch{}switch(b.tag){case 0:case 11:case 14:case 15:case 22:if(v=b.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,W=H.destroy;if(H=H.tag,W!==void 0)if(H&4)PP(b,Q);else{H=b;try{W()}catch(ne){Rf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(r2(b),v=b.stateNode,typeof v.componentWillUnmount=="function")try{v.props=b.memoizedProps,v.state=b.memoizedState,v.componentWillUnmount()}catch(ne){Rf(b,ne)}break;case 5:r2(b);break;case 4:F?EP(v,b):z&&z&&(b=b.stateNode.containerInfo,v=ou(b),NA(b,v))}}function gP(v,b){for(var Q=b;;)if(Oy(v,Q),Q.child===null||F&&Q.tag===4){if(Q===b)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===b)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Ly(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function mP(v){return v.tag===5||v.tag===3||v.tag===4}function yP(v){if(F){e:{for(var b=v.return;b!==null;){if(mP(b))break e;b=b.return}throw Error(c(160))}var Q=b;switch(b=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:b=b.containerInfo,H=!0;break;case 4:b=b.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(df(b),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||mP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?n2(v,Q,b):i2(v,Q,b)}}function n2(v,b,Q){var H=v.tag,W=H===5||H===6;if(W)v=W?v.stateNode:v.stateNode.instance,b?lo(Q,v,b):Do(Q,v);else if(H!==4&&(v=v.child,v!==null))for(n2(v,b,Q),v=v.sibling;v!==null;)n2(v,b,Q),v=v.sibling}function i2(v,b,Q){var H=v.tag,W=H===5||H===6;if(W)v=W?v.stateNode:v.stateNode.instance,b?ji(Q,v,b):ci(Q,v);els Line truncated
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}bs!==5&&(bs=2),ht=Vd(ht,_e),Zt=ve;do{switch(Zt.tag){case 3:ne=ht,Zt.flags|=4096,b&=-b,Zt.lanes|=b;var ri=t2(Zt,ne,b);by(Zt,ri);break e;case 1:ne=ht;var Rr=Zt.type,On=Zt.stateNode;if(!(Zt.flags&64)&&(typeof Rr.getDerivedStateFromError=="function"||On!==null&&typeof On.componentDidCatch=="function"&&(mc===null||!mc.has(On)))){Zt.flags|=4096,b&=-b,Zt.lanes|=b;var jn=Jd(Zt,ne,b);by(Zt,jn);break e}}Zt=Zt.return}while(Zt!==null)}DP(Q)}catch(Xr){b=Xr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function SP(){var v=qy.current;return qy.current=kt,v===null?kt:v}function sg(v,b){var Q=xr;xr|=16;var H=SP();po===v&&Ms===b||Lh(v,b);do try{ML();break}catch(W){vP(v,W)}while(!0);if(Nd(),xr=Q,qy.current=H,Xi!==null)throw Error(c(261));return po=null,Ms=0,bs}function ML(){for(;Xi!==null;)bP(Xi)}function UL(){for(;Xi!==null&&!Rl();)bP(Xi)}function bP(v){var b=QP(v.alternate,v,tp);v.memoizedProps=v.pendingProps,b===null?DP(v):Xi=b,l2.current=null}function DP(v){var b=v;do{var Q=b.alternate;if(v=b.return,b.flags&2048){if(Q=QL(b),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=kL(Q,b,tp),Q!==null){Xi=Q;return}if(Q=b,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||tp&1073741824||!(Q.mode&4)){for(var H=0,W=Q.child;W!==null;)H|=W.lanes|W.childLanes,W=W.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=b.firstEffect),b.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=b.firstEffect),v.lastEffect=b.lastEffect),1<b.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=b:v.firstEffect=b,v.lastEffect=b))}if(b=b.sibling,b!==null){Xi=b;return}Xi=b=v}while(b!==null);bs===0&&(bs=5)}function rp(v){var b=tr();return ui(99,_L.bind(null,v,b)),null}function _L(v,b){do Bu();while(eg!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,W=H,ne=v.pendingLanes&~W;v.pendingLanes=W,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=W,v.mutableReadLanes&=W,v.entangledLanes&=W,W=v.entanglements;for(var ve=v.eventTimes,_e=v.expirationTimes;0<ne;){var ht=31-ss(ne),Wt=1<<ht;W[ht]=0,ve[ht]=-1,_e[ht]=-1,ne&=~Wt}if(Cu!==null&&!(H&24)&&Cu.has(v)&&Cu.delete(v),v===po&&(Xi=po=null,Ms=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){W=xr,xr|=32,l2.current=null,ng=tt(v.containerInfo),ig=!1,sr=H;do try{HL()}catch(Ye){if(sr===null)throw Error(c(330));Rf(sr,Ye),sr=sr.nextEffect}while(sr!==null);ng=null,sr=H;do try{for(ve=v;sr!==null;){var Sr=sr.flags;if(Sr&16&&F&&df(sr.stateNode),Sr&128){var Mr=sr.alternate;if(Mr!==null){var Zt=Mr.ref;Zt!==null&&(typeof Zt=="function"?Zt(null):Zt.current=null)}}switch(Sr&1038){case 2:yP(sr),sr.flags&=-3;break;case 6:yP(sr),sr.flags&=-3,s2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,s2(sr.alternate,sr);break;case 4:s2(sr.alternate,sr);break;case 8:_e=ve,ne=sr,F?EP(_e,ne):gP(_e,ne);var $n=ne.alternate;Ly(ne),$n!==null&&Ly($n)}sr=sr.nextEffect}}catch(Ye){if(sr===null)throw Error(c(330));Rf(sr,Ye),sr=sr.nextEffect}while(sr!==null);ig&&ut(),Ne(v.containerInfo),v.current=Q,sr=H;do try{for(Sr=v;sr!==null;){var Ei=sr.flags;if(Ei&36&&hP(Sr,sr.alternate,sr),Ei&128){Mr=void 0;var sl=sr.ref;if(sl!==null){var rt=sr.stateNode;switch(sr.tag){case 5:Mr=Qe(rt);break;default:Mr=rt}typeof sl=="function"?sl(Mr):sl.current=Mr}}sr=sr.nextEffect}}catch(Ye){if(sr===null)throw Error(c(330));Rf(sr,Ye),sr=sr.nextEffect}while(sr!==null);sr=null,te(),xr=W}else v.current=Q;if(Qf)Qf=!1,eg=v,tg=b;else for(sr=H;sr!==null;)b=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(Ei=sr,Ei.sibling=null,Ei.stateNode=null),sr=b;if(H=v.pendingLanes,H===0&&(mc=null),H===1?v===y2?rg++:(rg=0,y2=v):rg=0,Q=Q.stateNode,Ja&&typeof Ja.onCommitFiberRoot=="function")try{Ja.onCommitFiberRoot($e,Q,void 0,(Q.current.flags&64)===64)}catch{}if(Ca(v,Dt()),Wy)throw Wy=!1,v=d2,d2=null,v;return xr&8||Nn(),null}function HL(){for(;sr!==null;){var v=sr.alternate;ig||ng===null||(sr.flags&8?be(sr,ng)&&(ig=!0,Fe()):sr.tag===13&&FL(v,sr)&&be(sr,ng)&&(ig=!0,Fe()));var b=sr.flags;b&256&&Ny(v,sr),!(b&512)||Qf||(Qf=!0,qi(97,function(){return Bu(),null})),sr=sr.nextEffect}}function Bu(){if(tg!==90){var v=97<tg?97:tg;return tg=90,ui(v,qL)}return!1}function jL(v,b){g2.push(b,v),Qf||(Qf=!0,qi(97,function(){return Bu(),null}))}function PP(v,b){m2.push(b,v),Qf||(Qf=!0,qi(97,function(){return Bu(),null}))}function qL(){if(eg===null)return!1;var v=eg;if(eg=null,xr&48)throw Error(c(331));var b=xr;xr|=32;var Q=m2;m2=[];for(var H=0;H<Q.length;H+=2){var W=Q[H],ne=Q[H+1],ve=W.destroy;if(W.destroy=void 0,typeof ve=="function")try{ve()}catch(ht){if(ne===null)throw Error(c(330));Rf(ne,ht)}}for(Q=g2,g2=[],H=0;H<Q.length;H+=2){W=Q[H],ne=Q[H+1];try{va Line truncated
`+(H.join(" > ")+`
No matching component was found for:
`)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Qe(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:JL,findFiberByHostInstance:v.findFiberByHostInstance||zL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.isDisabled&&b.supportsFiber)try{$e=b.inject(v),Ja=b}catch{}v=!0}return v},r.observeVisibleRects=function(v,b,Q,H){if(!Yt)throw Error(c(363));v=a2(v,b);var W=on(v,Q,H).disconnect;return{disconnect:function(){W()}}},r.registerMutableSourceForHydration=function(v,b){var Q=b._getVersion;Q=Q(b._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[b,Q]:v.mutableSourceEagerHydrationData.push(b,Q)},r.runWithPriority=function(v,b){var Q=fc;try{return fc=v,b()}finally{fc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,b){var Q=xr;xr&=-2,xr|=8;try{return v(b)}finally{xr=Q,xr===0&&(kf(),Nn())}},r.updateContainer=function(v,b,Q,H){var W=b.current,ne=Lo(),ve=Ds(W);e:if(Q){Q=Q._reactInternals;t:{if(Se(Q)!==Q||Q.tag!==1)throw Error(c(170));var _e=Q;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(Zn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(c(171))}if(Q.tag===1){var ht=Q.type;if(Zn(ht)){Q=Wa(Q,ht,_e);break e}}Q=_e}else Q=ha;return b.context===null?b.context=Q:b.pendingContext=Q,b=Fl(ne,ve),b.payload={element:v},H=H===void 0?null:H,H!==null&&(b.callback=H),Nl(W,b),_l(W,ve,ne),ve},r}});var EIe=G((UVt,yIe)=>{"use strict";yIe.exports=mIe()});var CIe=G((_Vt,IIe)=>{"use strict";var Yut={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};IIe.exports=Yut});var SIe=G((HVt,vIe)=>{"use strict";var Wut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},CF=function(){function e(t,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,s){return r&&e(t.prototype,r),s&&e(t,s),t}}();function gq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var sf=CIe(),Vut=function(){function e(t,r,s,a,n,c){mq(this,e),this.left=t,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return CF(e,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),e}(),wIe=function(){CF(e,null,[{key:"fromJS",value:function(r){var s=r.width,a=r.height;return new e(s,a)}}]);function e(t,r){mq(this,e),this.width=t,this.height=r}return CF(e,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toStri Line truncated
`+Module.extraStackTrace()),demangleAll(e)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t();continue}var r=t.func;typeof r=="number"?t.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(t.arg===void 0?null:t.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}Module.addOnPreRun=addOnPreRun;function addOnInit(e){__ATINIT__.unshift(e)}Module.addOnInit=addOnInit;function addOnPreMain(e){__ATMAIN__.unshift(e)}Module.addOnPreMain=addOnPreMain;function addOnExit(e){__ATEXIT__.unshift(e)}Module.addOnExit=addOnExit;function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(e,t,r){var s=r>0?r:lengthBytesUTF8(e)+1,a=new Array(s),n=stringToUTF8Array(e,a,0,a.length);return t&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(e){for(var t=[],r=0;r<e.length;r++){var s=e[r];s>255&&(s&=255),t.push(String.fromCharCode(s))}return t.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(e,t,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,a;r&&(a=t+lengthBytesUTF8(e),s=HEAP8[a]),stringToUTF8(e,t,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(e,t){HEAP8.set(e,t)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(e,t,r){for(var s=0;s<e.length;++s)HEAP8[t++>>0]=e.charCodeAt(s);r||(HEAP8[t>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function e(t,r){var s=t>>>16,a=t&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(e){return froundBuffer[0]=e,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(e){e=e>>>0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.cei Line truncated
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+e+") at "+stackTrace()+t;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,e)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var _m=G((GVt,DIe)=>{"use strict";var Kut=SIe(),Jut=bIe(),yq=!1,Eq=null;Jut({},function(e,t){if(!yq){if(yq=!0,e)throw e;Eq=t}});if(!yq)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");DIe.exports=Kut(Eq.bind,Eq.lib)});var Cq=G((qVt,Iq)=>{"use strict";var PIe=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Iq.exports=PIe;Iq.exports.default=PIe});var kIe=G((YVt,xIe)=>{"use strict";xIe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E Line truncated
`))t=Math.max(t,$ut(r));return t};Bq.exports=RIe;Bq.exports.default=RIe});var TIe=G(KS=>{"use strict";var eft=KS&&KS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(KS,"__esModule",{value:!0});var tft=eft(vq()),Sq={};KS.default=e=>{if(e.length===0)return{width:0,height:0};if(Sq[e])return Sq[e];let t=tft.default(e),r=e.split(`
`).length;return Sq[e]={width:t,height:r},{width:t,height:r}}});var FIe=G(JS=>{"use strict";var rft=JS&&JS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(JS,"__esModule",{value:!0});var kn=rft(_m()),nft=(e,t)=>{"position"in t&&e.setPositionType(t.position==="absolute"?kn.default.POSITION_TYPE_ABSOLUTE:kn.default.POSITION_TYPE_RELATIVE)},ift=(e,t)=>{"marginLeft"in t&&e.setMargin(kn.default.EDGE_START,t.marginLeft||0),"marginRight"in t&&e.setMargin(kn.default.EDGE_END,t.marginRight||0),"marginTop"in t&&e.setMargin(kn.default.EDGE_TOP,t.marginTop||0),"marginBottom"in t&&e.setMargin(kn.default.EDGE_BOTTOM,t.marginBottom||0)},sft=(e,t)=>{"paddingLeft"in t&&e.setPadding(kn.default.EDGE_LEFT,t.paddingLeft||0),"paddingRight"in t&&e.setPadding(kn.default.EDGE_RIGHT,t.paddingRight||0),"paddingTop"in t&&e.setPadding(kn.default.EDGE_TOP,t.paddingTop||0),"paddingBottom"in t&&e.setPadding(kn.default.EDGE_BOTTOM,t.paddingBottom||0)},oft=(e,t)=>{var r;"flexGrow"in t&&e.setFlexGrow((r=t.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in t&&e.setFlexShrink(typeof t.flexShrink=="number"?t.flexShrink:1),"flexDirection"in t&&(t.flexDirection==="row"&&e.setFlexDirection(kn.default.FLEX_DIRECTION_ROW),t.flexDirection==="row-reverse"&&e.setFlexDirection(kn.default.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection==="column"&&e.setFlexDirection(kn.default.FLEX_DIRECTION_COLUMN),t.flexDirection==="column-reverse"&&e.setFlexDirection(kn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in t&&(typeof t.flexBasis=="number"?e.setFlexBasis(t.flexBasis):typeof t.flexBasis=="string"?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(NaN)),"alignItems"in t&&((t.alignItems==="stretch"||!t.alignItems)&&e.setAlignItems(kn.default.ALIGN_STRETCH),t.alignItems==="flex-start"&&e.setAlignItems(kn.default.ALIGN_FLEX_START),t.alignItems==="center"&&e.setAlignItems(kn.default.ALIGN_CENTER),t.alignItems==="flex-end"&&e.setAlignItems(kn.default.ALIGN_FLEX_END)),"alignSelf"in t&&((t.alignSelf==="auto"||!t.alignSelf)&&e.setAlignSelf(kn.default.ALIGN_AUTO),t.alignSelf==="flex-start"&&e.setAlignSelf(kn.default.ALIGN_FLEX_START),t.alignSelf==="center"&&e.setAlignSelf(kn.default.ALIGN_CENTER),t.alignSelf==="flex-end"&&e.setAlignSelf(kn.default.ALIGN_FLEX_END)),"justifyContent"in t&&((t.justifyContent==="flex-start"||!t.justifyContent)&&e.setJustifyContent(kn.default.JUSTIFY_FLEX_START),t.justifyContent==="center"&&e.setJustifyContent(kn.default.JUSTIFY_CENTER),t.justifyContent==="flex-end"&&e.setJustifyContent(kn.default.JUSTIFY_FLEX_END),t.justifyContent==="space-between"&&e.setJustifyContent(kn.default.JUSTIFY_SPACE_BETWEEN),t.justifyContent==="space-around"&&e.setJustifyContent(kn.default.JUSTIFY_SPACE_AROUND))},aft=(e,t)=>{var r,s;"width"in t&&(typeof t.width=="number"?e.setWidth(t.width):typeof t.width=="string"?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),"height"in t&&(typeof t.height=="number"?e.setHeight(t.height):typeof t.height=="string"?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),"minWidth"in t&&(typeof t.minWidth=="string"?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth((r=t.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in t&&(typeof t.minHeight=="string"?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight((s=t.minHeight)!==null&&s!==void 0?s:0))},lft=(e,t)=>{"display"in t&&e.setDisplay(t.display==="flex"?kn.default.DISPLAY_FLEX:kn.default.DISPLAY_NONE)},cft=(e,t)=>{if("borderStyle"in t){let r=typeof t.borderStyle=="string"?1:0;e.setBorder(kn.default.EDGE_TOP,r),e.setBorder(kn.default.EDGE_BOTTOM,r),e.setBorder(kn.default.EDGE_LEFT,r),e.setBorder(kn.default.EDGE_RIGHT,r)}};JS.default=(e,t={})=>{nft(e,t),ift(e,t),sft(e,t),oft(e,t),aft(e,t),lft(e,t),cft(e,t)}});var LIe=G((zVt,OIe)=>{"use strict";var zS=VS(),uft=yk(),fft=ak(),Dq=new Set(["\x1B","\x9B"]),Aft=39,NIe=e=>`${Dq.values().next().value}[${e}m`,pft=e=>e.split(" ").map(t=>zS(t)),bq=(e,t,r)=>{let s=[...t],a=!1,n=zS(uft(e[e.length-1]));for(let[c,f]of s.entries()){let p=zS(f);if(n+p<=r?e[e.length-1]+=f:(e.push(f),n=0),Dq.has(f))a=!0;else if(a&&f==="m"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(e.push(""),n=0))}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},hft=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(zS(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},dft=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let s="",a="",n,c=pft(e),f=[""];for(let[p,h]of e.split(" ").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=zS(f[f.length-1]);if(p!==0&&(E>=t&&(r.wordWrap===!1||r.trim===!1)&&(f.push(""),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=" ",E++)),r.hard&&c[p]>t){let C=t-E,S=1+Math.floor((c[p]-C-1)/t);Math.floor((c[p]-1)/t)<S&&f.push(""),bq(f,h,t);continue}if(E+c[p]>t&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<t){bq(f,h,t);continue}f.push("")}if(E+c[p]>t&&r.wordWrap===!1){bq(f,h,t);continue}f[f. Line truncated
`);for(let[p,h]of[...s].entries()){if(a+=h,Dq.has(h)){let C=parseFloat(/\d[^m]*/.exec(s.slice(p,p+4)));n=C===Aft?null:C}let E=fft.codes.get(Number(n));n&&E&&(s[p+1]===`
`?a+=NIe(E):h===`
`&&(a+=NIe(n)))}return a};OIe.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
`).split(`
`).map(s=>dft(s,t,r)).join(`
`)});var _Ie=G((XVt,UIe)=>{"use strict";var MIe="[\uD800-\uDBFF][\uDC00-\uDFFF]",gft=e=>e&&e.exact?new RegExp(`^${MIe}$`):new RegExp(MIe,"g");UIe.exports=gft});var Pq=G((ZVt,qIe)=>{"use strict";var mft=Cq(),yft=_Ie(),HIe=ak(),GIe=["\x1B","\x9B"],wF=e=>`${GIe[0]}[${e}m`,jIe=(e,t,r)=>{let s=[];e=[...e];for(let a of e){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let c=HIe.codes.get(parseInt(a,10));if(c){let f=e.indexOf(c.toString());f>=0?e.splice(f,1):s.push(wF(t?c:n))}else if(t){s.push(wF(0));break}else s.push(wF(n))}if(t&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=wF(HIe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join("")};qIe.exports=(e,t,r)=>{let s=[...e.normalize()],a=[];r=typeof r=="number"?r:s.length;let n=!1,c,f=0,p="";for(let[h,E]of s.entries()){let C=!1;if(GIe.includes(E)){let S=/\d[^m]*/.exec(e.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E==="m"&&(n=!1,C=!0);if(!n&&!C&&++f,!yft({exact:!0}).test(E)&&mft(E.codePointAt())&&++f,f>t&&f<=r)p+=E;else if(f===t&&!n&&c!==void 0)p=jIe(a);else if(f>=r){p+=jIe(a,!0,c);break}}return p}});var WIe=G(($Vt,YIe)=>{"use strict";var ed=Pq(),Eft=VS();function BF(e,t,r){if(e.charAt(t)===" ")return t;for(let s=1;s<=3;s++)if(r){if(e.charAt(t+s)===" ")return t+s}else if(e.charAt(t-s)===" ")return t-s;return t}YIe.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c="\u2026",f=1;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return c;let p=Eft(e);if(p<=t)return e;if(s==="start"){if(n){let h=BF(e,p-t+1,!0);return c+ed(e,h,p).trim()}return a===!0&&(c+=" ",f=2),c+ed(e,p-t+f,p)}if(s==="middle"){a===!0&&(c=" "+c+" ",f=3);let h=Math.floor(t/2);if(n){let E=BF(e,h),C=BF(e,p-(t-h)+1,!0);return ed(e,0,E)+c+ed(e,C,p).trim()}return ed(e,0,h)+c+ed(e,p-(t-h)+f,p)}if(s==="end"){if(n){let h=BF(e,t-1);return ed(e,0,h)+c}return a===!0&&(c=" "+c,f=2),ed(e,0,t-f)+c}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var kq=G(XS=>{"use strict";var VIe=XS&&XS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(XS,"__esModule",{value:!0});var Ift=VIe(LIe()),Cft=VIe(WIe()),xq={};XS.default=(e,t,r)=>{let s=e+String(t)+String(r);if(xq[s])return xq[s];let a=e;if(r==="wrap"&&(a=Ift.default(e,t,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=Cft.default(e,t,{position:n})}return xq[s]=a,a}});var Rq=G(Qq=>{"use strict";Object.defineProperty(Qq,"__esModule",{value:!0});var KIe=e=>{let t="";if(e.childNodes.length>0)for(let r of e.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=KIe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),t+=s}return t};Qq.default=KIe});var Tq=G(Di=>{"use strict";var ZS=Di&&Di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0});Di.setTextNodeValue=Di.createTextNode=Di.setStyle=Di.setAttribute=Di.removeChildNode=Di.insertBeforeNode=Di.appendChildNode=Di.createNode=Di.TEXT_NAME=void 0;var wft=ZS(_m()),JIe=ZS(TIe()),Bft=ZS(FIe()),vft=ZS(kq()),Sft=ZS(Rq());Di.TEXT_NAME="#text";Di.createNode=e=>{var t;let r={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:e==="ink-virtual-text"?void 0:wft.default.Node.create()};return e==="ink-text"&&((t=r.yogaNode)===null||t===void 0||t.setMeasureFunc(bft.bind(null,r))),r};Di.appendChildNode=(e,t)=>{var r;t.parentNode&&Di.removeChildNode(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&((r=e.yogaNode)===null||r===void 0||r.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&vF(e)};Di.insertBeforeNode=(e,t,r)=>{var s,a;t.parentNode&&Di.removeChildNode(t.parentNode,t),t.parentNode=e;let n=e.childNodes.indexOf(r);if(n>=0){e.childNodes.splice(n,0,t),t.yogaNode&&((s=e.yogaNode)===null||s===void 0||s.insertChild(t.yogaNode,n));return}e.childNodes.push(t),t.yogaNode&&((a=e.yogaNode)===null||a===void 0||a.insertChild(t.yogaNode,e.yogaNode.getChildCount())),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&vF(e)};Di.removeChildNode=(e,t)=>{var r,s;t.yogaNode&&((s=(r=t.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(t.yogaNode)),t.parentNode=null;let a=e.childNodes.indexOf(t);a>=0&&e.childNodes.splice(a,1),(e.nodeName==="ink-text"||e.nodeName==="ink-virtual-text")&&vF(e)};Di.setAttribute=(e,t,r)=>{e.attributes[t]=r};Di.setStyle=(e,t)=>{e.style=t,e.yogaNode&&Bft.default(e.yogaNode,t)};Di.createTextNode=e=>{let t={nodeName:"#text",nodeValue:e,yogaLine truncated
`).repeat(n-2),E=Oq.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,"foreground");s.write(e,t,p,{transformers:[]}),s.write(e,t+1,h,{transformers:[]}),s.write(e+a-1,t+1,h,{transformers:[]}),s.write(e,t+n-1,E,{transformers:[]})}}});var fCe=G(ib=>{"use strict";var Hm=ib&&ib.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ib,"__esModule",{value:!0});var Fft=Hm(_m()),Nft=Hm(vq()),Oft=Hm(nCe()),Lft=Hm(kq()),Mft=Hm(iCe()),Uft=Hm(Rq()),_ft=Hm(cCe()),Hft=(e,t)=>{var r;let s=(r=e.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();t=`
`.repeat(n)+Oft.default(t,a)}return t},uCe=(e,t,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&e.internal_static)return;let{yogaNode:p}=e;if(p){if(p.getDisplay()===Fft.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof e.internal_transform=="function"&&(C=[e.internal_transform,...c]),e.nodeName==="ink-text"){let S=Uft.default(e);if(S.length>0){let x=Nft.default(S),I=Mft.default(p);if(x>I){let T=(s=e.style.textWrap)!==null&&s!==void 0?s:"wrap";S=Lft.default(S,I,T)}S=Hft(e,S),t.write(h,E,S,{transformers:C})}return}if(e.nodeName==="ink-box"&&_ft.default(h,E,e,t),e.nodeName==="ink-root"||e.nodeName==="ink-box")for(let S of e.childNodes)uCe(S,t,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};ib.default=uCe});var hCe=G(sb=>{"use strict";var pCe=sb&&sb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sb,"__esModule",{value:!0});var ACe=pCe(Pq()),jft=pCe(VS()),Lq=class{constructor(t){this.writes=[];let{width:r,height:s}=t;this.width=r,this.height=s}write(t,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:t,y:r,text:s,transformers:n})}get(){let t=[];for(let s=0;s<this.height;s++)t.push(" ".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`
`),h=0;for(let E of p){let C=t[n+h];if(!C)continue;let S=jft.default(E);for(let x of f)E=x(E);t[n+h]=ACe.default(C,0,a)+E+ACe.default(C,a+S),h++}}return{output:t.map(s=>s.trimRight()).join(`
`),height:t.length}}};sb.default=Lq});var mCe=G(ob=>{"use strict";var Mq=ob&&ob.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ob,"__esModule",{value:!0});var Gft=Mq(_m()),dCe=Mq(fCe()),gCe=Mq(hCe());ob.default=(e,t)=>{var r;if(e.yogaNode.setWidth(t),e.yogaNode){e.yogaNode.calculateLayout(void 0,void 0,Gft.default.DIRECTION_LTR);let s=new gCe.default({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});dCe.default(e,s,{skipStaticElements:!0});let a;!((r=e.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new gCe.default({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),dCe.default(e.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var CCe=G((p7t,ICe)=>{"use strict";var yCe=Ie("stream"),ECe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Uq={},qft=e=>{let t=new yCe.PassThrough,r=new yCe.PassThrough;t.write=a=>e("stdout",a),r.write=a=>e("stderr",a);let s=new console.Console(t,r);for(let a of ECe)Uq[a]=console[a],console[a]=s[a];return()=>{for(let a of ECe)console[a]=Uq[a];Uq={}}};ICe.exports=qft});var Hq=G(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});_q.default=new WeakMap});var Gq=G(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var Yft=dn(),wCe=Yft.createContext({exit:()=>{}});wCe.displayName="InternalAppContext";jq.default=wCe});var Yq=G(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var Wft=dn(),BCe=Wft.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});BCe.displayName="InternalStdinContext";qq.default=BCe});var Vq=G(Wq=>{"use strict";Object.defineProperty(Wq,"__esModule",{value:!0});var Vft=dn(),vCe=Vft.createContext({stdout:void 0,write:()=>{}});vCe.displayName="InternalStdoutContext";Wq.default=vCe});var Jq=G(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var Kft=dn(),SCe=Kft.createContext({stderr:void 0,write:()=>{}});SCe.displayName="InternalStderrContext";Kq.default=SCe});var DF=G(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var Jft=dn(),bCe=Jft.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});bCe.displayName="InternalFocusContext";zq.default=bCe});var PCe=G((I7t,DCe)=>{"use strict";var zft=/[|\\{}()[\]^$+*?.-]/g;DCe.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(zft,"\\$&")}});var RCe=G((C7t,QCe)=>{"use strict";var Xft=PCe(),Zft=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",kCe=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(e=>new RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));kCe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Xq=class e{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=e.nodeInternals()),"cwd"in t||(t.cwd=Zft),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,$ft(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...kCe]}clean(t,r=0){r=" ".repeat(r),Array.isArray(t)||(t=t.split(`
`)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let s=!1,a=null,n=[];return t.forEach(c=>{if(c=c.replace(/\\/g,"/"),this._internals.some(p=>p.test(c)))return;let f=/^\s*at /.test(c);s?c=c.trimEnd().replace(/^(\s+)at /,"$1"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,""),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}
`).join("")}captureString(t,r=this.captureString){typeof t=="function"&&(r=t,t=1/0);let{stackTraceLimit:s}=Error;t&&(Error.stackTraceLimit=t);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(t,r=this.capture){typeof t=="function"&&(r=t,t=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,t&&(Error.stackTraceLimit=t);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(t=this.at){let[r]=this.capture(1,t);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};xCe(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(t){let r=t&&t.match(eAt);if(!r)return null;let s=r[1]==="new",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]==="native",x=r[11]===")",I,T={};if(E&&(T.line=Number(E)),C&&(T.column=Number(C)),x&&h){let O=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")O++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(O--,O===-1&&h.charAt(U-1)===" ")){let V=h.slice(0,U-1);h=h.slice(U+1),a+=` (${V}`;break}}if(a){let O=a.match(tAt);O&&(a=O[1],I=O[2])}return xCe(T,h,this._cwd),s&&(T.constructor=!0),n&&(T.evalOrigin=n,T.evalLine=f,T.evalColumn=p,T.evalFile=c&&c.replace(/\\/g,"/")),S&&(T.native=!0),a&&(T.function=a),I&&a!==I&&(T.method=I),T}};function xCe(e,t,r){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${r}/`)&&(t=t.slice(r.length+1)),e.file=t)}function $ft(e){if(e.length===0)return[];let t=e.map(r=>Xft(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var eAt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),tAt=/^(.*?) \[as (.*?)\]$/;QCe.exports=Xq});var FCe=G((w7t,TCe)=>{"use strict";TCe.exports=(e,t)=>e.replace(/^\t+/gm,r=>" ".repeat(r.length*(t||2)))});var OCe=G((B7t,NCe)=>{"use strict";var rAt=FCe(),nAt=(e,t)=>{let r=[],s=e-t,a=e+t;for(let n=s;n<=a;n++)r.push(n);return r};NCe.exports=(e,t,r)=>{if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");if(e=rAt(e).split(/\r?\n/),!(t>e.length))return r={around:3,...r},nAt(t,r.around).filter(s=>e[s-1]!==void 0).map(s=>({line:s,value:e[s-1]}))}});var PF=G(of=>{"use strict";var iAt=of&&of.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),sAt=of&&of.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),oAt=of&&of.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&iAt(t,e,r);return sAt(t,e),t},aAt=of&&of.__rest||function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r};Object.defineProperty(of,"__esModule",{value:!0});var LCe=oAt(dn()),Zq=LCe.forwardRef((e,t)=>{var{children:r}=e,s=aAt(e,["children"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return LCe.default.createElement("ink-box",{ref:t,style:a},r)});Zq.displayName="Box";Zq.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};of.default=Zq});var tY=G(ab=>{"use strict";var $q=ab&&ab.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ab,"__esModule",{value:!0});var lAt=$q(dn()),fw=$q(LE()),MCe=$q(Nq()),eY=({color:e,backgroundColor:t,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=fw.default.dim(C)),e&&(C=MCe.default(C,e,"foreground")),t&&(C=MCe.default(C,t,"background")),s&&(C=fw.default.bold(C)),a&&(C=fw.default.italic(C)),n&&(C=fw.default.underline(C)),c&&(C=fw.default.strikethrough(C)),f&&(C=fw.default.inverse(C)),C);return lAt.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
`).slice(1):void 0,r=t?HCe.parseLine(t[0]):void 0,s,a=0;if(r?.file&&r?.line&&UCe.existsSync(r.file)){let n=UCe.readFileSync(r.file,"utf8");if(s=AAt.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Fs.default.createElement(th.default,{flexDirection:"column",padding:1},Fs.default.createElement(th.default,null,Fs.default.createElement(dA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Fs.default.createElement(dA.default,null," ",e.message)),r&&Fs.default.createElement(th.default,{marginTop:1},Fs.default.createElement(dA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Fs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:c})=>Fs.default.createElement(th.default,{key:n},Fs.default.createElement(th.default,{width:a+1},Fs.default.createElement(dA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),Fs.default.createElement(dA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+c)))),e.stack&&Fs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},e.stack.split(`
`).slice(1).map(n=>{let c=HCe.parseLine(n);return c?Fs.default.createElement(th.default,{key:n},Fs.default.createElement(dA.default,{dimColor:!0},"- "),Fs.default.createElement(dA.default,{dimColor:!0,bold:!0},c.function),Fs.default.createElement(dA.default,{dimColor:!0,color:"gray"}," ","(",c.file,":",c.line,":",c.column,")")):Fs.default.createElement(th.default,{key:n},Fs.default.createElement(dA.default,{dimColor:!0},"- "),Fs.default.createElement(dA.default,{dimColor:!0,bold:!0},n))})))};af.default=pAt});var qCe=G(lf=>{"use strict";var hAt=lf&&lf.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),dAt=lf&&lf.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),gAt=lf&&lf.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&hAt(t,e,r);return dAt(t,e),t},Gm=lf&&lf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0});var jm=gAt(dn()),GCe=Gm(nq()),mAt=Gm(Gq()),yAt=Gm(Yq()),EAt=Gm(Vq()),IAt=Gm(Jq()),CAt=Gm(DF()),wAt=Gm(jCe()),BAt=" ",vAt="\x1B[Z",SAt="\x1B",xF=class extends jm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=t=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),t){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=t=>{t===""&&this.props.exitOnCtrlC&&this.handleExit(),t===SAt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(t===BAt&&this.focusNext(),t===vAt&&this.focusPrevious())},this.handleExit=t=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(t)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=t=>{this.setState(r=>r.focusables.some(a=>a?.id===t)?{activeFocusId:t}:r)},this.focusNext=()=>{this.setState(t=>{var r;let s=(r=t.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(t)||s}})},this.focusPrevious=()=>{this.setState(t=>{var r;let s=(r=t.focusables[t.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(t)||s}})},this.addFocusable=(t,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=t),{activeFocusId:a,focusables:[...s.focusables,{id:t,isActive:!0}]}})},this.removeFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==t)}))},this.activateFocusable=t=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==t?s:{id:t,isActive:!0})}))},this.deactivateFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==t?s:{id:t,isActive:!1})}))},this.findNextFocusable=t=>{var r;let s=t.focusables.findIndex(a=>a.id===t.activeFocusId);for(let a=s+1;a<t.focusables.length;a++)if(!((r=t.focusables[a])===null||r===void 0)&&r.isActive)return t.focusables[a].id},this.findPreviousFocusable=t=>{var r;let s=t.focusables.findIndex(a=>a.id===t.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=t.focusables[a])===null||r===void 0)&&r.isActive)return t.focusables[a].id}}static getDerivedStateFromError(t){return{error:t}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return jm.default.createElement(mAt.default.Provider,{value:{exit:this.handleExit}},jm.default.createElement(yAt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},jm.default.createElement(EAt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},jm.default.createElement(IAt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},jm.default.createElement(CAt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?jm.default.createElement(wAt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){GCe.default.hide(this.props.stdout)}componentWillUnmount(){GCe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(t){this.handleExit(t)}};lf.default=xF;xF.displayName="InternalApp"});var VCe=G(cf=>{"use strict";var bAt=cf&&cf.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),DAt=cf&&cf.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),PAt=cf&&cf.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&bAt(t,e,r);return DAt(t,e),t},uf=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0});var xAt=uf(dn()),YCe=UEe(),kAt=uf(tIe()),QAt=uf(Z9()),RAt=uf(aIe()),TAt=uf(cIe()),rY=uf(tCe()),FAt=uf(mCe()),NAt=uf(rq()),OAt=uf(CCe()),LAt=PAt(Tq()),MAt=uf(Hq()),UAt=uf(qCe()),Aw=process.env.CI==="false"?!1:RAt.default,WCe=()=>{},nY=class{constructor(t){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=FAt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Aw){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(QAt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},TAt.default(this),this.options=t,this.rootNode=LAt.createNode("ink-root"),this.rootNode.onRender=t.debug?this.onRender:YCe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=kAt.default.create(t.stdout),this.throttledLog=t.debug?this.log:YCe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=rY.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=NAt.default(this.unmount,{alwaysLast:!1}),t.patchConsole&&this.patchConsole(),Aw||(t.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{t.stdout.off("resize",this.onRender)})}render(t){let r=xAt.default.createElement(UAt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},t);rY.default.updateContainer(r,this.container,null,WCe)}writeToStdout(t){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(t+this.fullStaticOutput+this.lastOutput);return}if(Aw){this.options.stdout.write(t);return}this.log.clear(),this.options.stdout.write(t),this.log(this.lastOutput)}}writeToStderr(t){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(t),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Aw){this.options.stderr.write(t);return}this.log.clear(),this.options.stderr.write(t),this.log(this.lastOutput)}}unmount(t){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Aw?this.options.stdout.write(this.lastOutput+`
`):this.options.debug||this.log.done(),this.isUnmounted=!0,rY.default.updateContainer(null,this.container,null,WCe),MAt.default.delete(this.options.stdout),t instanceof Error?this.rejectExitPromise(t):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((t,r)=>{this.resolveExitPromise=t,this.rejectExitPromise=r})),this.exitPromise}clear(){!Aw&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=OAt.default((t,r)=>{t==="stdout"&&this.writeToStdout(r),t==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};cf.default=nY});var JCe=G(ub=>{"use strict";var KCe=ub&&ub.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ub,"__esModule",{value:!0});var _At=KCe(VCe()),kF=KCe(Hq()),HAt=Ie("stream"),jAt=(e,t)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},GAt(t)),s=qAt(r.stdout,()=>new _At.default(r));return s.render(e),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>kF.default.delete(r.stdout),clear:s.clear}};ub.default=jAt;var GAt=(e={})=>e instanceof HAt.Stream?{stdout:e,stdin:process.stdin}:e,qAt=(e,t)=>{let r;return kF.default.has(e)?r=kF.default.get(e):(r=t(),kF.default.set(e,r)),r}});var XCe=G(rh=>{"use strict";var YAt=rh&&rh.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),WAt=rh&&rh.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),VAt=rh&&rh.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&YAt(t,e,r);return WAt(t,e),t};Object.defineProperty(rh,"__esModule",{value:!0});var fb=VAt(dn()),zCe=e=>{let{items:t,children:r,style:s}=e,[a,n]=fb.useState(0),c=fb.useMemo(()=>t.slice(a),[t,a]);fb.useLayoutEffect(()=>{n(t.length)},[t.length]);let f=c.map((h,E)=>r(h,a+E)),p=fb.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return fb.default.createElement("ink-box",{internal_static:!0,style:p},f)};zCe.displayName="Static";rh.default=zCe});var $Ce=G(Ab=>{"use strict";var KAt=Ab&&Ab.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ab,"__esModule",{value:!0});var JAt=KAt(dn()),ZCe=({children:e,transform:t})=>e==null?null:JAt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:t},e);ZCe.displayName="Transform";Ab.default=ZCe});var twe=G(pb=>{"use strict";var zAt=pb&&pb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pb,"__esModule",{value:!0});var XAt=zAt(dn()),ewe=({count:e=1})=>XAt.default.createElement("ink-text",null,`
`.repeat(e));ewe.displayName="Newline";pb.default=ewe});var iwe=G(hb=>{"use strict";var rwe=hb&&hb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hb,"__esModule",{value:!0});var ZAt=rwe(dn()),$At=rwe(PF()),nwe=()=>ZAt.default.createElement($At.default,{flexGrow:1});nwe.displayName="Spacer";hb.default=nwe});var QF=G(db=>{"use strict";var ept=db&&db.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(db,"__esModule",{value:!0});var tpt=dn(),rpt=ept(Yq()),npt=()=>tpt.useContext(rpt.default);db.default=npt});var owe=G(gb=>{"use strict";var ipt=gb&&gb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gb,"__esModule",{value:!0});var swe=dn(),spt=ipt(QF()),opt=(e,t={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=spt.default();swe.useEffect(()=>{if(t.isActive!==!1)return s(!0),()=>{s(!1)}},[t.isActive,s]),swe.useEffect(()=>{if(t.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f==="\x1B[A",downArrow:f==="\x1B[B",leftArrow:f==="\x1B[D",rightArrow:f==="\x1B[C",pageDown:f==="\x1B[6~",pageUp:f==="\x1B[5~",return:f==="\r",escape:f==="\x1B",ctrl:!1,shift:!1,tab:f===" "||f==="\x1B[Z",backspace:f==="\b",delete:f==="\x7F"||f==="\x1B[3~",meta:!1};f<=""&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith("\x1B")&&(f=f.slice(1),p.meta=!0);let h=f>="A"&&f<="Z",E=f>="\u0410"&&f<="\u042F";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=""),(!(f==="c"&&p.ctrl)||!a)&&e(f,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[t.isActive,r,a,e])};gb.default=opt});var awe=G(mb=>{"use strict";var apt=mb&&mb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mb,"__esModule",{value:!0});var lpt=dn(),cpt=apt(Gq()),upt=()=>lpt.useContext(cpt.default);mb.default=upt});var lwe=G(yb=>{"use strict";var fpt=yb&&yb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yb,"__esModule",{value:!0});var Apt=dn(),ppt=fpt(Vq()),hpt=()=>Apt.useContext(ppt.default);yb.default=hpt});var cwe=G(Eb=>{"use strict";var dpt=Eb&&Eb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Eb,"__esModule",{value:!0});var gpt=dn(),mpt=dpt(Jq()),ypt=()=>gpt.useContext(mpt.default);Eb.default=ypt});var fwe=G(Cb=>{"use strict";var uwe=Cb&&Cb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cb,"__esModule",{value:!0});var Ib=dn(),Ept=uwe(DF()),Ipt=uwe(QF()),Cpt=({isActive:e=!0,autoFocus:t=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=Ipt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=Ib.useContext(Ept.default),C=Ib.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return Ib.useEffect(()=>(c(C,{autoFocus:t}),()=>{f(C)}),[C,t]),Ib.useEffect(()=>{e?p(C):h(C)},[e,C]),Ib.useEffect(()=>{if(!(!s||!e))return a(!0),()=>{a(!1)}},[e]),{isFocused:!!C&&n===C,focus:E}};Cb.default=Cpt});var Awe=G(wb=>{"use strict";var wpt=wb&&wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wb,"__esModule",{value:!0});var Bpt=dn(),vpt=wpt(DF()),Spt=()=>{let e=Bpt.useContext(vpt.default);return{enableFocus:e.enableFocus,disableFocus:e.disableFocus,focusNext:e.focusNext,focusPrevious:e.focusPrevious,focus:e.focus}};wb.default=Spt});var pwe=G(iY=>{"use strict";Object.defineProperty(iY,"__esModule",{value:!0});iY.default=e=>{var t,r,s,a;return{width:(r=(t=e.yogaNode)===null||t===void 0?void 0:t.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=e.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Yc=G(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var bpt=JCe();Object.defineProperty(vo,"render",{enumerable:!0,get:function(){return bpt.default}});var Dpt=PF();Object.defineProperty(vo,"Box",{enumerable:!0,get:function(){return Dpt.default}});var Ppt=tY();Object.defineProperty(vo,"Text",{enumerable:!0,get:function(){return Ppt.default}});var xpt=XCe();Object.defineProperty(vo,"Static",{enumerable:!0,get:function(){return xpt.default}});var kpt=$Ce();Object.defineProperty(vo,"Transform",{enumerable:!0,get:function(){return kpt.default}});var Qpt=twe();Object.defineProperty(vo,"Newline",{enumerable:!0,get:function(){return Qpt.default}});var Rpt=iwe();Object.defineProperty(vo,"Spacer",{enumerable:!0,get:function(){return Rpt.default}});var Tpt=owe();Object.defineProperty(vo,"useInput",{enumerable:!0,get:function(){return Tpt.default}});var Fpt=awe();Object.defineProperty(vo,"useApp",{enumerable:!0,get:function(){return Fpt.default}});var Npt=QF();Object.defineProperty(vo,"useStdin",{enumerable:!0,get:function(){return Npt.default}});var Opt=lwe();Object.defineProperty(vo,"useStdout",{enumerable:!0,get:function(){return Opt.default}});var Lpt=cwe();Object.defineProperty(vo,"useStderr",{enumerable:!0,get:function(){ Line truncated
`:"";return c?C+=`@IF EXIST ${c} (\r
${c} ${p} ${a} ${E}%*\r
) ELSE (\r
@SETLOCAL\r
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
${f} ${p} ${a} ${E}%*\r
)\r
`:C+=`@${f} ${p} ${a} ${E}%*\r
`,C}function n0t(e,t,r){let s=Vc.relative(Vc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let c=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",p=zY(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,s=c):(a=c,f="",s="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
case \`uname\` in
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
esac
`,C=r.nodePath?`export NODE_PATH="${p}"
`:"";return n?E+=`${C}if [ -x ${n} ]; then
exec ${n} ${f} ${s} ${h}"$@"
else
exec ${a} ${f} ${s} ${h}"$@"
fi
`:E+=`${C}${a} ${f} ${s} ${h}"$@"
exit $?
`,E}function i0t(e,t,r){let s=Vc.relative(Vc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,c;s=s.split("\\").join("/");let f=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,p=r.args||"",h=zY(r.nodePath),E=h.win32,C=h.posix;n?(c=`"$basedir/${r.prog}$exe"`,s=f):(n=f,p="",s="");let S=r.progArgs?`${r.progArgs.join(" ")} `:"",x=`#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
${r.nodePath?`$env_node_path=$env:NODE_PATH
$env:NODE_PATH="${E}"
`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}`;return r.nodePath&&(x+=` else {
$env:NODE_PATH="${C}"
}`),c?x+=`
$ret=0
if (Test-Path ${c}) {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${c} ${p} ${s} ${S}$args
} else {
& ${c} ${p} ${s} ${S}$args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${s} ${S}$args
} else {
& ${n} ${p} ${s} ${S}$args
}
$ret=$LASTEXITCODE
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $ret
`:x+=`
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${s} ${S}$args
} else {
& ${n} ${p} ${s} ${S}$args
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $LASTEXITCODE
`,x}function s0t(e,t){return t.fs_.chmod(e,493)}function zY(e){if(!e)return{win32:"",posix:""};let t=typeof e=="string"?e.split(Vc.delimiter):Array.from(e),r={};for(let s=0;s<t.length;s++){let a=t[s].split("/").join("\\"),n=S1e()?t[s].split("\\").join("/").replace(/^([^:\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):t[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}D1e.exports=JY});var fW=G((e$t,V1e)=>{V1e.exports=Ie("stream")});var X1e=G((t$t,z1e)=>{"use strict";function K1e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,s)}return r}function H0t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K1e(Object(r),!0).forEach(function(s){j0t(e,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K1e(Object(r)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))})}return e}function j0t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G0t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J1e(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function q0t(e,t,r){return t&&J1e(e.prototype,t),r&&J1e(e,r),e}var Y0t=Ie("buffer"),tN=Y0t.Buffer,W0t=Ie("util"),AW=W0t.inspect,V0t=AW&&AW.custom||"inspect";function K0t(e,t,r){tN.prototype.copy.call(e,t,r)}z1e.exports=function(){function e(){G0t(this,e),this.head=null,this.tail=null,this.length=0}return q0t(e,[{key:"push",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,a=""+s.data;s=s.next;)a+=r+s.data;return a}},{key:"concat",value:function(r){if(this.length===0)return tN.alloc(0);for(var s=tN.allocUnsafe(r>>>0),a=this.head,n=0;a;)K0t(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:"consume",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var s=tN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:V0t,value:function(r,s){return AW(this,H0t({},s,{depth:0,customInspect:!1}))}}]),e}()});var hW=G((r$t,$1e)=>{"use strict";function J0t(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(pW,this,e)):process.nextTick(pW,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(n){!t&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(rN,r):(r._writableState.errorEmitted=!0,process.nextTick(Z1e,r,n)):process.nextTick(Z1e,r,n):t?(process.nextTick(rN,r),t(n)):process.nextTick(rN,r)}),this)}function Z1e(e,t){pW(e,t),rN(e)}function rN(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function z0t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function pW(e,t){e.emit("error",t)}function X0t(e,t){var r=e._readableState,s=e._writableState;r&& Line truncated
`)),e.linkname&&(t+=jW(" linkpath="+e.linkname+`
`));var r=e.pax;if(r)for(var s in r)t+=jW(" "+s+"="+r[s]+`
`);return Buffer.from(t)};Tw.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var s=parseInt(e.slice(0,r).toString(),10);if(!s)return t;var a=e.slice(r+1,s-1).toString(),n=a.indexOf("=");if(n===-1)return t;t[a.slice(0,n)]=a.slice(n+1),e=e.slice(s)}return t};Tw.encode=function(e){var t=Ggt(512),r=e.name,s="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;s+=s?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(dd(e.mode&Jgt,6),100),t.write(dd(e.uid,6),108),t.write(dd(e.gid,6),116),t.write(dd(e.size,11),124),t.write(dd(e.mtime.getTime()/1e3|0,11),136),t[156]=$2e+Zgt(e.type),e.linkname&&t.write(e.linkname,157),eBe.copy(t,AD),Wgt.copy(t,GW),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(dd(e.devmajor||0,6),329),t.write(dd(e.devminor||0,6),337),s&&t.write(s,345),t.write(dd(rBe(t),6),148),t)};Tw.decode=function(e,t,r){var s=e[156]===0?0:e[156]-$2e,a=Rw(e,0,100,t),n=gd(e,100,8),c=gd(e,108,8),f=gd(e,116,8),p=gd(e,124,12),h=gd(e,136,12),E=Xgt(s),C=e[157]===0?null:Rw(e,157,100,t),S=Rw(e,265,32),x=Rw(e,297,32),I=gd(e,329,8),T=gd(e,337,8),O=rBe(e);if(O===8*32)return null;if(O!==gd(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(eBe.compare(e,AD,AD+6)===0)e[345]&&(a=Rw(e,345,155,t)+"/"+a);else if(!(Vgt.compare(e,AD,AD+6)===0&&Kgt.compare(e,GW,GW+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&a&&a[a.length-1]==="/"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:x,devmajor:I,devminor:T}}});var cBe=G((w$t,lBe)=>{var iBe=Ie("util"),emt=Z2e(),pD=qW(),sBe=Qw().Writable,oBe=Qw().PassThrough,aBe=function(){},nBe=function(e){return e&=511,e&&512-e},tmt=function(e,t){var r=new mN(e,t);return r.end(),r},rmt=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},mN=function(e,t){this._parent=e,this.offset=t,oBe.call(this,{autoDestroy:!1})};iBe.inherits(mN,oBe);mN.prototype.destroy=function(e){this._parent.destroy(e)};var uh=function(e){if(!(this instanceof uh))return new uh(e);sBe.call(this,e),e=e||{},this._offset=0,this._buffer=emt(),this._missing=0,this._partial=!1,this._onparse=aBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,s=function(){t._continue()},a=function(S){if(t._locked=!1,S)return t.destroy(S);t._stream||s()},n=function(){t._stream=null;var S=nBe(t._header.size);S?t._parse(S,c):t._parse(512,C),t._locked||s()},c=function(){t._buffer.consume(nBe(t._header.size)),t._parse(512,C),s()},f=function(){var S=t._header.size;t._paxGlobal=pD.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=t._header.size;t._pax=pD.decodePax(r.slice(0,S)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(S),n()},h=function(){var S=t._header.size;this._gnuLongPath=pD.decodeLongPath(r.slice(0,S),e.filenameEncoding),r.consume(S),n()},E=function(){var S=t._header.size;this._gnuLongLinkPath=pD.decodeLongPath(r.slice(0,S),e.filenameEncoding),r.consume(S),n()},C=function(){var S=t._offset,x;try{x=t._header=pD.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(I){t.emit("error",I)}if(r.consume(512),!x){t._parse(512,C),s();return}if(x.type==="gnu-long-path"){t._parse(x.size,h),s();return}if(x.type==="gnu-long-link-path"){t._parse(x.size,E),s();return}if(x.type==="pax-global-header"){t._parse(x.size,f),s();return}if(x.type==="pax-header"){t._parse(x.size,p),s();return}if(t._gnuLongPath&&(x.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(x.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=x=rmt(x,t._pax),t._pax=null),t._locked=!0,!x.size||x.type==="directory"){t._parse(512,C),t.emit("entry",x,tmt(t,S),a);return}t._stream=new mN(t,S),t.emit("entry",x,t._stream,a),t._parse(x.size,n),s()};this._onheader=C,this._parse(512,C)};iBe.inherits(uh,sBe);uh.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};uh.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};uh.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=aBe,this._overflow?this._write(this._overflow,void 0,e):e()}};uh.prototype._write=function(e,t,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(e.length&&(this._partial=!0),e.length<n)return this._missing-=e.length,this._overflow=null,s?s.write(e,r):(a.append(e), Line truncated
Wanted: ${this.expectedSize}
Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${t}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=t,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#t=this.size,this.emit("size",this.size),this.#e=t,this.emit("integrity",t),r&&(this.#s=r,this.emit("verified",r))}},ph=class{get isHash(){return!0}constructor(t,r){let s=r?.strict;this.source=t.trim(),this.digest="",this.algorithm="",this.options=[];let a=this.source.match(s?Fmt:Tmt);if(!a||s&&!aV.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(t,r){let s=oc(t,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(t){return t?.strict&&!(aV.includes(this.algorithm)&&this.digest.match(Rmt)&&this.options.every(r=>r.match(Nmt)))?"":`${this.algorithm}-${this.digest}${CD(this.options)}`}};function QBe(e,t,r,s){let a=e!=="",n=!1,c="",f=s.length-1;for(let h=0;h<f;h++){let E=ph.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=t)}let p=ph.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?e+t+c:e+c}var ny=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(t){let r=t?.sep||" ",s="";if(t?.strict){r=r.replace(/\S+/g," ");for(let a of aV)this[a]&&(s=QBe(s,r,t,this[a]))}else for(let a of Object.keys(this))s=QBe(s,r,t,this[a]);return s}concat(t,r){let s=typeof t=="string"?t:ED(t,r);return oc(`${this.toString(r)} ${s}`,r)}hexDigest(){return oc(this,{single:!0}).hexDigest()}merge(t,r){let s=oc(t,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[a]=s[a]}match(t,r){let s=oc(t,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(t,r){let s=t?.pickAlgorithm||Gmt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};BA.exports.parse=oc;function oc(e,t){if(!e)return null;if(typeof e=="string")return oV(e,t);if(e.algorithm&&e.digest){let r=new ny;return r[e.algorithm]=[e],oV(ED(r,t),t)}else return oV(ED(e,t),t)}function oV(e,t){if(t?.single)return new ph(e,t);let r=e.trim().split(/\s+/).reduce((s,a)=>{let n=new ph(a,t);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new ny);return r.isEmpty()?null:r}BA.exports.stringify=ED;function ED(e,t){return e.algorithm&&e.digest?ph.prototype.toString.call(e,t):typeof e=="string"?ED(oc(e,t),t):ny.prototype.toString.call(e,t)}BA.exports.fromHex=Omt;function Omt(e,t,r){let s=CD(r?.options);return oc(`${t}-${Buffer.from(e,"hex").toString("base64")}${s}`,r)}BA.exports.fromData=Lmt;function Lmt(e,t){let r=t?.algorithms||[...cV],s=CD(t?.options);return r.reduce((a,n)=>{let c=ID.createHash(n).update(e).digest("base64"),f=new ph(`${n}-${c}${s}`,t);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new ny)}BA.exports.fromStream=Mmt;function Mmt(e,t){let r=uV(t);return new Promise((s,a)=>{e.pipe(r),e.on("error",a),r.on("error",a);let n;r.on("integrity",c=>{n=c}),r.on("end",()=>s(n)),r.resume()})}BA.exports.checkData=Umt;function Umt(e,t,r){if(t=oc(t,r),!t||!Object.keys(t).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=t.pickAlgorithm(r),a=ID.createHash(s).update(e).digest("base64"),n=oc({algorithm:s,digest:a}),c=n.match(t,r);if(r=r||{},c||!r.error)return c;if(typeof r.size=="number"&&e.length!==r.size){let f=new Error(`data size mismatch when checking ${t}.
Wanted: ${r.size}
Found: ${e.length}`);throw f.code="EBADSIZE",f.found=e.length,f.expected=r.size,f.sri=t,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${t}, but got ${n}. (${e.length} bytes)`);throw f.code="EINTEGRITY",f.found=n,f.expected=t,f.algorithm=s,f.sri=t,f}}BA.exports.checkStream=_mt;function _mt(e,t,r){if(r=r||Object.create(null),r.integrity=t,t=oc(t,r),!t||!Object.keys(t).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=uV(r);return new Promise((a,n)=>{e.pipe(s),e.on("error",n),s.on("error",n);let c;s.on("verified",f=>{c=f}),s.on("end",()=>a(c)),s.resume()})}BA.exports.integrityStream=uV;function uV(e=Object.create(null)){return new lV(e)}BA.exports.create=Hmt;function Hmt(e){let t=e?.algorithms||[...cV],r=CD(e?.options),s=t.map(ID.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return t.reduce((n,c)=>{let f=s.shift().digest("base64"),p=new ph(`${c}-${f}${r}`,e);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new ny)}}}var jmt=ID.getHashes(),RBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(e=>jmt.includes(e));function Gmt(e,t){return RBe.indexOf(e.toLowerCase())>=RBe.indexOf(t.toLowerCase())?e:t}});var fV=G(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.Signature=yd.Envelope=void 0;yd.Envelope={fromJSON(e){return{payload:QN(e.payload)?Buffer.from(FBe(e.payload)):Buffer.alloc(0),payloadType:QN(e.payloadType)?globalThis.String(e.payloadType):"",signatures:globalThis.Array.isArray(e?.signatures)?e.signatures.map(t=>yd.Signature.fromJSON(t)):[]}},toJSON(e){let t={};return e.payload.length!==0&&(t.payload=NBe(e.payload)),e.payloadType!==""&&(t.payloadType=e.payloadType),e.signatures?.length&&(t.signatures=e.signatures.map(r=>yd.Signature.toJSON(r))),t}};yd.Signature={fromJSON(e){return{sig:QN(e.sig)?Buffer.from(FBe(e.sig)):Buffer.alloc(0),keyid:QN(e.keyid)?globalThis.String(e.keyid):""}},toJSON(e){let t={};return e.sig.length!==0&&(t.sig=NBe(e.sig)),e.keyid!==""&&(t.keyid=e.keyid),t}};function FBe(e){return Uint8Array.from(globalThis.Buffer.from(e,"base64"))}function NBe(e){return globalThis.Buffer.from(e).toString("base64")}function QN(e){return e!=null}});var LBe=G(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.Timestamp=void 0;RN.Timestamp={fromJSON(e){return{seconds:OBe(e.seconds)?globalThis.String(e.seconds):"0",nanos:OBe(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!=="0"&&(t.seconds=e.seconds),e.nanos!==0&&(t.nanos=Math.round(e.nanos)),t}};function OBe(e){return e!=null}});var Uw=G(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.TimeRange=_r.X509CertificateChain=_r.SubjectAlternativeName=_r.X509Certificate=_r.DistinguishedName=_r.ObjectIdentifierValuePair=_r.ObjectIdentifier=_r.PublicKeyIdentifier=_r.PublicKey=_r.RFC3161SignedTimestamp=_r.LogId=_r.MessageSignature=_r.HashOutput=_r.SubjectAlternativeNameType=_r.PublicKeyDetails=_r.HashAlgorithm=void 0;_r.hashAlgorithmFromJSON=UBe;_r.hashAlgorithmToJSON=_Be;_r.publicKeyDetailsFromJSON=HBe;_r.publicKeyDetailsToJSON=jBe;_r.subjectAlternativeNameTypeFromJSON=GBe;_r.subjectAlternativeNameTypeToJSON=qBe;var qmt=LBe(),bl;(function(e){e[e.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",e[e.SHA2_256=1]="SHA2_256",e[e.SHA2_384=2]="SHA2_384",e[e.SHA2_512=3]="SHA2_512",e[e.SHA3_256=4]="SHA3_256",e[e.SHA3_384=5]="SHA3_384"})(bl||(_r.HashAlgorithm=bl={}));function UBe(e){switch(e){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return bl.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return bl.SHA2_256;case 2:case"SHA2_384":return bl.SHA2_384;case 3:case"SHA2_512":return bl.SHA2_512;case 4:case"SHA3_256":return bl.SHA3_256;case 5:case"SHA3_384":return bl.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+e+" for enum HashAlgorithm")}}function _Be(e){switch(e){case bl.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case bl.SHA2_256:return"SHA2_256";case bl.SHA2_384:return"SHA2_384";case bl.SHA2_512:return"SHA2_512";case bl.SHA3_256:return"SHA3_256";case bl.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+e+" for enum HashAlgorithm")}}var sn;(function(e){e[e.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",e[e.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",e[e.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",e[e.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",e[e.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",e[e.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",e[e.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",e[e.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",e[e.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",e[e.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",e[e.PKIX_RS Line truncated
`).forEach(r=>{r.match(Oyt)||r.match(Lyt)||(t+=r)}),Buffer.from(t,"base64")}function Uyt(e,t="CERTIFICATE"){let s=e.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${t}-----`,...s,`-----END ${t}-----`].join(`
`).concat(`
`)}});var eO=G(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.SHA2_HASH_ALGOS=qw.ECDSA_SIGNATURE_ALGOS=void 0;qw.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};qw.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var kV=G(tO=>{"use strict";Object.defineProperty(tO,"__esModule",{value:!0});tO.RFC3161TimestampVerificationError=void 0;var xV=class extends Error{};tO.RFC3161TimestampVerificationError=xV});var Ive=G(DA=>{"use strict";var _yt=DA&&DA.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,a)}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),Hyt=DA&&DA.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jyt=DA&&DA.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&_yt(t,e,r);return Hyt(t,e),t};Object.defineProperty(DA,"__esModule",{value:!0});DA.TSTInfo=void 0;var Eve=jyt(Gw()),Gyt=eO(),qyt=kV(),QV=class{constructor(t){this.root=t}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let t=this.messageImprintObj.subs[0].subs[0].toOID();return Gyt.SHA2_HASH_ALGOS[t]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(t){let r=Eve.digest(this.messageImprintHashAlgorithm,t);if(!Eve.bufferEqual(r,this.messageImprintHashedMessage))throw new qyt.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};DA.TSTInfo=QV});var wve=G(PA=>{"use strict";var Yyt=PA&&PA.__createBinding||(Object.create?function(e,t,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,a)}:function(e,t,r,s){s===void 0&&(s=r),e[s]=t[r]}),Wyt=PA&&PA.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Vyt=PA&&PA.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Yyt(t,e,r);return Wyt(t,e),t};Object.defineProperty(PA,"__esModule",{value:!0});PA.RFC3161Timestamp=void 0;var Kyt=XN(),RV=Vyt(Gw()),Cve=eO(),DD=kV(),Jyt=Ive(),zyt="1.2.840.113549.1.7.2",Xyt="1.2.840.113549.1.9.16.1.4",Zyt="1.2.840.113549.1.9.4",TV=class e{constructor(t){this.root=t}static parse(t){let r=Kyt.ASN1Obj.parseBuffer(t);return new e(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let t=this.signerDigestAlgorithmObj.subs[0].toOID();return Cve.SHA2_HASH_ALGOS[t]}get signatureAlgorithm(){let t=this.signatureAlgorithmObj.subs[0].toOID();return Cve.ECDSA_SIGNATURE_ALGOS[t]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new Jyt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(t,r){if(!this.timeStampTokenObj)throw new DD.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==zyt)throw new DD.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==Xyt)throw new DD.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(t),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let t=RV.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!RV.bufferEqual(t,r))throw new DD.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(t){let r=this.signedAttrsObj.toDER();if(r[0]=49,!RV.verify(r,t,this.signatureValue,this.signatureAlgorithm))throw new DD.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let t=this.signedDataObj;return t.subs[t.subs.length-1]}get sig Line truncated
globstar while`,t,S,r,x,I),this.matchOne(t.slice(S),r.slice(x),s))return this.debug("globstar found match!",S,p,I),!0;if(I==="."||I===".."||!a.dot&&I.charAt(0)==="."){this.debug("dot detected!",t,S,r,x);break}this.debug("globstar swallow a segment, and continue"),S++}return!!(s&&(this.debug(`
>>> no match, partial?`,t,S,r,x),S===p))}let T;if(typeof E=="string"?(T=C===E,this.debug("string match",E,C,T)):(T=E.test(C),this.debug("pattern match",E,C,T)),!T)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&t[c]==="";throw new Error("wtf?")}braceExpand(){return(0,hr.braceExpand)(this.pattern,this.options)}parse(t){(0,RO.assertValidPattern)(t);let r=this.options;if(t==="**")return hr.GLOBSTAR;if(t==="")return"";let s,a=null;(s=t.match(mwt))?a=r.dot?Ewt:ywt:(s=t.match(awt))?a=(r.nocase?r.dot?fwt:uwt:r.dot?cwt:lwt)(s[1]):(s=t.match(Iwt))?a=(r.nocase?r.dot?wwt:Cwt:r.dot?Bwt:vwt)(s):(s=t.match(Awt))?a=r.dot?hwt:pwt:(s=t.match(dwt))&&(a=gwt);let n=hbe.AST.fromGlob(t,this.options).toMMPattern();return a&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?bwt:r.dot?Dwt:Pwt,a=new Set(r.nocase?["i"]:[]),n=t.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(""))a.add(C);return typeof E=="string"?Fwt(E):E===hr.GLOBSTAR?hr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],x=h[C-1];E!==hr.GLOBSTAR||x===hr.GLOBSTAR||(x===void 0?S!==void 0&&S!==hr.GLOBSTAR?h[C+1]="(?:\\/|"+s+"\\/)?"+S:h[C]=s:S===void 0?h[C-1]=x+"(?:\\/|"+s+")?":S!==hr.GLOBSTAR&&(h[C-1]=x+"(?:\\/|\\/"+s+"\\/)"+S,h[C+1]=hr.GLOBSTAR))}),h.filter(E=>E!==hr.GLOBSTAR).join("/")}).join("|"),[c,f]=t.length>1?["(?:",")"]:["",""];n="^"+c+n+f+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let a=this.slashSplit(t);this.debug(this.pattern,"split",a);let n=this.set;this.debug(this.pattern,"set",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return hr.minimatch.defaults(t).Minimatch}};hr.Minimatch=hy;var Nwt=R7();Object.defineProperty(hr,"AST",{enumerable:!0,get:function(){return Nwt.AST}});var Owt=T7();Object.defineProperty(hr,"escape",{enumerable:!0,get:function(){return Owt.escape}});var Lwt=DO();Object.defineProperty(hr,"unescape",{enumerable:!0,get:function(){return Lwt.unescape}});hr.minimatch.AST=hbe.AST;hr.minimatch.Minimatch=hy;hr.minimatch.escape=iwt.escape;hr.minimatch.unescape=swt.unescape});var O7=G(ru=>{"use strict";var Ebe=ru&&ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});ru.SuccinctRoles=ru.DelegatedRole=ru.Role=ru.TOP_LEVEL_ROLE_NAMES=void 0;var Ibe=Ebe(Ie("crypto")),Mwt=ybe(),TO=Ebe(Ie("util")),FO=QA(),dy=hf();ru.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var jD=class e{constructor(t){let{keyIDs:r,threshold:s,unrecognizedFields:a}=t;if(Uwt(r))throw new FO.ValueError("duplicate key IDs found");if(s<1)throw new FO.ValueError("threshold must be at least 1");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(t){return t instanceof e?this.threshold===t.threshold&&TO.default.isDeepStrictEqual(this.keyIDs,t.keyIDs)&&TO.default.isDeepStrictEqual(this.unrecognizedFields,t.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(t){let{keyids:r,threshold:s,...a}=t;if(!dy.guard.isStringArray(r))throw new TypeError("keyids must be an array");if(typeof s!="number")throw new TypeError("threshold must be a number");return new e({keyIDs:r,threshold:s,unrecognizedFields:a})}};ru.Role=jD;function Uwt(e){return new Set(e).size!==e.length}var F7=class e extends jD{constructor(t){super(t);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=t;if(this.name=r,this.terminating=s,t.paths&&t.pathHashPrefixes)throw new FO.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=a,this.pathHashPrefixes=n}equals(t){return t instanceof e?super.equals(t)&&this.name===t.name&&this.terminating===t.terminating&&TO.default.isDeepStrictEqual(this.paths,t.paths)&&TO.default.isDeepStrictEqual(this.pathHashPrefixes,t.pathHashPrefixes):!1}isDelegatedPath(t){if(this.paths)return this.paths.some(r=>Hwt(t,r));if(this.pathHashPrefixes){let s=Ibe.default.createHash("sha256").update(t).digest("hex");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let t={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(t.paths=this.paths),this.pathHashPrefixes&&(t.path_hash_prefixes=this.pathHashPrefixes),t}static fro Line truncated
`).join(`
`+n),e.push(a+"m+"+WO.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=G1t()+t+" "+e[0]}function G1t(){return oo.inspectOpts.hideDate?"":new Date().toISOString()+" "}function q1t(...e){return process.stderr.write(YO.formatWithOptions(oo.inspectOpts,...e)+`
`)}function Y1t(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function W1t(){return process.env.DEBUG}function V1t(e){e.inspectOpts={};let t=Object.keys(oo.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=oo.inspectOpts[t[r]]}WO.exports=rK()(oo);var{formatters:Nbe}=WO.exports;Nbe.o=function(e){return this.inspectOpts.colors=this.useColors,YO.inspect(e,this.inspectOpts).split(`
`).map(t=>t.trim()).join(" ")};Nbe.O=function(e){return this.inspectOpts.colors=this.useColors,YO.inspect(e,this.inspectOpts)}});var iK=G((jtr,nK)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nK.exports=Fbe():nK.exports=Obe()});var KO=G(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.DownloadHTTPError=Ji.DownloadLengthMismatchError=Ji.DownloadError=Ji.ExpiredMetadataError=Ji.EqualVersionError=Ji.BadVersionError=Ji.RepositoryError=Ji.PersistError=Ji.RuntimeError=Ji.ValueError=void 0;var sK=class extends Error{};Ji.ValueError=sK;var oK=class extends Error{};Ji.RuntimeError=oK;var aK=class extends Error{};Ji.PersistError=aK;var qD=class extends Error{};Ji.RepositoryError=qD;var VO=class extends qD{};Ji.BadVersionError=VO;var lK=class extends VO{};Ji.EqualVersionError=lK;var cK=class extends qD{};Ji.ExpiredMetadataError=cK;var YD=class extends Error{};Ji.DownloadError=YD;var uK=class extends YD{};Ji.DownloadLengthMismatchError=uK;var fK=class extends YD{constructor(t,r){super(t),this.statusCode=r}};Ji.DownloadHTTPError=fK});var Mbe=G(u1=>{"use strict";var pK=u1&&u1.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u1,"__esModule",{value:!0});u1.withTempFile=void 0;var AK=pK(Ie("fs/promises")),K1t=pK(Ie("os")),Lbe=pK(Ie("path")),J1t=async e=>z1t(async t=>e(Lbe.default.join(t,"tempfile")));u1.withTempFile=J1t;var z1t=async e=>{let t=await AK.default.realpath(K1t.default.tmpdir()),r=await AK.default.mkdtemp(t+Lbe.default.sep);try{return await e(r)}finally{await AK.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var dK=G(Qd=>{"use strict";var zO=Qd&&Qd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qd,"__esModule",{value:!0});Qd.DefaultFetcher=Qd.BaseFetcher=void 0;var X1t=zO(iK()),Ube=zO(Ie("fs")),Z1t=zO(cO()),$1t=zO(Ie("util")),_be=KO(),e2t=Mbe(),t2t=(0,X1t.default)("tuf:fetch"),JO=class{async downloadFile(t,r,s){return(0,e2t.withTempFile)(async a=>{let n=await this.fetch(t),c=0,f=Ube.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new _be.DownloadLengthMismatchError("Max length reached");await r2t(f,h)}}finally{await $1t.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(t,r){return this.downloadFile(t,r,async s=>{let a=Ube.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};Qd.BaseFetcher=JO;var hK=class extends JO{constructor(t={}){super(),this.timeout=t.timeout,this.retry=t.retry}async fetch(t){t2t("GET %s",t);let r=await(0,Z1t.default)(t,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new _be.DownloadHTTPError("Failed to download",r.status);return r.body}};Qd.DefaultFetcher=hK;var r2t=async(e,t)=>new Promise((r,s)=>{e.write(t,a=>{a&&s(a),r(!0)})})});var Hbe=G(XO=>{"use strict";Object.defineProperty(XO,"__esModule",{value:!0});XO.defaultConfig=void 0;XO.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var jbe=G(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0});ZO.TrustedMetadataStore=void 0;var Bs=jO(),Hi=KO(),gK=class{constructor(t){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(t)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(t){return this.trustedSet[t]}updateRoot(t){let r=JSON.parse(t.toString("utf8")),s=Bs.Metadata.fromJSON(Bs.MetadataKind.Root,r);if(s.signed.type!=Bs.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Bs.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Bs.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(t){if(this.snapshot)throw new Hi.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError("Final root.json is expired");let r=JSON.parse(t.toString("utf8")),s=Bs.Metadata.fromJSON(Bs.MetadataKind.Timestamp,r);if(s.signed.type!=Bs.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Bs.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Hi.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Hi.EqualVersionError(`New timestamp version ${s.sLine truncated
`,uBt=/\u2014 (\S+) (\S+)\n/g;function fBt(e,t){let r=(0,cBt.filterTLogAuthorities)(t,{targetDate:new Date(Number(e.integratedTime)*1e3)}),s=e.inclusionProof,a=MK.fromString(s.checkpoint.envelope),n=UK.fromString(a.note);if(!ABt(a,r))throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!LK.crypto.bufferEqual(n.logHash,s.rootHash))throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}function ABt(e,t){let r=Buffer.from(e.note,"utf-8");return e.signatures.every(s=>{let a=t.find(n=>LK.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?LK.crypto.verify(r,a.publicKey,s.signature):!1})}var MK=class e{constructor(t,r){this.note=t,this.signatures=r}static fromString(t){if(!t.includes(OK))throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=t.indexOf(OK),s=t.slice(0,r+1),n=t.slice(r+OK.length).matchAll(uBt),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,"base64");if(E.length<5)throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new e(s,c)}},UK=class e{constructor(t,r,s,a){this.origin=t,this.logSize=r,this.logHash=s,this.rest=a}static fromString(t){let r=t.trimEnd().split(`
`);if(r.length<3)throw new h1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],"base64"),c=r.slice(3);return new e(s,a,n,c)}}});var fDe=G(qK=>{"use strict";Object.defineProperty(qK,"__esModule",{value:!0});qK.verifyMerkleInclusion=dBt;var GK=xl(),HK=bo(),pBt=Buffer.from([0]),hBt=Buffer.from([1]);function dBt(e){let t=e.inclusionProof,r=BigInt(t.logIndex),s=BigInt(t.treeSize);if(r<0n||r>=s)throw new HK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${r}`});let{inner:a,border:n}=gBt(r,s);if(t.hashes.length!==a+n)throw new HK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=t.hashes.slice(0,a),f=t.hashes.slice(a),p=wBt(e.canonicalizedBody),h=yBt(mBt(p,c,r),f);if(!GK.crypto.bufferEqual(h,t.rootHash))throw new HK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function gBt(e,t){let r=EBt(e,t),s=IBt(e>>BigInt(r));return{inner:r,border:s}}function mBt(e,t,r){return t.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?jK(a,s):jK(s,a),e)}function yBt(e,t){return t.reduce((r,s)=>jK(s,r),e)}function EBt(e,t){return CBt(e^t-BigInt(1))}function IBt(e){return e.toString(2).split("1").length-1}function CBt(e){return e===0n?0:e.toString(2).length}function jK(e,t){return GK.crypto.digest("sha256",hBt,e,t)}function wBt(e){return GK.crypto.digest("sha256",pBt,e)}});var pDe=G(YK=>{"use strict";Object.defineProperty(YK,"__esModule",{value:!0});YK.verifyTLogSET=SBt;var ADe=xl(),BBt=bo(),vBt=Ey();function SBt(e,t){if(!(0,vBt.filterTLogAuthorities)(t,{logID:e.logId.keyId,targetDate:new Date(Number(e.integratedTime)*1e3)}).some(a=>{let n=bBt(e),c=Buffer.from(ADe.json.canonicalize(n),"utf8"),f=e.inclusionPromise.signedEntryTimestamp;return ADe.crypto.verify(c,a.publicKey,f)}))throw new BBt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function bBt(e){let{integratedTime:t,logIndex:r,logId:s,canonicalizedBody:a}=e;return{body:a.toString("base64"),integratedTime:Number(t),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var hDe=G(KK=>{"use strict";Object.defineProperty(KK,"__esModule",{value:!0});KK.verifyRFC3161Timestamp=xBt;var WK=xl(),VK=bo(),DBt=FK(),PBt=Ey();function xBt(e,t,r){let s=e.signingTime;if(r=(0,PBt.filterCertAuthorities)(r,{start:s,end:s}),r=QBt(r,{serialNumber:e.signerSerialNumber,issuer:e.signerIssuer}),!r.some(n=>{try{return kBt(e,t,n),!0}catch{return!1}}))throw new VK.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}function kBt(e,t,r){let[s,...a]=r.certChain,n=WK.crypto.createPublicKey(s.publicKey),c=e.signingTime;try{new DBt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new VK.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new VK.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp was signed with an expired certificate"});e.verify(t,n)}function QBt(e,t){return e.filter(r=>r.certChain.length>0&&WK.crypto.bufferEqual(r.certChain[0].serialNumber,t.serialNumber)&&WK.crypto.bufferEqual(r.certChain[0].issuer,t.issuer))}});var dDe=G(AL=>{"use strict";Object.defineProperty(AL,"__esModule",{value:!0});AL.verifyTSATimestamp=LBt;AL.verifyTLogTimestamp=MBt;var RBt=bo(),TBt=uDe(),FBt=fDe(),NBt=pDe(),OBt=hDe();function LBt(e,t,r){return(0,OBt.verifyRFC3161Timestamp)(e,t,r),{type:"timestamp-authority",logID:e.signerSerialNumber,timestamp:e.signingTime}}function MBt(e,t){let r=!1;if(UBt(e)&&((0,NBt.verifyTLogSET)(e,t),r=!0),_Bt(e)&&((0,FBt.verifyMerkleInclusion)(e),(0,TBt.verifyCheckpoint)(e,t),r=!0),!r)throw new RBt.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:e.logId.keyId,timestamp:new Date(Number(e.integratedTime)*1e3)}}function UBt(e){return e.inclusionPromise!==void 0}function _Bt(e){return e.inclusionProof!==void 0}});var gDe=G(JK=>{"use strict";Object.defineProperty(JK,"__esModule",{value:!0});JK.verifyDSSETLogBody=HBt;var pL=bo();function HBt(e,t){switch(e.apiVersion){case"0.0.1":return jBt(e,t);default:throw new pL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${e.apiVersion}`})}}function jBt(e,t){if(e.spec.signatures?.length!==1)throw new pL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=e.spec.signatures[0].signature;if(!t.compareSignature(Buffer.from(r,"base64")))throw new pL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=e.spec.payloadHash?.value||"";if(!t.compareDigest(Buffer.from(s,"hex")))throw new pL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}});var mDe=G(XK=>{"use strict";Object.defineProperty(XK,"__esModule",{value:!0});XK.verify Line truncated
Try running the command again with the package name prefixed: ${ce.pretty(r,"yarn add",ce.Type.CODE)} ${ce.pretty(r,j.makeDescriptor(j.makeIdent(null,"my-package"),`${ie[0]}...`),ce.Type.DESCRIPTOR)}`);if(!$)throw new st(`The ${ce.pretty(r,V,ce.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let fe=aot(a,$,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(fe.map(async ge=>{let he=await eS($,{project:s,workspace:a,cache:n,fixed:c,target:ge,modifier:h,strategies:E,maxResults:C});return{request:$,suggestedDescriptors:he,target:ge}}))})).then(V=>V.flat()),I=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async V=>{for(let{request:$,suggestedDescriptors:{suggestions:ie,rejections:fe}}of x)if(ie.filter(ge=>ge.descriptor!==null).length===0){let[ge]=fe;if(typeof ge>"u")throw new Error("Assertion failed: Expected an error to have been set");s.configuration.get("enableNetwork")?V.reportError(27,`${j.prettyDescriptor(r,$)} can't be resolved to a satisfying range`):V.reportError(27,`${j.prettyDescriptor(r,$)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),V.reportSeparator(),V.reportExceptionOnce(ge)}});if(I.hasErrors())return I.exitCode();let T=!1,O=[],U=[];for(let{suggestedDescriptors:{suggestions:V},target:$}of x){let ie,fe=V.filter(Ce=>Ce.descriptor!==null),ae=fe[0].descriptor,ge=fe.every(Ce=>j.areDescriptorsEqual(Ce.descriptor,ae));fe.length===1||ge?ie=ae:(T=!0,{answer:ie}=await(0,lge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:V.map(({descriptor:Ce,name:Ee,reason:d})=>Ce?{name:Ee,hint:d,descriptor:Ce}:{name:Ee,hint:d,disabled:!0}),onCancel:()=>process.exit(130),result(Ce){return this.find(Ce,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let he=a.manifest[$].get(ie.identHash);(typeof he>"u"||he.descriptorHash!==ie.descriptorHash)&&(a.manifest[$].set(ie.identHash,ie),this.optional&&($==="dependencies"?a.manifest.ensureDependencyMeta({...ie,range:"unknown"}).optional=!0:$==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:"unknown"}).optional=!0)),typeof he>"u"?O.push([a,$,ie,E]):U.push([a,$,he,ie]))}return await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyAddition,O),await r.triggerMultipleHooks(V=>V.afterWorkspaceDependencyReplacement,U),T&&this.context.stdout.write(`
`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function aot(e,t,{dev:r,peer:s,preferDev:a,optional:n}){let c=e.manifest.dependencies.has(t.identHash),f=e.manifest.devDependencies.has(t.identHash),p=e.manifest.peerDependencies.has(t.identHash);if((r||s)&&c)throw new st(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new st(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new st(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new st(`Package "${j.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new st(`Package "${j.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:f?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ge();Ge();jt();var $I=class extends ft{constructor(){super(...arguments);this.verbose=pe.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=pe.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=it.Usage({description:"get the path to a binary script",details:`
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await wn.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new st(`Couldn't find a binary named "${this.name}" for package "${j.prettyLocator(r,a)}"`);let[,p]=f;return this.context.stdout.write(`${p}
`),0}return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await wn.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:j.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h," ")} ${j.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ge();bt();jt();var eC=class extends ft{constructor(){super(...arguments);this.mirror=pe.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=pe.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=it.Usage({description:"remove the shared cache files",details:`
This command will remove all the files from the cache.
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new st("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let s=await zr.find(r);return(await Ft.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await le.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await le.removePromise(s.cwd)})).exitCode()}};Ge();jt();Xl();var m5=Ie("util"),tC=class extends ft{constructor(){super(...arguments);this.why=pe.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=pe.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=pe.String()}static{this.paths=[["config","get"]]}static{this.usage=it.Usage({description:"read a configuration settings",details:`
This command will print a configuration setting.
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(s)>"u")throw new st(`Couldn't find a configuration settings named "${s}"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=qe.convertMapsToIndexableObjects(c),p=a?xa(f,a):f,h=await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
`),h.exitCode();m5.inspect.styles.name="cyan",this.context.stdout.write(`${(0,m5.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
`)}return h.exitCode()}};Ge();jt();Xl();var y5=Ie("util"),rC=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=pe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=pe.String();this.value=pe.String()}static{this.paths=[["config","set"]]}static{this.usage=it.Usage({description:"change a configuration settings",details:`
This command will set a configuration setting.
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new st("This setting only affects the file it's in, and thus cannot be set from the CLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>Je.updateHomeConfiguration(I):I=>Je.updateConfiguration(s(),I))(I=>{if(n){let T=p0(I);return Jg(T,this.name,f),T}else return{...I,[a]:f}});let E=(await Je.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=qe.convertMapsToIndexableObjects(E),S=n?xa(C,n):C;return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{y5.inspect.styles.name="cyan",I.reportInfo(0,`Successfully set ${this.name} to ${(0,y5.inspect)(S,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ge();jt();Xl();var nC=class extends ft{constructor(){super(...arguments);this.home=pe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=pe.String()}static{this.paths=[["config","unset"]]}static{this.usage=it.Usage({description:"unset a configuration setting",details:`
This command will unset a configuration setting.
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);let f=this.home?h=>Je.updateHomeConfiguration(h):h=>Je.updateConfiguration(s(),h);return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!IB(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?p0(C):{...C};return h0(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ge();bt();jt();var jT=Ie("util"),iC=class extends ft{constructor(){super(...arguments);this.noDefaults=pe.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=pe.Boolean("-v,--verbose",{hidden:!0});this.why=pe.Boolean("--why",{hidden:!0});this.names=pe.Rest()}static{this.paths=[["config"]]}static{this.usage=it.Usage({description:"display the current configuration",details:`
This command prints the current active configuration settings.
`,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await kI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key "${p}" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&f.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??"<default>",S=C&&C[0]!=="<"?Ae.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),x=r.sources.get(C)??"<default>",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),T={Description:{label:"Description",value:ce.tuple(ce.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:ce.tuple(x[0]==="<"?ce.Type.CODE:ce.Type.PATH,x)}};h[C]={value:ce.tuple(ce.Type.CODE,C),children:T};let O=(U,V)=>{for(let[$,ie]of V)if(ie instanceof Map){let fe={};U[$]={children:fe},O(fe,ie)}else U[$]={label:$,value:ce.tuple(ce.Type.NO_HINT,(0,jT.inspect)(ie,p))}};I instanceof Map?O(T,I):T.Value={label:"Value",value:ce.tuple(ce.Type.NO_HINT,(0,jT.inspect)(I,p))}}a.length!==1&&(n=void 0),ts.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let f=a[0],p=(0,jT.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
`),this.context.stdout.write(`${p}
`)}return c.exitCode()}};Ge();jt();Jo();var GT={};Vt(GT,{Strategy:()=>tS,acceptedStrategies:()=>lot,dedupe:()=>E5});Ge();Ge();var cge=et(Xo()),tS=(t=>(t.HIGHEST="highest",t))(tS||{}),lot=new Set(Object.values(tS)),cot={highest:async(e,t,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of e.storedResolutions){let E=e.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);qe.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(qe.mapAndFilter(e.storedDescriptors.values(),p=>j.isVirtualDescriptor(p)?qe.mapAndFilter.skip:[p.descriptorHash,qe.makeDeferred()]));for(let p of e.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=e.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=e.originalPackages.get(E);if(typeof C>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),x=Object.fromEntries(await qe.allSettledSafe(Object.entries(S).map(async([$,ie])=>{let fe=f.get(ie.descriptorHash);if(typeof fe>"u")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let ae=await fe.promise;if(!ae)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[$,ae.updatedPackage]})));if(t.length&&!cge.default.isMatch(j.stringifyIdent(p),t)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let T=[...I].map($=>{let ie=e.originalPackages.get($);if(typeof ie>"u")throw new Error(`Assertion failed: The package (${$}) should have been registered`);return ie}),O=await r.getSatisfying(p,x,T,a),U=O.locators?.[0];if(typeof U>"u"||!O.sorted)return C;let V=e.originalPackages.get(U.locatorHash);if(typeof V>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return V}).then(async S=>{let x=await e.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:x})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function E5(e,{strategy:t,patterns:r,cache:s,report:a}){let{configuration:n}=e,c=new Qi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:e.storedChecksums,fetcher:p,project:e,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:e,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let C=cot[t],S=await C(e,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),x=Io.progressViaCounter(S.length);await a.reportProgress(x);let I=0;await Promise.all(S.map(U=>U.then(V=>{if(V===null||V.currentPackage.locatorHash===V.updatedPackage.locatorHash)return;I++;let{descriptor:$,currentPackage:ie,updatedPackage:fe}=V;a.reportInfo(0,`${j.prettyDescriptor(n,$)} can be deduped from ${j.prettyLocator(n,ie)} to ${j.prettyLocator(n,fe)}`),a.reportJson({descriptor:j.stringifyDescriptor($),currentResolution:j.stringifyLocator(ie),updatedResolution:j.stringifyLocator(fe)}),e.storedResolutions.set($.descriptorHash,fe.locatorHash)}).finally(()=>x.tick())));let T;switch(I){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${I} packages`}let O=ce.pretty(n,t,ce.Type.CODE);return a.reportInfo(0,`${T} can be deduped using the ${O} strategy`),I})}var sC=class extends ft{constructor(){super(...arguments);this.strategy=pe.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Qs(tS)});this.check=pe.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=pe.String("--mode",{description:"Change what artifacts installs generate",validator:Qs(La)});this.patterns=pe.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=it.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. Line truncated
`)}};var aC=class extends ft{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ge();bt();jt();var lC=class extends ft{constructor(){super(...arguments);this.leadingArgument=pe.String();this.args=pe.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!j.tryParseIdent(this.leadingArgument)){let r=K.resolve(this.context.cwd,Ae.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ge();var cC=class extends ft{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${An||"<unknown>"}
`)}};Ge();Ge();jt();var uC=class extends ft{constructor(){super(...arguments);this.commandName=pe.String();this.args=pe.Proxy()}static{this.paths=[["exec"]]}static{this.usage=it.Usage({description:"execute a shell script",details:`
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState(),await wn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ge();jt();Jo();var fC=class extends ft{constructor(){super(...arguments);this.hash=pe.String({required:!1,validator:l0(Jf(),[Sp(/^p[0-9a-f]{6}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=it.Usage({description:"explain a set of peer requirements",details:`
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
**Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\`yarn explain peer-requirements\`).
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<"u"?await fot(this.hash,s,{stdout:this.context.stdout}):await Aot(s,{stdout:this.context.stdout})}};async function fot(e,t,r){let s=t.peerRequirementNodes.get(e);if(typeof s>"u")throw new Error(`No peerDependency requirements found for hash: "${e}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:ce.tuple(ce.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:ce.tuple(ce.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:ce.tuple(ce.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[j.stringifyLocator(h.requester),n(h)]))}),c=t.peerWarnings.find(p=>p.hash===e);return(await Ft.start({configuration:t.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=ce.mark(t.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${ce.pretty(t.configuration,s.subject,ce.Type.LOCATOR)} is requested to provide ${ce.pretty(t.configuration,s.ident,ce.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,ce.pretty(t.configuration,s.subject,ce.Type.LOCATOR)),ts.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[j.stringifyLocator(C.requester),n(C)]))},{configuration:t.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range==="missing:"){let C=c?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${ce.pretty(t.configuration,s.subject,ce.Type.LOCATOR)} does not provide ${ce.pretty(t.configuration,s.ident,ce.Type.IDENT)}${C}.`)}else{let C=t.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error("Assertion failed: Expected the descriptor to be registered");let S=t.storedPackages.get(C);if(!S)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${ce.pretty(t.configuration,s.subject,ce.Type.LOCATOR)} provides ${ce.pretty(t.configuration,s.ident,ce.Type.IDENT)} with version ${j.prettyReference(t.configuration,S.version??"0.0.0")}, ${c?"which does not satisfy all requests.":"which satisfies all requests"}`),c?.type===3&&(c.range?p.reportInfo(0,` The combined requested range is ${ce.pretty(t.configuration,c.range,ce.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function Aot(e,t){return(await Ft.start({configuration:e.configuration,stdout:t.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=ce.mark(e.configuration),n=qe.sortMap(e.peerRequirementNodes,[([,c])=>j.stringifyLocator(c.subject),([,c])=>j.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=e.peerWarnings.find(E=>E.hash===c.hash),p=[...j.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",c.provided.range!=="missing:"){let E=e.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let C=e.storedPackages.get(E);if(!C)throw new Error("Assertion failed: Expected the provided package to have been registered");let S=`${ce.pretty(e.configuration,c.hash,ce.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${j.prettyLocator(e.configuration,c.subject)} provides ${j.prettyLocator(e.configuration,C)} to ${j.prettyLocator(e.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${ce.pretty(e.configuration,c.hash,ce.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${j.prettyLocator(e.configuration,c.subject)} doesn't provide ${j.prettyIdent(e.configuration,c.ident)} to ${j.prettyLocator(e.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ge();jt();Jo();Ge();Ge();bt();jt();var fge=et(hi()),AC=class extends ft{constructor(){super(...arguments);this.useYarnPath=pe.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=pe.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=pe.String()}static{this.paths=[["set","version"]]}static{this.usage=it.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set th Line truncated
${t}`)})}let f=e.projectCwd??e.startingCwd,p=K.resolve(f,".yarn/releases"),h=K.resolve(p,`yarn-${t}.cjs`),E=K.relative(e.startingCwd,h),C=qe.isTaggedYarnVersion(t),S=e.get("yarnPath"),x=!C,I=x||!!S||!!a;if(a===!1){if(x)throw new Lt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${ce.applyHyperlink(e,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${ce.applyHyperlink(e,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),I=!0);if(I){let $=await c();s.reportInfo(0,`Saving the new release in ${ce.pretty(e,E,"magenta")}`),await le.removePromise(K.dirname(h)),await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.writeFilePromise(h,$,{mode:493}),await Je.updateConfiguration(f,{yarnPath:K.relative(f,h)})}else await le.removePromise(K.dirname(h)),await Je.updateConfiguration(f,{yarnPath:Je.deleteProperty});let T=await _t.tryFind(f)||new _t;T.packageManager=`yarn@${C?t:await rS(e,"stable")}`;let O={};T.exportTo(O);let U=K.join(f,_t.fileName),V=`${JSON.stringify(O,null,T.indent)}
`;return await le.changeFilePromise(U,V,{automaticNewlines:!0}),{bundleVersion:t}}function Age(e){return pr[Yx(e)]}var hot=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function dot(e){let r=`https://repo.yarnpkg.com/${qe.isTaggedYarnVersion(An)?An:await rS(e,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await nn.get(r,{configuration:e});return new Map(Array.from(s.toString().matchAll(hot),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Age(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var pC=class extends ft{constructor(){super(...arguments);this.code=pe.String({required:!1,validator:J2(Jf(),[Sp(/^YN[0-9]{4}$/)])});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=it.Usage({description:"explain an error code",details:`
When the code argument is specified, this command prints its name and its details.
When used without arguments, this command lists all error codes and their names.
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let s=Age(this.code),a=ce.pretty(r,s,ce.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await dot(r)).get(this.code),p=typeof f<"u"?ce.jsonOrPretty(this.json,r,ce.tuple(ce.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
You can help us by editing this page on GitHub \u{1F642}:
${ce.jsonOrPretty(this.json,r,ce.tuple(ce.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}
`):this.context.stdout.write(`${n}
${p}
`)}else{let s={children:qe.mapAndFilter(Object.entries(pr),([a,n])=>Number.isNaN(Number(a))?qe.mapAndFilter.skip:{label:zf(Number(a)),value:ce.tuple(ce.Type.CODE,n)})};ts.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ge();bt();jt();var pge=et(Xo()),hC=class extends ft{constructor(){super(...arguments);this.all=pe.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=pe.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=pe.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=pe.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=pe.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=pe.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=pe.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=pe.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=pe.Rest()}static{this.paths=[["info"]]}static{this.usage=it.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(ie,{recursive:fe})=>{let ae=ie.anchoredLocator.locatorHash,ge=new Map,he=[ae];for(;he.length>0;){let Ce=he.shift();if(ge.has(Ce))continue;let Ee=s.storedPackages.get(Ce);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the package to be registered");if(ge.set(Ce,Ee),j.isVirtualLocator(Ee)&&he.push(j.devirtualizeLocator(Ee).locatorHash),!(!fe&&Ce!==ae))for(let d of Ee.dependencies.values()){let Se=s.storedResolutions.get(d.descriptorHash);if(typeof Se>"u")throw new Error("Assertion failed: Expected the resolution to be registered");he.push(Se)}}return ge.values()},p=({recursive:ie})=>{let fe=new Map;for(let ae of s.workspaces)for(let ge of f(ae,{recursive:ie}))fe.set(ge.locatorHash,ge);return fe.values()},h=({all:ie,recursive:fe})=>ie&&fe?s.storedPackages.values():ie?p({recursive:fe}):f(a,{recursive:fe}),E=({all:ie,recursive:fe})=>{let ae=h({all:ie,recursive:fe}),ge=this.patterns.map(Ee=>{let d=j.parseLocator(Ee),Se=pge.default.makeRe(j.stringifyIdent(d)),Be=j.isVirtualLocator(d),me=Be?j.devirtualizeLocator(d):d;return ue=>{let Z=j.stringifyIdent(ue);if(!Se.test(Z))return!1;if(d.reference==="unknown")return!0;let be=j.isVirtualLocator(ue),Qe=be?j.devirtualizeLocator(ue):ue;return!(Be&&be&&d.reference!==ue.reference||me.reference!==Qe.reference)}}),he=qe.sortMap([...ae],Ee=>j.stringifyLocator(Ee));return{selection:he.filter(Ee=>ge.length===0||ge.some(d=>d(Ee))),sortedLookup:he}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new st("No package matched your request");let x=new Map;if(this.dependents)for(let ie of S)for(let fe of ie.dependencies.values()){let ae=s.storedResolutions.get(fe.descriptorHash);if(typeof ae>"u")throw new Error("Assertion failed: Expected the resolution to be registered");qe.getArrayWithDefault(x,ae).push(ie)}let I=new Map;for(let ie of S){if(!j.isVirtualLocator(ie))continue;let fe=j.devirtualizeLocator(ie);qe.getArrayWithDefault(I,fe.locatorHash).push(ie)}let T={},O={children:T},U=r.makeFetcher(),V={project:s,fetcher:U,cache:n,checksums:s.storedChecksum Line truncated
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
`,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ge();jt();var yC=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
Check only the plugins from https.
If this command detects any plugin differences in the CI environment, it will throw an error.
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=await Je.findRcFiles(this.context.cwd);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await nn.get(f.spec,{configuration:r}),h=Mn.makeHash(p);if(f.checksum===h)continue;let E=ce.pretty(r,f.path,ce.Type.PATH),C=ce.pretty(r,f.spec,ce.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ge();Ge();bt();jt();var yge=Ie("os");Ge();bt();jt();var hge=Ie("os");Ge();Sc();jt();var Iot="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Qm(e,t){let r=await nn.get(Iot,{configuration:e}),s=us(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!t||kr.satisfiesWithPrereleases(t,n.range??"<4.0.0-rc.1")))}var EC=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Qm(r,An);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=" [experimental]"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var Cot=/^[0-9]+$/,wot=process.platform==="win32";function dge(e){return Cot.test(e)?`pull/${e}/head`:e}var Bot=({repository:e,branch:t},r)=>[["git","init",Ae.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin","--depth=1",dge(t)],["git","reset","--hard","FETCH_HEAD"]],vot=({branch:e})=>[["git","fetch","origin","--depth=1",dge(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],Sot=({plugins:e,noMinify:t},r,s)=>[["yarn","build:cli",...new Array().concat(...e.map(a=>["--plugin",K.resolve(s,a)])),...t?["--no-minify"]:[],"|"],[wot?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",Ae.fromPortablePath(r),"|"]],IC=class extends ft{constructor(){super(...arguments);this.installPath=pe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=pe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=pe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=pe.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=pe.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=pe.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=pe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=pe.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=it.Usage({description:"build Yarn from master",details:`
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
`,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),a=typeof this.installPath<"u"?K.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):K.resolve(Ae.toPortablePath((0,hge.tmpdir)()),"yarnpkg-sources",Mn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async c=>{await w5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator();let f=await Yr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=K.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);le.existsSync(p)||(await nS(Sot(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await le.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await I5(r,null,async()=>h,{report:c});this.skipPlugins||await bot(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function nS(e,{configuration:t,context:r,target:s}){for(let[a,...n]of e){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await Yr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ce.pretty(t,` $ ${[a,...n].join(" ")}`,"grey")}
`);try{await Yr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function w5(e,{configuration:t,report:r,target:s}){let a=!1;if(!e.force&&le.existsSync(K.join(s,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await nS(vot(e),{configuration:t,context:e.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await le.removePromise(s),await le.mkdirPromise(s,{recursive:!0}),await nS(Bot(e,s),{configuration:t,context:e.context,target:s}))}async function bot(e,t,{project:r,report:s,target:a}){let n=await Qm(r.configuration,t),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await B5(f,e,{project:r,report:s,target:a})}Ge();Ge();bt();jt();var gge=et(hi()),mge=Ie("vm");var CC=class extends ft{constructor(){super(...arguments);this.name=pe.String();this.checksum=pe.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
Three types of plugin references are accepted:
- If the plugin is stored within the Yarn repository, it can be referenced by name.
- Third-party plugins can be referenced directly through their public urls.
- Local plugins can be referenced by their path on the disk.
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Rt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.name)){let p=K.resolve(this.context.cwd,Ae.toPortablePath(this.name));a.reportInfo(0,`Reading ${ce.pretty(r,p,ce.Type.PATH)}`),c=K.relative(n.cwd,p),f=await le.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Lt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=j.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!gge.default.valid(h.reference))throw new Lt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=j.stringifyIdent(h),C=await Qm(r,An);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${j.prettyIdent(r,h)} on the remote registry.
`;throw r.plugins.has(E)?S+=`A plugin named ${j.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${ce.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",ce.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${ce.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",ce.Type.URL)}).`,new Lt(51,S)}c=E,p=C[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):An!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${An}/`))}a.reportInfo(0,`Downloading ${ce.pretty(r,p,"green")}`),f=await nn.get(p,{configuration:r})}await v5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function v5(e,t,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,mge.runInNewContext)(t.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=K.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${ce.pretty(n,h,"magenta")}`),await le.mkdirPromise(K.dirname(E),{recursive:!0}),await le.writeFilePromise(E,t);let C={path:h,spec:e};r&&(C.checksum=Mn.makeHash(t)),await Je.addPlugin(s.cwd,[C])}var Dot=({pluginName:e,noMinify:t},r)=>[["yarn",`build:${e}`,...t?["--no-minify"]:[],"|"]],wC=class extends ft{constructor(){super(...arguments);this.installPath=pe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=pe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=pe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=pe.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=pe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=pe.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
The plugins can be referenced by their short name if sourced from the official Yarn repository.
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<"u"?K.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):K.resolve(Ae.toPortablePath((0,yge.tmpdir)()),"yarnpkg-sources",Mn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Rt.find(r,this.context.cwd),f=j.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=j.stringifyIdent(f),h=await Qm(r,An);if(!Object.hasOwn(h,p))throw new Lt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await w5(this,{configuration:r,report:n,target:s}),await B5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function B5(e,{context:t,noMinify:r},{project:s,report:a,target:n}){let c=e.replace(/@yarnpkg\//,""),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await nS(Dot({pluginName:c,noMinify:r},n),{configuration:f,context:t,target:n}),a.reportSeparator();let p=K.resolve(n,`packages/${c}/bundles/${e}.js`),h=await le.readFilePromise(p);await v5(e,h,{project:s,report:a})}Ge();bt();jt();var BC=class extends ft{constructor(){super(...arguments);this.name=pe.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=j.parseIdent(c);if(!r.plugins.has(c))throw new st(`${j.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=K.resolve(s.cwd,p);le.existsSync(h)&&(n.reportInfo(0,`Removing ${ce.pretty(r,p,ce.Type.PATH)}...`),await le.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Je.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?Je.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ge();jt();var vC=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=it.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
`,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ge();Ge();jt();var SC=class extends ft{constructor(){super(...arguments);this.idents=pe.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=it.Usage({description:"rebuild the project's native packages",details:`
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(j.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new Qi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();jt();var S5=et(Xo());Jo();var bC=class extends ft{constructor(){super(...arguments);this.all=pe.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=pe.String("--mode",{description:"Change what artifacts installs generate",validator:Qs(La)});this.patterns=pe.Rest()}static{this.paths=[["remove"]]}static{this.usage=it.Usage({description:"remove dependencies from the project",details:`
This command will remove the packages matching the specified patterns from the current workspace.
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let I of this.patterns){let T=!1,O=j.parseIdent(I);for(let U of c){let V=[...U.manifest.peerDependenciesMeta.keys()];for(let $ of(0,S5.default)(V,I))U.manifest.peerDependenciesMeta.delete($),h=!0,T=!0;for(let $ of f){let ie=U.manifest.getForScope($),fe=[...ie.values()].map(ae=>j.stringifyIdent(ae));for(let ae of(0,S5.default)(fe,j.stringifyIdent(O))){let{identHash:ge}=j.parseIdent(ae),he=ie.get(ge);if(typeof he>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[$].delete(ge),E.push([U,$,he]),h=!0,T=!0}}}T||p.push(I)}let C=p.length>1?"Patterns":"Pattern",S=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new st(`${C} ${ce.prettyList(r,p,ce.Type.CODE)} ${S} match any packages referenced by ${x} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ge();Ge();jt();var Ege=Ie("util"),DC=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ft.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=qe.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E," ")} ${(0,Ege.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ge();Ge();jt();var PC=class extends ft{constructor(){super(...arguments);this.inspect=pe.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=pe.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=pe.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=pe.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=pe.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=pe.Boolean("--silent",{hidden:!0});this.scriptName=pe.String();this.args=pe.Proxy()}static{this.paths=[["run"]]}static{this.usage=it.Usage({description:"run a script defined in the package.json",details:`
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await wn.hasPackageScript(c,this.scriptName,{project:s}))return await wn.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await wn.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await wn.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await wn.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new st("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,C]of WI)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new st(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new st(`Couldn't find a script named "${this.scriptName}".`)}}};Ge();Ge();jt();var xC=class extends ft{constructor(){super(...arguments);this.descriptor=pe.String();this.resolution=pe.String()}static{this.paths=[["set","resolution"]]}static{this.usage=it.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 npm:1.5.0"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=j.parseDescriptor(this.descriptor,!0),f=j.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ge();bt();jt();var Ige=et(Xo()),kC=class extends ft{constructor(){super(...arguments);this.all=pe.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=pe.Rest()}static{this.paths=[["unlink"]]}static{this.usage=it.Usage({description:"disconnect the local project from another one",details:`
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=K.resolve(this.context.cwd,Ae.toPortablePath(p));if(qe.isPathLike(p)){let E=await Je.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Rt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let x of C.workspaces)x.manifest.name&&f.add(j.stringifyIdent(x.anchoredLocator));if(f.size===0)throw new st("No workspace found to be unlinked in the target project")}else{if(!S.manifest.name)throw new st("The target workspace doesn't have a name and thus cannot be unlinked");f.add(j.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,Ige.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();jt();var Cge=et(Xv()),b5=et(Xo());Jo();var QC=class extends ft{constructor(){super(...arguments);this.interactive=pe.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=pe.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=pe.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=pe.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=pe.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=pe.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.noTimeGate=pe.Boolean("--no-time-gate",!1,{description:"Disable the minimum release age check for this command"});this.mode=pe.String("--mode",{description:"Change what artifacts installs generate",validator:Qs(La)});this.patterns=pe.Rest()}static{this.paths=[["up"]]}static{this.usage=it.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously li Line truncated
${ae}`):O.reportError(27,`${j.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
${ae}`)}else ie.length>1&&!f&&O.reportError(27,`${j.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(x.hasErrors())return x.exitCode();let I=!1,T=[];for(let[O,U,,{suggestions:V}]of S){let $,ie=V.filter(he=>he.descriptor!==null),fe=ie[0].descriptor,ae=ie.every(he=>j.areDescriptorsEqual(he.descriptor,fe));ie.length===1||ae?$=fe:(I=!0,{answer:$}=await(0,Cge.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${j.prettyWorkspace(r,O)} \u276F ${U}?`,choices:V.map(({descriptor:he,name:Ce,reason:Ee})=>he?{name:Ce,hint:Ee,descriptor:he}:{name:Ce,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(he){return this.find(he,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=O.manifest[U].get($.identHash);if(typeof ge>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ge.descriptorHash!==$.descriptorHash)O.manifest[U].set($.identHash,$),T.push([O,U,ge,$]);else{let he=r.makeResolver(),Ce={project:s,resolver:he},Ee=r.normalizeDependency(ge),d=he.bindDescriptor(Ee,O.anchoredLocator,Ce);s.forgetResolution(d)}}return await r.triggerMultipleHooks(O=>O.afterWorkspaceDependencyReplacement,T),I&&this.context.stdout.write(`
`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ge();Ge();jt();var RC=class extends ft{constructor(){super(...arguments);this.recursive=pe.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=pe.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=pe.String()}static{this.paths=[["why"]]}static{this.usage=it.Usage({description:"display the reason why a package is needed",details:`
This command prints the exact reasons why a package appears in the dependency tree. Specify a version or range to determine why the dependency tree contains a specific version of a package. This is particularly useful when trying to find out why your project depends on lower versions.
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
`,examples:[["Explain why lodash is used in your project","$0 why lodash"],["Explain why version 3.3.1 of lodash is in your project","$0 why lodash@3.3.1"],["Explain why version 3.X of lodash is in your project","$0 why lodash@^3"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=j.parseDescriptor(this.package,!1);if(n.range!=="unknown"&&kr.validRange(n.range)===null)throw new st(`Expected a valid semver range, got ${n.range}`);let c=this.recursive?xot(s,n,{configuration:r,peers:this.peers}):Pot(s,n,{configuration:r,peers:this.peers});ts.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function Pot(e,t,{configuration:r,peers:s}){let a=qe.sortMap(e.storedPackages.values(),f=>j.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error("Assertion failed: The resolution should have been registered");let S=e.storedPackages.get(C);if(!S)throw new Error("Assertion failed: The package should have been registered");if(!j.areIdentsEqual(S,t)||!j.isPackageInRange(S,t.range))continue;{let I=j.stringifyLocator(f);n[I]={value:[f,ce.Type.LOCATOR],children:p}}let x=j.stringifyLocator(S);p[x]={value:[{descriptor:E,locator:S},ce.Type.DEPENDENT]}}}return c}function xot(e,t,{configuration:r,peers:s}){let a=qe.sortMap(e.workspaces,S=>j.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),j.areIdentsEqual(S,t)&&j.isPackageInRange(S,t.range))return c.add(S.locatorHash),!0;let x=!1;for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let T=e.storedResolutions.get(I.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let O=e.storedPackages.get(T);if(!O)throw new Error("Assertion failed: The package should have been registered");f(O)&&(x=!0)}return x&&c.add(S.locatorHash),x};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,x,I)=>{if(!c.has(S.locatorHash))return;let T=I!==null?ce.tuple(ce.Type.DEPENDENT,{locator:S,descriptor:I}):ce.tuple(ce.Type.LOCATOR,S),O={},U={value:T,children:O},V=j.stringifyLocator(S);if(x[V]=U,!(I!==null&&e.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let $ of S.dependencies.values()){if(!s&&S.peerDependencies.has($.identHash))continue;let ie=e.storedResolutions.get($.descriptorHash);if(!ie)throw new Error("Assertion failed: The resolution should have been registered");let fe=e.storedPackages.get(ie);if(!fe)throw new Error("Assertion failed: The package should have been registered");C(fe,O,$)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ge();var O5={};Vt(O5,{GitFetcher:()=>sS,GitResolver:()=>oS,default:()=>zot,gitUtils:()=>Ma});Ge();bt();var Ma={};Vt(Ma,{TreeishProtocols:()=>iS,clone:()=>N5,fetchBase:()=>jge,fetchChangedFiles:()=>Gge,fetchChangedWorkspaces:()=>Kot,fetchRoot:()=>Hge,isGitUrl:()=>NC,lsRemote:()=>_ge,normalizeLocator:()=>Vot,normalizeRepoUrl:()=>TC,resolveUrl:()=>F5,splitRepoUrl:()=>Zp,validateRepoUrl:()=>T5});Ge();bt();jt();Xl();var Mge=et(Nge()),FC=et(Ie("querystring")),Q5=et(hi());function k5(e,t,r){let s=e.indexOf(r);return e.lastIndexOf(t,s>-1?s:1/0)}function Oge(e){try{return new URL(e)}catch{return}}function Yot(e){let t=k5(e,"@","#"),r=k5(e,":","#");return r>t&&(e=`${e.slice(0,r)}/${e.slice(r+1)}`),k5(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`ssh://${e}`),e}function Lge(e){return Oge(e)||Oge(Yot(e))}function TC(e,{git:t=!1}={}){if(e=e.replace(/^git\+https:/,"https:"),e=e.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),e=e.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let r=Lge(e);r&&(e=r.href),e=e.replace(/^git\+([^:]+):/,"$1:")}return e}function Uge(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Wot=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],iS=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(iS||{});function NC(e){return e?Wot.some(t=>!!e.match(t)):!1}function Zp(e){e=TC(e);let t=e.indexOf("#");if(t===-1)return{repo:e,treeish:{proto Line truncated
This command will run a given sub-command on a single workspace.
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[j.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new st(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
- ${p.join(`
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var Xot={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:qge.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[eC,tC,rC,nC,xC,IC,AC,OC,oC,aC,lC,cC,ZI,$I,iC,sC,uC,fC,pC,hC,dC,gC,kC,mC,yC,wC,CC,BC,EC,vC,SC,bC,DC,PC,QC,RC,LC]},Zot=Xot;var H5={};Vt(H5,{default:()=>rat});Ge();Ge();var M5="catalog:";var U5=e=>e.startsWith(M5),$ot=e=>e.range.slice(M5.length)||null,Yge=e=>e===null?"default catalog":`catalog "${e}"`,eat=e=>e.scope?`@${e.scope}/${e.name}`:e.name,_5=(e,t,r,s)=>{let a=$ot(t),n;if(a===null)n=e.configuration.get("catalog");else try{let E=e.configuration.get("catalogs");E&&(n=E.get(a))}catch{n=void 0}if(!n||n.size===0)throw new Lt(82,`${j.prettyDescriptor(e.configuration,t)}: ${Yge(a)} not found or empty`);let c=eat(t),f=n.get(c);if(!f)throw new Lt(82,`${j.prettyDescriptor(e.configuration,t)}: entry not found in ${Yge(a)}`);let p=e.configuration.normalizeDependency(j.makeDescriptor(t,f));return r.supportsDescriptor(p,s)?r.bindDescriptor(p,e.topLevelWorkspace.anchoredLocator,s):p};var tat={configuration:{catalog:{description:"The default catalog of packages",type:"MAP",valueDefinition:{description:"The catalog of packages",type:"STRING"}},catalogs:{description:"Named catalogs of packages",type:"MAP",valueDefinition:{description:"A named catalog",type:"MAP",valueDefinition:{description:"Package version in the catalog",type:"STRING"}}}},hooks:{beforeWorkspacePacking:(e,t)=>{let r=e.project,s=r.configuration.makeResolver(),a={project:r,resolver:s,report:new Qi};for(let n of _t.allDependencies){let c=t[n];if(c)for(let[f,p]of Object.entries(c)){if(typeof p!="string"||!U5(p))continue;let h=j.parseIdent(f),E=j.makeDescriptor(h,p),C=_5(r,E,s,a),{protocol:S,source:x,params:I,selector:T}=j.parseRange(j.convertToManifestRange(C.range));S===e.project.configuration.get("defaultProtocol")&&(S=null),c[f]=j.makeRange({protocol:S,source:x,params:I,selector:T})}}},reduceDependency:async(e,t,r,s,{resolver:a,resolveOptions:n})=>U5(e.range)?_5(t,e,a,n):e}},rat=tat;var W5={};Vt(W5,{default:()=>iat});Ge();var Qt={optional:!0},j5=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],Line truncated
This command will output all matches to the given prolog query.
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(AS(),fS)),s=await Je.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(".")||(c=`${c}.`),(await Ft.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((x,[I])=>Math.max(x,I.length),0);for(let x=0;x<C;x++){let[I,T]=E[x];p.reportInfo(null,`${Cat(x,C)}${I.padEnd(S," ")} = ${Iat(T)}`)}p.reportJson(h)}})).exitCode()}};function Iat(e){return typeof e!="string"?`${e}`:e.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?e:`'${e}'`}function Cat(e,t){let r=e===0,s=e===t-1;return r&&s?"":r?"\u250C ":s?"\u2514 ":"\u2502 "}Ge();jt();var qC=class extends ft{constructor(){super(...arguments);this.verbose=pe.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}static{this.paths=[["constraints","source"]]}static{this.usage=it.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(AS(),fS)),s=await Je.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ge();Ge();jt();lS();var YC=class extends ft{constructor(){super(...arguments);this.fix=pe.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=it.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new UC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(AS(),fS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=YT(s,E,{fix:this.fix}),x=[];for(let[I,T]of C){let O=I.manifest.indent;I.manifest=new _t,I.manifest.indent=O,I.manifest.load(T),x.push(I.persistManifest())}if(await Promise.all(x),!(C.size>0&&h>1)){c=zge(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let T of I)T.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${ce.pretty(r,"yarn constraints --fix",ce.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${ce.pretty(r,"yarn constraints --fix",ce.Type.CODE)}`;await Ft.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=qe.sortMap(c.children,h=>h.value[1]),ts.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};lS();var wat={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[GC,qC,YC],hooks:{async validateProjectAfterInstall(e,{reportError:t}){if(!e.configuration.get("enableConstraintsChecks"))return;let r=await e.loadUserConfig(),s;if(r?.constraints)s=new UC(e);else{let{Constraints:c}=await Promise.resolve().then(()=>(AS(),fS));s=await c.find(e)}let a=await s.process();if(!a)return;let{remainingErrors:n}=YT(e,a);if(n.size!==0)if(e.configuration.isCI)for(let[c,f]of n)for(let p of f)t(84,`${ce.pretty(e.configuration,c.anchoredLocator,ce.Type.IDENT)}: ${p.text}`);else t(84,`Constraint check failed; run ${ce.pretty(e.configuration,"yarn constraints",ce.Type.CODE)} for more details`)}}},Bat=wat;var u9={};Vt(u9,{CreateCommand:()=>WC,DlxCommand:()=>VC,default:()=>Sat});Ge();jt();var WC=class extends ft{constructor(){super(...arguments);this.pkg=pe.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=pe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=pe.String();this.args=pe.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let s=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=j.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?j.makeIdent(a.scope,`create-${a.name}`):j.makeIdent(null,`create-${a.name}`),c=j.stringifyIdent(n);return a.range!=="unknown"&&(c+=`@${a.range}`),this.cli.run(["dlx",...r,c,...this.args])}};Ge();Ge();bt();jt();var VC=class extends ft{constructor(){super(...arguments);this.packages=pe.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=pe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=pe.String();this.args=pe.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=it.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-vite to scaffold a new Vite project","yarn dlx create-vite"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return Je.telemetry=null,await le.mktempPromise(async r=>{let s=K.join(r,`dlx-${process.pid}`);await le.mkdirPromise(s),await le.writeFilePromise(K.join(s,"package.json"),`{}
`),await le.writeFilePromise(K.join(s,"yarn.lock"),"");let a=K.join(s,".yarnrc.yml"),n=await Je.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await Je.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:zf(68),level:ce.LogLevel.Discard}]},p=n!==null?K.join(n,".yarnrc.yml"):null;p!==null&&le.existsSync(p)?(await le.copyFilePromise(p,a),await Je.updateConfiguration(s,O=>{let U=qe.toMerged(O,f);return Array.isArray(O.plugins)&&(U.plugins=O.plugins.map(V=>{let $=typeof V=="string"?V:V.path,ie=Ae.isAbsolute($)?$:Ae.resolve(Ae.fromPortablePath(n),$);return typeof V=="string"?ie:{path:ie,spec:V.spec}})),U})):await le.writeJsonPromise(a,f);let h=this.packages??[this.command],E=j.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`
`);let S=await Je.find(s,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,s);if(I===null)throw new ar(x.cwd,s);await x.restoreInstallState();let T=await wn.getWorkspaceAccessibleBinaries(I);return T.has(E)===!1&&T.size===1&&typeof this.packages>"u"&&(E=Array.from(T)[0][0]),await wn.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var vat={commands:[WC,VC]},Sat=vat;var p9={};Vt(p9,{ExecFetcher:()=>hS,ExecResolver:()=>dS,default:()=>Pat,execUtils:()=>JT});Ge();Ge();Ge();bt();var AA="exec:";var JT={};Vt(JT,{loadGeneratorFile:()=>pS,makeLocator:()=>A9,makeSpec:()=>wme,parseSpec:()=>f9});Ge();bt();function f9(e){let{params:t,selector:r}=j.parseRange(e),s=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?j.parseLocator(t.locator):null,path:s}}function wme({parentLocator:e,path:t,generatorHash:r,protocol:s}){let a=e!==null?{locator:j.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:s,source:t,selector:t,params:{...n,...a}})}function A9(e,{parentLocator:t,path:r,generatorHash:s,protocol:a}){return j.makeLocator(e,wme({parentLocator:t,path:r,generatorHash:s,protocol:a}))}async function pS(e,t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(e,{protocol:t}),n=K.isAbsolute(a)?{packageFs:new Pn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Pn(vt.root),prefixPath:K.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.join(c.prefixPath,a);return await f.readFilePromise(p,"utf8")}var hS=class{supports(t,r){return!!t.reference.startsWith(AA)}getLocalPath(t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(t.reference,{protocol:AA});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:c}}async fetchFromDisk(t,r){let s=r.project.getDependencyMeta(t,null);if(!r.project.configuration.get("enableScripts")&&!s.built)throw new Lt(4,`${j.prettyLocator(r.project.configuration,t)} can't be built with the exec: protocol because all scripts have been disabled.`);let a=await pS(t.reference,AA,r);return le.mktempPromise(async n=>{let c=K.join(n,"generator.js");return await le.writeFilePromise(c,a),le.mktempPromise(async f=>{if(await this.generatePackage(f,t,c,r),!le.existsSync(K.join(f,"build")))throw new Error("The script should have generated a build directory");return await ms.makeArchiveFromDirectory(K.join(f,"build"),{prefixPath:j.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(t,r,s,a){return await le.mktempPromise(async n=>{let c=await wn.makeScriptEnv({project:a.project,binFolder:n}),f=K.join(t,"runtime.js");return await le.mktempPromise(async p=>{let h=K.join(p,"buildfile.log"),E=K.join(t,"generator"),C=K.join(t,"build");await le.mkdirPromise(E),await le.mkdirPromise(C);let S={tempDir:Ae.fromPortablePath(E),buildDir:Ae.fromPortablePath(C),locator:j.stringifyLocator(r)};await le.writeFilePromise(f,`
// Expose 'Module' as a global variable
Object.defineProperty(global, 'Module', {
get: () => require('module'),
configurable: true,
enumerable: false,
});
// Expose non-hidden built-in modules as global variables
for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
Object.defineProperty(global, name, {
get: () => require(name),
configurable: true,
enumerable: false,
});
}
// Expose the 'execEnv' global variable
Object.defineProperty(global, 'execEnv', {
value: {
...${JSON.stringify(S)},
},
enumerable: true,
});
`);let x=c.NODE_OPTIONS||"",I=/\s*--require\s+\S*\.pnp\.c?js\s*/g;x=x.replace(I," ").trim(),c.NODE_OPTIONS=x;let{stdout:T,stderr:O}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${j.stringifyLocator(r)})
`,prefix:j.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Yr.pipevp(process.execPath,["--require",Ae.fromPortablePath(f),Ae.fromPortablePath(s),j.stringifyIdent(r)],{cwd:t,env:c,stdin:null,stdout:T,stderr:O});if(U!==0)throw le.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${ce.pretty(a.project.configuration,h,ce.Type.PATH)})`)})})}};Ge();Ge();Ge();var bat=2,dS=class{supportsDescriptor(t,r){return!!t.range.startsWith(AA)}supportsLocator(t,r){return!!t.reference.startsWith(AA)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){if(s.project.tryWorkspaceByLocator(r)===null)throw new Lt(57,`${j.prettyLocator(s.project.configuration,r)} lists ${j.prettyDescriptor(s.project.configuration,t)} as dependency, but only workspaces can depend on exec: packages.`);return j.bindDescriptor(t,{locator:j.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=f9(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await pS(j.makeRange({protocol:AA,source:a,selector:a,params:{locator:j.stringifyLocator(n)}}),AA,s.fetchOptions),f=Mn.makeHash(`${bat}`,c).slice(0,6);return[A9(t,{parentLocator:n,path:a,generatorHash:f,protocol:AA})]}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await qe.releaseAfterUseAsync(async()=>await _t.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Dat={fetchers:[hS],resolvers:[dS]},Pat=Dat;var d9={};Vt(d9,{FileFetcher:()=>ES,FileResolver:()=>IS,TarballFileFetcher:()=>CS,TarballFileResolver:()=>wS,default:()=>Qat,fileUtils:()=>Nm});Ge();bt();var KC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,gS=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,rs="file:";var Nm={};Vt(Nm,{fetchArchiveFromLocator:()=>yS,makeArchiveFromLocator:()=>zT,makeBufferFromLocator:()=>h9,makeLocator:()=>JC,makeSpec:()=>Bme,parseSpec:()=>mS});Ge();bt();function mS(e){let{params:t,selector:r}=j.parseRange(e),s=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?j.parseLocator(t.locator):null,path:s}}function Bme({parentLocator:e,path:t,hash:r,protocol:s}){let a=e!==null?{locator:j.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:s,source:t,selector:t,params:{...n,...a}})}function JC(e,{parentLocator:t,path:r,hash:s,protocol:a}){return j.makeLocator(e,Bme({parentLocator:t,path:r,hash:s,protocol:a}))}async function yS(e,t){let{parentLocator:r,path:s}=j.parseFileStyleRange(e.reference,{protocol:rs}),a=K.isAbsolute(s)?{packageFs:new Pn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await t.fetcher.fetch(r,t),n=a.localPath?{packageFs:new Pn(vt.root),prefixPath:K.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=K.join(n.prefixPath,s);return await qe.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function zT(e,{protocol:t,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=j.parseFileStyleRange(e.reference,{protocol:t}),c=K.isAbsolute(n)?{packageFs:new Pn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Pn(vt.root),prefixPath:K.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=K.join(f.prefixPath,n);return await qe.releaseAfterUseAsync(async()=>await ms.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:j.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),f.releaseFs)}async function h9(e,{protocol:t,fetchOptions:r}){return(await zT(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var ES=class{supports(t,r){return!!t.reference.startsWith(rs)}getLocalPath(t,r){let{parentLocator:s,path:a}=j.parseFileStyleRange(t.reference,{protocol:rs});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFro Line truncated
`,{automaticNewlines:!0});let h=[p],E=K.join(this.context.cwd,"README.md");if(le.existsSync(E)||(await le.writeFilePromise(E,`# ${j.stringifyIdent(n.name)}
`),h.push(E)),!s||s.cwd===this.context.cwd){let C=K.join(this.context.cwd,Ir.lockfile);le.existsSync(C)||(await le.writeFilePromise(C,""),h.push(C));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(fe=>`${fe}
`).join(""),I=K.join(this.context.cwd,".gitignore");le.existsSync(I)||(await le.writeFilePromise(I,x),h.push(I));let O=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(fe=>`${fe}
`).join(""),U=K.join(this.context.cwd,".gitattributes");le.existsSync(U)||(await le.writeFilePromise(U,O),h.push(U));let V={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};qe.mergeIntoTarget(V,r.get("initEditorConfig"));let $=`root = true
`;for(let[fe,ae]of Object.entries(V)){$+=`
[${fe}]
`;for(let[ge,he]of Object.entries(ae)){let Ce=ge.replace(/[A-Z]/g,Ee=>`_${Ee.toLowerCase()}`);$+=`${Ce} = ${he}
`}}let ie=K.join(this.context.cwd,".editorconfig");le.existsSync(ie)||(await le.writeFilePromise(ie,$),h.push(ie)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),le.existsSync(K.join(this.context.cwd,".git"))||(await Yr.execvp("git",["init"],{cwd:this.context.cwd}),await Yr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Yr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var zC=class extends X0{constructor(){super(...arguments);this.initializer=pe.String();this.argv=pe.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(`
`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var Oat={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[X0,zC]},Lat=Oat;var mY={};Vt(mY,{SearchCommand:()=>hw,UpgradeInteractiveCommand:()=>dw,default:()=>Vpt});Ge();var Pme=et(Ie("os"));function XC({stdout:e}){if(Pme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!e.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}jt();var _ye=et(M9()),U9={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Fct=(0,_ye.default)(U9.appId,U9.apiKey).initIndex(U9.indexName),_9=async(e,t=0)=>await Fct.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10});var bb=["regular","dev","peer"],hw=class extends ft{static{this.paths=[["search"]]}static{this.usage=it.Usage({category:"Interactive commands",description:"open the search interface",details:`
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
`,examples:[["Open the search window","yarn search"]]})}async execute(){XC(this.context);let{Gem:t}=await Promise.resolve().then(()=>(RF(),oY)),{ScrollableItems:r}=await Promise.resolve().then(()=>(OF(),NF)),{useKeypress:s}=await Promise.resolve().then(()=>(pw(),aY)),{useMinistore:a}=await Promise.resolve().then(()=>(AY(),fY)),{renderForm:n}=await Promise.resolve().then(()=>(_F(),UF)),{default:c}=await Promise.resolve().then(()=>et(Swe())),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Yc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>et(dn())),S=await Je.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(f,{flexDirection:"row"},h.createElement(f,{flexDirection:"column",width:48},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),T=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),O=({hit:he,active:Ce})=>{let[Ee,d]=a(he.name,null);s({active:Ce},(me,ue)=>{if(ue.name!=="space")return;if(!Ee){d(bb[0]);return}let Z=bb.indexOf(Ee)+1;Z===bb.length?d(null):d(bb[Z])},[Ee,d]);let Se=j.parseIdent(he.name),Be=j.prettyIdent(S,Se);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Be)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},he.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},he.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,he.humanDownloadsLast30Days)))},U=({name:he,active:Ce})=>{let[Ee]=a(he,null),d=j.parseIdent(he);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0}," - ",j.prettyIdent(S,d))),bb.map(Se=>h.createElement(f,{key:Se,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(t,{active:Ee===Se})," ",h.createElement(p,{bold:!0},Se)))))},V=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ie=await n(({useSubmit:he})=>{let Ce=a();he(Ce);let Ee=Array.from(Ce.keys()).filter(_=>Ce.get(_)!==null),[d,Se]=C(""),[Be,me]=C(0),[ue,Z]=C([]),be=_=>{_.match(/\t| /)||Se(_)},Qe=async()=>{me(0);let _=await _9(d);_.query===d&&Z(_.hits)},ot=async()=>{let _=await _9(d,Be+1);_.query===d&&_.page-1===Be&&(me(_.page),Z([...ue,..._.hits]))};return E(()=>{d?Qe():Z([])},[d]),h.createElement(f,{flexDirection:"column"},h.createElement(x,null),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(f,{width:41},h.createElement(c,{value:d,onChange:be,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(I,null)),ue.length?h.createElement(r,{radius:2,loop:!1,children:ue.map(_=>h.createElement(O,{key:_.name,hit:_,active:!1})),willReachEnd:ot}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(T,null)),Ee.length?Ee.map(_=>h.createElement(U,{key:_,name:_,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(V,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>"u")return 1;let fe=Array.from(ie.keys()).filter(he=>ie.get(he)==="regular"),ae=Array.from(ie.keys()).filter(he=>ie.get(he)==="dev"),ge=Array.from(ie.keys()).filter(he=>ie.get(he)==="peer");return fe.length&&await this.cli.run(["add",...fe]),ae.length&&await this.cli.run(["add","--dev",...ae]),ge&&await this.cli.run(["add","--peer",...ge]),0}};Ge();jt();dG();var Rwe=et(hi());Jo();var Qwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function Twe(e,t){return e.length>0?[e.slice(0,t)].concat(Twe(e.slice(t),t)):[]}var dw=class extends ft{constructor(){super(...arguments);this.mode=pe.String("--mode",{description:"Change what artifacts installs genera Line truncated
${E}, next tree:
${Tb(f)}`);let S=Lwe(f);if(S)throw new Error(`${S}, after hoisting finished:
${Tb(f)}`)}return n.debugLevel>=2&&console.log(Tb(f)),aht(f)},eht=e=>{let t=e[e.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(t),r},tht=e=>{let t=e[e.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of e)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(t,a),r},Nwe=(e,t)=>{if(t.decoupled)return t;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:x,hoistedFrom:I,hoistedTo:T}=t,O={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:x,hoistedFrom:new Map(I),hoistedTo:new Map(T)},U=O.dependencies.get(r);return U&&U.ident==O.ident&&O.dependencies.set(r,O),e.dependencies.set(O.name,O),O},rht=(e,t)=>{let r=new Map([[e.name,[e.ident]]]);for(let a of e.dependencies.values())e.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(t.keys());s.sort((a,n)=>{let c=t.get(a),f=t.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!e.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},CY=e=>{let t=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!e.peerNames.has(n)){let c=e.dependencies.get(n);c&&!t.has(c)&&r(c,a)}t.add(s)}};for(let s of e.dependencies.values())e.peerNames.has(s.name)||r(s);return t},BY=(e,t,r,s,a,n=new Set)=>{let c=t[t.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=lht(c),p=rht(c,f),h=e==c?new Map:a.fastLookupPossible?eht(t):tht(t),E,C=!1,S=!1,x=new Map(Array.from(p.entries()).map(([T,O])=>[T,O[0]])),I=new Map;do{let T=sht(e,t,r,h,x,p,s,I,a);T.isGraphChanged&&(S=!0),T.anotherRoundNeeded&&(C=!0),E=!1;for(let[O,U]of p)U.length>1&&!c.dependencies.has(O)&&(x.delete(O),U.shift(),x.set(O,U[0]),E=!0)}while(E);for(let T of c.dependencies.values())if(!c.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let O=BY(e,[...t,T],r,I,a);O.isGraphChanged&&(S=!0),O.anotherRoundNeeded&&(C=!0),r.delete(T.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},nht=e=>{for(let[t,r]of e.dependencies)if(!e.peerNames.has(t)&&r.ident!==e.ident)return!0;return!1},iht=(e,t,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(t).map(O=>So(O)).join("\u2192")}`);let x=r[r.length-1],T=!(s.ident===x.ident);if(p&&!T&&(C="- self-reference"),T&&(T=s.dependencyKind!==1,p&&!T&&(C="- workspace")),T&&s.dependencyKind===2&&(T=!nht(s),p&&!T&&(C="- external soft link with unhoisted dependencies")),T&&(T=!e.peerNames.has(s.name),p&&!T&&(C=`- cannot shadow peer: ${So(e.originalDependencies.get(s.name).locator)} at ${E}`)),T){let O=!1,U=a.get(s.name);if(O=!U||U.ident===s.ident,p&&!O&&(C=`- filled by: ${So(U.locator)} at ${E}`),O)for(let V=r.length-1;V>=1;V--){let ie=r[V].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){O=!1;let fe=f.get(x);fe||(fe=new Set,f.set(x,fe)),fe.add(s.name),p&&(C=`- filled by ${So(ie.locator)} at ${r.slice(0,V).map(ae=>So(ae.locator)).join("\u2192")}`);break}}T=O}if(T&&(T=n.get(s.name)===s.ident,p&&!T&&(C=`- filled by: ${So(c.get(s.name)[0])} at ${E}`)),T){let O=!0,U=new Set(s.peerNames);for(let V=r.length-1;V>=1;V--){let $=r[V];for(let ie of U){if($.peerNames.has(ie)&&$.originalDependencies.has(ie))continue;let fe=$.dependencies.get(ie);fe&&e.dependencies.get(ie)!==fe&&(V===r.length-1?S.add(fe):(S=null,O=!1,p&&(C=`- peer dependency ${So(fe.locator)} from parent ${So($.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!O)break}T=O}if(T&&!h)for(let O of s.hoistedDependencies.values()){let U=a.get(O.name)||e.dependencies.get(O.name);if(!U||O.ident!==U.ident){T=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${So(O.locator)}, available: ${So(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:T?0:1,reason:C}},GF=e=>`${e.name}@${e.locator}`,sht=(e,t,r,s,a,n,c,f,p)=>{let h=t[t.length-1],E=new Set,C=!1,S=!1,x=(U,V,$,ie,fe)=>{if(E.has(ie))return;let ae=[...V,GF(ie)],ge=[...$,GF(ie)],he=new Map,Ce=new Map;for(let me of CY(ie)){let ue=iht(h,r,[h,...U,ie],me,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Ce.set(me,ue),ue.isHoistable===2)for(let Z of ue.dependsOn){let be=he. Line truncated
${Tb(e)}`)}let Be=CY(ie);for(let me of Be)if(Ee.has(me)){let ue=Ce.get(me);if((a.get(me.name)===me.ident||!ie.reasons.has(me.name))&&ue.isHoistable!==0&&ie.reasons.set(me.name,ue.reason),!me.isHoistBorder&&ge.indexOf(GF(me))<0){E.add(ie);let be=Nwe(ie,me);x([...U,ie],ae,ge,be,T),E.delete(ie)}}},I,T=new Set(CY(h)),O=Array.from(t).map(U=>GF(U));do{I=T,T=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let V=Nwe(h,U);x([],Array.from(r),O,V,T)}}while(T.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},Lwe=e=>{let t=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>So(S.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&t.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(", ")}`:""}`,T=`${x?` hoisted to ${x}`:""}`,O=`${C()}${I}`;E?E.ident!==h.ident&&t.push(`${O} - broken require promise for ${h.name}${T}: expected ${h.ident}, but found: ${E.ident}`):t.push(`${O} - broken require promise: no required dependency ${h.name}${T} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(e,e.dependencies,e),t.join(`
`)},oht=(e,t)=>{let{identName:r,name:s,reference:a,peerNames:n}=e,c={name:s,references:new Set([a]),locator:wY(r,a),ident:Fwe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[e,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:x,identName:I,reference:T,peerNames:O,hoistPriority:U,dependencyKind:V}=h,$=t.hoistingLimits.get(E.locator);C={name:x,references:new Set([T]),locator:wY(I,T),ident:Fwe(I,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(O),reasons:new Map,decoupled:!0,isHoistBorder:$?$.has(x):!1,hoistPriority:U||0,dependencyKind:V||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let x=new Set,I=T=>{if(!x.has(T)){x.add(T),T.decoupled=!1;for(let O of T.dependencies.values())T.peerNames.has(O.name)||I(O)}};I(C)}else for(let x of h.dependencies)p(x,C)};for(let h of e.dependencies)p(h,c);return c},vY=e=>e.substring(0,e.indexOf("@",1)),aht=e=>{let t={name:e.name,identName:vY(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:vY(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of e.dependencies.values())s(a,e,t);return t},lht=e=>{let t=new Map,r=new Set([e]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=t.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},t.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of e.dependencies.values())e.peerNames.has(c.name)||n(e,c);return t},So=e=>{if(!e)return"none";let t=e.indexOf("@",1),r=e.substring(0,t);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=e.substring(t+1);if(s==="workspace:.")return".";if(s){let a=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var Tb=e=>{let t=0,r=(a,n,c="")=>{if(t>5e4||n.has(a))return"";t++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let C=a.reasons.get(E.name),S=vY(E.locator);p+=`${c}${h<f.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(S!==E.name?`a:${E.name}:`:"")+So(E.locator)+(C?` ${C}`:"")}
`,p+=r(E,n,`${c}${h<f.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(e,new Set)+(t>5e4?`
Tree is too large, part of the tree has been dunped
`:"")};var Fb=(s=>(s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none",s))(Fb||{}),Mwe="node_modules",nd="$wsroot$";var Nb=(e,t)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=uht(e,t),c=null;if(a.length===0){let f=Owe(r,{hoistingLimits:s});c=Aht(e,f,t)}return{tree:c,errors:a,preserveSymlinksRequired:n}},gA=e=>`${e.name}@${e.reference}`,bY=e=>{let t=new Map;for(let[r,s]of e.entries())if(!s.dirList){let a=t.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},t.set(s.locator,a)),a.locations.push(r)}for(let r of t.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(K.delimiter).length,c=a.split(K.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return t},Uwe=(e,t)=>{let r=j.isVirtualLocator(e)?j.devirtualizeLocator(e):e,s=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t;return j.areLocatorsEqual(r,s)},SY=(e,t,r,s)=>{if(e.linkType!=="SOFT")return!1;let a=Ae.toPortablePath(r.resolveVirtual&&t.reference&&t.reference.startsWith("virtual:")?r.resolveVirtual(e.packageLocation):e.packageLocation);return K.contains(s,a)===null},cht=e=>{let t=e.getPackageInformation(e.topLevel);if(t===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(e.findPackageLocator(t.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=Ae.toPortablePath(t.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=e.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,x)=>{let I=gA(S);if(p.has(I))return;p.add(I);let T=e.getPackageInformation(S);if(T){let O=x?gA(x):"";if(gA(S)!==O&&T.linkType==="SOFT"&&!S.reference.startsWith("link:")&&!SY(T,S,e,s)){let U=_we(T,S,e);(!f.get(U)||S.reference.startsWith("workspace:"))&&f.set(U,S)}for(let[U,V]of T.packageDependencies)V!==null&&(T.packagePeers.has(U)||h(e.getLocator(U,V),S))}};for(let S of c)h(S,null);let E=s.split(K.sep);for(let S of f.values()){let x=e.getPackageInformation(S),T=Ae.toPortablePath(x.packageLocation.slice(0,-1)).split(K.sep).slice(E.length),O=n;for(let U of T){let V=O.children.get(U);V||(V={children:new Map},O.children.set(U,V)),O=V}O.workspaceLocator=S}let C=(S,x)=>{if(S.workspaceLocator){let I=gA(x),T=a.get(I);T||(T=new Set,a.set(I,T)),T.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||x)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},uht=(e,t)=>{let r=[],s=!1,a=new Map,n=cht(e),c=e.getPackageInformation(e.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=e.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=Ae.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(x,I)=>`${gA(I)}:${x}`,S=(x,I,T,O,U,V,$,ie)=>{let fe=C(x,T),ae=E.get(fe),ge=!!ae;!ge&&T.name===f.name&&T.reference===f.reference&&(ae=h,E.set(fe,h));let he=SY(I,T,e,p);if(!ae){let me=0;he?me=2:I.linkType==="SOFT"&&T.name.endsWith(nd)&&(me=1),ae={name:x,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:me===1?new Set:I.packagePeers,dependencyKind:me},E.set(fe,ae)}let Ce;if(he?Ce=2:U.linkType==="SOFT"?Ce=1:Ce=0,ae.hoistPriority=Math.max(ae.hoistPriority||0,Ce),ie&&!he){let me=gA({name:O.identName,reference:O.reference}),ue=a.get(me)||new Set;a.set(me,ue),ue.add(ae.name)}let Ee=new Map(I.packageDependencies);if(t.project){let me=t.project.workspacesByCwd.get(Ae.toPortablePath(I.packageLocation.slice(0,-1)));if(me){let ue=new Set([...Array.from(me.manifest.peerDependencies.values(),Z=>j.stringifyIdent(Z)),...Array.from(me.manifest.peerDependenciesMeta.keys())]);for(let Z of ue)Ee.has(Z)||(Ee.set(Z,V.get(Z)||null),ae.peerNames.add(Z))}}let d=gA({name:T.name.replace(nd,""),reference:T.reference}),Se=n.get(d);if(Se)for(let me of Se)Ee.set(`${me.name}${nd}`,me.reference);(I!==U||I.linkType!=="SOFT"||!he&&(!t.selfReferencesByCwd||t.selfReferencesByCwd.get($)))&&O.dependencies.add(ae);let Be=T!==f&&I.linkType==="SOFT"&&!T.name.endsWith(nd)&&!he;if(!ge&&!Be){let me=new Map;for(let[ue,Z]of Ee)if(Z!==null){let be=e.getLocator(ue,Z),Qe=e.getLocator(ue.replace(nd,""),Z),ot=e.getPackageInformation(Qe);if(ot===null)throw new Error("Assertion failed: Expected the package to have been registered");let _=SY(ot,be,e,p);if(t.validateExternalSoftLinks&&t.project&&_){ot.packageDependencies.size>0&&(s=!0);for(let[je,Re]of ot.packageDependencies)if(Re!==null){let ct=j.parseLocator(Array.isArray(Re)?`${Re[0]}@${Re[1]}`:`${je}@${Re}`);if(gA(ct)!==gA(be)){let Me=Ee.get(je);if(Me){let P=j.parseLocator(Array.isArray(Me)?`${Me[0]}@${Me[1]}`:`${je}@${Me}`);Uwe(P,ct)||r.push({messageName:71,text:`Cannot link ${j.prettyIdent(t.project.configuration,j.parseIdent(be.name))} into ${j.prettyLine truncated
`;for(let n=0,c=e.length;n<c;++n)a+=s+qF(String(n),e[n],t,s).replace(/^ +/,""),n+1<c&&(a+=","),a+=`
`;return a+=r,a+="]",a}function dht(e,t,r){let s=Object.keys(e),a="";a+="{";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=e[p];typeof h>"u"||(f!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=qF(p,h,t,r).replace(/^ +/g,""),f+=1)}return a+="}",a}function ght(e,t,r){let s=Object.keys(e),a=`${r} `,n="";n+=r,n+=`{
`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=e[h];typeof E>"u"||(c!==0&&(n+=",",n+=`
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=qF(h,E,t,a).replace(/^ +/g,""),c+=1)}return c!==0&&(n+=`
`),n+=r,n+="}",n}function qF(e,t,r,s){let{next:a}=Hwe[r],n=a[e]||a["*"];return jwe(t,n,s)}function jwe(e,t,r){let{collapsed:s}=Hwe[t];return Array.isArray(e)?s?pht(e,t,r):hht(e,t,r):typeof e=="object"&&e!==null?s?dht(e,t,r):ght(e,t,r):JSON.stringify(e)}function Gwe(e){return jwe(e,"TOP_LEVEL","")}function Ob(e,t){let r=Array.from(e);Array.isArray(t)||(t=[t]);let s=[];for(let n of t)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function mht(e){let t=new Map,r=Ob(e.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=t.get(s);typeof n>"u"&&t.set(s,n=new Set),n.add(a)}return Array.from(t).map(([s,a])=>[s,Array.from(a)])}function yht(e){return Ob(e.fallbackPool||[],([t])=>t)}function Eht(e){let t=[],r=e.dependencyTreeRoots.find(s=>e.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation==="./");for(let[s,a]of Ob(e.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(s===null)continue;let n=[];t.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of Ob(a,([S])=>S===null?"0":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,V]of p)S.push([U,V]);let x=Ob(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,O={packageLocation:f,packageDependencies:x,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,O]),r&&s===r.name&&c===r.reference&&t.unshift([null,[[null,O]]])}}return t}function Lb(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,pnpZipBackend:e.pnpZipBackend,fallbackExclusionList:mht(e),fallbackPool:yht(e),packageRegistryData:Eht(e)}}var Wwe=et(Ywe());function Vwe(e,t){return[e?`${e}
`:"",`/* eslint-disable */
`,`// @ts-nocheck
`,`"use strict";
`,`
`,t,`
`,(0,Wwe.default)()].join("")}function Iht(e){return JSON.stringify(e,null,2)}function Cht(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
`)}'`}function wht(e){return[`const RAW_RUNTIME_STATE =
`,`${Cht(Gwe(e))};
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
`,`}
`].join("")}function Bht(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` const fs = require('fs');
`,` const path = require('path');
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Ir.pnpData)});
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
`,`}
`].join("")}function Kwe(e){let t=Lb(e),r=wht(t);return Vwe(e.shebang,r)}function Jwe(e){let t=Lb(e),r=Bht(),s=Vwe(e.shebang,r);return{dataFile:Iht(t),loaderFile:s}}bt();function PY(e,{basePath:t}){let r=Ae.toPortablePath(t),s=K.resolve(r),a=e.ignorePatternData!==null?new RegExp(e.ignorePatternData):null,n=new Map,c=new Map(e.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([x,I])=>{if(C===null!=(x===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let T=I.discardFromLookup??!1,O={name:C,reference:x},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&T,T||(U.locator=O)):n.set(I.packageLocation,{locator:O,discardFromLookup:T});let V=null;return[x,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:T,get packageLocation(){return V||(V=K.join(s,I.packageLocation))}}]}))])),f=new Map(e.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(e.fallbackPool),h=e.dependencyTreeRoots,E=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:e.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}bt();bt();var oh=Ie("module"),Km=Ie("url"),UY=Ie("util");var aa=Ie("url");var $we=et(Ie("assert"));var xY=Array.isArray,Mb=JSON.stringify,Ub=Object.getOwnPropertyNames,Vm=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),kY=(e,t)=>RegExp.prototype.exec.call(e,t),QY=(e,...t)=>RegExp.prototype[Symbol.replace].apply(e,t),id=(e,...t)=>String.prototype.endsWith.apply(e,t),RY=(e,...t)=>String.prototype.includes.apply(e,t),TY=(e,...t)=>String.prototype.lastIndexOf.apply(e,t),_b=(e,...t)=>String.prototype.indexOf.apply(e,t),zwe=(e,...t)=>String.prototype.replace.apply(e,t),sd=(e,...t)=>String.prototype.slice.apply(e,t),mA=(e,...t)=>String.prototype.startsWith.apply(e,t),Xwe=Map,Zwe=JSON.parse;function Hb(e,t,r){return class extends r{constructor(...s){super(t(...s)),this.code=e,this.name=`${r.name} [${e}]`}}}var e1e=Hb("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError),FY=Hb("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),t1e=Hb("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,a=void 0)=>{let n=typeof r=="string"&&!s&&r.length&&!mA(r,"./");return t==="."?((0,$we.default)(s===!1),`Invalid "exports" main target ${Mb(r)} defined in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${Mb(r)} defined for '${t}' in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),jb=Hb("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),r1e=Hb("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);var WF=Ie("url");function n1e(e,t){let r=Object.create(null);for(let s=0;s<t.length;s++){let a=t[s];Vm(e,a)&&(r[a]=e[a])}return r}var YF=new Xwe;function vht(e,t,r,s){let a=YF.get(e);if(a!==void 0)return a;let n=s(e);if(n===void 0){let x={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return YF.set(e,x),x}let c;try{c=Zwe(n)}catch(x){throw new jb(e,(r?`"${t}" from `:"")+(0,WF.fileURLToPath)(r||t),x.message)}let{imports:f,main:p,name:h,type:E}=n1e(c,["imports","main","name","type"]),C=Vm(c,"exports")?c.exports:void 0;(typeof f!="object"||f===null)&&(f=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let S={pjsonPath:e,exists:!0,main:p,name:h,type:E,exports:C,imports:f};return YF.set(e,S),S}function i1e(e,t){let r=new URL("./package.json",e);for(;;){let n=r.pathname;if(id(n,"node_modules/package.json"))break;let c=vht((0,WF.fileURLToPath)(r),e,void 0,t);if(c.exists)return c;let f=r;if(r=new URL("../package.json",r),r.pathname===f.pathname)break}let s=(0,WF.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return YF.set(s,a),a}function Sht(e,t,r){throw new e1e(e,t&&(0,aa.fileURLToPath)(new URL(".",t)),(0,aa.fileURLToPath)(r))}function bht(e,t,r,s){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,aa.fileURLToPath)(t)}`;throw new FY(e,a,s&&(0,aa.fileURLToPath)(s))}function Gb(e,t,r,s,a){throw typeof t=="object"&&t!==null?t=Mb(t,null,""):t=`${t}`,new t1e((0,aa.fileURLToPath)(new URL(".",r)),e,t,s,a&&(0,aa.fileURLToPath)(a))}var s1e=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f Line truncated
`),r;c=e[++n]}else if(c===" "&&!s){a=!0;continue}else if(c==='"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&t.push(`invalid value for NODE_OPTIONS (unterminated string)
`),r}bt();var[ro,Sl,Nht]=process.versions.node.split(".").map(e=>parseInt(e,10)),g1e=ro>19||ro===19&&Sl>=2||ro===18&&Sl>=13,ezt=ro===20&&Sl<6||ro===19&&Sl>=3,tzt=ro>19||ro===19&&Sl>=6,rzt=ro>=21||ro===20&&Sl>=10||ro===18&&Sl>=19,nzt=ro>=21||ro===20&&Sl>=10||ro===18&&Sl>=20,izt=ro>=22,szt=ro===26&&Sl<1||ro===25&&Sl>=7||ro===24&&Sl===15||ro===22&&(Sl>22||Sl===22&&Nht>=3);function MY(e){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send){let t=e.map(r=>Ae.fromPortablePath(Eo.resolveVirtual(r)));if(g1e)process.send({"watch:require":t});else for(let r of t)process.send({"watch:require":r})}}function _Y(e,t){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,c=/\/$/,f=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(e.enableTopLevelFallback===!0&&h.push(p),t.compatibilityMode!==!1)for(let Ne of["react-scripts","gatsby"]){let ke=e.packageRegistry.get(Ne);if(ke)for(let De of ke.keys()){if(De===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Ne,reference:De})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:x}=e;function I(Ne,ke){return{fn:Ne,args:ke,error:null,result:null}}function T(Ne){let ke=process.stderr?.hasColors?.()??process.stdout.isTTY,De=(ct,Me)=>`\x1B[${ct}m${Me}\x1B[0m`,je=Ne.error;console.error(je?De("31;1",`\u2716 ${Ne.error?.message.replace(/\n.*/s,"")}`):De("33;1","\u203C Resolution")),Ne.args.length>0&&console.error();for(let ct of Ne.args)console.error(` ${De("37;1","In \u2190")} ${(0,UY.inspect)(ct,{colors:ke,compact:!0})}`);Ne.result&&(console.error(),console.error(` ${De("37;1","Out \u2192")} ${(0,UY.inspect)(Ne.result,{colors:ke,compact:!0})}`));let Re=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Re.length>0){console.error();for(let ct of Re)console.error(` ${De("38;5;244",ct)}`)}console.error()}function O(Ne,ke){if(t.allowDebug===!1)return ke;if(Number.isFinite(s)){if(s>=2)return(...De)=>{let je=I(Ne,De);try{return je.result=ke(...De)}catch(Re){throw je.error=Re}finally{T(je)}};if(s>=1)return(...De)=>{try{return ke(...De)}catch(je){let Re=I(Ne,De);throw Re.error=je,T(Re),je}}}return ke}function U(Ne){let ke=d(Ne);if(!ke)throw Es("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return ke}function V(Ne){if(Ne.name===null)return!0;for(let ke of e.dependencyTreeRoots)if(ke.name===Ne.name&&ke.reference===Ne.reference)return!0;return!1}let $=new Set(["node","require",...d1e("--conditions")]);function ie(Ne,ke=$,De){let je=me(K.join(Ne,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(je===null)throw Es("INTERNAL",`The locator that owns the "${Ne}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Re}=U(je),ct=K.join(Re,Ir.manifest);if(!t.fakeFs.existsSync(ct))return null;let Me=JSON.parse(t.fakeFs.readFileSync(ct,"utf8"));if(Me.exports==null)return null;let P=K.contains(Re,Ne);if(P===null)throw Es("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");P!=="."&&!f.test(P)&&(P=`./${P}`);try{let w=c1e({packageJSONUrl:(0,Km.pathToFileURL)(Ae.fromPortablePath(ct)),packageSubpath:P,exports:Me.exports,base:De?(0,Km.pathToFileURL)(Ae.fromPortablePath(De)):null,conditions:ke});return Ae.toPortablePath((0,Km.fileURLToPath)(w))}catch(w){throw Es("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:ff(Ne),locator:je,pkgJson:Me,subpath:ff(P),conditions:ke},w.code)}}function fe(Ne,ke,{extensions:De}){let je;try{ke.push(Ne),je=t.fakeFs.statSync(Ne)}catch{}if(je&&!je.isDirectory())return t.fakeFs.realpathSync(Ne);if(je&&je.isDirectory()){let Re;try{Re=JSON.parse(t.fakeFs.readFileSync(K.join(Ne,Ir.manifest),"utf8"))}catch{}let ct;if(Re&&Re.main&&(ct=K.resolve(Ne,Re.main)),ct&&ct!==Ne){let Me=fe(ct,ke,{extensions:De});if(Me!==null)return Me}}for(let Re=0,ct=De.length;Re<ct;Re++){let Me=`${Ne}${De[Re]}`;if(ke.push(Me),t.fakeFs.existsSync(Me))return Me}if(je&&je.isDirectory())for(let Re=0,ct=De.length;Re<ct;Re++){let Me=K.format({dir:Ne,name:"index",ext:De[Re]});if(ke.push(Me),t.fakeFs.existsSync(Me))return Me}return null}function ae(Ne){let ke=new oh.Module(Ne,null);return ke.filename=Ne,ke.paths=oh.Module._nodeModulePaths(Ne),ke}function ge(Ne,ke){return ke.endsWith("/")&&(ke=K.join(ke,"internal.js")),oh.Module._resolveFilename(Ae.fromPortablePath(Ne),ae(Ae.fromPortablePath(ke)),!1,{plugnplay:!1})}function he(Ne){if(C===null)return!1;let ke=K.contains(e.basePath,Ne);return ke===null?!1:!!C.test(ke.replace(/\/$/,""))}let Ce={std:3,resolveVirtual:1,getAllLocators:1},Ee=p;function d({name:Ne,reference:ke}){let De=S.get(Ne);if(!De)return null;let je=De.get(ke);return je||null}function Se({name:Ne,reference:ke}){let De=[];for(let[je,Re]of S)if(je!==null)for(let[ct,Me]of Re)ct===null|Line truncated
Require request: "${je}"
Required by: ${Re}
`,{request:je,issuer:Re});return Ae.toPortablePath(P)}let ct,Me=Ne.match(a);if(Me){if(!ke)throw Es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:je,issuer:Re});let[,P,w]=Me,D=me(ke);if(!D){let Fe=ge(Ne,ke);if(Fe===!1)throw Es("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
Require path: "${je}"
Required by: ${Re}
`,{request:je,issuer:Re});return Ae.toPortablePath(Fe)}let F=U(D).packageDependencies.get(P),z=null;if(F==null&&D.name!==null){let Fe=e.fallbackExclusionList.get(D.name);if(!Fe||!Fe.has(D.reference)){for(let Ct=0,Yt=h.length;Ct<Yt;++Ct){let Pt=U(h[Ct]).packageDependencies.get(P);if(Pt!=null){r?z=Pt:F=Pt;break}}if(e.enableTopLevelFallback&&F==null&&z===null){let Ct=e.fallbackPool.get(P);Ct!=null&&(z=Ct)}}}let X=null;if(F===null)if(V(D))X=Es("MISSING_PEER_DEPENDENCY",`Your application tried to access ${P} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P});else{let Fe=Be(P,D);Fe.every(ut=>V(ut))?X=Es("MISSING_PEER_DEPENDENCY",`${D.name} tried to access ${P} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${D.name}@${D.reference} (via ${Re})
${Fe.map(ut=>`Ancestor breaking the chain: ${ut.name}@${ut.reference}
`).join("")}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},D),dependencyName:P,brokenAncestors:Fe}):X=Es("MISSING_PEER_DEPENDENCY",`${D.name} tried to access ${P} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${D.name}@${D.reference} (via ${Re})
${Fe.map(ut=>`Ancestor breaking the chain: ${ut.name}@${ut.reference}
`).join("")}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},D),dependencyName:P,brokenAncestors:Fe})}else F===void 0&&(!De&&(0,oh.isBuiltin)(Ne)?V(D)?X=Es("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${P} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P}):X=Es("UNDECLARED_DEPENDENCY",`${D.name} tried to access ${P}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${P} isn't otherwise declared in ${D.name}'s dependencies, this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,issuerLocator:Object.assign({},D),dependencyName:P}):V(D)?X=Es("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${Re}
`,{request:je,issuer:Re,dependencyName:P}):X=Es("UNDECLARED_DEPENDENCY",`${D.name} tried to access ${P}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: ${P}${P!==je?` (via "${je}")`:""}
Required by: ${D.name}@${D.reference} (via ${Re})
`,{request:je,issuer:Re,issuerLocator:Object.assign({},D),dependencyName:P}));if(F==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=z;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&s!==0&&(E.add(Fe),process.emitWarning(X))}let ee=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:P,reference:F},se=U(ee);if(!se.packageLocation)throw Es("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
Required package: ${ee.name}@${ee.reference}${ee.name!==je?` (via "${je}")`:""}
Required by: ${D.name}@${D.reference} (via ${Re})
`,{request:je,issuer:Re,dependencyLocator:Object.assign({},ee)});let xe=se.packageLocation;w?ct=K.join(xe,w):ct=xe}else if(K.isAbsolute(Ne))ct=K.normalize(Ne);else{if(!ke)throw Es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:je,issuer:Re});let P=K.resolve(ke);ke.match(c)?ct=K.normalize(K.join(P,Ne)):ct=K.normalize(K.join(K.dirname(P),Ne))}return K.normalize(ct)}function be(Ne,ke,De=$,je){if(n.test(Ne))return ke;let Re=ie(ke,De,je);return Re?K.normalize(Re):ke}function Qe(Ne,{extensions:ke=Object.keys(oh.Module._extensions)}={}){let De=[],je=fe(Ne,De,{extensions:ke});if(je)return MY([je]),K.normalize(je);{MY(De);let Re=ff(Ne),ct=me(Ne);if(ct){let{packageLocation:Me}=U(ct),P=!0;try{t.fakeFs.accessSync(Me)}catch(w){if(w?.code==="ENOENT")P=!1;else{let D=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw Es("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${D}).
Missing package: ${ct.name}@${ct.reference}
Expected package location: ${ff(Me)}
`,{unqualifiedPath:Re,extensions:ke})}}if(!P){let w=Me.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw Es("QUALIFIED_PATH_RESOLUTION_FAILED",`${w}
Missing package: ${ct.name}@${ct.reference}
Expected package location: ${ff(Me)}
`,{unqualifiedPath:Re,extensions:ke})}}throw Es("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
Source path: ${Re}
${De.map(Me=>`Not found: ${ff(Me)}
`).join("")}`,{unqualifiedPath:Re,extensions:ke})}}function ot(Ne,ke,De){if(!ke)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let je=u1e({name:Ne,base:(0,Km.pathToFileURL)(Ae.fromPortablePath(ke)),conditions:De.conditions??$,readFileSyncFn:ue});if(je instanceof URL)return Qe(Ae.toPortablePath((0,Km.fileURLToPath)(je)),{extensions:De.extensions});if(je.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return _(je,ke,De)}function _(Ne,ke,De={}){try{if(Ne.startsWith("#"))return ot(Ne,ke,De);let{considerBuiltins:je,extensions:Re,conditions:ct}=De,Me=Z(Ne,ke,{considerBuiltins:je});if(Ne==="pnpapi")return Me;if(Me===null)return null;let P=()=>ke!==null?he(ke):!1,w=(!je||!(0,oh.isBuiltin)(Ne))&&!P()?be(Ne,Me,ct,ke):Me;return Qe(w,{extensions:Re})}catch(je){throw Object.hasOwn(je,"pnpCode")&&Object.assign(je.data,{request:ff(Ne),issuer:ke&&ff(ke)}),je}}function tt(Ne){let ke=K.normalize(Ne),De=Eo.resolveVirtual(ke);return De!==ke?De:null}return{VERSIONS:Ce,topLevel:Ee,getLocator:(Ne,ke)=>Array.isArray(ke)?{name:ke[0],reference:ke[1]}:{name:Ne,reference:ke},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){let Ne=[];for(let[ke,De]of S)for(let je of De.keys())ke!==null&&je!==null&&Ne.push({name:ke,reference:je});return Ne},getPackageInformation:Ne=>{let ke=d(Ne);if(ke===null)return null;let De=Ae.fromPortablePath(ke.packageLocation);return{...ke,packageLocation:De}},findPackageLocator:Ne=>me(Ae.toPortablePath(Ne)),resolveToUnqualified:O("resolveToUnqualified",(Ne,ke,De)=>{let je=ke!==null?Ae.toPortablePath(ke):null,Re=Z(Ae.toPortablePath(Ne),je,De);return Re===null?null:Ae.fromPortablePath(Re)}),resolveUnqualified:O("resolveUnqualified",(Ne,ke)=>Ae.fromPortablePath(Qe(Ae.toPortablePath(Ne),ke))),resolveRequest:O("resolveRequest",(Ne,ke,De)=>{let je=ke!==null?Ae.toPortablePath(ke):null,Re=_(Ae.toPortablePath(Ne),je,De);return Re===null?null:Ae.fromPortablePath(Re)}),resolveVirtual:O("resolveVirtual",Ne=>{let ke=tt(Ae.toPortablePath(Ne));return ke!==null?Ae.fromPortablePath(ke):null})}}bt();var m1e=(e,t,r)=>{let s=Lb(e),a=PY(s,{basePath:t}),n=Ae.join(t,Ir.pnpCjs);return _Y(a,{fakeFs:r,pnpapiResolution:n})};var jY=et(E1e());jt();var yA={};Vt(yA,{checkManifestCompatibility:()=>I1e,extractBuildRequest:()=>VF,getExtractHint:()=>GY,hasBindingGyp:()=>qY});Ge();bt();function I1e(e){return j.isPackageCompatible(e,Ui.getArchitectureSet())}function VF(e,t,r,{configuration:s}){let a=[];for(let n of["preinstall","install","postinstall"])t.manifest.scripts.has(n)&&a.push({type:0,script:n});return!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:e.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${j.prettyLocator(s,e)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${j.prettyLocator(s,e)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${j.prettyLocator(s,e)} lists build scripts, but all build scripts have been disabled.`)}:I1e(e)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${j.prettyLocator(s,e)} The ${Ui.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var Lht=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function GY(e){return e.packageFs.getExtractHint({relevantExtensions:Lht})}function qY(e){let t=K.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}var Wb={};Vt(Wb,{getUnpluggedPath:()=>Yb});Ge();bt();function Yb(e,{configuration:t}){return K.resolve(t.get("pnpUnpluggedFolder"),j.slugifyLocator(e))}var Mht=new Set([j.makeIdent(null,"open").identHash,j.makeIdent(null,"opn").identHash]),od=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let s=ad(r.project).cjs;if(!le.existsSync(s))throw new st(`The project in ${ce.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ce.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=qe.getFactoryWithDefault(this.pnpCache,s,()=>qe.dynamicRequire(s,{cachingStrategy:qe.CachingStrategy.FsTime})),n={name:j.stringifyIdent(t),reference:t.reference},c=a.getPackageInformation(n);if(!c)throw new st(`Couldn't find ${j.prettyLocator(r.project.configuration,t)} in the currently installed PnP map - running an install might help`);return Ae.toPortablePath(c.packageLocation)}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;Line truncated
`,n+=`# cause your node_modules installation to become invalidated.
`,n+=`
`,n+=`__metadata:
`,n+=` version: ${T1e}
`,n+=` nmMode: ${s.value}
`;let c=Array.from(t.keys()).sort(),f=j.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(let E of c){let C=t.get(E);n+=`
`,n+=`${JSON.stringify(E)}:
`,n+=` locations:
`;for(let S of C.locations){let x=K.contains(e.cwd,S);if(x===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` - ${JSON.stringify(x)}
`}if(C.aliases.length>0){n+=` aliases:
`;for(let S of C.aliases)n+=` - ${JSON.stringify(S)}
`}if(E===f&&r.size>0){n+=` bin:
`;for(let[S,x]of r){let I=K.contains(e.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` ${JSON.stringify(I)}:
`;for(let[T,O]of x){let U=K.relative(K.join(S,Pi),O);n+=` ${JSON.stringify(T)}: ${JSON.stringify(U)}
`}}}}let p=e.cwd,h=K.join(p,Pi,eW);try{a&&await le.removePromise(h),await le.changeFilePromise(h,n,{automaticNewlines:!0})}finally{a0t(e)}}async function u0t(e){let t=e.cwd,r=K.join(t,Pi,eW);try{let s=await le.statPromise(r);return`${s.mtimeMs}:${s.size}`}catch{return null}}async function F1e(e,{unrollAliases:t=!1}={}){let r=e.cwd,s=K.join(r,Pi,eW),a;try{a=await le.statPromise(s)}catch{}if(!a)return null;let n=us(await le.readFilePromise(s,"utf8"));if(n.__metadata.version>T1e)return null;let c=n.__metadata.nmMode||"classic",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(x=>K.join(r,x)),S=E.bin;if(S)for(let[x,I]of Object.entries(S)){let T=K.join(r,Ae.toPortablePath(x)),O=qe.getMapWithDefault(p,T);for(let[U,V]of Object.entries(I))O.set(U,Ae.toPortablePath([T,Pi,V].join(K.sep)))}if(f.set(h,{target:vt.dot,linkType:"HARD",locations:C,aliases:E.aliases||[]}),t&&E.aliases)for(let x of E.aliases){let{scope:I,name:T}=j.parseLocator(h),O=j.makeLocator(j.makeIdent(I,T),x),U=j.stringifyLocator(O);f.set(U,{target:vt.dot,linkType:"HARD",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:N1e(f,{skipPrefix:e.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var Cw=async(e,t)=>{if(e.split(K.sep).indexOf(Pi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${e}`);try{let r;if(!t.innerLoop&&(r=await le.lstatPromise(e),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!t.isWorkspaceDir)){await le.unlinkPromise(e);return}let s=await le.readdirPromise(e,{withFileTypes:!0});for(let n of s){let c=K.join(e,n.name);n.isDirectory()?(n.name!==Pi||t&&t.innerLoop)&&await Cw(c,{innerLoop:!0,contentsOnly:!1}):await le.unlinkPromise(c)}let a=!t.innerLoop&&t.isWorkspaceDir&&r?.isSymbolicLink();!t.contentsOnly&&!a&&await le.rmdirPromise(e)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},x1e=4,zF=(e,{skipPrefix:t})=>{let r=K.contains(t,e);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${e} which is outside project root: ${t}`);let s=r.split(K.sep).filter(p=>p!==""),a=s.indexOf(Pi),n=s.slice(0,a).join(K.sep),c=K.join(t,n),f=s.slice(a);return{locationRoot:c,segments:f}},N1e=(e,{skipPrefix:t})=>{let r=new Map;if(e===null)return r;let s=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of e.entries()){if(n.linkType==="SOFT"&&K.contains(t,n.target)!==null){let f=qe.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=zF(c,{skipPrefix:t}),h=qe.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let C=p[E];if(C!=="."){let S=qe.getFactoryWithDefault(h.children,C,s);h.children.set(C,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},rW=async(e,t,r)=>{if(process.platform==="win32"&&r==="junctions"){let s;try{s=await le.lstatPromise(e)}catch{}if(!s||s.isDirectory()){await le.symlinkPromise(e,t,"junction");return}}await le.symlinkPromise(K.relative(K.dirname(t),e),t)};async function O1e(e,t,r){let s=K.join(e,`${$Y.default.randomBytes(16).toString("hex")}.tmp`);try{await le.writeFilePromise(s,r);try{await le.linkPromise(s,t)}catch{}}finally{await le.unlinkPromise(s)}}async function f0t({srcPath:e,dstPath:t,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&s&&r.digest){let f=K.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await le.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-o0t))if(await Mn.checksumFile(f,{baseFs:le,algorithm:"sha1"})!==r.digest){let C=K.join(s,`${$Y.default.randomBytes(16).toString("hex")}.tmp`);await le.renamePromise(f,C);let S=await a.readFilePromise(e);await le.writeFilePromise(C,S);try{await le.linkPromise(C,f),r.mtimeMs=new Date().getTime(),await le.unlinkPromise(C)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await le.linkPromise(f,t),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(e);await O1e(s,f,h),r.mtimeMs=new Date().getTime();try{await le.linkPromise(f,t)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(e,t))}}}else await a.copyFilePromise(e,t);let c=r.mode&511;c!==420&&await le.chmodPromise(t,c)}}var A0t=async(e,t,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await le.mkdirPromise(e,{recursive:!0});let f=async(E=vt.dot)=>{let C=K.join(t,E),S=await r.readdirPromise(C,{withFileTypes:!0}),x=new Map;for(let I of S){let T=K.join(E,I.name),O,U=K.join(C,I.name);if(I.isFile()){if(O={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let V=await Mn.checksumFile(U,{baseFs:r,algorithm:"sha1"});O.digest=V}}else if(I.isDirectory())O={kind:"directory"};else if(I.isSymbolicLink())O={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(x. Line truncated
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:s}=await(0,lW.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
`),s}function ZF(e){if(e.originalError?.name!=="HTTPError")return!1;try{return(e.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function vw(e){return{"npm-otp":e}}async function U0t(e,{configuration:t,ident:r}){let s=null;if(process.env.GITLAB_CI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.CIRCLECI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.GITHUB_ACTIONS){if(!(process.env.ACTIONS_ID_TOKEN_REQUEST_URL&&process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN))return null;let a=`npm:${new URL(e).host.replace("registry.yarnpkg.com","registry.npmjs.org").replace("yarn.npmjs.org","registry.npmjs.org")}`,n=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);n.searchParams.append("audience",a),s=(await nn.get(n.href,{configuration:t,jsonResponse:!0,headers:{Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).value}if(!s)return null;try{return(await nn.post(`${e}/-/npm/v1/oidc/token/exchange/package${zb(r)}`,null,{configuration:t,jsonResponse:!0,headers:{Authorization:`Bearer ${s}`}})).token||null}catch{}return null}var Zb=class{supports(t,r){if(!t.reference.startsWith(ti))return!1;let{selector:s,params:a}=j.parseRange(t.reference);return!(!Y1e.default.valid(s)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),checksum:c}}async fetchFromNetwork(t,r){let{params:s}=j.parseRange(t.reference);if(s===null||typeof s.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Xm(s.__archiveUrl,{customErrorMessage:zm,configuration:r.project.configuration,ident:t});return await ms.convertToZip(a,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(t),stripComponents:1})}};Ge();var $b=class{supportsDescriptor(t,r){return!(!t.range.startsWith(ti)||!j.tryParseDescriptor(t.range.slice(ti.length),!0))}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Unreachable")}bindDescriptor(t,r,s){return t}getResolutionDependencies(t,r){let s=r.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ti.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(t,r,s){let a=s.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ti.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(t,r,s,a){let n=a.project.configuration.normalizeDependency(j.parseDescriptor(t.range.slice(ti.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(t,r){throw new Error("Unreachable")}};Ge();Ge();var W1e=et(hi());var ah=class e{supports(t,r){if(!t.reference.startsWith(ti))return!1;let s=new URL(t.reference);return!(!W1e.default.valid(s.pathname)||s.searchParams.has("__archiveUrl"))}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),checksum:c}}async fetchFromNetwork(t,r){let s;try{s=await Xm(e.getLocatorUrl(t),{customErrorMessage:zm,configuration:r.project.configuration,ident:t})}catch{s=await Xm(e.getLocatorUrl(t).replace(/%2f/g,"/"),{customErrorMessage:zm,configuration:r.project.configuration,ident:t})}return await ms.convertToZip(s,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(t),stripComponents:1})}static isConventionalTarballUrl(t,r,{configuration:s}){let a=ww(t.scope,{configuration:s}),n=e.getLocatorUrl(t);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(t){let r=kr.clean(t.reference.slice(ti.length));if(r===null)throw new Lt(10,"The npm semver resolver got selected, but the version isn't semver");let s=encodeURIComponent(t.name),a=encodeURIComponent(r);return`${zb(t)}/-/${s}-${a}.tgz`}};Ge();Ge();Ge();var uW=et(hi());var $F=j.makeIdent(null,"node-gyp"),_0t=/\b(node-gyp|prebuild-install)\b/,eD=class{supportsDescriptor(t,r){return t.range.startsWith(ti)?!!kr.validRange(t.range.slice(ti.length)):!1}supportsLocator(t,r){if(!t.rLine truncated
https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:wvt,subject:e,predicateType:vvt,predicate:{buildType:`${Pvt}/${xvt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Lt(91,"Provenance generation is only supported in GitHub Actions and GitLab CI");return TDe.attest(Buffer.from(JSON.stringify(r)),Cvt,t)};async function kvt(e,t,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=e.manifest.name,p=e.manifest.version,h=j.stringifyIdent(f),E=NDe.default.fromData(t,{algorithms:["sha1","sha512"]}),C=r??ODe(e,f),S=await LDe(e),x=await CA.genPackageManifest(e),I=`${h}-${p}.tgz`,T=new URL(`${Kc(a)}/${h}/-/${I}`),O={[I]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,"%40")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},V=await FDe([U]),$=JSON.stringify(V);O[`${h}-${p}.sigstore`]={content_type:V.mediaType,data:$,length:$.length}}return{_id:h,_attachments:O,name:h,access:C,"dist-tags":{[s]:p},versions:{[p]:{...x,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:T.toString()}}},readme:S}}async function Qvt(e){try{let{stdout:t}=await Yr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:e});return t.trim()===""?void 0:t.trim()}catch{return}}fu Line truncated
`;try{a=await le.readFilePromise(t,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var iJ={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},MDe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Rvt={npmMinimalAgeGate:{description:"Minimum age of a package version according to the publish date on the npm registry to be considered for installation",type:"DURATION",unit:"m",default:"1d"},npmPreapprovedPackages:{description:"Array of package descriptors or package name glob patterns to exclude from the minimum release age check",type:"STRING",isArray:!0,default:[]}},Tvt={configuration:{...iJ,...MDe,...Rvt,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...iJ,...MDe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:Kc,valueDefinition:{description:"",type:"SHAPE",properties:{...iJ}}}},fetchers:[Zb,ah],resolvers:[$b,eD,tD]},Fvt=Tvt;var dJ={};Vt(dJ,{NpmAuditCommand:()=>I1,NpmInfoCommand:()=>C1,NpmLoginCommand:()=>w1,NpmLogoutCommand:()=>v1,NpmPublishCommand:()=>S1,NpmStageApproveCommand:()=>b1,NpmStageListCommand:()=>D1,NpmStageRejectCommand:()=>P1,NpmTagAddCommand:()=>k1,NpmTagListCommand:()=>x1,NpmTagRemoveCommand:()=>Q1,NpmWhoamiCommand:()=>R1,default:()=>Vvt,npmAuditTypes:()=>eP,npmAuditUtils:()=>yL});Ge();Ge();jt();var uJ=et(Xo());Jo();var eP={};Vt(eP,{Environment:()=>ZD,Severity:()=>$D});var ZD=(s=>(s.All="all",s.Production="production",s.Development="development",s))(ZD||{}),$D=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))($D||{});var yL={};Vt(yL,{allSeverities:()=>E1,getPackages:()=>cJ,getReportTree:()=>aJ,getSeverityInclusions:()=>oJ,getTopLevelDependencies:()=>lJ});Ge();var UDe=et(hi());var E1=["info","low","moderate","high","critical"];function oJ(e){if(typeof e>"u")return new Set(E1);let t=E1.indexOf(e),r=E1.slice(t);return new Set(r)}function aJ(e){let t={},r={children:t};for(let[s,a]of qe.sortMap(Object.entries(e),n=>n[0]))for(let n of qe.sortMap(a,c=>`${c.id}`))t[`${s}/${n.id}`]={value:ce.tuple(ce.Type.IDENT,j.parseIdent(s)),children:{ID:typeof n.id<"u"&&{label:"ID",value:ce.tuple(ce.Type.ID,n.id)},Issue:{label:"Issue",value:ce.tuple(ce.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:ce.tuple(ce.Type.URL,n.url)},Severity:{label:"Severity",value:ce.tuple(ce.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:ce.tuple(ce.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(UDe.default.compare).map(c=>({value:ce.tuple(ce.Type.REFERENCE,c)}))},Dependents:{label:"Dependents",children:qe.sortMap(n.dependents,c=>j.stringifyLocator(c)).map(c=>({value:ce.tuple(ce.Type.LOCATOR,c)}))}}};return r}function lJ(e,t,{all:r,environment:s}){let a=[],n=r?e.workspaces:[t],c=["all","production"].includes(s),f=["all","development"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function cJ(e,t,{recursive:r}){let s=new Map,a=new Set,n=[],c=e.configuration.makeResolver(),f={project:e,resolver:c},p=(h,E)=>{let C=e.storedResolutions.get(E.descriptorHash);if(typeof C>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(C))a.add(C);else return;let S=e.storedPackages.get(C);if(typeof S>"u")throw new Error("Assertion failed: The package should have been registered");let x=j.ensureDevirtualizedDescriptor(E);if(c.supportsDescriptor(x,f)){let T=c.getResolutionDependencies(x,f);if(Object.keys(T).length>0)for(let O of Object.values(T))p(h,O)}if(j.ensureDevirtualizedLocator(S).reference.startsWith("npm:")&&S.version!==null){let T=j.stringifyIdent(S),O=qe.getMapWithDefault(s,T);qe.getArrayWithDefault(O,S.version).push(h)}if(r)for(let T of S.dependencies.values())n.push([S,T])};for(let{workspace:h,dependency:E}of t)n.push([h.anchoredLocator,E]);for(;n.length>0;){let[h,E]=n.shift();p(h,E)}return s}var I1=class extends ft{constructor(){super(...arguments);this.all=pe.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=pe.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=pe.String("--environment","all" Line truncated
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${E1.map(r=>`\`${r}\``).join(", ")}.
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=lJ(s,a,{all:this.all,environment:this.environment}),c=cJ(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[O,U]of c)f.some(V=>uJ.default.isMatch(O,V))||(p[O]=[...U.keys()]);let h=gn.getAuditRegistry({configuration:r}),E,C=await fA.start({configuration:r,stdout:this.context.stdout},async()=>{let O=Qr.post("/-/npm/v1/security/advisories/bulk",p,{authType:Qr.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([$,ie])=>{let fe=await Qr.getPackageMetadata(j.parseIdent($),{project:s});return qe.mapAndFilter(ie,ae=>{let{deprecated:ge}=fe.versions[ae];return ge?[$,ae,ge]:qe.mapAndFilter.skip})})),V=await O;for(let[$,ie,fe]of U.flat(1))Object.hasOwn(V,$)&&V[$].some(ae=>kr.satisfiesWithPrereleases(ie,ae.vulnerable_versions))||(V[$]??=[],V[$].push({id:`${$} (deprecation)`,title:(typeof fe=="string"?fe:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ie}));E=V});if(C.hasErrors())return C.exitCode();let S=oJ(this.severity),x=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),I=Object.create(null);for(let[O,U]of Object.entries(E)){let V=U.filter($=>!uJ.default.isMatch(`${$.id}`,x)&&S.has($.severity));V.length>0&&(I[O]=V.map($=>{let ie=c.get(O);if(typeof ie>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let fe=[...ie.keys()].filter(ge=>kr.satisfiesWithPrereleases(ge,$.vulnerable_versions)),ae=new Map;for(let ge of fe)for(let he of ie.get(ge))ae.set(he.locatorHash,he);return{...$,versions:fe,dependents:[...ae.values()]}}))}let T=Object.keys(I).length>0;return T?(ts.emitTree(aJ(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async O=>{O.reportInfo(1,"No audit suggestions")}),T?1:0)}};Ge();Ge();bt();jt();var fJ=et(hi()),AJ=Ie("util"),C1=class extends ft{constructor(){super(...arguments);this.fields=pe.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=pe.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versi Line truncated
`),this.context.stdout.write(`${(0,AJ.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
`);return f.exitCode()}};function pJ(e){if(Array.isArray(e)){let t=[];for(let r of e)r=pJ(r),r&&t.push(r);return t}else if(typeof e=="object"&&e!==null){let t={};for(let r of Object.keys(e)){if(r.startsWith("_"))continue;let s=pJ(e[r]);s&&(t[r]=s)}return t}else return e||null}Ge();Ge();jt();var hJ=et(Xv()),w1=class extends ft{constructor(){super(...arguments);this.scope=pe.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=pe.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=pe.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"});this.webLogin=pe.Boolean("--web-login",{description:"Enable web login"})}static{this.paths=[["npm","login"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=await EL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ft.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await Uvt({registry:s,configuration:r,report:n,webLogin:this.webLogin,stdin:this.context.stdin,stdout:this.context.stdout});return await Hvt(s,c,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function EL({scope:e,publish:t,configuration:r,cwd:s}){return e&&t?gn.getScopeRegistry(e,{configuration:r,type:gn.RegistryType.PUBLISH_REGISTRY}):e?gn.getScopeRegistry(e,{configuration:r}):t?gn.getPublishRegistry((await VI(r,s)).manifest,{configuration:r}):gn.getDefaultRegistry({configuration:r})}async function Nvt(e,t){let r;try{r=await Qr.post("/-/v1/login",null,{configuration:t,registry:e,authType:Qr.AuthType.NO_AUTH,jsonResponse:!0,headers:{"npm-auth-type":"web"}})}catch{return null}return r}async function Ovt(e,t){let r=await nn.request(e,null,{configuration:t,jsonResponse:!0});if(r.statusCode===202){let s=r.headers["retry-after"]??"1";return{type:"waiting",sleep:parseInt(s,10)}}return r.statusCode===200?{type:"success",token:r.body.token}:null}async function Lvt({registry:e,configuration:t,report:r}){let s=await Nvt(e,t);if(!s)return null;if(Ui.openUrl){r.reportInfo(0,"Starting the web login process..."),r.reportSeparator();let{openNow:a}=await(0,hJ.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open your browser now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});r.reportSeparator(),(!a||!await Ui.openUrl(s.loginUrl))&&(r.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice:"),r.reportWarning(0,ce.pretty(t,s.loginUrl,ce.Type.URL)),r.reportSeparator())}for(;;){let a=await Ovt(s.doneUrl,t);if(a===null)return null;if(a.type==="waiting")await new Promise(n=>setTimeout(n,a.sleep*1e3));else return a.token}}var Mvt=["https://registry.yarnpkg.com","https://registry.npmjs.org"];async function Uvt(e){if(e.webLogin??Mvt.includes(e.registry)){let t=await Lvt(e);if(t!==null)return t}return await _vt(e)}async function _vt({registry:e,configuration:t,report:r,stdin:s,stdout:a}){let n=await jvt({configuration:t,registry:e,report:r,stdin:s,stdout:a}),c=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,f={_id:`org.couchdb.user:${n.name}`,name:n.name,password:n.password,type:"user",roles:[],date:new Date().toISOString()},p={attemptedAs:n.name,configuration:t,registry:e,jsonResponse:!0,authType:Qr.AuthType.NO_AUTH};try{return(await Qr.put(c,f,p)).token}catch(x){if(!(x.originalError?.name==="HTTPError"&&x.originalError?.response.statusCode===409))throw x}let h={...p,authType:Qr.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${n.name}:${n.password}`).toString("base64")}`}},E=await Qr.get(c,h);for(let[x,I]of Object.entries(E))(!f[x]||x==="roles")&&(f[x]=I);let C=`${c}/-rev/${f._rev}`;return(await Qr.put(C,f,h)).token}async function Hvt(e,t,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=qe.isIndexableObject(f)?f:{},h=p[c],E=qe.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npLine truncated
This command will list all staged package versions awaiting approval on the npm registry.
If a package name is provided, only staged versions of that package will be listed.
`,examples:[["List all staged packages","yarn npm stage list"],["List staged versions of a specific package","yarn npm stage list my-pkg"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=gn.getDefaultRegistry({configuration:r,type:gn.RegistryType.PUBLISH_REGISTRY}),a=await Yvt(r,s,this.package??void 0);if(await Ft.start({configuration:r,stdout:this.context.stdout,json:this.json,includeFooter:!1,includePrefix:!1},async c=>{a.length>0?(c.reportInfo(0,`The following packages are awaiting approval. Use ${ce.pretty(r,"yarn npm stage approve <stageId>",ce.Type.CODE)} to approve them.`),c.reportSeparator()):this.package?c.reportInfo(0,`No staged versions found for package ${this.package}`):c.reportInfo(0,"No staged packages found")}),a.length===0)return;let n={children:a.map(c=>{let f=j.parseIdent(c.packageName);return{value:ce.tuple(ce.Type.RESOLUTION,{descriptor:j.makeDescriptor(f,c.tag),locator:j.makeLocator(f,c.version)}),children:{ID:{label:"ID",value:ce.tuple(ce.Type.CODE,c.id)},Staged:{label:"Staged on",value:ce.tuple(ce.Type.NO_HINT,c.createdAt)}}}})};ts.emitTree(n,{configuration:r,json:this.json,stdout:this.context.stdout,separators:1})}};async function Yvt(e,t,r){let s=[],a=0,n=100;for(;;){let c={page:String(a),perPage:String(n)};r&&(c.package=r);let f=new URLSearchParams(c).toString(),p=await Qr.get(`/-/stage?${f}`,{configuration:e,registry:t,jsonResponse:!0,authType:Qr.AuthType.ALWAYS_AUTH});if(s.push(...p.items),s.length>=p.total||p.items.length<n)break;a++}return s}Ge();jt();Jo();var P1=class extends ft{constructor(){super(...arguments);this.stageId=pe.String({validator:l0(Jf(),[Sp(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)])});this.otp=pe.String("--otp",{description:"The OTP token to use with the command"})}static{this.paths=[["npm","stage","reject"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"reject a staged package version",details:"\n This command will reject a staged package version, permanently removing it from the registry staging area. This operation requires 2FA and will prompt for an OTP token if one is not provided via the `--otp` flag.\n ",examples:[["Reject a staged package","yarn npm stage reject 1de6f3db-2ed9-4d72-b3dd-8f0e2b474a2f"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s=gn.getDefaultRegistry({configuration:r,type:gn.RegistryType.PUBLISH_REGISTRY});return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let c=ce.pretty(r,this.stageId,ce.Type.CODE);n.reportInfo(0,`Rejecting staged package ${ce.pretty(r,c,ce.Type.CODE)}...`),n.reportSeparator(),await Qr.del(`/-/stage/${this.stageId}`,{configuration:r,registry:s,otp:this.otp,authType:Qr.AuthType.ALWAYS_AUTH}),n.reportInfo(0,`Staged package ${ce.pretty(r,c,ce.Type.CODE)} has been rejected.`)})).exitCode()}};Ge();jt();var HDe=et(hi());Ge();bt();jt();var x1=class extends ft{constructor(){super(...arguments);this.json=pe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=pe.String({required:!1})}static{this.paths=[["npm","tag","list"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:`
This command will list all tags of a package from the npm registry.
If the package is not specified, Yarn will default to the current workspace.
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=j.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new st(`Missing 'name' field in ${Ae.fromPortablePath(K.join(a.cwd,Ir.manifest))}`);n=a.manifest.name}let c=await tP(n,r),p={children:qe.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:ce.tuple(ce.Type.RESOLUTION,{descriptor:j.makeDescriptor(n,h),locator:j.makeLocator(n,E)})}))};return ts.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function tP(e,t){let r=`/-/package${Qr.getIdentUrl(e)}/dist-tags`;return Qr.get(r,{configuration:t,ident:e,jsonResponse:!0,customErrorMessage:Qr.customPackageError})}var k1=class extends ft{constructor(){super(...arguments);this.package=pe.String();this.tag=pe.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=j.parseDescriptor(this.package,!0),c=n.range;if(!HDe.default.valid(c))throw new st(`The range ${ce.pretty(r,n.range,ce.Type.RANGE)} must be a valid semver version`);let f=gn.getPublishRegistry(a.manifest,{configuration:r}),p=ce.pretty(r,n,ce.Type.IDENT),h=ce.pretty(r,c,ce.Type.RANGE),E=ce.pretty(r,this.tag,ce.Type.CODE);return(await Ft.start({configuration:r,stdout:this.context.stdout},async S=>{let x=await tP(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${Qr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Qr.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ge();jt();var Q1=class extends ft{constructor(){super(...arguments);this.package=pe.String();this.tag=pe.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
This command will remove a tag from a package from the npm registry.
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new st("The 'latest' tag cannot be removed.");let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=j.parseIdent(this.package),c=gn.getPublishRegistry(a.manifest,{configuration:r}),f=ce.pretty(r,this.tag,ce.Type.CODE),p=ce.pretty(r,n,ce.Type.IDENT),h=await tP(n,r);if(!Object.hasOwn(h,this.tag))throw new st(`${f} is not a tag of package ${p}`);return(await Ft.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${Qr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Qr.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ge();Ge();jt();var R1=class extends ft{constructor(){super(...arguments);this.scope=pe.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=pe.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=it.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=gn.getScopeRegistry(this.scope,{configuration:r,type:gn.RegistryType.PUBLISH_REGISTRY}):this.scope?s=gn.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=gn.getPublishRegistry((await VI(r,this.context.cwd)).manifest,{configuration:r}):s=gn.getDefaultRegistry({configuration:r}),(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await Qr.get("/-/whoami",{configuration:r,registry:s,authType:Qr.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?j.makeIdent(this.scope,""):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var Wvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmPublishProvenance:{description:"Whether to generate provenance for the published packages",type:"BOOLEAN",default:!1},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[I1,C1,w1,v1,S1,b1,D1,P1,k1,x1,Q1,R1]},Vvt=Wvt;var wJ={};Vt(wJ,{PatchCommand:()=>M1,PatchCommitCommand:()=>L1,PatchFetcher:()=>oP,PatchResolver:()=>aP,default:()=>fSt,patchUtils:()=>Cy});Ge();Ge();bt();iA();var Cy={};Vt(Cy,{applyPatchFile:()=>CL,diffFolders:()=>IJ,ensureUnpatchedDescriptor:()=>gJ,ensureUnpatchedLocator:()=>BL,extractPackageToDisk:()=>EJ,extractPatchFlags:()=>KDe,isParentRequired:()=>yJ,isPatchDescriptor:()=>wL,isPatchLocator:()=>Fd,loadPatchFiles:()=>sP,makeDescriptor:()=>vL,makeLocator:()=>mJ,makePatchHash:()=>CJ,parseDescriptor:()=>nP,parseLocator:()=>iP,parsePatchFile:()=>rP,unpatchDescriptor:()=>lSt,unpatchLocator:()=>cSt});Ge();bt();Ge();bt();var Kvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function T1(e){return K.relative(vt.root,K.resolve(vt.root,Ae.toPortablePath(e)))}function Jvt(e){let t=e.trim().match(Kvt);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var zvt=420,Xvt=493;var jDe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Zvt=e=>({header:Jvt(e),parts:[]}),$vt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function eSt(e){leLine truncated
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
`):"";await t.mkdirpPromise(K.dirname(a.path),{chmod:493,utimes:[pi.SAFE_TIME,pi.SAFE_TIME]}),await t.writeFilePromise(a.path,n,{mode:a.mode}),await t.utimesPromise(a.path,pi.SAFE_TIME,pi.SAFE_TIME)}break;case"patch":await N1(t,a.path,async()=>{await sSt(a,{baseFs:t,dryRun:r})});break;case"mode change":{let c=(await t.statPromise(a.path)).mode;if(GDe(a.newMode)!==GDe(c))continue;await N1(t,a.path,async()=>{await t.chmodPromise(a.path,a.newMode)})}break;default:qe.assertNever(a);break}}function GDe(e){return(e&64)>0}function qDe(e){return e.replace(/\s+$/,"")}function iSt(e,t){return qDe(e)===qDe(t)}async function sSt({hunks:e,path:t},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(t).mode,c=(await r.readFileSync(t,"utf8")).split(/\n/),f=[],p=0,h=0;for(let C of e){let S=Math.max(h,C.header.patched.start+p),x=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),T=Math.max(x,I),O=0,U=0,V=null;for(;O<=T;){if(O<=x&&(U=S-O,V=YDe(C,c,U),V!==null)){O=-O;break}if(O<=I&&(U=S+O,V=YDe(C,c,U),V!==null))break;O+=1}if(V===null)throw new F1(e.indexOf(C),C);f.push(V),p+=O,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case"splice":{let x=S.index+E;c.splice(x,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case"pop":c.pop();break;case"push":c.push(S.line);break;default:qe.assertNever(S);break}await r.writeFilePromise(t,c.join(`
`),{mode:a})}function YDe(e,t,r){let s=[];for(let a of e.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let c=t[r];if(c==null||!iSt(c,n))return null;r+=1}a.type==="deletion"&&(s.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case"insertion":s.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:qe.assertNever(a.type);break}return s}var aSt=/^builtin<([^>]+)>$/;function O1(e,t){let{protocol:r,source:s,selector:a,params:n}=j.parseRange(e);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let c=a?a.split(/&/).map(E=>Ae.toPortablePath(E)):[],f=n&&typeof n.locator=="string"?j.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=t(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function wL(e){return e.range.startsWith("patch:")}function Fd(e){return e.reference.startsWith("patch:")}function nP(e){let{sourceItem:t,...r}=O1(e.range,j.parseDescriptor);return{...r,sourceDescriptor:t}}function iP(e){let{sourceItem:t,...r}=O1(e.reference,j.parseLocator);return{...r,sourceLocator:t}}function lSt(e){let{sourceItem:t}=O1(e.range,j.parseDescriptor);return t}function cSt(e){let{sourceItem:t}=O1(e.reference,j.parseLocator);return t}function gJ(e){if(!wL(e))return e;let{sourceItem:t}=O1(e.range,j.parseDescriptor);return t}function BL(e){if(!Fd(e))return e;let{sourceItem:t}=O1(e.reference,j.parseLocator);return t}function WDe({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=e!==null?{locator:j.stringifyLocator(e)}:{},f=typeof s<"u"?{version:s}:{},p=typeof a<"u"?{hash:a}:{};return j.makeRange({protocol:"patch:",source:n(t),selector:r.join("&"),params:{...f,...p,...c}})}function vL(e,{parentLocator:t,sourceDescriptor:r,patchPaths:s}){return j.makeDescriptor(e,WDe({parentLocator:t,sourceItem:r,patchPaths:s},j.stringifyDescriptor))}function mJ(e,{parentLocator:t,sourcePackage:r,patchPaths:s,patchHash:a}){return j.makeLocator(e,WDe({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},j.stringifyLocator))}function VDe({onAbsolute:e,onRelative:t,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(aSt);return c!==null?s(c[1]):a.startsWith("~/")?r(a.slice(2)):K.isAbsolute(a)?e(a):t(a)}function KDe(e){let t=e.lastIndexOf("!");return{optional:(t!==-1?new Set(e.slice(0,t).split(/!/)):new Set).has("optional")}}function yJ(e){return VDe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},e)}async function sP(e,t,r){let s=e!==null?await r.fetcher.fetch(e,r):null,a=s&&s.localPath?{packageFs:new Pn(vt.root),prefixPath:K.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await qe.releaseAfterUseAsync(async()=>await Promise.all(t.map(async c=>{let f=KDe(c),p=await VDe({onAbsolute:async h=>await le.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(K.join(a.prefixPath,h),"utf8")},onProject:async h=>await le.readFilePromise(K.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,`
`));return n}async function EJ(e,{cache:t,project:r}){let s=r.storedPackages.get(e.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=BL(e),n=r.storedChecksums,c=new Qi,f=await le.mktempPromise(),p=K.join(f,"source"),h=K.join(f,"user"),E=K.join(f,".yarn-patch.json"),C=r.configuration.makeFetcher(),S=[];try{let x,I;if(e.locatorHash===a.locatorHash){let T=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c});S.push(()=>T.releaseFs?.()),x=T,I=T}else x=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>x.releaseFs?.()),I=await C.fetch(e,{cache:t,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([le.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),le.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),le.writeJsonPromise(E,{locator:j.stringifyLocator(e),version:s.version})])}finally{for(let x of S)x()}return le.detachTemp(f),h}async function IJ(e,t){let r=Ae.fromPortablePath(e).replace(/\\/g,"/"),s=Ae.fromPortablePath(t).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Yr.execvp("git",["-c","core.safecrlf=false","-c","core.quotePath=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:Ae.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
The following error was reported by 'git':
${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${qe.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${qe.escapeRegExp(`/${c(s)}/`)}`,"g"),"$1/").replace(new RegExp(qe.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(qe.escapeRegExp(`${s}/`),"g"),"")}function CJ(e,t){let r=[];for(let{source:s}of e){if(s===null)continue;let a=rP(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&t!==null&&!kr.satisfiesWithPrereleases(t,c)||r.push(JSON.stringify(f))}}return Mn.makeHash(`${3}`,...r).slice(0,6)}Ge();function JDe(e,{configuration:t,report:r}){for(let s of e.parts)for(let a of s.lines)switch(s.type){case"context":r.reportInfo(null,` ${ce.pretty(t,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${ce.pretty(t,a,ce.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${ce.pretty(t,a,ce.Type.ADDED)}`);break;default:qe.assertNever(s.type)}}var oP=class{supports(t,r){return!!Fd(t)}getLocalPath(t,r){return null}async fetch(t,r){let s=r.checksums.get(t.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(t,s,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${j.prettyLocator(r.project.configuration,t)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:c}}async patchPackage(t,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=iP(t),f=await sP(s,c,r),p=await le.mktempPromise(),h=K.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),C=j.getIdentVendorPath(t),S=new hs(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await qe.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:x,optional:I}of f){if(x===null)continue;let T=new hs(h,{level:r.project.configuration.get("compressionLevel")}),O=new Pn(K.resolve(vt.root,C),{baseFs:T});try{await CL(rP(x),{baseFs:O,version:n})}catch(U){if(!(U instanceof F1))throw U;let V=r.project.configuration.get("enableInlineHunks"),$=!V&&!I?" (set enableInlineHunks for details)":"",ie=`${j.prettyLocator(r.project.configuration,t)}: ${U.message}${$}`,fe=ae=>{V&&JDe(U.hunk,{configuration:r.project.configuration,report:ae})};if(T.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:fe});continue}else throw new Lt(66,ie,fe)}T.saveAndClose()}return new hs(h,{level:r.project.configuration.get("compressionLevel")})}};Ge();var aP=class{supportsDescriptor(t,r){return!!wL(t)}supportsLocator(t,r){return!!Fd(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,s){let{patchPaths:a}=nP(t);return a.every(n=>!yJ(n))?t:j.bindDescriptor(t,{locator:j.stringifyLocator(r)})}getResolutionDependencies(t,r){let{sourceDescriptor:s}=nP(t);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(t,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=nP(t),c=await sP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=CJ(c,f.version);return[mJ(t,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(t,r,s,a){let[n]=await this.getCandidates(t,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let{sourceLocator:s}=iP(t);return{...await r.resolver.resolve(s,r),...t}}};Ge();bt();jt();var L1=class extends ft{constructor(){super(...arguments);this.save=pe.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=pe.String()}static{this.paths=[["patch-commit"]]}static{this.usage=it.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=K.resolve(this.context.cwd,Ae.toPortablePath(this.patchFolder)),c=K.join(n,"../source"),f=K.join(n,"../.yarn-patch.json");if(!le.existsSynLine truncated
${f.map(p=>`
- ${j.prettyLocator(r,p)}`).join("")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new st("No package found in the project for the given locator");await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=BL(c),h=await EJ(c,{cache:n,project:s});f.reportJson({locator:j.stringifyLocator(p),path:Ae.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${j.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${ce.pretty(r,Ae.fromPortablePath(h),"magenta")}`),f.reportInfo(0,`Once you are done run ${ce.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${Ae.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var uSt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[L1,M1],fetchers:[oP],resolvers:[aP]},fSt=uSt;var SJ={};Vt(SJ,{PnpmLinker:()=>lP,default:()=>mSt});Ge();bt();jt();var lP=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(t,r){return this.isEnabled(r)}async findPackageLocation(t,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new st(`The project in ${ce.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ce.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(t.locatorHash);if(typeof n>"u")throw new st(`Couldn't find ${j.prettyLocator(r.project.configuration,t)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(t,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new st(`The project in ${ce.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ce.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=t.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=t,f=t;do{f=c,c=K.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(t){return new BJ(t)}isEnabled(t){return t.project.configuration.get("nodeLinker")==="pnpm"}},BJ=class{constructor(t){this.opts=t;this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.asyncActions=new qe.AsyncActions(t.project.configuration.get("pnpmInstallConcurrency")),this.indexFolderPromise=nx(le,{indexPath:K.join(t.project.configuration.get("globalFolder"),"index")})}attachCustomData(t){}async installPackage(t,r,s){switch(t.linkType){case"SOFT":return this.installPackageSoft(t,r,s);case"HARD":return this.installPackageHard(t,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(t,r,s){let a=K.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(t)?K.join(a,Ir.nodeModules):null;return this.customData.pathsByLocator.set(t.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(t,r,s){let a=pSt(t,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,j.stringifyLocator(t)),this.customData.pathsByLocator.set(t.locatorHash,a),s.holdFetchResult(this.asyncActions.set(t.locatorHash,async()=>{await le.mkdirPromise(n,{recursive:!0}),await le.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t,p={manifest:await _t.tryFind(r.prefixPath,{baseFs:r.packageFs})??new _t,misc:{hasBindingGyp:yA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,t.version),E=yA.extractBuildRequest(t,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(t,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!zDe(t,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(t.locatorHash);if(typeof s>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${j.stringifyLocator(t)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(t.locatorHash,async n=>{await le.mkdirPromise(a,{recursive:!0});let c=await hSt(a),f=new Map(c),p=[n],h=(C,S)=>{let x=S;zDe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),x=j.devirtualizeLocator(S));let I=this.customDLine truncated
${ESt}
`,"--",...s],{cwd:e,strict:!0})},async makeReset(e,t){let r=t.map(s=>Ae.fromPortablePath(s.path));await Yr.execvp("git",["reset","HEAD","--",...r],{cwd:e,strict:!0})}};var vSt=[ePe],U1=class extends ft{constructor(){super(...arguments);this.commit=pe.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=pe.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=pe.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=pe.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=it.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),{driver:a,root:n}=await SSt(s.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of bSt(n,C))f.add(S);let p=new Set([r.get("rcFilename"),Ir.lockfile,Ir.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
`);else for(let C of h)this.context.stdout.write(`${Ae.fromPortablePath(C.path)}
`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function SSt(e){let t=null,r=null;for(let s of vSt)if((r=await s.findRoot(e))!==null){t=s;break}if(t===null||r===null)throw new st("No stage driver has been found for your current project");return{driver:t,root:r}}function bSt(e,t){let r=[];if(t===null)return r;for(;;){(t===e||t.startsWith(`${e}/`))&&r.push(t);let s;try{s=le.statSync(t)}catch{break}if(s.isSymbolicLink())t=K.resolve(K.dirname(t),le.readlinkSync(t));else break}return r}var DSt={commands:[U1]},PSt=DSt;var TJ={};Vt(TJ,{default:()=>OSt});Ge();Ge();bt();var nPe=et(hi());Ge();var tPe=et(M9()),xSt="e8e1bd300d860104bb8c58453ffa1eb4",kSt="OFCNCOG2CU",rPe=async(e,t)=>{let r=j.stringifyIdent(e),a=QSt(t).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},QSt=e=>(0,tPe.default)(kSt,xSt,{requester:{async send(r){try{let s=await nn.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var iPe=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,RSt=async(e,t,r,s)=>{if(r.scope==="types")return;let{project:a}=e,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(le.existsSync(K.join(e.cwd,"tsconfig.json"))||le.existsSync(K.join(a.cwd,"tsconfig.json")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new Qi};if(!await rPe(r,n))return;let E=iPe(r),C=j.parseRange(r.range).selector;if(!kr.validRange(C)){let O=n.normalizeDependency(r),U=await f.getCandidates(O,{},p);C=j.parseRange(U[0].reference).selector}let S=nPe.default.coerce(C);if(S===null)return;let x=`${ef.Modifier.CARET}${S.major}`,I=j.makeDescriptor(j.makeIdent("types",E),x),T=qe.mapAndFind(a.workspaces,O=>{let U=O.manifest.dependencies.get(r.identHash)?.descriptorHash,V=O.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&V!==r.descriptorHash)return qe.mapAndFind.skip;let $=[];for(let ie of _t.allDependencies){let fe=O.manifest[ie].get(I.identHash);typeof fe>"u"||$.push([ie,fe])}return $.length===0?qe.mapAndFind.skip:$});if(typeof T<"u")for(let[O,U]of T)e.manifest[O].set(U.identHash,U);else{try{let O=n.normalizeDependency(I);if((await f.getCandidates(O,{},p)).length===0)return}catch{return}e.manifest[ef.Target.DEVELOPMENT].set(I.identHash,I)}},TSt=async(e,t,r)=>{if(r.scope==="types")return;let{project:s}=e,{configuration:a}=s;if(!(a.get("tsEnableAutoTypes")??(le.existsSync(K.join(e.cwd,"tsconfig.json"))||le.existsSync(K.join(s.cwd,"tsconfig.json")))))return;let c=iPe(r),f=j.makeIdent("types",c);for(let p of _t.allDependencies)typeof e.manifest[p].get(f.identHash)>"u"||e.manifest[p].delete(f.identHash)},FSt=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.publishConfig&&t.publishConfig.types&&(t.types=t.publishConfig.types)},NSt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:RSt,afterWorkspaceDependencyRemoval:TSt,beforeWorkspacePacking:FSt}},OSt=NSt;var MJ={};Vt(MJ,{VersionApplyCommand:()=>G1,VersionCheckCommand:()=>q1,VersionCommand:()=>Y1,default:()=>HSt,versionUtils:()=>j1});Ge();Ge();jt();var j1={};Vt(j1,{Decision:()=>_1,applyPrerelease:()=>sPe,applyReleases:()=>LJ,applyStrategy:()=>cP,clearVersionFiles:()=>FJ,getUndecidedDependentWorkspaces:()=>fP,getUndecidedWorkspaces:()=>DL,openVersionFile:()=>H1,requireMoreDecisions:()=>MSt,resolveVersionFiles:()=>uP,suggestStrategy:()=>OJ,updateVersionFiles:()=>NJ,validateReleaseDecision:()=>wy});Ge();bt();Sc();jt();Xl();var TA=et(hi()),LSt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,_1=(h=>(h.UNDECIDED="undecided",h.DECLINE="decline",h.MAJOR="major",h.MINOR="minor",h.PATCH="patch",h.PREMAJOR="premajor",h.PREMINOR="preminor",h.PREPATCH="prepatch",h.PRERELEASE="prerelease",h))(_1||{});function wy(e){let t=TA.default.valid(e);return t||qe.validateEnum(v4(_1,"UNDECIDED"),e)}async function uP(e,{prerelease:t=null}={}){let r=new Map,s=e.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return r;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,"utf8"),p=us(f);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let C=j.parseIdent(h),S=e.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition fiLine truncated
- ${f.map(x=>Ae.fromPortablePath(x)).join(`
- `)}`);let p=new Set(qe.mapAndFilter(n,x=>{let I=e.tryWorkspaceByFilePath(x);return I===null?qe.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!t)return null;let h=f.length===1?f[0]:K.join(c,`${Mn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=le.existsSync(h)?await le.readFilePromise(h,"utf8"):"{}",C=us(E),S=new Map;for(let x of C.declined||[]){let I=j.parseIdent(x),T=e.getWorkspaceByIdent(I);S.set(T,"decline")}for(let[x,I]of Object.entries(C.releases||{})){let T=j.parseIdent(x),O=e.getWorkspaceByIdent(T);S.set(O,wy(I))}return{project:e,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(x=>x.manifest.version!==null)),releases:S,async saveAll(){let x={},I=[],T=[];for(let O of e.workspaces){if(O.manifest.version===null)continue;let U=j.stringifyIdent(O.anchoredLocator),V=S.get(O);V==="decline"?I.push(U):typeof V<"u"?x[U]=wy(V):p.has(O)&&T.push(U)}await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.changeFilePromise(h,Al(new Al.PreserveOrdering({releases:Object.keys(x).length>0?x:void 0,declined:I.length>0?I:void 0,undecided:T.length>0?T:void 0})))}}}function MSt(e){return DL(e).size>0||fP(e).length>0}function DL(e){let t=new Set;for(let r of e.changedWorkspaces)r.manifest.version!==null&&(e.releases.has(r)||t.add(r));return t}function fP(e,{include:t=new Set}={}){let r=[],s=new Map(qe.mapAndFilter([...e.releases],([n,c])=>c==="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(qe.mapAndFilter([...e.releases],([n,c])=>c!=="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of e.project.workspaces)if(!(!t.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of _t.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=e.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function OJ(e,t){let r=TA.default.clean(t);for(let s of Object.values(_1))if(s!=="undecided"&&s!=="decline"&&TA.default.inc(e,s)===r)return s;return null}function cP(e,t){if(TA.default.valid(t))return t;if(e===null)throw new st(`Cannot apply the release strategy "${t}" unless the workspace already has a valid version`);if(!TA.default.valid(e))throw new st(`Cannot apply the release strategy "${t}" on a non-semver version (${e})`);let r=TA.default.inc(e,t);if(r===null)throw new st(`Cannot apply the release strategy "${t}" on the specified version (${e})`);return r}function LJ(e,t,{report:r,exact:s}){let a=new Map;for(let n of e.workspaces)for(let c of _t.allDependencies)for(let f of n.manifest[c].values()){let p=e.tryWorkspaceByDescriptor(f);if(p===null||!t.has(p))continue;qe.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of t){let f=n.manifest.version;n.manifest.version=c,TA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?j.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${j.prettyLocator(e.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:Ae.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>"u"))for(let[E,C,S]of h){let x=E.manifest[C].get(S);if(typeof x>"u")throw new Error("Assertion failed: The dependency should have existed");let I=x.range,T=!1;if(I.startsWith(Ii.protocol)&&(I=I.slice(Ii.protocol.length),T=!0,I===n.relativeCwd))continue;let O=I.match(LSt);if(!O){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${j.prettyLocator(e.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${O[1]}${c}`;T&&(U=`${Ii.protocol}${U}`);let V=j.makeDescriptor(x,U);E.manifest[C].set(S,V)}}}var USt=new Map([["%n",{extract:e=>e.length>=1?[e[0],e.slice(1)]:null,generate:(e=0)=>`${e+1}`}]]);function sPe(e,{current:t,prerelease:r}){let s=new TA.default.SemVer(t),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==e&&(a.length=0);let c=!0,f=r.split(/\./g);for(let p of f){let h=USt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${e}-${n.join(".")}`}var G1=class extends ft{constructor(){super(...arguments);this.all=pe.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=pe.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=pe.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=pe.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=pe.Boolean("-R,--recursive",{description:"ReleLine truncated
This command will apply the deferred version changes and remove their definitions from the repository.
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
By default only the current workspace will be bumped, but you can configure this behavior by using one of:
- \`--recursive\` to also apply the version bump on its dependencies
- \`--all\` to apply the version bump on all packages in the repository
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await zr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await uP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let x=h.get(S);typeof x<"u"&&E.set(S,x)}}if(E.size===0){let C=h.size>0?" Did you want to add --all?":"";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}LJ(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await FJ(s):await NJ(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ge();bt();jt();var PL=et(hi());var q1=class extends ft{constructor(){super(...arguments);this.interactive=pe.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=it.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){XC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(RF(),oY)),{ScrollableItems:s}=await Promise.resolve().then(()=>(OF(),NF)),{FocusRequest:a}=await Promise.resolve().then(()=>(cY(),mwe)),{useListInput:n}=await Promise.resolve().then(()=>(FF(),ywe)),{renderForm:c}=await Promise.resolve().then(()=>(_F(),UF)),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Yc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>et(dn())),S=await Je.find(this.context.cwd,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,this.context.cwd);if(!I)throw new ar(x.cwd,this.context.cwd);await x.restoreInstallState();let T=await H1(x);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new st("This command can only be run on Git repositories");let O=()=>h.createElement(f,{flexDirection:"row",paddingBottom:1},h.createElement(f,{flexDirection:"column",width:60},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:ge,active:he,decision:Ce,setDecision:Ee})=>{let d=ge.manifest.raw.stableVersion??ge.manifest.version;if(d===null)throw new Error(`Assertion failed: The version should have been set (${j.prettyLocator(S,ge.anchoredLocator)})`);if(PL.default.prerelease(d)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${d})`);let Se=["undecided","decline","patch","minor","major"];n(Ce,Se,{active:he,minus:"left",plus:"right",set:Ee});let Be=Ce==="undecided"?h.createElement(p,{color:"yellow"},d):Ce==="decline"?h.createElement(p,{color:"green"},d):h.createElement(p,null,h.createElement(p,{color:"magenta"},d)," \u2192 ",h.createElement(p,{color:"green"},PL.default.valid(Ce)?Ce:PL.default.inc(d,Ce)));return h.createElement(f,{flexDirection:"column"},h.createElement(f,null,h.createElement(p,null,j.prettyLocator(S,ge.anchoredLocator)," - ",Be)),h.createElement(f,null,Se.map(meLine truncated
`)},p=()=>{let Ee=this.from.map(d=>V1.default.matcher(d));return s.workspaces.filter(d=>{let Se=j.stringifyIdent(d.anchoredLocator),Be=d.relativeCwd;return Ee.some(me=>me(Se)||me(Be))})},h=[];if(this.since?(f("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await Ma.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(f("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(f("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(f("Option --all is set; selecting all workspaces"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ee of h)f(`
- ${Ee.relativeCwd}
${j.prettyLocator(r,Ee.anchoredLocator)}`);h.length>0&&f("")}let E;if(this.recursive?this.since?(f("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependents()]).flat())):(f("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ee of E)f(`
- ${Ee.relativeCwd}
${j.prettyLocator(r,Ee.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(":")){for(let Ee of s.workspaces)if(Ee.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ee of h){if(c&&!Ee.manifest.scripts.has(c)&&!S&&!(await wn.getWorkspaceAccessibleBinaries(Ee)).has(c)){f(`Excluding ${Ee.relativeCwd} because it doesn't have a "${c}" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ee.cwd===a.cwd)){if(this.include.length>0&&!V1.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.include)&&!V1.default.isMatch(Ee.relativeCwd,this.include)){f(`Excluding ${Ee.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(V1.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.exclude)||V1.default.isMatch(Ee.relativeCwd,this.exclude))){f(`Excluding ${Ee.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ee.manifest.private===!0){f(`Excluding ${Ee.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ee)}}if(C.sort((Ee,d)=>j.stringifyIdent(Ee.anchoredLocator).localeCompare(j.stringifyIdent(d.anchoredLocator))),this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),I=x>0,T=x>1,O=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Ui.availableParallelism()/2):1,U=O===1?!1:this.parallel,V=U?this.interlaced:!0,$=(0,aPe.default)(O),ie=new Map,fe=new Set,ae=0,ge=null,he=!1,Ce=await Ft.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ee=>{let d=async(Se,{commandIndex:Be})=>{if(he)return-1;!U&&T&&Be>1&&Ee.reportSeparator();let me=jSt(Se,{configuration:r,label:I,commandIndex:Be}),[ue,Z]=oPe(Ee,{prefix:me,interlaced:V}),[be,Qe]=oPe(Ee,{prefix:me,interlaced:V});try{T&&Ee.reportInfo(null,`${me?`${me} `:""}Process started`);let ot=Date.now(),_=await this.cli.run([this.commandName,...this.args],{cwd:Se.cwd,stdout:ue,stderr:be})||0;ue.end(),be.end(),await Z,await Qe;let tt=Date.now();if(T){let Ne=r.get("enableTimers")?`, completed in ${ce.pretty(r,tt-ot,ce.Type.DURATION)}`:"";Ee.reportInfo(null,`${me?`${me} `:""}Process exited (exit code ${_})${Ne}`)}return _===130&&(he=!0,ge=_),_}catch(ot){throw ue.end(),be.end(),await Z,await Qe,ot}};for(let Se of C)ie.set(Se.anchoredLocator.locatorHash,Se);for(;ie.size>0&&!Ee.hasErrors();){let Se=[];for(let[Z,be]of ie){if(fe.has(be.anchoredDescriptor.descriptorHash))continue;let Qe=!0;if(this.topological||this.topologicalDev){let ot=this.topologicalDev?new Map([...be.manifest.dependencies,...be.manifest.devDependencies]):be.manifest.dependencies;for(let _ of ot.values()){let tt=s.tryWorkspaceByDescriptor(_);if(Qe=tt===null||!ie.has(tt.anchoredLocator.locatorHash),!Qe)break}}if(Qe&&(fe.add(be.anchoredDescriptor.descriptorHash),Se.push($(async()=>{let ot=await d(be,{commandIndex:++ae});return ie.delete(Z),fe.delete(be.anchoredDescriptor.descriptorHash),{workspace:be,exitCode:ot}})),!U))break}if(Se.length===0){let Z=Array.from(ie.values()).map(be=>j.prettyLocator(r,be.anchoredLocator)).join(", ");Ee.reportError(3,`Dependency cycle detected (${Z})`);return}let Be=await Promise.all(Se);Be.forEach(({workspace:Z,exitCode:be})=>{be!==0&&Ee.reportError(0,`The command failed in workspace ${j.prettyLocator(r,Z.anchoredLocator)} with exit code ${be}`)});let ue=Be.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof ue<"u"&&Ee.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return ge!==null?ge:Ce.exitCode()}};function oPe(e,{prefix:t,interlaced:r}){let s=e.createStreamReporter(t),a=new qe.DefaultStream;a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()});let n=new Promise(f=>{s.on("finish",()=>{f(a.active)})});if(r)return[a,n];let c=new qe.BufferStream;return c.pipe(a,{end:!1}),c.on("finish",()=>{a.end()}),[c,n]}function jSt(e,{configuration:t,commandIndex:r,label:s}){if(!s)return null;let n=`[${j.stringifyIdent(e.anchoredLocator)}]:`,c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[r%c.length];return ce.pretty(t,n,f)}var GSt={commands:[W1,K1]},qSt=GSt;var KI=()=>({modules:new Map([["@yarnpkg/cli",Vv],["@yarnpkg/core",Wv],["@yarnpkg/fslib",L2],["@yarnpkg/libzip",av],["@yarnpkg/parsers",Y2],["@yarnpkg/shell",pv],["clipanion",rB],["semver",YSt],["typanion",qs],["@yarnpkg/plugin-essentials",L5],["@yarnpkg/plugin-catalog",H5],["@yarnpkg/plugin-compat",W5],["@yarnpkg/plugin-constraints",c9],["@yarnpkg/plugin-dlx",u9],["@yarnpkg/plugin-exec",p9],["@yarnpkg/plugin-file",d9],["@yarnpkg/plugin-git",O5],["@yarnpkg/plugin-github",y9],["@yarnpkg/plugin-http",E9],["@yarnpkg/plugin-init",I9],["@yarnpkg/plugin-interactive-tools",mY],["@yarnpkg/plugin-jsr",EY],["@yarnpkg/plugin-link",IY],["@yarnpkg/plugin-nm",sW],["@yarnpkg/plugin-npm",sJ],["@yarnpkg/plugin-npm-cli",dJ],["@yarnpkg/plugin-pack",ZW],["@yarnpkg/plugin-patch",wJ],["@yarnpkg/plugin-pnp",WY],["@yarnpkg/plugin-pnpm",SJ],["@yarnpkg/plugin-stage",RJ],["@yarnpkg/plugin-tLine truncated
Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await zSt(a,e,{selfPath:r,pluginConfiguration:s})}catch(c){ba.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off("beforeExit",n),await le.rmtempPromise()}}FT(process.argv.slice(2),{cwd:K.cwd(),selfPath:Ae.toPortablePath(Ae.resolve(process.argv[1])),pluginConfiguration:KI()});})();
/**
@license
Copyright (c) 2015, Rebecca Turner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
/**
@license
Copyright Node.js contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
/**
@license
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
@license
Copyright Joyent, Inc. and other Node contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*! Bundled license information:
is-number/index.js:
(*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*)
to-regex-range/index.js:
(*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*)
fill-range/index.js:
(*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-extglob/index.js:
(*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*)
is-glob/index.js:
(*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
queue-microtask/index.js:
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
run-parallel/index.js:
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
git-url-parse/lib/index.js:
(*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*)
object-assign/index.js:
(*
object-assign
(c) Sindre Sorhus
@license MIT
*)
react/cjs/react.production.min.js:
(** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
scheduler/cjs/scheduler.production.min.js:
(** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
react-reconciler/cjs/react-reconciler.production.min.js:
(** @license React v0.26.2
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
is-windows/index.js:
(*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*)
*/
+1 -1
View File
@@ -15,4 +15,4 @@ npmMinimalAgeGate: 0
plugins:
- .yarn/plugins/plugin-prepare.cjs
yarnPath: .yarn/releases/yarn-4.15.0.cjs
yarnPath: .yarn/releases/yarn-4.16.0.cjs
+1 -1
View File
@@ -262,6 +262,6 @@
"not op_mini all"
],
"preferUnplugged": true,
"packageManager": "yarn@4.15.0",
"packageManager": "yarn@4.16.0",
"sideEffects": false
}
+1 -1
View File
@@ -15,5 +15,5 @@
"engines": {
"node": ">=20"
},
"packageManager": "yarn@4.15.0"
"packageManager": "yarn@4.16.0"
}
+1 -1
View File
@@ -9,5 +9,5 @@
"scripts": {
"test": "node ./index.js"
},
"packageManager": "yarn@4.15.0"
"packageManager": "yarn@4.16.0"
}
@@ -9,7 +9,7 @@
"license": "MIT",
"scripts": {
"test": "node test.js",
"test-coverage": "yarn dlx c8 node test.js"
"test-coverage": "npx c8 node test.js"
},
"packageManager": "yarn@4.15.0"
"packageManager": "yarn@4.16.0"
}
+1 -1
View File
@@ -67,5 +67,5 @@
"last 5 safari version"
]
},
"packageManager": "yarn@4.15.0"
"packageManager": "yarn@4.16.0"
}