mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
882 lines
2.6 MiB
JavaScript
882 lines
2.6 MiB
JavaScript
|
#!/usr/bin/env node
|
|||
|
/* eslint-disable */
|
|||
|
//prettier-ignore
|
|||
|
(()=>{var X_e=Object.create;var WR=Object.defineProperty;var Z_e=Object.getOwnPropertyDescriptor;var $_e=Object.getOwnPropertyNames;var e8e=Object.getPrototypeOf,t8e=Object.prototype.hasOwnProperty;var ye=(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 new Error('Dynamic require of "'+e+'" is not supported')});var yt=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yt=(e,t)=>{for(var r in t)WR(e,r,{get:t[r],enumerable:!0})},r8e=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $_e(t))!t8e.call(e,a)&&a!==r&&WR(e,a,{get:()=>t[a],enumerable:!(o=Z_e(t,a))||o.enumerable});return e};var tt=(e,t,r)=>(r=e!=null?X_e(e8e(e)):{},r8e(t||!e||!e.__esModule?WR(r,"default",{value:e,enumerable:!0}):r,e));var wi={};Yt(wi,{SAFE_TIME:()=>$7,S_IFDIR:()=>vD,S_IFLNK:()=>DD,S_IFMT:()=>qu,S_IFREG:()=>HI});var qu,vD,HI,DD,$7,eW=yt(()=>{qu=61440,vD=16384,HI=32768,DD=40960,$7=456789e3});var ir={};Yt(ir,{EBADF:()=>wo,EBUSY:()=>n8e,EEXIST:()=>c8e,EINVAL:()=>s8e,EISDIR:()=>l8e,ENOENT:()=>o8e,ENOSYS:()=>i8e,ENOTDIR:()=>a8e,ENOTEMPTY:()=>A8e,EOPNOTSUPP:()=>f8e,EROFS:()=>u8e,ERR_DIR_CLOSED:()=>YR});function _l(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n8e(e){return _l("EBUSY",e)}function i8e(e,t){return _l("ENOSYS",`${e}, ${t}`)}function s8e(e){return _l("EINVAL",`invalid argument, ${e}`)}function wo(e){return _l("EBADF",`bad file descriptor, ${e}`)}function o8e(e){return _l("ENOENT",`no such file or directory, ${e}`)}function a8e(e){return _l("ENOTDIR",`not a directory, ${e}`)}function l8e(e){return _l("EISDIR",`illegal operation on a directory, ${e}`)}function c8e(e){return _l("EEXIST",`file already exists, ${e}`)}function u8e(e){return _l("EROFS",`read-only filesystem, ${e}`)}function A8e(e){return _l("ENOTEMPTY",`directory not empty, ${e}`)}function f8e(e){return _l("EOPNOTSUPP",`operation not supported, ${e}`)}function YR(){return _l("ERR_DIR_CLOSED","Directory handle was closed")}var PD=yt(()=>{});var Hl={};Yt(Hl,{BigIntStatsEntry:()=>oy,DEFAULT_MODE:()=>zR,DirEntry:()=>KR,StatEntry:()=>sy,areStatsEqual:()=>VR,clearStats:()=>SD,convertToBigIntStats:()=>h8e,makeDefaultStats:()=>tW,makeEmptyStats:()=>p8e});function tW(){return new sy}function p8e(){return SD(tW())}function SD(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];typeof r=="number"?e[t]=0:typeof r=="bigint"?e[t]=BigInt(0):JR.types.isDate(r)&&(e[t]=new Date(0))}return e}function h8e(e){let t=new oy;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let o=e[r];typeof o=="number"?t[r]=BigInt(o):JR.types.isDate(o)&&(t[r]=new Date(o))}return t.atimeNs=t.atimeMs*BigInt(1e6),t.mtimeNs=t.mtimeMs*BigInt(1e6),t.ctimeNs=t.ctimeMs*BigInt(1e6),t.birthtimeNs=t.birthtimeMs*BigInt(1e6),t}function VR(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,o=t;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var JR,zR,KR,sy,oy,XR=yt(()=>{JR=tt(ye("util")),zR=33188,KR=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}},sy=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.mt
|
|||
|
`).length,o=t.length-r;return r>o?`\r
|
|||
|
`:`
|
|||
|
`}function Og(e,t){return t.replace(/\r?\n/g,D8e(e))}var uW,AW,gf,Gu,Ug=yt(()=>{uW=ye("crypto"),AW=ye("os");eT();Ba();gf=class{constructor(t){this.pathUtils=t}async*genTraversePromise(t,{stableSort:r=!1}={}){let o=[t];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(t,{algorithm:r="sha512"}={}){let o=await this.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,uW.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(t,{recursive:r=!0,maxRetries:o=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(u=>this.removePromise(this.pathUtils.resolve(t,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(t);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(t)}removeSync(t,{recursive:r=!0}={}){let o;try{o=this.lstatSync(t)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.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:o}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(t,{chmod:r,utimes:o}={}){if(t=this.resolve(t),t===this.pathUtils.dirname(t))return;let a=t.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(t,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await iW(this,t,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(t,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(t);if(n.isDirectory()){this.mkdirpSync(t);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(t,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(t);let p=o.readFileSync(r);this.writeFileSync(t,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(t);let p=o.readlinkSync(r);this.symlinkSync(xD(this.pathUtils,p),t)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(t,A)}async changeFilePromise(t,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(t,r,o):this.changeFileTextPromise(t,r,o)}async changeFileBufferPromise(t,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(t)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(t,r,{mode:o})}async changeFileTextPromise(t,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(t,"utf8")}catch{}let u=o?Og(n,r):r;n!==u&&await this.writeFilePromise(t,u,{mode:a})}changeFileSync(t,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(t,r,o):this.changeFileTextSync(t,r,o)}changeFileBufferSync(t,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(t)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(t,r,{mode:o})}changeFileTextSync(t,r,{automaticNewlines:
|
|||
|
`)}writeJsonSync(t,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(t,`${JSON.stringify(r,null,a)}
|
|||
|
`)}async preserveTimePromise(t,r){let o=await this.lstatPromise(t),a=await r();typeof a<"u"&&(t=a),await this.lutimesPromise(t,o.atime,o.mtime)}async preserveTimeSync(t,r){let o=this.lstatSync(t),a=r();typeof a<"u"&&(t=a),this.lutimesSync(t,o.atime,o.mtime)}},Gu=class extends gf{constructor(){super(J)}}});var vs,df=yt(()=>{Ug();vs=class extends gf{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,o){return this.baseFs.openPromise(this.mapToBase(t),r,o)}openSync(t,r,o){return this.baseFs.openSync(this.mapToBase(t),r,o)}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,o,a,n){return await this.baseFs.readPromise(t,r,o,a,n)}readSync(t,r,o,a,n){return this.baseFs.readSync(t,r,o,a,n)}async writePromise(t,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(t,r,o):await this.baseFs.writePromise(t,r,o,a,n)}writeSync(t,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(t,r,o):this.baseFs.writeSync(t,r,o,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,o){return this.baseFs.fchownPromise(t,r,o)}fchownSync(t,r,o){return this.baseFs.fchownSync(t,r,o)}async chownPromise(t,r,o){return this.baseFs.chownPromise(this.mapToBase(t),r,o)}chownSync(t,r,o){return this.baseFs.chownSync(this.mapToBase(t),r,o)}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,o=0){return this.baseFs.copyFilePromise(this.mapToBase(t),this.mapToBase(r),o)}copyFileSync(t,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(t),this.mapToBase(r),o)}async appendFilePromise(t,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(t),r,o)}appendFileSync(t,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(t),r,o)}async writeFilePromise(t,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(t),r,o)}writeFileSync(t,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(t),r,o)}async unlinkPromise(t){return this.baseFs.unlinkPromise(this.mapToBase(t))}unlinkSync(t){return this.baseFs.unlinkSync(this.mapToBase(t))}async utimesPromise(t,r,o){return this.baseFs.utimesPromise(this.mapToBase(t),r,o)}utimesSync(t,r,o){return this.baseFs.utimesSync(this.mapToBase(t),r,o)}async lutimesPromise(t,r,o){return this.baseFs.lutimesPromise(this.mapToBase(t),r,o)}lutimesSync(t,r,o){return this.baseFs.lutimesSync(this.mapToB
|
|||
|
`,Hn=yr(`\\
|
|||
|
`,!1),Fn=function(){return""},Ti="\\",Rn=yr("\\",!1),_i=/^[\\$"`]/,De=ys(["\\","$",'"',"`"],!1,!1),Li=function(L){return L},ti="\\a",Ga=yr("\\a",!1),Zt=function(){return"a"},dc="\\b",mu=yr("\\b",!1),mc=function(){return"\b"},vl=/^[Ee]/,SA=ys(["E","e"],!1,!1),yu=function(){return"\x1B"},Ce="\\f",Ft=yr("\\f",!1),yc=function(){return"\f"},Hi="\\n",Eu=yr("\\n",!1),Gt=function(){return`
|
|||
|
`},Dl="\\r",xA=yr("\\r",!1),up=function(){return"\r"},Ec="\\t",bA=yr("\\t",!1),Pn=function(){return" "},Ai="\\v",Cc=yr("\\v",!1),QA=function(){return"\v"},oa=/^[\\'"?]/,qi=ys(["\\","'",'"',"?"],!1,!1),Ho=function(L){return String.fromCharCode(parseInt(L,16))},et="\\x",ao=yr("\\x",!1),Pl="\\u",Cu=yr("\\u",!1),Gi="\\U",Iu=yr("\\U",!1),kA=function(L){return String.fromCodePoint(parseInt(L,16))},ja=/^[0-7]/,Ic=ys([["0","7"]],!1,!1),ds=/^[0-9a-fA-f]/,Mt=ys([["0","9"],["a","f"],["A","f"]],!1,!1),Sn=lg(),mi="{}",aa=yr("{}",!1),lo=function(){return"{}"},Ms="-",la=yr("-",!1),ca="+",qo=yr("+",!1),Zi=".",Os=yr(".",!1),Us=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},_s=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},co=function(L){return{type:"variable",...L}},Kn=function(L){return{type:"variable",name:L}},qn=function(L){return L},$i="*",es=yr("*",!1),yi="/",Wa=yr("/",!1),ua=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},te=function(L,K){return K.reduce((re,fe)=>({left:re,...fe}),L)},we=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},qe="$((",Be=yr("$((",!1),Se="))",ze=yr("))",!1),Bt=function(L){return L},er="$(",Xr=yr("$(",!1),Tn=function(L){return L},_r="${",ri=yr("${",!1),Ni=":-",Jn=yr(":-",!1),Ya=function(L,K){return{name:L,defaultValue:K}},Aa=":-}",Ei=yr(":-}",!1),fa=function(L){return{name:L,defaultValue:[]}},Ka=":+",uo=yr(":+",!1),FA=function(L,K){return{name:L,alternativeValue:K}},wc=":+}",pa=yr(":+}",!1),ig=function(L){return{name:L,alternativeValue:[]}},Bc=function(L){return{name:L}},Fm="$",sg=yr("$",!1),zn=function(L){return t.isGlobPattern(L)},Ap=function(L){return L},og=/^[a-zA-Z0-9_]/,RA=ys([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Hs=function(){return ag()},wu=/^[$@*?#a-zA-Z0-9_\-]/,Ja=ys(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ji=/^[()}<>$|&; \t"']/,ha=ys(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Bu=/^[<>&; \t"']/,ms=ys(["<",">","&",";"," "," ",'"',"'"],!1,!1),vc=/^[ \t]/,Dc=ys([" "," "],!1,!1),j=0,vt=0,Sl=[{line:1,column:1}],Si=0,Pc=[],ut=0,vu;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function ag(){return e.substring(vt,j)}function mI(){return Sc(vt,j)}function TA(L,K){throw K=K!==void 0?K:Sc(vt,j),Ag([ug(L)],e.substring(vt,j),K)}function fp(L,K){throw K=K!==void 0?K:Sc(vt,j),Rm(L,K)}function yr(L,K){return{type:"literal",text:L,ignoreCase:K}}function ys(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function lg(){return{type:"any"}}function cg(){return{type:"end"}}function ug(L){return{type:"other",description:L}}function pp(L){var K=Sl[L],re;if(K)return K;for(re=L-1;!Sl[re];)re--;for(K=Sl[re],K={line:K.line,column:K.column};re<L;)e.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return Sl[L]=K,K}function Sc(L,K){var re=pp(L),fe=pp(K);return{start:{offset:L,line:re.line,column:re.column},end:{offset:K,line:fe.line,column:fe.column}}}function Et(L){j<Si||(j>Si&&(Si=j,Pc=[]),Pc.push(L))}function Rm(L,K){return new qg(L,null,null,K)}function Ag(L,K,re){return new qg(qg.buildMessage(L,K),L,K,re)}function fg(){var L,K,re;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(re=Du(),re===r&&(re=null),re!==r?(vt=L,K=n(re),L=K):(j=L,L=r)):(j=L,L=r),L}function Du(){var L,K,re,fe,Ze;if(L=j,K=Pu(),K!==r){for(re=[],fe=Qt();fe!==r;)re.push(fe),fe=Qt();re!==r?(fe=pg(),fe!==r?(Ze=Tm(),Ze===r&&(Ze=null),Ze!==r?(vt=L,K=u(K,fe,Ze),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;if(L===r)if(L=j,K=Pu(),K!==r){for(re=[],fe=Qt();fe!==r;)re.push(fe),fe=Qt();re!==r?(fe=pg(),fe===r&&(fe=null),fe!==r?(vt=L,K=A(K,fe),L=K):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;return L}function Tm(){var L,K,re,fe,Ze;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=Du(),re!==r){for(fe=[],Ze=Qt();Ze!==r;)fe.push(Ze),Ze=Qt();fe!==r?(vt=L,K=p(re),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r;return L}function pg(){var L;return e.charCodeAt(j)===59?(L=h,j+
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),bY.repeat(" ",t)+o+A+n+`
|
|||
|
`+bY.repeat(" ",t+this.position-a+o.length)+"^"};IT.prototype.toString=function(t){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(o+=`:
|
|||
|
`+r)),o};QY.exports=IT});var os=_((rbt,RY)=>{"use strict";var FY=dy(),gHe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dHe=["scalar","sequence","mapping"];function mHe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function yHe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(gHe.indexOf(r)===-1)throw new FY('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=mHe(t.styleAliases||null),dHe.indexOf(this.kind)===-1)throw new FY('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}RY.exports=yHe});var Kg=_((nbt,LY)=>{"use strict";var TY=Yg(),jD=dy(),EHe=os();function wT(e,t,r){var o=[];return e.include.forEach(function(a){r=wT(a,t,r)}),e[t].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function CHe(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function o(a){e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function my(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 jD("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=wT(this,"implicit",[]),this.compiledExplicit=wT(this,"explicit",[]),this.compiledTypeMap=CHe(this.compiledImplicit,this.compiledExplicit)}my.DEFAULT=null;my.create=function(){var t,r;switch(arguments.length){case 1:t=my.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new jD("Wrong number of arguments for Schema.create function")}if(t=TY.toArray(t),r=TY.toArray(r),!t.every(function(o){return o instanceof my}))throw new jD("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof EHe}))throw new jD("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new my({include:t,explicit:r})};LY.exports=my});var MY=_((ibt,NY)=>{"use strict";var IHe=os();NY.exports=new IHe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var UY=_((sbt,OY)=>{"use strict";var wHe=os();OY.exports=new wHe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var HY=_((obt,_Y)=>{"use strict";var BHe=os();_Y.exports=new BHe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var WD=_((abt,qY)=>{"use strict";var vHe=Kg();qY.exports=new vHe({explicit:[MY(),UY(),HY()]})});var jY=_((lbt,GY)=>{"use strict";var DHe=os();function PHe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function SHe(){return null}function xHe(e){return e===null}GY.exports=new DHe("tag:yaml.org,2002:null",{kind:"scalar",resolve:PHe,construct:SHe,predicate:xHe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var YY=_((cbt,WY)=>{"use strict";var bHe=os();function QHe(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 kHe(e){return e==="true"||e==="True"||e==="TRUE"}function FHe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}WY.exports=new bHe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:QHe,construct:kHe,predicate:FHe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE"
|
|||
|
\r`;function n6e(e){if(e===null)return!1;var t,r,o=0,a=e.length,n=DT;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function i6e(e){var t,r,o=e.replace(/[\r\n=]/g,""),a=o.length,n=DT,u=0,A=[];for(t=0;t<a;t++)t%4===0&&t&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(t));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Jg?Jg.from?Jg.from(A):new Jg(A):A}function s6e(e){var t="",r=0,o,a,n=e.length,u=DT;for(o=0;o<n;o++)o%3===0&&o&&(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]),r=(r<<8)+e[o];return a=n%3,a===0?(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[r&63]):a===2?(t+=u[r>>10&63],t+=u[r>>4&63],t+=u[r<<2&63],t+=u[64]):a===1&&(t+=u[r>>2&63],t+=u[r<<4&63],t+=u[64],t+=u[64]),t}function o6e(e){return Jg&&Jg.isBuffer(e)}aK.exports=new r6e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n6e,construct:i6e,predicate:o6e,represent:s6e})});var uK=_((ybt,cK)=>{"use strict";var a6e=os(),l6e=Object.prototype.hasOwnProperty,c6e=Object.prototype.toString;function u6e(e){if(e===null)return!0;var t=[],r,o,a,n,u,A=e;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,c6e.call(a)!=="[object Object]")return!1;for(n in a)if(l6e.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}function A6e(e){return e!==null?e:[]}cK.exports=new a6e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:u6e,construct:A6e})});var fK=_((Ebt,AK)=>{"use strict";var f6e=os(),p6e=Object.prototype.toString;function h6e(e){if(e===null)return!0;var t,r,o,a,n,u=e;for(n=new Array(u.length),t=0,r=u.length;t<r;t+=1){if(o=u[t],p6e.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[t]=[a[0],o[a[0]]]}return!0}function g6e(e){if(e===null)return[];var t,r,o,a,n,u=e;for(n=new Array(u.length),t=0,r=u.length;t<r;t+=1)o=u[t],a=Object.keys(o),n[t]=[a[0],o[a[0]]];return n}AK.exports=new f6e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:h6e,construct:g6e})});var hK=_((Cbt,pK)=>{"use strict";var d6e=os(),m6e=Object.prototype.hasOwnProperty;function y6e(e){if(e===null)return!0;var t,r=e;for(t in r)if(m6e.call(r,t)&&r[t]!==null)return!1;return!0}function E6e(e){return e!==null?e:{}}pK.exports=new d6e("tag:yaml.org,2002:set",{kind:"mapping",resolve:y6e,construct:E6e})});var yy=_((Ibt,gK)=>{"use strict";var C6e=Kg();gK.exports=new C6e({include:[vT()],implicit:[nK(),sK()],explicit:[lK(),uK(),fK(),hK()]})});var mK=_((wbt,dK)=>{"use strict";var I6e=os();function w6e(){return!0}function B6e(){}function v6e(){return""}function D6e(e){return typeof e>"u"}dK.exports=new I6e("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:w6e,construct:B6e,predicate:D6e,represent:v6e})});var EK=_((Bbt,yK)=>{"use strict";var P6e=os();function S6e(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),o="";return!(t[0]==="/"&&(r&&(o=r[1]),o.length>3||t[t.length-o.length-1]!=="/"))}function x6e(e){var t=e,r=/\/([gim]*)$/.exec(e),o="";return t[0]==="/"&&(r&&(o=r[1]),t=t.slice(1,t.length-o.length-1)),new RegExp(t,o)}function b6e(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Q6e(e){return Object.prototype.toString.call(e)==="[object RegExp]"}yK.exports=new P6e("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:S6e,construct:x6e,predicate:Q6e,represent:b6e})});var wK=_((vbt,IK)=>{"use strict";var YD;try{CK=ye,YD=CK("esprima")}catch{typeof window<"u"&&(YD=window.esprima)}var CK,k6e=os();function F6e(e){if(e===null)return!1;try{var t="("+e+")",r=YD.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 R6e(e){var t="("+e+")",r=YD.parse(t,{range:!0}),o=[],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!
|
|||
|
`: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 W6e(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var MK=new Array(256),OK=new Array(256);for(zg=0;zg<256;zg++)MK[zg]=SK(zg)?1:0,OK[zg]=SK(zg);var zg;function Y6e(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||M6e,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 UK(e,t){return new kK(t,new N6e(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function wr(e,t){throw UK(e,t)}function zD(e,t){e.onWarning&&e.onWarning.call(null,UK(e,t))}var xK={YAML:function(t,r,o){var a,n,u;t.version!==null&&wr(t,"duplication of %YAML directive"),o.length!==1&&wr(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&wr(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&wr(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=u<2,u!==1&&u!==2&&zD(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var a,n;o.length!==2&&wr(t,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],LK.test(a)||wr(t,"ill-formed tag handle (first argument) of the TAG directive"),jp.call(t.tagMap,a)&&wr(t,'there is a previously declared suffix for "'+a+'" tag handle'),NK.test(n)||wr(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[a]=n}};function Gp(e,t,r,o){var a,n,u,A;if(t<r){if(A=e.input.slice(t,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||wr(e,"expected valid JSON character");else U6e.test(A)&&wr(e,"the stream contains non-printable characters");e.result+=A}}function bK(e,t,r,o){var a,n,u,A;for(yf.isObject(r)||wr(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],jp.call(t,n)||(t[n]=r[n],o[n]=!0)}function Cy(e,t,r,o,a,n,u,A){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])&&wr(e,"nested arrays are not supported inside keys"),typeof a=="object"&&PK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&PK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)bK(e,t,n[p],r);else bK(e,t,n,r);else!e.json&&!jp.call(r,a)&&jp.call(t,a)&&(e.line=u||e.line,e.position=A||e.position,wr(e,"duplicated mapping key")),t[a]=n,delete r[a];return t}function ST(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++):wr(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Yi(e,t,r){for(var o=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Vg(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(Yu(a))for(ST(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&zD(e,"deficient indentation"),o}function VD(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||Da(r)))}function xT(e,t){t===1?e.result+=" ":t>1&&(e.result+=yf.repeat(`
|
|||
|
`,t-1))}function K6e(e,t,r){var o,a,n,u,A,p,h,C,w=e.kind,v=e.result,b;if(b=e.input.charCodeAt(e.position),Da(b)||Ey(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=e.input.charCodeAt(e.position+1),Da(a)||r&&Ey(a)))return!1;for(e.kind="scalar",e.result="",n=u=e.position,A=!1;b!==0;){if(b===58){if(a=e.input.charCodeAt(e.position+1),Da(a)||r&&Ey(a))break}else if(b===35){if(o=e.input.charCodeAt(e.position-1),Da(o))break}else{if(e.position===e.lineStart&&VD(e)||r&&Ey(b))break;if(Yu(b))if(p=e.line,h=e.lineStart,C=e.lineIndent,Yi(e,!1,-1),e.lineIndent>=t){A=!0,b=e.input.charCodeAt(e.position);continue}else{e.position=u,e.line=p,e.lineStart=h,e.lineIndent=C;break}}A&&(Gp(e,n,u,!1),xT(e,e.line-p),n=u=e.position,A=!1),Vg(b)||(u=e.position+1),b=e.input.charCodeAt(++e.position)}return Gp(e,n,u,!1),e.result?!0:(e.kind=w,e.result=v,!1)}function J6e(e,t){var r,o,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Gp(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,a=e.position;else return!0;else Yu(r)?(Gp(e,o,a,!0),xT(e,Yi(e,!1,t)),o=a=e.position):e.position===e.lineStart&&VD(e)?wr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);wr(e,"unexpected end of the stream within a single quoted scalar")}function z6e(e,t){var r,o,a,n,u,A;if(A=e.input.charCodeAt(e.position),A!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(A=e.input.charCodeAt(e.position))!==0;){if(A===34)return Gp(e,r,e.position,!0),e.position++,!0;if(A===92){if(Gp(e,r,e.position,!0),A=e.input.charCodeAt(++e.position),Yu(A))Yi(e,!1,t);else if(A<256&&MK[A])e.result+=OK[A],e.position++;else if((u=G6e(A))>0){for(a=u,n=0;a>0;a--)A=e.input.charCodeAt(++e.position),(u=q6e(A))>=0?n=(n<<4)+u:wr(e,"expected hexadecimal character");e.result+=W6e(n),e.position++}else wr(e,"unknown escape sequence");r=o=e.position}else Yu(A)?(Gp(e,r,o,!0),xT(e,Yi(e,!1,t)),r=o=e.position):e.position===e.lineStart&&VD(e)?wr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}wr(e,"unexpected end of the stream within a double quoted scalar")}function V6e(e,t){var r=!0,o,a=e.tag,n,u=e.anchor,A,p,h,C,w,v={},b,E,R,N;if(N=e.input.charCodeAt(e.position),N===91)p=93,w=!1,n=[];else if(N===123)p=125,w=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),N=e.input.charCodeAt(++e.position);N!==0;){if(Yi(e,!0,t),N=e.input.charCodeAt(e.position),N===p)return e.position++,e.tag=a,e.anchor=u,e.kind=w?"mapping":"sequence",e.result=n,!0;r||wr(e,"missed comma between flow collection entries"),E=b=R=null,h=C=!1,N===63&&(A=e.input.charCodeAt(e.position+1),Da(A)&&(h=C=!0,e.position++,Yi(e,!0,t))),o=e.line,Iy(e,t,KD,!1,!0),E=e.tag,b=e.result,Yi(e,!0,t),N=e.input.charCodeAt(e.position),(C||e.line===o)&&N===58&&(h=!0,N=e.input.charCodeAt(++e.position),Yi(e,!0,t),Iy(e,t,KD,!1,!0),R=e.result),w?Cy(e,n,v,E,b,R):h?n.push(Cy(e,null,v,E,b,R)):n.push(b),Yi(e,!0,t),N=e.input.charCodeAt(e.position),N===44?(r=!0,N=e.input.charCodeAt(++e.position)):r=!1}wr(e,"unexpected end of the stream within a flow collection")}function X6e(e,t){var r,o,a=PT,n=!1,u=!1,A=t,p=0,h=!1,C,w;if(w=e.input.charCodeAt(e.position),w===124)o=!1;else if(w===62)o=!0;else return!1;for(e.kind="scalar",e.result="";w!==0;)if(w=e.input.charCodeAt(++e.position),w===43||w===45)PT===a?a=w===43?DK:O6e:wr(e,"repeat of a chomping mode identifier");else if((C=j6e(w))>=0)C===0?wr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?wr(e,"repeat of an indentation width identifier"):(A=t+C-1,u=!0);else break;if(Vg(w)){do w=e.input.charCodeAt(++e.position);while(Vg(w));if(w===35)do w=e.input.charCodeAt(++e.position);while(!Yu(w)&&w!==0)}for(;w!==0;){for(ST(e),e.lineIndent=0,w=e.input.charCodeAt(e.position);(!u||e.lineIndent<A)&&w===32;)e.lineIndent++,w=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>A&&(A=e
|
|||
|
`,n?1+p:p):a===PT&&n&&(e.result+=`
|
|||
|
`);break}for(o?Vg(w)?(h=!0,e.result+=yf.repeat(`
|
|||
|
`,n?1+p:p)):h?(h=!1,e.result+=yf.repeat(`
|
|||
|
`,p+1)):p===0?n&&(e.result+=" "):e.result+=yf.repeat(`
|
|||
|
`,p):e.result+=yf.repeat(`
|
|||
|
`,n?1+p:p),n=!0,u=!0,p=0,r=e.position;!Yu(w)&&w!==0;)w=e.input.charCodeAt(++e.position);Gp(e,r,e.position,!1)}return!0}function QK(e,t){var r,o=e.tag,a=e.anchor,n=[],u,A=!1,p;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(e.position);p!==0&&!(p!==45||(u=e.input.charCodeAt(e.position+1),!Da(u)));){if(A=!0,e.position++,Yi(e,!0,-1)&&e.lineIndent<=t){n.push(null),p=e.input.charCodeAt(e.position);continue}if(r=e.line,Iy(e,t,TK,!1,!0),n.push(e.result),Yi(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)wr(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return A?(e.tag=o,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}function Z6e(e,t,r){var o,a,n,u,A=e.tag,p=e.anchor,h={},C={},w=null,v=null,b=null,E=!1,R=!1,N;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),N=e.input.charCodeAt(e.position);N!==0;){if(o=e.input.charCodeAt(e.position+1),n=e.line,u=e.position,(N===63||N===58)&&Da(o))N===63?(E&&(Cy(e,h,C,w,v,null),w=v=b=null),R=!0,E=!0,a=!0):E?(E=!1,a=!0):wr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,N=o;else if(Iy(e,r,RK,!1,!0))if(e.line===n){for(N=e.input.charCodeAt(e.position);Vg(N);)N=e.input.charCodeAt(++e.position);if(N===58)N=e.input.charCodeAt(++e.position),Da(N)||wr(e,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(Cy(e,h,C,w,v,null),w=v=b=null),R=!0,E=!1,a=!1,w=e.tag,v=e.result;else if(R)wr(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=A,e.anchor=p,!0}else if(R)wr(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=A,e.anchor=p,!0;else break;if((e.line===n||e.lineIndent>t)&&(Iy(e,t,JD,!0,a)&&(E?v=e.result:b=e.result),E||(Cy(e,h,C,w,v,b,n,u),w=v=b=null),Yi(e,!0,-1),N=e.input.charCodeAt(e.position)),e.lineIndent>t&&N!==0)wr(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return E&&Cy(e,h,C,w,v,null),R&&(e.tag=A,e.anchor=p,e.kind="mapping",e.result=h),R}function $6e(e){var t,r=!1,o=!1,a,n,u;if(u=e.input.charCodeAt(e.position),u!==33)return!1;if(e.tag!==null&&wr(e,"duplication of a tag property"),u=e.input.charCodeAt(++e.position),u===60?(r=!0,u=e.input.charCodeAt(++e.position)):u===33?(o=!0,a="!!",u=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do u=e.input.charCodeAt(++e.position);while(u!==0&&u!==62);e.position<e.length?(n=e.input.slice(t,e.position),u=e.input.charCodeAt(++e.position)):wr(e,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Da(u);)u===33&&(o?wr(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),LK.test(a)||wr(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),u=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),H6e.test(n)&&wr(e,"tag suffix cannot contain flow indicator characters")}return n&&!NK.test(n)&&wr(e,"tag name cannot contain such characters: "+n),r?e.tag=n:jp.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:wr(e,'undeclared tag handle "'+a+'"'),!0}function eqe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&wr(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Da(r)&&!Ey(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&wr(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function tqe(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Da(o)&&!Ey(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&wr(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),jp.call(e.anchorMap,r)||wr(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Yi(e,!0,-1),!0}function Iy(e,t,r,o,a){var n,u,A,p=1,h=!1,C=!1,w,v,b,E,R;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n
|
|||
|
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Y6e(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,wr(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;)rqe(r);return r.documents}function HK(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=_K(e,r);if(typeof t!="function")return o;for(var a=0,n=o.length;a<n;a+=1)t(o[a])}function qK(e,t){var r=_K(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new kK("expected a single document in the stream, but found more")}}function nqe(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),HK(e,t,yf.extend({schema:FK},r))}function iqe(e,t){return qK(e,yf.extend({schema:FK},t))}XI.exports.loadAll=HK;XI.exports.load=qK;XI.exports.safeLoadAll=nqe;XI.exports.safeLoad=iqe});var fJ=_((xbt,FT)=>{"use strict";var $I=Yg(),ew=dy(),sqe=VI(),oqe=yy(),XK=Object.prototype.toString,ZK=Object.prototype.hasOwnProperty,aqe=9,ZI=10,lqe=13,cqe=32,uqe=33,Aqe=34,$K=35,fqe=37,pqe=38,hqe=39,gqe=42,eJ=44,dqe=45,tJ=58,mqe=61,yqe=62,Eqe=63,Cqe=64,rJ=91,nJ=93,Iqe=96,iJ=123,wqe=124,sJ=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 Bqe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function vqe(e,t){var r,o,a,n,u,A,p;if(t===null)return{};for(r={},o=Object.keys(t),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(t[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=e.compiledTypeMap.fallback[u],p&&ZK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function jK(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new ew("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+$I.repeat("0",o-t.length)+t}function Dqe(e){this.schema=e.schema||sqe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=$I.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=vqe(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 WK(e,t){for(var r=$I.repeat(" ",t),o=0,a=-1,n="",u,A=e.length;o<A;)a=e.indexOf(`
|
|||
|
`,o),a===-1?(u=e.slice(o),o=A):(u=e.slice(o,a+1),o=a+1),u.length&&u!==`
|
|||
|
`&&(n+=r),n+=u;return n}function bT(e,t){return`
|
|||
|
`+$I.repeat(" ",e.indent*t)}function Pqe(e,t){var r,o,a;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}function kT(e){return e===cqe||e===aqe}function wy(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 Sqe(e){return wy(e)&&!kT(e)&&e!==65279&&e!==lqe&&e!==ZI}function YK(e,t){return wy(e)&&e!==65279&&e!==eJ&&e!==rJ&&e!==nJ&&e!==iJ&&e!==sJ&&e!==tJ&&(e!==$K||t&&Sqe(t))}function xqe(e){return wy(e)&&e!==65279&&!kT(e)&&e!==dqe&&e!==Eqe&&e!==tJ&&e!==eJ&&e!==rJ&&e!==nJ&&e!==iJ&&e!==sJ&&e!==$K&&e!==pqe&&e!==gqe&&e!==uqe&&e!==wqe&&e!==mqe&&e!==yqe&&e!==hqe&&e!==Aqe&&e!==fqe&&e!==Cqe&&e!==Iqe}function oJ(e){var t=/^\n* /;return t.test(e)}var aJ=1,lJ=2,cJ=3,uJ=4,XD=5;function bqe(e,t,r,o,a){var n,u,A,p=!1,h=!1,C=o!==-1,w=-1,v=xqe(e.charCodeAt(0))&&!kT(e.charCodeAt(e.length-1));if(t)for(n=0;n<e.length;n++){if(u=e.charCodeAt(n),!wy(u))return XD;A=n>0?e.charCodeAt(n-1):null,v=v&&YK(u,A)}else{for(n=0;n<e.length;n++){if(u=e.charCodeAt(n),u===ZI)p=!0,C&&(h=h||n-w-1>o&&e[w+1]!==" ",w=n);else if(!wy(u))return XD;A=n>0?e.charCodeAt(n-1):null,v=v&&YK(u,A)}h=h||C&&n-w-1>o&&e[w+1]!==" "}return!p&&!h?v&&!a(e)?aJ:lJ:r>9&&oJ(e)?XD:h?uJ:cJ}function Qqe(e,t,r,o){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Bqe.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),u=o||e.flowLevel>-1&&r>=e.flowLevel;function A(p){return Pqe(e,p)}switch(bqe(t,u,e.indent,n,A)){case aJ:return t;case lJ:return"'"+t.replace(/'/g,"''")+"'";case cJ:return"|"+KK(t,e.indent)+JK(WK(t,a));case uJ:return">"+KK(t,e.indent)+JK(WK(kqe(t,n),a));case XD:return'"'+Fqe(t,n)+'"';default:throw new ew("impossible error: invalid scalar style")}}()}function KK(e,t){var r=oJ(e)?String(t):"",o=e[e.length-1]===`
|
|||
|
`,a=o&&(e[e.length-2]===`
|
|||
|
`||e===`
|
|||
|
`),n=a?"+":o?"":"-";return r+n+`
|
|||
|
`}function JK(e){return e[e.length-1]===`
|
|||
|
`?e.slice(0,-1):e}function kqe(e,t){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=e.indexOf(`
|
|||
|
`);return h=h!==-1?h:e.length,r.lastIndex=h,zK(e.slice(0,h),t)}(),a=e[0]===`
|
|||
|
`||e[0]===" ",n,u;u=r.exec(e);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
|
|||
|
`:"")+zK(p,t),a=n}return o}function zK(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(e);)A=o.index,A-a>t&&(n=u>a?u:A,p+=`
|
|||
|
`+e.slice(a,n),a=n+1),u=A;return p+=`
|
|||
|
`,e.length-a>t&&u>a?p+=e.slice(a,u)+`
|
|||
|
`+e.slice(u+1):p+=e.slice(a),p.slice(1)}function Fqe(e){for(var t="",r,o,a,n=0;n<e.length;n++){if(r=e.charCodeAt(n),r>=55296&&r<=56319&&(o=e.charCodeAt(n+1),o>=56320&&o<=57343)){t+=jK((r-55296)*1024+o-56320+65536),n++;continue}a=vo[r],t+=!a&&wy(r)?e[n]:a||jK(r)}return t}function Rqe(e,t,r){var o="",a=e.tag,n,u;for(n=0,u=r.length;n<u;n+=1)Xg(e,t,r[n],!1,!1)&&(n!==0&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function Tqe(e,t,r,o){var a="",n=e.tag,u,A;for(u=0,A=r.length;u<A;u+=1)Xg(e,t+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=bT(e,t)),e.dump&&ZI===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}function Lqe(e,t,r){var o="",a=e.tag,n=Object.keys(r),u,A,p,h,C;for(u=0,A=n.length;u<A;u+=1)C="",u!==0&&(C+=", "),e.condenseFlow&&(C+='"'),p=n[u],h=r[p],Xg(e,t,p,!1,!1)&&(e.dump.length>1024&&(C+="? "),C+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xg(e,t,h,!1,!1)&&(C+=e.dump,o+=C));e.tag=a,e.dump="{"+o+"}"}function Nqe(e,t,r,o){var a="",n=e.tag,u=Object.keys(r),A,p,h,C,w,v;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new ew("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=bT(e,t)),h=u[A],C=r[h],Xg(e,t+1,h,!0,!0,!0)&&(w=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,w&&(e.dump&&ZI===e.dump.charCodeAt(0)?v+="?":v+="? "),v+=e.dump,w&&(v+=bT(e,t)),Xg(e,t+1,C,!0,w)&&(e.dump&&ZI===e.dump.charCodeAt(0)?v+=":":v+=": ",v+=e.dump,a+=v));e.tag=n,e.dump=a||"{}"}function VK(e,t,r){var o,a,n,u,A,p;for(a=r?e.explicitTypes:e.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof t=="object"&&t instanceof A.instanceOf)&&(!A.predicate||A.predicate(t))){if(e.tag=r?A.tag:"?",A.represent){if(p=e.styleMap[A.tag]||A.defaultStyle,XK.call(A.represent)==="[object Function]")o=A.represent(t,p);else if(ZK.call(A.represent,p))o=A.represent[p](t,p);else throw new ew("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');e.dump=o}return!0}return!1}function Xg(e,t,r,o,a,n){e.tag=null,e.dump=r,VK(e,r,!1)||VK(e,r,!0);var u=XK.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>t);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(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(A&&h&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(e.dump).length!==0?(Nqe(e,t,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(Lqe(e,t,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump));else if(u==="[object Array]"){var C=e.noArrayIndent&&t>0?t-1:t;o&&e.dump.length!==0?(Tqe(e,C,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(Rqe(e,C,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump))}else if(u==="[object String]")e.tag!=="?"&&Qqe(e,e.dump,t,n);else{if(e.skipInvalid)return!1;throw new ew("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Mqe(e,t){var r=[],o=[],a,n;for(QT(e,r,o),a=0,n=o.length;a<n;a+=1)t.duplicates.push(r[o[a]]);t.usedDuplicates=new Array(n)}function QT(e,t,r){var o,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)QT(e[a],t,r);else for(o=Object.keys(e),a=0,n=o.length;a<n;a+=1)QT(e[o[a]],t,r)}function AJ(e,t){t=t||{};var r=new Dqe(t);return r.noRefs||Mqe(e,r),Xg(r,0,e,!0,!0)?r.dump+`
|
|||
|
`:""}function Oqe(e,t){return AJ(e,$I.extend({schema:oqe},t))}FT.exports.dump=AJ;FT.exports.safeDump=Oqe});var hJ=_((bbt,bi)=>{"use strict";var ZD=GK(),pJ=fJ();function $D(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}bi.exports.Type=os();bi.exports.Schema=Kg();bi.exports.FAILSAFE_SCHEMA=WD();bi.exports.JSON_SCHEMA=BT();bi.exports.CORE_SCHEMA=vT();bi.exports.DEFAULT_SAFE_SCHEMA=yy();bi.exports.DEFAULT_FULL_SCHEMA=VI();bi.exports.load=ZD.load;bi.exports.loadAll=ZD.loadAll;bi.exports.safeLoad=ZD.safeLoad;bi.exports.safeLoadAll=ZD.safeLoadAll;bi.exports.dump=pJ.dump;bi.exports.safeDump=pJ.safeDump;bi.exports.YAMLException=dy();bi.exports.MINIMAL_SCHEMA=WD();bi.exports.SAFE_SCHEMA=yy();bi.exports.DEFAULT_SCHEMA=VI();bi.exports.scan=$D("scan");bi.exports.parse=$D("parse");bi.exports.compose=$D("compose");bi.exports.addConstructor=$D("addConstructor")});var dJ=_((Qbt,gJ)=>{"use strict";var Uqe=hJ();gJ.exports=Uqe});var yJ=_((kbt,mJ)=>{"use strict";function _qe(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function Zg(e,t,r,o){this.message=e,this.expected=t,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zg)}_qe(Zg,Error);Zg.buildMessage=function(e,t){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(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(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}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(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(e)+" but "+p(t)+" found."};function Hqe(e,t){t=t!==void 0?t:{};var r={},o={Start:Cu},a=Cu,n=function(te){return[].concat(...te)},u="-",A=Pn("-",!1),p=function(te){return te},h=function(te){return Object.assign({},...te)},C="#",w=Pn("#",!1),v=Cc(),b=function(){return{}},E=":",R=Pn(":",!1),N=function(te,we){return{[te]:we}},U=",",z=Pn(",",!1),$=function(te,we){return we},ae=function(te,we,qe){return Object.assign({},...[te].concat(we).map(Be=>({[Be]:qe})))},pe=function(te){return te},de=function(te){return te},ve=oa("correct indentation"),ce=" ",ge=Pn(" ",!1),Oe=function(te){return te.length===ua*Wa},g=function(te){return te.length===(ua+1)*Wa},Ie=function(){return ua++,!0},xe=function(){return ua--,!0},le=function(){return xA()},ne=oa("pseudostring"),ee=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Ee=Ai(["\r",`
|
|||
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Qe=/^[^\r\n\t ,\][{}:#"']/,ft=Ai(["\r",`
|
|||
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return xA().replace(/^ *| *$/g,"")},lt="--",Le=Pn("--",!1),Fe=/^[a-zA-Z\/0-9]/,Re=Ai([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ge=/^[^\r\n\t :,]/,Ne=Ai(["\r",`
|
|||
|
`," "," ",":",","],!0,!1),Xe="null",je=Pn("null",!1),x=function(){return null},I="true",S=Pn("true",!1),y=function(){return!0},F="false",V=Pn("false",!1),X=function(){return!1},Z=oa("string"),ie='"',be=Pn('"',!1),Me=function(){return""},ot=function(te){return te},gt=function(te){return te.join("")},_t=/^[^"\\\0-\x1F\x7F]/,Xt=Ai(['"',"\\",["\0",""],"\x7F"],!0,!1),St='\\"',tn=Pn('\\"',!1),Dr=function(){return'"'},Ar="\\\\",Br=Pn("\\\\",!1),Gr=function(){return"\\"},_n="\\/",Rs=Pn("\\/",!1),Ri=function(){return"/"},gs="\\b",no=Pn("\\b",!1),Pi=function(){return"\b"},Ts="\\f",io=Pn("\\f",!1),gc=function(){return"\f"},du="\\n",lp=Pn("\\n",!1),cp=function(){return`
|
|||
|
`},Ls="\\r",In=Pn("\\r",!1),so=function(){return"\r"},Ns="\\t",wl=Pn("\\t",!1),Bl=function(){return" "},oo="\\u",Hn=Pn("\\u",!1),Fn=function(te,we,qe,Be){return String.fromCharCode(parseInt(`0x${te}${we}${qe}${Be}`))},Ti=/^[0-9a-fA-F]/,Rn=Ai([["0","9"],["a","f"],["A","F"]],!1,!1),_i=oa("blank space"),De=/^[ \t]/,Li=Ai([" "," "],!1,!1),ti=oa("white space"),Ga=/^[ \t\n\r]/,Zt=Ai([" "," ",`
|
|||
|
`,"\r"],!1,!1),dc=`\r
|
|||
|
`,mu=Pn(`\r
|
|||
|
`,!1),mc=`
|
|||
|
`,vl=Pn(`
|
|||
|
`,!1),SA="\r",yu=Pn("\r",!1),Ce=0,Ft=0,yc=[{line:1,column:1}],Hi=0,Eu=[],Gt=0,Dl;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function xA(){return e.substring(Ft,Ce)}function up(){return Ho(Ft,Ce)}function Ec(te,we){throw we=we!==void 0?we:Ho(Ft,Ce),Pl([oa(te)],e.substring(Ft,Ce),we)}function bA(te,we){throw we=we!==void 0?we:Ho(Ft,Ce),ao(te,we)}function Pn(te,we){return{type:"literal",text:te,ignoreCase:we}}function Ai(te,we,qe){return{type:"class",parts:te,inverted:we,ignoreCase:qe}}function Cc(){return{type:"any"}}function QA(){return{type:"end"}}function oa(te){return{type:"other",description:te}}function qi(te){var we=yc[te],qe;if(we)return we;for(qe=te-1;!yc[qe];)qe--;for(we=yc[qe],we={line:we.line,column:we.column};qe<te;)e.charCodeAt(qe)===10?(we.line++,we.column=1):we.column++,qe++;return yc[te]=we,we}function Ho(te,we){var qe=qi(te),Be=qi(we);return{start:{offset:te,line:qe.line,column:qe.column},end:{offset:we,line:Be.line,column:Be.column}}}function et(te){Ce<Hi||(Ce>Hi&&(Hi=Ce,Eu=[]),Eu.push(te))}function ao(te,we){return new Zg(te,null,null,we)}function Pl(te,we,qe){return new Zg(Zg.buildMessage(te,we),te,we,qe)}function Cu(){var te;return te=kA(),te}function Gi(){var te,we,qe;for(te=Ce,we=[],qe=Iu();qe!==r;)we.push(qe),qe=Iu();return we!==r&&(Ft=te,we=n(we)),te=we,te}function Iu(){var te,we,qe,Be,Se;return te=Ce,we=ds(),we!==r?(e.charCodeAt(Ce)===45?(qe=u,Ce++):(qe=r,Gt===0&&et(A)),qe!==r?(Be=qn(),Be!==r?(Se=Ic(),Se!==r?(Ft=te,we=p(Se),te=we):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r),te}function kA(){var te,we,qe;for(te=Ce,we=[],qe=ja();qe!==r;)we.push(qe),qe=ja();return we!==r&&(Ft=te,we=h(we)),te=we,te}function ja(){var te,we,qe,Be,Se,ze,Bt,er,Xr;if(te=Ce,we=qn(),we===r&&(we=null),we!==r){if(qe=Ce,e.charCodeAt(Ce)===35?(Be=C,Ce++):(Be=r,Gt===0&&et(w)),Be!==r){if(Se=[],ze=Ce,Bt=Ce,Gt++,er=yi(),Gt--,er===r?Bt=void 0:(Ce=Bt,Bt=r),Bt!==r?(e.length>Ce?(er=e.charAt(Ce),Ce++):(er=r,Gt===0&&et(v)),er!==r?(Bt=[Bt,er],ze=Bt):(Ce=ze,ze=r)):(Ce=ze,ze=r),ze!==r)for(;ze!==r;)Se.push(ze),ze=Ce,Bt=Ce,Gt++,er=yi(),Gt--,er===r?Bt=void 0:(Ce=Bt,Bt=r),Bt!==r?(e.length>Ce?(er=e.charAt(Ce),Ce++):(er=r,Gt===0&&et(v)),er!==r?(Bt=[Bt,er],ze=Bt):(Ce=ze,ze=r)):(Ce=ze,ze=r);else Se=r;Se!==r?(Be=[Be,Se],qe=Be):(Ce=qe,qe=r)}else Ce=qe,qe=r;if(qe===r&&(qe=null),qe!==r){if(Be=[],Se=es(),Se!==r)for(;Se!==r;)Be.push(Se),Se=es();else Be=r;Be!==r?(Ft=te,we=b(),te=we):(Ce=te,te=r)}else Ce=te,te=r}else Ce=te,te=r;if(te===r&&(te=Ce,we=ds(),we!==r?(qe=aa(),qe!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(e.charCodeAt(Ce)===58?(Se=E,Ce++):(Se=r,Gt===0&&et(R)),Se!==r?(ze=qn(),ze===r&&(ze=null),ze!==r?(Bt=Ic(),Bt!==r?(Ft=te,we=N(qe,Bt),te=we):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r),te===r&&(te=Ce,we=ds(),we!==r?(qe=lo(),qe!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(e.charCodeAt(Ce)===58?(Se=E,Ce++):(Se=r,Gt===0&&et(R)),Se!==r?(ze=qn(),ze===r&&(ze=null),ze!==r?(Bt=Ic(),Bt!==r?(Ft=te,we=N(qe,Bt),te=we):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r)):(Ce=te,te=r),te===r))){if(te=Ce,we=ds(),we!==r)if(qe=lo(),qe!==r)if(Be=qn(),Be!==r)if(Se=la(),Se!==r){if(ze=[],Bt=es(),Bt!==r)for(;Bt!==r;)ze.push(Bt),Bt=es();else ze=r;ze!==r?(Ft=te,we=N(qe,Se),te=we):(Ce=te,te=r)}else Ce=te,te=r;else Ce=te,te=r;else Ce=te,te=r;else Ce=te,te=r;if(te===r)if(te=Ce,we=ds(),we!==r)if(qe=lo(),qe!==r){if(Be=[],Se=Ce,ze=qn(),ze===r&&(ze=null),ze!==r?(e.charCodeAt(Ce)===44?(Bt=U,Ce++):(Bt=r,Gt===0&&et(z)),Bt!==r?(er=qn(),er===r&&(er=null),er!==r?(Xr=lo(),Xr!==r?(Ft=Se,ze=$(qe,Xr),Se=ze):(Ce=Se,Se=r)):(Ce=Se,Se=r)):(Ce=Se,Se=r)):(Ce=Se,Se=r),Se!==r)for(;Se!==r;)Be.push(Se),Se=Ce,ze=qn(),ze===r&&(ze=null),ze!==r?(e.charCodeAt(Ce)===44?(Bt=U,Ce++):(Bt=r,Gt===0&&et(z)),Bt!==r?(er=qn(),er===r&&(er=null),er!==r?(Xr=lo(),Xr!==r?(Ft=Se,ze=$(qe,Xr),Se=ze):(Ce=Se,Se=r)):(Ce=Se,Se=r)):(Ce=Se,Se=r)):(Ce=Se,Se=r);else Be=r;Be!==r?(Se=qn(),Se===r&&(Se=null),Se!==r?(e.charCodeAt(Ce)===58?(ze=E,Ce++):(ze=r,Gt===0&&et(R)),ze!==r?(Bt=qn(),Bt===r&
|
|||
|
`;if(typeof e=="number"||typeof e=="boolean")return`${e.toString()}
|
|||
|
`;if(typeof e=="string")return`${CJ(e)}
|
|||
|
`;if(Array.isArray(e)){if(e.length===0)return`[]
|
|||
|
`;let o=" ".repeat(t);return`
|
|||
|
${e.map(n=>`${o}- ${RT(n,t+1,!1)}`).join("")}`}if(typeof e=="object"&&e){let[o,a]=e instanceof eP?[e.data,!1]:[e,!0],n=" ".repeat(t),u=Object.keys(o);a&&u.sort((p,h)=>{let C=EJ.indexOf(p),w=EJ.indexOf(h);return C===-1&&w===-1?p<h?-1:p>h?1:0:C!==-1&&w===-1?-1:C===-1&&w!==-1?1:C-w});let A=u.filter(p=>!wJ(o[p])).map((p,h)=>{let C=o[p],w=CJ(p),v=RT(C,t+1,!0),b=h>0||r?n:"",E=w.length>1024?`? ${w}
|
|||
|
${b}:`:`${w}:`,R=v.startsWith(`
|
|||
|
`)?v:` ${v}`;return`${b}${E}${R}`}).join(t===0?`
|
|||
|
`:"")||`
|
|||
|
`;return r?`
|
|||
|
${A}`:`${A}`}throw new Error(`Unsupported value type (${e})`)}function Pa(e){try{let t=RT(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 Gqe(e){return e.endsWith(`
|
|||
|
`)||(e+=`
|
|||
|
`),(0,IJ.parse)(e)}function Wqe(e){if(jqe.test(e))return Gqe(e);let t=(0,tP.safeLoad)(e,{schema:tP.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 Ki(e){return Wqe(e)}var tP,IJ,qqe,EJ,eP,jqe,BJ=yt(()=>{tP=tt(dJ()),IJ=tt(yJ()),qqe=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,EJ=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],eP=class{constructor(t){this.data=t}};Pa.PreserveOrdering=eP;jqe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var tw={};Yt(tw,{parseResolution:()=>qD,parseShell:()=>UD,parseSyml:()=>Ki,stringifyArgument:()=>ET,stringifyArgumentSegment:()=>CT,stringifyArithmeticExpression:()=>HD,stringifyCommand:()=>yT,stringifyCommandChain:()=>gy,stringifyCommandChainThen:()=>mT,stringifyCommandLine:()=>_D,stringifyCommandLineThen:()=>dT,stringifyEnvSegment:()=>OD,stringifyRedirectArgument:()=>JI,stringifyResolution:()=>GD,stringifyShell:()=>hy,stringifyShellLine:()=>hy,stringifySyml:()=>Pa,stringifyValueArgument:()=>Gg});var ql=yt(()=>{wY();PY();BJ()});var DJ=_((Nbt,TT)=>{"use strict";var Yqe=e=>{let t=!1,r=!1,o=!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,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(e=e.slice(0,a-1)+"-"+e.slice(a-1),o=r,r=!1,t=!0):(t=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return e},vJ=(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=Yqe(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(e))};TT.exports=vJ;TT.exports.default=vJ});var PJ=_((Mbt,Kqe)=>{Kqe.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:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{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:"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:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{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",e
|
|||
|
|
|||
|
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
|
|||
|
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
|
|||
|
|
|||
|
$ ${o}
|
|||
|
${_T(t)}`}else this.message=`Command not found; did you mean one of:
|
|||
|
|
|||
|
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${_T(t)}`}},nP=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((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${_T(t)}`}},_T=e=>`While running ${e.filter(t=>t!==Ks).map(t=>{let r=JSON.stringify(t);return t.match(/\s/)||t.length===0||r!==`"${t}"`?r:t}).join(" ")}`});function Jqe(e){let t=e.split(`
|
|||
|
`),r=t.filter(a=>a.match(/\S/)),o=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(o).trimRight()).join(`
|
|||
|
`)}function Do(e,{format:t,paragraphs:r}){return e=e.replace(/\r\n?/g,`
|
|||
|
`),e=Jqe(e),e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
|||
|
|
|||
|
`),e=e.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(e=e.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
|
|||
|
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
|
|||
|
`)}).join(`
|
|||
|
|
|||
|
`)),e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>t.code(a+n+a)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>t.bold(a+n+a)),e?`${e}
|
|||
|
`:""}var HT,QJ,kJ,qT=yt(()=>{HT=Array(80).fill("\u2501");for(let e=0;e<=24;++e)HT[HT.length-e]=`\x1B[38;5;${232+e}m\u2501`;QJ={header:e=>`\x1B[1m\u2501\u2501\u2501 ${e}${e.length<80-5?` ${HT.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`},kJ={header:e=>e,bold:e=>e,error:e=>e,code:e=>e}});function Ko(e){return{...e,[rw]:!0}}function Ju(e,t){return typeof e>"u"?[e,t]:typeof e=="object"&&e!==null&&!Array.isArray(e)?[void 0,e]:[e,t]}function sP(e,{mergeName:t=!1}={}){let r=e.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return t&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!t?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function nw(e,t){return t.length===1?new at(`${e}${sP(t[0],{mergeName:!0})}`):new at(`${e}:
|
|||
|
${t.map(r=>`
|
|||
|
- ${sP(r)}`).join("")}`)}function ed(e,t,r){if(typeof r>"u")return t;let o=[],a=[],n=A=>{let p=t;return t=A,n.bind(null,p)};if(!r(t,{errors:o,coercions:a,coercion:n}))throw nw(`Invalid value for ${e}`,o);for(let[,A]of a)A();return t}var rw,Ef=yt(()=>{iP();rw=Symbol("clipanion/isOption")});var Jo={};Yt(Jo,{KeyRelationship:()=>Kp,TypeAssertionError:()=>Yp,applyCascade:()=>td,as:()=>f9e,assert:()=>c9e,assertWithErrors:()=>u9e,cascade:()=>MJ,fn:()=>p9e,hasAtLeastOneKey:()=>F9e,hasExactLength:()=>NJ,hasForbiddenKeys:()=>R9e,hasKeyRelationship:()=>zT,hasMaxLength:()=>g9e,hasMinLength:()=>h9e,hasMutuallyExclusiveKeys:()=>T9e,hasRequiredKeys:()=>k9e,hasUniqueItems:()=>d9e,isArray:()=>oP,isAtLeast:()=>KT,isAtMost:()=>E9e,isBase64:()=>S9e,isBoolean:()=>r9e,isDate:()=>n9e,isDict:()=>o9e,isEnum:()=>Js,isHexColor:()=>P9e,isISO8601:()=>D9e,isInExclusiveRange:()=>I9e,isInInclusiveRange:()=>C9e,isInstanceOf:()=>l9e,isInteger:()=>JT,isJSON:()=>x9e,isLiteral:()=>RJ,isLowerCase:()=>w9e,isMap:()=>s9e,isNegative:()=>m9e,isNullable:()=>Q9e,isNumber:()=>WT,isObject:()=>TJ,isOneOf:()=>YT,isOptional:()=>b9e,isPartial:()=>a9e,isPositive:()=>y9e,isRecord:()=>lP,isSet:()=>i9e,isString:()=>Dy,isTuple:()=>aP,isUUID4:()=>v9e,isUnknown:()=>jT,isUpperCase:()=>B9e,makeTrait:()=>LJ,makeValidator:()=>Mr,matchesRegExp:()=>sw,softAssert:()=>A9e});function Vn(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 vy(e,t){if(e.length===0)return"nothing";if(e.length===1)return Vn(e[0]);let r=e.slice(0,-1),o=e[e.length-1],a=e.length>2?`, ${t} `:` ${t} `;return`${r.map(n=>Vn(n)).join(", ")}${a}${Vn(o)}`}function Wp(e,t){var r,o,a;return typeof t=="number"?`${(r=e?.p)!==null&&r!==void 0?r:"."}[${t}]`:zqe.test(t)?`${(o=e?.p)!==null&&o!==void 0?o:""}.${t}`:`${(a=e?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(t)}]`}function GT(e,t,r){return e===1?t:r}function gr({errors:e,p:t}={},r){return e?.push(`${t??"."}: ${r}`),!1}function e9e(e,t){return r=>{e[t]=r}}function Cf(e,t){return r=>{let o=e[t];return e[t]=r,Cf(e,t).bind(null,o)}}function iw(e,t,r){let o=()=>(e(r()),a),a=()=>(e(t),o);return o}function jT(){return Mr({test:(e,t)=>!0})}function RJ(e){return Mr({test:(t,r)=>t!==e?gr(r,`Expected ${Vn(e)} (got ${Vn(t)})`):!0})}function Dy(){return Mr({test:(e,t)=>typeof e!="string"?gr(t,`Expected a string (got ${Vn(e)})`):!0})}function Js(e){let t=Array.isArray(e)?e:Object.values(e),r=t.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(t);return o.size===1?RJ([...o][0]):Mr({test:(a,n)=>o.has(a)?!0:r?gr(n,`Expected one of ${vy(t,"or")} (got ${Vn(a)})`):gr(n,`Expected a valid enumeration value (got ${Vn(a)})`)})}function r9e(){return Mr({test:(e,t)=>{var r;if(typeof e!="boolean"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return gr(t,"Unbound coercion result");let o=t9e.get(e);if(typeof o<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,o)]),!0}return gr(t,`Expected a boolean (got ${Vn(e)})`)}return!0}})}function WT(){return Mr({test:(e,t)=>{var r;if(typeof e!="number"){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return gr(t,"Unbound coercion result");let o;if(typeof e=="string"){let a;try{a=JSON.parse(e)}catch{}if(typeof a=="number")if(JSON.stringify(a)===e)o=a;else return gr(t,`Received a number that can't be safely represented by the runtime (${e})`)}if(typeof o<"u")return t.coercions.push([(r=t.p)!==null&&r!==void 0?r:".",t.coercion.bind(null,o)]),!0}return gr(t,`Expected a number (got ${Vn(e)})`)}return!0}})}function n9e(){return Mr({test:(e,t)=>{var r;if(!(e instanceof Date)){if(typeof t?.coercions<"u"){if(typeof t?.coercion>"u")return gr(t,"Unbound coercion result");let o;if(typeof e=="string"&&FJ.test(e))o=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))o=new Date(a*1e3);else return gr(t,`Received a timestamp that can't be safely re
|
|||
|
`;for(let o of t)r+=`
|
|||
|
- ${o}`}super(r)}};cP={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"})(Kp||(Kp={}));L9e={[Kp.Forbids]:{expect:!1,message:"forbids using"},[Kp.Requires]:{expect:!0,message:"requires using"}}});var st,rd=yt(()=>{Ef();st=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:u}=await Promise.resolve().then(()=>(sl(),Jo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw nw("Invalid option schema",p);for(let[,w]of h)w()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};st.isOption=rw;st.Default=[]});function Sa(e){OT&&console.log(e)}function UJ(){return{nodes:[zo(),zo(),zo()]}}function N9e(e){let t=UJ(),r=[],o=t.nodes.length;for(let a of e){r.push(o);for(let n=0;n<a.nodes.length;++n)qJ(n)||t.nodes.push(W9e(a.nodes[n],o));o+=a.nodes.length-2}for(let a of r)Py(t,0,a);return t}function qc(e,t){return e.nodes.push(t),e.nodes.length-1}function M9e(e){let t=new Set,r=o=>{if(t.has(o))return;t.add(o);let a=e.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=e.nodes[u];for(let[p,h]of Object.entries(A.statics)){let C=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let w of h)C.some(({to:v})=>w.to===v)||C.push(w)}for(let[p,h]of A.dynamics)a.dynamics.some(([C,{to:w}])=>p===C&&h.to===w)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(0)}function O9e(e,{prefix:t=""}={}){if(OT){Sa(`${t}Nodes are:`);for(let r=0;r<e.nodes.length;++r)Sa(`${t} ${r}: ${JSON.stringify(e.nodes[r])}`)}}function _J(e,t,r=!1){Sa(`Running a vm on ${JSON.stringify(t)}`);let o=[{node:0,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];O9e(e,{prefix:" "});let a=[LT,...t];for(let n=0;n<a.length;++n){let u=a[n];Sa(` Processing ${JSON.stringify(u)}`);let A=[];for(let{node:p,state:h}of o){Sa(` Current node is ${p}`);let C=e.nodes[p];if(p===2){A.push({node:p,state:h});continue}console.assert(C.shortcuts.length===0,"Shortcuts should have been eliminated by now");let w=Object.prototype.hasOwnProperty.call(C.statics,u);if(!r||n<a.length-1||w)if(w){let v=C.statics[u];for(let{to:b,reducer:E}of v)A.push({node:b,state:typeof E<"u"?uP(XT,E,h,u):h}),Sa(` Static transition to ${b} found`)}else Sa(" No static transition found");else{let v=!1;for(let b of Object.keys(C.statics))if(!!b.startsWith(u)){if(u===b)for(let{to:E,reducer:R}of C.statics[b])A.push({node:E,state:typeof R<"u"?uP(XT,R,h,u):h}),Sa(` Static transition to ${E} found`);else for(let{to:E}of C.statics[b])A.push({node:E,state:{...h,remainder:b.slice(u.length)}}),Sa(` Static transition to ${E} found (partial match)`);v=!0}v||Sa(" No partial static transition found")}if(u!==Ks)for(let[v,{to:b,reducer:E}]of C.dynamics)uP(fP,v,h,u)&&(A.push({node:b,state:typeof E<"u"?uP(XT,E,h,u):h}),Sa(` Dynamic transition to ${b} found (via ${v})`))}if(A.length===0&&u===Ks&&t.length===1)return[{node:0,state:OJ}];if(A.length===0)throw new By(t,o.filter(({node:p})=>p!==2).map(({state:p})=>({usage:p.candidateUsage,reason:null})));if(A.every(({node:p})=>p===2))throw new By(t,A.map(({state:p})=>({usage:p.candidateUsage,reason:p.errorMessage})));o=q9e(A)}if(o.length>0){Sa(" Results:");for(let n of o)Sa(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else Sa(" No results");return o}function U9e(e,t){if(t.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,Ks)){for(let{to:r}of e.statics[Ks])if(r===1)return!0}return!1}function _9e(e,t,r){let o=r&&t.length
|
|||
|
`),this.context.stdout.write(`
|
|||
|
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].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 VJ(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=ZJ(e);return Po.from(r,t).runExit(o,a)}async function XJ(...e){let{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=ZJ(e);return Po.from(r,t).run(o,a)}function ZJ(e){let t,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),e.length){case 1:r=e[0];break;case 2:e[0]&&e[0].prototype instanceof st||Array.isArray(e[0])?(r=e[0],Array.isArray(e[1])?o=e[1]:a=e[1]):(t=e[0],r=e[1]);break;case 3:Array.isArray(e[2])?(t=e[0],r=e[1],o=e[2]):e[0]&&e[0].prototype instanceof st||Array.isArray(e[0])?(r=e[0],o=e[1],a=e[2]):(t=e[0],r=e[1],a=e[2]);break;default:t=e[0],r=e[1],o=e[2],a=e[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:t,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function zJ(e){return e()}var JJ,Po,$J=yt(()=>{pP();qT();YJ();rd();KJ();JJ=Symbol("clipanion/errorCommand");Po=class{constructor({binaryLabel:t,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new xy({binaryName:r}),this.binaryLabel=t,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(t,r={}){let o=new Po(r),a=Array.isArray(t)?t:[t];for(let n of a)o.register(n);return o}register(t){var r;let o=new Map,a=new t;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[st.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=t.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(t,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:t})}process(t,r){let{contexts:o,process:a}=this.builder.compile(),n=a(t),u={...Po.defaultContext,...r};switch(n.selectedIndex){case-1:{let A=by.from(n,o);return A.context=u,A}default:{let{commandClass:A}=o[n.selectedIndex],p=this.registrations.get(A);if(typeof p>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let h=new A;h.context=u,h.path=n.path;try{for(let[C,{transformer:w}]of p.specs.entries())h[C]=w(p.builder,C,n,u);return h}catch(C){throw C[JJ]=h,C}}break}}async run(t,r){var o,a;let n,u={...Po.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(t))n=t;else try{n=this.process(t,u)}catch(C){return u.stdout.write(this.error(C,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(C,w)=>this.error(C,w),format:C=>this.format(C),process:(C,w)=>this.process(C,{...u,...w}),run:(C,w)=>this.run(C,{...u,...w}),usage:(C,w)=>this.usage(C,w)};let p=this.enableCapture&&(a=WJ(u))!==null&&a!==void 0?a:zJ,h;try{h=await p(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return u.stdout.write(this.error(C,{colored:A,command:n})),1}return h}async runExit(t,r){process.exitCode=await this.run(t,r)}suggest(t,r){let{suggest:o}=this.builder.compile();return o(t,r)}definitions({colored:t=!1}={}){let r=[];for(let[o,{index:a}]of this.registrations){if(typeof o.usage>"u")continue;let{usage:n}=this.getUsageByIndex(a,{detailed:!1}),{usage:u,options:A}=this.getUsageByIndex(a,{detailed:!0,inlineOptions:!1}),p=typeof o.usage.category<"u"?Do(o.usage.category,{format:this.format(t),paragraphs:!1}):void 0,h=typeof o.usage.description<"u"?Do(o.usage.description,{format:this.format(t),paragraphs:!1}):void 0,C=typeof o.usage.details<"u"?Do(o.usage.details,{format:this.format(t),paragraphs:!0}):void 0,w=typeof o.usage.examples<"u"?o.usage.examples.map(([v,b])=>[Do(v,{format:this.format(t),paragraphs:!1}),b.replace(/\$0/g,this.binaryName)]):void 0;r.push({path:n,usage:u,category:p,description:h,details:C,examples:w,opti
|
|||
|
`),(h!==""||C.length>0)&&(A+=`${this.format(r).header("Usage")}
|
|||
|
`,A+=`
|
|||
|
`);let{usage:w,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${w}
|
|||
|
`,v.length>0){A+=`
|
|||
|
`,A+=`${this.format(r).header("Options")}
|
|||
|
`;let b=v.reduce((E,R)=>Math.max(E,R.definition.length),0);A+=`
|
|||
|
`;for(let{definition:E,description:R}of v)A+=` ${this.format(r).bold(E.padEnd(b))} ${Do(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
|
|||
|
`,A+=`${this.format(r).header("Details")}
|
|||
|
`,A+=`
|
|||
|
`,A+=Do(h,{format:this.format(r),paragraphs:!0})),C.length>0){A+=`
|
|||
|
`,A+=`${this.format(r).header("Examples")}
|
|||
|
`;for(let[b,E]of C)A+=`
|
|||
|
`,A+=Do(b,{format:this.format(r),paragraphs:!1}),A+=`${E.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
|
|||
|
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
|
|||
|
`}else{let p=new Map;for(let[v,{index:b}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let E=typeof v.usage.category<"u"?Do(v.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(E);typeof R>"u"&&p.set(E,R=[]);let{usage:N}=this.getUsageByIndex(b);R.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,b)=>v===null?-1:b===null?1:v.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";C||w?(C&&w?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
|||
|
|
|||
|
`:C?A+=`${this.format(r).header(`${this.binaryLabel}`)}
|
|||
|
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
|
|||
|
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
|
|||
|
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
|
|||
|
`;for(let v of h){let b=p.get(v).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),E=v!==null?v.trim():"General commands";A+=`
|
|||
|
`,A+=`${this.format(r).header(`${E}`)}
|
|||
|
`;for(let{commandClass:R,usage:N}of b){let U=R.usage.description||"undocumented";A+=`
|
|||
|
`,A+=` ${this.format(r).bold(N)}
|
|||
|
`,A+=` ${Do(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
|
|||
|
`,A+=Do("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 A}error(t,r){var o,{colored:a,command:n=(o=t[JJ])!==null&&o!==void 0?o: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 u="",A=t.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${t.message}
|
|||
|
`;let p=t.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
|
|||
|
`,u+=this.usage(n)):t.stack&&(u+=`${t.stack.replace(/^.*\n/,"")}
|
|||
|
`),u}format(t){var r;return((r=t??this.enableColors)!==null&&r!==void 0?r:Po.defaultContext.colorDepth>1)?QJ:kJ}getUsageByRegistration(t,r){let o=this.registrations.get(t);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(t,r){return this.builder.getBuilderByIndex(t).usage(r)}};Po.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:jJ()}});var aw,ez=yt(()=>{rd();aw=class extends st{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
|||
|
`)}};aw.paths=[["--clipanion=definitions"]]});var lw,tz=yt(()=>{rd();lw=class extends st{async execute(){this.context.stdout.write(this.cli.usage())}};lw.paths=[["-h"],["--help"]]});var cw,rz=yt(()=>{rd();cw=class extends st{async execute(){var t;this.context.stdout.write(`${(t=this.cli.binaryVersion)!==null&&t!==void 0?t:"<unknown>"}
|
|||
|
`)}};cw.paths=[["-v"],["--version"]]});var $T={};Yt($T,{DefinitionsCommand:()=>aw,HelpCommand:()=>lw,VersionCommand:()=>cw});var nz=yt(()=>{ez();tz();rz()});function iz(e,t,r){let[o,a]=Ju(t,r??{}),{arity:n=1}=a,u=e.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,C){let w,v=typeof o<"u"?[...o]:void 0;for(let{name:b,value:E}of C.options)!A.has(b)||(w=b,v=v??[],v.push(E));return typeof v<"u"?ed(w??h,v,a.validator):v}})}var sz=yt(()=>{Ef()});function oz(e,t,r){let[o,a]=Ju(t,r??{}),n=e.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C=v);return C}})}var az=yt(()=>{Ef()});function lz(e,t,r){let[o,a]=Ju(t,r??{}),n=e.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C??(C=0),v?C+=1:C=0);return C}})}var cz=yt(()=>{Ef()});function uz(e={}){return Ko({definition(t,r){var o;t.addProxy({name:(o=e.name)!==null&&o!==void 0?o:r,required:e.required})},transformer(t,r,o){return o.positionals.map(({value:a})=>a)}})}var Az=yt(()=>{Ef()});function fz(e={}){return Ko({definition(t,r){var o;t.addRest({name:(o=e.name)!==null&&o!==void 0?o:r,required:e.required})},transformer(t,r,o){let a=u=>{let A=o.positionals[u];return A.extra===ol||A.extra===!1&&u<t.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var pz=yt(()=>{pP();Ef()});function K9e(e,t,r){let[o,a]=Ju(t,r??{}),{arity:n=1}=a,u=e.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,C,w){let v,b=o;typeof a.env<"u"&&w.env[a.env]&&(v=a.env,b=w.env[a.env]);for(let{name:E,value:R}of C.options)!A.has(E)||(v=E,b=R);return typeof b=="string"?ed(v??h,b,a.validator):b}})}function J9e(e={}){let{required:t=!0}=e;return Ko({definition(r,o){var a;r.addPositional({name:(a=e.name)!==null&&a!==void 0?a:o,required:e.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===ol||t&&a.positionals[u].extra===!0||!t&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return ed((n=e.name)!==null&&n!==void 0?n:o,A.value,e.validator)}}})}function hz(e,...t){return typeof e=="string"?K9e(e,...t):J9e(e)}var gz=yt(()=>{pP();Ef()});var he={};Yt(he,{Array:()=>iz,Boolean:()=>oz,Counter:()=>lz,Proxy:()=>uz,Rest:()=>fz,String:()=>hz,applyValidator:()=>ed,cleanValidationError:()=>sP,formatError:()=>nw,isOptionSymbol:()=>rw,makeCommandOption:()=>Ko,rerouteArguments:()=>Ju});var dz=yt(()=>{Ef();sz();az();cz();Az();pz();gz()});var uw={};Yt(uw,{Builtins:()=>$T,Cli:()=>Po,Command:()=>st,Option:()=>he,UsageError:()=>at,formatMarkdownish:()=>Do,run:()=>XJ,runExit:()=>VJ});var Ht=yt(()=>{iP();qT();rd();$J();nz();dz()});var mz=_((UQt,z9e)=>{z9e.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:["dote
|
|||
|
`);let o;for(;(o=$9e.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
|
|||
|
`),n=n.replace(/\\r/g,"\r")),t[a]=n}return t}function tGe(e){let t=Cz(e),r=Ps.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let o=Ez(e).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=iGe(r,A);n=Ps.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return Ps.parse(n)}function rGe(e){console.log(`[dotenv@${rL}][INFO] ${e}`)}function nGe(e){console.log(`[dotenv@${rL}][WARN] ${e}`)}function eL(e){console.log(`[dotenv@${rL}][DEBUG] ${e}`)}function Ez(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 iGe(e,t){let r;try{r=new URL(t)}catch(A){throw A.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"):A}let o=r.password;if(!o)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()}`,u=e.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function Cz(e){let t=tL.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function sGe(e){return e[0]==="~"?tL.join(V9e.homedir(),e.slice(1)):e}function oGe(e){rGe("Loading env from encrypted .env.vault");let t=Ps._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Ps.populate(r,t,e),{parsed:t}}function aGe(e){let t=tL.resolve(process.cwd(),".env"),r="utf8",o=Boolean(e&&e.debug);e&&(e.path!=null&&(t=sGe(e.path)),e.encoding!=null&&(r=e.encoding));try{let a=Ps.parse(yz.readFileSync(t,{encoding:r})),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),Ps.populate(n,a,e),{parsed:a}}catch(a){return o&&eL(`Failed to load ${t} ${a.message}`),{error:a}}}function lGe(e){let t=Cz(e);return Ez(e).length===0?Ps.configDotenv(e):yz.existsSync(t)?Ps._configVault(e):(nGe(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Ps.configDotenv(e))}function cGe(e,t){let r=Buffer.from(t.slice(-64),"hex"),o=Buffer.from(e,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=X9e.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let C="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(C)}else if(h){let C="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(C)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function uGe(e,t,r={}){let o=Boolean(r&&r.debug),a=Boolean(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]),o&&eL(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}var Ps={configDotenv:aGe,_configVault:oGe,_parseVault:tGe,config:lGe,decrypt:cGe,parse:eGe,populate:uGe};wf.exports.configDotenv=Ps.configDotenv;wf.exports._configVault=Ps._configVault;wf.exports._parseVault=Ps._parseVault;wf.exports.config=Ps.config;wf.exports.decrypt=Ps.decrypt;wf.exports.parse=Ps.parse;wf.exports.populate=Ps.populate;wf.exports=Ps});var Bz=_((HQt,wz)=>{"use strict";wz.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var nd=_((qQt,nL)=>{"use strict";var AGe=Bz(),vz=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,o=()=>{r--,t.length>0&&t.shift()()},a=(A,p,...h)=>{r++;let C=AGe(A,...h);p(C),C.then(o,o)},n=(A,p,...h)=>{r<e?a(A,p,...h):t.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>
|
|||
|
`,"\r","(",")","!","|","&","^"],!0,!1),de=function(Z){return t.queryPattern.test(Z)},ve=function(Z){return t.checkFn(Z)},ce=Ne("whitespace"),ge=/^[ \t\n\r]/,Oe=Fe([" "," ",`
|
|||
|
`,"\r"],!1,!1),g=0,Ie=0,xe=[{line:1,column:1}],le=0,ne=[],ee=0,Ee;if("startRule"in t){if(!(t.startRule in o))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=o[t.startRule]}function Qe(){return e.substring(Ie,g)}function ft(){return je(Ie,g)}function H(Z,ie){throw ie=ie!==void 0?ie:je(Ie,g),S([Ne(Z)],e.substring(Ie,g),ie)}function lt(Z,ie){throw ie=ie!==void 0?ie:je(Ie,g),I(Z,ie)}function Le(Z,ie){return{type:"literal",text:Z,ignoreCase:ie}}function Fe(Z,ie,be){return{type:"class",parts:Z,inverted:ie,ignoreCase:be}}function Re(){return{type:"any"}}function Ge(){return{type:"end"}}function Ne(Z){return{type:"other",description:Z}}function Xe(Z){var ie=xe[Z],be;if(ie)return ie;for(be=Z-1;!xe[be];)be--;for(ie=xe[be],ie={line:ie.line,column:ie.column};be<Z;)e.charCodeAt(be)===10?(ie.line++,ie.column=1):ie.column++,be++;return xe[Z]=ie,ie}function je(Z,ie){var be=Xe(Z),Me=Xe(ie);return{start:{offset:Z,line:be.line,column:be.column},end:{offset:ie,line:Me.line,column:Me.column}}}function x(Z){g<le||(g>le&&(le=g,ne=[]),ne.push(Z))}function I(Z,ie){return new ud(Z,null,null,ie)}function S(Z,ie,be){return new ud(ud.buildMessage(Z,ie),Z,ie,be)}function y(){var Z,ie,be,Me,ot,gt,_t,Xt;if(Z=g,ie=F(),ie!==r){for(be=[],Me=g,ot=X(),ot!==r?(e.charCodeAt(g)===124?(gt=n,g++):(gt=r,ee===0&&x(u)),gt===r&&(e.charCodeAt(g)===38?(gt=A,g++):(gt=r,ee===0&&x(p)),gt===r&&(e.charCodeAt(g)===94?(gt=h,g++):(gt=r,ee===0&&x(C)))),gt!==r?(_t=X(),_t!==r?(Xt=F(),Xt!==r?(ot=[ot,gt,_t,Xt],Me=ot):(g=Me,Me=r)):(g=Me,Me=r)):(g=Me,Me=r)):(g=Me,Me=r);Me!==r;)be.push(Me),Me=g,ot=X(),ot!==r?(e.charCodeAt(g)===124?(gt=n,g++):(gt=r,ee===0&&x(u)),gt===r&&(e.charCodeAt(g)===38?(gt=A,g++):(gt=r,ee===0&&x(p)),gt===r&&(e.charCodeAt(g)===94?(gt=h,g++):(gt=r,ee===0&&x(C)))),gt!==r?(_t=X(),_t!==r?(Xt=F(),Xt!==r?(ot=[ot,gt,_t,Xt],Me=ot):(g=Me,Me=r)):(g=Me,Me=r)):(g=Me,Me=r)):(g=Me,Me=r);be!==r?(Ie=Z,ie=w(ie,be),Z=ie):(g=Z,Z=r)}else g=Z,Z=r;return Z}function F(){var Z,ie,be,Me,ot,gt;return Z=g,e.charCodeAt(g)===33?(ie=v,g++):(ie=r,ee===0&&x(b)),ie!==r?(be=F(),be!==r?(Ie=Z,ie=E(be),Z=ie):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=g,e.charCodeAt(g)===40?(ie=R,g++):(ie=r,ee===0&&x(N)),ie!==r?(be=X(),be!==r?(Me=y(),Me!==r?(ot=X(),ot!==r?(e.charCodeAt(g)===41?(gt=U,g++):(gt=r,ee===0&&x(z)),gt!==r?(Ie=Z,ie=$(Me),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=V())),Z}function V(){var Z,ie,be,Me,ot;if(Z=g,ie=X(),ie!==r){if(be=g,Me=[],ae.test(e.charAt(g))?(ot=e.charAt(g),g++):(ot=r,ee===0&&x(pe)),ot!==r)for(;ot!==r;)Me.push(ot),ae.test(e.charAt(g))?(ot=e.charAt(g),g++):(ot=r,ee===0&&x(pe));else Me=r;Me!==r?be=e.substring(be,g):be=Me,be!==r?(Ie=g,Me=de(be),Me?Me=void 0:Me=r,Me!==r?(Ie=Z,ie=ve(be),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)}else g=Z,Z=r;return Z}function X(){var Z,ie;for(ee++,Z=[],ge.test(e.charAt(g))?(ie=e.charAt(g),g++):(ie=r,ee===0&&x(Oe));ie!==r;)Z.push(ie),ge.test(e.charAt(g))?(ie=e.charAt(g),g++):(ie=r,ee===0&&x(Oe));return ee--,Z===r&&(ie=r,ee===0&&x(ce)),Z}if(Ee=a(),Ee!==r&&g===e.length)return Ee;throw Ee!==r&&g<e.length&&x(Ge()),S(ne,le<e.length?e.charAt(le):null,le<e.length?je(le,le+1):je(le,le))}EX.exports={SyntaxError:ud,parse:E5e}});var IX=_(kP=>{var{parse:C5e}=CX();kP.makeParser=(e=/[a-z]+/)=>(t,r)=>C5e(t,{queryPattern:e,checkFn:r});kP.parse=kP.makeParser()});var BX=_((Okt,wX)=>{"use strict";wX.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]
|
|||
|
`:`
|
|||
|
`)+r,a=o+1,o=e.indexOf(`
|
|||
|
`,a)}while(o!==-1);return n+=e.substr(a),n};UX.exports={stringReplaceAll:R5e,stringEncaseCRLFWithFirstIndex:T5e}});var WX=_((Ykt,jX)=>{"use strict";var L5e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,HX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,N5e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,M5e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,O5e=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function GX(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)):O5e.get(e)||e}function U5e(e,t){let r=[],o=t.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(N5e))r.push(a[2].replace(M5e,(A,p,h)=>p?GX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function _5e(e){HX.lastIndex=0;let t=[],r;for(;(r=HX.exec(e))!==null;){let o=r[1];if(r[2]){let a=U5e(o,r[2]);t.push([o].concat(a))}else t.push([o])}return t}function qX(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 o=e;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}jX.exports=(e,t)=>{let r=[],o=[],a=[];if(t.replace(L5e,(n,u,A,p,h,C)=>{if(u)a.push(GX(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:qX(e,r)(w)),r.push({inverse:A,styles:_5e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(qX(e,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.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 o.join("")}});var bL=_((Kkt,zX)=>{"use strict";var Bw=ww(),{stdout:DL,stderr:PL}=BL(),{stringReplaceAll:H5e,stringEncaseCRLFWithFirstIndex:q5e}=_X(),YX=["ansi","ansi","ansi256","ansi16m"],My=Object.create(null),G5e=(e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=DL?DL.level:0;e.level=t.level===void 0?r:t.level},SL=class{constructor(t){return KX(t)}},KX=e=>{let t={};return G5e(t,e),t.template=(...r)=>Y5e(t.template,...r),Object.setPrototypeOf(t,TP.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=SL,t.template};function TP(e){return KX(e)}for(let[e,t]of Object.entries(Bw))My[e]={get(){let r=LP(this,xL(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};My.visible={get(){let e=LP(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var JX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of JX)My[e]={get(){let{level:t}=this;return function(...r){let o=xL(Bw.color[YX[t]][e](...r),Bw.color.close,this._styler);return LP(this,o,this._isEmpty)}}};for(let e of JX){let t="bg"+e[0].toUpperCase()+e.slice(1);My[t]={get(){let{level:r}=this;return function(...o){let a=xL(Bw.bgColor[YX[r]][e](...o),Bw.bgColor.close,this._styler);return LP(this,a,this._isEmpty)}}}}var j5e=Object.defineProperties(()=>{},{...My,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),xL=(e,t,r)=>{let o,a;return r===void 0?(o=e,a=t):(o=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:a,parent:r}},LP=(e,t,r)=>{let o=(...a)=>W5e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=j5e,o._generator=e,o._styler=t,o._isEmpty=r,o},W5e=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:o,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=H5e(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
|
|||
|
`);return n!==-1&&(t=q5e(t,a,o,n)),o+t+a},vL,Y5e=(e,...t)=>{let[r]=t;if(!Array.isArray(r))return t.join(" ");let o=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return vL===void 0&&(vL=WX()),vL(e,a.join(""))};Object.defineProperties(TP.prototype,My);var vw=TP();vw.supportsColor=DL;vw.stderr=TP({level:PL?PL.level:0});vw.stderr.supportsColor=PL;vw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};zX.exports=vw});var NP=_(Yl=>{"use strict";Yl.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Yl.find=(e,t)=>e.nodes.find(r=>r.type===t);Yl.exceedsLimit=(e,t,r=1,o)=>o===!1||!Yl.isInteger(e)||!Yl.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=o;Yl.escapeNode=(e,t=0,r)=>{let o=e.nodes[t];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Yl.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;Yl.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Yl.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Yl.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Yl.flatten=(...e)=>{let t=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,t):n!==void 0&&t.push(n)}return t};return r(e),t}});var MP=_((zkt,XX)=>{"use strict";var VX=NP();XX.exports=(e,t={})=>{let r=(o,a={})=>{let n=t.escapeInvalid&&VX.isInvalidBrace(a),u=o.invalid===!0&&t.escapeInvalid===!0,A="";if(o.value)return(n||u)&&VX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(e)}});var $X=_((Vkt,ZX)=>{"use strict";ZX.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var lZ=_((Xkt,aZ)=>{"use strict";var eZ=$X(),Ad=(e,t,r)=>{if(eZ(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(eZ(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=e+":"+t+"="+a+n+u+A;if(Ad.cache.hasOwnProperty(p))return Ad.cache[p].result;let h=Math.min(e,t),C=Math.max(e,t);if(Math.abs(h-C)===1){let R=e+"|"+t;return o.capture?`(${R})`:o.wrap===!1?R:`(?:${R})`}let w=oZ(e)||oZ(t),v={min:e,max:t,a:h,b:C},b=[],E=[];if(w&&(v.isPadded=w,v.maxLen=String(v.max).length),h<0){let R=C<0?Math.abs(C):1;E=tZ(R,Math.abs(h),v,o),h=v.a=0}return C>=0&&(b=tZ(h,C,v,o)),v.negatives=E,v.positives=b,v.result=K5e(E,b,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&b.length+E.length>1&&(v.result=`(?:${v.result})`),Ad.cache[p]=v,v.result};function K5e(e,t,r){let o=QL(e,t,"-",!1,r)||[],a=QL(t,e,"",!1,r)||[],n=QL(e,t,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function J5e(e,t){let r=1,o=1,a=nZ(e,r),n=new Set([t]);for(;e<=a&&a<=t;)n.add(a),r+=1,a=nZ(e,r);for(a=iZ(t+1,o)-1;e<a&&a<=t;)n.add(a),o+=1,a=iZ(t+1,o)-1;return n=[...n],n.sort(X5e),n}function z5e(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let o=V5e(e,t),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=Z5e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function tZ(e,t,r,o){let a=J5e(e,t),n=[],u=e,A;for(let p=0;p<a.length;p++){let h=a[p],C=z5e(String(u),String(h),o),w="";if(!r.isPadded&&A&&A.pattern===C.pattern){A.count.length>1&&A.count.pop(),A.count.push(C.count[0]),A.string=A.pattern+sZ(A.count),u=h+1;continue}r.isPadded&&(w=$5e(h,r,o)),C.string=w+C.pattern+sZ(C.count),n.push(C),u=h+1,A=C}return n}function QL(e,t,r,o,a){let n=[];for(let u of e){let{string:A}=u;!o&&!rZ(t,"strin
|
|||
|
`,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 bZ=_((rFt,xZ)=>{"use strict";var f7e=MP(),{MAX_LENGTH:DZ,CHAR_BACKSLASH:TL,CHAR_BACKTICK:p7e,CHAR_COMMA:h7e,CHAR_DOT:g7e,CHAR_LEFT_PARENTHESES:d7e,CHAR_RIGHT_PARENTHESES:m7e,CHAR_LEFT_CURLY_BRACE:y7e,CHAR_RIGHT_CURLY_BRACE:E7e,CHAR_LEFT_SQUARE_BRACKET:PZ,CHAR_RIGHT_SQUARE_BRACKET:SZ,CHAR_DOUBLE_QUOTE:C7e,CHAR_SINGLE_QUOTE:I7e,CHAR_NO_BREAK_SPACE:w7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:B7e}=vZ(),v7e=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},o=typeof r.maxLength=="number"?Math.min(DZ,r.maxLength):DZ;if(e.length>o)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${o})`);let a={type:"root",input:e,nodes:[]},n=[a],u=a,A=a,p=0,h=e.length,C=0,w=0,v,b={},E=()=>e[C++],R=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(R({type:"bos"});C<h;)if(u=n[n.length-1],v=E(),!(v===B7e||v===w7e)){if(v===TL){R({type:"text",value:(t.keepEscaping?v:"")+E()});continue}if(v===SZ){R({type:"text",value:"\\"+v});continue}if(v===PZ){p++;let N=!0,U;for(;C<h&&(U=E());){if(v+=U,U===PZ){p++;continue}if(U===TL){v+=E();continue}if(U===SZ&&(p--,p===0))break}R({type:"text",value:v});continue}if(v===d7e){u=R({type:"paren",nodes:[]}),n.push(u),R({type:"text",value:v});continue}if(v===m7e){if(u.type!=="paren"){R({type:"text",value:v});continue}u=n.pop(),R({type:"text",value:v}),u=n[n.length-1];continue}if(v===C7e||v===I7e||v===p7e){let N=v,U;for(t.keepQuotes!==!0&&(v="");C<h&&(U=E());){if(U===TL){v+=U+E();continue}if(U===N){t.keepQuotes===!0&&(v+=U);break}v+=U}R({type:"text",value:v});continue}if(v===y7e){w++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};u=R(U),n.push(u),R({type:"open",value:v});continue}if(v===E7e){if(u.type!=="brace"){R({type:"text",value:v});continue}let N="close";u=n.pop(),u.close=!0,R({type:N,value:v}),w--,u=n[n.length-1];continue}if(v===h7e&&w>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:f7e(u)}]}R({type:"comma",value:v}),u.commas++;continue}if(v===g7e&&w>0&&u.commas===0){let N=u.nodes;if(w===0||N.length===0){R({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+v,A=U,u.ranges--;continue}R({type:"dot",value:v});continue}R({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(z=>{z.nodes||(z.type==="open"&&(z.isOpen=!0),z.type==="close"&&(z.isClose=!0),z.nodes||(z.type="text"),z.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return R({type:"eos"}),a};xZ.exports=v7e});var FZ=_((nFt,kZ)=>{"use strict";var QZ=MP(),D7e=EZ(),P7e=wZ(),S7e=bZ(),ll=(e,t={})=>{let r=[];if(Array.isArray(e))for(let o of e){let a=ll.create(o,t);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(ll.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ll.parse=(e,t={})=>S7e(e,t);ll.stringify=(e,t={})=>QZ(typeof e=="string"?ll.parse(e,t):e,t);ll.compile=(e,t={})=>(typeof e=="string"&&(e=ll.parse(e,t)),D7e(e,t));ll.expand=(e,t={})=>{typeof e=="string"&&(e=ll.parse(e,t));let r=P7e(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ll.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ll.compile(e,t):ll.expand(e,t);kZ.exports=ll});var Pw=_((iFt,MZ)=>{"use strict";var x7e=ye("path"),Vu="\\\\/",RZ=`[^${Vu}]`,Df="\\.",b7e="\\+",Q7e="\\?",UP="\\/",k7e="(?=.)",TZ="[^/]",LL=`(?:${UP}|$)`,LZ=`(?:^|${U
|
|||
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t!==null?this.reportInfo(null,`${t} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(t!==null?this.reportInfo(null,`${t} ${n}`):this.reportInfo(null,n))}),r}}});var yE,FO=yt(()=>{Zl();bo();yE=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 o=this.fetchers.find(a=>a.supports(t,r));return o||null}getFetcher(t,r){let o=this.fetchers.find(a=>a.supports(t,r));if(!o)throw new Jt(11,`${Or(r.project.configuration,t)} isn't supported by any available fetcher`);return o}}});var bd,RO=yt(()=>{bo();bd=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,o){return this.getResolverByDescriptor(t,o).bindDescriptor(t,r,o)}getResolutionDependencies(t,r){return this.getResolverByDescriptor(t,r).getResolutionDependencies(t,r)}async getCandidates(t,r,o){return await this.getResolverByDescriptor(t,o).getCandidates(t,r,o)}async getSatisfying(t,r,o,a){return this.getResolverByDescriptor(t,a).getSatisfying(t,r,o,a)}async resolve(t,r){return await this.getResolverByLocator(t,r).resolve(t,r)}tryResolverByDescriptor(t,r){let o=this.resolvers.find(a=>a.supportsDescriptor(t,r));return o||null}getResolverByDescriptor(t,r){let o=this.resolvers.find(a=>a.supportsDescriptor(t,r));if(!o)throw new Error(`${Nn(r.project.configuration,t)} isn't supported by any available resolver`);return o}tryResolverByLocator(t,r){let o=this.resolvers.find(a=>a.supportsLocator(t,r));return o||null}getResolverByLocator(t,r){let o=this.resolvers.find(a=>a.supportsLocator(t,r));if(!o)throw new Error(`${Or(r.project.configuration,t)} isn't supported by any available resolver`);return o}}});var EE,TO=yt(()=>{Dt();bo();EE=class{supports(t){return!!t.reference.startsWith("virtual:")}getLocalPath(t,r){let o=t.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(o+1),n=cs(t,a);return r.fetcher.getLocalPath(n,r)}async fetch(t,r){let o=t.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=t.reference.slice(o+1),n=cs(t,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(t,u,r)}getLocatorFilename(t){return fE(t)}async ensureVirtualLink(t,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(t),A=hi.makeVirtualPath(n,u,a),p=new ju(A,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var CE,a1,Roe=yt(()=>{CE=class{static isVirtualDescriptor(t){return!!t.range.startsWith(CE.protocol)}static isVirtualLocator(t){return!!t.reference.startsWith(CE.protocol)}supportsDescriptor(t,r){return CE.isVirtualDescriptor(t)}supportsLocator(t,r){return CE.isVirtualLocator(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){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,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(t,r,o,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')}},a1=CE;a1.protocol="virtual:"});var IE,LO=yt(()=>{Dt();Sd();IE=class{supports(t){return!!t.reference.startsWith(Wn.protocol)}getLocalPath(t,r){return this.getWorkspace(t,r).cwd}async fetch(t,r){let o=this.getWorkspace(t,r).cwd;return{packageFs:new un(o),prefixPath:It.dot,localPath:o}}get
|
|||
|
`,w.message,w.stack);var v=new Error("tunneling socket could not be established, cause="+w.message);v.code="ECONNRESET",t.request.emit("error",v),o.removeSocket(a)}};Tf.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function _oe(e,t){var r=this;Tf.prototype.createSocket.call(r,e,function(o){var a=e.request.getHeader("host"),n=WO({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):e.host}),u=int.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,t(u)})}function Hoe(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function WO(e){for(var t=1,r=arguments.length;t<r;++t){var o=arguments[t];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(e[A]=o[A])}}return e}var oh;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?oh=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:oh=function(){};vE.debug=oh});var joe=_((bNt,Goe)=>{Goe.exports=qoe()});var Nf=_((Lf,ix)=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var Woe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Ant(e){return Woe.includes(e)}var fnt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Woe];function pnt(e){return fnt.includes(e)}var hnt=["null","undefined","string","number","bigint","boolean","symbol"];function gnt(e){return hnt.includes(e)}function DE(e){return t=>typeof t===e}var{toString:Yoe}=Object.prototype,u1=e=>{let t=Yoe.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&ke.domElement(e))return"HTMLElement";if(pnt(t))return t},Xn=e=>t=>u1(t)===e;function ke(e){if(e===null)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(ke.observable(e))return"Observable";if(ke.array(e))return"Array";if(ke.buffer(e))return"Buffer";let t=u1(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}ke.undefined=DE("undefined");ke.string=DE("string");var dnt=DE("number");ke.number=e=>dnt(e)&&!ke.nan(e);ke.bigint=DE("bigint");ke.function_=DE("function");ke.null_=e=>e===null;ke.class_=e=>ke.function_(e)&&e.toString().startsWith("class ");ke.boolean=e=>e===!0||e===!1;ke.symbol=DE("symbol");ke.numericString=e=>ke.string(e)&&!ke.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));ke.array=(e,t)=>Array.isArray(e)?ke.function_(t)?e.every(t):!0:!1;ke.buffer=e=>{var t,r,o,a;return(a=(o=(r=(t=e)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,e))!==null&&a!==void 0?a:!1};ke.nullOrUndefined=e=>ke.null_(e)||ke.undefined(e);ke.object=e=>!ke.null_(e)&&(typeof e=="object"||ke.function_(e));ke.iterable=e=>{var t;return ke.function_((t=e)===null||t===void 0?void 0:t[Symbol.iterator])};ke.asyncIterable=e=>{var t;return ke.function_((t=e)===null||t===void 0?void 0:t[Symbol.asyncIterator])};ke.generator=e=>ke.iterable(e)&&ke.function_(e.next)&&ke.function_(e.throw);ke.asyncGenerator=e=>ke.asyncIterable(e)&&ke.function_(e.next)&&ke.function_(e.throw);ke.nativePromise=e=>Xn("Promise")(e);var mnt=e=>{var t,r;return ke.function_((t=e)===null||t===void 0?void 0:t.then)&&ke.function_((r=e)===null||r===void 0?void 0:r.catch)};ke.promise=e=>ke.nativePromise(e)||mnt(e);ke.generatorFunction=Xn("GeneratorFunction");ke.asyncGene
|
|||
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);E(R)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let C=`${A}:${u}`,w=!1;try{let v=Pit.connect(t,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C),...r});v[ea]=0,v[bE]=!1;let b=()=>v[ea]<v.remoteSettings.maxConcurrentStreams,E=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(C,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(C)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(w){E&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let R=()=>{if(!(!(u in this.queue)||!b())){for(let N of v[$l])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&b();)U.shift().resolve(v);let z=this.queue[u];if(z[N].listeners.length===0&&(delete z[N],Object.keys(z).length===0)){delete this.queue[u];break}if(!b())break}}};v.on("origin",()=>{v[$l]=v.originSet,b()&&(R(),d4(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);v.destroy();return}v[$l]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(bit(U,v,Qit),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,w=!0,this.emit("session",v),R(),p(),v[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{R(),d4(this.sessions[u],v)})}),v[qae]=v.request,v.request=(N,U)=>{if(v[bE])throw new Error("The session is gracefully closing. No new streams are allowed.");let z=v[qae](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,z.once("close",()=>{if(E=b(),--v[ea],!v.destroyed&&!v.closed&&(kit(this.sessions[u],v),b()&&!v.closed)){E||(this._freeSessionsCount++,E=!0);let $=v[ea]===0;$&&v.unref(),$&&(this._freeSessionsCount>this.maxFreeSessions||v[bE])?v.close():(d4(this.sessions[u],v),R())}}),z}}catch(v){for(let b of o)b.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(t,r,o,a){return new Promise((n,u)=>{this.getSession(t,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(t,r){return iA.connect(t,r)}static connect(t,r){r.ALPNProtocols=["h2"];let o=t.port||443,a=t.hostname||t.host;return typeof r.servername>"u"&&(r.servername=a),Dit.connect(o,a,r)}closeFreeSessions(){for(let t of Object.values(this.sessions))for(let r of t)r[ea]===0&&r.close()}destroy(t){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(t);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Gae({agent:this,isFree:!0})}get busySessions(){return Gae({agent:this,isFree:!1})}};iA.kCurrentStreamsCount=ea;iA.kGracefullyClosing=bE;Wae.exports={Agent:iA,globalAgent:new iA}});var E4=_((tMt,Yae)=>{"use strict";var{Readable:Fit}=ye("stream"),y4=class extends Fit{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"),t
|
|||
|
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|||
|
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
|
|||
|
`)}${A.reverse().join(`
|
|||
|
`)}`}}};En.RequestError=Ji;var Cx=class extends Ji{constructor(t){super(`Redirected ${t.options.maxRedirects} times. Aborting.`,{},t),this.name="MaxRedirectsError"}};En.MaxRedirectsError=Cx;var Ix=class extends Ji{constructor(t){super(`Response code ${t.statusCode} (${t.statusMessage})`,{},t.request),this.name="HTTPError"}};En.HTTPError=Ix;var wx=class extends Ji{constructor(t,r){super(t.message,t,r),this.name="CacheError"}};En.CacheError=wx;var Bx=class extends Ji{constructor(t,r){super(t.message,t,r),this.name="UploadError"}};En.UploadError=Bx;var vx=class extends Ji{constructor(t,r,o){super(t.message,t,o),this.name="TimeoutError",this.event=t.event,this.timings=r}};En.TimeoutError=vx;var m1=class extends Ji{constructor(t,r){super(t.message,t,r),this.name="ReadError"}};En.ReadError=m1;var Dx=class extends Ji{constructor(t){super(`Unsupported protocol "${t.url.protocol}"`,{},t),this.name="UnsupportedProtocolError"}};En.UnsupportedProtocolError=Dx;var Ust=["socket","connect","continue","information","upgrade","timeout"],Px=class extends Lle.Duplex{constructor(t,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[FE]=0,this[TE]=0,this.requestInitialized=!1,this[mx]=new Set,this.redirects=[],this[LE]=!1,this[yx]=!1,this[d1]=[],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 j4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),En.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(t,r,o)}catch(h){it.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof yst.ReadStream&&await Nst(this.options.body);let{url:C}=this.options;if(!C)throw new TypeError("Missing `url` property");if(this.requestUrl=C.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Zs])===null||h===void 0||h.destroy();return}for(let w of this[d1])w();this[d1].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Ji){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(t,r,o){var a,n,u,A,p;let h=r;if(it.default.object(t)&&!it.default.urlInstance(t))r={...o,...t,...r};else{if(t&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},t!==void 0&&(r.url=t),it.default.urlInstance(r.url)&&(r.url=new ah.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),it.assert.any([it.default.string,it.default.undefined],r.method),it.assert.any([it.default.object,it.default.undefined],r.headers),it.assert.any([it.default.string,it.default.urlInstance,it.default.undefined],r.prefixUrl),it.assert.any([it.default.object,it.default.undefined],r.cookieJar),it.assert.any([it.default.object,it.default.string,it.default.undefined],r.searchParams),it.assert.any([it.default.object,it.default.string,it.default.undefined],r.cache),it.assert.any([it.default.object,it.default.number,it.default.undefined],r.timeout),it.assert.any([it.default.object,it.default.undefined],r.context),it.assert.any([it.default.object,it.default.undefined],r.hooks),it.assert.any([it.default.boolean,it.default.undefined],r.decompress),it.assert.any([it.default.boolean,it.default.undefined],r.ignoreInvalidCookies),it.assert.any([it.default.boolean,it.default.undefined],r.followRedirect),it.assert.any([it.default.number,it.default.undefined],r.maxRedirects),it.assert.any([it.default.boolean,it.default.undefined],r.throwHttpErrors),it.assert.any([it.default.boolean,it.default.undefined],r.http2),it.assert.any([it.default.boolean,it.default.undefined],r.allowGetBody),it.assert.any([it.default.string,it.default.undefined],r.localAddress),it.asser
|
|||
|
`)[3];return wot(t)}function cU(){return typeof Tx.default.availableParallelism<"u"?Tx.default.availableParallelism():Math.max(1,Tx.default.cpus().length)}var Bce,Tx,Cce,mot,Ice,wce,Cot,Iot,w1=yt(()=>{Dt();Bce=tt(ye("module")),Tx=tt(ye("os"));Lx();zl();Cce=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),mot=typeof Cce<"u"?async e=>{try{return await uU(Cce,[e],{cwd:J.cwd()}),!0}catch{return!1}}:void 0;Cot=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Iot=/\((\S*)(?::(\d+))(?::(\d+))\)/});function gU(e,t,r,o,a){let n=c1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>AU(e,`${t}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>AU(e,t,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return AU(e,t,r,o,a)}function AU(e,t,r,o,a){let n=c1(r);switch(o.type){case"ANY":return tx(n);case"SHAPE":return Sot(e,t,r,o,a);case"MAP":return xot(e,t,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return Ww(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${t}" to be a string, got ${typeof n}`);let p=uS(n,{env:e.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,C=_O(r);return C&&(h=J.resolve(C,"..")),J.resolve(h,Ae.toPortablePath(p))}case"LOCATOR_LOOSE":return kf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return kf(p);case"BOOLEAN":return Ww(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function Sot(e,t,r,o,a){let n=c1(r);if(typeof n!="object"||Array.isArray(n))throw new at(`Object configuration settings "${t}" must be an object`);let u=dU(e,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${t}.${A}`;if(!o.properties[A])throw new at(`Unrecognized configuration settings found: ${t}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,gU(e,h,p,o.properties[A],a))}return u}function xot(e,t,r,o,a){let n=c1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new at(`Map configuration settings "${t}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,C=`${t}['${h}']`,w=o.valueDefinition;u.set(h,gU(e,C,p,w,a))}return u}function dU(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case"SHAPE":{if(t.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(t.properties))o.set(a,dU(e,n));return o}break;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(o=>J.normalize(o)):J.isAbsolute(t.default)?J.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(o=>J.resolve(e.projectCwd,o)):J.resolve(e.projectCwd,t.default);default:return t.default}}function Mx(e,t,r){if(t.type==="SECRET"&&typeof e=="string"&&r.hideSecrets)return Pot;if(t.type==="ABSOLUTE_PATH"&&typeof e=="string"&&r.getNativePaths)return Ae.fromPortablePath(e);if(t.isArray&&Array.isArray(e)){let o=[];for(let a of e)o.push(Mx(a,t,r));return o}if(t.type==="MAP"&&e instanceof Map){let o=new Map;for(let[a,n]of e.entries())o.set(a,Mx(n,t.valueDefinition,r));return o}if(t.type==="SHAPE"&&e instanceof Map){let o=new Map;for(let[a,n]of e.entries()){let u=t.properties[a];o.set(a,Mx(n,u,r))}return o}return e}function bot(){let e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith(Ux)&&(t=(0,vce.default)(t.slice(Ux.length)),e[t]=r);return e}function Ox(){let e=`${Ux}rc_filename`;for(let[t,r]of Object.entries(process.env))if(t.toLowerCase()===e&&typeof r=="string")return r;return pU}var vce,Of,Dce,Pce,fU,vot,B1,Dot,NE,Ux,pU,hU,Pot,v1,Sce,_x,Nx,mU,Vc,Je,D1=yt(()=>{Dt();ql();vce=tt(DJ()),Of=t
|
|||
|
`);return{stdout:n,stderr:u}}makeResolver(){let t=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])t.push(new o);return new bd([new a1,new Wn,...t])}makeFetcher(){let t=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])t.push(new o);return new yE([new EE,new IE,...t])}getLinkers(){let t=[];for(let r of this.plugins.values())for(let o of r.linkers||[])t.push(new o);return t}getSupportedArchitectures(){let t=I1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?t.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?t.cpu:u));let n=r.get("libc");return n!==null&&(n=Al(n,u=>u==="current"?t.libc??Al.skip:u)),{os:o,cpu:a,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let t=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!Ra(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Lt;u.load(a,{yamlCompatibilityMode:!0});let A=Vy(t,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let C of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:C});for(let C of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:C});for(let[C,w]of u.peerDependenciesMeta)for(let[v,b]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:C,key:v,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(sh(o,!0),cS(a),{userProvided:!0})}normalizeLocator(t){return Ra(t.reference)?cs(t,`${this.get("defaultProtocol")}${t.reference}`):NE.test(t.reference)?cs(t,`${this.get("defaultProtocol")}${t.reference}`):t}normalizeDependency(t){return Ra(t.range)?yn(t,`${this.get("defaultProtocol")}${t.range}`):NE.test(t.range)?yn(t,`${this.get("defaultProtocol")}${t.range}`):t}normalizeDependencyMap(t){return new Map([...t].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(t){let r=Zw(t);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let o=this.packageExtensions.get(t.identHash);if(typeof o<"u"){let n=t.version;if(n!==null){for(let[u,A]of o)if(!!Ff(n,u))for(let p of A)switch(p.status==="inactive"&&(p.status="redundant"),p.type){case"Dependency":typeof r.dependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.dependencies.set(p.descriptor.identHash,this.normalizeDependency(p.descriptor)));break;case"PeerDependency":typeof r.peerDependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.peerDependencies.set(p.descriptor.identHash,p.descriptor));break;case"PeerDependencyMeta":{let h=r.peerDependenciesMeta.get(p.selector);(typeof h>"u"||!Object.prototype.hasOwnProperty.call(h,p.key)||h[p.key]!==p.value)&&(p.status="active",Wc(r.peerDependenciesMeta,p.selector,()=>({}))[p.key]=p.value)}break;default:PN(p);break}}}let a=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let u=Vs(n);r.peerDependencies.has(u.identHash)||r.peerDependencies.set(u.identHash,yn(u,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let u=a(n),A=nA("types",u),p=on(A);r.peerDependencies.has(A.identHash)||r.peerDependenciesMeta.has(p)||(r.peerDependencies.set(A.identHash,yn(A,"*")),r.peerDependenciesMeta.set(p,{optional:!0}))}return r.dependencies=new Map(xs(r.dependencies,([,n])=>ka(n))),r.peerDependencies=new Map(xs(r.peerDependencies,([,n])=>ka(n))),r}getLimit(t){return Wc(this.limits,t,()=>(0,Pce.default)(this.get(t)))}async triggerHook(t,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=t(a);!n||await n(...r)}}async triggerMultipleHooks(t,r){for(let o of r)await this.triggerHook(t,...o)}async reduceHook(t,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=t(u);!A||(a=await A(a,...o))}return a}async firstHook(t,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=t(a);if(!n)continue;let u=await n(...r);if(typeof
|
|||
|
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"']]}});var fl,Gce=yt(()=>{fl=class extends Error{constructor(t){super(t),this.name="ShellError"}}});var Kx={};Yt(Kx,{fastGlobOptions:()=>Yce,isBraceExpansion:()=>kU,isGlobPattern:()=>Not,match:()=>Mot,micromatchOptions:()=>Yx});function Not(e){if(!Wx.default.scan(e,Yx).isGlob)return!1;try{Wx.default.parse(e,Yx)}catch{return!1}return!0}function Mot(e,{cwd:t,baseFs:r}){return(0,jce.default)(e,{...Yce,cwd:Ae.fromPortablePath(t),fs:ND(Wce.default,new Hp(r))})}function kU(e){return Wx.default.scan(e,Yx).isBrace}var jce,Wce,Wx,Yx,Yce,Kce=yt(()=>{Dt();jce=tt(US()),Wce=tt(ye("fs")),Wx=tt(Zo()),Yx={strictBrackets:!0},Yce={onlyDirectories:!1,onlyFiles:!1}});function FU(){}function RU(){for(let e of Td)e.kill()}function Xce(e,t,r,o){return a=>{let n=a[0]instanceof oA.Transform?"pipe":a[0],u=a[1]instanceof oA.Transform?"pipe":a[1],A=a[2]instanceof oA.Transform?"pipe":a[2],p=(0,zce.default)(e,t,{...o,stdio:[n,u,A]});return Td.add(p),Td.size===1&&(process.on("SIGINT",FU),process.on("SIGTERM",RU)),a[0]instanceof oA.Transform&&a[0].pipe(p.stdin),a[1]instanceof oA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof oA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",C=>{switch(Td.delete(p),Td.size===0&&(process.off("SIGINT",FU),process.off("SIGTERM",RU)),C.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: ${C.message}
|
|||
|
`),h(1);break}}),p.on("close",C=>{Td.delete(p),Td.size===0&&(process.off("SIGINT",FU),process.off("SIGTERM",RU)),h(C!==null?C:129)})})}}}function Zce(e){return t=>{let r=t[0]==="pipe"?new oA.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}function Jx(e,t){return UE.start(e,t)}function Jce(e,t=null){let r=new oA.PassThrough,o=new Vce.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
|
|||
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e(t!==null?`${t} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&e(t!==null?`${t} ${n}`:n)}),r}function $ce(e,{prefix:t}){return{stdout:Jce(r=>e.stdout.write(`${r}
|
|||
|
`),e.stdout.isTTY?t:null),stderr:Jce(r=>e.stderr.write(`${r}
|
|||
|
`),e.stderr.isTTY?t:null)}}var zce,oA,Vce,Td,nc,TU,UE,LU=yt(()=>{zce=tt(gT()),oA=ye("stream"),Vce=ye("string_decoder"),Td=new Set;nc=class{constructor(t){this.stream=t}close(){}get(){return this.stream}},TU=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}},UE=class{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:o,stderr:a}){let n=new UE(null,t);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(t,r=1){let o=new UE(this,t),a=new TU;return o.pipe=a,o.stdout=this.stdout,o.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),o}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 o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,t[2]=o.get();let a=this.implementation(t);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let t=[];for(let o=this;o;o=o.ancestor)t.push(o.exec());return(await Promise.all(t))[0]}}});var R1={};Yt(R1,{EntryCommand:()=>ME,ShellError:()=>fl,execute:()=>OE,globUtils:()=>Kx});function eue(e,t,r){let o=new pl.PassThrough({autoDestroy:!0});switch(e){case 0:(t&1)===1&&r.stdin.pipe(o,{end:!1}),(t&2)===2&&r.stdin instanceof pl.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(t&1)===1&&r.stdout.pipe(o,{end:!1}),(t&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(t&1)===1&&r.stderr.pipe(o,{end:!1}),(t&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new fl(`Bad file descriptor: "${e}"`)}return o}function Vx(e,t={}){let r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}async function _ot(e,t,r){let o=[],a=new pl.PassThrough;return a.on("data",n=>o.push(n)),await Xx(e,t,Vx(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function tue(e,t,r){let o=e.map(async n=>{let u=await Ld(n.args,t,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function zx(e){return e.match(/[^ \r\n\t]+/g)||[]}async function aue(e,t,r,o,a=o){switch(e.name){case"$":o(String(process.pid));break;case"#":o(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 u=zx(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=t.args.join(" ");if(e.quoted)o(n);else for(let u of zx(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(e.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<t.args.length&&(u=t.args[n]):Object.prototype.hasOwnProperty.call(r.variables,e.name)?u=r.variables[e.name]:Object.prototype.hasOwnProperty.call(r.environment,e.name)&&(u=r.environment[e.name]),typeof u<"u"&&e.alternativeValue?u=(await Ld(e.alternativeValue,t,r)).join(" "):typeof u>"u"&&(e.defaultValue?u=(await Ld(e.defaultValue,t,r)).join(" "):e.alternativeValue&&(u="")),typeof u>"u")throw A?new fl(`Unbound argument #${n}`):new fl(`Unbound variable "${e.name}"`);if(e.quoted)o(u);else{let p=zx(u);for(let C=0;C<p.length-1;++C)a(p[C]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function Q1(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 o=[];await aue({...e,quoted:!0},t,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)
|
|||
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(gy(e))}' has ended
|
|||
|
`)})),0}return await nue(e,t,r)}async function Wot(e,t,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await jot(A.chain,t,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof fl))throw p;return r.stderr.write(`${p.message}
|
|||
|
`),1}};for(n(await u(e));e.then;){if(r.exitCode!==null)return r.exitCode;switch(e.then.type){case"&&":a===0&&n(await u(e.then.line));break;case"||":a!==0&&n(await u(e.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return a}async function Xx(e,t,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of e){if(a=await Wot(n,t,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function lue(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=>F1(t))||"alternativeValue"in e&&!!e.alternativeValue&&e.alternativeValue.some(t=>F1(t));case"arithmetic":return NU(e.arithmetic);case"shell":return MU(e.shell);default:return!1}}function F1(e){switch(e.type){case"redirection":return e.args.some(t=>F1(t));case"argument":return e.segments.some(t=>lue(t));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function NU(e){switch(e.type){case"variable":return lue(e);case"number":return!1;default:return NU(e.left)||NU(e.right)}}function MU(e){return e.some(({command:t})=>{for(;t;){let r=t.chain;for(;r;){let o;switch(r.type){case"subshell":o=MU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>F1(n)))||r.args.some(a=>F1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!t.then)break;t=t.then.line}return!1})}async function OE(e,t=[],{baseFs:r=new bn,builtins:o={},cwd:a=Ae.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:C=Kx}={}){let w={};for(let[E,R]of Object.entries(n))typeof R<"u"&&(w[E]=R);let v=new Map(Uot);for(let[E,R]of Object.entries(o))v.set(E,R);u===null&&(u=new pl.PassThrough,u.end());let b=UD(e,C);if(!MU(b)&&b.length>0&&t.length>0){let{command:E}=b[b.length-1];for(;E.then;)E=E.then.line;let R=E.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(t.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await Xx(b,{args:t,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:C},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var iue,sue,pl,oue,Oot,Uot,Hot,b1=yt(()=>{Dt();ql();iue=tt(bL()),sue=ye("os"),pl=ye("stream"),oue=ye("util");qce();Gce();Kce();LU();LU();Oot=(0,oue.promisify)(setTimeout);Uot=new Map([["cd",async([e=(0,sue.homedir)(),...t],r,o)=>{let a=J.resolve(o.cwd,Ae.toPortablePath(e));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new fl(`cd: no such file or directory: ${e}`):u})).isDirectory())throw new fl(`cd: not a directory: ${e}`);return o.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,o)=>o.exitCode=parseInt(e??o.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(`${e.join(" ")}
|
|||
|
`),0)],["sleep",async([e],t,r)=>{if(typeof e>"u")throw new fl("sleep: missing operand");let o=Number(e);if(Number.isNaN(o))throw new fl(`sleep: invalid time interval '${e}'`);return await Oot(1e3*o,0)}],["__ysh_run_procedure",async(e,t,r)=>{let o=r.procedures[e[0]];return await Jx(o,{stdin:new nc(r.stdin),stdout:new nc(r.stdout),stderr:new nc(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;e[h]!=="--";){let w=e[h++],{type:v,fd:b}=JSON.parse(w),E=z=>{switch(b){case null:case 0:u.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},R=z=>{switch(b){case null:case 1:A.push(z);break;case 2:p.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},N=Number(e[h++]),U=h+N;for(let z=h;z<U;++h,++z)switch(v){case"<":E(()=>t.baseFs.createReadStream(J.resolve(r.cwd,Ae.toPortablePath(e[z]))));break;case"<<<":E(()=>{let $=new pl.PassThrough;return process.nextTick(()=>{$.write(`${e[z]}
|
|||
|
`),$.end()}),$});break;case"<&":E(()=>eue(Number(e[z]),1,r));break;case">":case">>":{let $=J.resolve(r.cwd,Ae.toPortablePath(e[z]));R($==="/dev/null"?new pl.Writable({autoDestroy:!0,emitClose:!0,write(ae,pe,de){setImmediate(de)}}):t.baseFs.createWriteStream($,v===">>"?{flags:"a"}:void 0))}break;case">&":R(eue(Number(e[z]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let w=new pl.PassThrough;o=w;let v=b=>{if(b===u.length)w.end();else{let E=u[b]();E.pipe(w,{end:!1}),E.on("end",()=>{v(b+1)})}};v(0)}if(A.length>0){let w=new pl.PassThrough;a=w;for(let v of A)w.pipe(v)}if(p.length>0){let w=new pl.PassThrough;n=w;for(let v of p)w.pipe(v)}let C=await Jx(k1(e.slice(h+1),t,r),{stdin:new nc(o),stdout:new nc(a),stderr:new nc(n)}).run();return await Promise.all(A.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),await Promise.all(p.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),C}]]);Hot={addition:(e,t)=>e+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)}});var Zx=_((D4t,cue)=>{function Yot(e,t){for(var r=-1,o=e==null?0:e.length,a=Array(o);++r<o;)a[r]=t(e[r],r,e);return a}cue.exports=Yot});var gue=_((P4t,hue)=>{var uue=pd(),Kot=Zx(),Jot=Jl(),zot=mE(),Vot=1/0,Aue=uue?uue.prototype:void 0,fue=Aue?Aue.toString:void 0;function pue(e){if(typeof e=="string")return e;if(Jot(e))return Kot(e,pue)+"";if(zot(e))return fue?fue.call(e):"";var t=e+"";return t=="0"&&1/e==-Vot?"-0":t}hue.exports=pue});var T1=_((S4t,due)=>{var Xot=gue();function Zot(e){return e==null?"":Xot(e)}due.exports=Zot});var OU=_((x4t,mue)=>{function $ot(e,t,r){var o=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(a);++o<a;)n[o]=e[o+t];return n}mue.exports=$ot});var Eue=_((b4t,yue)=>{var eat=OU();function tat(e,t,r){var o=e.length;return r=r===void 0?o:r,!t&&r>=o?e:eat(e,t,r)}yue.exports=tat});var UU=_((Q4t,Cue)=>{var rat="\\ud800-\\udfff",nat="\\u0300-\\u036f",iat="\\ufe20-\\ufe2f",sat="\\u20d0-\\u20ff",oat=nat+iat+sat,aat="\\ufe0e\\ufe0f",lat="\\u200d",cat=RegExp("["+lat+rat+oat+aat+"]");function uat(e){return cat.test(e)}Cue.exports=uat});var wue=_((k4t,Iue)=>{function Aat(e){return e.split("")}Iue.exports=Aat});var Que=_((F4t,bue)=>{var Bue="\\ud800-\\udfff",fat="\\u0300-\\u036f",pat="\\ufe20-\\ufe2f",hat="\\u20d0-\\u20ff",gat=fat+pat+hat,dat="\\ufe0e\\ufe0f",mat="["+Bue+"]",_U="["+gat+"]",HU="\\ud83c[\\udffb-\\udfff]",yat="(?:"+_U+"|"+HU+")",vue="[^"+Bue+"]",Due="(?:\\ud83c[\\udde6-\\uddff]){2}",Pue="[\\ud800-\\udbff][\\udc00-\\udfff]",Eat="\\u200d",Sue=yat+"?",xue="["+dat+"]?",Cat="(?:"+Eat+"(?:"+[vue,Due,Pue].join("|")+")"+xue+Sue+")*",Iat=xue+Sue+Cat,wat="(?:"+[vue+_U+"?",_U,Due,Pue,mat].join("|")+")",Bat=RegExp(HU+"(?="+HU+")|"+wat+Iat,"g");function vat(e){return e.match(Bat)||[]}bue.exports=vat});var Fue=_((R4t,kue)=>{var Dat=wue(),Pat=UU(),Sat=Que();function xat(e){return Pat(e)?Sat(e):Dat(e)}kue.exports=xat});var Tue=_((T4t,Rue)=>{var bat=Eue(),Qat=UU(),kat=Fue(),Fat=T1();function Rat(e){return function(t){t=Fat(t);var r=Qat(t)?kat(t):void 0,o=r?r[0]:t.charAt(0),a=r?bat(r,1).join(""):t.slice(1);return o[e]()+a}}Rue.exports=Rat});var Nue=_((L4t,Lue)=>{var Tat=Tue(),Lat=Tat("toUpperCase");Lue.exports=Lat});var qU=_((N4t,Mue)=>{var Nat=T1(),Mat=Nue();function Oat(e){return Mat(Nat(e).toLowerCase())}Mue.exports=Oat});var Oue=_((M4t,$x)=>{function Uat(){var e=0,t=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,C=10,w=11,v=12,b=13,E=14,R=15,N=16,U=17,z=0,$=1,ae=2,pe=3,de=4;function ve(g,Ie){return 55296<=g.charCodeAt(Ie)&&g.charCodeAt(Ie)<=56319&&56320<=g.charCodeAt(Ie+1)&&g.charCodeAt(Ie+1)<=57343}function ce(g,Ie){Ie===void 0&&(Ie=0);var xe=g.charCodeAt(Ie);if(55296<=xe&&xe<=56319&&Ie<g.length-1){var le=xe,ne=g.charCodeAt(Ie+1);return 56320<=ne&&ne<=57343?(le-55296)*1024+(ne-56320)+65536:le}if(56320<=xe&&xe<=57343&&Ie>=1){var le=g.charCodeAt(Ie-1),ne=xe;return 55296<=le&&le<=56319?(le-55296)*1024+(ne-56320)+65536:ne}return xe}function ge(g,Ie,xe){var le=[g].conca
|
|||
|
`,end:e=>`::endgroup::
|
|||
|
`}:tb.default.TRAVIS?{start:e=>`travis_fold:start:${e}
|
|||
|
`,end:e=>`travis_fold:end:${e}
|
|||
|
`}:tb.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,Wue=Ah!==null,Gue=new Date,Gat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,jat=e=>e,rb=jat({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}}),Wat=Gat&&Object.keys(rb).find(e=>{let t=rb[e];return!(t.date&&(t.date[0]!==Gue.getDate()||t.date[1]!==Gue.getMonth()+1))})||"default";Rt=class extends Xs{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:C=h,includeWarnings:w=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(Jw(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=C,this.includeWarnings=w,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let v=r.get("progressBarStyle")||Wat;if(!Object.prototype.hasOwnProperty.call(rb,v))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=rb[v];let b=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*b/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,yd(r.configuration,`Yarn ${An}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-10-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,Ah!==null&&!this.json&&this.includeInfos&&this.stdout.write(Ah.start(r))},reportFooter:A=>{if(this.indent-=1,Ah!==null&&!this.json&&this.includeInfos){this.stdout.write(Ah.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Ot(this.configuration,A,mt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),i
|
|||
|
`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
|
|||
|
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&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>que&&(this.progressFrame=(this.progressFrame+1)%Hue.length,this.progressTime=r);let o=Hue[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),C=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${C}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ot(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
|
|||
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},que)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,jue.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Yue(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Ot(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?GU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${qat} `}}});var nn={};Yt(nn,{PackageManager:()=>zue,detectPackageManager:()=>Vue,executePackageAccessibleBinary:()=>tAe,executePackageScript:()=>nb,executePackageShellcode:()=>jU,executeWorkspaceAccessibleBinary:()=>Zat,executeWorkspaceLifecycleScript:()=>$ue,executeWorkspaceScript:()=>Zue,getPackageAccessibleBinaries:()=>ib,getWorkspaceAccessibleBinaries:()=>eAe,hasPackageScript:()=>zat,hasWorkspaceScript:()=>WU,isNodeScript:()=>YU,makeScriptEnv:()=>M1,maybeExecuteWorkspaceLifecycleScript:()=>Xat,prepareExternalProject:()=>Jat});async function fh(e,t,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await oe.writeFilePromise(J.format({dir:e,name:t,ext:".cmd"}),a)}await oe.writeFilePromise(J.join(e,t),`#!/bin/sh
|
|||
|
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
|||
|
`,{mode:493})}async function Vue(e){let t=await Lt.tryFind(e);if(t?.packageManager){let o=VS(t.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:t.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.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 oe.readFilePromise(J.join(e,Nr.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'}:oe.existsSync(J.join(e,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:oe.existsSync(J.join(e,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function M1({project:e,locator:t,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=e?.configuration.env??process.env}){let u={};for(let[C,w]of Object.entries(n))typeof w<"u"&&(u[C.toLowerCase()!=="path"?C:"PATH"]=w);let A=Ae.fromPortablePath(r);u.BERRY_BIN_FOLDER=Ae.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?Ae.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([fh(r,"node",process.execPath),...An!==null?[fh(r,"run",process.execPath,[p,"run"]),fh(r,"yarn",process.execPath,[p]),fh(r,"yarnpkg",process.execPath,[p]),fh(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),e&&(u.INIT_CWD=Ae.cwd(),u.PROJECT_CWD=Ae.fromPortablePath(e.cwd)),u.PATH=u.PATH?`${A}${Ae.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${Ae.sep}yarn`,u.npm_node_execpath=`${A}${Ae.sep}node`,t){if(!e)throw new Error("Assertion failed: Missing project");let C=e.tryWorkspaceByLocator(t),w=C?C.manifest.version??"":e.storedPackages.get(t.locatorHash).version??"";u.npm_package_name=on(t),u.npm_package_version=w;let v;if(C)v=C.cwd;else{let b=e.storedPackages.get(t.locatorHash);if(!b)throw new Error(`Package for ${Or(e.configuration,t)} not found in the project`);let E=e.configuration.getLinkers(),R={project:e,report:new Rt({stdout:new ph.PassThrough,configuration:e.configuration})},N=E.find(U=>U.supportsPackage(b,R));if(!N)throw new Error(`The package ${Or(e.configuration,b)} isn't supported by any of the available linkers`);v=await N.findPackageLocation(b,R)}u.npm_package_json=Ae.fromPortablePath(J.join(v,Nr.manifest))}let h=An!==null?`yarn/${An}`:`yarn/${Xp("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),e&&await e.configuration.triggerHook(C=>C.setupScriptEnvironment,e,u,async(C,w,v)=>await fh(r,xi(C),w,v)),u}async function Jat(e,t,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Kat(async()=>{await oe.mktempPromise(async u=>{let A=J.join(u,"pack.log"),p=null,{stdout:h,stderr:C}=r.getSubprocessStreams(A,{prefix:Ae.fromPortablePath(e),report:o}),w=n&&Kc(n)?e1(n):n,v=w?Fa(w):"an external project";h.write(`Packing ${v} from sources
|
|||
|
`);let b=await Vue(e),E;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
|
|||
|
|
|||
|
`),E=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
|
|||
|
|
|||
|
`),E="Yarn");let R=E==="Yarn"&&!b?.packageManagerField;await oe.mktempPromise(async N=>{let U=await M1({binFolder:N,ignoreCorepack:R}),$=new Map([["Yarn Classic",async()=>{let pe=a!==null?["workspace",a]:[],de=J.join(e,Nr.manifest),ve=await oe.readFilePromise(de),ce=await Xc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:e,env:U,stdin:p,stdout:h,stderr:C,end:1});if(ce.code!==0)return ce.code;await oe.writeFilePromise(de,ve),await oe.appendFilePromise(J.join(e,".npmignore"),`/.yarn
|
|||
|
`),h.write(`
|
|||
|
`),delete U.NODE_ENV;let ge=await Xc("yarn",["install"],{cwd:e,env:U,stdin:p,stdout:h,stderr:C,end:1});if(ge.code!==0)return ge.code;h.write(`
|
|||
|
`);let Oe=await Xc("yarn",[...pe,"pack","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:C});return Oe.code!==0?Oe.code:0}],["Yarn",async()=>{let pe=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let de=J.join(e,Nr.lockfile);await oe.existsPromise(de)||await oe.writeFilePromise(de,"");let ve=await Xc("yarn",[...pe,"pack","--install-if-needed","--filename",Ae.fromPortablePath(t)],{cwd:e,env:U,stdin:p,stdout:h,stderr:C});return ve.code!==0?ve.code:0}],["npm",async()=>{if(a!==null){let Ie=new ph.PassThrough,xe=$y(Ie);Ie.pipe(h,{end:!1});let le=await Xc("npm",["--version"],{cwd:e,env:U,stdin:p,stdout:Ie,stderr:C,end:0});if(Ie.end(),le.code!==0)return h.end(),C.end(),le.code;let ne=(await xe).toString().trim();if(!Ff(ne,">=7.x")){let ee=nA(null,"npm"),Ee=yn(ee,ne),Qe=yn(ee,">=7.x");throw new Error(`Workspaces aren't supported by ${Nn(r,Ee)}; please upgrade to ${Nn(r,Qe)} (npm has been detected as the primary package manager for ${Ot(r,e,mt.PATH)})`)}}let pe=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 de=await Xc("npm",["install","--legacy-peer-deps"],{cwd:e,env:U,stdin:p,stdout:h,stderr:C,end:1});if(de.code!==0)return de.code;let ve=new ph.PassThrough,ce=$y(ve);ve.pipe(h);let ge=await Xc("npm",["pack","--silent",...pe],{cwd:e,env:U,stdin:p,stdout:ve,stderr:C});if(ge.code!==0)return ge.code;let Oe=(await ce).toString().trim().replace(/^.*\n/s,""),g=J.resolve(e,Ae.toPortablePath(Oe));return await oe.renamePromise(g,t),0}]]).get(E);if(typeof $>"u")throw new Error("Assertion failed: Unsupported workflow");let ae=await $();if(!(ae===0||typeof ae>"u"))throw oe.detachTemp(u),new Jt(58,`Packing the package failed (exit code ${ae}, logs can be found here: ${Ot(r,A,mt.PATH)})`)})})})}async function zat(e,t,{project:r}){let o=r.tryWorkspaceByLocator(e);if(o!==null)return WU(o,t);let a=r.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Or(r.configuration,e)} not found in the project`);return await rc.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Rt({stdout:new ph.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${Or(r.configuration,a)} isn't supported by any of the available linkers`);let C=await h.findPackageLocation(a,p),w=new un(C,{baseFs:n});return(await Lt.find(It.dot,{baseFs:w})).scripts.has(t)})}async function nb(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{manifest:h,env:C,cwd:w}=await Xue(e,{project:a,binFolder:p,cwd:o,lifecycleScript:t}),v=h.scripts.get(t);if(typeof v>"u")return 1;let b=async()=>await OE(v,r,{cwd:w,env:C,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,b,a,e,t,{script:v,args:r,cwd:w,env:C,stdin:n,stdout:u,stderr:A}))()})}async function jU(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{env:h,cwd:C}=await Xue(e,{project:a,binFolder:p,cwd:o});return await OE(t,r,{cwd:C,env:h,stdin:n,stdout:u,stderr:A})})}async function Vat(e,{binFolder:t,cwd:r,lifecycleScript:o}){let a=await M1({project:e.project,locator:e.anchoredLocator,binFolder:t,lifecycleScript:o});return await KU(t,await eAe(e)),typeof r>"u"&&(r=J.dirname(await oe.realpathPromise(J.join(e.cwd,"package.json")))),{manifest:e.manifest,binFolder:t,env:a,cwd:r}}async function Xue(e,{project:t,binFolder:r,cwd:o,lifecycleScript:a}){let n=t.tryWorkspaceByLocator(e);if(n!==null)return Vat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=t.storedPackages.get(e.locatorHash);if(!u)throw new Error(`Package for ${Or(t.configuration,e)} not found in the project`);return await rc.openPromise(async A=>{let p=t.configuration,h=t.configuration.getLinkers(),C={project:t,report:new Rt({stdout:new ph.PassThrough,configuration:p})},w=h.find(N=>N.supportsPackage(u,C));if(!w)throw new Error(`The package ${Or(t.configuration,u)} isn't supported by any of the available linkers`)
|
|||
|
`,{stdout:h,stderr:C}=a.getSubprocessStreams(A,{report:o,prefix:Or(a,e.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${t}" lifecycle script`);let w=await Zue(e,t,[],{cwd:r,stdin:n,stdout:h,stderr:C});if(h.end(),C.end(),w!==0)throw oe.detachTemp(u),new Jt(36,`${(0,Kue.default)(t)} script failed (exit code ${Ot(a,w,mt.NUMBER)}, logs can be found here: ${Ot(a,A,mt.PATH)}); run ${Ot(a,`yarn ${t}`,mt.CODE)} to investigate`)})}async function Xat(e,t,r){WU(e,t)&&await $ue(e,t,r)}function YU(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),o;try{o=oe.openSync(e,"r")}catch{return!0}try{oe.readSync(o,r,0,r.length,0)}finally{oe.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function ib(e,{project:t}){let r=t.configuration,o=new Map,a=t.storedPackages.get(e.locatorHash);if(!a)throw new Error(`Package for ${Or(r,e)} not found in the project`);let n=new ph.Writable,u=r.getLinkers(),A={project:t,report:new Rt({configuration:r,stdout:n})},p=new Set([e.locatorHash]);for(let C of a.dependencies.values()){let w=t.storedResolutions.get(C.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${Nn(r,C)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async C=>{let w=t.storedPackages.get(C);if(!w)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(w.bin.size===0)return Al.skip;let v=u.find(E=>E.supportsPackage(w,A));if(!v)return Al.skip;let b=null;try{b=await v.findPackageLocation(w,A)}catch(E){if(E.code==="LOCATOR_NOT_INSTALLED")return Al.skip;throw E}return{dependency:w,packageLocation:b}}));for(let C of h){if(C===Al.skip)continue;let{dependency:w,packageLocation:v}=C;for(let[b,E]of w.bin){let R=J.resolve(v,E);o.set(b,[w,Ae.fromPortablePath(R),YU(R)])}}return o}async function eAe(e){return await ib(e.anchoredLocator,{project:e.project})}async function KU(e,t){await Promise.all(Array.from(t,([r,[,o,a]])=>a?fh(e,xi(r),process.execPath,[o]):fh(e,xi(r),o,[])))}async function tAe(e,t,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await ib(e,{project:a});let C=h.get(t);if(!C)throw new Error(`Binary not found (${t}) for ${Or(a.configuration,e)}`);return await oe.mktempPromise(async w=>{let[,v]=C,b=await M1({project:a,locator:e,binFolder:w});await KU(b.BERRY_BIN_FOLDER,h);let E=YU(Ae.toPortablePath(v))?Xc(process.execPath,[...p,v,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A}):Xc(v,r,{cwd:o,env:b,stdin:n,stdout:u,stderr:A}),R;try{R=await E}finally{await oe.removePromise(b.BERRY_BIN_FOLDER)}return R.code})}async function Zat(e,t,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await tAe(e.anchoredLocator,t,r,{project:e.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Kue,Jue,ph,zue,Yat,Kat,JU=yt(()=>{Dt();Dt();sA();b1();Kue=tt(qU()),Jue=tt(nd()),ph=ye("stream");dE();Zl();N1();L1();Lx();Vl();zl();Rf();bo();zue=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(zue||{});Yat=2,Kat=(0,Jue.default)(Yat)});var _E=_((sUt,nAe)=>{"use strict";var rAe=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);nAe.exports=e=>e?Object.keys(e).map(t=>[rAe.has(t)?rAe.get(t):t,e[t]]).reduce((t,r)=>(t[r[0]]=r[1],t),Object.create(null)):{}});var qE=_((oUt,fAe)=>{"use strict";var iAe=typeof process=="object"&&process?process:{stdout:null,stderr:null},$at=ye("events"),sAe=ye("stream"),oAe=ye("string_decoder").StringDecoder,_f=Symbol("EOF"),Hf=Symbol("maybeEmitEnd"),hh=Symbol("emittedEnd"),sb=Symbol("emittingEnd"),O1=Symbol("emittedError"),ob=Symbol("closed"),aAe=Symbol("read"),ab=Symb
|
|||
|
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};q1.parse=(e,t,r)=>new q1(Slt(xlt(e),t),r);var Slt=(e,t)=>t?Object.keys(e).reduce((r,o)=>(r[o]=e[o],r),t):e,xlt=e=>e.replace(/\n$/,"").split(`
|
|||
|
`).reduce(blt,Object.create(null)),blt=(e,t)=>{let r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1)return e;t=t.substr((r+" ").length);let o=t.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return e;let n=o.join("=");return e[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,e};PAe.exports=q1});var JE=_((yUt,SAe)=>{SAe.exports=e=>{let t=e.length-1,r=-1;for(;t>-1&&e.charAt(t)==="/";)r=t,t--;return r===-1?e:e.slice(0,r)}});var mb=_((EUt,xAe)=>{"use strict";xAe.exports=e=>class extends e{warn(t,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||t,o.tarCode=t,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${t}: ${r}`),o))}}});var D3=_((IUt,bAe)=>{"use strict";var yb=["|","<",">","?",":"],v3=yb.map(e=>String.fromCharCode(61440+e.charCodeAt(0))),Qlt=new Map(yb.map((e,t)=>[e,v3[t]])),klt=new Map(v3.map((e,t)=>[e,yb[t]]));bAe.exports={encode:e=>yb.reduce((t,r)=>t.split(r).join(Qlt.get(r)),e),decode:e=>v3.reduce((t,r)=>t.split(r).join(klt.get(r)),e)}});var P3=_((wUt,kAe)=>{var{isAbsolute:Flt,parse:QAe}=ye("path").win32;kAe.exports=e=>{let t="",r=QAe(e);for(;Flt(e)||r.root;){let o=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.substr(o.length),t+=o,r=QAe(e)}return[t,e]}});var RAe=_((BUt,FAe)=>{"use strict";FAe.exports=(e,t,r)=>(e&=4095,r&&(e=(e|384)&-19),t&&(e&256&&(e|=64),e&32&&(e|=8),e&4&&(e|=1)),e)});var N3=_((PUt,KAe)=>{"use strict";var _Ae=qE(),HAe=db(),qAe=KE(),lA=ye("fs"),TAe=ye("path"),aA=WE(),Rlt=JE(),GAe=(e,t)=>t?(e=aA(e).replace(/^\.(\/|$)/,""),Rlt(t)+"/"+e):aA(e),Tlt=16*1024*1024,LAe=Symbol("process"),NAe=Symbol("file"),MAe=Symbol("directory"),x3=Symbol("symlink"),OAe=Symbol("hardlink"),G1=Symbol("header"),Eb=Symbol("read"),b3=Symbol("lstat"),Cb=Symbol("onlstat"),Q3=Symbol("onread"),k3=Symbol("onreadlink"),F3=Symbol("openfile"),R3=Symbol("onopenfile"),yh=Symbol("close"),Ib=Symbol("mode"),T3=Symbol("awaitDrain"),S3=Symbol("ondrain"),cA=Symbol("prefix"),UAe=Symbol("hadError"),jAe=mb(),Llt=D3(),WAe=P3(),YAe=RAe(),wb=jAe(class extends _Ae{constructor(t,r){if(r=r||{},super(r),typeof t!="string")throw new TypeError("path is required");this.path=aA(t),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Tlt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=aA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?aA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=WAe(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Llt.decode(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=aA(r.absolute||TAe.resolve(this.cwd,t)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[Cb](this.statCache.get(this.absolute)):this[b3]()}emit(t,...r){return t==="error"&&(this[UAe]=!0),super.emit(t,...r)}[b3](){lA.lstat(this.absolute,(t,r)=>{if(t)return this.emit("error",t);this[Cb](r)})}[Cb](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=Mlt(t),this.emit("stat",t),this[LAe]()}[LAe](){switch(this.type){case"File":return this[NAe]();case"Directory":return this[MAe]();case"SymbolicLink":return this[x3]();default:return this.end()}}[Ib](t){return YAe(t,this.type==="Directory",this.portable)}[cA](t){return GAe(t,this.prefix)}[G1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new qAe({path:
|
|||
|
`}),A},o})});var ra={};Yt(ra,{emitList:()=>xut,emitTree:()=>the,treeNodeToJson:()=>ehe,treeNodeToTreeify:()=>$pe});function $pe(e,{configuration:t}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:C,value:w,children:v}=h,b=[];typeof C<"u"&&b.push(yd(t,C,2)),typeof w<"u"&&b.push(Ot(t,w[0],w[1])),b.length===0&&b.push(yd(t,`${p}`,2));let E=b.join(": "),R=`\0${o++}\0`,N=u[`${R}${E}`]={};typeof v<"u"&&a(v,N)}};if(typeof e.children>"u")throw new Error("The root node must only contain children");return a(e.children,r),r}function ehe(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 Ed(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[but(n)]=t(u));return typeof r.value>"u"?a:{value:Ed(r.value[0],r.value[1]),children:a}};return t(e)}function xut(e,{configuration:t,stdout:r,json:o}){let a=e.map(n=>({value:n}));the({children:a},{configuration:t,stdout:r,json:o})}function the(e,{configuration:t,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(e.children)?e.children.values():Object.values(e.children??{});for(let A of u)A&&r.write(`${JSON.stringify(ehe(A))}
|
|||
|
`);return}let n=(0,Zpe.asTree)($pe(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 u=0;u<2;++u)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 but(e){return typeof e=="string"?e.replace(/^\0[0-9]+\0/,""):e}var Zpe,rhe=yt(()=>{Zpe=tt(Xpe());Vl()});function b_(e){let t=e.indexOf("/");return t!==-1?e.slice(0,t):null}function kut(e){let t=e.indexOf("/");return t!==-1?e.slice(t+1):e}var nhe,Q_,Qut,Ur,ihe=yt(()=>{Dt();Dt();sA();nhe=ye("crypto"),Q_=tt(ye("fs"));Zl();ih();zl();bo();Qut=10,Ur=class{constructor(t,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,nhe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=t,this.immutable=o,this.check=a;let n=r.get("cacheKeyOverride");if(n!==null)this.cacheKey=`${n}`;else{let u=r.get("compressionLevel"),A=u!=="mixed"?`c${u}`:"";this.cacheKey=[Qut,A].join("")}}static async find(t,{immutable:r,check:o}={}){let a=new Ur(t.get("cacheFolder"),{configuration:t,immutable:r,check:o});return await a.setup(),a}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`${fE(t)}-${this.cacheKey}.zip`}getChecksumFilename(t,r){let a=kut(r).slice(0,10);return`${fE(t)}-${a}.zip`}getLocatorPath(t,r,o={}){return this.mirrorCwd===null||o.unstablePackages?.has(t.locatorHash)?J.resolve(this.cwd,this.getVersionFilename(t)):r===null||b_(r)!==this.cacheKey?null: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 oe.existsPromise(this.cwd))throw new Jt(56,"Cache path does not exist.")}else{await oe.mkdirPromise(this.cwd,{recursive:!0});let t=J.resolve(this.cwd,".gitignore");await oe.changeFilePromise(t,`/.gitignore
|
|||
|
*.flock
|
|||
|
*.tmp
|
|||
|
`)}(this.mirrorCwd||!this.immutable)&&await oe.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(t,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(t),p=new bn,h=()=>{let ce=new As,ge=J.join(It.root,PO(t));return ce.mkdirSync(ge,{recursive:!0}),ce.writeJsonSync(J.join(ge,Nr.manifest),{name:on(t),mocked:!0}),ce},C=async(ce,ge=null)=>{if(ge===null&&u.unstablePackages?.has(t.locatorHash))return{isValid:!0,hash:null};let Oe=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await KS(ce)}`:r;if(ge!==null){let g=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await KS(ge)}`:r;if(Oe!==g)throw new Jt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&Oe!==r){let g;switch(this.check?g="throw":b_(r)!==b_(Oe)?g="update":g=this.configuration.get("checksumBehavior"),g){case"ignore":return{isValid:!0,hash:r};case"update":return{isValid:!0,hash:Oe};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Jt(18,"The remote archive doesn't match the expected checksum")}}return{isValid:!0,hash:Oe}},w=async ce=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Or(this.configuration,t)}`);let ge=await n(),Oe=ge.getRealPath();ge.saveAndClose(),await oe.chmodPromise(Oe,420);let g=await C(ce,Oe);if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},v=async()=>{if(A===null||!await oe.existsPromise(A)){let ce=await n(),ge=ce.getRealPath();return ce.saveAndClose(),{source:"loader",path:ge}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Or(this.configuration,t)}`);if(this.immutable)throw new Jt(56,`Cache entry required but missing for ${Or(this.configuration,t)}`);let{path:ce,source:ge}=await v(),Oe=(await C(ce)).hash,g=this.getLocatorPath(t,Oe,u);if(!g)throw new Error("Assertion failed: Expected the cache path to be available");let Ie=[];ge!=="mirror"&&A!==null&&Ie.push(async()=>{let le=`${A}${this.cacheId}`;await oe.copyFilePromise(ce,le,Q_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(le,420),await oe.renamePromise(le,A)}),(!u.mirrorWriteOnly||A===null)&&Ie.push(async()=>{let le=`${g}${this.cacheId}`;await oe.copyFilePromise(ce,le,Q_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(le,420),await oe.renamePromise(le,g)});let xe=u.mirrorWriteOnly?A??g:g;return await Promise.all(Ie.map(le=>le())),[!1,xe,Oe]},E=async()=>{let ge=(async()=>{let Oe=this.getLocatorPath(t,r,u),g=Oe!==null?this.markedFiles.has(Oe)||await p.existsPromise(Oe):!1,Ie=!!u.mockedPackages?.has(t.locatorHash)&&(!this.check||!g),xe=Ie||g,le=xe?o:a;if(le&&le(),xe){let ne=null,ee=Oe;if(!Ie)if(this.check)ne=await w(ee);else{let Ee=await C(ee);if(Ee.isValid)ne=Ee.hash;else return b()}return[Ie,ee,ne]}else return b()})();this.mutexes.set(t.locatorHash,ge);try{return await ge}finally{this.mutexes.delete(t.locatorHash)}};for(let ce;ce=this.mutexes.get(t.locatorHash);)await ce;let[R,N,U]=await E();R||this.markedFiles.add(N);let z,$=R?()=>h():()=>new As(N,{baseFs:p,readOnly:!0}),ae=new cy(()=>SN(()=>z=$(),ce=>`Failed to open the cache entry for ${Or(this.configuration,t)}: ${ce}`),J),pe=new ju(N,{baseFs:ae,pathUtils:J}),de=()=>{z?.discardAndClose()},ve=u.unstablePackages?.has(t.locatorHash)?null:U;return[pe,de,ve]}}});var oQ,she=yt(()=>{oQ=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(oQ||{})});var Fut,cC,k_=yt(()=>{Dt();ql();Rf();bo();Fut=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(e,t,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>`npm:${e}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?
|
|||
|
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
|||
|
`),this.stdout.write(`${Ot(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
|||
|
`),this.suggestInstall&&this.stdout.write(`${Ot(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 GU(r,{configuration:this.configuration,json:!1})}}});var uC,F_=yt(()=>{bo();uC=class{constructor(t){this.resolver=t}supportsDescriptor(t,r){return!!(r.project.storedResolutions.get(t.descriptorHash)||r.project.originalPackages.has(zS(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,o){return t}getResolutionDependencies(t,r){return this.resolver.getResolutionDependencies(t,r)}async getCandidates(t,r,o){let a=o.project.storedResolutions.get(t.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(zS(t).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let o=r.project.originalPackages.get(t.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function zf(){}function Rut(e,t,r,o,a){for(var n=0,u=t.length,A=0,p=0;n<u;n++){var h=t[n];if(h.removed){if(h.value=e.join(o.slice(p,p+h.count)),p+=h.count,n&&t[n-1].added){var w=t[n-1];t[n-1]=t[n],t[n]=w}}else{if(!h.added&&a){var C=r.slice(A,A+h.count);C=C.map(function(b,E){var R=o[p+E];return R.length>b.length?R:b}),h.value=e.join(C)}else h.value=e.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=t[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[u-2].value+=v.value,t.pop()),t}function Tut(e){return{newPos:e.newPos,components:e.components.slice(0)}}function Lut(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 che(e,t,r){return r=Lut(r,{ignoreWhitespace:!0}),M_.diff(e,t,r)}function Nut(e,t,r){return O_.diff(e,t,r)}function aQ(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?aQ=function(t){return typeof t}:aQ=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aQ(e)}function R_(e){return Uut(e)||_ut(e)||Hut(e)||qut()}function Uut(e){if(Array.isArray(e))return T_(e)}function _ut(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Hut(e,t){if(!!e){if(typeof e=="string")return T_(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 T_(e,t)}}function T_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function qut(){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 L_(e,t,r,o,a){t=t||[],r=r||[],o&&(e=o(a,e));var n;for(n=0;n<t.length;n+=1)if(t[n]===e)return r[n];var u;if(Gut.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),r.push(u),n=0;n<e.length;n+=1)u[n]=L_(e[n],t,r,o,a);return t.pop(),r.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),aQ(e)==="object"&&e!==null){t.push(e),u={},r.push(u);var A=[],p;for(p in e)e.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=L_(e[p],t,r,o,p);t.pop(),r.pop()}else u=e;return u}function uhe(e,t,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=Nut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(z){return" "+z})}for(var h=[],C=0,w=0,v=[],b=1,E=1,R=function(z){var $=A[z],ae=$.lines||$.value.replace(/\n$/,"").split(`
|
|||
|
`);if($.lines=ae,$.added||$.removed){var pe;if(!C){var de=A[z-1];C=b,w=E,de&&(v=u.context>0?p(de.lines.slice(-u.context)):[],C-=v.length,w-=v.length)}(pe=v).push.apply(pe,R_(ae.map(function(le){return($.added?"+":"-")+le}))),$.added?E+=ae.length:b+=ae.length}else{if(C)if(ae.length<=u.context*2&&z<A.length-2){var ve;(ve=v).push.apply(ve,R_(p(ae)))}else{var ce,ge=Math.min(ae.length,u.context);(ce=v).push.apply(ce,R_(p(ae.slice(0,ge))));var Oe={oldStart:C,oldLines:b-C+ge,newStart:w,newLines:E-w+ge,lines:v};if(z>=A.length-2&&ae.length<=u.context){var g=/\n$/.test(r),Ie=/\n$/.test(o),xe=ae.length==0&&v.length>Oe.oldLines;!g&&xe&&r.length>0&&v.splice(Oe.oldLines,0,"\\ No newline at end of file"),(!g&&!xe||!Ie)&&v.push("\\ No newline at end of file")}h.push(Oe),C=0,w=0,v=[]}b+=ae.length,E+=ae.length}},N=0;N<A.length;N++)R(N);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:n,hunks:h}}var w3t,ahe,lhe,M_,O_,Mut,Out,Gut,t2,N_,U_=yt(()=>{zf.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=t.length,h=1,C=A+p;o.maxEditLength&&(C=Math.min(C,o.maxEditLength));var w=[{newPos:-1,components:[]}],v=this.extractCommon(w[0],r,t,0);if(w[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=w[R-1],z=w[R+1],$=(z?z.newPos:0)-R;U&&(w[R-1]=void 0);var ae=U&&U.newPos+1<A,pe=z&&0<=$&&$<p;if(!ae&&!pe){w[R]=void 0;continue}if(!ae||pe&&U.newPos<z.newPos?(N=Tut(z),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),$=n.extractCommon(N,r,t,R),N.newPos+1>=A&&$+1>=p)return u(Rut(n,N.components,r,t,n.useLongestToken));w[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>C)return a();b()||R()},0)})();else for(;h<=C;){var E=b();if(E)return E}},pushComponent:function(t,r,o){var a=t[t.length-1];a&&a.added===r&&a.removed===o?t[t.length-1]={count:a.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,a){for(var n=r.length,u=o.length,A=t.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&t.components.push({count:h}),t.newPos=A,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=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};w3t=new zf;ahe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,lhe=/\S/,M_=new zf;M_.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!lhe.test(e)&&!lhe.test(t)};M_.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]&&ahe.test(t[r])&&ahe.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};O_=new zf;O_.tokenize=function(e){var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?t[t.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),t.push(a))}return t};Mut=new zf;Mut.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};Out=new zf;Out.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};Gut=Object.prototype.toString,t2=new zf;t2.useLongestToken=!0;t2.tokenize=O_.tokenize;t2.castInput=function(e){var t=this.options,r=t.undefinedReplacement,o=t.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof e=="string"?e:JSON.stringify(L_(e,null,null,a),a," ")};t2.equals=function(e,t){return zf.prototype.equals.call(t2,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};N_=new zf;N_.tokenize=function(e){return e.slice()};N_
|
|||
|
`;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=t}}});function rft({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],volatileDescriptors:p=new Set}){let h=new Map,C=[],w=new Map,v=new Map,b=new Map,E=new Map,R=new Map,N=new Map(e.workspaces.map(de=>{let ve=de.anchoredLocator.locatorHash,ce=o.get(ve);if(typeof ce>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ve,Zw(ce)]})),U=()=>{let de=oe.mktempSync(),ve=J.join(de,"stacktrace.log"),ce=String(C.length+1).length,ge=C.map((Oe,g)=>`${`${g+1}.`.padStart(ce," ")} ${Fa(Oe)}
|
|||
|
`).join("");throw oe.writeFileSync(ve,ge),oe.detachTemp(de),new Jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${Ae.fromPortablePath(ve)}`)},z=de=>{let ve=r.get(de.descriptorHash);if(typeof ve>"u")throw new Error("Assertion failed: The resolution should have been registered");let ce=o.get(ve);if(!ce)throw new Error("Assertion failed: The package could not be found");return ce},$=(de,ve,ce,{top:ge,optional:Oe})=>{C.length>1e3&&U(),C.push(ve);let g=ae(de,ve,ce,{top:ge,optional:Oe});return C.pop(),g},ae=(de,ve,ce,{top:ge,optional:Oe})=>{if(a.has(ve.locatorHash))return;a.add(ve.locatorHash),Oe||n.delete(ve.locatorHash);let g=o.get(ve.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Or(e.configuration,ve)}) should have been registered`);let Ie=[],xe=[],le=[],ne=[],ee=[];for(let Qe of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Qe.identHash)&&g.locatorHash!==ge)continue;if(Qf(Qe))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");p.delete(Qe.descriptorHash);let ft=Oe;if(!ft){let Ne=g.dependenciesMeta.get(on(Qe));if(typeof Ne<"u"){let Xe=Ne.get(null);typeof Xe<"u"&&Xe.optional&&(ft=!0)}}let H=r.get(Qe.descriptorHash);if(!H)throw new Error(`Assertion failed: The resolution (${Nn(e.configuration,Qe)}) should have been registered`);let lt=N.get(H)||o.get(H);if(!lt)throw new Error(`Assertion failed: The package (${H}, resolved from ${Nn(e.configuration,Qe)}) should have been registered`);if(lt.peerDependencies.size===0){$(Qe,lt,new Map,{top:ge,optional:ft});continue}let Le,Fe,Re=new Set,Ge;xe.push(()=>{Le=vO(Qe,ve.locatorHash),Fe=DO(lt,ve.locatorHash),g.dependencies.delete(Qe.identHash),g.dependencies.set(Le.identHash,Le),r.set(Le.descriptorHash,Fe.locatorHash),t.set(Le.descriptorHash,Le),o.set(Fe.locatorHash,Fe),Ie.push([lt,Le,Fe])}),le.push(()=>{Ge=new Map;for(let Ne of Fe.peerDependencies.values()){let Xe=g.dependencies.get(Ne.identHash);if(!Xe&&t1(ve,Ne)&&(de.identHash===ve.identHash?Xe=de:(Xe=yn(ve,de.range),t.set(Xe.descriptorHash,Xe),r.set(Xe.descriptorHash,ve.locatorHash),p.delete(Xe.descriptorHash))),(!Xe||Xe.range==="missing:")&&Fe.dependencies.has(Ne.identHash)){Fe.peerDependencies.delete(Ne.identHash);continue}Xe||(Xe=yn(Ne,"missing:")),Fe.dependencies.set(Xe.identHash,Xe),Qf(Xe)&&md(b,Xe.descriptorHash).add(Fe.locatorHash),w.set(Xe.identHash,Xe),Xe.range==="missing:"&&Re.add(Xe.identHash),Ge.set(Ne.identHash,ce.get(Ne.identHash)??Fe.locatorHash)}Fe.dependencies=new Map(xs(Fe.dependencies,([Ne,Xe])=>on(Xe)))}),ne.push(()=>{if(!o.has(Fe.locatorHash))return;let Ne=h.get(lt.locatorHash);typeof Ne=="number"&&Ne>=2&&U();let Xe=h.get(lt.locatorHash),je=typeof Xe<"u"?Xe+1:1;h.set(lt.locatorHash,je),$(Le,Fe,Ge,{top:ge,optional:ft}),h.set(lt.locatorHash,je-1)}),ee.push(()=>{let Ne=g.dependencies.get(Qe.identHash);if(typeof Ne>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let Xe=r.get(Ne.descriptorHash);if(typeof Xe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(md(R,Xe).add(ve.locatorHash),!!o.has(Fe.locatorHash)){for(let je of Fe.peerDependencies.values()){let x=Ge.get(je.identHash);if(typeof x>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Vy(Xy(E,x),on(je)).push(Fe.locatorHash)}for(let je of Re)Fe.dependencies.delete(je)}})}for(let Qe of[...xe,...le])Qe();let Ee;do{Ee=!0;for(let[Qe,ft,H]of Ie){let lt=Xy(v,Qe.locatorHash),Le=bs(...[...H.dependencies.values()].map(Ne=>{let Xe=Ne.range!=="missing:"?r.get(Ne.descriptorHash):"missing:";if(typeof Xe>"u")throw new Error(`Assertion failed: Expected the resolution for ${Nn(e.configuration,Ne)} to have been registered`);return Xe===ge?`${Xe} (top)`:Xe}),ft.identHash),Fe=lt.get(Le);if(typeof Fe>"u"){lt.set(Le,ft);continue}if(Fe===ft)continue;o.delete(H.locatorHash),t.delete(ft.descriptorHash),r.delete(ft.descriptorHash),a.delete(H.locatorHash);let Re=b.get(ft.descriptorHash)||[],Ge=[g.locatorHash,...Re];b.delete(ft.descripto
|
|||
|
|
|||
|
${[w,v,b].join(`
|
|||
|
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let t=J.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(t)){let o=await oe.readFilePromise(t,"utf8");this.lockFileChecksum=Jhe(o);let a=Ki(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<Yhe;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=kf(p.resolution,!0),C=new Lt;C.load(p,{yamlCompatibilityMode:!0});let w=C.version,v=C.languageName||r,b=p.linkType.toUpperCase(),E=p.conditions??null,R=C.dependencies,N=C.peerDependencies,U=C.dependenciesMeta,z=C.peerDependenciesMeta,$=C.bin;if(p.checksum!=null){let pe=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,pe)}let ae={...h,version:w,languageName:v,linkType:b,conditions:E,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:z,bin:$};this.originalPackages.set(ae.locatorHash,ae);for(let pe of A.split(ZAt)){let de=sh(pe);n<=6&&(de=this.configuration.normalizeDependency(de),de=yn(de,de.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(de.descriptorHash,de),this.storedResolutions.set(de.descriptorHash,h.locatorHash)}}}else o.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,fQ.default)(4),o=async(a,n)=>{if(t.has(n))return a;t.add(n);let u=new fC(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(t){let r=this.workspacesByIdent.get(t.locator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${ls(this.configuration,t.locator)}: ${Ae.fromPortablePath(t.cwd)} conflicts with ${Ae.fromPortablePath(r.cwd)}`);this.workspaces.push(t),this.workspacesByCwd.set(t.cwd,t),this.workspacesByIdent.set(t.locator.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 o of this.workspaces)J.relative(o.cwd,t).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);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 (${ls(this.configuration,t)})`);return r}tryWorkspaceByDescriptor(t){if(t.range.startsWith(Wn.protocol)){let o=t.range.slice(Wn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!Ra(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(t);return r===null||(Qf(t)&&(t=$w(t)),!r.accepts(t.range))?null:r}getWorkspaceByDescriptor(t){let r=this.tryWorkspaceByDescriptor(t);if(r===null)throw new Error(`Workspace not found (${Nn(this.configuration,t)})`);return r}tryWorkspaceByLocator(t){let r=this.tryWorkspaceByIdent(t);return r===null||(Kc(t)&&(t=e1(t)),r.locator.locatorHash!==t.locatorHash&&r.anchoredLocator.locatorHash!==t.locatorHash)?null:r}getWorkspaceByLocator(t){let r=this.tryWorkspaceByLocator(t);if(!r)throw new Error(`Workspace not found (${Or(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),t
|
|||
|
`;switch(Le.type){case 0:Fe+=`# Script name: ${Le.script}
|
|||
|
`;break;case 1:Fe+=`# Script code: ${Le.script}
|
|||
|
`;break}let Re=null;if(!await oe.mktempPromise(async Ne=>{let Xe=J.join(Ne,"build.log"),{stdout:je,stderr:x}=this.configuration.getSubprocessStreams(Xe,{header:Fe,prefix:Or(this.configuration,Ee),report:r}),I;try{switch(Le.type){case 0:I=await nb(Ee,Le.script,[],{cwd:lt,project:this,stdin:Re,stdout:je,stderr:x});break;case 1:I=await jU(Ee,Le.script,[],{cwd:lt,project:this,stdin:Re,stdout:je,stderr:x});break}}catch(F){x.write(F.stack),I=1}if(je.end(),x.end(),I===0)return!0;oe.detachTemp(Ne);let S=`${Or(this.configuration,Ee)} couldn't be built successfully (exit code ${Ot(this.configuration,I,mt.NUMBER)}, logs can be found here: ${Ot(this.configuration,Xe,mt.PATH)})`,y=this.optionalBuilds.has(Ee.locatorHash);return y?r.reportInfo(9,S):r.reportError(9,S),Wue&&r.reportFold(Ae.fromPortablePath(Xe),oe.readFileSync(Xe,"utf8")),y}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(lt=>{pe.delete(ee),lt.every(Le=>Le.status==="fulfilled"&&Le.value===!0)&&g.set(Ee.locatorHash,ft)}))}if(await jc(ne),le===pe.size){let ee=Array.from(pe).map(Ee=>{let Qe=this.storedPackages.get(Ee);if(!Qe)throw new Error("Assertion failed: The package should have been registered");return Or(this.configuration,Qe)}).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: ${ee})`);break}}this.storedBuildState=g,this.skippedBuilds=N}async installWithNewReport(t,r){return(await Rt.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 o=!1;if(await t.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(h=>h.validateProject,this,{reportWarning:(h,C)=>{t.report.reportWarning(h,C)},reportError:(h,C)=>{t.report.reportError(h,C),o=!0}})}),o)return;for(let h of this.configuration.packageExtensions.values())for(let[,C]of h)for(let w of C)w.status="inactive";let a=J.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(t.immutable)try{n=await oe.readFilePromise(a,"utf8")}catch(h){throw h.code==="ENOENT"?new Jt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):h}await t.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(t)}),await t.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{nft(this,t.report);for(let[,h]of this.configuration.packageExtensions)for(let[,C]of h)for(let w of C)if(w.userProvided){let v=Ot(this.configuration,w,mt.PACKAGE_EXTENSION);switch(w.status){case"inactive":t.report.reportWarning(68,`${v}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":t.report.reportWarning(69,`${v}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let h=Og(n,this.generateLockfile());if(h!==n){let C=uhe(a,a,n,h,void 0,void 0,{maxEditLength:100});if(C){t.report.reportSeparator();for(let w of C.hunks){t.report.reportInfo(null,`@@ -${w.oldStart},${w.oldLines} +${w.newStart},${w.newLines} @@`);for(let v of w.lines)v.startsWith("+")?t.report.reportError(28,Ot(this.configuration,v,mt.ADDED)):v.startsWith("-")?t.report.reportError(28,Ot(this.configuration,v,mt.REMOVED)):t.report.reportInfo(null,Ot(this.configuration,v,"grey"))}t.report.reportSeparator()}throw new Jt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let h of this.configuration.packageExtensions.values())for(let[,C]of h)for(let w of C)w.userProvided&&w.status==="active"&&Je.telemetry?.reportPackageExtension(Ed(w,mt.PACKAGE_EXTENSION));await t.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(t)});let u=t.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sor
|
|||
|
`,`# Manual changes might be lost - proceed with caution!
|
|||
|
`].join("")}
|
|||
|
`+Pa(r)}async persistLockfile(){let t=J.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await oe.readFilePromise(t,"utf8")}catch{}let o=this.generateLockfile(),a=Og(r,o);a!==r&&(await oe.writeFilePromise(t,a),this.lockFileChecksum=Jhe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let t=[];for(let u of Object.values(J_))t.push(...u);let r=(0,AQ.default)(this,t),o=z_.default.serialize(r),a=bs(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await oe.mkdirPromise(J.dirname(n),{recursive:!0}),await oe.writeFilePromise(n,await eft(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:t=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await tft(await oe.readFilePromise(a));n=z_.default.deserialize(u),this.installStateChecksum=bs(u)}catch{r&&await this.applyLightResolution();return}t&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,AQ.default)(n,J_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,AQ.default)(n,J_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let t=(0,fQ.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 o=new Set([".gitignore"]);if(!GO(t.cwd,this.cwd)||!await oe.existsPromise(t.cwd))return null;let a=[];for(let u of await oe.readdirPromise(t.cwd)){if(o.has(u))continue;let A=J.resolve(t.cwd,u);t.markedFiles.has(A)||(t.immutable?r.reportError(56,`${Ot(this.configuration,J.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(oe.lstatPromise(A).then(async p=>(await oe.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function ift(e){let o=Math.floor(e.timeNow/864e5),a=e.updateInterval*864e5,n=e.state.lastUpdate??e.timeNow+a+Math.floor(a*e.randomInitialInterval),u=n+a,A=e.state.lastMotd??o*864e5,p=A+864e5+8*36e5-e.timeZone,h=u<=e.timeNow,C=p<=e.timeNow,w=null;return(h||C||!e.state.lastUpdate||!e.state.lastMotd)&&(w={},w.lastUpdate=h?e.timeNow:n,w.lastMotd=A,w.blocks=h?{}:e.state.blocks,w.displayedMotd=e.state.displayedMotd),{nextState:w,triggerUpdate:h,triggerMotd:C,nextMotd:C?o*864e5:A}}var pC,Xhe=yt(()=>{Dt();L1();ih();Rx();zl();Rf();pC=class{constructor(t,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextMotd=0;this.displayedMotd=[];this.shouldCommitMotd=!1;this.configuration=t;let o=this.getRegistryPath();this.isNew=!oe.existsSync(o),this.isMotd=!1,this.sendReport(r),this.startBuffer()}commitMotd(){this.isMotd&&(this.shouldCommitMotd=!0)}selectMotd(t){let r=new Set(this.displayedMotd),o=A=>A&&An?Ff(An,A):!1,a=t.map((A,p)=>p).filter(A=>t[A]&&o(t[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedMotd=A>0?this.displayedMotd.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedMotd.push(u),this.commitMotd(),t[u]}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){md(this.values,t).add(r)}reportEnumerator(t,r){md(this.enumerators,t).add(bs(r))}reportHit(t,r="*"){let o=Xy(this.
|
|||
|
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(e.styles[u[h]],A,p);return A},a=(n,u,A)=>{e.styles[n]=t({name:n,codes:u}),(e.keys[A]||(e.keys[A]=[])).push(n),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(h){e.alias(n,h)},get(){let h=C=>o(C,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=uft,e.hasColor=e.hasAnsi=n=>(e.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&e.ansiRegex.test(n)),e.alias=(n,u)=>{let A=typeof u=="string"?e[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),e.styles[n]=A,A.stack=[n]),Reflect.defineProperty(e,n,{configurable:!0,enumerable:!0,set(p){e.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,e),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},e.theme=n=>{if(!cft(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))e.alias(u,n[u]);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=n0e(),e.define=a,e};t8.exports=i0e();t8.exports.create=i0e});var No=_(Zr=>{"use strict";var Aft=Object.prototype.toString,cc=eu(),s0e=!1,r8=[],o0e={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};Zr.longest=(e,t)=>e.reduce((r,o)=>Math.max(r,t?o[t].length:o.length),0);Zr.hasColor=e=>!!e&&cc.hasColor(e);var gQ=Zr.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Zr.nativeType=e=>Aft.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"");Zr.isAsyncFn=e=>Zr.nativeType(e)==="asyncfunction";Zr.isPrimitive=e=>e!=null&&typeof e!="object"&&typeof e!="function";Zr.resolve=(e,t,...r)=>typeof t=="function"?t.call(e,...r):t;Zr.scrollDown=(e=[])=>[...e.slice(1),e[0]];Zr.scrollUp=(e=[])=>[e.pop(),...e];Zr.reorder=(e=[])=>{let t=e.slice();return t.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),t};Zr.swap=(e,t,r)=>{let o=e.length,a=r===o?0:r<0?o-1:r,n=e[t];e[t]=e[a],e[a]=n};Zr.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};Zr.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&typeof e.getWindowSize=="function"&&(r=e.getWindowSize()[1]),r};Zr.wordWrap=(e,t={})=>{if(!e)return e;typeof t=="number"&&(t={width:t});let{indent:r="",newline:o=`
|
|||
|
`+r,width:a=80}=t,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=e.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(C=>C.replace(/\n$/,"")),t.padEnd&&(h=h.map(C=>C.padEnd(a," "))),t.padStart&&(h=h.map(C=>C.padStart(a," "))),r+h.join(o)};Zr.unmute=e=>{let t=e.stack.find(o=>cc.keys.color.includes(o));return t?cc[t]:e.stack.find(o=>o.slice(2)==="bg")?cc[t.slice(2)]:o=>o};Zr.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"";Zr.inverse=e=>{if(!e||!e.stack)return e;let t=e.stack.find(o=>cc.keys.color.includes(o));if(t){let o=cc["bg"+Zr.pascal(t)];return o?o.black:e}let r=e.stack.find(o=>o.slice(0,2)==="bg");return r?cc[r.slice(2).toLowerCase()]||e:cc.none};Zr.complement=e=>{if(!e||!e.stack)return e;let t=e.stack.find(o=>cc.keys.color.includes(o)),r=e.stack.find(o=>o.slice(0,2)==="bg");if(t&&!r)return cc[o0e[t]||t];if(r){let o=r.slice(2).toLowerCase(),a=o0e[o];return a&&cc["bg"+Zr.pascal(a)]||e}return cc.none};Zr.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),o=t>=12?"pm":"am";t=t%12;let a=t===0?12:t,n=r<10?"0"+r:r;return a+":"+n+" "+o};Zr.set=(e={},t="",r)=>t.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!Zr.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},e);Zr.get=(e={},t="",r)=>{let o=e[t]==null?t.split(".").reduce((a,n)=>a&&a[n],e):e[t];return o??r};Zr.mixin=(e,t)=>{if(!gQ(e))return t;if(!gQ(t))return e;for(let r of Object.keys(t)){let o=Object.getOwnPropertyDescriptor(t,r);if(o.hasOwnProperty("value"))if(e.hasOwnProperty(r)&&gQ(o.value)){let a=Object.getOwnPropertyDescriptor(e,r);gQ(a.value)?e[r]=Zr.merge({},e[r],t[r]):Reflect.defineProperty(e,r,o)}else Reflect.defineProperty(e,r,o);else Reflect.defineProperty(e,r,o)}return e};Zr.merge=(...e)=>{let t={};for(let r of e)Zr.mixin(t,r);return t};Zr.mixinEmitter=(e,t)=>{let r=t.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?Zr.define(e,o,a.bind(t)):Zr.define(e,o,a)}};Zr.onExit=e=>{let t=(r,o)=>{s0e||(s0e=!0,r8.forEach(a=>a()),r===!0&&process.exit(128+o))};r8.length===0&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),r8.push(e)};Zr.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})};Zr.defineExport=(e,t,r)=>{let o;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var a0e=_(dC=>{"use strict";dC.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"};dC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};dC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};dC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};dC.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 u0e=_((w8t,c0e)=>{"use strict";var l0e=ye("readline"),fft=a0e(),pft=/^(?:\x1b)([a-zA-Z0-9])$/,hft=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,gft={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","
|
|||
|
`)o.name="enter";else if(e===" ")o.name="tab";else if(e==="\b"||e==="\x7F"||e==="\x1B\x7F"||e==="\x1B\b")o.name="backspace",o.meta=e.charAt(0)==="\x1B";else if(e==="\x1B"||e==="\x1B\x1B")o.name="escape",o.meta=e.length===2;else if(e===" "||e==="\x1B ")o.name="space",o.meta=e.length===2;else if(e<="")o.name=String.fromCharCode(e.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(e.length===1&&e>="0"&&e<="9")o.name="number";else if(e.length===1&&e>="a"&&e<="z")o.name=e;else if(e.length===1&&e>="A"&&e<="Z")o.name=e.toLowerCase(),o.shift=!0;else if(r=pft.exec(e))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=hft.exec(e)){let a=[...e];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=gft[n],o.shift=dft(n)||o.shift,o.ctrl=mft(n)||o.ctrl}return o};dQ.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=l0e.createInterface({terminal:!0,input:r});l0e.emitKeypressEvents(r,o);let a=(A,p)=>t(A,dQ(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};dQ.action=(e,t,r)=>{let o={...fft,...r};return t.ctrl?(t.action=o.ctrl[t.name],t):t.option&&o.option?(t.action=o.option[t.name],t):t.shift?(t.action=o.shift[t.name],t):(t.action=o.keys[t.name],t)};c0e.exports=dQ});var f0e=_((B8t,A0e)=>{"use strict";A0e.exports=e=>{e.timers=e.timers||{};let t=e.options.timers;if(!!t)for(let r of Object.keys(t)){let o=t[r];typeof o=="number"&&(o={interval:o}),yft(e,r,o)}};function yft(e,t,r={}){let o=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,e.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),e.once("close",()=>o.stop()),o.stop}});var h0e=_((v8t,p0e)=>{"use strict";var{define:Eft,width:Cft}=No(),n8=class{constructor(t){let r=t.options;Eft(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=Cft(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"}};p0e.exports=n8});var d0e=_((D8t,g0e)=>{"use strict";var i8=No(),$s=eu(),s8={default:$s.noop,noop:$s.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||i8.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||i8.complement(this.primary)},primary:$s.cyan,success:$s.green,danger:$s.magenta,strong:$s.bold,warning:$s.yellow,muted:$s.dim,disabled:$s.gray,dark:$s.dim.gray,underline:$s.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 typin
|
|||
|
`),h=p[0],C=p[p.length-1],v=(o+(r?" "+r:"")).length,b=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:C}}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(zd.cursor.down(t.rest.length)),this.write(`
|
|||
|
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=A8.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:o}=this;if(this.format=()=>t.call(this,this.value),this.result=()=>o.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,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[t];n.timer=p;let h=a[t]||n[t]||u[t],C=r&&r[t]!=null?r[t]:await h;if(C==="")return C;let w=await this.resolve(C,n,r,o);return!w&&r&&r[t]?this.resolve(h,n,r,o):w}async prefix(){let t=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Ma.isObject(t)&&(t=t[o.status]||t.pending),Ma.hasColor(t)?t:(this.styles[o.status]||this.styles.pending)(t)}async message(){let t=await this.element("message");return Ma.hasColor(t)?t:this.styles.strong(t)}async separator(){let t=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=t[o.status]||t.pending||o.separator,n=await this.resolve(a,o);return Ma.isObject(n)&&(n=n[o.status]||n.pending),Ma.hasColor(n)?n:this.styles.muted(n)}async pointer(t,r){let o=await this.element("pointer",t,r);if(typeof o=="string"&&Ma.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Ma.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(t,r){let o=await this.element("indicator",t,r);if(typeof o=="string"&&Ma.hasColor(o))return o;if(o){let a=this.styles,n=t.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Ma.hasColor(A)?A:u(A)}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 Ma.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 Ma.resolve(this,t,...r)}get base(){return s2.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Ma.height(this.stdout,25)}get width(){return this.options.columns||Ma.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,o=[r,t].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return t=>new this(t).run()}};function Qft(e){let t=a=>e[a]===void 0||typeof e[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["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)?o.includes(a)||(e[a]=n.bind(e)):typeof e[a]!="function"&&(e[a]=n)}}function kft(e){t
|
|||
|
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);t[a]?o.push(n.repeat(t[a])):o.push("")}return o}S0e.exports=s2});var Q0e=_((b8t,b0e)=>{"use strict";var Fft=No(),x0e={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 x0e.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}};b0e.exports=(e,t={})=>{let r=Fft.merge({},x0e,t.roles);return r[e]||r.default}});var o2=_((Q8t,R0e)=>{"use strict";var Rft=eu(),Tft=mC(),Lft=Q0e(),mQ=No(),{reorder:f8,scrollUp:Nft,scrollDown:Mft,isObject:k0e,swap:Oft}=mQ,p8=class extends Tft{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:o,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");k0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),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 o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(t,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(t,r,o){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=Lft(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,mQ.define(t,"parent",o),t.level=o?o.level+1:1,t.indent==null&&(t.indent=o?o.indent+" ":t.indent||""),t.path=o?o.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,Rft.unstyle(t.message).length));let u={...t};return t.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))t[h]=u[h];t.input=A,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,o){let a=await this.toChoice(t,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(t,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...t},n=await this.addChoice(a,r,o);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(thi
|
|||
|
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].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,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),t&&!p&&!C.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,C,w].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};T0e.exports=g8});var N0e=_((F8t,L0e)=>{"use strict";var _ft=xh(),Hft=(e,t)=>{let r=e.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=t(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},d8=class extends _ft{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:o}=this.state;return this.input=o.slice(0,r)+t+o.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 o=t.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}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=Hft(this.input,t),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(t=>t.name)),super.submit()}};L0e.exports=d8});var y8=_((R8t,M0e)=>{"use strict";var m8=No();M0e.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=t,A=u||e.styles.placeholder,p=m8.inverse(e.styles.primary),h=R=>p(e.styles.black(R)),C=r,w=" ",v=h(w);if(e.blink&&e.blink.off===!0&&(h=R=>R,v=""),n&&a===0&&o===""&&r==="")return h(w);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=m8.isPrimitive(o)?`${o}`:"",r=m8.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,E=b?h(o[r.length]):v;if(a!==r.length&&n===!0&&(C=r.slice(0,a)+h(r[a])+r.slice(a+1),E=""),n===!1&&(E=""),b){let R=e.styles.unstyle(C+E);return C+E+A(o.slice(R.length))}return C+E}});var yQ=_((T8t,O0e)=>{"use strict";var qft=eu(),Gft=xh(),jft=y8(),E8=class extends Gft{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:o,input:a}=r;return r.value=r.input=a.slice(0,o)+t+a.slice(o),r.cursor++,this.render()}delete(){let t=this.focused;if(!t||t.cursor<=0)return this.alert();let{cursor:r,input:o}=t;return t.value=t.input=o.slice(0,r-1)+o.slice(r),t.cursor--,this.render()}deleteForward(){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:o}=t;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.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:o}=t;return r&&r.startsWith(o)&&o!
|
|||
|
`)),this.restore()}set value(t){super.value=t}get value(){return this.cast(super.value)}};j0e.exports=I8});var Y0e=_((O8t,W0e)=>{"use strict";var Zft=EQ(),w8=class extends Zft{constructor(t){super(t),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};W0e.exports=w8});var J0e=_((U8t,K0e)=>{"use strict";var $ft=xh(),ept=yQ(),yC=ept.prototype,B8=class extends $ft{constructor(t){super({...t,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(t,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(t==="a"||t==="i")?super[t]():yC.dispatch.call(this,t,r)}append(t,r){return yC.append.call(this,t,r)}delete(t,r){return yC.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?yC.next.call(this):super.next()}prev(){return this.focused.editable?yC.prev.call(this):super.prev()}async indicator(t,r){let o=t.indicator||"",a=t.editable?o: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?yC.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 o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),t=await r.validate(o,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)}};K0e.exports=B8});var Vd=_((_8t,z0e)=>{"use strict";var tpt=mC(),rpt=y8(),{isPrimitive:npt}=No(),v8=class extends tpt{constructor(t){super(t),this.initial=npt(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(t,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.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:o}=this.state;this.input=`${o}`.slice(0,r)+t+`${o}`.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),o=this.input.slice(t),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,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):rpt(this,{input:t,initial:r,pos:this.cursor})}async render(){let t=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(t),this.write([u,n,h].filter(Boolean).join(`
|
|||
|
`)),this.restore()}};z0e.exports=v8});var X0e=_((H8t,V0e)=>{"use strict";var ipt=e=>e.filter((t,r)=>e.lastIndexOf(t)===r),CQ=e=>ipt(e).filter(Boolean);V0e.exports=(e,t={},r="")=>{let{past:o=[],present:a=""}=t,n,u;switch(e){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:CQ([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:CQ([...n,r]),present:u};case"save":return{past:CQ([...o,r]),present:""};case"remove":return u=CQ(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${e}"`)}}});var P8=_((q8t,$0e)=>{"use strict";var spt=Vd(),Z0e=X0e(),D8=class extends spt{constructor(t){super(t);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(t){return this.store?(this.data=Z0e(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=Z0e("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};$0e.exports=D8});var tge=_((G8t,ege)=>{"use strict";var opt=Vd(),S8=class extends opt{format(){return""}};ege.exports=S8});var nge=_((j8t,rge)=>{"use strict";var apt=Vd(),x8=class extends apt{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()}};rge.exports=x8});var sge=_((W8t,ige)=>{"use strict";var lpt=xh(),b8=class extends lpt{constructor(t){super({...t,multiple:!0})}};ige.exports=b8});var k8=_((Y8t,oge)=>{"use strict";var cpt=Vd(),Q8=class extends cpt{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,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(t){let r=t||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-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()}};oge.exports=Q8});var lge=_((K8t,age)=>{age.exports=k8()});var uge=_((J8t,cge)=>{"use strict";var upt=Vd(),F8=class extends upt{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)):""}};cge.exports=F8});var pge=_((z8t,fge)=>{"use strict";v
|
|||
|
`;let r=t.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,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 o=0;o<this.scale.length;o++)r.scale.push({index:o})}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,o){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(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
|
|||
|
`)}renderScaleHeading(t){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,t));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(t,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,t,r,o);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 o=t.scale.map(n=>this.scaleIndicator(t,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(t,r){await this.onChoice(t,r);let o=this.index===r,a=await this.pointer(t,r),n=await t.hint;n&&!Age.hasColor(n)&&(n=this.styles.muted(n));let u=E=>this.margin[3]+E.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(t),h=await this.resolve(t.message,this.state,t,r),C=await this.renderScale(t,r),w=this.margin[1]+this.margin[3];this.scaleLength=Apt.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let b=Age.wordWrap(h,{width:this.widths[0],newline:A}).split(`
|
|||
|
`).map(E=>u(E)+this.margin[1]);return o&&(C=this.styles.info(C),b=b.map(E=>this.styles.info(E))),b[0]+=C,this.linebreak&&b.push(""),[p+a,b.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),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
|
|||
|
`)}async render(){let{submitted:t,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),C=await this.error()||await this.hint(),w=await this.renderChoices(),v=await this.footer(),b=this.emptyError;p&&(u+=p),C&&!u.includes(C)&&(u+=" "+C),t&&!p&&!w.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,w,v].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)}};fge.exports=R8});var dge=_((V8t,gge)=>{"use strict";var hge=eu(),ppt=(e="")=>typeof e=="string"?e.replace(/^['"]|['"]$/g,""):"",L8=class{constructor(t){this.name=t.key,this.field=t.field||{},this.value=ppt(t.initial||this.field.initial||""),this.message=t.message||this.name,this.cursor=0,this.input="",this.lines=[]}},hpt=async(e={},t={},r=o=>o)=>{let o=new Set,a=e.fields||[],n=e.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let C=-1,w=()=>n[++C],v=()=>n[C+1],b=E=>{E.line=h,u.push(E)};for(b({type:"bos",value:""});C<n.length-1;){let E=w();if(/^[^\S\n ]$/.test(E)){b({type:"text",value:E});continue}if(E===`
|
|||
|
`){b({type:"newline",value:E}),h++;continue}if(E==="\\"){E+=w(),b({type:"text",value:E});continue}if((E==="$"||E==="#"||E==="{")&&v()==="{"){let N=w();E+=N;let U={type:"template",open:E,inner:"",close:"",value:E},z;for(;z=w();){if(z==="}"){v()==="}"&&(z+=w()),U.value+=z,U.close=z;break}z===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=z),U.value+=z,U.inner+=z}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),b(U),p.push(U.key),o.add(U.key);let $=A.find(ae=>ae.name===U.key);U.field=a.find(ae=>ae.name===U.key),$||($=new L8(U),A.push($)),$.lines.push(U.line-1);continue}let R=u[u.length-1];R.type==="text"&&R.line===h?R.value+=E:b({type:"text",value:E})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};gge.exports=async e=>{let t=e.options,r=new Set(t.required===!0?[]:t.required||[]),o={...t.values,...t.initial},{tabstops:a,items:n,keys:u}=await hpt(t,o),A=T8("result",e,t),p=T8("format",e,t),h=T8("validate",e,t,!0),C=e.isValue.bind(e);return async(w={},v=!1)=>{let b=0;w.required=r,w.items=n,w.keys=u,w.output="";let E=async(z,$,ae,pe)=>{let de=await h(z,$,ae,pe);return de===!1?"Invalid field "+ae.name:de};for(let z of a){let $=z.value,ae=z.key;if(z.type!=="template"){$&&(w.output+=$);continue}if(z.type==="template"){let pe=n.find(Oe=>Oe.name===ae);t.required===!0&&w.required.add(pe.name);let de=[pe.input,w.values[pe.value],pe.value,$].find(C),ce=(pe.field||{}).message||z.inner;if(v){let Oe=await E(w.values[ae],w,pe,b);if(Oe&&typeof Oe=="string"||Oe===!1){w.invalid.set(ae,Oe);continue}w.invalid.delete(ae);let g=await A(w.values[ae],w,pe,b);w.output+=hge.unstyle(g);continue}pe.placeholder=!1;let ge=$;$=await p($,w,pe,b),de!==$?(w.values[ae]=de,$=e.styles.typing(de),w.missing.delete(ce)):(w.values[ae]=void 0,de=`<${ce}>`,$=e.styles.primary(de),pe.placeholder=!0,w.required.has(ae)&&w.missing.add(ce)),w.missing.has(ce)&&w.validating&&($=e.styles.warning(de)),w.invalid.has(ae)&&w.validating&&($=e.styles.danger(de)),b===w.index&&(ge!==$?$=e.styles.underline($):$=e.styles.heading(hge.unstyle($))),b++}$&&(w.output+=$)}let R=w.output.split(`
|
|||
|
`).map(z=>" "+z),N=n.length,U=0;for(let z of n)w.invalid.has(z.name)&&z.lines.forEach($=>{R[$][0]===" "&&(R[$]=w.styles.danger(w.symbols.bullet)+R[$].slice(1))}),e.isValue(w.values[z.name])&&U++;return w.completed=(U/N*100).toFixed(0),w.output=R.join(`
|
|||
|
`),w.output}};function T8(e,t,r,o){return(a,n,u,A)=>typeof u.field[e]=="function"?u.field[e].call(t,a,n,u,A):[o,a].find(p=>t.isValue(p))}});var yge=_((X8t,mge)=>{"use strict";var gpt=eu(),dpt=dge(),mpt=mC(),N8=class extends mpt{constructor(t){super(t),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await dpt(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 o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.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),o=t.input.slice(0,this.cursor-1);this.input=t.input=`${o}${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:o,size:a}=this.state,n=[this.options.newline,`
|
|||
|
`].find(z=>z!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let C=await this.header(),w=await this.error()||"",v=await this.hint()||"",b=o?"":await this.interpolate(this.state),E=this.state.key=r[t]||"",R=await this.format(E),N=await this.footer();R&&(h+=" "+R),v&&!R&&this.state.completed===0&&(h+=" "+v),this.clear(a);let U=[C,h,b,N,w.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(t){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[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:o,values:a}=this.state;if(t.size){let A="";for(let[p,h]of t)A+=`Invalid ${p}: ${h}
|
|||
|
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=gpt.unstyle(o).split(`
|
|||
|
`).map(A=>A.slice(1)).join(`
|
|||
|
`);return this.value={values:a,result:u},super.submit()}};mge.exports=N8});var Cge=_((Z8t,Ege)=>{"use strict";var ypt="(Use <shift>+<up/down> to sort)",Ept=xh(),M8=class extends Ept{constructor(t){super({...t,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,ypt].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(t,r){let o=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} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(t=>t.value),super.submit()}};Ege.exports=M8});var wge=_(($8t,Ige)=>{"use strict";var Cpt=o2(),O8=class extends Cpt{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(o=>this.styles.muted(o)),this.state.header=r.join(`
|
|||
|
`)}}async toChoices(...t){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...t);for(let o of r)o.scale=Ipt(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let t=this.focused,r=t.scale[t.scaleIdx],o=r.selected;return t.scale.forEach(a=>a.selected=!1),r.selected=!o,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 o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=$=>($?this.styles.success("\u25C9"):"\u25EF")+u,C=r+1+".",w=o?this.styles.heading:this.styles.noop,v=await this.resolve(t.message,this.state,t,r),b=this.indent(t),E=b+t.scale.map(($,ae)=>h(ae===t.scaleIdx)).join(A),R=$=>$===t.scaleIdx?w($):$,N=b+t.scale.map(($,ae)=>R(ae)).join(p),U=()=>[C,v].filter(Boolean).join(" "),z=()=>[U(),E,N," "].filter(Boolean).join(`
|
|||
|
`);return o&&(E=this.styles.cyan(E),N=this.styles.cyan(N)),z()}async renderChoices(){if(this.state.submitted)return"";let t=this.visible.map(async(o,a)=>await this.renderChoice(o,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,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),t&&!p&&!C&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,C,w].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 Ipt(e,t={}){if(Array.isArray(t.scale))return t.scale.map(o=>({...o}));let r=[];for(let o=1;o<e+1;o++)r.push({i:o,selected:!1});return r}Ige.exports=O8});var vge=_((eHt,Bge)=>{Bge.exports=P8()});var Pge=_((tHt,Dge)=>{"use strict";var wpt=EQ(),U8=class extends wpt{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=o=>this.styles.primary.underline(o);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(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(t),this.write([r,h,p].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};Dge.exports=U8});var xge=_((rHt,Sge)=>{"use strict";var Bpt=xh(),_8=class extends Bpt{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 o=await super.toChoices(t,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}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)}}};Sge.exports=_8});var Qge=_(H8=>{"use strict";var bge=No(),ps=(e,t)=>{bge.defineExport(H8,e,t),bge.defineExport(H8,e.toLowerCase(),t)};ps("AutoComplete",()=>N0e());ps("BasicAuth",()=>G0e());ps("Confirm",()=>Y0e());ps("Editable",()=>J0e());ps("Form",()=>yQ());ps("Input",()=>P8());ps("Invisible",()=>tge());ps("List",()=>nge());ps("MultiSelect",()=>sge());ps("Numeral",()=>lge());ps("Password",()=>uge());ps("Scale",()=>pge());ps("Select",()=>xh());ps("Snippet",()=>yge());ps("Sort",()=>Cge());ps("Survey",()=>wge());ps("Text",()=>vge());ps("Toggle",()=>Pge());ps("Quiz",()=>xge())});var Fge=_((iHt,kge)=>{kge.exports={ArrayPrompt:o2(),AuthPrompt:C8(),BooleanPrompt:EQ(),NumberPrompt:k8(),StringPrompt:Vd()}});var l2=_((sHt,Tge)=>{"use strict";var Rge=ye("assert"),G8=ye("events"),bh=No(),ru=class extends G8{constructor(t,r){super(),this.options=bh.merge({},t),this.answers={...r}}register(t,r){if(bh.isObject(t)){for(let a of Object.keys(t))this.register(a,t[a]);return this}Rge.equal(typeof r,"function","expected a function");let o=t.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=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(bh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(t){typeof t=="function"&&(t=await t.call(this));let r=bh.merge({},this.options,t),{type:o,name:a}=t,{set:n,get:u}=bh;if(typeof o=="function"&&(o=await o.call(this,t,this.answers)),!o)return this.answers[a];Rge(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",C=>{this.emit("answer",a,C,A),n(this.answers,a,C)});let h=A.emit.bind(A);return A.emit=(...C)=>(this.emit.call(this,...C),h(...C)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.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||mC()}static get prompts(){return Qge()}static get types(){return Fge()}static get prompt(){let t=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(t.emit(...u),n(...u)),a.prompt(r)};return bh.mixinEmitter(t,new G8),t}};bh.mixinEmitter(ru,new G8);var q8=ru.prompts;for(let e of Object.keys(q8)){let t=e.toLowerCase(),r=o=>new q8[e](o).run();ru.prompt[t]=r,ru[t]=r,ru[e]||Reflect.defineProperty(ru,e,{get:()=>q8[e]})}var a2=e=>{bh.defineExport(ru,e,()=>ru.types[e])};a2("ArrayPrompt");a2("AuthPrompt");a2("BooleanPrompt");a2("NumberPrompt");a2("StringPrompt");Tge.exports=ru});var f2=_((HHt,Hge)=>{var bpt=lQ();function Qpt(e,t,r){var o=e==null?void 0:bpt(e,t);return o===void 0?r:o}Hge.exports=Qpt});var jge=_((KHt,Gge)=>{function kpt(e,t){for(var r=-1,o=e==null?0:e.length;++r<o&&t(e[r],r,e)!==!1;);return e}Gge.exports=kpt});var Yge=_((JHt,Wge)=>{var Fpt=dd(),Rpt=tS();function Tpt(e,t){return e&&Fpt(t,Rpt(t),e)}Wge.exports=Tpt});var Jge=_((zHt,Kge)=>{var Lpt=dd(),Npt=zy();function Mpt(e,t){return e&&Lpt(t,Npt(t),e)}Kge.exports=Mpt});var
|
|||
|
${U} at ${z}`:`
|
|||
|
${U}`}).join("");p.push({text:`Conflict detected in constraint targeting ${me.pretty(e.configuration,v,me.Type.CODE)}; conflicting values are:${E}`,fixable:!1})}else{let[[E]]=b,R=(0,Ome.default)(w,v);if(R===E)continue;if(!o){let N=typeof R>"u"?`Missing field ${me.pretty(e.configuration,v,me.Type.CODE)}; expected ${me.pretty(e.configuration,E,me.Type.INSPECT)}`:typeof E>"u"?`Extraneous field ${me.pretty(e.configuration,v,me.Type.CODE)} currently set to ${me.pretty(e.configuration,R,me.Type.INSPECT)}`:`Invalid field ${me.pretty(e.configuration,v,me.Type.CODE)}; expected ${me.pretty(e.configuration,E,me.Type.INSPECT)}, found ${me.pretty(e.configuration,R,me.Type.INSPECT)}`;p.push({text:N,fixable:!0});continue}typeof E>"u"?(0,Hme.default)(w,v):(0,Ume.default)(w,v,E),h=!0}h&&a.set(C,w)}p.length>0&&n.set(C,p)}return{changedWorkspaces:a,remainingErrors:n}}function qme(e,{configuration:t}){let r={children:[]};for(let[o,a]of e){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${me.pretty(t,"\u2699","gray")} ${p[0]}`),n.push({value:me.tuple(me.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:me.tuple(me.Type.NO_HINT,h)}))})}let u={value:me.tuple(me.Type.LOCATOR,o.anchoredLocator),children:He.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=He.sortMap(r.children,o=>o.value[1]),r}var Ome,Ume,_me,Hme,C2,cdt,udt,Adt,w2=yt(()=>{Ke();Ome=tt(f2()),Ume=tt($8()),_me=tt(Mme()),Hme=tt(rH()),C2=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 o=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(typeof o>"u")continue;He.getArrayWithDefault(this.indexes[r],o).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 o=[],a;for(let[u,A]of r){let p=u,h=Object.prototype.hasOwnProperty.call(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let C=new Set(h.get(A)??[]);if(C.size===0)return[];if(typeof a>"u")a=C;else for(let w of a)C.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.prototype.hasOwnProperty.call(u,A)&&u[A]===p:Object.prototype.hasOwnProperty.call(u,A)===!1))return!1;return!0})),n}},cdt=/^[0-9]+$/,udt=/^[a-zA-Z0-9_]+$/,Adt=new Set(["scripts",...Lt.allDependencies])});var Gme=_((C7t,xH)=>{var hdt;(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
|
|||
|
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),On.unlinkSync(h),On.unlinkSync(C),On.unlinkSync(w),On.unlinkSync(v),u}function ydt(e){var t,r={},o,a={env:process.env,encoding:e.encoding};if(l0||(nm?process.env.PSModulePath?(l0="powershell.exe",SQ=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(l0="cscript.exe",SQ=["//nologo",__dirname+"\\read.cs.js"]):(l0="/bin/sh",SQ=[__dirname+"/read.sh"])),nm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),kH.execFileSync){t=Jme(e),B2&&B2("execFileSync",t);try{r.input=kH.execFileSync(l0,t,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Yme+(o?`
|
|||
|
`+o:"")),r.error.method="execFileSync",r.error.program=l0,r.error.args=t,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=mdt(e,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),e.display=""),r}function TH(e){var t="",r=e.display,o=!e.display&&e.keyIn&&e.hideEchoBack&&!e.mask;function a(){var n=ydt(e);if(n.error)throw n.error;return n.input}return RH&&RH(e),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Zf=="string")if(Zf=null,nm){if(A=function(h){var C=h.replace(/^\D+/,"").split("."),w=0;return(C[0]=+C[0])&&(w+=C[0]*1e4),(C[1]=+C[1])&&(w+=C[1]*100),(C[2]=+C[2])&&(w+=C[2]),w}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Zf=process.stdin.fd,BC=process.stdin._handle;else try{Zf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),BC=new jme(Zf,!0)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else{try{iu=On.openSync("\\\\.\\CON","w")}catch{}if(typeof iu!="number")try{iu=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Zf=On.openSync("/dev/tty","r"),BC=process.stdin._handle}catch{}}else try{Zf=On.openSync("/dev/tty","r"),BC=new jme(Zf,!1)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else try{iu=On.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!e.hideEchoBack&&!e.keyIn,p,h,C,w,v;xQ="";function b(E){return E===Wme?!0:BC.setRawMode(E)!==0?!1:(Wme=E,!0)}if(Kme||!BC||typeof iu!="number"&&(e.display||!A)){t=a();return}if(e.display&&(On.writeSync(iu,e.display),e.display=""),!e.displayOnly){if(!b(!A)){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&&(u=new RegExp("[^"+e.limit+"]","g"+(e.caseSensitive?"":"i")));;){C=0;try{C=On.readSync(Zf,p,0,h)}catch(E){if(E.code!=="EOF"){b(!1),t+=a();return}}if(C>0?(w=p.toString(e.encoding,0,C),xQ+=w):(w=`
|
|||
|
`,xQ+=String.fromCharCode(0)),w&&typeof(v=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=v,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&u&&(w=w.replace(u,"")),w&&(A||(e.hideEchoBack?e.mask&&On.writeSync(iu,new Array(w.length+1).join(e.mask)):On.writeSync(iu,w)),t+=w),!e.keyIn&&n||e.keyIn&&t.length>=h)break}!A&&!o&&On.writeSync(iu,`
|
|||
|
`),b(!1)}}(),e.print&&!o&&e.print(r+(e.displayOnly?"":(e.hideEchoBack?new Array(t.length+1).join(e.mask):t)+`
|
|||
|
`),e.encoding),e.displayOnly?"":MH=e.keepWhitespace||e.keyIn?t:t.trim()}function Edt(e,t){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!t||t(a))&&r.push(a))}return o(e),r}function OH(e){return e.replace(/[\x00-\x7f]/g,function(t){return"\\x"+("00"+t.charCodeAt().toString(16)).substr(-2)})}function ks(){var e=Array.prototype.slice.call(arguments),t,r;return e.length&&typeof e[0]=="boolean"&&(r=e.shift(),r&&(t=Object.keys(FH),e.unshift(FH))),e.reduce(function(o,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 u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=Edt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function LH(e,t,r){return t.some(function(o){var a=typeof o;return a==="string"?r?e===o:e.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(e)===o:a==="function"?o(e):o instanceof RegExp?o.test(e):!1})}function UH(e,t){var r=c0.normalize(nm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return e=c0.normalize(e),t?e.replace(/^~(?=\/|\\|$)/,r):e.replace(new RegExp("^"+OH(r)+"(?=\\/|\\\\|$)",nm?"i":""),"~")}function vC(e,t){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,C,w){var v;return A||typeof(v=t(C))!="string"?p:v?(h||"")+v+(w||""):""}return e.replace(o,n).replace(a,n)}function zme(e,t,r){var o,a=[],n=-1,u=0,A="",p;function h(C,w){return w.length>3?(C.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(C=C.concat(w)),C}return o=e.reduce(function(C,w){return C.concat((w+"").split(""))},[]).reduce(function(C,w){var v,b;return t||(w=w.toLowerCase()),v=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&v===0?A+=w:(b=w.charCodeAt(0),v&&v===n&&b===u+1?a.push(w):(C=h(C,a),a=[w],n=v),u=b),C},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Vme(e,t){return e.join(e.length>2?", ":t?" / ":"/")}function Xme(e,t){var r,o,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":o=t[t.hasOwnProperty(e+"Src")?e+"Src":e],t.keyIn?(a=zme(o,t.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Vme(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=t[t.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||e!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=MH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),e==="CWD"?r=c0.basename(r):e==="cwdHome"&&(r=UH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+e.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(e.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=rm[rm.length-n]||"")}return r}function Zme(e){var t=/^(.)-(.)$/.exec(e),r="",o,a,n,u;if(!t)return null;for(o=t[1].charCodeAt(0),a=t[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode
|
|||
|
`:"")+C}for(e.limitSrc=e.limit,e.displaySrc=e.display,e.limit="",e.display=vC(e.display+"",p);;){if(t=TH(e),r=!1,o="",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,TH(e),e.displayOnly=!1)):t&&t!==rm[rm.length-1]&&(rm=[t])),!r&&e.cd&&t)switch(u=NH(t),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(UH(u[1],!0))}catch(C){h(C+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&e.preCheck&&(A=e.preCheck(t,e),t=A.res,A.forceNext&&(r=!0)),!r){if(!e.limitSrc.length||LH(t,e.limitSrc,e.caseSensitive))break;e.limitMessage&&(o=vC(e.limitMessage,p))}h((o?o+`
|
|||
|
`:"")+vC(e.displaySrc+"",p))}return $me(t,e)}qr._DBG_set_useExt=function(e){Kme=e};qr._DBG_set_checkOptions=function(e){RH=e};qr._DBG_set_checkMethod=function(e){B2=e};qr._DBG_clearHistory=function(){MH="",rm=[]};qr.setDefaultOptions=function(e){return FH=ks(!0,e),ks(!0)};qr.question=function(e,t){return eye(ks(ks(!0,t),{display:e}))};qr.prompt=function(e){var t=ks(!0,e);return t.display=t.prompt,eye(t)};qr.keyIn=function(e,t){var r=ks(ks(!0,t),{display:e,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return vC(o+"",Zme)}),r.limit=OH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=vC(r.display+"",function(o){return Xme(o,r)}),$me(TH(r),r)};qr.questionEMail=function(e,t){return e==null&&(e="Input e-mail address: "),qr.question(e,ks({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}))};qr.questionNewPassword=function(e,t){var r,o,a,n=ks({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(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,C,w,v;for(t=t||{},u=vC(t.charlist?t.charlist+"":"$<!-~>",Zme),(isNaN(o=parseInt(t.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(t.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+OH(u)+"]{"+o+","+a+"}$"),r=zme([u],n.caseSensitive,!0),r.text=Vme(r.values,r.suppressed),A=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: "),C=n.limitMessage;!v;)n.limit=h,n.limitMessage=C,w=qr.question(e,n),n.limit=[w,""],n.limitMessage=p,v=qr.question(A,n);return w};function tye(e,t,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return qr.question(e,ks({limitMessage:"Input valid number, please."},t,{limit:a,cd:!1})),o}qr.questionInt=function(e,t){return tye(e,t,function(r){return parseInt(r,10)})};qr.questionFloat=function(e,t){return tye(e,t,parseFloat)};qr.questionPath=function(e,t){var r,o="",a=ks({hideEchoBack:!1,limitMessage:`$<error(
|
|||
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},t,{keepWhitespace:!1,limit:function(n){var u,A,p;n=UH(n,!0),o="";function h(C){C.split(/\/|\\/).reduce(function(w,v){var b=c0.resolve(w+=v+c0.sep);if(!On.existsSync(b))On.mkdirSync(b);else if(!On.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return w},"")}try{if(u=On.existsSync(n),r=u?On.realpathSync(n):c0.resolve(n),!t.hasOwnProperty("exists")&&!u||typeof t.exists=="boolean"&&t.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&t.create&&(t.isDirectory?h(r):(h(c0.dirname(r)),On.closeSync(On.openSync(r,"w"))),r=On.realpathSync(r)),u&&(t.min||t.max||t.isFile||t.isDirectory)){if(A=On.statSync(r),t.isFile&&!A.isFile())return o="Not file: "+r,!1;if(t.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(t.min&&A.size<+t.min||t.max&&A.size>+t.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof t.validate=="function"&&(p=t.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(C){return o=C+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:t.hasOwnProperty(n)?t[n]+"":""}});return t=t||{},e==null&&(e='Input path (you can "cd" and "pwd"): '),qr.question(e,a),r};function rye(e,t){var r={},o={};return typeof e=="object"?(Object.keys(e).forEach(function(a){typeof e[a]=="function"&&(o[t.caseSensitive?a:a.toLowerCase()]=e[a])}),r.preCheck=function(a){var n;return r.args=NH(a),n=r.args[0]||"",t.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return t.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=NH(a),r.hRes=typeof e=="function"?e.apply(a,r.args):!0,{res:a,forceNext:!1}},r}qr.promptCL=function(e,t){var r=ks({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),o=rye(e,r);return r.limit=o.limit,r.preCheck=o.preCheck,qr.prompt(r),o.args};qr.promptLoop=function(e,t){for(var r=ks({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},t);!e(qr.prompt(r)););};qr.promptCLLoop=function(e,t){var r=ks({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},t),o=rye(e,r);for(r.limit=o.limit,r.preCheck=o.preCheck;qr.prompt(r),!o.hRes;);};qr.promptSimShell=function(e){return qr.prompt(ks({hideEchoBack:!1,history:!0},e,{prompt:function(){return nm?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function nye(e,t,r){var o;return e==null&&(e="Are you sure? "),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=qr.keyIn(e,ks(t,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}qr.keyInYN=function(e,t){return nye(e,t)};qr.keyInYNStrict=function(e,t){return nye(e,t,"yn")};qr.keyInPause=function(e,t){e==null&&(e="Continue..."),(!t||t.guide!==!1)&&(e+="")&&(e=e.replace(/\s+$/,"")+" (Hit any key)"),qr.keyIn(e,ks({limit:null},t,{hideEchoBack:!0,mask:""}))};qr.keyInSelect=function(e,t,r){var o=ks({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={},u=49,A=`
|
|||
|
`;if(!Array.isArray(e)||!e.length||e.length>35)throw"`items` must be Array (max length: 35).";return e.forEach(function(p,h){var C=String.fromCharCode(u);a+=C,n[C]=h,A+="["+C+"] "+(p+"").trim()+`
|
|||
|
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
|||
|
`),o.limit=a,A+=`
|
|||
|
`,t==null&&(t="Choose one from list: "),(t+="")&&((!r||r.guide!==!1)&&(t=t.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=t),n[qr.keyIn(A,o).toLowerCase()]};qr.getRawInput=function(){return xQ};function v2(e,t){var r;return t.length&&(r={},r[e]=t[0]),qr.setDefaultOptions(r)[e]}qr.setPrint=function(){return v2("print",arguments)};qr.setPrompt=function(){return v2("prompt",arguments)};qr.setEncoding=function(){return v2("encoding",arguments)};qr.setMask=function(){return v2("mask",arguments)};qr.setBufferSize=function(){return v2("bufferSize",arguments)}});var _H=_((w7t,El)=>{(function(){var e={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,S,y){var F=tau_file_system.files[I];if(!F){if(y==="read")return null;F={path:I,text:"",type:S,get:function(V,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+V)},put:function(V,X){return X==="end_of_file"?(this.text+=V,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+V+this.text.substring(X+V.length),!0)},get_byte:function(V){if(V==="end_of_stream")return-1;var X=Math.floor(V/2);if(this.text.length<=X)return-1;var Z=n(this.text[Math.floor(V/2)],0);return V%2===0?Z&255:Z/256>>>0},put_byte:function(V,X){var Z=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<Z)return null;var ie=this.text.length===Z?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|V&255):(ie=ie&255,ie=(V&255)<<8|ie&255),this.text.length===Z?this.text+=u(ie):this.text=this.text.substring(0,Z)+u(ie)+this.text.substring(Z+1),!0},flush:function(){return!0},close:function(){var V=tau_file_system.files[this.path];return V?!0:null}},tau_file_system.files[I]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(I,S){for(var y;tau_user_input.buffer.length<I;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),y}},tau_user_output={put:function(I,S){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,S,y){var F=ye("fs"),V=F.openSync(I,y[0]);return y==="read"&&!F.existsSync(I)?null:{get:function(X,Z){var ie=new Buffer(X);return F.readSync(V,ie,0,X,Z),ie.toString()},put:function(X,Z){var ie=Buffer.from(X);if(Z==="end_of_file")F.writeSync(V,ie);else{if(Z==="past_end_of_file")return null;F.writeSync(V,ie,0,ie.length,Z)}return!0},get_byte:function(X){return null},put_byte:function(X,Z){return null},flush:function(){return!0},close:function(){return F.closeSync(V),!0}}}},nodejs_user_input={buffer:"",get:function(I,S){for(var y,F=iye();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),y}},nodejs_user_output={put:function(I,S){return process.stdout.write(I),!0},flush:function(){return!0}};var t;Array.prototype.indexOf?t=function(I,S){return I.indexOf(S)}:t=function(I,S){for(var y=I.length,F=0;F<y;F++)if(S===I[F])return F;return-1};var r=function(I,S){if(I.length!==0){for(var y=I[0],F=I.length,V=1;V<F;V++)y=S(y,I[V]);return y}},o;Array.prototype.map?o=function(I,S){return I.map(S)}:o=function(I,S){for(var y=[],F=I.length,V=0;V<F;V++)y.push(S(I[V]));return y};var a;Array.prototype.filter?a=function(I,S){return I.filter(S)}:a=function(I,S){for(var y=[],F=I.length,V=0;V<F;V++)S(I[V])&&y.push(I[V]);return y};var n;String.prototype.codePointAt?n=function(I,S){return I.codePointAt(S)}:n=function(I,S){return I.charCodeAt(S)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,C={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var S=[],y=!1;return I.replace(h,function(F,V,X,Z,ie,be,Me,ot,gt,_t,Xt,St,tn,Dr,Ar,Br,Gr){switch(!0){case gt!==void 0:return S.push(parseInt(gt,16)
|
|||
|
`,"\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+=V}return y}function b(I){for(var S="",y=0;y<I.length;y++)switch(I.charAt(y)){case"'":S+="\\'";break;case"\\":S+="\\\\";break;case"\b":S+="\\b";break;case"\f":S+="\\f";break;case`
|
|||
|
`:S+="\\n";break;case"\r":S+="\\r";break;case" ":S+="\\t";break;case"\v":S+="\\v";break;default:S+=I.charAt(y);break}return S}function E(I){var S=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(S,16);case"0b":return parseInt(S,2);case"0o":return parseInt(S,8);case"0'":return w(S)[0];default:return parseFloat(I)}}var R={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 N(I,S){return I.get_flag("char_conversion").id==="on"?S.replace(/./g,function(y){return I.get_char_conversion(y)}):S}function U(I){this.thread=I,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(I){return this.tokens=I},U.prototype.new_text=function(I){this.text=I,this.tokens=[]},U.prototype.get_tokens=function(I){var S,y=0,F=0,V=0,X=[],Z=!1;if(I){var ie=this.tokens[I-1];y=ie.len,S=N(this.thread,this.text.substr(ie.len)),F=ie.line,V=ie.start}else S=this.text;if(/^\s*$/.test(S))return null;for(;S!=="";){var be=[],Me=!1;if(/^\n/.exec(S)!==null){F++,V=0,y++,S=S.replace(/\n/,""),Z=!0;continue}for(var ot in R)if(R.hasOwnProperty(ot)){var gt=R[ot].exec(S);gt&&be.push({value:gt[0],name:ot,matches:gt})}if(!be.length)return this.set_last_tokens([{value:S,matches:[],name:"lexical",line:F,start:V}]);var ie=r(be,function(Dr,Ar){return Dr.value.length>=Ar.value.length?Dr:Ar});switch(ie.start=V,ie.line=F,S=S.replace(ie.value,""),V+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=E(ie.value),ie.blank=Me;break;case"string":var _t=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),_t),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var Xt=X[X.length-1];Xt&&(Xt.space=!0),Me=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Me=!1}var St=this.set_last_tokens(X);return St.length===0?null:St};function z(I,S,y,F,V){if(!S[y])return{type:A,value:x.error.syntax(S[y-1],"expression expected",!0)};var X;if(F==="0"){var Z=S[y];switch(Z.name){case"number":return{type:p,len:y+1,value:new x.type.Num(Z.value,Z.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var(Z.value)};case"string":var ie;switch(I.get_flag("double_quotes").id){case"atom":ie=new H(Z.value,[]);break;case"codes":ie=new H("[]",[]);for(var be=Z.value.length-1;be>=0;be--)ie=new H(".",[new x.type.Num(n(Z.value,be),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var be=Z.value.length-1;be>=0;be--)ie=new H(".",[new x.type.Term(Z.value.charAt(be),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var St=z(I,S,y+1,I.__get_max_priority(),!0);return St.type!==p?St:S[St.len]&&S[St.len].name==="r_paren"?(St.len++,St):{type:A,derived:!0,value:x.error.syntax(S[St.len]?S[St.len]:S[St.len-1],") or operator expected",!S[St.len])};case"l_bracket":var St=z(I,S,y+1,I.__get_max_priority(),!0);return St.type!==p?St:S[St.len]&&S[St.len].name==="r_bracket"?(St.len++,St.value=new H("{}",[St.value]),St):{type:A,derived:!0,value:x.error.syntax(S[St.len]?S[St.len]:S[St.len-1],"} or operator expected",!S[St.len])}}var Me=$(I,S,y,V);return Me.type===p||Me.derived||(Me=ae(I,S,y),Me.type===p||Me.derived)?Me:{type:A,derived:!1,value:x
|
|||
|
`;S+=`
|
|||
|
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)S+=this.rules[key][y].toString(I),S+=`
|
|||
|
`;return S},Ee.prototype.clone=function(){return new Ee(this.id)},Qe.prototype.clone=function(){return new Qe(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(I){return I.clone()}))},Le.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Fe.prototype.clone=function(){var I={};for(var S in this.links)!this.links.hasOwnProperty(S)||(I[S]=this.links[S].clone());return new Fe(I)},Re.prototype.clone=function(){return new Re(this.goal.clone(),this.substitution.clone(),this.parent)},Ge.prototype.clone=function(){return new Ge(this.head.clone(),this.body!==null?this.body.clone():null)},Ee.prototype.equals=function(I){return x.type.is_variable(I)&&this.id===I.id},Qe.prototype.equals=function(I){return x.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},H.prototype.equals=function(I){if(!x.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var S=0;S<this.args.length;S++)if(!this.args[S].equals(I.args[S]))return!1;return!0},Le.prototype.equals=function(I){return x.type.is_stream(I)&&this.id===I.id},Fe.prototype.equals=function(I){var S;if(!x.type.is_substitution(I))return!1;for(S in this.links)if(!!this.links.hasOwnProperty(S)&&(!I.links[S]||!this.links[S].equals(I.links[S])))return!1;for(S in I.links)if(!!I.links.hasOwnProperty(S)&&!this.links[S])return!1;return!0},Re.prototype.equals=function(I){return x.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},Ge.prototype.equals=function(I){return x.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},Ee.prototype.rename=function(I){return I.get_free_variable(this)},Qe.prototype.rename=function(I){return this},H.prototype.rename=function(I){return new H(this.id,o(this.args,function(S){return S.rename(I)}))},Le.prototype.rename=function(I){return this},Ge.prototype.rename=function(I){return new Ge(this.head.rename(I),this.body!==null?this.body.rename(I):null)},Ee.prototype.variables=function(){return[this.id]},Qe.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(I){return I.variables()}))},Le.prototype.variables=function(){return[]},Ge.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Ee.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},Qe.prototype.apply=function(I){return this},H.prototype.apply=function(I){if(this.indicator==="./2"){for(var S=[],y=this;y.indicator==="./2";)S.push(y.args[0].apply(I)),y=y.args[1];for(var F=y.apply(I),V=S.length-1;V>=0;V--)F=new H(".",[S[V],F]);return F}return new H(this.id,o(this.args,function(X){return X.apply(I)}),this.ref)},Le.prototype.apply=function(I){return this},Ge.prototype.apply=function(I){return new Ge(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Fe.prototype.apply=function(I){var S,y={};for(S in this.links)!this.links.hasOwnProperty(S)||(y[S]=this.links[S].apply(I));return new Fe(y)},H.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},H.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new H(",",[I,this.args[1]]):I},H.prototype.search=function(I){if(x.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var S=0;S<this.args.length;S++)if(x.type.is_term(this.args[S])&&this.args[S].search(I))return!0;return!1},Ne.prototype.get_current_input=function(){return this.current_input},Xe.prototype.get_current_input=function(){return this.session.get_current_input()},Ne.prototype.get_current_output=function(){return this.current_output},Xe.prototype.get_current_output=function(){return this.session.get_current_output()},Ne.prototype.set_current_input=function(I){this.current_input=I},Xe.prototype.set_current_input=function(I){return t
|
|||
|
`,[])])])),S.substitution,S)])},"nl/1":function(I,S,y){var F=y.args[0];I.prepend([new Re(S.goal.replace(new H("put_char",[F,new H(`
|
|||
|
`,[])])),S.substitution,S)])},"get_byte/1":function(I,S,y){var F=y.args[0];I.prepend([new Re(S.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("get_byte",[new Ee("S"),F])])),S.substitution,S)])},"get_byte/2":function(I,S,y){var F=y.args[0],V=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(V)&&!x.type.is_byte(V))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else{if(Z=X.stream.get_byte(X.position),Z===null){I.throw_error(x.error.representation("byte",y.indicator));return}X.position++}I.prepend([new Re(S.goal.replace(new H("=",[new Qe(Z,!1),V])),S.substitution,S)])}},"peek_byte/1":function(I,S,y){var F=y.args[0];I.prepend([new Re(S.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("peek_byte",[new Ee("S"),F])])),S.substitution,S)])},"peek_byte/2":function(I,S,y){var F=y.args[0],V=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(x.type.is_variable(F))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(V)&&!x.type.is_byte(V))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))I.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",F,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else if(Z=X.stream.get_byte(X.position),Z===null){I.throw_error(x.error.representation("byte",y.indicator));return}I.prepend([new Re(S.goal.replace(new H("=",[new Qe(Z,!1),V])),S.substitution,S)])}},"put_byte/1":function(I,S,y){var F=y.args[0];I.prepend([new Re(S.goal.replace(new H(",",[new H("current_output",[new Ee("S")]),new H("put_byte",[new Ee("S"),F])])),S.substitution,S)])},"put_byte/2":function(I,S,y){var F=y.args[0],V=y.args[1],X=x.type.is_stream(F)?F:I.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(V)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(V)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?I.throw_error(x.error.domain("stream_or_alias",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",F,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",F,y.indicator)):X.type==="text"?I.throw_error(x.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(V.value,X.position)&&(typeof X.position=="number"&&X.position++,I.success(S)):I.throw_error(x.error.type("byte",V,y.indicator))},"read/1":function(I,S,y){var F=y.args[0];I.prepend([new Re(S.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("read_term",[new Ee("S"),F,new H("[]",[])])])),S.substitution,S)])},"read/2":function(I,S,y){var F=y.args[0],V=y.args[1];I.prepend([new Re(S.goal.replace(new H("read_term",[F,V,new H("[]",[])])),S.substitution,S)])},"read_term/2":function(I,S,y){var F=y.args[0],V=y.args[1];I.prepend([new Re(S.goal.replace(new H(",",[new H("current_input",[new Ee("S")]),new H("read_term",[new
|
|||
|
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;t+=`workspace(${A0(o)}).
|
|||
|
`,t+=`workspace_ident(${A0(o)}, ${A0(W.stringifyIdent(r.locator))}).
|
|||
|
`,t+=`workspace_version(${A0(o)}, ${A0(r.manifest.version)}).
|
|||
|
`;for(let a of uye)for(let n of r.manifest[a].values())t+=`workspace_has_dependency(${A0(o)}, ${A0(W.stringifyIdent(n))}, ${A0(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 GH(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(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of t){let p=I2([A,W.stringifyIdent(n)]),h=He.getMapWithDefault(o,a.cwd);He.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=I2(n),p=He.getMapWithDefault(o,a.cwd);He.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(t){let r=[];for await(let o of t.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=J.resolve(this.project.cwd,im(o.links.WorkspaceCwd)),n=im(o.links.DependencyIdent),u=im(o.links.DependencyRange),A=im(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=W.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return He.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>W.stringifyIdent(o.locator),({dependencyIdent:o})=>W.stringifyIdent(o)])}async genEnforcedFields(t){let r=[];for await(let o of t.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=J.resolve(this.project.cwd,im(o.links.WorkspaceCwd)),n=im(o.links.FieldPath),u=Bdt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return He.sortMap(r,[({workspace:o})=>W.stringifyIdent(o.locator),({fieldPath:o})=>o])}async*query(t){let r=this.createSession();for await(let o of r.makeQuery(t)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=im(u));yield a}}}});var Iye=_(FQ=>{"use strict";Object.defineProperty(FQ,"__esModule",{value:!0});function G2(e){let t=[...e.caches],r=t.shift();return r===void 0?Cye():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>G2({caches:t}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>G2({caches:t}).set(o,a))},delete(o){return r.delete(o).catch(()=>G2({caches:t}).delete(o))},clear(){return r.clear().catch(()=>G2({caches:t}).clear())}}}function Cye(){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()}}}FQ.createFallbackableCache=G2;FQ.createNullCache=Cye});var Bye=_((tKt,wye)=>{wye.exports=Iye()});var vye=_(n6=>{"use strict";Object.defineProperty(n6,"__esModule",{value:!0});function qdt(e={serializable:!0}){let t={};return{get(r,o,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 u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}n6.createInMemoryCache=qdt});var Pye=_((nKt,Dye)=>{Dye.exports=vye()});var xye=_(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});function Gdt(e,t,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===i6.WithinHeaders?o:{}},queryParameters(){return e===i6.WithinQueryParameters?o:{}}}}function jdt(e){let t=0,r=()=>(t++,new Promise(o=>{setTimeout(()=>{o(e(r))},Math.min(100*t,1e3))}));return e(r)}function Sye(e,t=(r,o)=>Promise.resolve()){return Object.assign(e,{wait(r){return Sye(e.then(o=>Promise.all([t(o,r),o])).then(o=>o[1]))}})}function Wdt(e){let t=e.length-1;for(t;t>0;t--){let r=Math.floor(Math.random()*(t+1)),
|
|||
|
`;A!==o&&(o=A,e.write(sCe.default.eraseLines(r)+A),r=A.split(`
|
|||
|
`).length)};return n.clear=()=>{e.write(sCe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,t||(oCe.default.show(),a=!1)},n};rB.default={create:lEt}});var cCe=_((TKt,cEt)=>{cEt.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 fCe=_(Cl=>{"use strict";var ACe=cCe(),gA=process.env;Object.defineProperty(Cl,"_vendors",{value:ACe.map(function(e){return e.constant})});Cl.name=null;Cl.isPR=null;ACe.forEach(function(e){var t=Array.isArray(e.env)?e.env:[e.env],r=t.every(function(o){return uCe(o)});if(Cl[e.constant]=r,r)switch(Cl.name=e.name,typeof e.pr){case"string":Cl.isPR=!!gA[e.pr];break;case"object":"env"in e.pr?Cl.isPR=e.pr.env in gA&&gA[e.pr.env]!==e.pr.ne:"any"in e.pr?Cl.isPR=e.pr.any.some(function(o){return!!gA[o]}):Cl.isPR=uCe(e.pr);break;default:Cl.isPR=null}});Cl.isCI=!!(gA.CI||gA.CONTINUOUS_INTEGRATION||gA.BUILD_NUMBER||gA.RUN_ID||Cl.name);function uCe(e){return typeof e=="string"?!!gA[e]:Object.keys(e).every(function(t){return gA[t]===e[t]})}});var hCe=_((NKt,pCe)=>{"use strict";pCe.exports=fCe().isCI});var dCe=_((MKt,gCe)=>{"use strict";var uEt=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};gCe.exports=(e,{include:t,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return t?t.some(n):r?!r.some(n):!0};for(let[a,n]of uEt(e.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(e[n]=e[n].bind(e))}return e}});var BCe=_(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});var _C,sB,XQ,ZQ,W6;typeof window>"u"||typeof MessageChannel!="function"?(UC=null,U6=null,_6=function(){if(UC!==null)try{var e=Dn.unstable_now();UC(!0,e),UC=null}catch(t){throw setTimeout(_6,0),t}},mCe=Date.now(),Dn.unstable_now=function(){return Date.now()-mCe},_C=function(e){UC!==null?setTimeout(_C,0,e):(UC=e,setTimeout(_6,0))},sB=function(e,t){U6=setTimeout(e,t)},XQ=function(){clearTimeout(U6)},ZQ=function(){return!1},W6=Dn.unstable_forceFrameRate=function(){}):(KQ=window.perf
|
|||
|
in `+(q||"Unknown")+ue}D+=T,P=P.return}while(P);return D}var Bl=[],oo=-1;function Hn(P){0>oo||(P.current=Bl[oo],Bl[oo]=null,oo--)}function Fn(P,D){oo++,Bl[oo]=P.current,P.current=D}var Ti={},Rn={current:Ti},_i={current:!1},De=Ti;function Li(P,D){var T=P.type.contextTypes;if(!T)return Ti;var q=P.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===D)return q.__reactInternalMemoizedMaskedChildContext;var Y={},ue;for(ue in T)Y[ue]=D[ue];return q&&(P=P.stateNode,P.__reactInternalMemoizedUnmaskedChildContext=D,P.__reactInternalMemoizedMaskedChildContext=Y),Y}function ti(P){return P=P.childContextTypes,P!=null}function Ga(P){Hn(_i,P),Hn(Rn,P)}function Zt(P){Hn(_i,P),Hn(Rn,P)}function dc(P,D,T){if(Rn.current!==Ti)throw Error(n(168));Fn(Rn,D,P),Fn(_i,T,P)}function mu(P,D,T){var q=P.stateNode;if(P=D.childContextTypes,typeof q.getChildContext!="function")return T;q=q.getChildContext();for(var Y in q)if(!(Y in P))throw Error(n(108,ce(D)||"Unknown",Y));return r({},T,{},q)}function mc(P){var D=P.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Ti,De=Rn.current,Fn(Rn,D,P),Fn(_i,_i.current,P),!0}function vl(P,D,T){var q=P.stateNode;if(!q)throw Error(n(169));T?(D=mu(P,D,De),q.__reactInternalMemoizedMergedChildContext=D,Hn(_i,P),Hn(Rn,P),Fn(Rn,D,P)):Hn(_i,P),Fn(_i,T,P)}var SA=a.unstable_runWithPriority,yu=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Ft=a.unstable_shouldYield,yc=a.unstable_requestPaint,Hi=a.unstable_now,Eu=a.unstable_getCurrentPriorityLevel,Gt=a.unstable_ImmediatePriority,Dl=a.unstable_UserBlockingPriority,xA=a.unstable_NormalPriority,up=a.unstable_LowPriority,Ec=a.unstable_IdlePriority,bA={},Pn=yc!==void 0?yc:function(){},Ai=null,Cc=null,QA=!1,oa=Hi(),qi=1e4>oa?Hi:function(){return Hi()-oa};function Ho(){switch(Eu()){case Gt:return 99;case Dl:return 98;case xA:return 97;case up:return 96;case Ec:return 95;default:throw Error(n(332))}}function et(P){switch(P){case 99:return Gt;case 98:return Dl;case 97:return xA;case 96:return up;case 95:return Ec;default:throw Error(n(332))}}function ao(P,D){return P=et(P),SA(P,D)}function Pl(P,D,T){return P=et(P),yu(P,D,T)}function Cu(P){return Ai===null?(Ai=[P],Cc=yu(Gt,Iu)):Ai.push(P),bA}function Gi(){if(Cc!==null){var P=Cc;Cc=null,Ce(P)}Iu()}function Iu(){if(!QA&&Ai!==null){QA=!0;var P=0;try{var D=Ai;ao(99,function(){for(;P<D.length;P++){var T=D[P];do T=T(!0);while(T!==null)}}),Ai=null}catch(T){throw Ai!==null&&(Ai=Ai.slice(P+1)),yu(Gt,Gi),T}finally{QA=!1}}}var kA=3;function ja(P,D,T){return T/=10,1073741821-(((1073741821-P+D/10)/T|0)+1)*T}function Ic(P,D){return P===D&&(P!==0||1/P===1/D)||P!==P&&D!==D}var ds=typeof Object.is=="function"?Object.is:Ic,Mt=Object.prototype.hasOwnProperty;function Sn(P,D){if(ds(P,D))return!0;if(typeof P!="object"||P===null||typeof D!="object"||D===null)return!1;var T=Object.keys(P),q=Object.keys(D);if(T.length!==q.length)return!1;for(q=0;q<T.length;q++)if(!Mt.call(D,T[q])||!ds(P[T[q]],D[T[q]]))return!1;return!0}function mi(P,D){if(P&&P.defaultProps){D=r({},D),P=P.defaultProps;for(var T in P)D[T]===void 0&&(D[T]=P[T])}return D}var aa={current:null},lo=null,Ms=null,la=null;function ca(){la=Ms=lo=null}function qo(P,D){var T=P.type._context;x?(Fn(aa,T._currentValue,P),T._currentValue=D):(Fn(aa,T._currentValue2,P),T._currentValue2=D)}function Zi(P){var D=aa.current;Hn(aa,P),P=P.type._context,x?P._currentValue=D:P._currentValue2=D}function Os(P,D){for(;P!==null;){var T=P.alternate;if(P.childExpirationTime<D)P.childExpirationTime=D,T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D);else if(T!==null&&T.childExpirationTime<D)T.childExpirationTime=D;else break;P=P.return}}function Us(P,D){lo=P,la=Ms=null,P=P.dependencies,P!==null&&P.firstContext!==null&&(P.expirationTime>=D&&(Go=!0),P.firstContext=null)}function _s(P,D){if(la!==P&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(la=P,D=1073741823),D={context:P,observedBits:D,next:null},Ms===null){if(lo===null)throw Error(n(308));Ms=D,lo.dependencies={expirationTime:0,firstContext:D,responders:null}}else Ms=Ms.next=D;return x?P._currentValue:P._currentV
|
|||
|
|
|||
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+wl(Y))}Wi!==kc&&(Wi=Ii),ue=mg(ue,Y),Ct=q;do{switch(Ct.tag){case 3:Pe=ue,Ct.effectTag|=4096,Ct.expirationTime=D;var Ve=Kv(Ct,Pe,D);Wa(Ct,Ve);break e;case 1:Pe=ue;var pt=Ct.type,jt=Ct.stateNode;if((Ct.effectTag&64)===0&&(typeof pt.getDerivedStateFromError=="function"||jt!==null&&typeof jt.componentDidCatch=="function"&&(Qu===null||!Qu.has(jt)))){Ct.effectTag|=4096,Ct.expirationTime=D;var Er=Jv(Ct,Pe,D);Wa(Ct,Er);break e}}Ct=Ct.return}while(Ct!==null)}kr=$v(kr)}catch(wn){D=wn;continue}break}while(1)}function jA(){var P=Ep.current;return Ep.current=Pu,P===null?Pu:P}function PI(P,D){P<Za&&2<P&&(Za=P),D!==null&&P<OA&&2<P&&(OA=P,qm=D)}function Ym(P){P>Cp&&(Cp=P)}function wF(){for(;kr!==null;)kr=Zv(kr)}function BF(){for(;kr!==null&&!Ft();)kr=Zv(kr)}function Zv(P){var D=tD(P.alternate,P,ns);return P.memoizedProps=P.pendingProps,D===null&&(D=$v(P)),II.current=null,D}function $v(P){kr=P;do{var D=kr.alternate;if(P=kr.return,(kr.effectTag&2048)===0){e:{var T=D;D=kr;var q=ns,Y=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:ti(D.type)&&Ga(D);break;case 3:Bc(D),Zt(D),Y=D.stateNode,Y.pendingContext&&(Y.context=Y.pendingContext,Y.pendingContext=null),(T===null||T.child===null)&&za(D)&&ma(D),bl(D);break;case 5:sg(D);var ue=pa(wc.current);if(q=D.type,T!==null&&D.stateNode!=null)ts(T,D,q,Y,ue),T.ref!==D.ref&&(D.effectTag|=128);else if(Y){if(T=pa(uo.current),za(D)){if(Y=D,!y)throw Error(n(175));T=lp(Y.stateNode,Y.type,Y.memoizedProps,ue,T,Y),Y.updateQueue=T,T=T!==null,T&&ma(D)}else{var Pe=ft(q,Y,ue,T,D);bc(Pe,D,!1,!1),D.stateNode=Pe,lt(Pe,q,Y,ue,T)&&ma(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)Hr(T,D,T.memoizedProps,Y);else{if(typeof Y!="string"&&D.stateNode===null)throw Error(n(166));if(T=pa(wc.current),ue=pa(uo.current),za(D)){if(T=D,!y)throw Error(n(176));(T=cp(T.stateNode,T.memoizedProps,T))&&ma(D)}else D.stateNode=Ge(Y,T,ue,D)}break;case 11:break;case 13:if(Hn(zn,D),Y=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=q;break e}Y=Y!==null,ue=!1,T===null?D.memoizedProps.fallback!==void 0&&za(D):(q=T.memoizedState,ue=q!==null,Y||q===null||(q=T.child.sibling,q!==null&&(Pe=D.firstEffect,Pe!==null?(D.firstEffect=q,q.nextEffect=Pe):(D.firstEffect=D.lastEffect=q,q.nextEffect=null),q.effectTag=8))),Y&&!ue&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||(zn.current&1)!==0?Wi===xu&&(Wi=ya):((Wi===xu||Wi===ya)&&(Wi=Ql),Cp!==0&&fi!==null&&(KA(fi,ns),nD(fi,Cp)))),S&&Y&&(D.effectTag|=4),I&&(Y||ue)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Bc(D),bl(D);break;case 10:Zi(D);break;case 9:break;case 14:break;case 17:ti(D.type)&&Ga(D);break;case 19:if(Hn(zn,D),Y=D.memoizedState,Y===null)break;if(ue=(D.effectTag&64)!==0,Pe=Y.rendering,Pe===null){if(ue)Qc(Y,!1);else if(Wi!==xu||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(Pe=Ap(T),Pe!==null){for(D.effectTag|=64,Qc(Y,!1),T=Pe.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Y.lastEffect===null&&(D.firstEffect=null),D.lastEffect=Y.lastEffect,T=q,Y=D.child;Y!==null;)ue=Y,q=T,ue.effectTag&=2,ue.nextEffect=null,ue.firstEffect=null,ue.lastEffect=null,Pe=ue.alternate,Pe===null?(ue.childExpirationTime=0,ue.expirationTime=q,ue.child=null,ue.memoizedProps=null,ue.memoizedState=null,ue.updateQueue=null,ue.dependencies=null):(ue.childExpirationTime=Pe.childExpirationTime,ue.expirationTime=Pe.expirationTime,ue.child=Pe.child,ue.memoizedProps=Pe.memoizedProps,ue.memoizedState=Pe.memoizedState,ue.updateQueue=Pe.updateQueue,q=Pe.dependencies,ue.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),Y=Y.sibling;Fn(zn,zn.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!ue)if(T=Ap(Pe),T!==null){if(D.effectTag|=64,ue=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Qc(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!Pe.alternate){D=D.lastEffect=Y.
|
|||
|
`+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 o=r>0?r:lengthBytesUTF8(e)+1,a=new Array(o),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 o=e[r];o>255&&(o&=255),t.push(String.fromCharCode(o))}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 o,a;r&&(a=t+lengthBytesUTF8(e),o=HEAP8[a]),stringToUTF8(e,t,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(e,t){HEAP8.set(e,t)}Module.writeArrayToMemory=writeArrayToMemory;function
|
|||
|
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(o){r=o(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 Am=_((WKt,LCe)=>{"use strict";var dEt=RCe(),mEt=TCe(),Z6=!1,$6=null;mEt({},function(e,t){if(!Z6){if(Z6=!0,e)throw e;$6=t}});if(!Z6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");LCe.exports=dEt($6.bind,$6.lib)});var tq=_((YKt,eq)=>{"use strict";var NCe=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);eq.exports=NCe;eq.exports.default=NCe});var OCe=_((KKt,MCe)=>{"use strict";MCe.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(?:\uD8
|
|||
|
`))t=Math.max(t,IEt(r));return t};nq.exports=_Ce;nq.exports.default=_Ce});var HCe=_(lB=>{"use strict";var wEt=lB&&lB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lB,"__esModule",{value:!0});var BEt=wEt(iq()),sq={};lB.default=e=>{if(e.length===0)return{width:0,height:0};if(sq[e])return sq[e];let t=BEt.default(e),r=e.split(`
|
|||
|
`).length;return sq[e]={width:t,height:r},{width:t,height:r}}});var qCe=_(cB=>{"use strict";var vEt=cB&&cB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cB,"__esModule",{value:!0});var fn=vEt(Am()),DEt=(e,t)=>{"position"in t&&e.setPositionType(t.position==="absolute"?fn.default.POSITION_TYPE_ABSOLUTE:fn.default.POSITION_TYPE_RELATIVE)},PEt=(e,t)=>{"marginLeft"in t&&e.setMargin(fn.default.EDGE_START,t.marginLeft||0),"marginRight"in t&&e.setMargin(fn.default.EDGE_END,t.marginRight||0),"marginTop"in t&&e.setMargin(fn.default.EDGE_TOP,t.marginTop||0),"marginBottom"in t&&e.setMargin(fn.default.EDGE_BOTTOM,t.marginBottom||0)},SEt=(e,t)=>{"paddingLeft"in t&&e.setPadding(fn.default.EDGE_LEFT,t.paddingLeft||0),"paddingRight"in t&&e.setPadding(fn.default.EDGE_RIGHT,t.paddingRight||0),"paddingTop"in t&&e.setPadding(fn.default.EDGE_TOP,t.paddingTop||0),"paddingBottom"in t&&e.setPadding(fn.default.EDGE_BOTTOM,t.paddingBottom||0)},xEt=(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(fn.default.FLEX_DIRECTION_ROW),t.flexDirection==="row-reverse"&&e.setFlexDirection(fn.default.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection==="column"&&e.setFlexDirection(fn.default.FLEX_DIRECTION_COLUMN),t.flexDirection==="column-reverse"&&e.setFlexDirection(fn.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(fn.default.ALIGN_STRETCH),t.alignItems==="flex-start"&&e.setAlignItems(fn.default.ALIGN_FLEX_START),t.alignItems==="center"&&e.setAlignItems(fn.default.ALIGN_CENTER),t.alignItems==="flex-end"&&e.setAlignItems(fn.default.ALIGN_FLEX_END)),"alignSelf"in t&&((t.alignSelf==="auto"||!t.alignSelf)&&e.setAlignSelf(fn.default.ALIGN_AUTO),t.alignSelf==="flex-start"&&e.setAlignSelf(fn.default.ALIGN_FLEX_START),t.alignSelf==="center"&&e.setAlignSelf(fn.default.ALIGN_CENTER),t.alignSelf==="flex-end"&&e.setAlignSelf(fn.default.ALIGN_FLEX_END)),"justifyContent"in t&&((t.justifyContent==="flex-start"||!t.justifyContent)&&e.setJustifyContent(fn.default.JUSTIFY_FLEX_START),t.justifyContent==="center"&&e.setJustifyContent(fn.default.JUSTIFY_CENTER),t.justifyContent==="flex-end"&&e.setJustifyContent(fn.default.JUSTIFY_FLEX_END),t.justifyContent==="space-between"&&e.setJustifyContent(fn.default.JUSTIFY_SPACE_BETWEEN),t.justifyContent==="space-around"&&e.setJustifyContent(fn.default.JUSTIFY_SPACE_AROUND))},bEt=(e,t)=>{var r,o;"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((o=t.minHeight)!==null&&o!==void 0?o:0))},QEt=(e,t)=>{"display"in t&&e.setDisplay(t.display==="flex"?fn.default.DISPLAY_FLEX:fn.default.DISPLAY_NONE)},kEt=(e,t)=>{if("borderStyle"in t){let r=typeof t.borderStyle=="string"?1:0;e.setBorder(fn.default.EDGE_TOP,r),e.setBorder(fn.default.EDGE_BOTTOM,r),e.setBorder(fn.default.EDGE_LEFT,r),e.setBorder(fn.default.EDGE_RIGHT,r)}};cB.default=(e,t={})=>{DEt(e,t),PEt(e,t),SEt(e,t),xEt(e,t),bEt(e,t),QEt(e,t),kEt(e,t)}});var WCe=_((ZKt,jCe)=>{"use strict";var uB=nk(),FEt=qP(),REt=ww(),aq=new Set(["\x1B","\x9B"]),TEt=39,GCe=e=>`${aq.values().next().value}[${e}m`,LEt=e=>e.split(" ").map(t=>uB(t)),oq=(e,t,r)=>{let o=[...t],a=!1,n=uB(FEt(e[e.length-1]));for(let[u,A]of o.entries()){let p=uB(A)
|
|||
|
`);for(let[p,h]of[...o].entries()){if(a+=h,aq.has(h)){let w=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=w===TEt?null:w}let C=REt.codes.get(Number(n));n&&C&&(o[p+1]===`
|
|||
|
`?a+=GCe(C):h===`
|
|||
|
`&&(a+=GCe(n)))}return a};jCe.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
|
|||
|
`).split(`
|
|||
|
`).map(o=>MEt(o,t,r)).join(`
|
|||
|
`)});var JCe=_(($Kt,KCe)=>{"use strict";var YCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",OEt=e=>e&&e.exact?new RegExp(`^${YCe}$`):new RegExp(YCe,"g");KCe.exports=OEt});var lq=_((eJt,ZCe)=>{"use strict";var UEt=tq(),_Et=JCe(),zCe=ww(),XCe=["\x1B","\x9B"],ik=e=>`${XCe[0]}[${e}m`,VCe=(e,t,r)=>{let o=[];e=[...e];for(let a of e){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=zCe.codes.get(parseInt(a,10));if(u){let A=e.indexOf(u.toString());A>=0?e.splice(A,1):o.push(ik(t?u:n))}else if(t){o.push(ik(0));break}else o.push(ik(n))}if(t&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=ik(zCe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};ZCe.exports=(e,t,r)=>{let o=[...e.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,C]of o.entries()){let w=!1;if(XCe.includes(C)){let v=/\d[^m]*/.exec(e.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&C==="m"&&(n=!1,w=!0);if(!n&&!w&&++A,!_Et({exact:!0}).test(C)&&UEt(C.codePointAt())&&++A,A>t&&A<=r)p+=C;else if(A===t&&!n&&u!==void 0)p=VCe(a);else if(A>=r){p+=VCe(a,!0,u);break}}return p}});var eIe=_((tJt,$Ce)=>{"use strict";var E0=lq(),HEt=nk();function sk(e,t,r){if(e.charAt(t)===" ")return t;for(let o=1;o<=3;o++)if(r){if(e.charAt(t+o)===" ")return t+o}else if(e.charAt(t-o)===" ")return t-o;return t}$Ce.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=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 u;let p=HEt(e);if(p<=t)return e;if(o==="start"){if(n){let h=sk(e,p-t+1,!0);return u+E0(e,h,p).trim()}return a===!0&&(u+=" ",A=2),u+E0(e,p-t+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(t/2);if(n){let C=sk(e,h),w=sk(e,p-(t-h)+1,!0);return E0(e,0,C)+u+E0(e,w,p).trim()}return E0(e,0,h)+u+E0(e,p-(t-h)+A,p)}if(o==="end"){if(n){let h=sk(e,t-1);return E0(e,0,h)+u}return a===!0&&(u=" "+u,A=2),E0(e,0,t-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var uq=_(AB=>{"use strict";var tIe=AB&&AB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(AB,"__esModule",{value:!0});var qEt=tIe(WCe()),GEt=tIe(eIe()),cq={};AB.default=(e,t,r)=>{let o=e+String(t)+String(r);if(cq[o])return cq[o];let a=e;if(r==="wrap"&&(a=qEt.default(e,t,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=GEt.default(e,t,{position:n})}return cq[o]=a,a}});var fq=_(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var rIe=e=>{let t="";if(e.childNodes.length>0)for(let r of e.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=rIe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),t+=o}return t};Aq.default=rIe});var pq=_(ui=>{"use strict";var fB=ui&&ui.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ui,"__esModule",{value:!0});ui.setTextNodeValue=ui.createTextNode=ui.setStyle=ui.setAttribute=ui.removeChildNode=ui.insertBeforeNode=ui.appendChildNode=ui.createNode=ui.TEXT_NAME=void 0;var jEt=fB(Am()),nIe=fB(HCe()),WEt=fB(qCe()),YEt=fB(uq()),KEt=fB(fq());ui.TEXT_NAME="#text";ui.createNode=e=>{var t;let r={nodeName:e,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:e==="ink-virtual-text"?void 0:jEt.default.Node.create()};return e==="ink-text"&&((t=r.yogaNode)===null||t===void 0||t.setMeasureFunc(JEt.bind(null,r))),r};ui.appendChildNode=(e,t)=>{var r;t.parentNode&&ui.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")&&ok(e)};ui.insertBefo
|
|||
|
`:`
|
|||
|
`)+r,a=o+1,o=e.indexOf(`
|
|||
|
`,a)}while(o!==-1);return n+=e.substr(a),n};dIe.exports={stringReplaceAll:ZEt,stringEncaseCRLFWithFirstIndex:$Et}});var wIe=_((AJt,IIe)=>{"use strict";var eCt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,yIe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,tCt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,rCt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,nCt=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function CIe(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)):nCt.get(e)||e}function iCt(e,t){let r=[],o=t.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(tCt))r.push(a[2].replace(rCt,(A,p,h)=>p?CIe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${e}')`)}return r}function sCt(e){yIe.lastIndex=0;let t=[],r;for(;(r=yIe.exec(e))!==null;){let o=r[1];if(r[2]){let a=iCt(o,r[2]);t.push([o].concat(a))}else t.push([o])}return t}function EIe(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 o=e;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}IIe.exports=(e,t)=>{let r=[],o=[],a=[];if(t.replace(eCt,(n,u,A,p,h,C)=>{if(u)a.push(CIe(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:EIe(e,r)(w)),r.push({inverse:A,styles:sCt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(EIe(e,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.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 o.join("")}});var fk=_((fJt,xIe)=>{"use strict";var gB=ww(),{stdout:dq,stderr:mq}=BL(),{stringReplaceAll:oCt,stringEncaseCRLFWithFirstIndex:aCt}=mIe(),{isArray:lk}=Array,vIe=["ansi","ansi","ansi256","ansi16m"],HC=Object.create(null),lCt=(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=dq?dq.level:0;e.level=t.level===void 0?r:t.level},yq=class{constructor(t){return DIe(t)}},DIe=e=>{let t={};return lCt(t,e),t.template=(...r)=>SIe(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=yq,t.template};function ck(e){return DIe(e)}for(let[e,t]of Object.entries(gB))HC[e]={get(){let r=uk(this,Eq(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};HC.visible={get(){let e=uk(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var PIe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of PIe)HC[e]={get(){let{level:t}=this;return function(...r){let o=Eq(gB.color[vIe[t]][e](...r),gB.color.close,this._styler);return uk(this,o,this._isEmpty)}}};for(let e of PIe){let t="bg"+e[0].toUpperCase()+e.slice(1);HC[t]={get(){let{level:r}=this;return function(...o){let a=Eq(gB.bgColor[vIe[r]][e](...o),gB.bgColor.close,this._styler);return uk(this,a,this._isEmpty)}}}}var cCt=Object.defineProperties(()=>{},{...HC,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),Eq=(e,t,r)=>{let o,a;return r===void 0?(o=e,a=t):(o=r.openAll+e,a=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:a,parent:r}},uk=(e,t,r)=>{let o=(...a)=>lk(a[0])&&lk(a[0].raw)?BIe(o,SIe(o,...a)):BIe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,cCt),o._generator=e,o._styler=t,o._isEmpty=r,o},BIe=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:o,closeAll:a}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=oCt(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
|
|||
|
`);return n!==-1&&(t=aCt(t,a,o,n)),o+t+a},gq,SIe=(e,...t)=>{let[r]=t;if(!lk(r)||!lk(r.raw))return t.join(" ");let o=t.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return gq===void 0&&(gq=wIe()),gq(e,a.join(""))};Object.defineProperties(ck.prototype,HC);var Ak=ck();Ak.supportsColor=dq;Ak.stderr=ck({level:mq?mq.level:0});Ak.stderr.supportsColor=mq;xIe.exports=Ak});var Cq=_(mB=>{"use strict";var uCt=mB&&mB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mB,"__esModule",{value:!0});var dB=uCt(fk()),ACt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,fCt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,pk=(e,t)=>t==="foreground"?e:"bg"+e[0].toUpperCase()+e.slice(1);mB.default=(e,t,r)=>{if(!t)return e;if(t in dB.default){let a=pk(t,r);return dB.default[a](e)}if(t.startsWith("#")){let a=pk("hex",r);return dB.default[a](t)(e)}if(t.startsWith("ansi")){let a=fCt.exec(t);if(!a)return e;let n=pk(a[1],r),u=Number(a[2]);return dB.default[n](u)(e)}if(t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("hsv")||t.startsWith("hwb")){let a=ACt.exec(t);if(!a)return e;let n=pk(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return dB.default[n](u,A,p)(e)}return e}});var QIe=_(yB=>{"use strict";var bIe=yB&&yB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yB,"__esModule",{value:!0});var pCt=bIe(gIe()),Iq=bIe(Cq());yB.default=(e,t,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=pCt.default[r.style.borderStyle],p=Iq.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Iq.default(A.vertical,u,"foreground")+`
|
|||
|
`).repeat(n-2),C=Iq.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(e,t,p,{transformers:[]}),o.write(e,t+1,h,{transformers:[]}),o.write(e+a-1,t+1,h,{transformers:[]}),o.write(e,t+n-1,C,{transformers:[]})}}});var FIe=_(EB=>{"use strict";var fm=EB&&EB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(EB,"__esModule",{value:!0});var hCt=fm(Am()),gCt=fm(iq()),dCt=fm(AIe()),mCt=fm(uq()),yCt=fm(fIe()),ECt=fm(fq()),CCt=fm(QIe()),ICt=(e,t)=>{var r;let o=(r=e.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();t=`
|
|||
|
`.repeat(n)+dCt.default(t,a)}return t},kIe=(e,t,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&e.internal_static)return;let{yogaNode:p}=e;if(p){if(p.getDisplay()===hCt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),C=n+p.getComputedTop(),w=u;if(typeof e.internal_transform=="function"&&(w=[e.internal_transform,...u]),e.nodeName==="ink-text"){let v=ECt.default(e);if(v.length>0){let b=gCt.default(v),E=yCt.default(p);if(b>E){let R=(o=e.style.textWrap)!==null&&o!==void 0?o:"wrap";v=mCt.default(v,E,R)}v=ICt(e,v),t.write(h,C,v,{transformers:w})}return}if(e.nodeName==="ink-box"&&CCt.default(h,C,e,t),e.nodeName==="ink-root"||e.nodeName==="ink-box")for(let v of e.childNodes)kIe(v,t,{offsetX:h,offsetY:C,transformers:w,skipStaticElements:A})}};EB.default=kIe});var TIe=_((dJt,RIe)=>{"use strict";RIe.exports=e=>{e=Object.assign({onlyFirst:!1},e);let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}});var NIe=_((mJt,wq)=>{"use strict";var wCt=TIe(),LIe=e=>typeof e=="string"?e.replace(wCt(),""):e;wq.exports=LIe;wq.exports.default=LIe});var UIe=_((yJt,OIe)=>{"use strict";var MIe="[\uD800-\uDBFF][\uDC00-\uDFFF]";OIe.exports=e=>e&&e.exact?new RegExp(`^${MIe}$`):new RegExp(MIe,"g")});var HIe=_((EJt,Bq)=>{"use strict";var BCt=NIe(),vCt=UIe(),_Ie=e=>BCt(e).replace(vCt()," ").length;Bq.exports=_Ie;Bq.exports.default=_Ie});var jIe=_(CB=>{"use strict";var GIe=CB&&CB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(CB,"__esModule",{value:!0});var qIe=GIe(lq()),DCt=GIe(HIe()),vq=class{constructor(t){this.writes=[];let{width:r,height:o}=t;this.width=r,this.height=o}write(t,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:t,y:r,text:o,transformers:n})}get(){let t=[];for(let o=0;o<this.height;o++)t.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
|
|||
|
`),h=0;for(let C of p){let w=t[n+h];if(!w)continue;let v=DCt.default(C);for(let b of A)C=b(C);t[n+h]=qIe.default(w,0,a)+C+qIe.default(w,a+v),h++}}return{output:t.map(o=>o.trimRight()).join(`
|
|||
|
`),height:t.length}}};CB.default=vq});var KIe=_(IB=>{"use strict";var Dq=IB&&IB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(IB,"__esModule",{value:!0});var PCt=Dq(Am()),WIe=Dq(FIe()),YIe=Dq(jIe());IB.default=(e,t)=>{var r;if(e.yogaNode.setWidth(t),e.yogaNode){e.yogaNode.calculateLayout(void 0,void 0,PCt.default.DIRECTION_LTR);let o=new YIe.default({width:e.yogaNode.getComputedWidth(),height:e.yogaNode.getComputedHeight()});WIe.default(e,o,{skipStaticElements:!0});let a;!((r=e.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new YIe.default({width:e.staticNode.yogaNode.getComputedWidth(),height:e.staticNode.yogaNode.getComputedHeight()}),WIe.default(e.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
|
|||
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var XIe=_((wJt,VIe)=>{"use strict";var JIe=ye("stream"),zIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Pq={},SCt=e=>{let t=new JIe.PassThrough,r=new JIe.PassThrough;t.write=a=>e("stdout",a),r.write=a=>e("stderr",a);let o=new console.Console(t,r);for(let a of zIe)Pq[a]=console[a],console[a]=o[a];return()=>{for(let a of zIe)console[a]=Pq[a];Pq={}}};VIe.exports=SCt});var xq=_(Sq=>{"use strict";Object.defineProperty(Sq,"__esModule",{value:!0});Sq.default=new WeakMap});var Qq=_(bq=>{"use strict";Object.defineProperty(bq,"__esModule",{value:!0});var xCt=$r(),ZIe=xCt.createContext({exit:()=>{}});ZIe.displayName="InternalAppContext";bq.default=ZIe});var Fq=_(kq=>{"use strict";Object.defineProperty(kq,"__esModule",{value:!0});var bCt=$r(),$Ie=bCt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});$Ie.displayName="InternalStdinContext";kq.default=$Ie});var Tq=_(Rq=>{"use strict";Object.defineProperty(Rq,"__esModule",{value:!0});var QCt=$r(),ewe=QCt.createContext({stdout:void 0,write:()=>{}});ewe.displayName="InternalStdoutContext";Rq.default=ewe});var Nq=_(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});var kCt=$r(),twe=kCt.createContext({stderr:void 0,write:()=>{}});twe.displayName="InternalStderrContext";Lq.default=twe});var hk=_(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});var FCt=$r(),rwe=FCt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});rwe.displayName="InternalFocusContext";Mq.default=rwe});var iwe=_((bJt,nwe)=>{"use strict";var RCt=/[|\\{}()[\]^$+*?.-]/g;nwe.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(RCt,"\\$&")}});var lwe=_((QJt,awe)=>{"use strict";var TCt=iwe(),LCt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",owe=[].concat(ye("module").builtinModules,"bootstrap_node","node").map(e=>new RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));owe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var wB=class{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=wB.nodeInternals()),"cwd"in t||(t.cwd=LCt),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,NCt(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...owe]}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 o=!1,a=null,n=[];return t.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
|
|||
|
`).join("")}captureString(t,r=this.captureString){typeof t=="function"&&(r=t,t=1/0);let{stackTraceLimit:o}=Error;t&&(Error.stackTraceLimit=t);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(t,r=this.capture){typeof t=="function"&&(r=t,t=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,t&&(Error.stackTraceLimit=t);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(t=this.at){let[r]=this.capture(1,t);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};swe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(t){let r=t&&t.match(MCt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],C=r[8],w=r[9],v=r[10]==="native",b=r[11]===")",E,R={};if(C&&(R.line=Number(C)),w&&(R.column=Number(w)),b&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let z=h.slice(0,U-1);h=h.slice(U+1),a+=` (${z}`;break}}if(a){let N=a.match(OCt);N&&(a=N[1],E=N[2])}return swe(R,h,this._cwd),o&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=A,R.evalColumn=p,R.evalFile=u&&u.replace(/\\/g,"/")),v&&(R.native=!0),a&&(R.function=a),E&&a!==E&&(R.method=E),R}};function swe(e,t,r){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${r}/`)&&(t=t.slice(r.length+1)),e.file=t)}function NCt(e){if(e.length===0)return[];let t=e.map(r=>TCt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var MCt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),OCt=/^(.*?) \[as (.*?)\]$/;awe.exports=wB});var uwe=_((kJt,cwe)=>{"use strict";cwe.exports=(e,t)=>e.replace(/^\t+/gm,r=>" ".repeat(r.length*(t||2)))});var fwe=_((FJt,Awe)=>{"use strict";var UCt=uwe(),_Ct=(e,t)=>{let r=[],o=e-t,a=e+t;for(let n=o;n<=a;n++)r.push(n);return r};Awe.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=UCt(e).split(/\r?\n/),!(t>e.length))return r={around:3,...r},_Ct(t,r.around).filter(o=>e[o-1]!==void 0).map(o=>({line:o,value:e[o-1]}))}});var gk=_(cu=>{"use strict";var HCt=cu&&cu.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),qCt=cu&&cu.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),GCt=cu&&cu.__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)&&HCt(t,e,r);return qCt(t,e),t},jCt=cu&&cu.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r};Object.defineProperty(cu,"__esModule",{value:!0});var pwe=GCt($r()),Oq=pwe.forwardRef((e,t)=>{var{children:r}=e,o=jCt(e,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||
|
|||
|
`).slice(1):void 0,r=t?mwe.parseLine(t[0]):void 0,o,a=0;if(r?.file&&r?.line&&gwe.existsSync(r.file)){let n=gwe.readFileSync(r.file,"utf8");if(o=zCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return hs.default.createElement(ep.default,{flexDirection:"column",padding:1},hs.default.createElement(ep.default,null,hs.default.createElement(dA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),hs.default.createElement(dA.default,null," ",e.message)),r&&hs.default.createElement(ep.default,{marginTop:1},hs.default.createElement(dA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&hs.default.createElement(ep.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>hs.default.createElement(ep.default,{key:n},hs.default.createElement(ep.default,{width:a+1},hs.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," "),":")),hs.default.createElement(dA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),e.stack&&hs.default.createElement(ep.default,{marginTop:1,flexDirection:"column"},e.stack.split(`
|
|||
|
`).slice(1).map(n=>{let u=mwe.parseLine(n);return u?hs.default.createElement(ep.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},u.function),hs.default.createElement(dA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):hs.default.createElement(ep.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},n))})))};uu.default=VCt});var Cwe=_(Au=>{"use strict";var XCt=Au&&Au.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),ZCt=Au&&Au.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$Ct=Au&&Au.__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)&&XCt(t,e,r);return ZCt(t,e),t},hm=Au&&Au.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Au,"__esModule",{value:!0});var pm=$Ct($r()),Ewe=hm(O6()),eIt=hm(Qq()),tIt=hm(Fq()),rIt=hm(Tq()),nIt=hm(Nq()),iIt=hm(hk()),sIt=hm(ywe()),oIt=" ",aIt="\x1B[Z",lIt="\x1B",dk=class extends pm.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===lIt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(t===oIt&&this.focusNext(),t===aIt&&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.focusNext=()=>{this.setState(t=>{let r=t.focusables[0].id;return{activeFocusId:this.findNextFocusable(t)||r}})},this.focusPrevious=()=>{this.setState(t=>{let r=t.focusables[t.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(t)||r}})},this.addFocusable=(t,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=t),{activeFocusId:a,focusables:[...o.focusables,{id:t,isActive:!0}]}})},this.removeFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==t)}))},this.activateFocusable=t=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==t?o:{id:t,isActive:!0})}))},this.deactivateFocusable=t=>{this.setState(r=>({activeFocusId:r.activeFocusId===t?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==t?o:{id:t,isActive:!1})}))},this.findNextFocusable=t=>{let r=t.focusables.findIndex(o=>o.id===t.activeFocusId);for(let o=r+1;o<t.focusables.length;o++)if(t.focusables[o].isActive)return t.focusables[o].id},this.findPreviousFocusable=t=>{let r=t.focusables.findIndex(o=>o.id===t.activeFocusId);for(let o=r-1;o>=0;o--)if(t.focusables[o].isActive)return t.focusables[o].id}}static getDerivedStateFromError(t){return{error:t}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return pm.default.createElement(eIt.default.Provider,{value:{exit:this.handleExit}},pm.default.createElement(tIt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},pm.default.createElement(rIt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},pm.default.createElement(nIt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},pm.default.createElement(iIt.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}},this.state.error?pm.default.createElement(sIt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){Ewe.default.hide(this.props.stdout)}componentWillUnmount(){Ewe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(t){this.handleExit(t)}};Au.default=dk;dk.displayName="InternalApp"});var Bwe=_(fu=>{"use strict";var cIt=fu&&fu.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),uIt=fu&&fu.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),AIt=fu&&fu.__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)&&cIt(t,e,r);return uIt(t,e),t},pu=fu&&fu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fu,"__esModule",{value:!0});var fIt=pu($r()),Iwe=kO(),pIt=pu(lCe()),hIt=pu(R6()),gIt=pu(hCe(
|
|||
|
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(GC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(hIt.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},dIt.default(this),this.options=t,this.rootNode=CIt.createNode("ink-root"),this.rootNode.onRender=t.debug?this.onRender:Iwe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=pIt.default.create(t.stdout),this.throttledLog=t.debug?this.log:Iwe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=qq.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=yIt.default(this.unmount,{alwaysLast:!1}),t.patchConsole&&this.patchConsole(),GC||(t.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{t.stdout.off("resize",this.onRender)})}render(t){let r=fIt.default.createElement(wIt.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);qq.default.updateContainer(r,this.container,null,wwe)}writeToStdout(t){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(t+this.fullStaticOutput+this.lastOutput);return}if(GC){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(GC){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(),GC?this.options.stdout.write(this.lastOutput+`
|
|||
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,qq.default.updateContainer(null,this.container,null,wwe),IIt.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(){!GC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=EIt.default((t,r)=>{t==="stdout"&&this.writeToStdout(r),t==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};fu.default=Gq});var Dwe=_(DB=>{"use strict";var vwe=DB&&DB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(DB,"__esModule",{value:!0});var BIt=vwe(Bwe()),mk=vwe(xq()),vIt=ye("stream"),DIt=(e,t)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},PIt(t)),o=SIt(r.stdout,()=>new BIt.default(r));return o.render(e),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>mk.default.delete(r.stdout),clear:o.clear}};DB.default=DIt;var PIt=(e={})=>e instanceof vIt.Stream?{stdout:e,stdin:process.stdin}:e,SIt=(e,t)=>{let r;return mk.default.has(e)?r=mk.default.get(e):(r=t(),mk.default.set(e,r)),r}});var Swe=_(tp=>{"use strict";var xIt=tp&&tp.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),bIt=tp&&tp.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),QIt=tp&&tp.__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)&&xIt(t,e,r);return bIt(t,e),t};Object.defineProperty(tp,"__esModule",{value:!0});var PB=QIt($r()),Pwe=e=>{let{items:t,children:r,style:o}=e,[a,n]=PB.useState(0),u=PB.useMemo(()=>t.slice(a),[t,a]);PB.useLayoutEffect(()=>{n(t.length)},[t.length]);let A=u.map((h,C)=>r(h,a+C)),p=PB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return PB.default.createElement("ink-box",{internal_static:!0,style:p},A)};Pwe.displayName="Static";tp.default=Pwe});var bwe=_(SB=>{"use strict";var kIt=SB&&SB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(SB,"__esModule",{value:!0});var FIt=kIt($r()),xwe=({children:e,transform:t})=>e==null?null:FIt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:t},e);xwe.displayName="Transform";SB.default=xwe});var kwe=_(xB=>{"use strict";var RIt=xB&&xB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xB,"__esModule",{value:!0});var TIt=RIt($r()),Qwe=({count:e=1})=>TIt.default.createElement("ink-text",null,`
|
|||
|
`.repeat(e));Qwe.displayName="Newline";xB.default=Qwe});var Twe=_(bB=>{"use strict";var Fwe=bB&&bB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bB,"__esModule",{value:!0});var LIt=Fwe($r()),NIt=Fwe(gk()),Rwe=()=>LIt.default.createElement(NIt.default,{flexGrow:1});Rwe.displayName="Spacer";bB.default=Rwe});var yk=_(QB=>{"use strict";var MIt=QB&&QB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(QB,"__esModule",{value:!0});var OIt=$r(),UIt=MIt(Fq()),_It=()=>OIt.useContext(UIt.default);QB.default=_It});var Nwe=_(kB=>{"use strict";var HIt=kB&&kB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kB,"__esModule",{value:!0});var Lwe=$r(),qIt=HIt(yk()),GIt=(e,t={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=qIt.default();Lwe.useEffect(()=>{if(t.isActive!==!1)return o(!0),()=>{o(!1)}},[t.isActive,o]),Lwe.useEffect(()=>{if(t.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",C=A>="\u0410"&&A<="\u042F";A.length===1&&(h||C)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&e(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[t.isActive,r,a,e])};kB.default=GIt});var Mwe=_(FB=>{"use strict";var jIt=FB&&FB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(FB,"__esModule",{value:!0});var WIt=$r(),YIt=jIt(Qq()),KIt=()=>WIt.useContext(YIt.default);FB.default=KIt});var Owe=_(RB=>{"use strict";var JIt=RB&&RB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(RB,"__esModule",{value:!0});var zIt=$r(),VIt=JIt(Tq()),XIt=()=>zIt.useContext(VIt.default);RB.default=XIt});var Uwe=_(TB=>{"use strict";var ZIt=TB&&TB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TB,"__esModule",{value:!0});var $It=$r(),ewt=ZIt(Nq()),twt=()=>$It.useContext(ewt.default);TB.default=twt});var Hwe=_(NB=>{"use strict";var _we=NB&&NB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(NB,"__esModule",{value:!0});var LB=$r(),rwt=_we(hk()),nwt=_we(yk()),iwt=({isActive:e=!0,autoFocus:t=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=nwt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=LB.useContext(rwt.default),h=LB.useMemo(()=>Math.random().toString().slice(2,7),[]);return LB.useEffect(()=>(n(h,{autoFocus:t}),()=>{u(h)}),[h,t]),LB.useEffect(()=>{e?A(h):p(h)},[e,h]),LB.useEffect(()=>{if(!(!r||!e))return o(!0),()=>{o(!1)}},[e]),{isFocused:Boolean(h)&&a===h}};NB.default=iwt});var qwe=_(MB=>{"use strict";var swt=MB&&MB.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(MB,"__esModule",{value:!0});var owt=$r(),awt=swt(hk()),lwt=()=>{let e=owt.useContext(awt.default);return{enableFocus:e.enableFocus,disableFocus:e.disableFocus,focusNext:e.focusNext,focusPrevious:e.focusPrevious}};MB.default=lwt});var Gwe=_(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});jq.default=e=>{var t,r,o,a;return{width:(r=(t=e.yogaNode)===null||t===void 0?void 0:t.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=e.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var Ac=_(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});var cwt=Dwe();Object.defineProperty(to,"render",{enumerable:!0,get:function(){return cwt.default}});var uwt=gk();Object.defineProperty(to,"Box",{enumerable:!0,get:function(){return uwt.default}});var Awt=Hq();Object.defineProperty(to,"Text",{enumerable:!0,get:function(){return Awt.default}});var
|
|||
|
`:"";return u?w+=`@IF EXIST ${u} (\r
|
|||
|
${u} ${p} ${a} ${C}%*\r
|
|||
|
) ELSE (\r
|
|||
|
@SETLOCAL\r
|
|||
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
|||
|
${A} ${p} ${a} ${C}%*\r
|
|||
|
)\r
|
|||
|
`:w+=`@${A} ${p} ${a} ${C}%*\r
|
|||
|
`,w}function L1t(e,t,r){let o=fc.relative(fc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=fc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=T9(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",C=`#!/bin/sh
|
|||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
|||
|
|
|||
|
case \`uname\` in
|
|||
|
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
|
|||
|
esac
|
|||
|
|
|||
|
`,w=r.nodePath?`export NODE_PATH="${p}"
|
|||
|
`:"";return n?C+=`${w}if [ -x ${n} ]; then
|
|||
|
exec ${n} ${A} ${o} ${h}"$@"
|
|||
|
else
|
|||
|
exec ${a} ${A} ${o} ${h}"$@"
|
|||
|
fi
|
|||
|
`:C+=`${w}${a} ${A} ${o} ${h}"$@"
|
|||
|
exit $?
|
|||
|
`,C}function N1t(e,t,r){let o=fc.relative(fc.dirname(t),e),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=fc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=T9(r.nodePath),C=h.win32,w=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
|
|||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|||
|
|
|||
|
$exe=""
|
|||
|
${r.nodePath?`$env_node_path=$env:NODE_PATH
|
|||
|
$env:NODE_PATH="${C}"
|
|||
|
`:""}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&&(b+=` else {
|
|||
|
$env:NODE_PATH="${w}"
|
|||
|
}`),u?b+=`
|
|||
|
$ret=0
|
|||
|
if (Test-Path ${u}) {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${u} ${p} ${o} ${v}$args
|
|||
|
} else {
|
|||
|
& ${u} ${p} ${o} ${v}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
} else {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${p} ${o} ${v}$args
|
|||
|
} else {
|
|||
|
& ${n} ${p} ${o} ${v}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $ret
|
|||
|
`:b+=`
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${p} ${o} ${v}$args
|
|||
|
} else {
|
|||
|
& ${n} ${p} ${o} ${v}$args
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $LASTEXITCODE
|
|||
|
`,b}function M1t(e,t){return t.fs_.chmod(e,493)}function T9(e){if(!e)return{win32:"",posix:""};let t=typeof e=="string"?e.split(fc.delimiter):Array.from(e),r={};for(let o=0;o<t.length;o++){let a=t[o].split("/").join("\\"),n=o2e()?t[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):t[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}l2e.exports=R9});var z9=_((N$t,Q2e)=>{Q2e.exports=ye("stream")});var T2e=_((M$t,R2e)=>{"use strict";function k2e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function a2t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k2e(Object(r),!0).forEach(function(o){l2t(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k2e(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function l2t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c2t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F2e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u2t(e,t,r){return t&&F2e(e.prototype,t),r&&F2e(e,r),e}var A2t=ye("buffer"),_k=A2t.Buffer,f2t=ye("util"),V9=f2t.inspect,p2t=V9&&V9.custom||"inspect";function h2t(e,t,r){_k.prototype.copy.call(e,t,r)}R2e.exports=function(){function e(){c2t(this,e),this.head=null,this.tail=null,this.length=0}return u2t(e,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++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 o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return _k.alloc(0);for(var o=_k.allocUnsafe(r>>>0),a=this.head,n=0;a;)h2t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){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=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=_k.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:p2t,value:function(r,o){return V9(this,a2t({},o,{depth:0,customInspect:!1}))}}]),e}()});var Z9=_((O$t,N2e)=>{"use strict";function g2t(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(X9,this,e)):process.nextTick(X9,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,functio
|
|||
|
`)),e.linkname&&(t+=PG(" linkpath="+e.linkname+`
|
|||
|
`));var r=e.pax;if(r)for(var o in r)t+=PG(" "+o+"="+r[o]+`
|
|||
|
`);return Buffer.from(t)};nI.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var o=parseInt(e.slice(0,r).toString(),10);if(!o)return t;var a=e.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return t;t[a.slice(0,n)]=a.slice(n+1),e=e.slice(o)}return t};nI.encode=function(e){var t=cvt(512),r=e.name,o="";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;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(N0(e.mode&gvt,6),100),t.write(N0(e.uid,6),108),t.write(N0(e.gid,6),116),t.write(N0(e.size,11),124),t.write(N0(e.mtime.getTime()/1e3|0,11),136),t[156]=NBe+yvt(e.type),e.linkname&&t.write(e.linkname,157),MBe.copy(t,Sv),fvt.copy(t,SG),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(N0(e.devmajor||0,6),329),t.write(N0(e.devminor||0,6),337),o&&t.write(o,345),t.write(N0(UBe(t),6),148),t)};nI.decode=function(e,t,r){var o=e[156]===0?0:e[156]-NBe,a=rI(e,0,100,t),n=M0(e,100,8),u=M0(e,108,8),A=M0(e,116,8),p=M0(e,124,12),h=M0(e,136,12),C=mvt(o),w=e[157]===0?null:rI(e,157,100,t),v=rI(e,265,32),b=rI(e,297,32),E=M0(e,329,8),R=M0(e,337,8),N=UBe(e);if(N===8*32)return null;if(N!==M0(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(MBe.compare(e,Sv,Sv+6)===0)e[345]&&(a=rI(e,345,155,t)+"/"+a);else if(!(pvt.compare(e,Sv,Sv+6)===0&&hvt.compare(e,SG,SG+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:C,linkname:w,uname:v,gname:b,devmajor:E,devminor:R}}});var YBe=_((ier,WBe)=>{var HBe=ye("util"),Cvt=LBe(),xv=xG(),qBe=tI().Writable,GBe=tI().PassThrough,jBe=function(){},_Be=function(e){return e&=511,e&&512-e},Ivt=function(e,t){var r=new rF(e,t);return r.end(),r},wvt=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},rF=function(e,t){this._parent=e,this.offset=t,GBe.call(this,{autoDestroy:!1})};HBe.inherits(rF,GBe);rF.prototype.destroy=function(e){this._parent.destroy(e)};var ap=function(e){if(!(this instanceof ap))return new ap(e);qBe.call(this,e),e=e||{},this._offset=0,this._buffer=Cvt(),this._missing=0,this._partial=!1,this._onparse=jBe,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,o=function(){t._continue()},a=function(v){if(t._locked=!1,v)return t.destroy(v);t._stream||o()},n=function(){t._stream=null;var v=_Be(t._header.size);v?t._parse(v,u):t._parse(512,w),t._locked||o()},u=function(){t._buffer.consume(_Be(t._header.size)),t._parse(512,w),o()},A=function(){var v=t._header.size;t._paxGlobal=xv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=t._header.size;t._pax=xv.decodePax(r.slice(0,v)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(v),n()},h=function(){var v=t._header.size;this._gnuLongPath=xv.decodeLongPath(r.slice(0,v),e.filenameEncoding),r.consume(v),n()},C=function(){var v=t._header.size;this._gnuLongLinkPath=xv.decodeLongPath(r.slice(0,v),e.filenameEncoding),r.consume(v),n()},w=function(){var v=t._offset,b;try{b=t._header=xv.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(E){t.emit("error",E)}if(r.consume(512),!b){t._parse(512,w),o();return}if(b.type==="gnu-long-path"){t._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){t._parse(b.size,C),o();return}if(b.type==="pax-global-header"){t._parse(b.size,A),o();return}if(b.type==="pax-header"){t._parse(b.size,p),o();return}if(t._gnuLongPath&&(b.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(b.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=b=wvt(b,t._pax),t._pax
|
|||
|
Wanted: ${r.size}
|
|||
|
Found: ${e.length}`);throw A.code="EBADSIZE",A.found=e.length,A.expected=r.size,A.sri=t,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${t}, but got ${n}. (${e.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=t,A.algorithm=o,A.sri=t,A}}DA.exports.checkStream=$vt;function $vt(e,t,r){r=sa(r);let o=r.Promise||Promise,a=UG(r.concat({integrity:t}));return new o((n,u)=>{e.pipe(a),e.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}DA.exports.integrityStream=UG;function UG(e){e=sa(e);let t=e.integrity&&vA(e.integrity,e),r=t&&Object.keys(t).length,o=r&&t.pickAlgorithm(e),a=r&&t[o],n=Array.from(new Set(e.algorithms.concat(o?[o]:[]))),u=n.map(kv.createHash),A=0,p=new jvt({transform(h,C,w){A+=h.length,u.forEach(v=>v.update(h,C)),w(null,h,C)}}).on("end",()=>{let h=e.options&&e.options.length?`?${e.options.join("?")}`:"",C=vA(u.map((v,b)=>`${n[b]}-${v.digest("base64")}${h}`).join(" "),e),w=r&&C.match(t,e);if(typeof e.size=="number"&&A!==e.size){let v=new Error(`stream size mismatch when checking ${t}.
|
|||
|
Wanted: ${e.size}
|
|||
|
Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=e.size,v.sri=t,p.emit("error",v)}else if(e.integrity&&!w){let v=new Error(`${t} integrity checksum failed when using ${o}: wanted ${a} but got ${C}. (${A} bytes)`);v.code="EINTEGRITY",v.found=C,v.expected=a,v.algorithm=o,v.sri=t,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",C),w&&p.emit("verified",w)});return p}DA.exports.create=eDt;function eDt(e){e=sa(e);let t=e.algorithms,r=e.options.length?`?${e.options.join("?")}`:"",o=t.map(kv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return t.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new U0(`${A}-${p}${r}`,e);if(h.algorithm&&h.digest){let C=h.algorithm;u[C]||(u[C]=[]),u[C].push(h)}return u},new bm)}}}var tDt=new Set(kv.getHashes()),hve=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(e=>tDt.has(e));function rDt(e,t){return hve.indexOf(e.toLowerCase())>=hve.indexOf(t.toLowerCase())?e:t}});var Yve=_((Rir,Wve)=>{var tPt=dN();function rPt(e){return tPt(e)?void 0:e}Wve.exports=rPt});var Jve=_((Tir,Kve)=>{var nPt=Zx(),iPt=X8(),sPt=tH(),oPt=Kd(),aPt=dd(),lPt=Yve(),cPt=j_(),uPt=V8(),APt=1,fPt=2,pPt=4,hPt=cPt(function(e,t){var r={};if(e==null)return r;var o=!1;t=nPt(t,function(n){return n=oPt(n,e),o||(o=n.length>1),n}),aPt(e,uPt(e),r),o&&(r=iPt(r,APt|fPt|pPt,lPt));for(var a=t.length;a--;)sPt(r,t[a]);return r});Kve.exports=hPt});Ke();Ke();Dt();var Z_=ye("child_process"),Zhe=tt($g());Ht();var $_=ye("fs");var hC=new Map([]);function sft(e){let t=Ae.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,Z_.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,Z_.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}async function pQ({binaryVersion:e,pluginConfiguration:t}){async function r(){let a=new Po({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});try{await o(a)}catch(n){process.stdout.write(a.error(n)),process.exitCode=1}}async function o(a){let n=process.versions.node,u=">=18.12.0";if(!He.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!Pr.satisfiesWithPrereleases(n,u))throw new at(`This tool requires a Node version compatible with ${u} (got ${n}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let p=await Je.find(Ae.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),h=p.get("yarnPath"),C=p.get("ignorePath"),w=p.get("ignoreCwd"),v=Ae.toPortablePath(Ae.resolve(process.argv[1])),b=R=>oe.readFilePromise(R).catch(()=>Buffer.of());if(!C&&!w&&await(async()=>h&&(h===v||Buffer.compare(...await Promise.all([b(h),b(v)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await o(a);return}else if(h!==null&&!C)if(!oe.existsSync(h))process.stdout.write(a.error(new Error(`The "yarn-path" option has been set (in ${p.sources.get("yarnPath")}), but the specified location doesn't exist (${h}).`))),process.exitCode=1;else try{sft(h)}catch(R){process.exitCode=R.code||1}else{C&&delete process.env.YARN_IGNORE_PATH,p.get("enableTelemetry")&&!Zhe.isCI&&process.stdout.isTTY&&(Je.telemetry=new pC(p,"puba9cdc10ec5790a2cf4969dd413a47270")),Je.telemetry?.reportVersion(e);for(let[$,ae]of p.plugins.entries()){hC.has($.match(/^@yarnpkg\/plugin-(.*)$/)?.[1]??"")&&Je.telemetry?.reportPluginName($);for(let pe of ae.commands||[])a.register(pe)}let N={cwd:Ae.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},U=a.process(process.argv.slice(2),N);U.help||Je.telemetry?.reportCommandName(U.path.join(" "));let z=U.cwd;if(typeof z<"u"&&!w){let $=(0,$_.realpathSync)(process.cwd()),ae=(0,$_.realpathSync)(z);if($!==ae){process.chdir(z),await r();return}}await a.runExit(U,N)}}return r().catch(a=>{process.stdout.write(a.stack||a.message),process.exitCode=1}).finally(()=>oe.rmtempPromise())}var n2={};Yt(n2,{BaseCommand:()=>
|
|||
|
Try running the command again with the package name prefixed: ${me.pretty(r,"yarn add",me.Type.CODE)} ${me.pretty(r,W.makeDescriptor(W.makeIdent(null,"my-package"),`${$[0]}...`),me.Type.DESCRIPTOR)}`);if(!z)throw new at(`The ${me.pretty(r,U,me.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ae=xpt(a,z,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ae.map(async de=>{let ve=await A2(z,{project:o,workspace:a,cache:n,fixed:u,target:de,modifier:h,strategies:C,maxResults:w});return{request:z,suggestedDescriptors:ve,target:de}}))})).then(U=>U.flat()),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:z,suggestedDescriptors:{suggestions:$,rejections:ae}}of v)if($.filter(de=>de.descriptor!==null).length===0){let[de]=ae;if(typeof de>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${W.prettyDescriptor(r,z)} can't be resolved to a satisfying range`):U.reportError(27,`${W.prettyDescriptor(r,z)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(de)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:z}of v){let $,ae=U.filter(ce=>ce.descriptor!==null),pe=ae[0].descriptor,de=ae.every(ce=>W.areDescriptorsEqual(ce.descriptor,pe));ae.length===1||de?$=pe:(E=!0,{answer:$}=await(0,_ge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:ce,name:ge,reason:Oe})=>ce?{name:ge,hint:Oe,descriptor:ce}:{name:ge,hint:Oe,disabled:!0}),onCancel:()=>process.exit(130),result(ce){return this.find(ce,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ve=a.manifest[z].get($.identHash);(typeof ve>"u"||ve.descriptorHash!==$.descriptorHash)&&(a.manifest[z].set($.identHash,$),this.optional&&(z==="dependencies"?a.manifest.ensureDependencyMeta({...$,range:"unknown"}).optional=!0:z==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...$,range:"unknown"}).optional=!0)),typeof ve>"u"?R.push([a,z,$,C]):N.push([a,z,ve,$]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,R),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),E&&this.context.stdout.write(`
|
|||
|
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};Qh.paths=[["add"]],Qh.usage=st.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\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 For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the curre
|
|||
|
`),0}return(await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await nn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((C,w)=>Math.max(C,w.length),0);for(let[C,[w,v]]of A)u.reportJson({name:C,source:W.stringifyIdent(w),path:v});if(this.verbose)for(let[C,[w]]of A)u.reportInfo(null,`${C.padEnd(h," ")} ${W.prettyLocator(r,w)}`);else for(let C of A.keys())u.reportInfo(null,C)})).exitCode()}};kh.paths=[["bin"]],kh.usage=st.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"]]});Ke();Dt();Ht();var Fh=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=await Ur.find(r);return(await Rt.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await oe.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await oe.removePromise(o.cwd)})).exitCode()}};Fh.paths=[["cache","clean"],["cache","clear"]],Fh.usage=st.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"]]});Ke();Ht();var qge=tt(f2()),J8=ye("util"),Rh=class extends At{constructor(){super(...arguments);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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new at(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=He.convertMapsToIndexableObjects(u),p=a?(0,qge.default)(A,a):A,h=await Rt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async C=>{C.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
|
|||
|
`),h.exitCode();J8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,J8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
|
|||
|
`)}return h.exitCode()}};Rh.paths=[["config","get"]],Rh.usage=st.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"]]});Ke();Ht();var Fde=tt(Z8()),Rde=tt(f2()),Tde=tt($8()),eH=ye("util"),Th=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new at("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 at(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new at("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?E=>Je.updateHomeConfiguration(E):E=>Je.updateConfiguration(o(),E))(E=>{if(n){let R=(0,Fde.default)(E);return(0,Tde.default)(R,this.name,A),R}else return{...E,[a]:A}});let C=(await Je.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=He.convertMapsToIndexableObjects(C),v=n?(0,Rde.default)(w,n):w;return(await Rt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async E=>{eH.inspect.styles.name="cyan",E.reportInfo(0,`Successfully set ${this.name} to ${(0,eH.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Th.paths=[["config","set"]],Th.usage=st.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"`]]});Ke();Ht();var Wde=tt(Z8()),Yde=tt(Ode()),Kde=tt(rH()),Lh=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new at("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 at(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Je.updateHomeConfiguration(h):h=>Je.updateConfiguration(o(),h);return(await Rt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let C=!1;await A(w=>{if(!(0,Yde.default)(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),C=!0,w;let v=n?(0,Wde.default)(w):{...w};return(0,Kde.default)(v,this.name),v}),C||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Lh.paths=[["config","unset"]],Lh.usage=st.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"]]});Ke();Ke();Ht();var nH=ye("util"),Nh=class extends At{constructor(){super(...arguments);this.verbose=he.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=he.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{if(r.invalid.size>0&&!this.json){for(let[n,u]of r.invalid)a.reportError(34,`Invalid configuration key "${n}" in ${u}`);a.reportSeparator()}if(this.json){let n=He.sortMap(r.settings.keys(),u=>u);for(let u of n){let A=r.settings.get(u),p=r.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),h=r.sources.get(u);this.verbose?a.reportJson({key:u,effective:p,source:h}):a.reportJson({key:u,effective:p,source:h,...A})}}else{let n=He.sortMap(r.settings.keys(),p=>p),u=n.reduce((p,h)=>Math.max(p,h.length),0),A={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let p=n.map(C=>{let w=r.settings.get(C);if(!w)throw new Error(`Assertion failed: This settings ("${C}") should have been registered`);let v=this.why?r.sources.get(C)||"<default>":w.description;return[C,v]}),h=p.reduce((C,[,w])=>Math.max(C,w.length),0);for(let[C,w]of p)a.reportInfo(null,`${C.padEnd(u," ")} ${w.padEnd(h," ")} ${(0,nH.inspect)(r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),A)}`)}else for(let p of n)a.reportInfo(null,`${p.padEnd(u," ")} ${(0,nH.inspect)(r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),A)}`)}})).exitCode()}};Nh.paths=[["config"]],Nh.usage=st.Usage({description:"display the current configuration",details:`
|
|||
|
This command prints the current active configuration settings.
|
|||
|
`,examples:[["Print the active configuration settings","$0 config"]]});Ke();Ht();sl();var BQ={};Yt(BQ,{Strategy:()=>p2,acceptedStrategies:()=>ugt,dedupe:()=>iH});Ke();Ke();var Jde=tt(Zo()),p2=(t=>(t.HIGHEST="highest",t))(p2||{}),ugt=new Set(Object.values(p2)),Agt={highest:async(e,t,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of e.storedResolutions){let C=e.storedDescriptors.get(p);if(typeof C>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);He.getSetWithDefault(u,C.identHash).add(h)}let A=new Map(He.mapAndFilter(e.storedDescriptors.values(),p=>W.isVirtualDescriptor(p)?He.mapAndFilter.skip:[p.descriptorHash,He.makeDeferred()]));for(let p of e.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let C=e.storedResolutions.get(p.descriptorHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=e.originalPackages.get(C);if(typeof w>"u")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),b=Object.fromEntries(await He.allSettledSafe(Object.entries(v).map(async([$,ae])=>{let pe=A.get(ae.descriptorHash);if(typeof pe>"u")throw new Error(`Assertion failed: The descriptor (${ae.descriptorHash}) should have been registered`);let de=await pe.promise;if(!de)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[$,de.updatedPackage]})));if(t.length&&!Jde.default.isMatch(W.stringifyIdent(p),t)||!r.shouldPersistResolution(w,a))return w;let E=u.get(p.identHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(E.size===1)return w;let R=[...E].map($=>{let ae=e.originalPackages.get($);if(typeof ae>"u")throw new Error(`Assertion failed: The package (${$}) should have been registered`);return ae}),N=await r.getSatisfying(p,b,R,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return w;let z=e.originalPackages.get(U.locatorHash);if(typeof z>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return z}).then(async v=>{let b=await e.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:v,resolvedPackage:b})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function iH(e,{strategy:t,patterns:r,cache:o,report:a}){let{configuration:n}=e,u=new Qi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:e.storedChecksums,fetcher:p,project:e,report:u,cacheOptions:{skipIntegrityCheck:!0}},C={project:e,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=Agt[t],v=await w(e,r,{resolver:A,resolveOptions:C,fetcher:p,fetchOptions:h}),b=Xs.progressViaCounter(v.length);await a.reportProgress(b);let E=0;await Promise.all(v.map(U=>U.then(z=>{if(z===null||z.currentPackage.locatorHash===z.updatedPackage.locatorHash)return;E++;let{descriptor:$,currentPackage:ae,updatedPackage:pe}=z;a.reportInfo(0,`${W.prettyDescriptor(n,$)} can be deduped from ${W.prettyLocator(n,ae)} to ${W.prettyLocator(n,pe)}`),a.reportJson({descriptor:W.stringifyDescriptor($),currentResolution:W.stringifyLocator(ae),updatedResolution:W.stringifyLocator(pe)}),e.storedResolutions.set($.descriptorHash,pe.locatorHash)}).finally(()=>b.tick())));let R;switch(E){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${E} packages`}let N=me.pretty(n,t,me.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),E})}var Mh=class extends At{constructor(){super(...arguments);this.strategy=he.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Js(p2)});this.check=he.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates ar
|
|||
|
`)}};Xd.paths=[["--clipanion=definitions"]];var Zd=class extends At{async execute(){this.context.stdout.write(this.cli.usage(null))}};Zd.paths=[["help"],["--help"],["-h"]];Ke();Dt();Ht();var EC=class extends At{constructor(){super(...arguments);this.leadingArgument=he.String();this.args=he.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!W.tryParseIdent(this.leadingArgument)){let r=J.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])}};Ke();var $d=class extends At{async execute(){this.context.stdout.write(`${An||"<unknown>"}
|
|||
|
`)}};$d.paths=[["-v"],["--version"]];Ke();Ke();Ht();var Oh=class extends At{constructor(){super(...arguments);this.commandName=he.String();this.args=he.Proxy()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState(),await nn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Oh.paths=[["exec"]],Oh.usage=st.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"']]});Ke();Ht();sl();var Uh=class extends At{constructor(){super(...arguments);this.hash=he.String({required:!1,validator:td(Dy(),[sw(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await pgt(this.hash,o,{stdout:this.context.stdout}):(await Rt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=[([,A])=>W.stringifyLocator(o.storedPackages.get(A.subject)),([,A])=>W.stringifyIdent(A.requested)];for(let[A,p]of He.sortMap(o.peerRequirements,u)){let h=o.storedPackages.get(p.subject);if(typeof h>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=o.storedPackages.get(p.rootRequester);if(typeof C>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let w=h.dependencies.get(p.requested.identHash)??null,v=me.pretty(r,A,me.Type.CODE),b=W.prettyLocator(r,h),E=W.prettyIdent(r,p.requested),R=W.prettyIdent(r,C),N=p.allRequesters.length-1,U=`descendant${N===1?"":"s"}`,z=N>0?` and ${N} ${U}`:"",$=w!==null?"provides":"doesn't provide";n.reportInfo(null,`${v} \u2192 ${b} ${$} ${E} to ${R}${z}`)}})).exitCode()}};Uh.paths=[["explain","peer-requirements"]],Uh.usage=st.Usage({description:"explain a set of peer requirements",details:`
|
|||
|
A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
|
|||
|
|
|||
|
When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
|
|||
|
|
|||
|
When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
|
|||
|
|
|||
|
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
|||
|
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function pgt(e,t,r){let{configuration:o}=t,a=t.peerRequirements.get(e);if(typeof a>"u")throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await Rt.start({configuration:o,stdout:r.stdout,includeFooter:!1},async u=>{let A=t.storedPackages.get(a.subject);if(typeof A>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let p=t.storedPackages.get(a.rootRequester);if(typeof p>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let h=A.dependencies.get(a.requested.identHash)??null,C=h!==null?t.storedResolutions.get(h.descriptorHash):null;if(typeof C>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let w=C!==null?t.storedPackages.get(C):null;if(typeof w>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let v=[...a.allRequesters.values()].map(U=>{let z=t.storedPackages.get(U);if(typeof z>"u")throw new Error("Assertion failed: Expected the package to be registered");let $=W.devirtualizeLocator(z),ae=t.storedPackages.get($.locatorHash);if(typeof ae>"u")throw new Error("Assertion failed: Expected the package to be registered");let pe=ae.peerDependencies.get(a.requested.identHash);if(typeof pe>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:z,peerDependency:pe}});if(w!==null){let U=v.every(({peerDependency:z})=>Pr.satisfiesWithPrereleases(w.version,z.range));u.reportInfo(0,`${W.prettyLocator(o,A)} provides ${W.prettyLocator(o,w)} with version ${W.prettyReference(o,w.version??"<missing>")}, which ${U?"satisfies":"doesn't satisfy"} the following requirements:`)}else u.reportInfo(0,`${W.prettyLocator(o,A)} doesn't provide ${W.prettyIdent(o,a.requested)}, breaking the following requirements:`);u.reportSeparator();let b=me.mark(o),E=[];for(let{pkg:U,peerDependency:z}of He.sortMap(v,$=>W.stringifyLocator($.pkg))){let ae=(w!==null?Pr.satisfiesWithPrereleases(w.version,z.range):!1)?b.Check:b.Cross;E.push({stringifiedLocator:W.stringifyLocator(U),prettyLocator:W.prettyLocator(o,U),prettyRange:W.prettyRange(o,z.range),mark:ae})}let R=Math.max(...E.map(({stringifiedLocator:U})=>U.length)),N=Math.max(...E.map(({prettyRange:U})=>U.length));for(let{stringifiedLocator:U,prettyLocator:z,prettyRange:$,mark:ae}of He.sortMap(E,({stringifiedLocator:pe})=>pe))u.reportInfo(null,`${z.padEnd(R+(z.length-U.length)," ")} \u2192 ${$.padEnd(N," ")} ${ae}`);E.length>1&&(u.reportSeparator(),u.reportInfo(0,`Note: these requirements start with ${W.prettyLocator(t.configuration,p)}`))})).exitCode()}Ke();Ht();sl();Ke();Ke();Dt();Ht();var Vde=tt(jn()),_h=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(J.contains(p,A))return 0}let o=()=>{if(typeof An>"u")throw new at("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:An??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await h2(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await h2(r,"canary"));else if(this.ver
|
|||
|
${t}`)})}let A=e.projectCwd??e.startingCwd,p=J.resolve(A,".yarn/releases"),h=J.resolve(p,`yarn-${t}.cjs`),C=J.relative(e.startingCwd,h),w=He.isTaggedYarnVersion(t),v=e.get("yarnPath"),b=!w,E=b||!!v||!!a;if(a===!1){if(b)throw new Jt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");E=!1}else!E&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${me.applyHyperlink(e,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${me.applyHyperlink(e,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),E=!0);if(E){let $=await u();o.reportInfo(0,`Saving the new release in ${me.pretty(e,C,"magenta")}`),await oe.removePromise(J.dirname(h)),await oe.mkdirPromise(J.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,$,{mode:493}),await Je.updateConfiguration(A,{yarnPath:J.relative(A,h)})}else await oe.removePromise(J.dirname(h)),await Je.updateConfiguration(A,{yarnPath:Je.deleteProperty});let R=await Lt.tryFind(A)||new Lt;R.packageManager=`yarn@${w?t:await h2(e,"stable")}`;let N={};R.exportTo(N);let U=J.join(A,Lt.fileName),z=`${JSON.stringify(N,null,R.indent)}
|
|||
|
`;return await oe.changeFilePromise(U,z,{automaticNewlines:!0}),{bundleVersion:t}}function Xde(e){return dr[gP(e)]}var ggt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function dgt(e){let r=`https://repo.yarnpkg.com/${He.isTaggedYarnVersion(An)?An:await h2(e,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await an.get(r,{configuration:e});return new Map(Array.from(o.toString().matchAll(ggt),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Xde(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 Hh=class extends At{constructor(){super(...arguments);this.code=he.String({required:!1,validator:td(Dy(),[sw(/^YN[0-9]{4}$/)])});this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Xde(this.code),a=me.pretty(r,o,me.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await dgt(r)).get(this.code),p=typeof A<"u"?me.jsonOrPretty(this.json,r,me.tuple(me.Type.MARKDOWN,{text:A,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}:
|
|||
|
${me.jsonOrPretty(this.json,r,me.tuple(me.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
|
|||
|
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
|
|||
|
`):this.context.stdout.write(`${n}
|
|||
|
|
|||
|
${p}
|
|||
|
`)}else{let o={children:He.mapAndFilter(Object.entries(dr),([a,n])=>Number.isNaN(Number(a))?He.mapAndFilter.skip:{label:zu(Number(a)),value:me.tuple(me.Type.CODE,n)})};ra.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Hh.paths=[["explain"]],Hh.usage=st.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"]]});Ke();Dt();Ht();var Zde=tt(Zo()),qh=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a&&!this.all)throw new $t(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(ae,{recursive:pe})=>{let de=ae.anchoredLocator.locatorHash,ve=new Map,ce=[de];for(;ce.length>0;){let ge=ce.shift();if(ve.has(ge))continue;let Oe=o.storedPackages.get(ge);if(typeof Oe>"u")throw new Error("Assertion failed: Expected the package to be registered");if(ve.set(ge,Oe),W.isVirtualLocator(Oe)&&ce.push(W.devirtualizeLocator(Oe).locatorHash),!(!pe&&ge!==de))for(let g of Oe.dependencies.values()){let Ie=o.storedResolutions.get(g.descriptorHash);if(typeof Ie>"u")throw new Error("Assertion failed: Expected the resolution to be registered");ce.push(Ie)}}return ve.values()},p=({recursive:ae})=>{let pe=new Map;for(let de of o.workspaces)for(let ve of A(de,{recursive:ae}))pe.set(ve.locatorHash,ve);return pe.values()},h=({all:ae,recursive:pe})=>ae&&pe?o.storedPackages.values():ae?p({recursive:pe}):A(a,{recursive:pe}),C=({all:ae,recursive:pe})=>{let de=h({all:ae,recursive:pe}),ve=this.patterns.map(Oe=>{let g=W.parseLocator(Oe),Ie=Zde.default.makeRe(W.stringifyIdent(g)),xe=W.isVirtualLocator(g),le=xe?W.devirtualizeLocator(g):g;return ne=>{let ee=W.stringifyIdent(ne);if(!Ie.test(ee))return!1;if(g.reference==="unknown")return!0;let Ee=W.isVirtualLocator(ne),Qe=Ee?W.devirtualizeLocator(ne):ne;return!(xe&&Ee&&g.reference!==ne.reference||le.reference!==Qe.reference)}}),ce=He.sortMap([...de],Oe=>W.stringifyLocator(Oe));return{selection:ce.filter(Oe=>ve.length===0||ve.some(g=>g(Oe))),sortedLookup:ce}},{selection:w,sortedLookup:v}=C({all:this.all,recursive:this.recursive});if(w.length===0)throw new at("No package matched your request");let b=new Map;if(this.dependents)for(let ae of v)for(let pe of ae.dependencies.values()){let de=o.storedResolutions.get(pe.descriptorHash);if(typeof de>"u")throw new Error("Assertion failed: Expected the resolution to be registered");He.getArrayWithDefault(b,de).push(ae)}let E=new Map;for(let ae of v){if(!W.isVirtualLocator(ae))continue;let pe=W.devirtualizeLocator(ae);He.getArrayWithDefault(E,pe.locatorHash).push(ae)}let R={},N={children:R},U=r.makeFetcher(),z={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new Qi,cacheOptions:{skipIntegrityCheck:!0}},$=[async(ae,pe,de)=>{if(!pe.has("manifest"))return;let ve=await U.fetch(ae,z),ce;try{ce=await Lt.find(ve.prefixPath,{baseFs:ve.packageFs})}finally{ve.releaseFs?.()}de("Manifest",{License:me.tuple(me.Type.NO_HINT,ce.license),Homepage:me.tuple(me.Type.URL,ce.raw.homepage??null)})},async(ae,pe,de)=>{if(!pe.has("cache"))return;let ve={mockedPackages:o.disabledLocators,unstablePack
|
|||
|
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"]]});Ke();Ht();var Yh=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=await Je.findRcFiles(this.context.cwd);return(await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(!!u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await an.get(A.spec,{configuration:r}),h=mn.makeHash(p);if(A.checksum===h)continue;let C=me.pretty(r,A.path,me.Type.PATH),w=me.pretty(r,A.spec,me.Type.URL),v=`${C} is different from the file provided by ${w}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Yh.paths=[["plugin","check"]],Yh.usage=st.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"]]});Ke();Ke();Dt();Ht();var ime=ye("os");Ke();Dt();Ht();var $de=ye("os");Ke();ql();Ht();var Igt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function em(e,t){let r=await an.get(Igt,{configuration:e}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!t||Pr.satisfiesWithPrereleases(t,n.range??"<4.0.0-rc.1")))}var Kh=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await em(r,An);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};Kh.paths=[["plugin","list"]],Kh.usage=st.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"]]});var wgt=/^[0-9]+$/;function eme(e){return wgt.test(e)?`pull/${e}/head`:e}var Bgt=({repository:e,branch:t},r)=>[["git","init",Ae.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin","--depth=1",eme(t)],["git","reset","--hard","FETCH_HEAD"]],vgt=({branch:e})=>[["git","fetch","origin","--depth=1",eme(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],Dgt=({plugins:e,noMinify:t},r,o)=>[["yarn","build:cli",...new Array().concat(...e.map(a=>["--plugin",J.resolve(o,a)])),...t?["--no-minify"]:[],"|"],["mv","packages/yarnpkg-cli/bundles/yarn.js",Ae.fromPortablePath(r),"|"]],Jh=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.installPath<"u"?J.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):J.resolve(Ae.toPortablePath((0,$de.tmpdir)()),"yarnpkg-sources",mn.makeHash(this.repository).slice(0,6));return(await Rt.start({configuration:r,stdout:this.context.stdout},async u=>{await aH(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Rr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);oe.existsSync(p)||(await g2(Dgt(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await oe.readFilePromise(p);if(!this.dryRun){let{bundleVersion:C}=await sH(r,null,async()=>h,{report:u});this.skipPlugins||await Pgt(this,C,{project:o,report:u,target:a})}})).exitCode()}};Jh.paths=[["set","version","from","sources"]],Jh.usage=st.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 function g2(e,{configuration:t,context:r,target:o}){for(let[a,...n]of e){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Rr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${me.pretty(t,` $ ${[a,...n].join(" ")}`,"grey")}
|
|||
|
`);try{await Rr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function aH(e,{configuration:t,report:r,target:o}){let a=!1;if(!e.force&&oe.existsSync(J.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await g2(vgt(e),{configuration:t,context:e.context,target:o}),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 oe.removePromise(o),await oe.mkdirPromise(o,{recursive:!0}),await g2(Bgt(e,o),{configuration:t,context:e.context,target:o}))}async function Pgt(e,t,{project:r,report:o,target:a}){let n=await em(r.configuration,t),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await lH(A,e,{project:r,report:o,target:a})}Ke();Ke();Dt();Ht();var tme=tt(jn()),rme=ye("url"),nme=ye("vm");var zh=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Rt.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Pt.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,Ae.toPortablePath(this.name));a.reportInfo(0,`Reading ${me.pretty(r,p,me.Type.PATH)}`),u=J.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new rme.URL(this.name)}catch{throw new Jt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=W.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!tme.default.valid(h.reference))throw new Jt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let C=W.stringifyIdent(h),w=await em(r,An);if(!Object.prototype.hasOwnProperty.call(w,C)){let v=`Couldn't find a plugin named ${W.prettyIdent(r,h)} on the remote registry.
|
|||
|
`;throw r.plugins.has(C)?v+=`A plugin named ${W.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${me.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",me.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${me.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",me.Type.URL)}).`,new Jt(51,v)}u=C,p=w[C].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${C}/${h.reference}/`):An!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${An}/`))}a.reportInfo(0,`Downloading ${me.pretty(r,p,"green")}`),A=await an.get(p,{configuration:r})}await cH(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};zh.paths=[["plugin","import"]],zh.usage=st.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 function cH(e,t,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,nme.runInNewContext)(t.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,C=J.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${me.pretty(n,h,"magenta")}`),await oe.mkdirPromise(J.dirname(C),{recursive:!0}),await oe.writeFilePromise(C,t);let w={path:h,spec:e};r&&(w.checksum=mn.makeHash(t)),await Je.addPlugin(o.cwd,[w])}var Sgt=({pluginName:e,noMinify:t},r)=>[["yarn",`build:${e}`,...t?["--no-minify"]:[],"|"]],Vh=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?J.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):J.resolve(Ae.toPortablePath((0,ime.tmpdir)()),"yarnpkg-sources",mn.makeHash(this.repository).slice(0,6));return(await Rt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await Pt.find(r,this.context.cwd),A=W.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=W.stringifyIdent(A),h=await em(r,An);if(!Object.prototype.hasOwnProperty.call(h,p))throw new Jt(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 C=p;await aH(this,{configuration:r,report:n,target:o}),await lH(C,this,{project:u,report:n,target:o})})).exitCode()}};Vh.paths=[["plugin","import","from","sources"]],Vh.usage=st.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 function lH(e,{context:t,noMinify:r},{project:o,report:a,target:n}){let u=e.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await g2(Sgt({pluginName:u,noMinify:r},n),{configuration:A,context:t,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${u}/bundles/${e}.js`),h=await oe.readFilePromise(p);await cH(e,h,{project:o,report:a})}Ke();Dt();Ht();var Xh=class extends At{constructor(){super(...arguments);this.name=he.String()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd);return(await Rt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=W.parseIdent(u);if(!r.plugins.has(u))throw new at(`${W.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=J.resolve(o.cwd,p);oe.existsSync(h)&&(n.reportInfo(0,`Removing ${me.pretty(r,p,me.Type.PATH)}...`),await oe.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Je.updateConfiguration(o.cwd,{plugins:C=>{if(!Array.isArray(C))return C;let w=C.filter(v=>v.path!==p);return w.length===0?Je.deleteProperty:w.length===C.length?C:w}})})).exitCode()}};Xh.paths=[["plugin","remove"]],Xh.usage=st.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"]]});Ke();Ht();var Zh=class extends At{constructor(){super(...arguments);this.json=he.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};Zh.paths=[["plugin","runtime"]],Zh.usage=st.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"]]});Ke();Ke();Ht();var $h=class extends At{constructor(){super(...arguments);this.idents=he.Rest()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new $t(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(W.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Qi}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};$h.paths=[["rebuild"]],$h.usage=st.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"]]});Ke();Ke();Ke();Ht();var uH=tt(Zo());sl();var e0=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:Js(yl)});this.patterns=he.Rest()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new $t(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,C=[];for(let E of this.patterns){let R=!1,N=W.parseIdent(E);for(let U of u){let z=[...U.manifest.peerDependenciesMeta.keys()];for(let $ of(0,uH.default)(z,E))U.manifest.peerDependenciesMeta.delete($),h=!0,R=!0;for(let $ of A){let ae=U.manifest.getForScope($),pe=[...ae.values()].map(de=>W.stringifyIdent(de));for(let de of(0,uH.default)(pe,W.stringifyIdent(N))){let{identHash:ve}=W.parseIdent(de),ce=ae.get(ve);if(typeof ce>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[$].delete(ve),C.push([U,$,ce]),h=!0,R=!0}}}R||p.push(E)}let w=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new at(`${w} ${me.prettyList(r,p,me.Type.CODE)} ${v} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(E=>E.afterWorkspaceDependencyRemoval,C),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};e0.paths=[["remove"]],e0.usage=st.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}'"]]});Ke();Ke();var sme=ye("util"),tm=class extends At{async execute(){let t=await Je.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await Pt.find(t,this.context.cwd);if(!o)throw new $t(r.cwd,this.context.cwd);return(await Rt.start({configuration:t,stdout:this.context.stdout},async n=>{let u=o.manifest.scripts,A=He.sortMap(u.keys(),C=>C),p={breakLength:1/0,colors:t.get("enableColors"),maxArrayLength:2},h=A.reduce((C,w)=>Math.max(C,w.length),0);for(let[C,w]of u.entries())n.reportInfo(null,`${C.padEnd(h," ")} ${(0,sme.inspect)(w,p)}`)})).exitCode()}};tm.paths=[["run"]];Ke();Ke();Ht();var t0=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await Pt.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await nn.hasPackageScript(u,this.scriptName,{project:o}))return await nn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await nn.getPackageAccessibleBinaries(u,{project:o});if(A.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 nn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let C=(await Promise.all(o.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(C.length===1)return await nn.executeWorkspaceScript(C[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 at(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.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 at(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new at("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[C,w]of hC)for(let v
|
|||
|
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"]]});Ke();Ke();Ht();var r0=class extends At{constructor(){super(...arguments);this.save=he.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=he.String();this.resolution=he.String()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new $t(o.cwd,this.context.cwd);let u=W.parseDescriptor(this.descriptor,!0),A=W.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};r0.paths=[["set","resolution"]],r0.usage=st.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, add the `-s,--save` flag which will also edit the `resolutions` field from 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 1.5.0"]]});Ke();Dt();Ht();var ome=tt(Zo()),n0=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new $t(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,Ae.toPortablePath(p));if(He.isPathLike(p)){let C=await Je.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:v}=await Pt.find(C,h);if(!v)throw new $t(w.cwd,h);if(this.all){for(let b of w.workspaces)b.manifest.name&&A.add(W.stringifyIdent(b.locator));if(A.size===0)throw new at("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new at("The target workspace doesn't have a name and thus cannot be unlinked");A.add(W.stringifyIdent(v.locator))}}else{let C=[...u.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,ome.default)(C,p))A.add(w)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};n0.paths=[["unlink"]],n0.usage=st.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}'"]]});Ke();Ke();Ke();Ht();var ame=tt(l2()),AH=tt(Zo());sl();var Xf=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.mode=he.String("--mode",{description:"Change what artifacts installs generate",validator:Js(yl)});this.patterns=he.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new $t(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(C=>W.stringifyIdent(C)),p=new Set;for(let C of this.patterns){if(W.parseDescriptor(C).range!=="unknown")throw new at("Ranges aren't allowed when using --recursive");for(let w of(0,AH.default)(A,C)){let v=W.parseIdent(w);p.add(v.identHash)}}let h=u.filter(C=>p.has(C.identHash));for(let C of h)o.storedDescriptors.delete(C.descriptorHash),o.storedResolutions.delete(C.descriptorHash);return await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}async executeUpClassic(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new $t(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=u2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],C=[],w=[];for(let N of this.patterns){let U=!1,z=W.parseDescriptor(N),$=W.stringifyIdent(z);for(let ae of o.workspaces)for(let pe of["dependencies","devDependencies"]){let ve=[...ae.manifest.getForScope(pe).values()].map(ge=>W.stringifyIdent(ge)),ce=$==="*"?ve:(0,AH.default)(ve,$);for(let ge of ce){let Oe=W.parseIdent(ge),g=ae.manifest[pe].get(Oe.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ie=W.makeDescriptor(Oe,z.range);C.push(Promise.resolve().then(async()=>[ae,pe,g,await A2(Ie,{project:o,workspace:ae,cache:n,target:pe,fixed:u,modifier:p,strategies:h})])),U=!0}}U||w.push(N)}if(w.length>1)throw new at(`Patterns ${me.prettyList(r,w,me.Type.CODE)} don't match any packages referenced by any workspace`);if(w.length>0)throw new at(`Pattern ${me.prettyList(r,w,me.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(C),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:z,rejections:$}]of v){let ae=z.filter(pe=>pe.descriptor!==null);if(ae.length===0){let[pe]=$;if(typeof pe>"u")throw new Error("Assertion failed: Expected an error to have been set");let de=this.cli.error(pe);o.configuration.get("enableNetwork")?N.reportError(27,`${W.prettyDescriptor(r,U)} can't be resolved to a satisfying range
|
|||
|
|
|||
|
${de}`):N.reportError(27,`${W.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
|||
|
|
|||
|
${de}`)}else ae.length>1&&!A&&N.reportError(27,`${W.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[];for(let[N,U,,{suggestions:z}]of v){let $,ae=z.filter(ce=>ce.descriptor!==null),pe=ae[0].descriptor,de=ae.every(ce=>W.areDescriptorsEqual(ce.descriptor,pe));ae.length===1||de?$=pe:(E=!0,{answer:$}=await(0,ame.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${W.prettyWorkspace(r,N)} \u276F ${U}?`,choices:z.map(({descriptor:ce,name:ge,reason:Oe})=>ce?{name:ge,hint:Oe,descriptor:ce}:{name:ge,hint:Oe,disabled:!0}),onCancel:()=>process.exit(130),result(ce){return this.find(ce,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ve=N.manifest[U].get($.identHash);if(typeof ve>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ve.descriptorHash!==$.descriptorHash)N.manifest[U].set($.identHash,$),R.push([N,U,ve,$]);else{let ce=r.makeResolver(),ge={project:o,resolver:ce},Oe=r.normalizeDependency(ve),g=ce.bindDescriptor(Oe,N.anchoredLocator,ge);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),E&&this.context.stdout.write(`
|
|||
|
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Xf.paths=[["up"]],Xf.usage=st.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 listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors 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.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Xf.schema=[zT("recursive",Kp.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ke();Ke();Ke();Ht();var i0=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a
|
|||
|
This command prints the exact reasons why a package appears in the dependency tree.
|
|||
|
|
|||
|
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"]]});function xgt(e,t,{configuration:r,peers:o}){let a=He.sortMap(e.storedPackages.values(),A=>W.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let C of A.dependencies.values()){if(!o&&A.peerDependencies.has(C.identHash))continue;let w=e.storedResolutions.get(C.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let v=e.storedPackages.get(w);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==t)continue;{let E=W.stringifyLocator(A);n[E]={value:[A,me.Type.LOCATOR],children:p}}let b=W.stringifyLocator(v);p[b]={value:[{descriptor:C,locator:v},me.Type.DEPENDENT]}}}return u}function bgt(e,t,{configuration:r,peers:o}){let a=He.sortMap(e.workspaces,v=>W.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===t)return u.add(v.locatorHash),!0;let b=!1;v.identHash===t&&(b=!0);for(let E of v.dependencies.values()){if(!o&&v.peerDependencies.has(E.identHash))continue;let R=e.storedResolutions.get(E.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=e.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(b=!0)}return b&&u.add(v.locatorHash),b};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},C={children:h},w=(v,b,E)=>{if(!u.has(v.locatorHash))return;let R=E!==null?me.tuple(me.Type.DEPENDENT,{locator:v,descriptor:E}):me.tuple(me.Type.LOCATOR,v),N={},U={value:R,children:N},z=W.stringifyLocator(v);if(b[z]=U,!p.has(v.locatorHash)&&(p.add(v.locatorHash),!(E!==null&&e.tryWorkspaceByLocator(v))))for(let $ of v.dependencies.values()){if(!o&&v.peerDependencies.has($.identHash))continue;let ae=e.storedResolutions.get($.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let pe=e.storedPackages.get(ae);if(!pe)throw new Error("Assertion failed: The package should have been registered");w(pe,N,$)}};for(let v of a)w(v.anchoredPackage,h,null);return C}Ke();var IH={};Yt(IH,{GitFetcher:()=>y2,GitResolver:()=>E2,default:()=>Vgt,gitUtils:()=>na});Ke();Dt();var na={};Yt(na,{TreeishProtocols:()=>d2,clone:()=>CH,fetchBase:()=>bme,fetchChangedFiles:()=>Qme,fetchChangedWorkspaces:()=>Jgt,fetchRoot:()=>xme,isGitUrl:()=>IC,lsRemote:()=>Sme,normalizeLocator:()=>Kgt,normalizeRepoUrl:()=>m2,resolveUrl:()=>EH,splitRepoUrl:()=>s0,validateRepoUrl:()=>yH});Ke();Dt();Ht();var vme=tt(Ime()),Dme=tt(qU()),CC=tt(ye("querystring")),dH=tt(jn());function gH(e,t,r){let o=e.indexOf(r);return e.lastIndexOf(t,o>-1?o:1/0)}function wme(e){try{return new URL(e)}catch{return}}function Wgt(e){let t=gH(e,"@","#"),r=gH(e,":","#");return r>t&&(e=`${e.slice(0,r)}/${e.slice(r+1)}`),gH(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`ssh://${e}`),e}function Bme(e){return wme(e)||wme(Wgt(e))}function Pme(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Ygt=[/^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\/(.+)?$/],d2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(d2||{});function IC(e){return e?Ygt.some(t=>!!e.match(t)):!1}function s0(e){e=m2(e);let t=e.indexOf("#");if(t===-1)return{repo:e,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=e.slice(0,t),o=e.slice(t+1);if(o.match(/^[a-z]+=/)){let a=CC.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(d2).find(p=>Object.prototype.hasOwnProperty.call(a,p)),[u,A]=typeof n<"u"?[n,a
|
|||
|
- ${p.join(`
|
|||
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};a0.paths=[["workspace"]],a0.usage=st.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
|
|||
|
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"]]});var Xgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:kme.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:[Fh,Rh,Th,Lh,r0,Jh,_h,o0,Xd,Zd,EC,$d,Qh,kh,Nh,Mh,Oh,Uh,Hh,qh,Gh,jh,n0,Wh,Yh,Vh,zh,Xh,Kh,Zh,$h,e0,tm,t0,Xf,i0,a0]},Zgt=Xgt;var SH={};Yt(SH,{default:()=>edt});Ke();var bt={optional:!0},BH=[["@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:bt,zenObservable:bt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:bt,zenObservable:bt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:bt}}],["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"]:bt,["postcss-jsx"]:bt,["postcss-less"]:bt,["postcss-markdown"]:bt,["postcss-scss"]:bt}}],["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:bt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:bt}}],["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:bt,"vue-template-compiler":bt}}],["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"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:bt,"utf-8-validate":bt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependen
|
|||
|
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, _, _).'"]]});function vdt(e){return typeof e!="string"?`${e}`:e.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?e:`'${e}'`}function Ddt(e,t){let r=e===0,o=e===t-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ke();Ht();var p0=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"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(S2(),P2)),o=await Je.find(this.context.cwd,this.context.plugins),{project:a}=await Pt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};p0.paths=[["constraints","source"]],p0.usage=st.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"]]});Ke();Ke();Ht();w2();var h0=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=await o.loadUserConfig(),n;if(a?.constraints)n=new wC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(S2(),P2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let C=await n.process();if(!C)break;let{changedWorkspaces:w,remainingErrors:v}=DQ(o,C,{fix:this.fix}),b=[];for(let[E,R]of w){let N=E.manifest.indent;E.manifest=new Lt,E.manifest.indent=N,E.manifest.load(R),b.push(E.persistManifest())}if(!(w.size>0&&h>1)){u=qme(v,{configuration:r}),A=!1,p=!0;for(let[,E]of v)for(let R of E)R.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${me.pretty(r,"yarn constraints --fix",me.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${me.pretty(r,"yarn constraints --fix",me.Type.CODE)}`;await Rt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async C=>{C.reportInfo(0,h),C.reportSeparator()})}return u.children=He.sortMap(u.children,h=>h.value[1]),ra.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};h0.paths=[["constraints"]],h0.usage=st.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"]]});w2();var Pdt={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:[f0,p0,h0],hooks:{async validateProjectAfterInstall(e,{reportError:t}){if(!e.configuration.get("enableConstraintsChecks"))return;let r=await e.loadUserConfig(),o;if(r?.constraints)o=new wC(e);else{let{Constraints:u}=await Promise.resolve().then(()=>(S2(),P2));o=await u.find(e)}let a=await o.process();if(!a)return;let{remainingErrors:n}=DQ(e,a);if(n.size!==0)if(e.configuration.isCI)for(let[u,A]of n)for(let p of A)t(84,`${me.pretty(e.configuration,u.locator,me.Type.IDENT)}: ${p.text}`);else t(84,`Constraint check failed; run ${me.pretty(e.configuration,"yarn constraints",me.Type.CODE)} for more details`)}}},Sdt=Pdt;var WH={};Yt(WH,{CreateCommand:()=>sm,DlxCommand:()=>g0,default:()=>bdt});Ke();Ht();var sm=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()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=W.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?W.makeIdent(a.scope,`create-${a.name}`):W.makeIdent(null,`create-${a.name}`),u=W.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};sm.paths=[["create"]];Ke();Ke();Dt();Ht();var g0=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()}async execute(){return Je.telemetry=null,await oe.mktempPromise(async r=>{let o=J.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(J.join(o,"package.json"),`{}
|
|||
|
`),await oe.writeFilePromise(J.join(o,"yarn.lock"),"");let a=J.join(o,".yarnrc.yml"),n=await Je.findProjectCwd(this.context.cwd,Nr.lockfile),A={enableGlobalCache:!(await Je.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:zu(68),level:me.LogLevel.Discard}]},p=n!==null?J.join(n,".yarnrc.yml"):null;p!==null&&oe.existsSync(p)?(await oe.copyFilePromise(p,a),await Je.updateConfiguration(o,N=>{let U=He.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(z=>{let $=typeof z=="string"?z:z.path,ae=Ae.isAbsolute($)?$:Ae.resolve(Ae.fromPortablePath(n),$);return typeof z=="string"?ae:{path:ae,spec:z.spec}})),U})):await oe.writeJsonPromise(a,A);let h=this.packages??[this.command],C=W.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
|
|||
|
`);let v=await Je.find(o,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,o);if(E===null)throw new $t(b.cwd,o);await b.restoreInstallState();let R=await nn.getWorkspaceAccessibleBinaries(E);return R.has(C)===!1&&R.size===1&&typeof this.packages>"u"&&(C=Array.from(R)[0][0]),await nn.executeWorkspaceAccessibleBinary(E,C,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};g0.paths=[["dlx"]],g0.usage=st.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-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var xdt={commands:[sm,g0]},bdt=xdt;var JH={};Yt(JH,{ExecFetcher:()=>b2,ExecResolver:()=>Q2,default:()=>Fdt,execUtils:()=>bQ});Ke();Ke();Dt();var hA="exec:";var bQ={};Yt(bQ,{loadGeneratorFile:()=>x2,makeLocator:()=>KH,makeSpec:()=>hye,parseSpec:()=>YH});Ke();Dt();function YH(e){let{params:t,selector:r}=W.parseRange(e),o=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?W.parseLocator(t.locator):null,path:o}}function hye({parentLocator:e,path:t,generatorHash:r,protocol:o}){let a=e!==null?{locator:W.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return W.makeRange({protocol:o,source:t,selector:t,params:{...n,...a}})}function KH(e,{parentLocator:t,path:r,generatorHash:o,protocol:a}){return W.makeLocator(e,hye({parentLocator:t,path:r,generatorHash:o,protocol:a}))}async function x2(e,t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e,{protocol:t}),n=J.isAbsolute(a)?{packageFs:new un(It.root),prefixPath:It.dot,localPath:It.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var b2=class{supports(t,r){return!!t.reference.startsWith(hA)}getLocalPath(t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t.reference,{protocol:hA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t),loader:()=>this.fetchFromDisk(t,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:u}}async fetchFromDisk(t,r){let o=await x2(t.reference,hA,r);return oe.mktempPromise(async a=>{let n=J.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,t,n,r),!oe.existsSync(J.join(u,"build")))throw new Error("The script should have generated a build directory");return await zi.makeArchiveFromDirectory(J.join(u,"build"),{prefixPath:W.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(t,r,o,a){return await oe.mktempPromise(async n=>{let u=await nn.makeScriptEnv({project:a.project,binFolder:n}),A=J.join(t,"runtime.js");return await oe.mktempPromise(async p=>{let h=J.join(p,"buildfile.log"),C=J.join(t,"generator"),w=J.join(t,"build");await oe.mkdirPromise(C),await oe.mkdirPromise(w);let v={tempDir:Ae.fromPortabl
|
|||
|
// 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(v)},
|
|||
|
},
|
|||
|
enumerable: true,
|
|||
|
});
|
|||
|
`);let b=u.NODE_OPTIONS||"",E=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(E," ").trim(),u.NODE_OPTIONS=b;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${W.stringifyLocator(r)})
|
|||
|
`,prefix:W.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Rr.pipevp(process.execPath,["--require",Ae.fromPortablePath(A),Ae.fromPortablePath(o),W.stringifyIdent(r)],{cwd:t,env:u,stdin:null,stdout:R,stderr:N});if(U!==0)throw oe.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${me.pretty(a.project.configuration,h,me.Type.PATH)})`)})})}};Ke();Ke();var Qdt=2,Q2=class{supportsDescriptor(t,r){return!!t.range.startsWith(hA)}supportsLocator(t,r){return!!t.reference.startsWith(hA)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return W.bindDescriptor(t,{locator:W.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=YH(t.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await x2(W.makeRange({protocol:hA,source:a,selector:a,params:{locator:W.stringifyLocator(n)}}),hA,o.fetchOptions),A=mn.makeHash(`${Qdt}`,u).slice(0,6);return[KH(t,{parentLocator:n,path:a,generatorHash:A,protocol:hA})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await He.releaseAfterUseAsync(async()=>await Lt.find(o.prefixPath,{baseFs:o.packageFs}),o.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 kdt={fetchers:[b2],resolvers:[Q2]},Fdt=kdt;var VH={};Yt(VH,{FileFetcher:()=>T2,FileResolver:()=>L2,TarballFileFetcher:()=>N2,TarballFileResolver:()=>M2,default:()=>Ldt,fileUtils:()=>om});Ke();Dt();var PC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,k2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Ui="file:";var om={};Yt(om,{fetchArchiveFromLocator:()=>R2,makeArchiveFromLocator:()=>QQ,makeBufferFromLocator:()=>zH,makeLocator:()=>SC,makeSpec:()=>gye,parseSpec:()=>F2});Ke();Dt();function F2(e){let{params:t,selector:r}=W.parseRange(e),o=Ae.toPortablePath(r);return{parentLocator:t&&typeof t.locator=="string"?W.parseLocator(t.locator):null,path:o}}function gye({parentLocator:e,path:t,hash:r,protocol:o}){let a=e!==null?{locator:W.stringifyLocator(e)}:{},n=typeof r<"u"?{hash:r}:{};return W.makeRange({protocol:o,source:t,selector:t,params:{...n,...a}})}function SC(e,{parentLocator:t,path:r,hash:o,protocol:a}){return W.makeLocator(e,gye({parentLocator:t,path:r,hash:o,protocol:a}))}async function R2(e,t){let{parentLocator:r,path:o}=W.parseFileStyleRange(e.reference,{protocol:Ui}),a=J.isAbsolute(o)?{packageFs:new un(It.root),prefixPath:It.dot,localPath:It.root}:await t.fetcher.fetch(r,t),n=a.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=J.join(n.prefixPath,o);return await He.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function QQ(e,{protocol:t,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=W.parseFileStyleRange(e.reference,{protocol:t}),u=J.isAbsolute(n)?{packageFs:new un(It.root),prefixPath:It.dot,localPath:It.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=J.join(A.prefixPath,n);return await He.releaseAfterUseAsync(async()=>await zi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:W.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function zH(e,{protocol:t,fe
|
|||
|
`,{automaticNewlines:!0});let h=[p],C=J.join(this.context.cwd,"README.md");if(oe.existsSync(C)||(await oe.writeFilePromise(C,`# ${W.stringifyIdent(n.name)}
|
|||
|
`),h.push(C)),!o||o.cwd===this.context.cwd){let w=J.join(this.context.cwd,Nr.lockfile);oe.existsSync(w)||(await oe.writeFilePromise(w,""),h.push(w));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# 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/zero-installs","","#!.yarn/cache",".pnp.*"].map(pe=>`${pe}
|
|||
|
`).join(""),E=J.join(this.context.cwd,".gitignore");oe.existsSync(E)||(await oe.writeFilePromise(E,b),h.push(E));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(pe=>`${pe}
|
|||
|
`).join(""),U=J.join(this.context.cwd,".gitattributes");oe.existsSync(U)||(await oe.writeFilePromise(U,N),h.push(U));let z={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};He.mergeIntoTarget(z,r.get("initEditorConfig"));let $=`root = true
|
|||
|
`;for(let[pe,de]of Object.entries(z)){$+=`
|
|||
|
[${pe}]
|
|||
|
`;for(let[ve,ce]of Object.entries(de)){let ge=ve.replace(/[A-Z]/g,Oe=>`_${Oe.toLowerCase()}`);$+=`${ge} = ${ce}
|
|||
|
`}}let ae=J.join(this.context.cwd,".editorconfig");oe.existsSync(ae)||(await oe.writeFilePromise(ae,$),h.push(ae)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(J.join(this.context.cwd,".git"))||(await Rr.execvp("git",["init"],{cwd:this.context.cwd}),await Rr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Rr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};d0.paths=[["init"]],d0.usage=st.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var _dt={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:[d0]},Hdt=_dt;var n9={};Yt(n9,{SearchCommand:()=>I0,UpgradeInteractiveCommand:()=>B0,default:()=>bwt});Ke();var Eye=tt(ye("os"));function xC({stdout:e}){if(Eye.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")}Ht();var kEe=tt(E6()),C6={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Oyt=(0,kEe.default)(C6.appId,C6.apiKey).initIndex(C6.indexName),I6=async(e,t=0)=>await Oyt.search(e,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:t,hitsPerPage:10});var HB=["regular","dev","peer"],I0=class extends At{async execute(){xC(this.context);let{Gem:t}=await Promise.resolve().then(()=>(Ek(),Yq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Bk(),wk)),{useKeypress:o}=await Promise.resolve().then(()=>(OB(),Ywe)),{useMinistore:a}=await Promise.resolve().then(()=>(Zq(),Xq)),{renderForm:n}=await Promise.resolve().then(()=>(Sk(),Pk)),{default:u}=await Promise.resolve().then(()=>tt(r1e())),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(Ac())),{default:h,useEffect:C,useState:w}=await Promise.resolve().then(()=>tt($r())),v=await Je.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,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(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"
|
|||
|
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"]]});Ke();Ht();U_();var c1e=tt(jn()),l1e=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,u1e=(e,t)=>e.length>0?[e.slice(0,t)].concat(u1e(e.slice(t),t)):[],B0=class extends At{async execute(){xC(this.context);let{ItemOptions:t}=await Promise.resolve().then(()=>(a1e(),o1e)),{Pad:r}=await Promise.resolve().then(()=>(r9(),s1e)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Bk(),wk)),{useMinistore:a}=await Promise.resolve().then(()=>(Zq(),Xq)),{renderForm:n}=await Promise.resolve().then(()=>(Sk(),Pk)),{Box:u,Text:A}=await Promise.resolve().then(()=>tt(Ac())),{default:p,useEffect:h,useRef:C,useState:w}=await Promise.resolve().then(()=>tt($r())),v=await Je.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd),R=await Ur.find(v);if(!E)throw new $t(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(Ie,xe)=>{let le=che(Ie,xe),ne="";for(let ee of le)ee.added?ne+=me.pretty(v,ee.value,"green"):ee.removed||(ne+=ee.value);return ne},z=(Ie,xe)=>{if(Ie===xe)return xe;let le=W.parseRange(Ie),ne=W.parseRange(xe),ee=le.selector.match(l1e),Ee=ne.selector.match(l1e);if(!ee||!Ee)return U(Ie,xe);let Qe=["gray","red","yellow","green","magenta"],ft=null,H="";for(let lt=1;lt<Qe.length;++lt)ft!==null||ee[lt]!==Ee[lt]?(ft===null&&(ft=Qe[lt-1]),H+=me.pretty(v,Ee[lt],ft)):H+=Ee[lt];return H},$=async(Ie,xe,le)=>{let ne=await nu.fetchDescriptorFrom(Ie,le,{project:b,cache:R,preserveModifier:xe,workspace:E});return ne!==null?ne.range:Ie.range},ae=async Ie=>{let xe=c1e.default.valid(Ie.range)?`^${Ie.range}`:Ie.range,[le,ne]=await Promise.all([$(Ie,Ie.range,xe).catch(()=>null),$(Ie,Ie.range,"latest").catch(()=>null)]),ee=[{value:null,label:Ie.range}];return le&&le!==Ie.range?ee.push({value:le,label:z(Ie.range,le)}):ee.push({value:null,label:""}),ne&&ne!==le&&ne!==Ie.range?ee.push({value:ne,label:z(Ie.range,ne)}):ee.push({value:null,label:""}),ee},pe=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),de=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),ve=({active:Ie,descriptor:xe,suggestions:le})=>{let[ne,ee]=a(xe.descriptorHash,null),Ee=W.stringifyIdent(xe),Qe=Math.max(0,45-Ee.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},W.prettyIdent(v,xe)),p.createElement(r,{active:Ie,length:Qe})),p.createElement(t,{active:Ie,options:le,value:ne,skewer:!0,onChange:ee,sizes:[17,17,17]})))},ce=({dependencies:Ie})=>{let[xe,le]=w(Ie.map(()=>null)),ne=C(!0),ee=async Ee=>{let Qe=await ae(Ee);return Qe.filter(ft=>ft.label!=="").length<=1?null:{descriptor:Ee,suggestions:Qe}};return h(()=>()=>{ne.current=!1},[]),h(()=>{let Ee=Math.trunc(N*1.75),Qe=Ie.slice(0,Ee),ft=Ie.slice(Ee),H=u1e(ft,N),lt=Qe.map(ee).
|
|||
|
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
|
|||
|
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var xwt={commands:[I0,B0]},bwt=xwt;var i9={};Yt(i9,{LinkFetcher:()=>GB,LinkResolver:()=>jB,PortalFetcher:()=>WB,PortalResolver:()=>YB,default:()=>kwt});Ke();Dt();var np="portal:",ip="link:";var GB=class{supports(t,r){return!!t.reference.startsWith(ip)}getLocalPath(t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t.reference,{protocol:ip});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t.reference,{protocol:ip}),n=J.isAbsolute(a)?{packageFs:new un(It.root),prefixPath:It.dot,localPath:It.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,n.localPath),localPath:It.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new un(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:It.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Wu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:It.dot,discardFromLookup:!0}}};Ke();Dt();var jB=class{supportsDescriptor(t,r){return!!t.range.startsWith(ip)}supportsLocator(t,r){return!!t.reference.startsWith(ip)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return W.bindDescriptor(t,{locator:W.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=t.range.slice(ip.length);return[W.makeLocator(t,`${ip}${Ae.toPortablePath(a)}`)]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){return{...t,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ke();Dt();var WB=class{supports(t,r){return!!t.reference.startsWith(np)}getLocalPath(t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t.reference,{protocol:np});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:J.resolve(n,a)}async fetch(t,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t.reference,{protocol:np}),n=J.isAbsolute(a)?{packageFs:new un(It.root),prefixPath:It.dot,localPath:It.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,n.localPath),localPath:It.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=J.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new un(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:It.dot,localPath:p}:{packageFs:new Wu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:It.dot}}};Ke();Ke();Dt();var YB=class{supportsDescriptor(t,r){return!!t.range.startsWith(np)}supportsLocator(t,r){return!!t.reference.startsWith(np)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){return W.bindDescriptor(t,{locator:W.stringifyLocator(r)})}getResolutionDependencies(t,r){return{}}async getCandidates(t,r,o){let a=t.range.slice(np.length);return[W.makeLocator(t,`${np}${Ae.toPortablePath(a)}`)]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(t,r.fetchOptions),a=await He.releaseAfterUseAsync(async()=>await Lt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...t,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Qwt={fetchers:[GB,WB],resolvers:[j
|
|||
|
${C}, next tree:
|
|||
|
${KB(A)}`);let v=g1e(A);if(v)throw new Error(`${v}, after hoisting finished:
|
|||
|
${KB(A)}`)}return n.debugLevel>=2&&console.log(KB(A)),Uwt(A)},Fwt=e=>{let t=e[e.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(t),r},Rwt=e=>{let t=e[e.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let C;for(let w of e)C=w.dependencies.get(h.name),C&&r.set(C.name,C)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(t,a),r},f1e=(e,t)=>{if(t.decoupled)return t;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:C,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:E,hoistedTo:R}=t,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(C),decoupled:!0,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:new Map(E),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),e.dependencies.set(N.name,N),N},Twt=(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 o=Array.from(t.keys());o.sort((a,n)=>{let u=t.get(a),A=t.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!e.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},s9=e=>{let t=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!e.peerNames.has(n)){let u=e.dependencies.get(n);u&&!t.has(u)&&r(u,a)}t.add(o)}};for(let o of e.dependencies.values())e.peerNames.has(o.name)||r(o);return t},a9=(e,t,r,o,a,n=new Set)=>{let u=t[t.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=_wt(u),p=Twt(u,A),h=e==u?new Map:a.fastLookupPossible?Fwt(t):Rwt(t),C,w=!1,v=!1,b=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),E=new Map;do{let R=Mwt(e,t,r,h,b,p,o,E,a);R.isGraphChanged&&(v=!0),R.anotherRoundNeeded&&(w=!0),C=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(b.delete(N),U.shift(),b.set(N,U[0]),C=!0)}while(C);for(let R of u.dependencies.values())if(!u.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=a9(e,[...t,R],r,E,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(w=!0),r.delete(R.locator)}return{anotherRoundNeeded:w,isGraphChanged:v}},Lwt=e=>{for(let[t,r]of e.dependencies)if(!e.peerNames.has(t)&&r.ident!==e.ident)return!0;return!1},Nwt=(e,t,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let C,w=null,v=new Set;p&&(C=`${Array.from(t).map(N=>ro(N)).join("\u2192")}`);let b=r[r.length-1],R=!(o.ident===b.ident);if(p&&!R&&(w="- self-reference"),R&&(R=o.dependencyKind!==1,p&&!R&&(w="- workspace")),R&&o.dependencyKind===2&&(R=!Lwt(o),p&&!R&&(w="- external soft link with unhoisted dependencies")),R&&(R=b.dependencyKind!==1||b.hoistedFrom.has(o.name)||t.size===1,p&&!R&&(w=b.reasons.get(o.name))),R&&(R=!e.peerNames.has(o.name),p&&!R&&(w=`- cannot shadow peer: ${ro(e.originalDependencies.get(o.name).locator)} at ${C}`)),R){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(w=`- filled by: ${ro(U.locator)} at ${C}`),N)for(let z=r.length-1;z>=1;z--){let ae=r[z].dependencies.get(o.name);if(ae&&ae.ident!==o.ident){N=!1;let pe=A.get(b);pe||(pe=new Set,A.set(b,pe)),pe.add(o.name),p&&(w=`- filled by ${ro(ae.locator)} at ${r.slice(0,z).map(de=>ro(de.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(o.name)===o.ident,p&&!R&&(w=`- filled by: ${ro(u.get(o.name)[0])} at ${C}`)),R){let N=!0,U=new Set(o.peerNames);for(let z=r.length-1;z>=1;z--){let $=r[z];for(let ae of U){if($
|
|||
|
${KB(e)}`)}let xe=s9(ae);for(let le of xe)if(Oe.has(le)){let ne=ge.get(le);if((a.get(le.name)===le.ident||!ae.reasons.has(le.name))&&ne.isHoistable!==0&&ae.reasons.set(le.name,ne.reason),!le.isHoistBorder&&ve.indexOf(xk(le))<0){C.add(ae);let Ee=f1e(ae,le);b([...U,ae],de,ve,Ee,R),C.delete(ae)}}},E,R=new Set(s9(h)),N=Array.from(t).map(U=>xk(U));do{E=R,R=new Set;for(let U of E){if(U.locator===h.locator||U.isHoistBorder)continue;let z=f1e(h,U);b([],Array.from(r),N,z,R)}}while(R.size>0);return{anotherRoundNeeded:w,isGraphChanged:v}},g1e=e=>{let t=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);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 C=p.get(h.name),w=()=>`${Array.from(o).concat([n]).map(v=>ro(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==C||!v||v.ident!==h.ident)&&t.push(`${w()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),E=`${v?` hoisted from ${v.join(", ")}`:""}`,R=`${b?` hoisted to ${b}`:""}`,N=`${w()}${E}`;C?C.ident!==h.ident&&t.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${C.ident}`):t.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(e,e.dependencies,e),t.join(`
|
|||
|
`)},Owt=(e,t)=>{let{identName:r,name:o,reference:a,peerNames:n}=e,u={name:o,references:new Set([a]),locator:o9(r,a),ident:A1e(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},A=new Map([[e,u]]),p=(h,C)=>{let w=A.get(h),v=!!w;if(!w){let{name:b,identName:E,reference:R,peerNames:N,hoistPriority:U,dependencyKind:z}=h,$=t.hoistingLimits.get(C.locator);w={name:b,references:new Set([R]),locator:o9(E,R),ident:A1e(E,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:$?$.has(b):!1,hoistPriority:U||0,dependencyKind:z||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(C.dependencies.set(h.name,w),C.originalDependencies.set(h.name,w),v){let b=new Set,E=R=>{if(!b.has(R)){b.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||E(N)}};E(w)}else for(let b of h.dependencies)p(b,w)};for(let h of e.dependencies)p(h,u);return u},l9=e=>e.substring(0,e.indexOf("@",1)),Uwt=e=>{let t={name:e.name,identName:l9(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:C,locator:w}=a;p={name:h,identName:l9(w),references:C,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of e.dependencies.values())o(a,e,t);return t},_wt=e=>{let t=new Map,r=new Set([e]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=t.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},t.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let C of A.dependencies.values()){let w=a(C);w.hoistPriority=Math.max(w.hoistPriority,C.hoistPriority),A.peerNames.has(C.name)?w.peerDependents.add(A.ident):n(A,C)}}};for(let u of e.dependencies.values())e.peerNames.has(u.name)||n(e,u);return t},ro=e=>{if(!e)return"none";let t=e.indexOf("@",1),r=e.substring(0,t);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=e.substring(t+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},p1e=5e4,KB=e=>{let t=0,r=(a,n,u="")=>{if(t>p1e||n.has(a))return"";t++;let A=Array.from(a.dependencies.values()).sort((h,C)=>h.name===C.name?0:h.name>C.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let C=A[h];if(!a.peerNames.has(C.name)&&C!==a){let w=a.reasons.get(C.name),v=l9(C.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(v!==C.name?`a:${C.name}:`:"")+ro(C.locator)+(w?` ${w}`:"")}
|
|||
|
`,p+=r(C,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(e,new Set)+(t>p1e?`
|
|||
|
Tree is too large, part of the tree has been dunped
|
|||
|
`:"")};var JB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(JB||{}),d1e="node_modules",ym="$wsroot$";var zB=(e,t)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=qwt(e,t),u=null;if(a.length===0){let A=h1e(r,{hoistingLimits:o});u=jwt(e,A,t)}return{tree:u,errors:a,preserveSymlinksRequired:n}},mA=e=>`${e.name}@${e.reference}`,u9=e=>{let t=new Map;for(let[r,o]of e.entries())if(!o.dirList){let a=t.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},t.set(o.locator,a)),a.locations.push(r)}for(let r of t.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(J.delimiter).length,u=a.split(J.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return t},m1e=(e,t)=>{let r=W.isVirtualLocator(e)?W.devirtualizeLocator(e):e,o=W.isVirtualLocator(t)?W.devirtualizeLocator(t):t;return W.areLocatorsEqual(r,o)},c9=(e,t,r,o)=>{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 J.contains(o,a)===null},Hwt=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 o=Ae.toPortablePath(t.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=e.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,b)=>{let E=mA(v);if(p.has(E))return;p.add(E);let R=e.getPackageInformation(v);if(R){let N=b?mA(b):"";if(mA(v)!==N&&R.linkType==="SOFT"&&!c9(R,v,e,o)){let U=y1e(R,v,e);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,z]of R.packageDependencies)z!==null&&(R.packagePeers.has(U)||h(e.getLocator(U,z),v))}};for(let v of u)h(v,null);let C=o.split(J.sep);for(let v of A.values()){let b=e.getPackageInformation(v),R=Ae.toPortablePath(b.packageLocation.slice(0,-1)).split(J.sep).slice(C.length),N=n;for(let U of R){let z=N.children.get(U);z||(z={children:new Map},N.children.set(U,z)),N=z}N.workspaceLocator=v}let w=(v,b)=>{if(v.workspaceLocator){let E=mA(b),R=a.get(E);R||(R=new Set,a.set(E,R)),R.add(v.workspaceLocator)}for(let E of v.children.values())w(E,v.workspaceLocator||b)};for(let v of n.children.values())w(v,n.workspaceLocator);return a},qwt=(e,t)=>{let r=[],o=!1,a=new Map,n=Hwt(e),u=e.getPackageInformation(e.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=e.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=Ae.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},C=new Map,w=(b,E)=>`${mA(E)}:${b}`,v=(b,E,R,N,U,z,$,ae)=>{let pe=w(b,R),de=C.get(pe),ve=!!de;!ve&&R.name===A.name&&R.reference===A.reference&&(de=h,C.set(pe,h));let ce=c9(E,R,e,p);if(!de){let le=0;ce?le=2:E.linkType==="SOFT"&&R.name.endsWith(ym)&&(le=1),de={name:b,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:le===1?new Set:E.packagePeers,dependencyKind:le},C.set(pe,de)}let ge;if(ce?ge=2:U.linkType==="SOFT"?ge=1:ge=0,de.hoistPriority=Math.max(de.hoistPriority||0,ge),ae&&!ce){let le=mA({name:N.identName,reference:N.reference}),ne=a.get(le)||new Set;a.set(le,ne),ne.add(de.name)}let Oe=new Map(E.packageDependencies);if(t.project){let le=t.project.workspacesByCwd.get(Ae.toPortablePath(E.packageLocation.slice(0,-1)));if(le){let ne=new Set([...Array.from(le.manifest.peerDependencies.values(),ee=>W.stringifyIdent(ee)),...Array.from(le.manifest.peerDependenciesMeta.keys())]);for(let ee of ne)Oe.has(ee)||(Oe.set(ee,z.get(ee)||null),de.peerNames.add(ee))}}let g=mA({name:R.name.replace(ym,""),reference:R.reference}),Ie=n.get(g);if(Ie)for(let le of Ie)Oe.set(`${le.name}${ym}`,le.reference);(E!==U||E.linkType!=="SOFT"||!
|
|||
|
`;for(let n=0,u=e.length;n<u;++n)a+=o+bk(String(n),e[n],t,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
|
|||
|
`;return a+=r,a+="]",a}function Kwt(e,t,r){let o=Object.keys(e),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=e[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=bk(p,h,t,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function Jwt(e,t,r){let o=Object.keys(e),a=`${r} `,n="";n+=r,n+=`{
|
|||
|
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],C=e[h];typeof C>"u"||(u!==0&&(n+=",",n+=`
|
|||
|
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=bk(h,C,t,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
|
|||
|
`),n+=r,n+="}",n}function bk(e,t,r,o){let{next:a}=E1e[r],n=a[e]||a["*"];return C1e(t,n,o)}function C1e(e,t,r){let{collapsed:o}=E1e[t];return Array.isArray(e)?o?Wwt(e,t,r):Ywt(e,t,r):typeof e=="object"&&e!==null?o?Kwt(e,t,r):Jwt(e,t,r):JSON.stringify(e)}function I1e(e){return C1e(e,"TOP_LEVEL","")}function VB(e,t){let r=Array.from(e);Array.isArray(t)||(t=[t]);let o=[];for(let n of t)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function zwt(e){let t=new Map,r=VB(e.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=t.get(o);typeof n>"u"&&t.set(o,n=new Set),n.add(a)}return Array.from(t).map(([o,a])=>[o,Array.from(a)])}function Vwt(e){return VB(e.fallbackPool||[],([t])=>t)}function Xwt(e){let t=[];for(let[r,o]of VB(e.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];t.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:C}]of VB(o,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!A.has(r)&&w.push([r,n]);for(let[E,R]of VB(A.entries(),([N])=>N))w.push([E,R]);let v=p&&p.size>0?Array.from(p):void 0,b=C||void 0;a.push([n,{packageLocation:u,packageDependencies:w,packagePeers:v,linkType:h,discardFromLookup:b}])}}return t}function XB(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,fallbackExclusionList:zwt(e),fallbackPool:Vwt(e),packageRegistryData:Xwt(e)}}var v1e=tt(B1e());function D1e(e,t){return[e?`${e}
|
|||
|
`:"",`/* eslint-disable */
|
|||
|
`,`"use strict";
|
|||
|
`,`
|
|||
|
`,t,`
|
|||
|
`,(0,v1e.default)()].join("")}function Zwt(e){return JSON.stringify(e,null,2)}function $wt(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
|||
|
`)}'`}function e1t(e){return[`const RAW_RUNTIME_STATE =
|
|||
|
`,`${$wt(I1e(e))};
|
|||
|
|
|||
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
|||
|
`,`}
|
|||
|
`].join("")}function t1t(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` return hydrateRuntimeState(require(${JSON.stringify(`./${Nr.pnpData}`)}), {basePath: basePath || __dirname});
|
|||
|
`,`}
|
|||
|
`].join("")}function P1e(e){let t=XB(e),r=e1t(t);return D1e(e.shebang,r)}function S1e(e){let t=XB(e),r=t1t(),o=D1e(e.shebang,r);return{dataFile:Zwt(t),loaderFile:o}}Dt();function f9(e,{basePath:t}){let r=Ae.toPortablePath(t),o=J.resolve(r),a=e.ignorePatternData!==null?new RegExp(e.ignorePatternData):null,n=new Map,u=new Map(e.packageRegistryData.map(([w,v])=>[w,new Map(v.map(([b,E])=>{if(w===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=E.discardFromLookup??!1,N={name:w,reference:b},U=n.get(E.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(E.packageLocation,{locator:N,discardFromLookup:R});let z=null;return[b,{packageDependencies:new Map(E.packageDependencies),packagePeers:new Set(E.packagePeers),linkType:E.linkType,discardFromLookup:R,get packageLocation(){return z||(z=J.join(o,E.packageLocation))}}]}))])),A=new Map(e.fallbackExclusionList.map(([w,v])=>[w,new Set(v)])),p=new Map(e.fallbackPool),h=e.dependencyTreeRoots,C=e.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:C,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}Dt();Dt();var ov=ye("module"),Cm=ye("url"),B9=ye("util");var Uo=ye("url");var k1e=tt(ye("assert"));var p9=Array.isArray,ZB=JSON.stringify,$B=Object.getOwnPropertyNames,Em=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h9=(e,t)=>RegExp.prototype.exec.call(e,t),g9=(e,...t)=>RegExp.prototype[Symbol.replace].apply(e,t),v0=(e,...t)=>String.prototype.endsWith.apply(e,t),d9=(e,...t)=>String.prototype.includes.apply(e,t),m9=(e,...t)=>String.prototype.lastIndexOf.apply(e,t),ev=(e,...t)=>String.prototype.indexOf.apply(e,t),x1e=(e,...t)=>String.prototype.replace.apply(e,t),D0=(e,...t)=>String.prototype.slice.apply(e,t),yA=(e,...t)=>String.prototype.startsWith.apply(e,t),b1e=Map,Q1e=JSON.parse;function tv(e,t,r){return class extends r{constructor(...o){super(t(...o)),this.code=e,this.name=`${r.name} [${e}]`}}}var F1e=tv("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),y9=tv("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError),R1e=tv("ERR_INVALID_PACKAGE_TARGET",(e,t,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!yA(r,"./");return t==="."?((0,k1e.default)(o===!1),`Invalid "exports" main target ${ZB(r)} defined in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${ZB(r)} defined for '${t}' in the package config ${e}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),rv=tv("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error),T1e=tv("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 kk=ye("url");function L1e(e,t){let r=Object.create(null);for(let o=0;o<t.length;o++){let a=t[o];Em(e,a)&&(r[a]=e[a])}return r}var Qk=new b1e;function r1t(e,t,r,o){let a=Qk.get(e);if(a!==void 0)return a;let n=o(e);if(n===void 0){let b={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Qk.set(e,b),b}let u;try{u=Q1e(n)}catch(b){throw new rv(e,(r?`"${t}" from `:"")+(0,kk.fileURLToPath)(r||t),b.message)}let{imports:A,main:p,name:h,type:C}=L1e(u,["imports","main","name","type"]),w=Em(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),C!=="module"&&C!=="commonjs"&&(C="none");let v={pjsonPath:e,exists:!0,main:p,name:h,type:C,exports:w,imports:A};return Qk.set(e,v),v}function N1e(e,t){let r=new URL("./package.json",e);for(;;){let n=r.pathname;i
|
|||
|
`),r;u=e[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&t.push(`invalid value for NODE_OPTIONS (unterminated string)
|
|||
|
`),r}Dt();var z1e=ye("module");var[sv,w9]=process.versions.node.split(".").map(e=>parseInt(e,10)),J1e=sv>19||sv===19&&w9>=2||sv===18&&w9>=13,KVt=sv>19||sv===19&&w9>=3;var p1t=new Set(z1e.Module.builtinModules||Object.keys(process.binding("natives"))),Fk=e=>e.startsWith("node:")||p1t.has(e);function V1e(e){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(e=e.map(t=>Ae.fromPortablePath(hi.resolveVirtual(Ae.toPortablePath(t)))),J1e)process.send({"watch:require":e});else for(let t of e)process.send({"watch:require":t})}function v9(e,t){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],C=new Set;if(e.enableTopLevelFallback===!0&&h.push(p),t.compatibilityMode!==!1)for(let Le of["react-scripts","gatsby"]){let Fe=e.packageRegistry.get(Le);if(Fe)for(let Re of Fe.keys()){if(Re===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Le,reference:Re})}}let{ignorePattern:w,packageRegistry:v,packageLocatorsByLocations:b}=e;function E(Le,Fe){return{fn:Le,args:Fe,error:null,result:null}}function R(Le){let Fe=process.stderr?.hasColors?.()??process.stdout.isTTY,Re=(Xe,je)=>`\x1B[${Xe}m${je}\x1B[0m`,Ge=Le.error;console.error(Ge?Re("31;1",`\u2716 ${Le.error?.message.replace(/\n.*/s,"")}`):Re("33;1","\u203C Resolution")),Le.args.length>0&&console.error();for(let Xe of Le.args)console.error(` ${Re("37;1","In \u2190")} ${(0,B9.inspect)(Xe,{colors:Fe,compact:!0})}`);Le.result&&(console.error(),console.error(` ${Re("37;1","Out \u2192")} ${(0,B9.inspect)(Le.result,{colors:Fe,compact:!0})}`));let Ne=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Ne.length>0){console.error();for(let Xe of Ne)console.error(` ${Re("38;5;244",Xe)}`)}console.error()}function N(Le,Fe){if(t.allowDebug===!1)return Fe;if(Number.isFinite(o)){if(o>=2)return(...Re)=>{let Ge=E(Le,Re);try{return Ge.result=Fe(...Re)}catch(Ne){throw Ge.error=Ne}finally{R(Ge)}};if(o>=1)return(...Re)=>{try{return Fe(...Re)}catch(Ge){let Ne=E(Le,Re);throw Ne.error=Ge,R(Ne),Ge}}}return Fe}function U(Le){let Fe=g(Le);if(!Fe)throw Xi("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Fe}function z(Le){if(Le.name===null)return!0;for(let Fe of e.dependencyTreeRoots)if(Fe.name===Le.name&&Fe.reference===Le.reference)return!0;return!1}let $=new Set(["node","require",...K1e("--conditions")]);function ae(Le,Fe=$,Re){let Ge=le(J.join(Le,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ge===null)throw Xi("INTERNAL",`The locator that owns the "${Le}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Ne}=U(Ge),Xe=J.join(Ne,Nr.manifest);if(!t.fakeFs.existsSync(Xe))return null;let je=JSON.parse(t.fakeFs.readFileSync(Xe,"utf8"));if(je.exports==null)return null;let x=J.contains(Ne,Le);if(x===null)throw Xi("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let I=H1e({packageJSONUrl:(0,Cm.pathToFileURL)(Ae.fromPortablePath(Xe)),packageSubpath:x,exports:je.exports,base:Re?(0,Cm.pathToFileURL)(Ae.fromPortablePath(Re)):null,conditions:Fe});return Ae.toPortablePath((0,Cm.fileURLToPath)(I))}catch(I){throw Xi("EXPORTS_RESOLUTION_FAILED",I.message,{unqualifiedPath:hu(Le),locator:Ge,pkgJson:je,subpath:hu(x),conditions:Fe},I.code)}}function pe(Le,Fe,{extensions:Re}){let Ge;try{Fe.push(Le),Ge=t.fakeFs.statSync(Le)}catch{}if(Ge&&!Ge.isDirectory())return t.fakeFs.realpathSync(Le);if(Ge&&Ge.isDirectory()){let Ne;try{Ne=JSON.parse(t.fakeFs.readFileSync(J.join(Le,Nr.manifest),"utf8"))}catch{}let Xe;if(Ne&&Ne.main&&(Xe=J.resolve(Le,Ne.main)),Xe&&Xe!==Le){let je=pe(Xe,Fe,{extensions:Re});if(je!==null)return je}}for(let Ne=0,Xe=Re.length;Ne<Xe;Ne++){let je=`${Le}${Re[Ne]}`;if(Fe.push(je),t.fakeFs.existsSync(je))return je}if(Ge&&
|
|||
|
|
|||
|
Require request: "${Ge}"
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne});return Ae.toPortablePath(x)}let Xe,je=Le.match(a);if(je){if(!Fe)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ge,issuer:Ne});let[,x,I]=je,S=le(Fe);if(!S){let Me=ve(Le,Fe);if(Me===!1)throw Xi("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: "${Ge}"
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne});return Ae.toPortablePath(Me)}let F=U(S).packageDependencies.get(x),V=null;if(F==null&&S.name!==null){let Me=e.fallbackExclusionList.get(S.name);if(!Me||!Me.has(S.reference)){for(let gt=0,_t=h.length;gt<_t;++gt){let St=U(h[gt]).packageDependencies.get(x);if(St!=null){r?V=St:F=St;break}}if(e.enableTopLevelFallback&&F==null&&V===null){let gt=e.fallbackPool.get(x);gt!=null&&(V=gt)}}}let X=null;if(F===null)if(z(S))X=Xi("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne,dependencyName:x});else{let Me=xe(x,S);Me.every(ot=>z(ot))?X=Xi("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${S.name}@${S.reference} (via ${Ne})
|
|||
|
${Me.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:Ge,issuer:Ne,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Me}):X=Xi("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${S.name}@${S.reference} (via ${Ne})
|
|||
|
|
|||
|
${Me.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:Ge,issuer:Ne,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Me})}else F===void 0&&(!Re&&Fk(Le)?z(S)?X=Xi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. 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 ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne,dependencyName:x}):X=Xi("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}. 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 ${x} isn't otherwise declared in ${S.name}'s dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne,issuerLocator:Object.assign({},S),dependencyName:x}):z(S)?X=Xi("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${Ne}
|
|||
|
`,{request:Ge,issuer:Ne,dependencyName:x}):X=Xi("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${x}${x!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${S.name}@${S.reference} (via ${Ne})
|
|||
|
`,{request:Ge,issuer:Ne,issuerLocator:Object.assign({},S),dependencyName:x}));if(F==null){if(V===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=V;let Me=X.message.replace(/\n.*/g,"");X.message=Me,!C.has(Me)&&o!==0&&(C.add(Me),process.emitWarning(X))}let Z=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},ie=U(Z);if(!ie.packageLocation)throw Xi("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: ${Z.name}@${Z.reference}${Z.name!==Ge?` (via "${Ge}")`:""}
|
|||
|
Required by: ${S.name}@${S.reference} (via ${Ne})
|
|||
|
`,{request:Ge,issuer:Ne,dependencyLocator:Object.assign({},Z)});let be=ie.packageLocation;I?Xe=J.join(be,I):Xe=be}else if(J.isAbsolute(Le))Xe=J.normalize(Le);else{if(!Fe)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ge,issuer:Ne});let x=J.resolve(Fe);Fe.match(u)?Xe=J.normalize(J.join(x,Le)):Xe=J.normalize(J.join(J.dirname(x),Le))}return J.normalize(Xe)}function Ee(Le,Fe,Re=$,Ge){if(n.test(Le))return Fe;let Ne=ae(Fe,Re,Ge);return Ne?J.normalize(Ne):Fe}function Qe(Le,{extensions:Fe=Object.keys(ov.Module._extensions)}={}){let Re=[],Ge=pe(Le,Re,{extensions:Fe});if(Ge)return J.normalize(Ge);{V1e(Re.map(je=>Ae.fromPortablePath(je)));let Ne=hu(Le),Xe=le(Le);if(Xe){let{packageLocation:je}=U(Xe),x=!0;try{t.fakeFs.accessSync(je)}catch(I){if(I?.code==="ENOENT")x=!1;else{let S=(I?.message??I??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${S}).
|
|||
|
|
|||
|
Missing package: ${Xe.name}@${Xe.reference}
|
|||
|
Expected package location: ${hu(je)}
|
|||
|
`,{unqualifiedPath:Ne,extensions:Fe})}}if(!x){let I=je.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 Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`${I}
|
|||
|
|
|||
|
Missing package: ${Xe.name}@${Xe.reference}
|
|||
|
Expected package location: ${hu(je)}
|
|||
|
`,{unqualifiedPath:Ne,extensions:Fe})}}throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
|||
|
|
|||
|
Source path: ${Ne}
|
|||
|
${Re.map(je=>`Not found: ${hu(je)}
|
|||
|
`).join("")}`,{unqualifiedPath:Ne,extensions:Fe})}}function ft(Le,Fe,Re){if(!Fe)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ge=q1e({name:Le,base:(0,Cm.pathToFileURL)(Ae.fromPortablePath(Fe)),conditions:Re.conditions??$,readFileSyncFn:ne});if(Ge instanceof URL)return Qe(Ae.toPortablePath((0,Cm.fileURLToPath)(Ge)),{extensions:Re.extensions});if(Ge.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(Ge,Fe,Re)}function H(Le,Fe,Re={}){try{if(Le.startsWith("#"))return ft(Le,Fe,Re);let{considerBuiltins:Ge,extensions:Ne,conditions:Xe}=Re,je=ee(Le,Fe,{considerBuiltins:Ge});if(Le==="pnpapi")return je;if(je===null)return null;let x=()=>Fe!==null?ce(Fe):!1,I=(!Ge||!Fk(Le))&&!x()?Ee(Le,je,Xe,Fe):je;return Qe(I,{extensions:Ne})}catch(Ge){throw Object.prototype.hasOwnProperty.call(Ge,"pnpCode")&&Object.assign(Ge.data,{request:hu(Le),issuer:Fe&&hu(Fe)}),Ge}}function lt(Le){let Fe=J.normalize(Le),Re=hi.resolveVirtual(Fe);return Re!==Fe?Re:null}return{VERSIONS:ge,topLevel:Oe,getLocator:(Le,Fe)=>Array.isArray(Fe)?{name:Fe[0],reference:Fe[1]}:{name:Le,reference:Fe},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){let Le=[];for(let[Fe,Re]of v)for(let Ge of Re.keys())Fe!==null&&Ge!==null&&Le.push({name:Fe,reference:Ge});return Le},getPackageInformation:Le=>{let Fe=g(Le);if(Fe===null)return null;let Re=Ae.fromPortablePath(Fe.packageLocation);return{...Fe,packageLocation:Re}},findPackageLocator:Le=>le(Ae.toPortablePath(Le)),resolveToUnqualified:N("resolveToUnqualified",(Le,Fe,Re)=>{let Ge=Fe!==null?Ae.toPortablePath(Fe):null,Ne=ee(Ae.toPortablePath(Le),Ge,Re);return Ne===null?null:Ae.fromPortablePath(Ne)}),resolveUnqualified:N("resolveUnqualified",(Le,Fe)=>Ae.fromPortablePath(Qe(Ae.toPortablePath(Le),Fe))),resolveRequest:N("resolveRequest",(Le,Fe,Re)=>{let Ge=Fe!==null?Ae.toPortablePath(Fe):null,Ne=H(Ae.toPortablePath(Le),Ge,Re);return Ne===null?null:Ae.fromPortablePath(Ne)}),resolveVirtual:N("resolveVirtual",Le=>{let Fe=lt(Ae.toPortablePath(Le));return Fe!==null?Ae.fromPortablePath(Fe):null})}}Dt();var X1e=(e,t,r)=>{let o=XB(e),a=f9(o,{basePath:t}),n=Ae.join(t,Nr.pnpCjs);return v9(a,{fakeFs:r,pnpapiResolution:n})};var P9=tt($1e());Ht();var EA={};Yt(EA,{checkManifestCompatibility:()=>e2e,extractBuildRequest:()=>Rk,getExtractHint:()=>S9,hasBindingGyp:()=>x9});Ke();Dt();function e2e(e){return W.isPackageCompatible(e,us.getArchitectureSet())}function Rk(e,t,r,{configuration:o}){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,`${W.prettyLocator(o,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,`${W.prettyLocator(o,e)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${W.prettyLocator(o,e)} lists build scripts, but all build scripts have been disabled.`)}:e2e(e)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${W.prettyLocator(o,e)} The ${us.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var g1t=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function S9(e){return e.packageFs.getExtractHint({relevantExtensions:g1t})}function x9(e){let t=J.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}var lv={};Yt(lv,{getUnpluggedPath:()=>av});Ke();Dt();function av(e,{configuration:t}){return J.resolve(t.get("pnpUnpluggedFolder"),W.slugifyLocator(e))}var d1t=new Set([W.makeIdent(null,"open").identHash,W.makeIdent(null,"opn").identHash]),P0=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(
|
|||
|
`,n+=`# cause your node_modules installation to become invalidated.
|
|||
|
`,n+=`
|
|||
|
`,n+=`__metadata:
|
|||
|
`,n+=` version: ${h2e}
|
|||
|
`,n+=` nmMode: ${o.value}
|
|||
|
`;let u=Array.from(t.keys()).sort(),A=W.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(let C of u){let w=t.get(C);n+=`
|
|||
|
`,n+=`${JSON.stringify(C)}:
|
|||
|
`,n+=` locations:
|
|||
|
`;for(let v of w.locations){let b=J.contains(e.cwd,v);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(b)}
|
|||
|
`}if(w.aliases.length>0){n+=` aliases:
|
|||
|
`;for(let v of w.aliases)n+=` - ${JSON.stringify(v)}
|
|||
|
`}if(C===A&&r.size>0){n+=` bin:
|
|||
|
`;for(let[v,b]of r){let E=J.contains(e.cwd,v);if(E===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(E)}:
|
|||
|
`;for(let[R,N]of b){let U=J.relative(J.join(v,Di),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(U)}
|
|||
|
`}}}}let p=e.cwd,h=J.join(p,Di,g2e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function N9(e,{unrollAliases:t=!1}={}){let r=e.cwd,o=J.join(r,Di,g2e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Ki(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>h2e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,C]of Object.entries(n)){let w=C.locations.map(b=>J.join(r,b)),v=C.bin;if(v)for(let[b,E]of Object.entries(v)){let R=J.join(r,Ae.toPortablePath(b)),N=He.getMapWithDefault(p,R);for(let[U,z]of Object.entries(E))N.set(xi(U),Ae.toPortablePath([R,Di,z].join(J.sep)))}if(A.set(h,{target:It.dot,linkType:"HARD",locations:w,aliases:C.aliases||[]}),t&&C.aliases)for(let b of C.aliases){let{scope:E,name:R}=W.parseLocator(h),N=W.makeLocator(W.makeIdent(E,R),b),U=W.stringifyLocator(N);A.set(U,{target:It.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:d2e(A,{skipPrefix:e.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var YC=async(e,t)=>{if(e.split(J.sep).indexOf(Di)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${e}`);try{if(!t.innerLoop){let o=t.allowSymlink?await oe.statPromise(e):await oe.lstatPromise(e);if(t.allowSymlink&&!o.isDirectory()||!t.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(e);return}}let r=await oe.readdirPromise(e,{withFileTypes:!0});for(let o of r){let a=J.join(e,xi(o.name));o.isDirectory()?(o.name!==Di||t&&t.innerLoop)&&await YC(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}t.contentsOnly||await oe.rmdirPromise(e)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},u2e=4,Lk=(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 o=r.split(J.sep).filter(p=>p!==""),a=o.indexOf(Di),n=o.slice(0,a).join(J.sep),u=J.join(t,n),A=o.slice(a);return{locationRoot:u,segments:A}},d2e=(e,{skipPrefix:t})=>{let r=new Map;if(e===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of e.entries()){if(n.linkType==="SOFT"&&J.contains(t,n.target)!==null){let A=He.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=Lk(u,{skipPrefix:t}),h=He.getFactoryWithDefault(r,A,o);for(let C=0;C<p.length;++C){let w=p[C];if(w!=="."){let v=He.getFactoryWithDefault(h.children,w,o);h.children.set(w,v),h=v}C===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},U9=async(e,t,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await oe.lstatPromise(e)}catch{}if(!o||o.isDirectory()){await oe.symlinkPromise(e,t,"junction");return}}await oe.symlinkPromise(J.relative(J.dirname(t),e),t)};async function m2e(e,t,r){let o=J.join(e,xi(`${M9.default.randomBytes(16).toString("hex")}.tmp`));try{await oe.writeFilePromise(o,r);try{await oe.linkPromise(o,t)}catch{}}finally{await oe.unlinkPromise(o)}}async function H1t({srcPath:e,dstPath:t,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===y2e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=J.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await oe.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-O1t))if(await mn.checksumFile(A,{baseFs:oe,algorithm:"sha1"})!==r.digest){let w=J.join(o,xi(`${M9.default.randomBytes(16).toString("hex")}.tmp`));await oe.renamePromise(A,w);let v=await a.readFilePromise(e);await oe.writeFilePromise(w,v);try{await oe.linkPromise(w,A),r.mtimeMs=new Date().getTime(),await oe.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await oe.linkPromise(A,t),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(e);await m2e(o,A,h),r.mtimeMs=new Date().getTime();try{await oe.linkPromise(A,t)}catch(C){C&&C.code&&C.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(e,t))}}}else await a.copyFilePromise(e,t);let u=r.mode&511;u!==420&&await oe.chmodPromi
|
|||
|
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,W9.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
|
|||
|
`),o}function Ok(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 JC(e){return{["npm-otp"]:e}}var pv=class{supports(t,r){if(!t.reference.startsWith(Un))return!1;let{selector:o,params:a}=W.parseRange(t.reference);return!(!P2e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${W.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:W.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let{params:o}=W.parseRange(t.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Bm(o.__archiveUrl,{customErrorMessage:wm,configuration:r.project.configuration,ident:t});return await zi.convertToZip(a,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:W.getIdentVendorPath(t),stripComponents:1})}};Ke();var hv=class{supportsDescriptor(t,r){return!(!t.range.startsWith(Un)||!W.tryParseDescriptor(t.range.slice(Un.length),!0))}supportsLocator(t,r){return!1}shouldPersistResolution(t,r){throw new Error("Unreachable")}bindDescriptor(t,r,o){return t}getResolutionDependencies(t,r){let o=r.project.configuration.normalizeDependency(W.parseDescriptor(t.range.slice(Un.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(t,r,o){let a=o.project.configuration.normalizeDependency(W.parseDescriptor(t.range.slice(Un.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(t,r,o,a){let n=a.project.configuration.normalizeDependency(W.parseDescriptor(t.range.slice(Un.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(t,r){throw new Error("Unreachable")}};Ke();Ke();var S2e=tt(jn()),x2e=ye("url");var Il=class{supports(t,r){if(!t.reference.startsWith(Un))return!1;let o=new x2e.URL(t.reference);return!(!S2e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${W.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:W.getIdentVendorPath(t),checksum:u}}async fetchFromNetwork(t,r){let o;try{o=await Bm(Il.getLocatorUrl(t),{customErrorMessage:wm,configuration:r.project.configuration,ident:t})}catch{o=await Bm(Il.getLocatorUrl(t).replace(/%2f/g,"/"),{customErrorMessage:wm,configuration:r.project.configuration,ident:t})}return await zi.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:W.getIdentVendorPath(t),stripComponents:1})}static isConventionalTarballUrl(t,r,{configuration:o}){let a=KC(t.scope,{configuration:o}),n=Il.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=Pr.clean(t.reference.slice(Un.length));if(r===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");return`${Nk(t)}/-/${t.name}-${r}.tgz`}};Ke();Ke();Ke();var J9=tt(jn());var Uk=W.makeIdent(null,"node-gyp"),o2t=/\b(node-gyp|prebuild-install)\b/,gv=class{supportsDescriptor(t,r){return t.range.startsWith(Un)?!!Pr.validRange(t.range.slice(Un
|
|||
|
`;try{a=await oe.readFilePromise(t,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var _G={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}},Ive={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"}},sDt={configuration:{..._G,...Ive,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{..._G,...Ive}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:CA,valueDefinition:{description:"",type:"SHAPE",properties:{..._G}}}},fetchers:[pv,Il],resolvers:[hv,gv,dv]},oDt=sDt;var VG={};Yt(VG,{NpmAuditCommand:()=>_0,NpmInfoCommand:()=>H0,NpmLoginCommand:()=>q0,NpmLogoutCommand:()=>G0,NpmPublishCommand:()=>j0,NpmTagAddCommand:()=>Y0,NpmTagListCommand:()=>W0,NpmTagRemoveCommand:()=>K0,NpmWhoamiCommand:()=>J0,default:()=>fDt,npmAuditTypes:()=>Tv,npmAuditUtils:()=>cF});Ke();Ke();Ht();var YG=tt(Zo());sl();var Tv={};Yt(Tv,{Environment:()=>Fv,Severity:()=>Rv});var Fv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Fv||{}),Rv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Rv||{});var cF={};Yt(cF,{allSeverities:()=>aI,getPackages:()=>WG,getReportTree:()=>GG,getSeverityInclusions:()=>qG,getTopLevelDependencies:()=>jG});Ke();var wve=tt(jn());var aI=["info","low","moderate","high","critical"];function qG(e){if(typeof e>"u")return new Set(aI);let t=aI.indexOf(e),r=aI.slice(t);return new Set(r)}function GG(e){let t={},r={children:t};for(let[o,a]of He.sortMap(Object.entries(e),n=>n[0]))for(let n of He.sortMap(a,u=>`${u.id}`))t[`${o}/${n.id}`]={value:me.tuple(me.Type.IDENT,W.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:me.tuple(me.Type.ID,n.id)},Issue:{label:"Issue",value:me.tuple(me.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:me.tuple(me.Type.URL,n.url)},Severity:{label:"Severity",value:me.tuple(me.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:me.tuple(me.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(wve.default.compare).map(u=>({value:me.tuple(me.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:He.sortMap(n.dependents,u=>W.stringifyLocator(u)).map(u=>({value:me.tuple(me.Type.LOCATOR,u)}))}}};return r}function jG(e,t,{all:r,environment:o}){let a=[],n=r?e.workspaces:[t],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function WG(e,t,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=e.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let C=e.storedPackages.get(h);if(typeof C>"u")throw new Error("Assertion failed: The package should have been registered");if(W.ensureDevirtualizedLocator(C).reference.startsWith("npm:")&&C.version!==null){let v=W.stringifyIdent(C),b=He.getMapWithDefault(o,v);He.getArrayWithDefault(b,C.version).push(A)}if(r)for(let v of C.dependencies.values())n.push([C,v])};for(let{workspace:A,dependency:p}of t)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var _0=class extends At{constructor(){super(...arguments);this.all=he.Boolean("-A,--all",
|
|||
|
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 ${aI.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"]]});Ke();Ke();Dt();Ht();var KG=tt(jn()),JG=ye("util"),H0=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Rt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let C;if(h==="."){let ae=o.topLevelWorkspace;if(!ae.manifest.name)throw new at(`Missing ${me.pretty(r,"name",me.Type.CODE)} field in ${Ae.fromPortablePath(J.join(ae.cwd,Nr.manifest))}`);C=W.makeDescriptor(ae.manifest.name,"unknown")}else C=W.parseDescriptor(h);let w=en.getIdentUrl(C),v=zG(await en.get(w,{configuration:r,ident:C,jsonResponse:!0,customErrorMessage:en.customPackageError})),b=Object.keys(v.versions).sort(KG.default.compareLoose),R=v["dist-tags"].latest||b[b.length-1],N=Pr.validRange(C.range);if(N){let ae=KG.default.maxSatisfying(b,N);ae!==null?R=ae:(p.reportWarning(0,`Unmet range ${W.prettyRange(r,C.range)}; falling back to the latest version`),u=!0)}else Object.prototype.hasOwnProperty.call(v["dist-tags"],C.range)?R=v["dist-tags"][C.range]:C.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${W.prettyRange(r,C.range)}; falling back to the latest version`),u=!0);let U=v.versions[R],z={...v,...U,version:R,versions:b},$;if(a!==null){$={};for(let ae of a){let pe=z[ae];if(typeof pe<"u")$[ae]=pe;else{p.reportWarning(1,`The ${me.pretty(r,ae,me.Type.CODE)} field doesn't exist inside ${W.prettyIdent(r,C)}'s information`),u=!0;continue}}}else this.json||(delete z.dist,delete z.readme,delete z.users),$=z;p.reportJson($),this.json||n.push($)}});JG.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`${(0,JG.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
|
|||
|
`);return A.exitCode()}};H0.paths=[["npm","info"]],H0.usage=st.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 versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function zG(e){if(Array.isArray(e)){let t=[];for(let r of e)r=zG(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 o=zG(e[r]);o&&(t[r]=o)}return t}else return e||null}Ke();Ke();Ht();var Bve=tt(l2()),q0=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=await uF({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Rt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await lDt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=`/-/user/org.couchdb.user:${encodeURIComponent(u.name)}`,p=await en.put(A,u,{attemptedAs:u.name,configuration:r,registry:o,jsonResponse:!0,authType:en.AuthType.NO_AUTH});return await aDt(o,p.token,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};q0.paths=[["npm","login"]],q0.usage=st.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"],
|
|||
|
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 function Lv(e,t){let r=`/-/package${en.getIdentUrl(e)}/dist-tags`;return en.get(r,{configuration:t,ident:e,jsonResponse:!0,customErrorMessage:en.customPackageError})}var Y0=class extends At{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new $t(o.cwd,this.context.cwd);let n=W.parseDescriptor(this.package,!0),u=n.range;if(!Dve.default.valid(u))throw new at(`The range ${me.pretty(r,n.range,me.Type.RANGE)} must be a valid semver version`);let A=Yn.getPublishRegistry(a.manifest,{configuration:r}),p=me.pretty(r,n,me.Type.IDENT),h=me.pretty(r,u,me.Type.RANGE),C=me.pretty(r,this.tag,me.Type.CODE);return(await Rt.start({configuration:r,stdout:this.context.stdout},async v=>{let b=await Lv(n,r);Object.prototype.hasOwnProperty.call(b,this.tag)&&b[this.tag]===u&&v.reportWarning(0,`Tag ${C} is already set to version ${h}`);let E=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(E,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${C} added to version ${h} of package ${p}`)})).exitCode()}};Y0.paths=[["npm","tag","add"]],Y0.usage=st.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"]]});Ke();Ht();var K0=class extends At{constructor(){super(...arguments);this.package=he.String();this.tag=he.String()}async execute(){if(this.tag==="latest")throw new at("The 'latest' tag cannot be removed.");let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new $t(o.cwd,this.context.cwd);let n=W.parseIdent(this.package),u=Yn.getPublishRegistry(a.manifest,{configuration:r}),A=me.pretty(r,this.tag,me.Type.CODE),p=me.pretty(r,n,me.Type.IDENT),h=await Lv(n,r);if(!Object.prototype.hasOwnProperty.call(h,this.tag))throw new at(`${A} is not a tag of package ${p}`);return(await Rt.start({configuration:r,stdout:this.context.stdout},async w=>{let v=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};K0.paths=[["npm","tag","remove"]],K0.usage=st.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"]]});Ke();Ke();Ht();var J0=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"})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=Yn.getScopeRegistry(this.scope,{configuration:r,type:Yn.RegistryType.PUBLISH_REGISTRY}):this.scope?o=Yn.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=Yn.getPublishRegistry((await gC(r,this.context.cwd)).manifest,{configuration:r}):o=Yn.getDefaultRegistry({configuration:r}),(await Rt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await en.get("/-/whoami",{configuration:r,registry:o,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?W.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};J0.paths=[["npm","whoami"]],J0.usage=st.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"]]});var ADt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},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:[_0,H0,q0,G0,j0,Y0,W0,K0,J0]},fDt=ADt;var nj={};Yt(nj,{PatchCommand:()=>X0,PatchCommitCommand:()=>V0,PatchFetcher:()=>_v,PatchResolver:()=>Hv,default:()=>QDt,patchUtils:()=>Qm});Ke();Ke();Dt();sA();var Qm={};Yt(Qm,{applyPatchFile:()=>fF,diffFolders:()=>tj,ensureUnpatchedDescriptor:()=>XG,ensureUnpatchedLocator:()=>hF,extractPackageToDisk:()=>ej,extractPatchFlags:()=>Fve,isParentRequired:()=>$G,isPatchDescriptor:()=>pF,isPatchLocator:()=>z0,loadPatchFiles:()=>Uv,makeDescriptor:()=>gF,makeLocator:()=>ZG,makePatchHash:()=>rj,parseDescriptor:()=>Mv,parseLocator:()=>Ov,parsePatchFile:()=>Nv,unpatchDescriptor:()=>SDt,unpatchLocator:()=>xDt});Ke();Dt();Ke();Dt();var pDt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function cI(e){return J.relative(It.root,J.resolve(It.root,Ae.toPortablePath(e)))}function hDt(e){let t=e.trim().match(pDt);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 gDt=420,dDt=493;var Pve=()=>({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}),mDt=e=>({header:hDt(e),parts:[]}),yDt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function EDt(e){let t=[],r=Pve(),o="parsing header
|
|||
|
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
|||
|
`):"";await t.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[wi.SAFE_TIME,wi.SAFE_TIME]}),await t.writeFilePromise(a.path,n,{mode:a.mode}),await t.utimesPromise(a.path,wi.SAFE_TIME,wi.SAFE_TIME)}break;case"patch":await AI(t,a.path,async()=>{await vDt(a,{baseFs:t,dryRun:r})});break;case"mode change":{let u=(await t.statPromise(a.path)).mode;if(Sve(a.newMode)!==Sve(u))continue;await AI(t,a.path,async()=>{await t.chmodPromise(a.path,a.newMode)})}break;default:He.assertNever(a);break}}function Sve(e){return(e&64)>0}function xve(e){return e.replace(/\s+$/,"")}function BDt(e,t){return xve(e)===xve(t)}async function vDt({hunks:e,path:t},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(t).mode,u=(await r.readFileSync(t,"utf8")).split(/\n/),A=[],p=0,h=0;for(let w of e){let v=Math.max(h,w.header.patched.start+p),b=Math.max(0,v-h),E=Math.max(0,u.length-v-w.header.original.length),R=Math.max(b,E),N=0,U=0,z=null;for(;N<=R;){if(N<=b&&(U=v-N,z=bve(w,u,U),z!==null)){N=-N;break}if(N<=E&&(U=v+N,z=bve(w,u,U),z!==null))break;N+=1}if(z===null)throw new uI(e.indexOf(w),w);A.push(z),p+=N,h=U+w.header.original.length}if(o)return;let C=0;for(let w of A)for(let v of w)switch(v.type){case"splice":{let b=v.index+C;u.splice(b,v.numToDelete,...v.linesToInsert),C+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:He.assertNever(v);break}await r.writeFilePromise(t,u.join(`
|
|||
|
`),{mode:a})}function bve(e,t,r){let o=[];for(let a of e.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=t[r];if(u==null||!BDt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:He.assertNever(a.type);break}return o}var PDt=/^builtin<([^>]+)>$/;function fI(e,t){let{protocol:r,source:o,selector:a,params:n}=W.parseRange(e);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(C=>Ae.toPortablePath(C)):[],A=n&&typeof n.locator=="string"?W.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=t(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function pF(e){return e.range.startsWith("patch:")}function z0(e){return e.reference.startsWith("patch:")}function Mv(e){let{sourceItem:t,...r}=fI(e.range,W.parseDescriptor);return{...r,sourceDescriptor:t}}function Ov(e){let{sourceItem:t,...r}=fI(e.reference,W.parseLocator);return{...r,sourceLocator:t}}function SDt(e){let{sourceItem:t}=fI(e.range,W.parseDescriptor);return t}function xDt(e){let{sourceItem:t}=fI(e.reference,W.parseLocator);return t}function XG(e){if(!pF(e))return e;let{sourceItem:t}=fI(e.range,W.parseDescriptor);return t}function hF(e){if(!z0(e))return e;let{sourceItem:t}=fI(e.reference,W.parseLocator);return t}function Qve({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=e!==null?{locator:W.stringifyLocator(e)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return W.makeRange({protocol:"patch:",source:n(t),selector:r.join("&"),params:{...A,...p,...u}})}function gF(e,{parentLocator:t,sourceDescriptor:r,patchPaths:o}){return W.makeDescriptor(e,Qve({parentLocator:t,sourceItem:r,patchPaths:o},W.stringifyDescriptor))}function ZG(e,{parentLocator:t,sourcePackage:r,patchPaths:o,patchHash:a}){return W.makeLocator(e,Qve({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},W.stringifyLocator))}function kve({onAbsolute:e,onRelative:t,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(PDt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):J.isAbsolute(a)?e(a):t(a)}function Fve(e){let t=e.lastIndexOf("!");return{optional:(t!==-1?new Set(e.slice(0,t).split(/!/)):new Set).has("optional")}}function $G(e){return kve({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},e)}async function Uv(e,t,r){let o=e!==null?await r.fetcher.fetch(e,r):null,a=o&&o.localPath?{packageFs:new un(It.root),prefixPath:J.relative(It.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await He.releaseAfterUseAsync(async()=>await Promise.all(t.map(async u=>{let A=Fve(u),p=await kve({onAbsolute:async h=>await oe.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 oe.readFilePromise(J.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(C=>C.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
|
|||
|
`));return n}async function ej(e,{cache:t,project:r}){let o=r.storedPackages.get(e.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=hF(e),n=r.storedChecksums,u=new Qi,A=await oe.mktempPromise(),p=J.join(A,"source"),h=J.join(A,"user"),C=J.join(A,".yarn-patch.json"),w=r.configuration.makeFetcher(),v=[];try{let b,E;if(e.locatorHash===a.locatorHash){let R=await w.fetch(e,{cache:t,project:r,fetcher:w,checksums:n,report:u});v.push(()=>R.releaseFs?.()),b=R,E=R}else b=await w.fetch(e,{cache:t,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>b.releaseFs?.()),E=await w.fetch(e,{cache:t,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>E.releaseFs?.());await Promise.all([oe.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),oe.copyPromise(h,E.prefixPath,{baseFs:E.packageFs}),oe.writeJsonPromise(C,{locator:W.stringifyLocator(e),version:o.version})])}finally{for(let b of v)b()}return oe.detachTemp(A),h}async function tj(e,t){let r=Ae.fromPortablePath(e).replace(/\\/g,"/"),o=Ae.fromPortablePath(t).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Rr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{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 u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${He.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${He.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(He.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(He.escapeRegExp(`${o}/`),"g"),"")}function rj(e,t){let r=[];for(let{source:o}of e){if(o===null)continue;let a=Nv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&t!==null&&!Pr.satisfiesWithPrereleases(t,u)||r.push(JSON.stringify(A))}}return mn.makeHash(`${3}`,...r).slice(0,6)}Ke();function Rve(e,{configuration:t,report:r}){for(let o of e.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${me.pretty(t,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${me.pretty(t,a,me.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${me.pretty(t,a,me.Type.ADDED)}`);break;default:He.assertNever(o.type)}}var _v=class{supports(t,r){return!!z0(t)}getLocalPath(t,r){return null}async fetch(t,r){let o=r.checksums.get(t.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(t,o,{onHit:()=>r.report.reportCacheHit(t),onMiss:()=>r.report.reportCacheMiss(t,`${W.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:W.getIdentVendorPath(t),localPath:this.getLocalPath(t,r),checksum:u}}async patchPackage(t,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Ov(t),A=await Uv(o,u,r),p=await oe.mktempPromise(),h=J.join(p,"current.zip"),C=await r.fetcher.fetch(a,r),w=W.getIdentVendorPath(t),v=new As(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await He.releaseAfterUseAsync(async()=>{await v.copyPromise(w,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),v.saveAndClose();for(let{source:b,optional:E}of A){if(b===null)continue;let R=new As(h,{level:r.project.configuration.get("compressionLevel")}),N=new un(J.resolve(It.root,w),{baseFs:R});try{await fF(Nv(b),{baseFs:N,version:n})}catch(U){if(!(U instanceof uI))throw U;let z=r.project.configuration.get("enableInlineHunks"),$=!z&&!E?" (set enableInlineHunks for details)":"",ae=`${W.prettyLocator(r.project.configuration,t)}: ${U.message}${$}`,pe=de=>{!z||Rve(U.hunk,{configuration:r.project.configuration,report:de})};if(R.discardAndClose(),E){r.report.reportWarningOnce(66,ae,{reportExtra:pe});continue}else throw new Jt(66,ae,pe)}R.saveAndClose()}return new As(h,{level:r.project.configuration.get("compressionLevel")})}};Ke();var Hv=class{supportsDescriptor(t,r){return!!pF(t)}supportsLocator(t,r){return!!z0(t)}shouldPersistResolution(t,r){return!1}bindDescriptor(t,r,o){let{patchPaths:a}=Mv(t);return a.every(n=>!$G(n))?t:W.bindDescriptor(t,{locator:W.stringifyLocator(r)})}getResolutionDependencies(t,r){let{sourceDescriptor:o}=Mv(t);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(t,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Mv(t),u=await Uv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=rj(u,A.version);return[ZG(t,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(t,r,o,a){let[n]=await this.getCandidates(t,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(t,r){let{sourceLocator:o}=Ov(t);return{...await r.resolver.resolve(o,r),...t}}};Ke();Dt();Ht();var V0=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()}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Pt.find(r,this.context.cwd);if(!a)throw new $t(o.cwd,this.context.cwd);await o.restoreInstallState();let n=J.resolve(this.context.cwd,Ae.toPortablePath(
|
|||
|
${A.map(p=>`
|
|||
|
- ${W.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new at("No package found in the project for the given locator");await Rt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=hF(u),h=await ej(u,{cache:n,project:o});A.reportJson({locator:W.stringifyLocator(p),path:Ae.fromPortablePath(h)});let C=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${W.prettyLocator(r,p)} got extracted with success${C}!`),A.reportInfo(0,`You can now edit the following folder: ${me.pretty(r,Ae.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${me.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.`)})}};X0.paths=[["patch"]],X0.usage=st.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s <path>` (with `<path>` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var bDt={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:[V0,X0],fetchers:[_v],resolvers:[Hv]},QDt=bDt;var oj={};Yt(oj,{PnpmLinker:()=>qv,default:()=>LDt});Ke();Dt();Ht();var qv=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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new at(`The project in ${me.pretty(r.project.configuration,`${r.project.cwd}/package.json`,me.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 at(`Couldn't find ${W.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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new at(`The project in ${me.pretty(r.project.configuration,`${r.project.cwd}/package.json`,me.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 u=t,A=t;do{A=u,u=J.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(t){return new ij(t)}isEnabled(t){return t.project.configuration.get("nodeLinker")==="pnpm"}},ij=class{constructor(t){this.opts=t;this.asyncActions=new He.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=bD(oe,{indexPath:J.join(t.project.configuration.get("globalFolder"),"index")})}attachCustomData(t){}async installPackage(t,r,o){switch(t.linkType){case"SOFT":return this.installPackageSoft(t,r,o);case"HARD":return this.installPackageHard(t,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(t,r,o){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(t)?J.join(a,Nr.nodeModules):null;return this.customData.pathsByLocator.set(t.locatorHash,{packageLocation:a,dependenciesLocation:n})
|
|||
|
|
|||
|
${MDt}
|
|||
|
`,"--",...o],{cwd:e,strict:!0})},async makeReset(e,t){let r=t.map(o=>Ae.fromPortablePath(o.path));await Rr.execvp("git",["reset","HEAD","--",...r],{cwd:e,strict:!0})}};var _ve={async findRoot(e){return await Gv(e,{marker:".hg"})},async filterChanges(e,t,r){return[]},async genCommitMessage(e,t){return""},async makeStage(e,t){},async makeCommit(e,t,r){},async makeReset(e,t){},async makeUpdate(e,t){}};var qDt=[Uve,_ve],Z0=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})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await Pt.find(r,this.context.cwd),{driver:a,root:n}=await GDt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,o,w=>{u.push(w)});let A=new Set;for(let w of u)for(let v of jDt(n,w))A.add(v);let p=new Set([r.get("rcFilename"),r.get("lockfileFilename"),"package.json"]),h=await a.filterChanges(n,A,p),C=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${C}
|
|||
|
`);else for(let w of h)this.context.stdout.write(`${Ae.fromPortablePath(w.path)}
|
|||
|
`);else if(this.reset){let w=await a.filterChanges(n,A,p,{staged:!0});w.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,w)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,C):(await a.makeStage(n,h),this.context.stdout.write(C))}};Z0.paths=[["stage"]],Z0.usage=st.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 function GDt(e){let t=null,r=null;for(let o of qDt)if((r=await o.findRoot(e))!==null){t=o;break}if(t===null||r===null)throw new at("No stage driver has been found for your current project");return{driver:t,root:r}}function jDt(e,t){let r=[];if(t===null)return r;for(;;){(t===e||t.startsWith(`${e}/`))&&r.push(t);let o;try{o=oe.statSync(t)}catch{break}if(o.isSymbolicLink())t=J.resolve(J.dirname(t),oe.readlinkSync(t));else break}return r}var WDt={commands:[Z0]},YDt=WDt;var pj={};Yt(pj,{default:()=>ePt});Ke();Ke();Dt();var Gve=tt(jn());Ke();var Hve=tt(E6()),KDt="e8e1bd300d860104bb8c58453ffa1eb4",JDt="OFCNCOG2CU",qve=async(e,t)=>{let r=W.stringifyIdent(e),a=zDt(t).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},zDt=e=>(0,Hve.default)(JDt,KDt,{requester:{async send(r){try{let o=await an.request(r.url,r.data||null,{configuration:e,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var jve=e=>e.scope?`${e.scope}__${e.name}`:`${e.name}`,VDt=async(e,t,r,o)=>{if(r.scope==="types")return;let{project:a}=e,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??oe.existsSync(J.join(a.cwd,"tsconfig.json"))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Qi};if(!await qve(r,n))return;let C=jve(r),w=W.parseRange(r.range).selector;if(!Pr.validRange(w)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);w=W.parseRange(U[0].reference).selector}let v=Gve.default.coerce(w);if(v===null)return;let b=`${nu.Modifier.CARET}${v.major}`,E=W.makeDescriptor(W.makeIdent("types",C),b),R=He.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,z=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&z!==r.descriptorHash)return He.mapAndFind.skip;let $=[];for(let ae of Lt.allDependencies){let pe=N.manifest[ae].get(E.identHash);typeof pe>"u"||$.push([ae,pe])}return $.length===0?He.mapAndFind.skip:$});if(typeof R<"u")for(let[N,U]of R)e.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(E);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}e.manifest[nu.Target.DEVELOPMENT].set(E.identHash,E)}},XDt=async(e,t,r)=>{if(r.scope==="types")return;let{project:o}=e,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??oe.existsSync(J.join(o.cwd,"tsconfig.json"))))return;let u=jve(r),A=W.makeIdent("types",u);for(let p of Lt.allDependencies)typeof e.manifest[p].get(A.identHash)>"u"||e.manifest[p].delete(A.identHash)},ZDt=(e,t)=>{t.publishConfig&&t.publishConfig.typings&&(t.typings=t.publishConfig.typings),t.
|
|||
|
- ${A.map(b=>Ae.fromPortablePath(b)).join(`
|
|||
|
- `)}`);let p=new Set(He.mapAndFilter(n,b=>{let E=e.tryWorkspaceByFilePath(b);return E===null?He.mapAndFilter.skip:E}));if(A.length===0&&p.size===0&&!t)return null;let h=A.length===1?A[0]:J.join(u,`${mn.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=oe.existsSync(h)?await oe.readFilePromise(h,"utf8"):"{}",w=Ki(C),v=new Map;for(let b of w.declined||[]){let E=W.parseIdent(b),R=e.getWorkspaceByIdent(E);v.set(R,"decline")}for(let[b,E]of Object.entries(w.releases||{})){let R=W.parseIdent(b),N=e.getWorkspaceByIdent(R);v.set(N,pI(E))}return{project:e,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:v,async saveAll(){let b={},E=[],R=[];for(let N of e.workspaces){if(N.manifest.version===null)continue;let U=W.stringifyIdent(N.locator),z=v.get(N);z==="decline"?E.push(U):typeof z<"u"?b[U]=pI(z):p.has(N)&&R.push(U)}await oe.mkdirPromise(J.dirname(h),{recursive:!0}),await oe.changeFilePromise(h,Pa(new Pa.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:E.length>0?E:void 0,undecided:R.length>0?R:void 0})))}}}function dPt(e){return mF(e).size>0||Yv(e).length>0}function mF(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 Yv(e,{include:t=new Set}={}){let r=[],o=new Map(He.mapAndFilter([...e.releases],([n,u])=>u==="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(He.mapAndFilter([...e.releases],([n,u])=>u!=="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of e.project.workspaces)if(!(!t.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Lt.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=e.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function dj(e,t){let r=PA.default.clean(t);for(let o of Object.values(hI))if(o!=="undecided"&&o!=="decline"&&PA.default.inc(e,o)===r)return o;return null}function yF(e,t){if(PA.default.valid(t))return t;if(e===null)throw new at(`Cannot apply the release strategy "${t}" unless the workspace already has a valid version`);if(!PA.default.valid(e))throw new at(`Cannot apply the release strategy "${t}" on a non-semver version (${e})`);let r=PA.default.inc(e,t);if(r===null)throw new at(`Cannot apply the release strategy "${t}" on the specified version (${e})`);return r}function mj(e,t,{report:r}){let o=new Map;for(let a of e.workspaces)for(let n of Lt.allDependencies)for(let u of a.manifest[n].values()){let A=e.tryWorkspaceByDescriptor(u);if(A===null||!t.has(A))continue;He.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of t){let u=a.manifest.version;a.manifest.version=n,PA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?W.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${W.prettyLocator(e.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:Ae.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,C,w]of p){let v=h.manifest[C].get(w);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let b=v.range,E=!1;if(b.startsWith(Wn.protocol)&&(b=b.slice(Wn.protocol.length),E=!0,b===a.relativeCwd))continue;let R=b.match(gPt);if(!R){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${W.prettyLocator(e.configuration,h.anchoredLocator)})`);continue}let N=`${R[1]}${n}`;E&&(N=`${Wn.protocol}${N}`);let U=W.makeDescriptor(v,N);h.manifest[C].set(w,U)}}}var mPt=new Map([["%n",{extract:e=>e.length>=1?[e[0],e.slice(1)]:null,generate:(e=0)=>`${e+1}`}]]);function Vve(e,{current:t,prerelease:r}){let o=new PA.default.SemVer(t),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==e&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=mPt.get(p);if(t
|
|||
|
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.%d\`) 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"]]});Ke();Dt();Ht();var EF=tt(jn());var eg=class extends At{constructor(){super(...arguments);this.interactive=he.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){xC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(Ek(),Yq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Bk(),wk)),{FocusRequest:a}=await Promise.resolve().then(()=>(Jq(),Jwe)),{useListInput:n}=await Promise.resolve().then(()=>(Ik(),zwe)),{renderForm:u}=await Promise.resolve().then(()=>(Sk(),Pk)),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(Ac())),{default:h,useCallback:C,useState:w}=await Promise.resolve().then(()=>tt($r())),v=await Je.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await Pt.find(v,this.context.cwd);if(!E)throw new $t(b.cwd,this.context.cwd);await b.restoreInstallState();let R=await gI(b);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new at("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,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(A,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(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:ve,active:ce,decision:ge,setDecision:Oe})=>{let g=ve.manifest.raw.stableVersion??ve.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${W.prettyLocator(v,ve.anchoredLocator)})`);if(EF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let Ie=["undecided","decline","patch","minor","major"];n(ge,Ie,{active:ce,minus:"left",plus:"right",set:Oe});let xe=ge==="undecided"?h.createElement(p,{color:"yellow"},g):ge==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},EF.default.valid(ge)?ge:EF.default.inc(g,ge)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,W.prettyLocator(v,ve.anchoredLocator)," - ",xe)),h.createElement(A,null,Ie.map(le=>h.createElement(A,{key:le,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:le===ge})," ",le)))))},z=ve=>{let ce=new Set(R.releaseRoots),ge=new Map([...ve].filter(([Oe])=>ce.has(Oe)));for(;;){let Oe=Yv({project:R.project,releases:ge}),g=!1;if(Oe.length>0){for(let[Ie]of Oe)if(!ce.has(Ie)){ce.add(Ie),g=!0;let xe=ve.get(Ie);typeof xe<"u"&&ge.set(Ie,xe)}}if(!g)break}return{relevantWorkspaces:ce,relevantReleases:ge}},$=()=>{let[ve,ce]=w(()=>new Map(R.releases)),ge=C((Oe,g)=>{let Ie=new Map(ve);g!=="undecided"?Ie.set(Oe,g):Ie.delete(Oe);let{relevantReleases:xe}=z(Ie);ce(xe)},[ve,ce]);return[ve,ge]},ae=({workspaces:ve,releases:ce})=>{let ge=[];ge.push(`${ve.size} total`);let Oe=0,g=0;for(let Ie of ve){let xe=ce.get(Ie);typeof xe>"u"?g+=1:xe!=="decline"&&(Oe+=1)}return ge.push(`${Oe} release${Oe===1?"":"s"}`),ge.push(`${g} remaining`),h.createElement(p,{color:"yellow"},ge.join(", "))},de=await u(({useSubmit:ve})=>{let[ce,ge]=$();ve(ce);let{relevantWorkspaces:Oe}=z(ce),g=new Set([...Oe].filte
|
|||
|
/*
|
|||
|
object-assign
|
|||
|
(c) Sindre Sorhus
|
|||
|
@license MIT
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* buildToken
|
|||
|
* Builds OAuth token prefix (helper function)
|
|||
|
*
|
|||
|
* @name buildToken
|
|||
|
* @function
|
|||
|
* @param {GitUrl} obj The parsed Git url object.
|
|||
|
* @return {String} token prefix
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-windows <https://github.com/jonschlinkert/is-windows>
|
|||
|
*
|
|||
|
* Copyright © 2015-2018, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/**
|
|||
|
@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 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.
|
|||
|
*/
|
|||
|
/**
|
|||
|
@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 React v0.18.0
|
|||
|
* 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.
|
|||
|
*/
|
|||
|
/** @license React v0.24.0
|
|||
|
* 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.
|
|||
|
*/
|
|||
|
/** @license React v16.13.1
|
|||
|
* 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.
|
|||
|
*/
|