778 lines
2.7 MiB
JavaScript
778 lines
2.7 MiB
JavaScript
|
#!/usr/bin/env node
|
|||
|
/* eslint-disable */
|
|||
|
//prettier-ignore
|
|||
|
(()=>{var k3e=Object.create,uI=Object.defineProperty,S3e=Object.defineProperties,b3e=Object.getOwnPropertyDescriptor,x3e=Object.getOwnPropertyDescriptors,P3e=Object.getOwnPropertyNames,fQ=Object.getOwnPropertySymbols,F3e=Object.getPrototypeOf,nF=Object.prototype.hasOwnProperty,Fj=Object.prototype.propertyIsEnumerable;var Rj=(t,e,r)=>e in t?uI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,re=(t,e)=>{for(var r in e||(e={}))nF.call(e,r)&&Rj(t,r,e[r]);if(fQ)for(var r of fQ(e))Fj.call(e,r)&&Rj(t,r,e[r]);return t},Me=(t,e)=>S3e(t,x3e(e)),R3e=t=>uI(t,"__esModule",{value:!0});var an=(t,e)=>{var r={};for(var s in t)nF.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&fQ)for(var s of fQ(t))e.indexOf(s)<0&&Fj.call(t,s)&&(r[s]=t[s]);return r},St=(t,e)=>()=>(t&&(e=t(t=0)),e),K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),or=(t,e)=>{for(var r in e)uI(t,r,{get:e[r],enumerable:!0})},T3e=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of P3e(e))!nF.call(t,s)&&s!=="default"&&uI(t,s,{get:()=>e[s],enumerable:!(r=b3e(e,s))||r.enumerable});return t},He=t=>T3e(R3e(uI(t!=null?k3e(F3e(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Hi={};or(Hi,{SAFE_TIME:()=>iF,S_IFDIR:()=>Of,S_IFLNK:()=>_f,S_IFMT:()=>LA,S_IFREG:()=>Uf});var LA,Of,Uf,_f,iF,fI=St(()=>{LA=61440,Of=16384,Uf=32768,_f=40960,iF=456789e3});var sF={};or(sF,{BigIntStatsEntry:()=>pI,DEFAULT_MODE:()=>gI,DirEntry:()=>Tj,StatEntry:()=>mp,areStatsEqual:()=>aF,clearStats:()=>gQ,convertToBigIntStats:()=>pQ,makeDefaultStats:()=>hI,makeEmptyStats:()=>N3e});function hI(){return new mp}function N3e(){return gQ(hI())}function gQ(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):oF.types.isDate(r)&&(t[e]=new Date(0))}return t}function pQ(t){let e=new pI;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let s=t[r];typeof s=="number"?e[r]=BigInt(s):oF.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function aF(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var oF,gI,Tj,mp,pI,hQ=St(()=>{oF=He(require("util"));fI();gI=Uf|420,Tj=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&LA)===Of}isFIFO(){return!1}isFile(){return(this.mode&LA)===Uf}isSocket(){return!1}isSymbolicLink(){return(this.mode&LA)===_f}},mp=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=gI;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&LA)===Of}isFIFO(){return!1}isFile(){return(this.mode&LA)===Uf}isSocket(){return!1}isSymbolicLink(){return(this.mode&LA)===_f}},pI=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);
|
|||
|
`).length,s=e.length-r;return r>s?`\r
|
|||
|
`:`
|
|||
|
`}function th(t,e){return e.replace(/\r?\n/g,Y3e(t))}var jj,Gj,Cp,rh,Ip=St(()=>{jj=He(require("crypto")),Gj=He(require("os"));cF();Ea();Cp=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let o=s.shift();if((await this.lstatPromise(o)).isDirectory()){let l=await this.readdirPromise(o);if(r)for(let u of l.sort())s.push(this.pathUtils.join(o,u));else throw new Error("Not supported")}else yield o}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let s=await this.openPromise(e,"r");try{let o=65536,n=Buffer.allocUnsafeSlow(o),l=(0,jj.createHash)(r),u=0;for(;(u=await this.readPromise(s,n,0,o))!==0;)l.update(u===o?n:n.slice(0,u));return l.digest("hex")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let o;try{o=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(o.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(l=>this.removePromise(this.pathUtils.resolve(e,l))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(l){if(l.code!=="EBUSY"&&l.code!=="ENOTEMPTY")throw l;n<s&&await new Promise(u=>setTimeout(u,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;throw o}if(s.isDirectory()){if(r)for(let o of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,o));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let o=e.split(this.pathUtils.sep),n;for(let l=2;l<=o.length;++l){let u=o.slice(0,l).join(this.pathUtils.sep);if(!this.existsSync(u)){try{await this.mkdirPromise(u)}catch(f){if(f.code==="EEXIST")continue;throw f}if(n!=null||(n=u),r!=null&&await this.chmodPromise(u,r),s!=null)await this.utimesPromise(u,s[0],s[1]);else{let f=await this.statPromise(this.pathUtils.dirname(u));await this.utimesPromise(u,f.atime,f.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let o=e.split(this.pathUtils.sep),n;for(let l=2;l<=o.length;++l){let u=o.slice(0,l).join(this.pathUtils.sep);if(!this.existsSync(u)){try{this.mkdirSync(u)}catch(f){if(f.code==="EEXIST")continue;throw f}if(n!=null||(n=u),r!=null&&this.chmodSync(u,r),s!=null)this.utimesSync(u,s[0],s[1]);else{let f=this.statSync(this.pathUtils.dirname(u));this.utimesSync(u,f.atime,f.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:o=!0,stableSort:n=!1,stableTime:l=!1,linkStrategy:u=null}={}){return await Oj(this,e,s,r,{overwrite:o,stableSort:n,stableTime:l,linkStrategy:u})}copySync(e,r,{baseFs:s=this,overwrite:o=!0}={}){let n=s.lstatSync(r),l=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let f=s.readdirSync(r);for(let g of f)this.copySync(this.pathUtils.join(e,g),s.pathUtils.join(r,g),{baseFs:s,overwrite:o})}else if(n.isFile()){if(!l||o){l&&this.removeSync(e);let f=s.readFileSync(r);this.writeFileSync(e,f)}}else if(n.isSymbolicLink()){if(!l||o){l&&this.removeSync(e);let f=s.readlinkSync(r);this.symlinkSync(dQ(this.pathUtils,f),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let u=n.mode&511;this.chmodSync(e,u)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let o=Buffer.alloc(0);try{o=await this.readFilePromise(e)}catch(n){}Buffer.compare(o,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:o}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch(u){}let l=s?th(n,r):r;n!==l&&await this.writeFilePromise(e,l,{mode:o})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let o=Buffer.alloc(0);try{o=this.readFileSync(e)}catch(n){}Buffer.compare(o,r)!==0&&this.writeFileSync(e,r,{mode:s})}c
|
|||
|
`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)}
|
|||
|
`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),o=await r();typeof o!="undefined"&&(e=o),this.lutimesPromise?await this.lutimesPromise(e,s.atime,s.mtime):s.isSymbolicLink()||await this.utimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),o=r();typeof o!="undefined"&&(e=o),this.lutimesSync?this.lutimesSync(e,s.atime,s.mtime):s.isSymbolicLink()||this.utimesSync(e,s.atime,s.mtime)}},rh=class extends Cp{constructor(){super($)}}});var Yj,fi,Ep=St(()=>{Yj=He(require("fs"));Ip();CI();Ea();fi=class extends rh{constructor(e=Yj.default){super();this.realFs=e,typeof this.realFs.lutimes!="undefined"&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return xt.root}resolve(e){return $.resolve(e)}async openPromise(e,r,s){return await new Promise((o,n)=>{this.realFs.open(de.fromPortablePath(e),r,s,this.makeCallback(o,n))})}openSync(e,r,s){return this.realFs.openSync(de.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,o)=>{typeof r!="undefined"?this.realFs.opendir(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.opendir(de.fromPortablePath(e),this.makeCallback(s,o))}).then(s=>Object.defineProperty(s,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,r){let s=typeof r!="undefined"?this.realFs.opendirSync(de.fromPortablePath(e),r):this.realFs.opendirSync(de.fromPortablePath(e));return Object.defineProperty(s,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,r,s=0,o=0,n=-1){return await new Promise((l,u)=>{this.realFs.read(e,r,s,o,n,(f,g)=>{f?u(f):l(g)})})}readSync(e,r,s,o,n){return this.realFs.readSync(e,r,s,o,n)}async writePromise(e,r,s,o,n){return await new Promise((l,u)=>typeof r=="string"?this.realFs.write(e,r,s,this.makeCallback(l,u)):this.realFs.write(e,r,s,o,n,this.makeCallback(l,u)))}writeSync(e,r,s,o,n){return typeof r=="string"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,o,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?de.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?de.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(de.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>de.toPortablePath(r))}realpathSync(e){return de.toPortablePath(this.realFs.realpathSync(de.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(de.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(de.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,o)=>{this.realFs.access(de.fromPortablePath(e),r,this.makeCallback(s,o))})}existsSync(e){return this.realFs.existsSync(de.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.stat(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.stat(de.fromPortablePath(e),this.makeCallback(s,o))})}statSync(e,r){return r?this.realFs.statSync(de.fromPortablePath(e),r):this.realFs.statSync(de.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,o)):this.realFs.fstat(e,this.makeCallback(s,o))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.lstat(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.lstat(de.fromPortablePath(e),this.makeCallback(s,o))})}lstatSync(e,r){return r?this.realFs.lstatSync(de.fromPortablePath(e),r):this.realFs.lstatSync(de.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,o)=>{this.realFs.fchmod(e,r,this.makeCallback(s,o))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,o)=>{this.realFs.chmod(de.fromPortablePath(e),r,this.makeCallback(s,o))})}c
|
|||
|
`,Ai=le(`\\
|
|||
|
`,!1),rr=function(){return""},Ui="\\",Xn=le("\\",!1),ms=/^[\\$"`]/,Ft=Pe(["\\","$",'"',"`"],!1,!1),$i=function(T){return T},Fn="\\a",ys=le("\\a",!1),wA=function(){return"a"},Pr="\\b",Ro=le("\\b",!1),mr=function(){return"\b"},Ha=/^[Ee]/,Z=Pe(["E","e"],!1,!1),nn=function(){return""},we="\\f",qt=le("\\f",!1),sl=function(){return"\f"},es="\\n",tc=le("\\n",!1),zt=function(){return`
|
|||
|
`},BA="\\r",Jc=le("\\r",!1),rf=function(){return"\r"},ol="\\t",zc=le("\\t",!1),On=function(){return" "},wi="\\v",al=le("\\v",!1),Vc=function(){return"\v"},ca=/^[\\'"?]/,ts=Pe(["\\","'",'"',"?"],!1,!1),To=function(T){return String.fromCharCode(parseInt(T,16))},at="\\x",ao=le("\\x",!1),qa="\\u",rc=le("\\u",!1),Yi="\\U",ja=le("\\U",!1),QA=function(T){return String.fromCodePoint(parseInt(T,16))},xr=/^[0-7]/,vA=Pe([["0","7"]],!1,!1),ks=/^[0-9a-fA-f]/,jt=Pe([["0","9"],["a","f"],["A","f"]],!1,!1),Rn=Je(),hi="{}",ua=le("{}",!1),Ao=function(){return"{}"},Ss="-",fa=le("-",!1),nr="+",ga=le("+",!1),bs=".",lo=le(".",!1),co=function(T,V,ae){return{type:"number",value:(T==="-"?-1:1)*parseFloat(V.join("")+"."+ae.join(""))}},uo=function(T,V){return{type:"number",value:(T==="-"?-1:1)*parseInt(V.join(""))}},No=function(T){return re({type:"variable"},T)},di=function(T){return{type:"variable",name:T}},li=function(T){return T},pa="*",Ys=le("*",!1),Wi="/",Al=le("/",!1),DA=function(T,V,ae){return{type:V==="*"?"multiplication":"division",right:ae}},oe=function(T,V){return V.reduce((ae,he)=>re({left:ae},he),T)},ve=function(T,V,ae){return{type:V==="+"?"addition":"subtraction",right:ae}},We="$((",Rt=le("$((",!1),Dt="))",Vt=le("))",!1),Tr=function(T){return T},Qn="$(",Ga=le("$(",!1),P0=function(T){return T},Mo="${",kA=le("${",!1),Xc=":-",ll=le(":-",!1),Zc=function(T,V){return{name:T,defaultValue:V}},_g=":-}",nc=le(":-}",!1),Kg=function(T){return{name:T,defaultValue:[]}},ic=":+",fo=le(":+",!1),$c=function(T,V){return{name:T,alternativeValue:V}},cl=":+}",ha=le(":+}",!1),Hg=function(T){return{name:T,alternativeValue:[]}},ul=function(T){return{name:T}},F0="$",qg=le("$",!1),ci=function(T){return e.isGlobPattern(T)},nf=function(T){return T},jg=/^[a-zA-Z0-9_]/,eu=Pe([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ws=function(){return P()},sc=/^[$@*?#a-zA-Z0-9_\-]/,Ya=Pe(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),rs=/^[()}<>$|&; \t"']/,da=Pe(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),oc=/^[<>&; \t"']/,xs=Pe(["<",">","&",";"," "," ",'"',"'"],!1,!1),fl=/^[ \t]/,Lo=Pe([" "," "],!1,!1),J=0,bt=0,Wa=[{line:1,column:1}],Ri=0,Ja=[],gt=0,za;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function P(){return t.substring(bt,J)}function U(){return sr(bt,J)}function q(T,V){throw V=V!==void 0?V:sr(bt,J),lr([Lt(T)],t.substring(bt,J),V)}function se(T,V){throw V=V!==void 0?V:sr(bt,J),Br(T,V)}function le(T,V){return{type:"literal",text:T,ignoreCase:V}}function Pe(T,V,ae){return{type:"class",parts:T,inverted:V,ignoreCase:ae}}function Je(){return{type:"any"}}function pt(){return{type:"end"}}function Lt(T){return{type:"other",description:T}}function ur(T){var V=Wa[T],ae;if(V)return V;for(ae=T-1;!Wa[ae];)ae--;for(V=Wa[ae],V={line:V.line,column:V.column};ae<T;)t.charCodeAt(ae)===10?(V.line++,V.column=1):V.column++,ae++;return Wa[T]=V,V}function sr(T,V){var ae=ur(T),he=ur(V);return{start:{offset:T,line:ae.line,column:ae.column},end:{offset:V,line:he.line,column:he.column}}}function At(T){J<Ri||(J>Ri&&(Ri=J,Ja=[]),Ja.push(T))}function Br(T,V){return new oh(T,null,null,V)}function lr(T,V,ae){return new oh(oh.buildMessage(T,V),T,V,ae)}function jr(){var T,V;return T=J,V=mi(),V===r&&(V=null),V!==r&&(bt=T,V=n(V)),T=V,T}function mi(){var T,V,ae,he,tt;if(T=J,V=Oo(),V!==r){for(ae=[],he=_t();he!==r;)ae.push(he),he=_t();ae!==r?(he=ns(),he!==r?(tt=Js(),tt===r&&(tt=null),tt!==r?(bt=T,V=l(V,he,tt),T=V):(J=T,T=r)):(J=T,T=r)):(J=T,T=r)}else J=T,T=r;if(T===r)if(T=J,V=Oo(),V!==r){for(ae=[],he=_t();he!==r;)ae.push(he),he=_t();ae!==r?(he=ns(),he===r&&(he=null),he!==r?(bt=T,V=u(V,he),T=V):(J=T,T=r)):(J=T,T=r)}else J=T,T=r;return T}function Js(){var T,V,ae,he,tt;for(T=J,V=[],ae=_t();ae!==r;)V.push(ae),ae=_t();if(V!==r)if(ae=mi(),ae!==r){for(he=[],tt=_t();tt!==r;)he.push(tt),tt=_t();he!==r?(bt=T,V=f(ae),T=V):(J=T,T=r)}else J=T,T=r;else J=T,T=r;return T}function ns(){var T;return t.charCodeAt(J)===59?(T=g,J++):(T=r,gt===0&&At(C)),T===r&&(t.charCodeAt(J)===38?(T=w,J++):(T=r,gt===0&&At(B)))
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o-1))===-1;)if(o-=1,this.position-o>r/2-1){s=" ... ",o+=5;break}for(n="",l=this.position;l<this.buffer.length&&`\0\r
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(l))===-1;)if(l+=1,l-this.position>r/2-1){n=" ... ",l-=5;break}return u=this.buffer.slice(o,l),p5.repeat(" ",e)+s+u+n+`
|
|||
|
`+p5.repeat(" ",e+this.position-o+s.length)+"^"};MF.prototype.toString=function(e){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:
|
|||
|
`+r)),s};g5.exports=MF});var Os=K((oDt,d5)=>{"use strict";var m5=Cm(),F8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],R8e=["scalar","sequence","mapping"];function T8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function N8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(F8e.indexOf(r)===-1)throw new m5('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=T8e(e.styleAliases||null),R8e.indexOf(this.kind)===-1)throw new m5('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}d5.exports=N8e});var uh=K((aDt,y5)=>{"use strict";var C5=ch(),LQ=Cm(),M8e=Os();function LF(t,e,r){var s=[];return t.include.forEach(function(o){r=LF(o,e,r)}),t[e].forEach(function(o){r.forEach(function(n,l){n.tag===o.tag&&n.kind===o.kind&&s.push(l)}),r.push(o)}),r.filter(function(o,n){return s.indexOf(n)===-1})}function L8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(o){t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function Im(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new LQ("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=LF(this,"implicit",[]),this.compiledExplicit=LF(this,"explicit",[]),this.compiledTypeMap=L8e(this.compiledImplicit,this.compiledExplicit)}Im.DEFAULT=null;Im.create=function(){var e,r;switch(arguments.length){case 1:e=Im.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new LQ("Wrong number of arguments for Schema.create function")}if(e=C5.toArray(e),r=C5.toArray(r),!e.every(function(s){return s instanceof Im}))throw new LQ("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(s){return s instanceof M8e}))throw new LQ("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Im({include:e,explicit:r})};y5.exports=Im});var E5=K((ADt,I5)=>{"use strict";var O8e=Os();I5.exports=new O8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var B5=K((lDt,w5)=>{"use strict";var U8e=Os();w5.exports=new U8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var v5=K((cDt,Q5)=>{"use strict";var _8e=Os();Q5.exports=new _8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var OQ=K((uDt,D5)=>{"use strict";var K8e=uh();D5.exports=new K8e({explicit:[E5(),B5(),v5()]})});var S5=K((fDt,k5)=>{"use strict";var H8e=Os();function q8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function j8e(){return null}function G8e(t){return t===null}k5.exports=new H8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:q8e,construct:j8e,predicate:G8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var x5=K((gDt,b5)=>{"use strict";var Y8e=Os();function W8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function J8e(t){return t==="true"||t==="True"||t==="TRUE"}function z8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}b5.exports=new Y8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:W8e,construct:J8e,predicate:z8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
|
|||
|
\r`;function I_e(t){if(t===null)return!1;var e,r,s=0,o=t.length,n=_F;for(r=0;r<o;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8==0}function E_e(t){var e,r,s=t.replace(/[\r\n=]/g,""),o=s.length,n=_F,l=0,u=[];for(e=0;e<o;e++)e%4==0&&e&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|n.indexOf(s.charAt(e));return r=o%4*6,r===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):r===18?(u.push(l>>10&255),u.push(l>>2&255)):r===12&&u.push(l>>4&255),fh?fh.from?fh.from(u):new fh(u):u}function w_e(t){var e="",r=0,s,o,n=t.length,l=_F;for(s=0;s<n;s++)s%3==0&&s&&(e+=l[r>>18&63],e+=l[r>>12&63],e+=l[r>>6&63],e+=l[r&63]),r=(r<<8)+t[s];return o=n%3,o===0?(e+=l[r>>18&63],e+=l[r>>12&63],e+=l[r>>6&63],e+=l[r&63]):o===2?(e+=l[r>>10&63],e+=l[r>>4&63],e+=l[r<<2&63],e+=l[64]):o===1&&(e+=l[r>>2&63],e+=l[r<<4&63],e+=l[64],e+=l[64]),e}function B_e(t){return fh&&fh.isBuffer(t)}j5.exports=new C_e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:I_e,construct:E_e,predicate:B_e,represent:w_e})});var J5=K((EDt,W5)=>{"use strict";var Q_e=Os(),v_e=Object.prototype.hasOwnProperty,D_e=Object.prototype.toString;function k_e(t){if(t===null)return!0;var e=[],r,s,o,n,l,u=t;for(r=0,s=u.length;r<s;r+=1){if(o=u[r],l=!1,D_e.call(o)!=="[object Object]")return!1;for(n in o)if(v_e.call(o,n))if(!l)l=!0;else return!1;if(!l)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function S_e(t){return t!==null?t:[]}W5.exports=new Q_e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:k_e,construct:S_e})});var V5=K((wDt,z5)=>{"use strict";var b_e=Os(),x_e=Object.prototype.toString;function P_e(t){if(t===null)return!0;var e,r,s,o,n,l=t;for(n=new Array(l.length),e=0,r=l.length;e<r;e+=1){if(s=l[e],x_e.call(s)!=="[object Object]"||(o=Object.keys(s),o.length!==1))return!1;n[e]=[o[0],s[o[0]]]}return!0}function F_e(t){if(t===null)return[];var e,r,s,o,n,l=t;for(n=new Array(l.length),e=0,r=l.length;e<r;e+=1)s=l[e],o=Object.keys(s),n[e]=[o[0],s[o[0]]];return n}z5.exports=new b_e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:P_e,construct:F_e})});var Z5=K((BDt,X5)=>{"use strict";var R_e=Os(),T_e=Object.prototype.hasOwnProperty;function N_e(t){if(t===null)return!0;var e,r=t;for(e in r)if(T_e.call(r,e)&&r[e]!==null)return!1;return!0}function M_e(t){return t!==null?t:{}}X5.exports=new R_e("tag:yaml.org,2002:set",{kind:"mapping",resolve:N_e,construct:M_e})});var Em=K((QDt,$5)=>{"use strict";var L_e=uh();$5.exports=new L_e({include:[UF()],implicit:[K5(),q5()],explicit:[Y5(),J5(),V5(),Z5()]})});var t9=K((vDt,e9)=>{"use strict";var O_e=Os();function U_e(){return!0}function __e(){}function K_e(){return""}function H_e(t){return typeof t=="undefined"}e9.exports=new O_e("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:U_e,construct:__e,predicate:H_e,represent:K_e})});var n9=K((DDt,r9)=>{"use strict";var q_e=Os();function j_e(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),s="";return!(e[0]==="/"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!=="/"))}function G_e(t){var e=t,r=/\/([gim]*)$/.exec(t),s="";return e[0]==="/"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function Y_e(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function W_e(t){return Object.prototype.toString.call(t)==="[object RegExp]"}r9.exports=new q_e("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:j_e,construct:G_e,predicate:W_e,represent:Y_e})});var o9=K((kDt,i9)=>{"use strict";var UQ;try{s9=require,UQ=s9("esprima")}catch(t){typeof window!="undefined"&&(UQ=window.esprima)}var s9,J_e=Os();function z_e(t){if(t===null)return!1;try{var e="("+t+")",r=UQ.parse(e,{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(s){return!1}}function V_e(t){var e="("+t+")",r=UQ.parse(e,{range:!0}),s=[],o;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&
|
|||
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function AKe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var y9=new Array(256),C9=new Array(256);for(var Bm=0;Bm<256;Bm++)y9[Bm]=m9(Bm)?1:0,C9[Bm]=m9(Bm);function lKe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||eKe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function I9(t,e){return new l9(e,new $_e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Lr(t,e){throw I9(t,e)}function HQ(t,e){t.onWarning&&t.onWarning.call(null,I9(t,e))}var E9={YAML:function(e,r,s){var o,n,l;e.version!==null&&Lr(e,"duplication of %YAML directive"),s.length!==1&&Lr(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),o===null&&Lr(e,"ill-formed argument of the YAML directive"),n=parseInt(o[1],10),l=parseInt(o[2],10),n!==1&&Lr(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=l<2,l!==1&&l!==2&&HQ(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var o,n;s.length!==2&&Lr(e,"TAG directive accepts exactly two arguments"),o=s[0],n=s[1],p9.test(o)||Lr(e,"ill-formed tag handle (first argument) of the TAG directive"),Bp.call(e.tagMap,o)&&Lr(e,'there is a previously declared suffix for "'+o+'" tag handle'),h9.test(n)||Lr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[o]=n}};function Qp(t,e,r,s){var o,n,l,u;if(e<r){if(u=t.input.slice(e,r),s)for(o=0,n=u.length;o<n;o+=1)l=u.charCodeAt(o),l===9||32<=l&&l<=1114111||Lr(t,"expected valid JSON character");else rKe.test(u)&&Lr(t,"the stream contains non-printable characters");t.result+=u}}function w9(t,e,r,s){var o,n,l,u;for(Gf.isObject(r)||Lr(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),l=0,u=o.length;l<u;l+=1)n=o[l],Bp.call(e,n)||(e[n]=r[n],s[n]=!0)}function Qm(t,e,r,s,o,n,l,u){var f,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),f=0,g=o.length;f<g;f+=1)Array.isArray(o[f])&&Lr(t,"nested arrays are not supported inside keys"),typeof o=="object"&&d9(o[f])==="[object Object]"&&(o[f]="[object Object]");if(typeof o=="object"&&d9(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(f=0,g=n.length;f<g;f+=1)w9(t,e,n[f],r);else w9(t,e,n,r);else!t.json&&!Bp.call(r,o)&&Bp.call(e,o)&&(t.line=l||t.line,t.position=u||t.position,Lr(t,"duplicated mapping key")),e[o]=n,delete r[o];return e}function HF(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Lr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Is(t,e,r){for(var s=0,o=t.input.charCodeAt(t.position);o!==0;){for(;gh(o);)o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(Cu(o))for(HF(t),o=t.input.charCodeAt(t.position),s++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&HQ(t,"deficient indentation"),s}function qQ(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||iA(r)))}function qF(t,e){e===1?t.result+=" ":e>1&&(t.result+=Gf.repeat(`
|
|||
|
`,e-1))}function cKe(t,e,r){var s,o,n,l,u,f,g,C,w=t.kind,B=t.result,S;if(S=t.input.charCodeAt(t.position),iA(S)||wm(S)||S===35||S===38||S===42||S===33||S===124||S===62||S===39||S===34||S===37||S===64||S===96||(S===63||S===45)&&(o=t.input.charCodeAt(t.position+1),iA(o)||r&&wm(o)))return!1;for(t.kind="scalar",t.result="",n=l=t.position,u=!1;S!==0;){if(S===58){if(o=t.input.charCodeAt(t.position+1),iA(o)||r&&wm(o))break}else if(S===35){if(s=t.input.charCodeAt(t.position-1),iA(s))break}else{if(t.position===t.lineStart&&qQ(t)||r&&wm(S))break;if(Cu(S))if(f=t.line,g=t.lineStart,C=t.lineIndent,Is(t,!1,-1),t.lineIndent>=e){u=!0,S=t.input.charCodeAt(t.position);continue}else{t.position=l,t.line=f,t.lineStart=g,t.lineIndent=C;break}}u&&(Qp(t,n,l,!1),qF(t,t.line-f),n=l=t.position,u=!1),gh(S)||(l=t.position+1),S=t.input.charCodeAt(++t.position)}return Qp(t,n,l,!1),t.result?!0:(t.kind=w,t.result=B,!1)}function uKe(t,e){var r,s,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Qp(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,o=t.position;else return!0;else Cu(r)?(Qp(t,s,o,!0),qF(t,Is(t,!1,e)),s=o=t.position):t.position===t.lineStart&&qQ(t)?Lr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Lr(t,"unexpected end of the stream within a single quoted scalar")}function fKe(t,e){var r,s,o,n,l,u;if(u=t.input.charCodeAt(t.position),u!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(u=t.input.charCodeAt(t.position))!==0;){if(u===34)return Qp(t,r,t.position,!0),t.position++,!0;if(u===92){if(Qp(t,r,t.position,!0),u=t.input.charCodeAt(++t.position),Cu(u))Is(t,!1,e);else if(u<256&&y9[u])t.result+=C9[u],t.position++;else if((l=oKe(u))>0){for(o=l,n=0;o>0;o--)u=t.input.charCodeAt(++t.position),(l=sKe(u))>=0?n=(n<<4)+l:Lr(t,"expected hexadecimal character");t.result+=AKe(n),t.position++}else Lr(t,"unknown escape sequence");r=s=t.position}else Cu(u)?(Qp(t,r,s,!0),qF(t,Is(t,!1,e)),r=s=t.position):t.position===t.lineStart&&qQ(t)?Lr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Lr(t,"unexpected end of the stream within a double quoted scalar")}function gKe(t,e){var r=!0,s,o=t.tag,n,l=t.anchor,u,f,g,C,w,B={},S,y,N,L;if(L=t.input.charCodeAt(t.position),L===91)f=93,w=!1,n=[];else if(L===123)f=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),L=t.input.charCodeAt(++t.position);L!==0;){if(Is(t,!0,e),L=t.input.charCodeAt(t.position),L===f)return t.position++,t.tag=o,t.anchor=l,t.kind=w?"mapping":"sequence",t.result=n,!0;r||Lr(t,"missed comma between flow collection entries"),y=S=N=null,g=C=!1,L===63&&(u=t.input.charCodeAt(t.position+1),iA(u)&&(g=C=!0,t.position++,Is(t,!0,e))),s=t.line,vm(t,e,_Q,!1,!0),y=t.tag,S=t.result,Is(t,!0,e),L=t.input.charCodeAt(t.position),(C||t.line===s)&&L===58&&(g=!0,L=t.input.charCodeAt(++t.position),Is(t,!0,e),vm(t,e,_Q,!1,!0),N=t.result),w?Qm(t,n,B,y,S,N):g?n.push(Qm(t,null,B,y,S,N)):n.push(S),Is(t,!0,e),L=t.input.charCodeAt(t.position),L===44?(r=!0,L=t.input.charCodeAt(++t.position)):r=!1}Lr(t,"unexpected end of the stream within a flow collection")}function pKe(t,e){var r,s,o=KF,n=!1,l=!1,u=e,f=0,g=!1,C,w;if(w=t.input.charCodeAt(t.position),w===124)s=!1;else if(w===62)s=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)KF===o?o=w===43?g9:tKe:Lr(t,"repeat of a chomping mode identifier");else if((C=aKe(w))>=0)C===0?Lr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Lr(t,"repeat of an indentation width identifier"):(u=e+C-1,l=!0);else break;if(gh(w)){do w=t.input.charCodeAt(++t.position);while(gh(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!Cu(w)&&w!==0)}for(;w!==0;){for(HF(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!l||t.lineIndent<u)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>u&&(u=t
|
|||
|
`,n?1+f:f):o===KF&&n&&(t.result+=`
|
|||
|
`);break}for(s?gh(w)?(g=!0,t.result+=Gf.repeat(`
|
|||
|
`,n?1+f:f)):g?(g=!1,t.result+=Gf.repeat(`
|
|||
|
`,f+1)):f===0?n&&(t.result+=" "):t.result+=Gf.repeat(`
|
|||
|
`,f):t.result+=Gf.repeat(`
|
|||
|
`,n?1+f:f),n=!0,l=!0,f=0,r=t.position;!Cu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);Qp(t,r,t.position,!1)}return!0}function B9(t,e){var r,s=t.tag,o=t.anchor,n=[],l,u=!1,f;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),f=t.input.charCodeAt(t.position);f!==0&&!(f!==45||(l=t.input.charCodeAt(t.position+1),!iA(l)));){if(u=!0,t.position++,Is(t,!0,-1)&&t.lineIndent<=e){n.push(null),f=t.input.charCodeAt(t.position);continue}if(r=t.line,vm(t,e,f9,!1,!0),n.push(t.result),Is(t,!0,-1),f=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&f!==0)Lr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return u?(t.tag=s,t.anchor=o,t.kind="sequence",t.result=n,!0):!1}function hKe(t,e,r){var s,o,n,l,u=t.tag,f=t.anchor,g={},C={},w=null,B=null,S=null,y=!1,N=!1,L;for(t.anchor!==null&&(t.anchorMap[t.anchor]=g),L=t.input.charCodeAt(t.position);L!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,l=t.position,(L===63||L===58)&&iA(s))L===63?(y&&(Qm(t,g,C,w,B,null),w=B=S=null),N=!0,y=!0,o=!0):y?(y=!1,o=!0):Lr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,L=s;else if(vm(t,r,u9,!1,!0))if(t.line===n){for(L=t.input.charCodeAt(t.position);gh(L);)L=t.input.charCodeAt(++t.position);if(L===58)L=t.input.charCodeAt(++t.position),iA(L)||Lr(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qm(t,g,C,w,B,null),w=B=S=null),N=!0,y=!1,o=!1,w=t.tag,B=t.result;else if(N)Lr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=f,!0}else if(N)Lr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=f,!0;else break;if((t.line===n||t.lineIndent>e)&&(vm(t,e,KQ,!0,o)&&(y?B=t.result:S=t.result),y||(Qm(t,g,C,w,B,S,n,l),w=B=S=null),Is(t,!0,-1),L=t.input.charCodeAt(t.position)),t.lineIndent>e&&L!==0)Lr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Qm(t,g,C,w,B,null),N&&(t.tag=u,t.anchor=f,t.kind="mapping",t.result=g),N}function dKe(t){var e,r=!1,s=!1,o,n,l;if(l=t.input.charCodeAt(t.position),l!==33)return!1;if(t.tag!==null&&Lr(t,"duplication of a tag property"),l=t.input.charCodeAt(++t.position),l===60?(r=!0,l=t.input.charCodeAt(++t.position)):l===33?(s=!0,o="!!",l=t.input.charCodeAt(++t.position)):o="!",e=t.position,r){do l=t.input.charCodeAt(++t.position);while(l!==0&&l!==62);t.position<t.length?(n=t.input.slice(e,t.position),l=t.input.charCodeAt(++t.position)):Lr(t,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!iA(l);)l===33&&(s?Lr(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),p9.test(o)||Lr(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),l=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),iKe.test(n)&&Lr(t,"tag suffix cannot contain flow indicator characters")}return n&&!h9.test(n)&&Lr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:Bp.call(t.tagMap,o)?t.tag=t.tagMap[o]+n:o==="!"?t.tag="!"+n:o==="!!"?t.tag="tag:yaml.org,2002:"+n:Lr(t,'undeclared tag handle "'+o+'"'),!0}function mKe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Lr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!iA(r)&&!wm(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Lr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function yKe(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!iA(s)&&!wm(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Lr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Bp.call(t.anchorMap,r)||Lr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Is(t,!0,-1),!0}function vm(t,e,r,s,o){var n,l,u,f=1,g=!1,C=!1,w,B,S,y,N;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n
|
|||
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new lKe(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,Lr(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;)CKe(r);return r.documents}function v9(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var s=Q9(t,r);if(typeof e!="function")return s;for(var o=0,n=s.length;o<n;o+=1)e(s[o])}function D9(t,e){var r=Q9(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new l9("expected a single document in the stream, but found more")}}function IKe(t,e,r){return typeof e=="object"&&e!==null&&typeof r=="undefined"&&(r=e,e=null),v9(t,e,Gf.extend({schema:c9},r))}function EKe(t,e){return D9(t,Gf.extend({schema:c9},e))}xI.exports.loadAll=v9;xI.exports.load=D9;xI.exports.safeLoadAll=IKe;xI.exports.safeLoad=EKe});var V9=K((xDt,jF)=>{"use strict";var PI=ch(),FI=Cm(),wKe=bI(),BKe=Em(),S9=Object.prototype.toString,b9=Object.prototype.hasOwnProperty,QKe=9,RI=10,vKe=13,DKe=32,kKe=33,SKe=34,x9=35,bKe=37,xKe=38,PKe=39,FKe=42,P9=44,RKe=45,F9=58,TKe=61,NKe=62,MKe=63,LKe=64,R9=91,T9=93,OKe=96,N9=123,UKe=124,M9=125,zo={};zo[0]="\\0";zo[7]="\\a";zo[8]="\\b";zo[9]="\\t";zo[10]="\\n";zo[11]="\\v";zo[12]="\\f";zo[13]="\\r";zo[27]="\\e";zo[34]='\\"';zo[92]="\\\\";zo[133]="\\N";zo[160]="\\_";zo[8232]="\\L";zo[8233]="\\P";var _Ke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function KKe(t,e){var r,s,o,n,l,u,f;if(e===null)return{};for(r={},s=Object.keys(e),o=0,n=s.length;o<n;o+=1)l=s[o],u=String(e[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),f=t.compiledTypeMap.fallback[l],f&&b9.call(f.styleAliases,u)&&(u=f.styleAliases[u]),r[l]=u;return r}function L9(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r="x",s=2;else if(t<=65535)r="u",s=4;else if(t<=4294967295)r="U",s=8;else throw new FI("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+PI.repeat("0",s-e.length)+e}function HKe(t){this.schema=t.schema||wKe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=PI.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=KKe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function O9(t,e){for(var r=PI.repeat(" ",e),s=0,o=-1,n="",l,u=t.length;s<u;)o=t.indexOf(`
|
|||
|
`,s),o===-1?(l=t.slice(s),s=u):(l=t.slice(s,o+1),s=o+1),l.length&&l!==`
|
|||
|
`&&(n+=r),n+=l;return n}function GF(t,e){return`
|
|||
|
`+PI.repeat(" ",t.indent*e)}function qKe(t,e){var r,s,o;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(o=t.implicitTypes[r],o.resolve(e))return!0;return!1}function YF(t){return t===DKe||t===QKe}function Dm(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function jKe(t){return Dm(t)&&!YF(t)&&t!==65279&&t!==vKe&&t!==RI}function U9(t,e){return Dm(t)&&t!==65279&&t!==P9&&t!==R9&&t!==T9&&t!==N9&&t!==M9&&t!==F9&&(t!==x9||e&&jKe(e))}function GKe(t){return Dm(t)&&t!==65279&&!YF(t)&&t!==RKe&&t!==MKe&&t!==F9&&t!==P9&&t!==R9&&t!==T9&&t!==N9&&t!==M9&&t!==x9&&t!==xKe&&t!==FKe&&t!==kKe&&t!==UKe&&t!==TKe&&t!==NKe&&t!==PKe&&t!==SKe&&t!==bKe&&t!==LKe&&t!==OKe}function _9(t){var e=/^\n* /;return e.test(t)}var K9=1,H9=2,q9=3,j9=4,jQ=5;function YKe(t,e,r,s,o){var n,l,u,f=!1,g=!1,C=s!==-1,w=-1,B=GKe(t.charCodeAt(0))&&!YF(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(l=t.charCodeAt(n),!Dm(l))return jQ;u=n>0?t.charCodeAt(n-1):null,B=B&&U9(l,u)}else{for(n=0;n<t.length;n++){if(l=t.charCodeAt(n),l===RI)f=!0,C&&(g=g||n-w-1>s&&t[w+1]!==" ",w=n);else if(!Dm(l))return jQ;u=n>0?t.charCodeAt(n-1):null,B=B&&U9(l,u)}g=g||C&&n-w-1>s&&t[w+1]!==" "}return!f&&!g?B&&!o(t)?K9:H9:r>9&&_9(t)?jQ:g?j9:q9}function zKe(t,e,r,s){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&_Ke.indexOf(e)!==-1)return"'"+e+"'";var o=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=s||t.flowLevel>-1&&r>=t.flowLevel;function u(f){return qKe(t,f)}switch(YKe(e,l,t.indent,n,u)){case K9:return e;case H9:return"'"+e.replace(/'/g,"''")+"'";case q9:return"|"+G9(e,t.indent)+Y9(O9(e,o));case j9:return">"+G9(e,t.indent)+Y9(O9(WKe(e,n),o));case jQ:return'"'+JKe(e,n)+'"';default:throw new FI("impossible error: invalid scalar style")}}()}function G9(t,e){var r=_9(t)?String(e):"",s=t[t.length-1]===`
|
|||
|
`,o=s&&(t[t.length-2]===`
|
|||
|
`||t===`
|
|||
|
`),n=o?"+":s?"":"-";return r+n+`
|
|||
|
`}function Y9(t){return t[t.length-1]===`
|
|||
|
`?t.slice(0,-1):t}function WKe(t,e){for(var r=/(\n+)([^\n]*)/g,s=function(){var g=t.indexOf(`
|
|||
|
`);return g=g!==-1?g:t.length,r.lastIndex=g,W9(t.slice(0,g),e)}(),o=t[0]===`
|
|||
|
`||t[0]===" ",n,l;l=r.exec(t);){var u=l[1],f=l[2];n=f[0]===" ",s+=u+(!o&&!n&&f!==""?`
|
|||
|
`:"")+W9(f,e),o=n}return s}function W9(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,s,o=0,n,l=0,u=0,f="";s=r.exec(t);)u=s.index,u-o>e&&(n=l>o?l:u,f+=`
|
|||
|
`+t.slice(o,n),o=n+1),l=u;return f+=`
|
|||
|
`,t.length-o>e&&l>o?f+=t.slice(o,l)+`
|
|||
|
`+t.slice(l+1):f+=t.slice(o),f.slice(1)}function JKe(t){for(var e="",r,s,o,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=L9((r-55296)*1024+s-56320+65536),n++;continue}o=zo[r],e+=!o&&Dm(r)?t[n]:o||L9(r)}return e}function VKe(t,e,r){var s="",o=t.tag,n,l;for(n=0,l=r.length;n<l;n+=1)ph(t,e,r[n],!1,!1)&&(n!==0&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=o,t.dump="["+s+"]"}function XKe(t,e,r,s){var o="",n=t.tag,l,u;for(l=0,u=r.length;l<u;l+=1)ph(t,e+1,r[l],!0,!0)&&((!s||l!==0)&&(o+=GF(t,e)),t.dump&&RI===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=n,t.dump=o||"[]"}function ZKe(t,e,r){var s="",o=t.tag,n=Object.keys(r),l,u,f,g,C;for(l=0,u=n.length;l<u;l+=1)C="",l!==0&&(C+=", "),t.condenseFlow&&(C+='"'),f=n[l],g=r[f],!!ph(t,e,f,!1,!1)&&(t.dump.length>1024&&(C+="? "),C+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),!!ph(t,e,g,!1,!1)&&(C+=t.dump,s+=C));t.tag=o,t.dump="{"+s+"}"}function $Ke(t,e,r,s){var o="",n=t.tag,l=Object.keys(r),u,f,g,C,w,B;if(t.sortKeys===!0)l.sort();else if(typeof t.sortKeys=="function")l.sort(t.sortKeys);else if(t.sortKeys)throw new FI("sortKeys must be a boolean or a function");for(u=0,f=l.length;u<f;u+=1)B="",(!s||u!==0)&&(B+=GF(t,e)),g=l[u],C=r[g],!!ph(t,e+1,g,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&RI===t.dump.charCodeAt(0)?B+="?":B+="? "),B+=t.dump,w&&(B+=GF(t,e)),!!ph(t,e+1,C,!0,w)&&(t.dump&&RI===t.dump.charCodeAt(0)?B+=":":B+=": ",B+=t.dump,o+=B));t.tag=n,t.dump=o||"{}"}function J9(t,e,r){var s,o,n,l,u,f;for(o=r?t.explicitTypes:t.implicitTypes,n=0,l=o.length;n<l;n+=1)if(u=o[n],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof e=="object"&&e instanceof u.instanceOf)&&(!u.predicate||u.predicate(e))){if(t.tag=r?u.tag:"?",u.represent){if(f=t.styleMap[u.tag]||u.defaultStyle,S9.call(u.represent)==="[object Function]")s=u.represent(e,f);else if(b9.call(u.represent,f))s=u.represent[f](e,f);else throw new FI("!<"+u.tag+'> tag resolver accepts not "'+f+'" style');t.dump=s}return!0}return!1}function ph(t,e,r,s,o,n){t.tag=null,t.dump=r,J9(t,r,!1)||J9(t,r,!0);var l=S9.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var u=l==="[object Object]"||l==="[object Array]",f,g;if(u&&(f=t.duplicates.indexOf(r),g=f!==-1),(t.tag!==null&&t.tag!=="?"||g||t.indent!==2&&e>0)&&(o=!1),g&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(u&&g&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),l==="[object Object]")s&&Object.keys(t.dump).length!==0?($Ke(t,e,t.dump,o),g&&(t.dump="&ref_"+f+t.dump)):(ZKe(t,e,t.dump),g&&(t.dump="&ref_"+f+" "+t.dump));else if(l==="[object Array]"){var C=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(XKe(t,C,t.dump,o),g&&(t.dump="&ref_"+f+t.dump)):(VKe(t,C,t.dump),g&&(t.dump="&ref_"+f+" "+t.dump))}else if(l==="[object String]")t.tag!=="?"&&zKe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new FI("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function eHe(t,e){var r=[],s=[],o,n;for(WF(t,r,s),o=0,n=s.length;o<n;o+=1)e.duplicates.push(r[s[o]]);e.usedDuplicates=new Array(n)}function WF(t,e,r){var s,o,n;if(t!==null&&typeof t=="object")if(o=e.indexOf(t),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,n=t.length;o<n;o+=1)WF(t[o],e,r);else for(s=Object.keys(t),o=0,n=s.length;o<n;o+=1)WF(t[s[o]],e,r)}function z9(t,e){e=e||{};var r=new HKe(e);return r.noRefs||eHe(t,r),ph(r,0,t,!0,!0)?r.dump+`
|
|||
|
`:""}function tHe(t,e){return z9(t,PI.extend({schema:BKe},e))}jF.exports.dump=z9;jF.exports.safeDump=tHe});var Z9=K((PDt,Ji)=>{"use strict";var GQ=k9(),X9=V9();function YQ(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Ji.exports.Type=Os();Ji.exports.Schema=uh();Ji.exports.FAILSAFE_SCHEMA=OQ();Ji.exports.JSON_SCHEMA=OF();Ji.exports.CORE_SCHEMA=UF();Ji.exports.DEFAULT_SAFE_SCHEMA=Em();Ji.exports.DEFAULT_FULL_SCHEMA=bI();Ji.exports.load=GQ.load;Ji.exports.loadAll=GQ.loadAll;Ji.exports.safeLoad=GQ.safeLoad;Ji.exports.safeLoadAll=GQ.safeLoadAll;Ji.exports.dump=X9.dump;Ji.exports.safeDump=X9.safeDump;Ji.exports.YAMLException=Cm();Ji.exports.MINIMAL_SCHEMA=OQ();Ji.exports.SAFE_SCHEMA=Em();Ji.exports.DEFAULT_SCHEMA=bI();Ji.exports.scan=YQ("scan");Ji.exports.parse=YQ("parse");Ji.exports.compose=YQ("compose");Ji.exports.addConstructor=YQ("addConstructor")});var eY=K((FDt,$9)=>{"use strict";var rHe=Z9();$9.exports=rHe});var rY=K((RDt,tY)=>{"use strict";function nHe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function hh(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,hh)}nHe(hh,Error);hh.buildMessage=function(t,e){var r={literal:function(g){return'"'+o(g.text)+'"'},class:function(g){var C="",w;for(w=0;w<g.parts.length;w++)C+=g.parts[w]instanceof Array?n(g.parts[w][0])+"-"+n(g.parts[w][1]):n(g.parts[w]);return"["+(g.inverted?"^":"")+C+"]"},any:function(g){return"any character"},end:function(g){return"end of input"},other:function(g){return g.description}};function s(g){return g.charCodeAt(0).toString(16).toUpperCase()}function o(g){return 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"+s(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+s(C)})}function n(g){return g.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"+s(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+s(C)})}function l(g){return r[g.type](g)}function u(g){var C=new Array(g.length),w,B;for(w=0;w<g.length;w++)C[w]=l(g[w]);if(C.sort(),C.length>0){for(w=1,B=1;w<C.length;w++)C[w-1]!==C[w]&&(C[B]=C[w],B++);C.length=B}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 f(g){return g?'"'+o(g)+'"':"end of input"}return"Expected "+u(t)+" but "+f(e)+" found."};function iHe(t,e){e=e!==void 0?e:{};var r={},s={Start:rc},o=rc,n=function(oe){return[].concat(...oe)},l="-",u=On("-",!1),f=function(oe){return oe},g=function(oe){return Object.assign({},...oe)},C="#",w=On("#",!1),B=al(),S=function(){return{}},y=":",N=On(":",!1),L=function(oe,ve){return{[oe]:ve}},H=",",G=On(",",!1),te=function(oe,ve){return ve},ce=function(oe,ve,We){return Object.assign({},...[oe].concat(ve).map(Rt=>({[Rt]:We})))},me=function(oe){return oe},Ce=function(oe){return oe},Se=ca("correct indentation"),ye=" ",xe=On(" ",!1),Qe=function(oe){return oe.length===DA*Al},p=function(oe){return oe.length===(DA+1)*Al},Ue=function(){return DA++,!0},De=function(){return DA--,!0},Ee=function(){return Jc()},fe=ca("pseudostring"),ne=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Be=wi(["\r",`
|
|||
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Te=/^[^\r\n\t ,\][{}:#"']/,Qt=wi(["\r",`
|
|||
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),_=function(){return Jc().replace(/^ *| *$/g,"")},Ge="--",rt=On("--",!1),Ye=/^[a-zA-Z\/0-9]/,Re=wi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),yt=/^[^\r\n\t :,]/,nt=wi(["\r",`
|
|||
|
`," "," ",":",","],!0,!1),Ze="null",$e=On("null",!1),k=function(){return null},I="true",D=On("true",!1),m=function(){return!0},F="false",X=On("false",!1),ee=function(){return!1},ie=ca("string"),Ae='"',Fe=On('"',!1),_e=function(){return""},Ct=function(oe){return oe},vt=function(oe){return oe.join("")},Wt=/^[^"\\\0-\x1F\x7F]/,cr=wi(['"',"\\",["\0",""],"\x7F"],!0,!1),Ut='\\"',Cn=On('\\"',!1),Ur=function(){return'"'},Rr="\\\\",_r=On("\\\\",!1),hn=function(){return"\\"},Dn="\\/",Ds=On("\\/",!1),ji=function(){return"/"},so="\\b",Fo=On("\\b",!1),ds=function(){return"\b"},dn="\\f",oo=On("\\f",!1),nl=function(){return"\f"},Ua="\\n",Og=On("\\n",!1),Ug=function(){return`
|
|||
|
`},tf="\\r",zn=On("\\r",!1),Gi=function(){return"\r"},Ka="\\t",il=On("\\t",!1),Xe=function(){return" "},Vn="\\u",Ai=On("\\u",!1),rr=function(oe,ve,We,Rt){return String.fromCharCode(parseInt(`0x${oe}${ve}${We}${Rt}`))},Ui=/^[0-9a-fA-F]/,Xn=wi([["0","9"],["a","f"],["A","F"]],!1,!1),ms=ca("blank space"),Ft=/^[ \t]/,$i=wi([" "," "],!1,!1),Fn=ca("white space"),ys=/^[ \t\n\r]/,wA=wi([" "," ",`
|
|||
|
`,"\r"],!1,!1),Pr=`\r
|
|||
|
`,Ro=On(`\r
|
|||
|
`,!1),mr=`
|
|||
|
`,Ha=On(`
|
|||
|
`,!1),Z="\r",nn=On("\r",!1),we=0,qt=0,sl=[{line:1,column:1}],es=0,tc=[],zt=0,BA;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function Jc(){return t.substring(qt,we)}function rf(){return To(qt,we)}function ol(oe,ve){throw ve=ve!==void 0?ve:To(qt,we),qa([ca(oe)],t.substring(qt,we),ve)}function zc(oe,ve){throw ve=ve!==void 0?ve:To(qt,we),ao(oe,ve)}function On(oe,ve){return{type:"literal",text:oe,ignoreCase:ve}}function wi(oe,ve,We){return{type:"class",parts:oe,inverted:ve,ignoreCase:We}}function al(){return{type:"any"}}function Vc(){return{type:"end"}}function ca(oe){return{type:"other",description:oe}}function ts(oe){var ve=sl[oe],We;if(ve)return ve;for(We=oe-1;!sl[We];)We--;for(ve=sl[We],ve={line:ve.line,column:ve.column};We<oe;)t.charCodeAt(We)===10?(ve.line++,ve.column=1):ve.column++,We++;return sl[oe]=ve,ve}function To(oe,ve){var We=ts(oe),Rt=ts(ve);return{start:{offset:oe,line:We.line,column:We.column},end:{offset:ve,line:Rt.line,column:Rt.column}}}function at(oe){we<es||(we>es&&(es=we,tc=[]),tc.push(oe))}function ao(oe,ve){return new hh(oe,null,null,ve)}function qa(oe,ve,We){return new hh(hh.buildMessage(oe,ve),oe,ve,We)}function rc(){var oe;return oe=QA(),oe}function Yi(){var oe,ve,We;for(oe=we,ve=[],We=ja();We!==r;)ve.push(We),We=ja();return ve!==r&&(qt=oe,ve=n(ve)),oe=ve,oe}function ja(){var oe,ve,We,Rt,Dt;return oe=we,ve=ks(),ve!==r?(t.charCodeAt(we)===45?(We=l,we++):(We=r,zt===0&&at(u)),We!==r?(Rt=li(),Rt!==r?(Dt=vA(),Dt!==r?(qt=oe,ve=f(Dt),oe=ve):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r),oe}function QA(){var oe,ve,We;for(oe=we,ve=[],We=xr();We!==r;)ve.push(We),We=xr();return ve!==r&&(qt=oe,ve=g(ve)),oe=ve,oe}function xr(){var oe,ve,We,Rt,Dt,Vt,Tr,Qn,Ga;if(oe=we,ve=li(),ve===r&&(ve=null),ve!==r){if(We=we,t.charCodeAt(we)===35?(Rt=C,we++):(Rt=r,zt===0&&at(w)),Rt!==r){if(Dt=[],Vt=we,Tr=we,zt++,Qn=Wi(),zt--,Qn===r?Tr=void 0:(we=Tr,Tr=r),Tr!==r?(t.length>we?(Qn=t.charAt(we),we++):(Qn=r,zt===0&&at(B)),Qn!==r?(Tr=[Tr,Qn],Vt=Tr):(we=Vt,Vt=r)):(we=Vt,Vt=r),Vt!==r)for(;Vt!==r;)Dt.push(Vt),Vt=we,Tr=we,zt++,Qn=Wi(),zt--,Qn===r?Tr=void 0:(we=Tr,Tr=r),Tr!==r?(t.length>we?(Qn=t.charAt(we),we++):(Qn=r,zt===0&&at(B)),Qn!==r?(Tr=[Tr,Qn],Vt=Tr):(we=Vt,Vt=r)):(we=Vt,Vt=r);else Dt=r;Dt!==r?(Rt=[Rt,Dt],We=Rt):(we=We,We=r)}else we=We,We=r;if(We===r&&(We=null),We!==r){if(Rt=[],Dt=Ys(),Dt!==r)for(;Dt!==r;)Rt.push(Dt),Dt=Ys();else Rt=r;Rt!==r?(qt=oe,ve=S(),oe=ve):(we=oe,oe=r)}else we=oe,oe=r}else we=oe,oe=r;if(oe===r&&(oe=we,ve=ks(),ve!==r?(We=ua(),We!==r?(Rt=li(),Rt===r&&(Rt=null),Rt!==r?(t.charCodeAt(we)===58?(Dt=y,we++):(Dt=r,zt===0&&at(N)),Dt!==r?(Vt=li(),Vt===r&&(Vt=null),Vt!==r?(Tr=vA(),Tr!==r?(qt=oe,ve=L(We,Tr),oe=ve):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r),oe===r&&(oe=we,ve=ks(),ve!==r?(We=Ao(),We!==r?(Rt=li(),Rt===r&&(Rt=null),Rt!==r?(t.charCodeAt(we)===58?(Dt=y,we++):(Dt=r,zt===0&&at(N)),Dt!==r?(Vt=li(),Vt===r&&(Vt=null),Vt!==r?(Tr=vA(),Tr!==r?(qt=oe,ve=L(We,Tr),oe=ve):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r)):(we=oe,oe=r),oe===r))){if(oe=we,ve=ks(),ve!==r)if(We=Ao(),We!==r)if(Rt=li(),Rt!==r)if(Dt=fa(),Dt!==r){if(Vt=[],Tr=Ys(),Tr!==r)for(;Tr!==r;)Vt.push(Tr),Tr=Ys();else Vt=r;Vt!==r?(qt=oe,ve=L(We,Dt),oe=ve):(we=oe,oe=r)}else we=oe,oe=r;else we=oe,oe=r;else we=oe,oe=r;else we=oe,oe=r;if(oe===r)if(oe=we,ve=ks(),ve!==r)if(We=Ao(),We!==r){if(Rt=[],Dt=we,Vt=li(),Vt===r&&(Vt=null),Vt!==r?(t.charCodeAt(we)===44?(Tr=H,we++):(Tr=r,zt===0&&at(G)),Tr!==r?(Qn=li(),Qn===r&&(Qn=null),Qn!==r?(Ga=Ao(),Ga!==r?(qt=Dt,Vt=te(We,Ga),Dt=Vt):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r),Dt!==r)for(;Dt!==r;)Rt.push(Dt),Dt=we,Vt=li(),Vt===r&&(Vt=null),Vt!==r?(t.charCodeAt(we)===44?(Tr=H,we++):(Tr=r,zt===0&&at(G)),Tr!==r?(Qn=li(),Qn===r&&(Qn=null),Qn!==r?(Ga=Ao(),Ga!==r?(qt=Dt,Vt=te(We,Ga),Dt=Vt):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r);else Rt=r;Rt!==r?(Dt=li(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===58?(Vt=y,we++):(Vt=r,zt===0&&at(N)),Vt!==r?(Tr=li(),Tr===r
|
|||
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
|||
|
`;if(typeof t=="string")return`${sY(t)}
|
|||
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
|||
|
`;let s=" ".repeat(e);return`
|
|||
|
${t.map(n=>`${s}- ${zF(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[s,o]=t instanceof JF?[t.data,!1]:[t,!0],n=" ".repeat(e),l=Object.keys(s);o&&l.sort((f,g)=>{let C=iY.indexOf(f),w=iY.indexOf(g);return C===-1&&w===-1?f<g?-1:f>g?1:0:C!==-1&&w===-1?-1:C===-1&&w!==-1?1:C-w});let u=l.filter(f=>!oY(s[f])).map((f,g)=>{let C=s[f],w=sY(f),B=zF(C,e+1,!0),S=g>0||r?n:"",y=w.length>1024?`? ${w}
|
|||
|
${S}:`:`${w}:`,N=B.startsWith(`
|
|||
|
`)?B:` ${B}`;return`${S}${y}${N}`}).join(e===0?`
|
|||
|
`:"")||`
|
|||
|
`;return r?`
|
|||
|
${u}`:`${u}`}throw new Error(`Unsupported value type (${t})`)}function sA(t){try{let e=zF(t,0,!1);return e!==`
|
|||
|
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function oHe(t){return t.endsWith(`
|
|||
|
`)||(t+=`
|
|||
|
`),(0,nY.parse)(t)}function AHe(t){if(aHe.test(t))return oHe(t);let e=(0,WQ.safeLoad)(t,{schema:WQ.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function ls(t){return AHe(t)}var WQ,nY,sHe,iY,JF,aHe,aY=St(()=>{WQ=He(eY()),nY=He(rY()),sHe=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,iY=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],JF=class{constructor(e){this.data=e}};sA.PreserveOrdering=JF;aHe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var TI={};or(TI,{parseResolution:()=>NQ,parseShell:()=>PQ,parseSyml:()=>ls,stringifyArgument:()=>TF,stringifyArgumentSegment:()=>NF,stringifyArithmeticExpression:()=>TQ,stringifyCommand:()=>RF,stringifyCommandChain:()=>ym,stringifyCommandChainThen:()=>FF,stringifyCommandLine:()=>FQ,stringifyCommandLineThen:()=>PF,stringifyEnvSegment:()=>RQ,stringifyRedirectArgument:()=>kI,stringifyResolution:()=>MQ,stringifyShell:()=>mm,stringifyShellLine:()=>mm,stringifySyml:()=>sA,stringifyValueArgument:()=>ah});var Sl=St(()=>{o5();c5();aY()});var lY=K((ODt,VF)=>{"use strict";var lHe=t=>{let e=!1,r=!1,s=!1;for(let o=0;o<t.length;o++){let n=t[o];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,o)+"-"+t.slice(o),e=!1,s=r,r=!0,o++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,o-1)+"-"+t.slice(o-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},AY=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=o=>e.pascalCase?o.charAt(0).toUpperCase()+o.slice(1):o;return Array.isArray(t)?t=t.map(o=>o.trim()).filter(o=>o.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=lHe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(o,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,o=>o.toUpperCase()),r(t))};VF.exports=AY;VF.exports.default=AY});var uY=K((UDt,cY)=>{cY.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",env
|
|||
|
|
|||
|
${this.candidates.map(({usage:o})=>`$ ${o}`).join(`
|
|||
|
`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:
|
|||
|
|
|||
|
$ ${s}
|
|||
|
${tR(e)}`}else this.message=`Command not found; did you mean one of:
|
|||
|
|
|||
|
${this.candidates.map(({usage:s},o)=>`${`${o}.`.padStart(4)} ${s}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${tR(e)}`}},rR=class extends Error{constructor(e,r){super();this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
|
|||
|
|
|||
|
${this.usages.map((s,o)=>`${`${o}.`.padStart(4)} ${s}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${tR(e)}`}},tR=t=>`While running ${t.filter(e=>e!==Eo).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function cHe(t){let e=t.split(`
|
|||
|
`),r=e.filter(o=>o.match(/\S/)),s=r.length>0?r.reduce((o,n)=>Math.min(o,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(o=>o.slice(s).trimRight()).join(`
|
|||
|
`)}function Vo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
|||
|
`),t=cHe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
|||
|
|
|||
|
`),t=t.replace(/\n(\n)?\n*/g,(s,o)=>o||" "),r&&(t=t.split(/\n/).map(s=>{let o=s.match(/^\s*[*-][\t ]+(.*)/);if(!o)return s.match(/(.{1,80})(?: |$)/g).join(`
|
|||
|
`);let n=s.length-s.trimStart().length;return o[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((l,u)=>" ".repeat(n)+(u===0?"- ":" ")+l).join(`
|
|||
|
`)}).join(`
|
|||
|
|
|||
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(s,o,n)=>e.code(o+n+o)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,o,n)=>e.bold(o+n+o)),t?`${t}
|
|||
|
`:""}var hY,nR,dY,mY,iR=St(()=>{hY=80,nR=Array(hY).fill("\u2501");for(let t=0;t<=24;++t)nR[nR.length-t]=`[38;5;${232+t}m\u2501`;dY={header:t=>`[1m\u2501\u2501\u2501 ${t}${t.length<hY-5?` ${nR.slice(t.length+5).join("")}`:":"}[0m`,bold:t=>`[1m${t}[22m`,error:t=>`[31m[1m${t}[22m[39m`,code:t=>`[36m${t}[39m`},mY={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Qa(t){return Me(re({},t),{[LI]:!0})}function Eu(t,e){return typeof t=="undefined"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function XQ(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function OI(t,e){return e.length===1?new ht(`${t}: ${XQ(e[0],!0)}`):new ht(`${t}:
|
|||
|
${e.map(r=>`
|
|||
|
- ${XQ(r)}`).join("")}`)}function UI(t,e,r){if(typeof r=="undefined")return e;let s=[],o=[],n=u=>{let f=e;return e=u,n.bind(null,f)};if(!r(e,{errors:s,coercions:o,coercion:n}))throw OI(`Invalid value for ${t}`,s);for(let[,u]of o)u();return e}var LI,Yf=St(()=>{VQ();LI=Symbol("clipanion/isOption")});var Sm={};or(Sm,{KeyRelationship:()=>Ih,applyCascade:()=>Ch,base64RegExp:()=>EY,colorStringAlphaRegExp:()=>IY,colorStringRegExp:()=>CY,computeKey:()=>vp,getPrintable:()=>Es,hasExactLength:()=>DY,hasForbiddenKeys:()=>OHe,hasKeyRelationship:()=>cR,hasMaxLength:()=>BHe,hasMinLength:()=>wHe,hasMutuallyExclusiveKeys:()=>UHe,hasRequiredKeys:()=>LHe,hasUniqueItems:()=>QHe,isArray:()=>hHe,isAtLeast:()=>AR,isAtMost:()=>kHe,isBase64:()=>NHe,isBoolean:()=>gHe,isDate:()=>pHe,isDict:()=>mHe,isEnum:()=>wo,isHexColor:()=>THe,isISO8601:()=>RHe,isInExclusiveRange:()=>bHe,isInInclusiveRange:()=>SHe,isInstanceOf:()=>CHe,isInteger:()=>lR,isJSON:()=>MHe,isLiteral:()=>uHe,isLowerCase:()=>xHe,isNegative:()=>vHe,isNullable:()=>EHe,isNumber:()=>oR,isObject:()=>yHe,isOneOf:()=>aR,isOptional:()=>IHe,isPositive:()=>DHe,isString:()=>_I,isTuple:()=>dHe,isUUID4:()=>FHe,isUnknown:()=>vY,isUpperCase:()=>PHe,iso8601RegExp:()=>sR,makeCoercionFn:()=>yh,makeSetter:()=>QY,makeTrait:()=>BY,makeValidator:()=>An,matchesRegExp:()=>KI,plural:()=>ZQ,pushError:()=>qr,simpleKeyRegExp:()=>yY,uuid4RegExp:()=>wY});function An({test:t}){return BY(t)()}function Es(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":JSON.stringify(t)}function vp(t,e){var r,s,o;return typeof e=="number"?`${(r=t==null?void 0:t.p)!==null&&r!==void 0?r:"."}[${e}]`:yY.test(e)?`${(s=t==null?void 0:t.p)!==null&&s!==void 0?s:""}.${e}`:`${(o=t==null?void 0:t.p)!==null&&o!==void 0?o:"."}[${JSON.stringify(e)}]`}function yh(t,e){return r=>{let s=t[e];return t[e]=r,yh(t,e).bind(null,s)}}function QY(t,e){return r=>{t[e]=r}}function ZQ(t,e,r){return t===1?e:r}function qr({errors:t,p:e}={},r){return t==null||t.push(`${e!=null?e:"."}: ${r}`),!1}function uHe(t){return An({test:(e,r)=>e!==t?qr(r,`Expected a literal (got ${Es(t)})`):!0})}function wo(t){let e=Array.isArray(t)?t:Object.values(t),r=new Set(e);return An({test:(s,o)=>r.has(s)?!0:qr(o,`Expected a valid enumeration value (got ${Es(s)})`)})}var yY,CY,IY,EY,wY,sR,BY,vY,_I,fHe,gHe,oR,pHe,hHe,dHe,mHe,yHe,CHe,aR,Ch,IHe,EHe,wHe,BHe,DY,QHe,vHe,DHe,AR,kHe,SHe,bHe,lR,KI,xHe,PHe,FHe,RHe,THe,NHe,MHe,LHe,OHe,UHe,Ih,_He,cR,_A=St(()=>{yY=/^[a-zA-Z_][a-zA-Z0-9_]*$/,CY=/^#[0-9a-f]{6}$/i,IY=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,EY=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,wY=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,sR=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,BY=t=>()=>t;vY=()=>An({test:(t,e)=>!0});_I=()=>An({test:(t,e)=>typeof t!="string"?qr(e,`Expected a string (got ${Es(t)})`):!0});fHe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),gHe=()=>An({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return qr(e,"Unbound coercion result");let s=fHe.get(t);if(typeof s!="undefined")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return qr(e,`Expected a boolean (got ${Es(t)})`)}return!0}}),oR=()=>An({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return qr(e,"Unbound coercion result");let s;if(typeof t=="string"){let o;try{o=JSON.parse(t)}catch(n){}if(typeof o=="number")if(JSON.stringify(o)===t)s=o;else return qr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s!="undefined")return e.coercions.push(
|
|||
|
`),this.context.stdout.write(`
|
|||
|
`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
|
|||
|
`)}}}});async function _Y(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}=UY(t);return Da.from(r,e).runExit(s,o)}async function KY(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}=UY(t);return Da.from(r,e).run(s,o)}function UY(t){let e,r,s,o;switch(typeof process!="undefined"&&typeof process.argv!="undefined"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof dt||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:o=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof dt||Array.isArray(t[0])?(r=t[0],s=t[1],o=t[2]):(e=t[0],r=t[1],o=t[2]);break;default:e=t[0],r=t[1],s=t[2],o=t[3];break}if(typeof s=="undefined")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}}function HY(t){return t()}var OY,Da,qY=St(()=>{zQ();tv();iR();MY();Eh();LY();OY=Symbol("clipanion/errorCommand");Da=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:s,enableCapture:o=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new HI({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=o,this.enableColors=n}static from(e,r={}){let s=new Da(r),o=Array.isArray(e)?e:[e];for(let n of o)s.register(n);return s}register(e){var r;let s=new Map,o=new e;for(let f in o){let g=o[f];typeof g=="object"&&g!==null&&g[dt.isOption]&&s.set(f,g)}let n=this.builder.command(),l=n.cliIndex,u=(r=e.paths)!==null&&r!==void 0?r:o.paths;if(typeof u!="undefined")for(let f of u)n.addPath(f);this.registrations.set(e,{specs:s,builder:n,index:l});for(let[f,{definition:g}]of s.entries())g(n,f);n.setContext({commandClass:e})}process(e,r){let{contexts:s,process:o}=this.builder.compile(),n=o(e),l=re(re({},Da.defaultContext),r);switch(n.selectedIndex){case km:{let u=qI.from(n,s);return u.context=l,u}default:{let{commandClass:u}=s[n.selectedIndex],f=this.registrations.get(u);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the command class to have been registered.");let g=new u;g.context=l,g.path=n.path;try{for(let[C,{transformer:w}]of f.specs.entries())g[C]=w(f.builder,C,n,l);return g}catch(C){throw C[OY]=g,C}}break}}async run(e,r){var s,o;let n,l=re(re({},Da.defaultContext),r),u=(s=this.enableColors)!==null&&s!==void 0?s:l.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,l)}catch(C){return l.stdout.write(this.error(C,{colored:u})),1}if(n.help)return l.stdout.write(this.usage(n,{colored:u,detailed:!0})),0;n.context=l,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,re(re({},l),w)),run:(C,w)=>this.run(C,re(re({},l),w)),usage:(C,w)=>this.usage(C,w)};let f=this.enableCapture&&(o=NY(l))!==null&&o!==void 0?o:HY,g;try{g=await f(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return l.stdout.write(this.error(C,{colored:u,command:n})),1}return g}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:s}=this.builder.compile();return s(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[s,{index:o}]of this.registrations){if(typeof s.usage=="undefined")continue;let{usage:n}=this.getUsageByIndex(o,{detailed:!1}),{usage:l,options:u}=this.getUsageByIndex(o,{detailed:!0,inlineOptions:!1}),f=typeof s.usage.category!="undefined"?Vo(s.usage.category,{format:this.format(e),paragraphs:!1}):void 0,g=typeof s.usage.description!="undefined"?Vo(s.usage.description,{format:this.format(e),paragraphs:!1}):void 0,C=typeof s.usage.details!="undefined"?Vo(s.usage.details,{format:this.format(e),paragraphs:!0}):void 0,w=typeof s.usage.examples!="undefined"?s.usage.examples.map(([B,S])=>[Vo(B,{format:this.format(e),paragraphs:!1}),S.replac
|
|||
|
`),(g!==""||C.length>0)&&(u+=`${this.format(r).header("Usage")}
|
|||
|
`,u+=`
|
|||
|
`);let{usage:w,options:B}=this.getUsageByRegistration(l,{inlineOptions:!1});if(u+=`${this.format(r).bold(o)}${w}
|
|||
|
`,B.length>0){u+=`
|
|||
|
`,u+=`${this.format(r).header("Options")}
|
|||
|
`;let S=B.reduce((y,N)=>Math.max(y,N.definition.length),0);u+=`
|
|||
|
`;for(let{definition:y,description:N}of B)u+=` ${this.format(r).bold(y.padEnd(S))} ${Vo(N,{format:this.format(r),paragraphs:!1})}`}if(g!==""&&(u+=`
|
|||
|
`,u+=`${this.format(r).header("Details")}
|
|||
|
`,u+=`
|
|||
|
`,u+=Vo(g,{format:this.format(r),paragraphs:!0})),C.length>0){u+=`
|
|||
|
`,u+=`${this.format(r).header("Examples")}
|
|||
|
`;for(let[S,y]of C)u+=`
|
|||
|
`,u+=Vo(S,{format:this.format(r),paragraphs:!1}),u+=`${y.replace(/^/m,` ${this.format(r).bold(o)}`).replace(/\$0/g,this.binaryName)}
|
|||
|
`}}else{let{usage:f}=this.getUsageByRegistration(l);u+=`${this.format(r).bold(o)}${f}
|
|||
|
`}else{let f=new Map;for(let[B,{index:S}]of this.registrations.entries()){if(typeof B.usage=="undefined")continue;let y=typeof B.usage.category!="undefined"?Vo(B.usage.category,{format:this.format(r),paragraphs:!1}):null,N=f.get(y);typeof N=="undefined"&&f.set(y,N=[]);let{usage:L}=this.getUsageByIndex(S);N.push({commandClass:B,usage:L})}let g=Array.from(f.keys()).sort((B,S)=>B===null?-1:S===null?1:B.localeCompare(S,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel!="undefined",w=typeof this.binaryVersion!="undefined";C||w?(C&&w?u+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
|||
|
|
|||
|
`:C?u+=`${this.format(r).header(`${this.binaryLabel}`)}
|
|||
|
`:u+=`${this.format(r).header(`${this.binaryVersion}`)}
|
|||
|
`,u+=` ${this.format(r).bold(o)}${this.binaryName} <command>
|
|||
|
`):u+=`${this.format(r).bold(o)}${this.binaryName} <command>
|
|||
|
`;for(let B of g){let S=f.get(B).slice().sort((N,L)=>N.usage.localeCompare(L.usage,"en",{usage:"sort",caseFirst:"upper"})),y=B!==null?B.trim():"General commands";u+=`
|
|||
|
`,u+=`${this.format(r).header(`${y}`)}
|
|||
|
`;for(let{commandClass:N,usage:L}of S){let H=N.usage.description||"undocumented";u+=`
|
|||
|
`,u+=` ${this.format(r).bold(L)}
|
|||
|
`,u+=` ${Vo(H,{format:this.format(r),paragraphs:!1})}`}}u+=`
|
|||
|
`,u+=Vo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return u}error(e,r){var s,{colored:o,command:n=(s=e[OY])!==null&&s!==void 0?s:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let l="",u=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");u==="Error"&&(u="Internal Error"),l+=`${this.format(o).error(u)}: ${e.message}
|
|||
|
`;let f=e.clipanion;return typeof f!="undefined"?f.type==="usage"&&(l+=`
|
|||
|
`,l+=this.usage(n)):e.stack&&(l+=`${e.stack.replace(/^.*\n/,"")}
|
|||
|
`),l}format(e){var r;return((r=e!=null?e:this.enableColors)!==null&&r!==void 0?r:Da.defaultContext.colorDepth>1)?dY:mY}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s=="undefined")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Da.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:RY()}});var nv,jY=St(()=>{Eh();nv=class extends dt{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
|||
|
`)}};nv.paths=[["--clipanion=definitions"]]});var iv,GY=St(()=>{Eh();iv=class extends dt{async execute(){this.context.stdout.write(this.cli.usage())}};iv.paths=[["-h"],["--help"]]});var sv,YY=St(()=>{Eh();sv=class extends dt{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
|||
|
`)}};sv.paths=[["-v"],["--version"]]});var gR={};or(gR,{DefinitionsCommand:()=>nv,HelpCommand:()=>iv,VersionCommand:()=>sv});var WY=St(()=>{jY();GY();YY()});function JY(t,e,r){let[s,o]=Eu(e,r!=null?r:{}),{arity:n=1}=o,l=t.split(","),u=new Set(l);return Qa({definition(f){f.addOption({names:l,arity:n,hidden:o==null?void 0:o.hidden,description:o==null?void 0:o.description,required:o.required})},transformer(f,g,C){let w=typeof s!="undefined"?[...s]:void 0;for(let{name:B,value:S}of C.options)!u.has(B)||(w=w!=null?w:[],w.push(S));return w}})}var zY=St(()=>{Yf()});function VY(t,e,r){let[s,o]=Eu(e,r!=null?r:{}),n=t.split(","),l=new Set(n);return Qa({definition(u){u.addOption({names:n,allowBinding:!1,arity:0,hidden:o.hidden,description:o.description,required:o.required})},transformer(u,f,g){let C=s;for(let{name:w,value:B}of g.options)!l.has(w)||(C=B);return C}})}var XY=St(()=>{Yf()});function ZY(t,e,r){let[s,o]=Eu(e,r!=null?r:{}),n=t.split(","),l=new Set(n);return Qa({definition(u){u.addOption({names:n,allowBinding:!1,arity:0,hidden:o.hidden,description:o.description,required:o.required})},transformer(u,f,g){let C=s;for(let{name:w,value:B}of g.options)!l.has(w)||(C!=null||(C=0),B?C+=1:C=0);return C}})}var $Y=St(()=>{Yf()});function e7(t={}){return Qa({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:o})=>o)}})}var t7=St(()=>{Yf()});function r7(t={}){return Qa({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let o=l=>{let u=s.positionals[l];return u.extra===KA||u.extra===!1&&l<e.arity.leading.length},n=0;for(;n<s.positionals.length&&o(n);)n+=1;return s.positionals.splice(0,n).map(({value:l})=>l)}})}var n7=St(()=>{tv();Yf()});function ZHe(t,e,r){let[s,o]=Eu(e,r!=null?r:{}),{arity:n=1}=o,l=t.split(","),u=new Set(l);return Qa({definition(f){f.addOption({names:l,arity:o.tolerateBoolean?0:n,hidden:o.hidden,description:o.description,required:o.required})},transformer(f,g,C,w){let B,S=s;typeof o.env!="undefined"&&w.env[o.env]&&(B=o.env,S=w.env[o.env]);for(let{name:y,value:N}of C.options)!u.has(y)||(B=y,S=N);return typeof S=="string"?UI(B!=null?B:g,S,o.validator):S}})}function $He(t={}){let{required:e=!0}=t;return Qa({definition(r,s){var o;r.addPositional({name:(o=t.name)!==null&&o!==void 0?o:s,required:t.required})},transformer(r,s,o){var n;for(let l=0;l<o.positionals.length;++l){if(o.positionals[l].extra===KA||e&&o.positionals[l].extra===!0||!e&&o.positionals[l].extra===!1)continue;let[u]=o.positionals.splice(l,1);return UI((n=t.name)!==null&&n!==void 0?n:s,u.value,t.validator)}}})}function i7(t,...e){return typeof t=="string"?ZHe(t,...e):$He(t)}var s7=St(()=>{tv();Yf()});var Ie={};or(Ie,{Array:()=>JY,Boolean:()=>VY,Counter:()=>ZY,Proxy:()=>e7,Rest:()=>r7,String:()=>i7,applyValidator:()=>UI,cleanValidationError:()=>XQ,formatError:()=>OI,isOptionSymbol:()=>LI,makeCommandOption:()=>Qa,rerouteArguments:()=>Eu});var o7=St(()=>{Yf();zY();XY();$Y();t7();n7();s7()});var jI={};or(jI,{Builtins:()=>gR,Cli:()=>Da,Command:()=>dt,Option:()=>Ie,UsageError:()=>ht,formatMarkdownish:()=>Vo,run:()=>KY,runExit:()=>_Y});var tr=St(()=>{VQ();iR();Eh();qY();WY();o7()});var A7=K((Hkt,a7)=>{"use strict";a7.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var wh=K((qkt,pR)=>{"use strict";var e6e=A7(),l7=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},o=(u,f,...g)=>{r++;let C=e6e(u,...g);f(C),C.then(s,s)},n=(u,f,...g)=>{r<t?o(u,f,...g):e.push(o.bind(null,u,f,...g))},l=(u,...f)=>new Promise(g=>n(u,g,...f));return Object.defineProperties(l,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),l};pR.exports=l7;pR.exports.default=l7});function wu(t){return`YN${t.toString(10).padStart(4,"0")}`}function ov(t){let e=Number(t.slice(2));if(typeof ke[e]=="undefined")throw new Error(`Unknown message name: "${t}"`);return e}var ke,aA=St(()=>{(function(Xe){Xe[Xe.UNNAMED=0]="UNNAMED",Xe[Xe.EXCEPTION=1]="EXCEPTION",Xe[Xe.MIS
|
|||
|
`,"\r","(",")","!","|","&","^"],!0,!1),Ce=function(ie){return e.queryPattern.test(ie)},Se=function(ie){return e.checkFn(ie)},ye=nt("whitespace"),xe=/^[ \t\n\r]/,Qe=Ye([" "," ",`
|
|||
|
`,"\r"],!1,!1),p=0,Ue=0,De=[{line:1,column:1}],Ee=0,fe=[],ne=0,Be;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function Te(){return t.substring(Ue,p)}function Qt(){return $e(Ue,p)}function _(ie,Ae){throw Ae=Ae!==void 0?Ae:$e(Ue,p),D([nt(ie)],t.substring(Ue,p),Ae)}function Ge(ie,Ae){throw Ae=Ae!==void 0?Ae:$e(Ue,p),I(ie,Ae)}function rt(ie,Ae){return{type:"literal",text:ie,ignoreCase:Ae}}function Ye(ie,Ae,Fe){return{type:"class",parts:ie,inverted:Ae,ignoreCase:Fe}}function Re(){return{type:"any"}}function yt(){return{type:"end"}}function nt(ie){return{type:"other",description:ie}}function Ze(ie){var Ae=De[ie],Fe;if(Ae)return Ae;for(Fe=ie-1;!De[Fe];)Fe--;for(Ae=De[Fe],Ae={line:Ae.line,column:Ae.column};Fe<ie;)t.charCodeAt(Fe)===10?(Ae.line++,Ae.column=1):Ae.column++,Fe++;return De[ie]=Ae,Ae}function $e(ie,Ae){var Fe=Ze(ie),_e=Ze(Ae);return{start:{offset:ie,line:Fe.line,column:Fe.column},end:{offset:Ae,line:_e.line,column:_e.column}}}function k(ie){p<Ee||(p>Ee&&(Ee=p,fe=[]),fe.push(ie))}function I(ie,Ae){return new Sh(ie,null,null,Ae)}function D(ie,Ae,Fe){return new Sh(Sh.buildMessage(ie,Ae),ie,Ae,Fe)}function m(){var ie,Ae,Fe,_e,Ct,vt,Wt,cr;if(ie=p,Ae=F(),Ae!==r){for(Fe=[],_e=p,Ct=ee(),Ct!==r?(t.charCodeAt(p)===124?(vt=n,p++):(vt=r,ne===0&&k(l)),vt===r&&(t.charCodeAt(p)===38?(vt=u,p++):(vt=r,ne===0&&k(f)),vt===r&&(t.charCodeAt(p)===94?(vt=g,p++):(vt=r,ne===0&&k(C)))),vt!==r?(Wt=ee(),Wt!==r?(cr=F(),cr!==r?(Ct=[Ct,vt,Wt,cr],_e=Ct):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r);_e!==r;)Fe.push(_e),_e=p,Ct=ee(),Ct!==r?(t.charCodeAt(p)===124?(vt=n,p++):(vt=r,ne===0&&k(l)),vt===r&&(t.charCodeAt(p)===38?(vt=u,p++):(vt=r,ne===0&&k(f)),vt===r&&(t.charCodeAt(p)===94?(vt=g,p++):(vt=r,ne===0&&k(C)))),vt!==r?(Wt=ee(),Wt!==r?(cr=F(),cr!==r?(Ct=[Ct,vt,Wt,cr],_e=Ct):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r);Fe!==r?(Ue=ie,Ae=w(Ae,Fe),ie=Ae):(p=ie,ie=r)}else p=ie,ie=r;return ie}function F(){var ie,Ae,Fe,_e,Ct,vt;return ie=p,t.charCodeAt(p)===33?(Ae=B,p++):(Ae=r,ne===0&&k(S)),Ae!==r?(Fe=F(),Fe!==r?(Ue=ie,Ae=y(Fe),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r),ie===r&&(ie=p,t.charCodeAt(p)===40?(Ae=N,p++):(Ae=r,ne===0&&k(L)),Ae!==r?(Fe=ee(),Fe!==r?(_e=m(),_e!==r?(Ct=ee(),Ct!==r?(t.charCodeAt(p)===41?(vt=H,p++):(vt=r,ne===0&&k(G)),vt!==r?(Ue=ie,Ae=te(_e),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r),ie===r&&(ie=X())),ie}function X(){var ie,Ae,Fe,_e,Ct;if(ie=p,Ae=ee(),Ae!==r){if(Fe=p,_e=[],ce.test(t.charAt(p))?(Ct=t.charAt(p),p++):(Ct=r,ne===0&&k(me)),Ct!==r)for(;Ct!==r;)_e.push(Ct),ce.test(t.charAt(p))?(Ct=t.charAt(p),p++):(Ct=r,ne===0&&k(me));else _e=r;_e!==r?Fe=t.substring(Fe,p):Fe=_e,Fe!==r?(Ue=p,_e=Ce(Fe),_e?_e=void 0:_e=r,_e!==r?(Ue=ie,Ae=Se(Fe),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r)}else p=ie,ie=r;return ie}function ee(){var ie,Ae;for(ne++,ie=[],xe.test(t.charAt(p))?(Ae=t.charAt(p),p++):(Ae=r,ne===0&&k(Qe));Ae!==r;)ie.push(Ae),xe.test(t.charAt(p))?(Ae=t.charAt(p),p++):(Ae=r,ne===0&&k(Qe));return ne--,ie===r&&(Ae=r,ne===0&&k(ye)),ie}if(Be=o(),Be!==r&&p===t.length)return Be;throw Be!==r&&p<t.length&&k(yt()),D(fe,Ee<t.length?t.charAt(Ee):null,Ee<t.length?$e(Ee,Ee+1):$e(Ee,Ee))}sJ.exports={SyntaxError:Sh,parse:cje}});var aJ=K(Iv=>{var{parse:uje}=oJ();Iv.makeParser=(t=/[a-z]+/)=>(e,r)=>uje(e,{queryPattern:t,checkFn:r});Iv.parse=Iv.makeParser()});var lJ=K((USt,AJ)=>{"use strict";AJ.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],darko
|
|||
|
`:`
|
|||
|
`)+r,o=s+1,s=t.indexOf(`
|
|||
|
`,o)}while(s!==-1);return n+=t.substr(o),n};vJ.exports={stringReplaceAll:Qje,stringEncaseCRLFWithFirstIndex:vje}});var PJ=K((WSt,kJ)=>{"use strict";var Dje=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,SJ=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,kje=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Sje=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,bje=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function bJ(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):bje.get(t)||t}function xje(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),o;for(let n of s){let l=Number(n);if(!Number.isNaN(l))r.push(l);else if(o=n.match(kje))r.push(o[2].replace(Sje,(u,f,g)=>f?bJ(f):g));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Pje(t){SJ.lastIndex=0;let e=[],r;for(;(r=SJ.exec(t))!==null;){let s=r[1];if(r[2]){let o=xje(s,r[2]);e.push([s].concat(o))}else e.push([s])}return e}function xJ(t,e){let r={};for(let o of e)for(let n of o.styles)r[n[0]]=o.inverse?null:n.slice(1);let s=t;for(let[o,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(o in s))throw new Error(`Unknown Chalk style: ${o}`);s=n.length>0?s[o](...n):s[o]}return s}kJ.exports=(t,e)=>{let r=[],s=[],o=[];if(e.replace(Dje,(n,l,u,f,g,C)=>{if(l)o.push(bJ(l));else if(f){let w=o.join("");o=[],s.push(r.length===0?w:xJ(t,r)(w)),r.push({inverse:u,styles:Pje(f)})}else if(g){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(xJ(t,r)(o.join(""))),o=[],r.pop()}else o.push(C)}),s.push(o.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var LR=K((JSt,FJ)=>{"use strict";var oE=sE(),{stdout:RR,stderr:TR}=FR(),{stringReplaceAll:Fje,stringEncaseCRLFWithFirstIndex:Rje}=DJ(),RJ=["ansi","ansi","ansi256","ansi16m"],Mm=Object.create(null),Tje=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=RR?RR.level:0;t.level=e.level===void 0?r:e.level},TJ=class{constructor(e){return NJ(e)}},NJ=t=>{let e={};return Tje(e,t),e.template=(...r)=>Nje(e.template,...r),Object.setPrototypeOf(e,Bv.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=TJ,e.template};function Bv(t){return NJ(t)}for(let[t,e]of Object.entries(oE))Mm[t]={get(){let r=Qv(this,NR(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Mm.visible={get(){let t=Qv(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var MJ=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of MJ)Mm[t]={get(){let{level:e}=this;return function(...r){let s=NR(oE.color[RJ[e]][t](...r),oE.color.close,this._styler);return Qv(this,s,this._isEmpty)}}};for(let t of MJ){let e="bg"+t[0].toUpperCase()+t.slice(1);Mm[e]={get(){let{level:r}=this;return function(...s){let o=NR(oE.bgColor[RJ[r]][t](...s),oE.bgColor.close,this._styler);return Qv(this,o,this._isEmpty)}}}}var Mje=Object.defineProperties(()=>{},Me(re({},Mm),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),NR=(t,e,r)=>{let s,o;return r===void 0?(s=t,o=e):(s=r.openAll+t,o=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:o,parent:r}},Qv=(t,e,r)=>{let s=(...o)=>Lje(s,o.length===1?""+o[0]:o.join(" "));return s.__proto__=Mje,s._generator=t,s._styler=e,s._isEmpty=r,s},Lje=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:o}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=Fje(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
|||
|
`);return n!==-1&&(e=Rje(e,o,s,n)),s+e+o},MR,Nje=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let s=e.slice(1),o=[r.raw[0]];for(let n=1;n<r.length;n++)o.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return MR===void 0&&(MR=PJ()),MR(t,o.join(""))};Object.defineProperties(Bv.prototype,Mm);var aE=Bv();aE.supportsColor=RR;aE.stderr=Bv({level:TR?TR.level:0});aE.stderr.supportsColor=TR;aE.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};FJ.exports=aE});var vv=K(Rl=>{"use strict";Rl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Rl.find=(t,e)=>t.nodes.find(r=>r.type===e);Rl.exceedsLimit=(t,e,r=1,s)=>s===!1||!Rl.isInteger(t)||!Rl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;Rl.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];!s||(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};Rl.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0==0?(t.invalid=!0,!0):!1;Rl.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0==0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Rl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Rl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Rl.flatten=(...t)=>{let e=[],r=s=>{for(let o=0;o<s.length;o++){let n=s[o];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var Dv=K((VSt,LJ)=>{"use strict";var OJ=vv();LJ.exports=(t,e={})=>{let r=(s,o={})=>{let n=e.escapeInvalid&&OJ.isInvalidBrace(o),l=s.invalid===!0&&e.escapeInvalid===!0,u="";if(s.value)return(n||l)&&OJ.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let f of s.nodes)u+=r(f);return u};return r(t)}});var _J=K((XSt,UJ)=>{"use strict";UJ.exports=function(t){return typeof t=="number"?t-t==0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var zJ=K((ZSt,KJ)=>{"use strict";var HJ=_J(),bh=(t,e,r)=>{if(HJ(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(HJ(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s=re({relaxZeros:!0},r);typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let o=String(s.relaxZeros),n=String(s.shorthand),l=String(s.capture),u=String(s.wrap),f=t+":"+e+"="+o+n+l+u;if(bh.cache.hasOwnProperty(f))return bh.cache[f].result;let g=Math.min(t,e),C=Math.max(t,e);if(Math.abs(g-C)===1){let N=t+"|"+e;return s.capture?`(${N})`:s.wrap===!1?N:`(?:${N})`}let w=jJ(t)||jJ(e),B={min:t,max:e,a:g,b:C},S=[],y=[];if(w&&(B.isPadded=w,B.maxLen=String(B.max).length),g<0){let N=C<0?Math.abs(C):1;y=qJ(N,Math.abs(g),B,s),g=B.a=0}return C>=0&&(S=qJ(g,C,B,s)),B.negatives=y,B.positives=S,B.result=Oje(y,S,s),s.capture===!0?B.result=`(${B.result})`:s.wrap!==!1&&S.length+y.length>1&&(B.result=`(?:${B.result})`),bh.cache[f]=B,B.result};function Oje(t,e,r){let s=OR(t,e,"-",!1,r)||[],o=OR(e,t,"",!1,r)||[],n=OR(t,e,"-?",!0,r)||[];return s.concat(n).concat(o).join("|")}function _je(t,e){let r=1,s=1,o=GJ(t,r),n=new Set([e]);for(;t<=o&&o<=e;)n.add(o),r+=1,o=GJ(t,r);for(o=YJ(e+1,s)-1;t<o&&o<=e;)n.add(o),s+=1,o=YJ(e+1,s)-1;return n=[...n],n.sort(Uje),n}function qje(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=Kje(t,e),o=s.length,n="",l=0;for(let u=0;u<o;u++){let[f,g]=s[u];f===g?n+=f:f!=="0"||g!=="9"?n+=Hje(f,g,r):l++}return l&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[l],digits:o}}function qJ(t,e,r,s){let o=_je(t,e),n=[],l=t,u;for(let f=0;f<o.length;f++){let g=o[f],C=qje(String(l),String(g),s),w="";if(!r.isPadded&&u&&u.pattern===C.pattern){u.count.length>1&&u.count.pop(),u.count.push(C.count[0]),u.string=u.pattern+WJ(u.count),l=g+1;continue}r.isPadded&&(w=jje(g,r,s)),C.string=w+C.pattern+WJ(C.count),n.push(C),l=g+1,u=C}return n}function OR(t,e,r,s,o){let n=[];for(let l of t){let{string:u}=l;!s&&!JJ(e,"string"
|
|||
|
`,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 dz=K((nbt,fz)=>{"use strict";var nGe=Dv(),{MAX_LENGTH:gz,CHAR_BACKSLASH:HR,CHAR_BACKTICK:iGe,CHAR_COMMA:sGe,CHAR_DOT:oGe,CHAR_LEFT_PARENTHESES:aGe,CHAR_RIGHT_PARENTHESES:AGe,CHAR_LEFT_CURLY_BRACE:lGe,CHAR_RIGHT_CURLY_BRACE:cGe,CHAR_LEFT_SQUARE_BRACKET:pz,CHAR_RIGHT_SQUARE_BRACKET:hz,CHAR_DOUBLE_QUOTE:uGe,CHAR_SINGLE_QUOTE:fGe,CHAR_NO_BREAK_SPACE:gGe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:pGe}=uz(),hGe=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(gz,r.maxLength):gz;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let o={type:"root",input:t,nodes:[]},n=[o],l=o,u=o,f=0,g=t.length,C=0,w=0,B,S={},y=()=>t[C++],N=L=>{if(L.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&L.type==="text"){u.value+=L.value;return}return l.nodes.push(L),L.parent=l,L.prev=u,u=L,L};for(N({type:"bos"});C<g;)if(l=n[n.length-1],B=y(),!(B===pGe||B===gGe)){if(B===HR){N({type:"text",value:(e.keepEscaping?B:"")+y()});continue}if(B===hz){N({type:"text",value:"\\"+B});continue}if(B===pz){f++;let L=!0,H;for(;C<g&&(H=y());){if(B+=H,H===pz){f++;continue}if(H===HR){B+=y();continue}if(H===hz&&(f--,f===0))break}N({type:"text",value:B});continue}if(B===aGe){l=N({type:"paren",nodes:[]}),n.push(l),N({type:"text",value:B});continue}if(B===AGe){if(l.type!=="paren"){N({type:"text",value:B});continue}l=n.pop(),N({type:"text",value:B}),l=n[n.length-1];continue}if(B===uGe||B===fGe||B===iGe){let L=B,H;for(e.keepQuotes!==!0&&(B="");C<g&&(H=y());){if(H===HR){B+=H+y();continue}if(H===L){e.keepQuotes===!0&&(B+=H);break}B+=H}N({type:"text",value:B});continue}if(B===lGe){w++;let L=u.value&&u.value.slice(-1)==="$"||l.dollar===!0;l=N({type:"brace",open:!0,close:!1,dollar:L,depth:w,commas:0,ranges:0,nodes:[]}),n.push(l),N({type:"open",value:B});continue}if(B===cGe){if(l.type!=="brace"){N({type:"text",value:B});continue}let L="close";l=n.pop(),l.close=!0,N({type:L,value:B}),w--,l=n[n.length-1];continue}if(B===sGe&&w>0){if(l.ranges>0){l.ranges=0;let L=l.nodes.shift();l.nodes=[L,{type:"text",value:nGe(l)}]}N({type:"comma",value:B}),l.commas++;continue}if(B===oGe&&w>0&&l.commas===0){let L=l.nodes;if(w===0||L.length===0){N({type:"text",value:B});continue}if(u.type==="dot"){if(l.range=[],u.value+=B,u.type="range",l.nodes.length!==3&&l.nodes.length!==5){l.invalid=!0,l.ranges=0,u.type="text";continue}l.ranges++,l.args=[];continue}if(u.type==="range"){L.pop();let H=L[L.length-1];H.value+=u.value+B,u=H,l.ranges--;continue}N({type:"dot",value:B});continue}N({type:"text",value:B})}do if(l=n.pop(),l.type!=="root"){l.nodes.forEach(G=>{G.nodes||(G.type==="open"&&(G.isOpen=!0),G.type==="close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});let L=n[n.length-1],H=L.nodes.indexOf(l);L.nodes.splice(H,1,...l.nodes)}while(n.length>0);return N({type:"eos"}),o};fz.exports=hGe});var Cz=K((ibt,mz)=>{"use strict";var yz=Dv(),dGe=oz(),mGe=lz(),yGe=dz(),HA=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let o=HA.create(s,e);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(HA.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};HA.parse=(t,e={})=>yGe(t,e);HA.stringify=(t,e={})=>typeof t=="string"?yz(HA.parse(t,e),e):yz(t,e);HA.compile=(t,e={})=>(typeof t=="string"&&(t=HA.parse(t,e)),dGe(t,e));HA.expand=(t,e={})=>{typeof t=="string"&&(t=HA.parse(t,e));let r=mGe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};HA.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?HA.compile(t,e):HA.expand(t,e);mz.exports=HA});var lE=K((sbt,Iz)=>{"use strict";var CGe=require("path"),Bu="\\\\/",Ez=`[^${Bu}]`,Vf="\\.",IGe="\\+",EGe="\\?",Sv="\\/",wGe="(?=.)",wz="[^/]",qR=`(?:${Sv}|$)`,B
|
|||
|
`),u!==-1){let f=o+l.substring(0,u);l=l.substring(u+1),o="",e!==null?this.reportInfo(null,`${e} ${f}`):this.reportInfo(null,f)}while(u!==-1);o+=l}),r.on("end",()=>{let n=s.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var WE,sM=St(()=>{aA();Ol();vo();WE=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(o=>o.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(o=>o.supports(e,r));if(!s)throw new ar(ke.FETCHER_NOT_FOUND,`${Wr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var uy,oM=St(()=>{vo();uy=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,o){return this.getResolverByDescriptor(e,o).getSatisfying(e,r,s,o)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(o=>o.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(o=>o.supportsDescriptor(e,r));if(!s)throw new Error(`${ri(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(o=>o.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(o=>o.supportsLocator(e,r));if(!s)throw new Error(`${Wr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var JE,aM=St(()=>{Ht();vo();JE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let o=e.reference.slice(s+1),n=fA(e,o);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let o=e.reference.slice(s+1),n=fA(e,o),l=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,l,r)}getLocatorFilename(e){return ay(e)}async ensureVirtualLink(e,r,s){let o=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),l=this.getLocatorFilename(e),u=As.makeVirtualPath(n,l,o),f=new Hf(u,{baseFs:r.packageFs,pathUtils:$});return Me(re({},r),{packageFs:f})}}});var fy,MD,Gne=St(()=>{fy=class{static isVirtualDescriptor(e){return!!e.range.startsWith(fy.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(fy.protocol)}supportsDescriptor(e,r){return fy.isVirtualDescriptor(e)}supportsLocator(e,r){return fy.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,o){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},MD=fy;MD.protocol="virtual:"});var zE,AM=St(()=>{Ht();zh();zE=class{supports(e){return!!e.reference.startsWith(Li.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new bn(s),pr
|
|||
|
`);return{stdout:n,stderr:l}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new uy([new MD,new Li,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new WE([new JE,new zE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=XE(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(l=>l==="current"?e.os:l));let o=r.get("cpu");o!==null&&(o=o.map(l=>l==="current"?e.cpu:l));let n=r.get("libc");return n!==null&&(n=Du(n,l=>{var u;return l==="current"?(u=e.libc)!=null?u:Du.skip:l})),{os:s,cpu:o,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,o,{userProvided:n=!1}={})=>{if(!Pu(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let l=new Xt;l.load(o,{yamlCompatibilityMode:!0});let u=zm(e,s.identHash),f=[];u.push([s.range,f]);let g={status:$o.Inactive,userProvided:n,parentDescriptor:s};for(let C of l.dependencies.values())f.push(Me(re({},g),{type:to.Dependency,descriptor:C}));for(let C of l.peerDependencies.values())f.push(Me(re({},g),{type:to.PeerDependency,descriptor:C}));for(let[C,w]of l.peerDependenciesMeta)for(let[B,S]of Object.entries(w))f.push(Me(re({},g),{type:to.PeerDependencyMeta,selector:C,key:B,value:S}))};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,o]of this.get("packageExtensions"))r(Np(s,!0),Vv(o),{userProvided:!0})}normalizeDependency(e){return Pu(e.range)?Hn(e,`${this.get("defaultProtocol")}${e.range}`):ZE.test(e.range)?Hn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e){let r=LE(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let s=this.packageExtensions.get(e.identHash);if(typeof s!="undefined"){let n=e.version;if(n!==null){for(let[l,u]of s)if(!!Vh(n,l))for(let f of u)switch(f.status===$o.Inactive&&(f.status=$o.Redundant),f.type){case to.Dependency:typeof r.dependencies.get(f.descriptor.identHash)=="undefined"&&(f.status=$o.Active,r.dependencies.set(f.descriptor.identHash,this.normalizeDependency(f.descriptor)));break;case to.PeerDependency:typeof r.peerDependencies.get(f.descriptor.identHash)=="undefined"&&(f.status=$o.Active,r.peerDependencies.set(f.descriptor.identHash,f.descriptor));break;case to.PeerDependencyMeta:{let g=r.peerDependenciesMeta.get(f.selector);(typeof g=="undefined"||!Object.prototype.hasOwnProperty.call(g,f.key)||g[f.key]!==f.value)&&(f.status=$o.Active,Xf(r.peerDependenciesMeta,f.selector,()=>({}))[f.key]=f.value)}break;default:PT(f);break}}}let o=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let l=ba(n);r.peerDependencies.has(l.identHash)||r.peerDependencies.set(l.identHash,Hn(l,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let l=o(n),u=xu("types",l),f=En(u);r.peerDependencies.has(u.identHash)||r.peerDependenciesMeta.has(f)||(r.peerDependencies.set(u.identHash,Hn(u,"*")),r.peerDependenciesMeta.set(f,{optional:!0}))}return r.dependencies=new Map(lA(r.dependencies,([,n])=>cA(n))),r.peerDependencies=new Map(lA(r.peerDependencies,([,n])=>cA(n))),r}getLimit(e){return Xf(this.limits,e,()=>(0,Jne.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let n=e(o);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let o=r;for(let n of this.plugins.values()){let l=n.hooks;if(!l)continue;let u=e(l);!u||(o=await u(o,...s))}return o}async firstHook(e,...r){for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let n=e(o);if(!n)continue;let l=await n(...r);if(typeof l!="undefined")return l}return null}},st=Fu;st.deleteProperty=Symbol()
|
|||
|
`,w.message,w.stack);var B=new Error("tunneling socket could not be established, cause="+w.message);B.code="ECONNRESET",e.request.emit("error",B),s.removeSocket(o)}};ig.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var s=this.requests.shift();s&&this.createSocket(s,function(o){s.request.onSocket(o)})}};function $ne(t,e){var r=this;ig.prototype.createSocket.call(r,t,function(s){var o=t.request.getHeader("host"),n=bM({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):t.host}),l=zet.connect(0,n);r.sockets[r.sockets.indexOf(s)]=l,e(l)})}function eie(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function bM(t){for(var e=1,r=arguments.length;e<r;++e){var s=arguments[e];if(typeof s=="object")for(var o=Object.keys(s),n=0,l=o.length;n<l;++n){var u=o[n];s[u]!==void 0&&(t[u]=s[u])}}return t}var Up;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Up=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Up=function(){};py.debug=Up});var nie=K((TTt,rie)=>{rie.exports=tie()});var og=K((sg,GD)=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var iie=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rtt(t){return iie.includes(t)}var ntt=["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",...iie];function itt(t){return ntt.includes(t)}var stt=["null","undefined","string","number","bigint","boolean","symbol"];function ott(t){return stt.includes(t)}function hy(t){return e=>typeof e===t}var{toString:sie}=Object.prototype,ew=t=>{let e=sie.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Ne.domElement(t))return"HTMLElement";if(itt(e))return e},yi=t=>e=>ew(e)===t;function Ne(t){if(t===null)return"null";switch(typeof t){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(Ne.observable(t))return"Observable";if(Ne.array(t))return"Array";if(Ne.buffer(t))return"Buffer";let e=ew(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Ne.undefined=hy("undefined");Ne.string=hy("string");var att=hy("number");Ne.number=t=>att(t)&&!Ne.nan(t);Ne.bigint=hy("bigint");Ne.function_=hy("function");Ne.null_=t=>t===null;Ne.class_=t=>Ne.function_(t)&&t.toString().startsWith("class ");Ne.boolean=t=>t===!0||t===!1;Ne.symbol=hy("symbol");Ne.numericString=t=>Ne.string(t)&&!Ne.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Ne.array=(t,e)=>Array.isArray(t)?Ne.function_(e)?t.every(e):!0:!1;Ne.buffer=t=>{var e,r,s,o;return(o=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&o!==void 0?o:!1};Ne.nullOrUndefined=t=>Ne.null_(t)||Ne.undefined(t);Ne.object=t=>!Ne.null_(t)&&(typeof t=="object"||Ne.function_(t));Ne.iterable=t=>{var e;return Ne.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Ne.asyncIterable=t=>{var e;return Ne.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Ne.generator=t=>Ne.iterable(t)&&Ne.function_(t.next)&&Ne.function_(t.throw);Ne.asyncGenerator=t=>Ne.asyncIterable(t)&&Ne.function_(t.next)&&Ne.function_(t.throw);Ne.nativePromise=t=>yi("Promise")(t);var Att=t=>{var e,r;return Ne.function_((e=t)===null||e===void 0?void 0:e.then)&&Ne.function_((r=t)===null||r===void 0?void 0:r.catch)};Ne.promise=t=>Ne.nativePromise(t)||Att(t);Ne.generatorFunction=yi("GeneratorFunction");Ne.asyncGene
|
|||
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);y(N)}return}s[0].resolve(S);return}}if(l in this.queue){if(u in this.queue[l]){this.queue[l][u].listeners.push(...s),this._tryToCreateNewSession(l,u);return}}else this.queue[l]={};let f=()=>{l in this.queue&&this.queue[l][u]===g&&(delete this.queue[l][u],Object.keys(this.queue[l]).length===0&&delete this.queue[l])},g=()=>{let C=`${u}:${l}`,w=!1;try{let B=hrt.connect(e,re({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C)},r));B[Fa]=0,B[yy]=!1;let S=()=>B[Fa]<B.remoteSettings.maxConcurrentStreams,y=!0;B.socket.once("session",L=>{this.tlsSessionCache.set(C,L)}),B.once("error",L=>{for(let{reject:H}of s)H(L);this.tlsSessionCache.delete(C)}),B.setTimeout(this.timeout,()=>{B.destroy()}),B.once("close",()=>{if(w){y&&this._freeSessionsCount--,this._sessionsCount--;let L=this.sessions[l];L.splice(L.indexOf(B),1),L.length===0&&delete this.sessions[l]}else{let L=new Error("Session closed without receiving a SETTINGS frame");L.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:H}of s)H(L);f()}this._tryToCreateNewSession(l,u)});let N=()=>{if(!(!(l in this.queue)||!S())){for(let L of B[Ul])if(L in this.queue[l]){let{listeners:H}=this.queue[l][L];for(;H.length!==0&&S();)H.shift().resolve(B);let G=this.queue[l];if(G[L].listeners.length===0&&(delete G[L],Object.keys(G).length===0)){delete this.queue[l];break}if(!S())break}}};B.on("origin",()=>{B[Ul]=B.originSet,!!S()&&(N(),eL(this.sessions[l],B))}),B.once("remoteSettings",()=>{if(B.ref(),B.unref(),this._sessionsCount++,g.destroyed){let L=new Error("Agent has been destroyed");for(let H of s)H.reject(L);B.destroy();return}B[Ul]=B.originSet;{let L=this.sessions;if(l in L){let H=L[l];H.splice(yrt(H,B,Crt),0,B)}else L[l]=[B]}this._freeSessionsCount+=1,w=!0,this.emit("session",B),N(),f(),B[Fa]===0&&this._freeSessionsCount>this.maxFreeSessions&&B.close(),s.length!==0&&(this.getSession(u,r,s),s.length=0),B.on("remoteSettings",()=>{N(),eL(this.sessions[l],B)})}),B[sse]=B.request,B.request=(L,H)=>{if(B[yy])throw new Error("The session is gracefully closing. No new streams are allowed.");let G=B[sse](L,H);return B.ref(),++B[Fa],B[Fa]===B.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,G.once("close",()=>{if(y=S(),--B[Fa],!B.destroyed&&!B.closed&&(Irt(this.sessions[l],B),S()&&!B.closed)){y||(this._freeSessionsCount++,y=!0);let te=B[Fa]===0;te&&B.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||B[yy])?B.close():(eL(this.sessions[l],B),N())}}),G}}catch(B){for(let S of s)S.reject(B);f()}};g.listeners=s,g.completed=!1,g.destroyed=!1,this.queue[l][u]=g,this._tryToCreateNewSession(l,u)})}request(e,r,s,o){return new Promise((n,l)=>{this.getSession(e,r,[{reject:l,resolve:u=>{try{n(u.request(s,o))}catch(f){l(f)}}}])})}createConnection(e,r){return ag.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let s=e.port||443,o=e.hostname||e.host;return typeof r.servername=="undefined"&&(r.servername=o),prt.connect(s,o,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Fa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return ase({agent:this,isFree:!0})}get busySessions(){return ase({agent:this,isFree:!1})}};ag.kCurrentStreamsCount=Fa;ag.kGracefullyClosing=yy;ise.exports={Agent:ag,globalAgent:new ag}});var rL=K((nNt,Ase)=>{"use strict";var{Readable:Ert}=require("stream"),lse=class extends Ert{constructor(e,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=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeA
|
|||
|
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|||
|
`).reverse();for(;u.length!==0&&u[0]===l[0];)l.shift();this.stack=`${this.stack.slice(0,n)}${l.reverse().join(`
|
|||
|
`)}${u.reverse().join(`
|
|||
|
`)}`}}};Ln.RequestError=Ks;var PL=class extends Ks{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}};Ln.MaxRedirectsError=PL;var FL=class extends Ks{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}};Ln.HTTPError=FL;var RL=class extends Ks{constructor(e,r){super(e.message,e,r);this.name="CacheError"}};Ln.CacheError=RL;var TL=class extends Ks{constructor(e,r){super(e.message,e,r);this.name="UploadError"}};Ln.UploadError=TL;var NL=class extends Ks{constructor(e,r,s){super(e.message,e,s);this.name="TimeoutError",this.event=e.event,this.timings=r}};Ln.TimeoutError=NL;var nk=class extends Ks{constructor(e,r){super(e.message,e,r);this.name="ReadError"}};Ln.ReadError=nk;var ML=class extends Ks{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}};Ln.UnsupportedProtocolError=ML;var Snt=["socket","connect","continue","information","upgrade","timeout"],xL=class extends eoe.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0});this[Ey]=0,this[By]=0,this.requestInitialized=!1,this[tk]=new Set,this.redirects=[],this[Qy]=!1,this[rk]=!1,this[aw]=[],this.retryCount=0,this._progressCallbacks=[];let o=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",g=>{g.prependListener("data",o),g.on("data",n),g.prependListener("end",o),g.on("end",n)}),this.on("unpipe",g=>{g.off("data",o),g.off("data",n),g.off("end",o),g.off("end",n)}),this.on("pipe",g=>{g instanceof DL.IncomingMessage&&(this.options.headers=re(re({},g.headers),this.options.headers))});let{json:l,body:u,form:f}=r;if((l||u||f)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(g){ft.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(g);return}(async()=>{var g;try{this.options.body instanceof ant.ReadStream&&await vnt(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){(g=this[Do])===null||g===void 0||g.destroy();return}for(let w of this[aw])w();this[aw].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Ks){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(e,r,s){var o,n,l,u,f;let g=r;if(ft.default.object(e)&&!ft.default.urlInstance(e))r=re(re(re({},s),e),r);else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r=re(re({},s),r),e!==void 0&&(r.url=e),ft.default.urlInstance(r.url)&&(r.url=new _p.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),ft.assert.any([ft.default.string,ft.default.undefined],r.method),ft.assert.any([ft.default.object,ft.default.undefined],r.headers),ft.assert.any([ft.default.string,ft.default.urlInstance,ft.default.undefined],r.prefixUrl),ft.assert.any([ft.default.object,ft.default.undefined],r.cookieJar),ft.assert.any([ft.default.object,ft.default.string,ft.default.undefined],r.searchParams),ft.assert.any([ft.default.object,ft.default.string,ft.default.undefined],r.cache),ft.assert.any([ft.default.object,ft.default.number,ft.default.undefined],r.timeout),ft.assert.any([ft.default.object,ft.default.undefined],r.context),ft.assert.any([ft.default.object,ft.default.undefined],r.hooks),ft.assert.any([ft.default.boolean,ft.default.undefined],r.decompress),ft.assert.any([ft.default.boolean,ft.default.undefined],r.ignoreInvalidCookies),ft.assert.any([ft.default.boolean,ft.default.undefined],r.followRedirect),ft.assert.any([ft.default.number,ft.default.undefined],r.maxRedirects),ft.assert.any([ft.default.boolean,ft.default.undefined],r.throwHttpErrors),ft.assert.any([ft.default.boolean,ft.default.undefined],r.http2),ft.assert.any([ft.default.boolean,ft.default.undefined],r.allowGetBody),ft.assert.any([ft.default.string,ft.default.undefined],r.localAddress
|
|||
|
`)):typeof readline=="function"&&(U=readline(),U!==null&&(U+=`
|
|||
|
`));if(!U)return null;P.input=hi(U,!0)}return P.input.shift()},put_char:function(P,U){U===null||U===10?(G(Qt(P.output,0)),P.output=[]):U!=0&&P.output.push(U)},flush:function(P){P.output&&P.output.length>0&&(G(Qt(P.output,0)),P.output=[])}},default_tty1_ops:{put_char:function(P,U){U===null||U===10?(te(Qt(P.output,0)),P.output=[]):U!=0&&P.output.push(U)},flush:function(P){P.output&&P.output.length>0&&(te(Qt(P.output,0)),P.output=[])}}};function wA(P){for(var U=me(P,65536),q=ll(U);P<U;)$e[q+P++]=0;return q}var Pr={ops_table:null,mount:function(P){return Pr.createNode(null,"/",16384|511,0)},createNode:function(P,U,q,se){if(Z.isBlkdev(q)||Z.isFIFO(q))throw new Z.ErrnoError(63);Pr.ops_table||(Pr.ops_table={dir:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr,lookup:Pr.node_ops.lookup,mknod:Pr.node_ops.mknod,rename:Pr.node_ops.rename,unlink:Pr.node_ops.unlink,rmdir:Pr.node_ops.rmdir,readdir:Pr.node_ops.readdir,symlink:Pr.node_ops.symlink},stream:{llseek:Pr.stream_ops.llseek}},file:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr},stream:{llseek:Pr.stream_ops.llseek,read:Pr.stream_ops.read,write:Pr.stream_ops.write,allocate:Pr.stream_ops.allocate,mmap:Pr.stream_ops.mmap,msync:Pr.stream_ops.msync}},link:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr,readlink:Pr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr},stream:Z.chrdev_stream_ops}});var le=Z.createNode(P,U,q,se);return Z.isDir(le.mode)?(le.node_ops=Pr.ops_table.dir.node,le.stream_ops=Pr.ops_table.dir.stream,le.contents={}):Z.isFile(le.mode)?(le.node_ops=Pr.ops_table.file.node,le.stream_ops=Pr.ops_table.file.stream,le.usedBytes=0,le.contents=null):Z.isLink(le.mode)?(le.node_ops=Pr.ops_table.link.node,le.stream_ops=Pr.ops_table.link.stream):Z.isChrdev(le.mode)&&(le.node_ops=Pr.ops_table.chrdev.node,le.stream_ops=Pr.ops_table.chrdev.stream),le.timestamp=Date.now(),P&&(P.contents[U]=le,P.timestamp=le.timestamp),le},getFileDataAsTypedArray:function(P){return P.contents?P.contents.subarray?P.contents.subarray(0,P.usedBytes):new Uint8Array(P.contents):new Uint8Array(0)},expandFileStorage:function(P,U){var q=P.contents?P.contents.length:0;if(!(q>=U)){var se=1024*1024;U=Math.max(U,q*(q<se?2:1.125)>>>0),q!=0&&(U=Math.max(U,256));var le=P.contents;P.contents=new Uint8Array(U),P.usedBytes>0&&P.contents.set(le.subarray(0,P.usedBytes),0)}},resizeFileStorage:function(P,U){if(P.usedBytes!=U)if(U==0)P.contents=null,P.usedBytes=0;else{var q=P.contents;P.contents=new Uint8Array(U),q&&P.contents.set(q.subarray(0,Math.min(U,P.usedBytes))),P.usedBytes=U}},node_ops:{getattr:function(P){var U={};return U.dev=Z.isChrdev(P.mode)?P.id:1,U.ino=P.id,U.mode=P.mode,U.nlink=1,U.uid=0,U.gid=0,U.rdev=P.rdev,Z.isDir(P.mode)?U.size=4096:Z.isFile(P.mode)?U.size=P.usedBytes:Z.isLink(P.mode)?U.size=P.link.length:U.size=0,U.atime=new Date(P.timestamp),U.mtime=new Date(P.timestamp),U.ctime=new Date(P.timestamp),U.blksize=4096,U.blocks=Math.ceil(U.size/U.blksize),U},setattr:function(P,U){U.mode!==void 0&&(P.mode=U.mode),U.timestamp!==void 0&&(P.timestamp=U.timestamp),U.size!==void 0&&Pr.resizeFileStorage(P,U.size)},lookup:function(P,U){throw Z.genericErrors[44]},mknod:function(P,U,q,se){return Pr.createNode(P,U,q,se)},rename:function(P,U,q){if(Z.isDir(P.mode)){var se;try{se=Z.lookupNode(U,q)}catch(Pe){}if(se)for(var le in se.contents)throw new Z.ErrnoError(55)}delete P.parent.contents[P.name],P.parent.timestamp=Date.now(),P.name=q,U.contents[q]=P,U.timestamp=P.parent.timestamp,P.parent=U},unlink:function(P,U){delete P.contents[U],P.timestamp=Date.now()},rmdir:function(P,U){var q=Z.lookupNode(P,U);for(var se in q.contents)throw new Z.ErrnoError(55);delete P.contents[U],P.timestamp=Date.now()},readdir:function(P){var U=[".",".."];for(var q in P.contents)!P.contents.hasOwnProperty(q)||U.push(q);return U},symlink:function(P,U,q){var se=Pr.createNode(P,U,511|40960,0);return se.link=q,se},readlink:function(P){if(!Z.isLink(P.mode))throw new Z.ErrnoError(28);return P.link}},stream_ops:{read:function(P,U,q,se,le){var Pe=P.node.c
|
|||
|
`),g(127);break;case"EACCES":o[2].write(`permission denied: ${t}
|
|||
|
`),g(128);break;default:o[2].write(`uncaught error: ${C.message}
|
|||
|
`),g(1);break}}),f.on("close",C=>{ed.delete(f),ed.size===0&&(process.off("SIGINT",$L),process.off("SIGTERM",eO)),g(C!==null?C:129)})})}}}function tae(t){return e=>{let r=e[0]==="pipe"?new Nu.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function pk(t,e){return fw.start(t,e)}function nae(t,e=null){let r=new Nu.PassThrough,s=new $oe.StringDecoder,o="";return r.on("data",n=>{let l=s.write(n),u;do if(u=l.indexOf(`
|
|||
|
`),u!==-1){let f=o+l.substring(0,u);l=l.substring(u+1),o="",t(e!==null?`${e} ${f}`:f)}while(u!==-1);o+=l}),r.on("end",()=>{let n=s.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function iae(t,{prefix:e}){return{stdout:nae(r=>t.stdout.write(`${r}
|
|||
|
`),t.stdout.isTTY?e:null),stderr:nae(r=>t.stderr.write(`${r}
|
|||
|
`),t.stderr.isTTY?e:null)}}var Zoe,Nu,$oe,gA,ed,Sc,rae,fw,tO=St(()=>{Zoe=He(xF()),Nu=He(require("stream")),$oe=He(require("string_decoder"));(function(s){s[s.STDIN=0]="STDIN",s[s.STDOUT=1]="STDOUT",s[s.STDERR=2]="STDERR"})(gA||(gA={}));ed=new Set;Sc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},rae=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},fw=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:o}){let n=new fw(null,e);return n.stdin=r,n.stdout=s,n.stderr=o,n}pipeTo(e,r=1){let s=new fw(this,e),o=new rae;return s.pipe=o,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)==1?this.stdout=o:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)==2?this.stderr=o:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,e[2]=s.get();let o=this.implementation(e);return this.pipe&&this.pipe.attach(o.stdin),await o.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var gw={};or(gw,{ShellError:()=>Hl,execute:()=>yk,globUtils:()=>uk});function Aae(t,e,r){let s=new WA.PassThrough({autoDestroy:!0});switch(t){case gA.STDIN:(e&1)==1&&r.stdin.pipe(s,{end:!1}),(e&2)==2&&r.stdin instanceof WA.Writable&&s.pipe(r.stdin,{end:!1});break;case gA.STDOUT:(e&1)==1&&r.stdout.pipe(s,{end:!1}),(e&2)==2&&s.pipe(r.stdout,{end:!1});break;case gA.STDERR:(e&1)==1&&r.stderr.pipe(s,{end:!1}),(e&2)==2&&s.pipe(r.stderr,{end:!1});break;default:throw new Hl(`Bad file descriptor: "${t}"`)}return s}function hk(t,e={}){let r=re(re({},t),e);return r.environment=re(re({},t.environment),e.environment),r.variables=re(re({},t.variables),e.variables),r}async function uit(t,e,r){let s=[],o=new WA.PassThrough;return o.on("data",n=>s.push(n)),await dk(t,e,hk(r,{stdout:o})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function lae(t,e,r){let s=t.map(async n=>{let l=await ug(n.args,e,r);return{name:n.name,value:l.join(" ")}});return(await Promise.all(s)).reduce((n,l)=>(n[l.name]=l.value,n),{})}function mk(t){return t.match(/[^ \r\n\t]+/g)||[]}async function cae(t,e,r,s,o=s){switch(t.name){case"$":s(String(process.pid));break;case"#":s(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)o(n);else for(let n of e.args){let l=mk(n);for(let u=0;u<l.length-1;++u)o(l[u]);s(l[l.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)s(n);else for(let l of mk(n))o(l)}break;case"PPID":s(String(process.ppid));break;case"RANDOM":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),l;if(Number.isFinite(n))if(n>=0&&n<e.args.length)l=e.args[n];else if(t.defaultValue)l=(await ug(t.defaultValue,e,r)).join(" ");else if(t.alternativeValue)l=(await ug(t.alternativeValue,e,r)).join(" ");else throw new Hl(`Unbound argument #${n}`);else if(Object.prototype.hasOwnProperty.call(r.variables,t.name))l=r.variables[t.name];else if(Object.prototype.hasOwnProperty.call(r.environment,t.name))l=r.environment[t.name];else if(t.defaultValue)l=(await ug(t.defaultValue,e,r)).join(" ");else throw new Hl(`Unbound variable "${t.name}"`);if(typeof l!="undefined"&&t.alternativeValue&&(l=(await ug(t.alternativeValue,e,r)).join(" ")),t.quoted)s(l);else{let u=mk(l);for(let g=0;g<u.length-1;++g)o(u[g]);let f=u[u.length-1];typeof f!="undefined"&&s(f)}}break}}async function hw(t,e,r){if(t.type==="
|
|||
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${f}, '${l(ym(t))}' has ended
|
|||
|
`)})),0}return await fae(t,e,r)}async function dit(t,e,r,{background:s=!1}={}){let o,n=u=>{o=u,r.variables["?"]=String(u)},l=async u=>{try{return await hit(u.chain,e,r,{background:s&&typeof u.then=="undefined"})}catch(f){if(!(f instanceof Hl))throw f;return r.stderr.write(`${f.message}
|
|||
|
`),1}};for(n(await l(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":o===0&&n(await l(t.then.line));break;case"||":o!==0&&n(await l(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return o}async function dk(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let o=0;for(let{command:n,type:l}of t){if(o=await dit(n,e,r,{background:l==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(o)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,o}function gae(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>dw(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>dw(e));case"arithmetic":return rO(t.arithmetic);case"shell":return nO(t.shell);default:return!1}}function dw(t){switch(t.type){case"redirection":return t.args.some(e=>dw(e));case"argument":return t.segments.some(e=>gae(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function rO(t){switch(t.type){case"variable":return gae(t);case"number":return!1;default:return rO(t.left)||rO(t.right)}}function nO(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case"subshell":s=nO(r.subshell);break;case"command":s=r.envs.some(o=>o.args.some(n=>dw(n)))||r.args.some(o=>dw(o));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function yk(t,e=[],{baseFs:r=new fi,builtins:s={},cwd:o=de.toPortablePath(process.cwd()),env:n=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:f=process.stderr,variables:g={},glob:C=uk}={}){let w={};for(let[y,N]of Object.entries(n))typeof N!="undefined"&&(w[y]=N);let B=new Map(cit);for(let[y,N]of Object.entries(s))B.set(y,N);l===null&&(l=new WA.PassThrough,l.end());let S=PQ(t,C);if(!nO(S)&&S.length>0&&e.length>0){let{command:y}=S[S.length-1];for(;y.then;)y=y.then.line;let N=y.chain;for(;N.then;)N=N.then.chain;N.type==="command"&&(N.args=N.args.concat(e.map(L=>({type:"argument",segments:[{type:"text",text:L}]}))))}return await dk(S,{args:e,baseFs:r,builtins:B,initialStdin:l,initialStdout:u,initialStderr:f,glob:C},{cwd:o,environment:w,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:f,variables:Object.assign({},g,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var sae,oae,WA,aae,lit,ra,cit,fit,Ck=St(()=>{Ht();Sl();sae=He(LR()),oae=He(require("os")),WA=He(require("stream")),aae=He(require("util"));Yoe();Xoe();tO();tO();lit=(0,aae.promisify)(setTimeout);(function(r){r[r.Readable=1]="Readable",r[r.Writable=2]="Writable"})(ra||(ra={}));cit=new Map([["cd",async([t=(0,oae.homedir)(),...e],r,s)=>{let o=$.resolve(s.cwd,de.toPortablePath(t));if(!(await r.baseFs.statPromise(o).catch(l=>{throw l.code==="ENOENT"?new Hl(`cd: no such file or directory: ${t}`):l})).isDirectory())throw new Hl(`cd: not a directory: ${t}`);return s.cwd=o,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${de.fromPortablePath(r.cwd)}
|
|||
|
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,s)=>s.exitCode=parseInt(t!=null?t:s.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
|||
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t=="undefined")throw new Hl("sleep: missing operand");let s=Number(t);if(Number.isNaN(s))throw new Hl(`sleep: invalid time interval '${t}'`);return await lit(1e3*s,0)}],["__ysh_run_procedure",async(t,e,r)=>{let s=r.procedures[t[0]];return await pk(s,{stdin:new Sc(r.stdin),stdout:new Sc(r.stdout),stderr:new Sc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let s=r.stdin,o=r.stdout,n=r.stderr,l=[],u=[],f=[],g=0;for(;t[g]!=="--";){let w=t[g++],{type:B,fd:S}=JSON.parse(w),y=G=>{switch(S){case null:case 0:l.push(G);break;default:throw new Error(`Unsupported file descriptor: "${S}"`)}},N=G=>{switch(S){case null:case 1:u.push(G);break;case 2:f.push(G);break;default:throw new Error(`Unsupported file descriptor: "${S}"`)}},L=Number(t[g++]),H=g+L;for(let G=g;G<H;++g,++G)switch(B){case"<":y(()=>e.baseFs.createReadStream($.resolve(r.cwd,de.toPortablePath(t[G]))));break;case"<<<":y(()=>{let te=new WA.PassThrough;return process.nextTick(()=>{te.write(`${t[G]}
|
|||
|
`),te.end()}),te});break;case"<&":y(()=>Aae(Number(t[G]),1,r));break;case">":case">>":{let te=$.resolve(r.cwd,de.toPortablePath(t[G]));N(te==="/dev/null"?new WA.Writable({autoDestroy:!0,emitClose:!0,write(ce,me,Ce){setImmediate(Ce)}}):e.baseFs.createWriteStream(te,B===">>"?{flags:"a"}:void 0))}break;case">&":N(Aae(Number(t[G]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${B}"`)}}if(l.length>0){let w=new WA.PassThrough;s=w;let B=S=>{if(S===l.length)w.end();else{let y=l[S]();y.pipe(w,{end:!1}),y.on("end",()=>{B(S+1)})}};B(0)}if(u.length>0){let w=new WA.PassThrough;o=w;for(let B of u)w.pipe(B)}if(f.length>0){let w=new WA.PassThrough;n=w;for(let B of f)w.pipe(B)}let C=await pk(pw(t.slice(g+1),e,r),{stdin:new Sc(s),stdout:new Sc(o),stderr:new Sc(n)}).run();return await Promise.all(u.map(w=>new Promise((B,S)=>{w.on("error",y=>{S(y)}),w.on("close",()=>{B()}),w.end()}))),await Promise.all(f.map(w=>new Promise((B,S)=>{w.on("error",y=>{S(y)}),w.on("close",()=>{B()}),w.end()}))),C}]]);fit={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var iO=K((hMt,pae)=>{function mit(t,e){for(var r=-1,s=t==null?0:t.length,o=Array(s);++r<s;)o[r]=e(t[r],r,t);return o}pae.exports=mit});var Iae=K((dMt,hae)=>{var dae=Ph(),yit=iO(),Cit=Ec(),Iit=YE(),Eit=1/0,mae=dae?dae.prototype:void 0,yae=mae?mae.toString:void 0;function Cae(t){if(typeof t=="string")return t;if(Cit(t))return yit(t,Cae)+"";if(Iit(t))return yae?yae.call(t):"";var e=t+"";return e=="0"&&1/t==-Eit?"-0":e}hae.exports=Cae});var Ik=K((mMt,Eae)=>{var wit=Iae();function Bit(t){return t==null?"":wit(t)}Eae.exports=Bit});var sO=K((yMt,wae)=>{function Qit(t,e,r){var s=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(o);++s<o;)n[s]=t[s+e];return n}wae.exports=Qit});var Qae=K((CMt,Bae)=>{var vit=sO();function Dit(t,e,r){var s=t.length;return r=r===void 0?s:r,!e&&r>=s?t:vit(t,e,r)}Bae.exports=Dit});var oO=K((IMt,vae)=>{var kit="\\ud800-\\udfff",Sit="\\u0300-\\u036f",bit="\\ufe20-\\ufe2f",xit="\\u20d0-\\u20ff",Pit=Sit+bit+xit,Fit="\\ufe0e\\ufe0f",Rit="\\u200d",Tit=RegExp("["+Rit+kit+Pit+Fit+"]");function Nit(t){return Tit.test(t)}vae.exports=Nit});var kae=K((EMt,Dae)=>{function Mit(t){return t.split("")}Dae.exports=Mit});var Nae=K((wMt,Sae)=>{var bae="\\ud800-\\udfff",Lit="\\u0300-\\u036f",Oit="\\ufe20-\\ufe2f",Uit="\\u20d0-\\u20ff",_it=Lit+Oit+Uit,Kit="\\ufe0e\\ufe0f",Hit="["+bae+"]",aO="["+_it+"]",AO="\\ud83c[\\udffb-\\udfff]",qit="(?:"+aO+"|"+AO+")",xae="[^"+bae+"]",Pae="(?:\\ud83c[\\udde6-\\uddff]){2}",Fae="[\\ud800-\\udbff][\\udc00-\\udfff]",jit="\\u200d",Rae=qit+"?",Tae="["+Kit+"]?",Git="(?:"+jit+"(?:"+[xae,Pae,Fae].join("|")+")"+Tae+Rae+")*",Yit=Tae+Rae+Git,Wit="(?:"+[xae+aO+"?",aO,Pae,Fae,Hit].join("|")+")",Jit=RegExp(AO+"(?="+AO+")|"+Wit+Yit,"g");function zit(t){return t.match(Jit)||[]}Sae.exports=zit});var Lae=K((BMt,Mae)=>{var Vit=kae(),Xit=oO(),Zit=Nae();function $it(t){return Xit(t)?Zit(t):Vit(t)}Mae.exports=$it});var Uae=K((QMt,Oae)=>{var est=Qae(),tst=oO(),rst=Lae(),nst=Ik();function ist(t){return function(e){e=nst(e);var r=tst(e)?rst(e):void 0,s=r?r[0]:e.charAt(0),o=r?est(r,1).join(""):e.slice(1);return s[t]()+o}}Oae.exports=ist});var Kae=K((vMt,_ae)=>{var sst=Uae(),ost=sst("toUpperCase");_ae.exports=ost});var lO=K((DMt,Hae)=>{var ast=Ik(),Ast=Kae();function lst(t){return Ast(ast(t).toLowerCase())}Hae.exports=lst});var qae=K((kMt,Ek)=>{function cst(){var t=0,e=1,r=2,s=3,o=4,n=5,l=6,u=7,f=8,g=9,C=10,w=11,B=12,S=13,y=14,N=15,L=16,H=17,G=0,te=1,ce=2,me=3,Ce=4;function Se(p,Ue){return 55296<=p.charCodeAt(Ue)&&p.charCodeAt(Ue)<=56319&&56320<=p.charCodeAt(Ue+1)&&p.charCodeAt(Ue+1)<=57343}function ye(p,Ue){Ue===void 0&&(Ue=0);var De=p.charCodeAt(Ue);if(55296<=De&&De<=56319&&Ue<p.length-1){var Ee=De,fe=p.charCodeAt(Ue+1);return 56320<=fe&&fe<=57343?(Ee-55296)*1024+(fe-56320)+65536:Ee}if(56320<=De&&De<=57343&&Ue>=1){var Ee=p.charCodeAt(Ue-1),fe=De;return 55296<=Ee&&Ee<=56319?(Ee-55296)*1024+(fe-56320)+65536:fe}return De}function xe(p,Ue,De){var Ee=[p]
|
|||
|
`,end:t=>`::endgroup::
|
|||
|
`}:Bk.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
|||
|
`,end:t=>`travis_fold:end:${t}
|
|||
|
`}:Bk.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r[0K${t}
|
|||
|
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r[0K`}:null,zae=new Date,hst=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,dst=t=>t,vk=dst({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}}),mst=hst&&Object.keys(vk).find(t=>{let e=vk[t];return!(e.date&&(e.date[0]!==zae.getDate()||e.date[1]!==zae.getMonth()+1))})||"default";Tt=class extends ea{constructor({configuration:e,stdout:r,json:s=!1,includeFooter:o=!0,includeLogs:n=!s,includeInfos:l=n,includeWarnings:u=n,forgettableBufferSize:f=pst,forgettableNames:g=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;this.forgettableLines=[];if(FE(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=f,this.forgettableNames=new Set([...g,...gst]),this.includeFooter=o,this.includeInfos=l,this.includeWarnings=u,this.json=s,this.stdout=r,e.get("enableProgressBars")&&!s&&r.isTTY&&r.columns>22){let C=e.get("progressBarStyle")||mst;if(!Object.prototype.hasOwnProperty.call(vk,C))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=vk[C];let w="\u27A4 YN0000: \u250C ".length,B=Math.max(0,Math.min(r.columns-w,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*B/80)}}static async start(e,r){let s=new this(e),o=process.emitWarning;process.emitWarning=(n,l)=>{if(typeof n!="string"){let f=n;n=f.message,l=l!=null?l:f.name}let u=typeof l!="undefined"?`${l}: ${n}`:n;s.reportWarning(ke.UNNAMED,u)};try{await r(s)}catch(n){s.reportExceptionOnce(n)}finally{await s.finalize(),process.emitWarning=o}return s}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,r){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof r!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(ke.FETCH_NOT_CACHED,r)}startSectionSync({reportHeader:e,reportFooter:r,skipIfEmpty:s},o){let n={committed:!1,action:()=>{e==null||e()}};s?this.uncommitted.add(n):(n.action(),n.committed=!0);let l=Date.now();try{return o()}catch(u){throw this.reportExceptionOnce(u),u}finally{let u=Date.now();this.uncommitted.delete(n),n.committed&&(r==null||r(u-l))}}async startSectionPromise({reportHeader:e,reportFooter:r,skipIfEmpty:s},o){let n={committed:!1,action:()=>{e==null||e()}};s?this.uncommitted.add(n):(n.action(),n.committed=!0);let l=Date.now();try{return await o()}catch(u){throw this.reportExceptionOnce(u),u}finally{let u=Date.now();this.uncommitted.delete(n),n.committed&&(r==null||r(u-l))}}startTimerImpl(e,r,s){let o=typeof r=="function"?{}:r;return{cb:typeof r=="function"?r:s,reportHeader:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,Qk!==null&&!this.json&&this.includeInfos&&this.stdout.write(Qk.start(e))},reportFooter:l=>{this.indent-=1,Qk!==null&&!this.json&&this.includeInfos&&this.stdout.write(Qk.end(e)),this.configuration.get("enableTimers")&&l>200?this.reportInfo(null,`\u2514 Completed in ${gr(this.configuration,l,Kt.DURATION)}`):this.reportInfo(null,"\u2514 Completed")},skipIfEmpty:o.skipIfEmpty}}startTimerSync(e,r,s){let l=this.startTimerImpl(e,r,s),{cb:o}=l,n=an(l,["cb"]);return this.startSectionSync(n,o)}async startTimerPromise(e,r,s){let l=this.startTimerImpl(e,r,s),{cb:o}=l,n=an(l,["cb"]);return this.startSectionPromise(n,o)}async startCacheReport(e){let r=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(s){throw this.reportExceptionOnce(s),s}finally{r!==n
|
|||
|
`),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:r}={}){this.forgettableLines=[],this.writeLine(e,{truncate:r})}writeLines(e,{truncate:r}={}){this.clearProgress({delta:e.length});for(let s of e)this.stdout.write(`${this.truncate(s,{truncate:r})}
|
|||
|
`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:r}){let s=this.cacheHitCount-e,o=this.cacheMissCount-r;if(s===0&&o===0)return;let n="";this.cacheHitCount>1?n+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(n+=`, one had to be fetched (${Wr(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(n+=` - one package had to be fetched (${Wr(this.configuration,this.lastCacheMiss)})`),this.reportInfo(ke.FETCH_NOT_CACHED,n)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let r of e)r.committed=!0,r.action()}clearProgress({delta:e=0,clear:r=!1}){this.progressStyle!==null&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||r)&&this.stdout.write("[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>Jae&&(this.progressFrame=(this.progressFrame+1)%Wae.length,this.progressTime=e);let r=Wae[this.progressFrame];for(let s of this.progress.values()){let o="";if(typeof s.lastScaledSize!="undefined"){let f=this.progressStyle.chars[0].repeat(s.lastScaledSize),g=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-s.lastScaledSize);o=` ${f}${g}`}let n=this.formatName(null),l=n?`${n}: `:"",u=s.definition.title?` ${s.definition.title}`:"";this.stdout.write(`${gr(this.configuration,"\u27A4","blueBright")} ${l}${r}${o}${u}
|
|||
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Jae)}refreshProgress({delta:e=0,force:r=!1}={}){let s=!1,o=!1;if(r||this.progress.size===0)s=!0;else for(let n of this.progress.values()){let l=typeof n.definition.progress!="undefined"?Math.trunc(this.progressMaxScaledSize*n.definition.progress):void 0,u=n.lastScaledSize;n.lastScaledSize=l;let f=n.lastTitle;if(n.lastTitle=n.definition.title,l!==u||(o=f!==n.definition.title)){s=!0;break}}s&&(this.clearProgress({delta:e,clear:o}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.progressStyle===null&&(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,Yae.default)(e,0,this.stdout.columns-1)),e}formatName(e){return Vae(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return cO(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}}});var ni,uO=St(()=>{ni="4.0.0-rc.15.git.20220824.hash-a66e528"});var vn={};or(vn,{PackageManager:()=>Ta,detectPackageManager:()=>$ae,executePackageAccessibleBinary:()=>iAe,executePackageScript:()=>kk,executePackageShellcode:()=>gO,executeWorkspaceAccessibleBinary:()=>Qst,executeWorkspaceLifecycleScript:()=>nAe,executeWorkspaceScript:()=>rAe,getPackageAccessibleBinaries:()=>Sk,getWorkspaceAccessibleBinaries:()=>tAe,hasPackageScript:()=>Est,hasWorkspaceScript:()=>fO,makeScriptEnv:()=>mw,maybeExecuteWorkspaceLifecycleScript:()=>Bst,prepareExternalProject:()=>Ist});async function fg(t,e,r,s=[]){if(process.platform==="win32"){let o=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ge.writeFilePromise($.format({dir:t,name:e,ext:".cmd"}),o)}await ge.writeFilePromise($.join(t,e),`#!/bin/sh
|
|||
|
exec "${r}" ${s.map(o=>`'${o.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
|||
|
`,{mode:493})}async function $ae(t){let e=await Xt.tryFind(t);if(e==null?void 0:e.packageManager){let s=xD(e.packageManager);if(s==null?void 0:s.name){let o=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManager:Number(n)===1?Ta.Yarn1:Ta.Yarn2,reason:o};case"npm":return{packageManager:Ta.Npm,reason:o};case"pnpm":return{packageManager:Ta.Pnpm,reason:o}}}}let r;try{r=await ge.readFilePromise($.join(t,$r.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:Ta.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:Ta.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ge.existsSync($.join(t,"package-lock.json"))?{packageManager:Ta.Npm,reason:`found npm's "package-lock.json" lockfile`}:ge.existsSync($.join(t,"pnpm-lock.yaml"))?{packageManager:Ta.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function mw({project:t,locator:e,binFolder:r,lifecycleScript:s}){var f,g;let o={};for(let[C,w]of Object.entries(process.env))typeof w!="undefined"&&(o[C.toLowerCase()!=="path"?C:"PATH"]=w);let n=de.fromPortablePath(r);o.BERRY_BIN_FOLDER=de.fromPortablePath(n);let l=process.env.COREPACK_ROOT?de.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([fg(r,"node",process.execPath),...ni!==null?[fg(r,"run",process.execPath,[l,"run"]),fg(r,"yarn",process.execPath,[l]),fg(r,"yarnpkg",process.execPath,[l]),fg(r,"node-gyp",process.execPath,[l,"run","--top-level","node-gyp"])]:[]]),t&&(o.INIT_CWD=de.fromPortablePath(t.configuration.startingCwd),o.PROJECT_CWD=de.fromPortablePath(t.cwd)),o.PATH=o.PATH?`${n}${de.delimiter}${o.PATH}`:`${n}`,o.npm_execpath=`${n}${de.sep}yarn`,o.npm_node_execpath=`${n}${de.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let C=t.tryWorkspaceByLocator(e),w=C?(f=C.manifest.version)!=null?f:"":(g=t.storedPackages.get(e.locatorHash).version)!=null?g:"";o.npm_package_name=En(e),o.npm_package_version=w;let B;if(C)B=C.cwd;else{let S=t.storedPackages.get(e.locatorHash);if(!S)throw new Error(`Package for ${Wr(t.configuration,e)} not found in the project`);let y=t.configuration.getLinkers(),N={project:t,report:new Tt({stdout:new Gp.PassThrough,configuration:t.configuration})},L=y.find(H=>H.supportsPackage(S,N));if(!L)throw new Error(`The package ${Wr(t.configuration,S)} isn't supported by any of the available linkers`);B=await L.findPackageLocation(S,N)}o.npm_package_json=de.fromPortablePath($.join(B,$r.manifest))}let u=ni!==null?`yarn/${ni}`:`yarn/${$m("@yarnpkg/core").version}-core`;return o.npm_config_user_agent=`${u} npm/? node/${process.version} ${process.platform} ${process.arch}`,s&&(o.npm_lifecycle_event=s),t&&await t.configuration.triggerHook(C=>C.setupScriptEnvironment,t,o,async(C,w,B)=>await fg(r,as(C),w,B)),o}async function Ist(t,e,{configuration:r,report:s,workspace:o=null,locator:n=null}){await Cst(async()=>{await ge.mktempPromise(async l=>{let u=$.join(l,"pack.log"),f=null,{stdout:g,stderr:C}=r.getSubprocessStreams(u,{prefix:de.fromPortablePath(t),report:s}),w=n&&Dc(n)?UE(n):n,B=w?Nl(w):"an external project";g.write(`Packing ${B} from sources
|
|||
|
`);let S=await $ae(t),y;S!==null?(g.write(`Using ${S.packageManager} for bootstrap. Reason: ${S.reason}
|
|||
|
|
|||
|
`),y=S.packageManager):(g.write(`No package manager configuration detected; defaulting to Yarn
|
|||
|
|
|||
|
`),y=Ta.Yarn2),await ge.mktempPromise(async N=>{let L=await mw({binFolder:N}),G=new Map([[Ta.Yarn1,async()=>{let ce=o!==null?["workspace",o]:[],me=$.join(t,$r.manifest),Ce=await ge.readFilePromise(me),Se=await Ru(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:YA.ErrorCode});if(Se.code!==0)return Se.code;await ge.writeFilePromise(me,Ce),await ge.appendFilePromise($.join(t,".npmignore"),`/.yarn
|
|||
|
`),g.write(`
|
|||
|
`),delete L.NODE_ENV;let ye=await Ru("yarn",["install"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:YA.ErrorCode});if(ye.code!==0)return ye.code;g.write(`
|
|||
|
`);let xe=await Ru("yarn",[...ce,"pack","--filename",de.fromPortablePath(e)],{cwd:t,env:L,stdin:f,stdout:g,stderr:C});return xe.code!==0?xe.code:0}],[Ta.Yarn2,async()=>{let ce=o!==null?["workspace",o]:[];L.YARN_ENABLE_INLINE_BUILDS="1";let me=$.join(t,$r.lockfile);await ge.existsPromise(me)||await ge.writeFilePromise(me,"");let Ce=await Ru("yarn",[...ce,"pack","--install-if-needed","--filename",de.fromPortablePath(e)],{cwd:t,env:L,stdin:f,stdout:g,stderr:C});return Ce.code!==0?Ce.code:0}],[Ta.Npm,async()=>{if(o!==null){let p=new Gp.PassThrough,Ue=Zm(p);p.pipe(g,{end:!1});let De=await Ru("npm",["--version"],{cwd:t,env:L,stdin:f,stdout:p,stderr:C,end:YA.Never});if(p.end(),De.code!==0)return g.end(),C.end(),De.code;let Ee=(await Ue).toString().trim();if(!Vh(Ee,">=7.x")){let fe=xu(null,"npm"),ne=Hn(fe,Ee),Be=Hn(fe,">=7.x");throw new Error(`Workspaces aren't supported by ${ri(r,ne)}; please upgrade to ${ri(r,Be)} (npm has been detected as the primary package manager for ${gr(r,t,Kt.PATH)})`)}}let ce=o!==null?["--workspace",o]:[];delete L.npm_config_user_agent,delete L.npm_config_production,delete L.NPM_CONFIG_PRODUCTION,delete L.NODE_ENV;let me=await Ru("npm",["install"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:YA.ErrorCode});if(me.code!==0)return me.code;let Ce=new Gp.PassThrough,Se=Zm(Ce);Ce.pipe(g);let ye=await Ru("npm",["pack","--silent",...ce],{cwd:t,env:L,stdin:f,stdout:Ce,stderr:C});if(ye.code!==0)return ye.code;let xe=(await Se).toString().trim().replace(/^.*\n/s,""),Qe=$.resolve(t,de.toPortablePath(xe));return await ge.renamePromise(Qe,e),0}]]).get(y);if(typeof G=="undefined")throw new Error("Assertion failed: Unsupported workflow");let te=await G();if(!(te===0||typeof te=="undefined"))throw ge.detachTemp(l),new ar(ke.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${te}, logs can be found here: ${gr(r,u,Kt.PATH)})`)})})})}async function Est(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return fO(s,e);let o=r.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${Wr(r.configuration,t)} not found in the project`);return await kl.openPromise(async n=>{let l=r.configuration,u=r.configuration.getLinkers(),f={project:r,report:new Tt({stdout:new Gp.PassThrough,configuration:l})},g=u.find(S=>S.supportsPackage(o,f));if(!g)throw new Error(`The package ${Wr(r.configuration,o)} isn't supported by any of the available linkers`);let C=await g.findPackageLocation(o,f),w=new bn(C,{baseFs:n});return(await Xt.find(xt.dot,{baseFs:w})).scripts.has(e)},{libzip:await Ra()})}async function kk(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u}){return await ge.mktempPromise(async f=>{let{manifest:g,env:C,cwd:w}=await eAe(t,{project:o,binFolder:f,cwd:s,lifecycleScript:e}),B=g.scripts.get(e);if(typeof B=="undefined")return 1;let S=async()=>await yk(B,r,{cwd:w,env:C,stdin:n,stdout:l,stderr:u});return await(await o.configuration.reduceHook(N=>N.wrapScriptExecution,S,o,t,e,{script:B,args:r,cwd:w,env:C,stdin:n,stdout:l,stderr:u}))()})}async function gO(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u}){return await ge.mktempPromise(async f=>{let{env:g,cwd:C}=await eAe(t,{project:o,binFolder:f,cwd:s});return await yk(e,r,{cwd:C,env:g,stdin:n,stdout:l,stderr:u})})}async function wst(t,{binFolder:e,cwd:r,lifecycleScript:s}){let o=await mw({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await Promise.all(Array.from(await tAe(t),([n,[,l]])=>fg(e,as(n),process.execPath,[l]))),typeof r=="undefined"&&(r=$.dirname(await ge.realpathPromise($.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:o,cwd:r}}async function eAe(t,{project:e,binFolder:r,cwd:s,lifecycleScript:o}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return wst(n,{binFolder:r,cwd:s,lifecycleScript:o});let l=e.storedPackages.get(t.locatorHash);if(!l)throw new Error(`Package for ${Wr(e.configuration,t)} not found in the project`);return await kl.openPromise(async u=>{let f=e.configuration,g=e.configuration.getLinkers(),C={project:e,report:new Tt({stdout:new Gp.PassThrough,configuration:f})},w
|
|||
|
`,{stdout:g,stderr:C}=o.getSubprocessStreams(u,{report:s,prefix:Wr(o,t.anchoredLocator),header:f});s.reportInfo(ke.LIFECYCLE_SCRIPT,`Calling the "${e}" lifecycle script`);let w=await rAe(t,e,[],{cwd:r,stdin:n,stdout:g,stderr:C});if(g.end(),C.end(),w!==0)throw ge.detachTemp(l),new ar(ke.LIFECYCLE_SCRIPT,`${(0,Xae.default)(e)} script failed (exit code ${gr(o,w,Kt.NUMBER)}, logs can be found here: ${gr(o,u,Kt.PATH)}); run ${gr(o,`yarn ${e}`,Kt.CODE)} to investigate`)})}async function Bst(t,e,r){fO(t,e)&&await nAe(t,e,r)}async function Sk(t,{project:e}){let r=e.configuration,s=new Map,o=e.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${Wr(r,t)} not found in the project`);let n=new Gp.Writable,l=r.getLinkers(),u={project:e,report:new Tt({configuration:r,stdout:n})},f=new Set([t.locatorHash]);for(let C of o.dependencies.values()){let w=e.storedResolutions.get(C.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${ri(r,C)}) should have been registered`);f.add(w)}let g=await Promise.all(Array.from(f,async C=>{let w=e.storedPackages.get(C);if(!w)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(w.bin.size===0)return Du.skip;let B=l.find(y=>y.supportsPackage(w,u));if(!B)return Du.skip;let S=null;try{S=await B.findPackageLocation(w,u)}catch(y){if(y.code==="LOCATOR_NOT_INSTALLED")return Du.skip;throw y}return{dependency:w,packageLocation:S}}));for(let C of g){if(C===Du.skip)continue;let{dependency:w,packageLocation:B}=C;for(let[S,y]of w.bin)s.set(S,[w,de.fromPortablePath($.resolve(B,y))])}return s}async function tAe(t){return await Sk(t.anchoredLocator,{project:t.project})}async function iAe(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u,nodeArgs:f=[],packageAccessibleBinaries:g}){g!=null||(g=await Sk(t,{project:o}));let C=g.get(e);if(!C)throw new Error(`Binary not found (${e}) for ${Wr(o.configuration,t)}`);return await ge.mktempPromise(async w=>{let[,B]=C,S=await mw({project:o,locator:t,binFolder:w});await Promise.all(Array.from(g,([N,[,L]])=>fg(S.BERRY_BIN_FOLDER,as(N),process.execPath,[L])));let y;try{y=await Ru(process.execPath,[...f,B,...r],{cwd:s,env:S,stdin:n,stdout:l,stderr:u})}finally{await ge.removePromise(S.BERRY_BIN_FOLDER)}return y.code})}async function Qst(t,e,r,{cwd:s,stdin:o,stdout:n,stderr:l,packageAccessibleBinaries:u}){return await iAe(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:o,stdout:n,stderr:l,packageAccessibleBinaries:u})}var Xae,Zae,Gp,Ta,yst,Cst,pO=St(()=>{Ht();Ht();cg();Ck();Xae=He(lO()),Zae=He(wh()),Gp=He(require("stream"));cy();aA();Ol();Dk();uO();kM();vc();GA();Mp();vo();(function(o){o.Yarn1="Yarn Classic",o.Yarn2="Yarn",o.Npm="npm",o.Pnpm="pnpm"})(Ta||(Ta={}));yst=2,Cst=(0,Zae.default)(yst)});var vy=K((nLt,sAe)=>{"use strict";var oAe=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"]]),rLt=sAe.exports=t=>t?Object.keys(t).map(e=>[oAe.has(e)?oAe.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var Dy=K((iLt,aAe)=>{"use strict";var vst=require("events"),AAe=require("stream"),yw=VI(),lAe=require("string_decoder").StringDecoder,gg=Symbol("EOF"),Cw=Symbol("maybeEmitEnd"),Yp=Symbol("emittedEnd"),bk=Symbol("emittingEnd"),xk=Symbol("closed"),cAe=Symbol("read"),hO=Symbol("flush"),uAe=Symbol("flushChunk"),pA=Symbol("encoding"),pg=Symbol("decoder"),Pk=Symbol("flowing"),Iw=Symbol("paused"),Ew=Symbol("resume"),Na=Symbol("bufferLength"),fAe=Symbol("bufferPush"),dO=Symbol("bufferShift"),na=Symbol("objectMode"),ia=Symbol("destroyed"),gAe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Dst=gAe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),kst=gAe&&Symbol.iterator||Symbol("iterator not implemented"),pAe=t=>t==="end"||t==="finish"||t==="prefinish",Sst=t=>t ins
|
|||
|
`,o=Buffer.byteLength(s),n=Math.floor(Math.log(o)/Math.log(10))+1;return o+n>=Math.pow(10,n)&&(n+=1),n+o+s}};Tk.parse=(t,e,r)=>new Tk(zst(Vst(t),e),r);var zst=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,Vst=t=>t.replace(/\n$/,"").split(`
|
|||
|
`).reduce(Xst,Object.create(null)),Xst=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let s=e.split("="),o=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!o)return t;let n=s.join("=");return t[o]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(o)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};LAe.exports=Tk});var Mk=K((mLt,OAe)=>{"use strict";OAe.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit("warn",s.tarCode,r,s)):r instanceof Error?this.emit("error",Object.assign(r,s)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),s))}}});var RO=K((yLt,UAe)=>{"use strict";var Lk=["|","<",">","?",":"],FO=Lk.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Zst=new Map(Lk.map((t,e)=>[t,FO[e]])),$st=new Map(FO.map((t,e)=>[t,Lk[e]]));UAe.exports={encode:t=>Lk.reduce((e,r)=>e.split(r).join(Zst.get(r)),t),decode:t=>FO.reduce((e,r)=>e.split(r).join($st.get(r)),t)}});var KAe=K((CLt,_Ae)=>{"use strict";_Ae.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&~18),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var _O=K((QLt,HAe)=>{"use strict";var qAe=Dy(),jAe=Nk(),GAe=by(),ILt=vw(),Mu=require("fs"),xy=require("path"),ELt=Qw(),eot=16*1024*1024,YAe=Symbol("process"),WAe=Symbol("file"),JAe=Symbol("directory"),TO=Symbol("symlink"),zAe=Symbol("hardlink"),Dw=Symbol("header"),Ok=Symbol("read"),NO=Symbol("lstat"),Uk=Symbol("onlstat"),MO=Symbol("onread"),LO=Symbol("onreadlink"),OO=Symbol("openfile"),UO=Symbol("onopenfile"),sd=Symbol("close"),_k=Symbol("mode"),VAe=Mk(),tot=RO(),XAe=KAe(),Kk=VAe(class extends qAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=e,this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||eot,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=r.cwd||process.cwd(),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths&&xy.win32.isAbsolute(e)){let o=xy.win32.parse(e);this.path=e.substr(o.root.length),s=o.root}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=tot.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=r.absolute||xy.resolve(this.cwd,e),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[Uk](this.statCache.get(this.absolute)):this[NO]()}[NO](){Mu.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Uk](r)})}[Uk](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=rot(e),this.emit("stat",e),this[YAe]()}[YAe](){switch(this.type){case"File":return this[WAe]();case"Directory":return this[JAe]();case"SymbolicLink":return this[TO]();default:return this.end()}}[_k](e){return XAe(e,this.type==="Directory",this.portable)}[Dw](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new GAe({path:this.path,linkpath:this.linkpath,mode:this[_k](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&this.write(new jAe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:th
|
|||
|
`}),u},s})});var VA={};or(VA,{emitList:()=>Lat,emitTree:()=>aue,treeNodeToJson:()=>oue,treeNodeToTreeify:()=>sue});function sue(t,{configuration:e}){let r={},s=(o,n)=>{let l=Array.isArray(o)?o.entries():Object.entries(o);for(let[u,{label:f,value:g,children:C}]of l){let w=[];typeof f!="undefined"&&w.push($v(e,f,Oh.BOLD)),typeof g!="undefined"&&w.push(gr(e,g[0],g[1])),w.length===0&&w.push($v(e,`${u}`,Oh.BOLD));let B=w.join(": "),S=n[B]={};typeof C!="undefined"&&s(C,S)}};if(typeof t.children=="undefined")throw new Error("The root node must only contain children");return s(t.children,r),r}function oue(t){let e=r=>{var n;if(typeof r.children=="undefined"){if(typeof r.value=="undefined")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Uh(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries((n=r.children)!=null?n:{}),o=Array.isArray(r.children)?[]:{};for(let[l,u]of s)o[l]=e(u);return typeof r.value=="undefined"?o:{value:Uh(r.value[0],r.value[1]),children:o}};return e(t)}function Lat(t,{configuration:e,stdout:r,json:s}){let o=t.map(n=>({value:n}));aue({children:o},{configuration:e,stdout:r,json:s})}function aue(t,{configuration:e,stdout:r,json:s,separators:o=0}){var l;if(s){let u=Array.isArray(t.children)?t.children.values():Object.values((l=t.children)!=null?l:{});for(let f of u)r.write(`${JSON.stringify(oue(f))}
|
|||
|
`);return}let n=(0,iue.asTree)(sue(t,{configuration:e}),!1,!1);if(o>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
|||
|
$1`).replace(/^│\n/,"")),o>=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(o>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}var iue,Aue=St(()=>{iue=He(nue());vc()});function P4(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function Uat(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var lue,x4,Oat,en,cue=St(()=>{Ht();Ht();cg();lue=He(require("crypto")),x4=He(require("fs"));aA();Ol();Yh();GA();vo();Oat=9,en=class{constructor(e,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:o=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,lue.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=o;let n=r.get("cacheKeyOverride");if(n!==null)this.cacheKey=`${n}`;else{let l=r.get("compressionLevel"),u=l!==sh?`c${l}`:"";this.cacheKey=[Oat,u].join("")}}static async find(e,{immutable:r,check:s}={}){let o=new en(e.get("cacheFolder"),{configuration:e,immutable:r,check:s});return await o.setup(),o}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${ay(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let o=Uat(r).slice(0,10);return`${ay(e)}-${o}.zip`}getLocatorPath(e,r,s={}){var n;return this.mirrorCwd===null||((n=s.unstablePackages)==null?void 0:n.has(e.locatorHash))?$.resolve(this.cwd,this.getVersionFilename(e)):r===null||P4(r)!==this.cacheKey?null:$.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?$.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ge.existsPromise(this.cwd))throw new ar(ke.IMMUTABLE_CACHE,"Cache path does not exist.")}else{await ge.mkdirPromise(this.cwd,{recursive:!0});let e=$.resolve(this.cwd,".gitignore");await ge.changeFilePromise(e,`/.gitignore
|
|||
|
*.flock
|
|||
|
*.tmp
|
|||
|
`)}(this.mirrorCwd||!this.immutable)&&await ge.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,u){var f=u,{onHit:s,onMiss:o,loader:n}=f,l=an(f,["onHit","onMiss","loader"]);var p;let g=this.getLocatorMirrorPath(e),C=new fi,w=()=>{let Ue=new Ls(null,{libzip:me}),De=$.join(xt.root,tM(e));return Ue.mkdirSync(De,{recursive:!0}),Ue.writeJsonSync($.join(De,$r.manifest),{name:En(e),mocked:!0}),Ue},B=async(Ue,De=null)=>{var fe;if(De===null&&((fe=l.unstablePackages)==null?void 0:fe.has(e.locatorHash)))return null;let Ee=!l.skipIntegrityCheck||!r?`${this.cacheKey}/${await DD(Ue)}`:r;if(De!==null){let ne=!l.skipIntegrityCheck||!r?`${this.cacheKey}/${await DD(De)}`:r;if(Ee!==ne)throw new ar(ke.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&Ee!==r){let ne;switch(this.check?ne="throw":P4(r)!==P4(Ee)?ne="update":ne=this.configuration.get("checksumBehavior"),ne){case"ignore":return r;case"update":return Ee;default:case"throw":throw new ar(ke.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return Ee},S=async Ue=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Wr(this.configuration,e)}`);let De=await n(),Ee=De.getRealPath();return De.saveAndClose(),await ge.chmodPromise(Ee,420),await B(Ue,Ee)},y=async()=>{if(g===null||!await ge.existsPromise(g)){let Ue=await n(),De=Ue.getRealPath();return Ue.saveAndClose(),{source:"loader",path:De}}return{source:"mirror",path:g}},N=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Wr(this.configuration,e)}`);if(this.immutable)throw new ar(ke.IMMUTABLE_CACHE,`Cache entry required but missing for ${Wr(this.configuration,e)}`);let{path:Ue,source:De}=await y(),Ee=await B(Ue),fe=this.getLocatorPath(e,Ee,l);if(!fe)throw new Error("Assertion failed: Expected the cache path to be available");let ne=[];De!=="mirror"&&g!==null&&ne.push(async()=>{let Te=`${g}${this.cacheId}`;await ge.copyFilePromise(Ue,Te,x4.default.constants.COPYFILE_FICLONE),await ge.chmodPromise(Te,420),await ge.renamePromise(Te,g)}),(!l.mirrorWriteOnly||g===null)&&ne.push(async()=>{let Te=`${fe}${this.cacheId}`;await ge.copyFilePromise(Ue,Te,x4.default.constants.COPYFILE_FICLONE),await ge.chmodPromise(Te,420),await ge.renamePromise(Te,fe)});let Be=l.mirrorWriteOnly&&g!=null?g:fe;return await Promise.all(ne.map(Te=>Te())),[!1,Be,Ee]},L=async()=>{let De=(async()=>{var Qt;let Ee=this.getLocatorPath(e,r,l),fe=Ee!==null?this.markedFiles.has(Ee)||await C.existsPromise(Ee):!1,ne=!!((Qt=l.mockedPackages)==null?void 0:Qt.has(e.locatorHash))&&(!this.check||!fe),Be=ne||fe,Te=Be?s:o;if(Te&&Te(),Be){let _=null,Ge=Ee;return ne||(_=this.check?await S(Ge):await B(Ge)),[ne,Ge,_]}else return N()})();this.mutexes.set(e.locatorHash,De);try{return await De}finally{this.mutexes.delete(e.locatorHash)}};for(let Ue;Ue=this.mutexes.get(e.locatorHash);)await Ue;let[H,G,te]=await L();H||this.markedFiles.add(G);let ce,me=await Ra(),Ce=H?()=>w():()=>new Ls(G,{baseFs:C,libzip:me,readOnly:!0}),Se=new BI(()=>RT(()=>ce=Ce(),Ue=>`Failed to open the cache entry for ${Wr(this.configuration,e)}: ${Ue}`),$),ye=new Hf(G,{baseFs:Se,pathUtils:$}),xe=()=>{ce==null||ce.discardAndClose()},Qe=((p=l.unstablePackages)==null?void 0:p.has(e.locatorHash))?null:te;return[ye,xe,Qe]}}});var XA,F4=St(()=>{(function(r){r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE"})(XA||(XA={}))});var Cg,uue=St(()=>{Ol();Dk();vc();Cg=class extends ea{constructor({configuration:e,stdout:r,suggestInstall:s=!0}){super();this.errorCount=0;FE(this,{configuration:e}),this.configuration=e,this.stdout=r,this.suggestInstall=s}static async start(e,r){let s=new this(e);try{await r(s)}catch(o){s.reportExceptionOnce(o)}finally{await s.finalize()}return s}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r=="function"?r:s)()}async startTimerPro
|
|||
|
`)}reportProgress(e){let r=Promise.resolve().then(async()=>{for await(let{}of e);}),s=()=>{};return Me(re({},r),{stop:s})}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
|||
|
`),this.stdout.write(`${gr(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
|||
|
`),this.suggestInstall&&this.stdout.write(`${gr(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
|||
|
`))}formatNameWithHyperlink(e){return cO(e,{configuration:this.configuration,json:!1})}}});function Ig(){}function _at(t,e,r,s,o){for(var n=0,l=e.length,u=0,f=0;n<l;n++){var g=e[n];if(g.removed){if(g.value=t.join(s.slice(f,f+g.count)),f+=g.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!g.added&&o){var C=r.slice(u,u+g.count);C=C.map(function(S,y){var N=s[f+y];return N.length>S.length?N:S}),g.value=t.join(C)}else g.value=t.join(r.slice(u,u+g.count));u+=g.count,g.added||(f+=g.count)}}var B=e[l-1];return l>1&&typeof B.value=="string"&&(B.added||B.removed)&&t.equals("",B.value)&&(e[l-2].value+=B.value,e.pop()),e}function Kat(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Hat(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function pue(t,e,r){return r=Hat(r,{ignoreWhitespace:!0}),R4.diff(t,e,r)}function qat(t,e,r){return T4.diff(t,e,r)}function mS(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mS=function(e){return typeof e}:mS=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mS(t)}function N4(t){return Yat(t)||Wat(t)||Jat(t)||zat()}function Yat(t){if(Array.isArray(t))return M4(t)}function Wat(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function Jat(t,e){if(!!t){if(typeof t=="string")return M4(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M4(t,e)}}function M4(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function zat(){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 L4(t,e,r,s,o){e=e||[],r=r||[],s&&(t=s(o,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var l;if(Vat.call(t)==="[object Array]"){for(e.push(t),l=new Array(t.length),r.push(l),n=0;n<t.length;n+=1)l[n]=L4(t[n],e,r,s,o);return e.pop(),r.pop(),l}if(t&&t.toJSON&&(t=t.toJSON()),mS(t)==="object"&&t!==null){e.push(t),l={},r.push(l);var u=[],f;for(f in t)t.hasOwnProperty(f)&&u.push(f);for(u.sort(),n=0;n<u.length;n+=1)f=u[n],l[f]=L4(t[f],e,r,s,f);e.pop(),r.pop()}else l=t;return l}function hue(t,e,r,s,o,n,l){l||(l={}),typeof l.context=="undefined"&&(l.context=4);var u=qat(r,s,l);if(!u)return;u.push({value:"",lines:[]});function f(H){return H.map(function(G){return" "+G})}for(var g=[],C=0,w=0,B=[],S=1,y=1,N=function(G){var te=u[G],ce=te.lines||te.value.replace(/\n$/,"").split(`
|
|||
|
`);if(te.lines=ce,te.added||te.removed){var me;if(!C){var Ce=u[G-1];C=S,w=y,Ce&&(B=l.context>0?f(Ce.lines.slice(-l.context)):[],C-=B.length,w-=B.length)}(me=B).push.apply(me,N4(ce.map(function(Ee){return(te.added?"+":"-")+Ee}))),te.added?y+=ce.length:S+=ce.length}else{if(C)if(ce.length<=l.context*2&&G<u.length-2){var Se;(Se=B).push.apply(Se,N4(f(ce)))}else{var ye,xe=Math.min(ce.length,l.context);(ye=B).push.apply(ye,N4(f(ce.slice(0,xe))));var Qe={oldStart:C,oldLines:S-C+xe,newStart:w,newLines:y-w+xe,lines:B};if(G>=u.length-2&&ce.length<=l.context){var p=/\n$/.test(r),Ue=/\n$/.test(s),De=ce.length==0&&B.length>Qe.oldLines;!p&&De&&r.length>0&&B.splice(Qe.oldLines,0,"\\ No newline at end of file"),(!p&&!De||!Ue)&&B.push("\\ No newline at end of file")}g.push(Qe),C=0,w=0,B=[]}S+=ce.length,y+=ce.length}},L=0;L<u.length;L++)N(L);return{oldFileName:t,newFileName:e,oldHeader:o,newHeader:n,hunks:g}}var OOt,fue,gue,R4,T4,jat,Gat,Vat,Mw,O4,U4=St(()=>{Ig.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=s.callback;typeof s=="function"&&(o=s,s={}),this.options=s;var n=this;function l(N){return o?(setTimeout(function(){o(void 0,N)},0),!0):N}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var u=r.length,f=e.length,g=1,C=u+f;s.maxEditLength&&(C=Math.min(C,s.maxEditLength));var w=[{newPos:-1,components:[]}],B=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=u&&B+1>=f)return l([{value:this.join(r),count:r.length}]);function S(){for(var N=-1*g;N<=g;N+=2){var L=void 0,H=w[N-1],G=w[N+1],te=(G?G.newPos:0)-N;H&&(w[N-1]=void 0);var ce=H&&H.newPos+1<u,me=G&&0<=te&&te<f;if(!ce&&!me){w[N]=void 0;continue}if(!ce||me&&H.newPos<G.newPos?(L=Kat(G),n.pushComponent(L.components,void 0,!0)):(L=H,L.newPos++,n.pushComponent(L.components,!0,void 0)),te=n.extractCommon(L,r,e,N),L.newPos+1>=u&&te+1>=f)return l(_at(n,L.components,r,e,n.useLongestToken));w[N]=L}g++}if(o)(function N(){setTimeout(function(){if(g>C)return o();S()||N()},0)})();else for(;g<=C;){var y=S();if(y)return y}},pushComponent:function(e,r,s){var o=e[e.length-1];o&&o.added===r&&o.removed===s?e[e.length-1]={count:o.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,o){for(var n=r.length,l=s.length,u=e.newPos,f=u-o,g=0;u+1<n&&f+1<l&&this.equals(r[u+1],s[f+1]);)u++,f++,g++;return g&&e.components.push({count:g}),e.newPos=u,f},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};OOt=new Ig;fue=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,gue=/\S/,R4=new Ig;R4.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!gue.test(t)&&!gue.test(e)};R4.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&fue.test(e[r])&&fue.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};T4=new Ig;T4.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var o=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),e.push(o))}return e};jat=new Ig;jat.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};Gat=new Ig;Gat.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Vat=Object.prototype.toString,Mw=new Ig;Mw.useLongestToken=!0;Mw.tokenize=T4.tokenize;Mw.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,o=s===void 0?function(n,l){return typeof l=="undefined"?r:l}:s;return typeof t=="string"?t:JSON.stringify(L4(t,null,null,o),o," ")};Mw.equals=function(t,e){return Ig.prototype.equals.call(Mw,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};O4=new Ig;O4.tokenize=function(t){r
|
|||
|
`;await ge.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function clt({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:o=new Set,optionalBuilds:n=new Set,peerRequirements:l=new Map,volatileDescriptors:u=new Set,report:f,tolerateMissingPackages:g=!1}){var xe;let C=new Map,w=[],B=new Map,S=new Map,y=new Map,N=new Map,L=new Map,H=new Map(t.workspaces.map(Qe=>{let p=Qe.anchoredLocator.locatorHash,Ue=s.get(p);if(typeof Ue=="undefined"){if(g)return[p,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[p,LE(Ue)]})),G=()=>{let Qe=ge.mktempSync(),p=$.join(Qe,"stacktrace.log"),Ue=String(w.length+1).length,De=w.map((Ee,fe)=>`${`${fe+1}.`.padStart(Ue," ")} ${Nl(Ee)}
|
|||
|
`).join("");throw ge.writeFileSync(p,De),ge.detachTemp(Qe),new ar(ke.STACK_OVERFLOW_RESOLUTION,`Encountered a stack overflow when resolving peer dependencies; cf ${de.fromPortablePath(p)}`)},te=Qe=>{let p=r.get(Qe.descriptorHash);if(typeof p=="undefined")throw new Error("Assertion failed: The resolution should have been registered");let Ue=s.get(p);if(!Ue)throw new Error("Assertion failed: The package could not be found");return Ue},ce=(Qe,p,Ue,{top:De,optional:Ee})=>{w.length>1e3&&G(),w.push(p);let fe=me(Qe,p,Ue,{top:De,optional:Ee});return w.pop(),fe},me=(Qe,p,Ue,{top:De,optional:Ee})=>{if(o.has(p.locatorHash))return;o.add(p.locatorHash),Ee||n.delete(p.locatorHash);let fe=s.get(p.locatorHash);if(!fe){if(g)return;throw new Error(`Assertion failed: The package (${Wr(t.configuration,p)}) should have been registered`)}let ne=[],Be=[],Te=[],Qt=[],_=[];for(let rt of Array.from(fe.dependencies.values())){if(fe.peerDependencies.has(rt.identHash)&&fe.locatorHash!==De)continue;if(ng(rt))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");u.delete(rt.descriptorHash);let Ye=Ee;if(!Ye){let I=fe.dependenciesMeta.get(En(rt));if(typeof I!="undefined"){let D=I.get(null);typeof D!="undefined"&&D.optional&&(Ye=!0)}}let Re=r.get(rt.descriptorHash);if(!Re){if(g)continue;throw new Error(`Assertion failed: The resolution (${ri(t.configuration,rt)}) should have been registered`)}let yt=H.get(Re)||s.get(Re);if(!yt)throw new Error(`Assertion failed: The package (${Re}, resolved from ${ri(t.configuration,rt)}) should have been registered`);if(yt.peerDependencies.size===0){ce(rt,yt,new Map,{top:De,optional:Ye});continue}let nt,Ze,$e=new Set,k;Be.push(()=>{nt=XN(rt,p.locatorHash),Ze=ZN(yt,p.locatorHash),fe.dependencies.delete(rt.identHash),fe.dependencies.set(nt.identHash,nt),r.set(nt.descriptorHash,Ze.locatorHash),e.set(nt.descriptorHash,nt),s.set(Ze.locatorHash,Ze),ne.push([yt,nt,Ze])}),Te.push(()=>{var I;k=new Map;for(let D of Ze.peerDependencies.values()){let m=fe.dependencies.get(D.identHash);if(!m&&_E(p,D)&&(Qe.identHash===p.identHash?m=Qe:(m=Hn(p,Qe.range),e.set(m.descriptorHash,m),r.set(m.descriptorHash,p.locatorHash),u.delete(m.descriptorHash))),(!m||m.range==="missing:")&&Ze.dependencies.has(D.identHash)){Ze.peerDependencies.delete(D.identHash);continue}m||(m=Hn(D,"missing:")),Ze.dependencies.set(m.identHash,m),ng(m)&&Nh(y,m.descriptorHash).add(Ze.locatorHash),B.set(m.identHash,m),m.range==="missing:"&&$e.add(m.identHash),k.set(D.identHash,(I=Ue.get(D.identHash))!=null?I:Ze.locatorHash)}Ze.dependencies=new Map(lA(Ze.dependencies,([D,m])=>En(m)))}),Qt.push(()=>{if(!s.has(Ze.locatorHash))return;let I=C.get(yt.locatorHash);typeof I=="number"&&I>=2&&G();let D=C.get(yt.locatorHash),m=typeof D!="undefined"?D+1:1;C.set(yt.locatorHash,m),ce(nt,Ze,k,{top:De,optional:Ye}),C.set(yt.locatorHash,m-1)}),_.push(()=>{let I=fe.dependencies.get(rt.identHash);if(typeof I=="undefined")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let D=r.get(I.descriptorHash);if(typeof D=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");if(Nh(L,D).add(p.locatorHash),!!s.has(Ze.locatorHash)){for(let m of Ze.peerDependencies.values()){let F=k.get(m.identHash);if(typeof F=="undefined")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");zm(Vm(N,F),En(m)).push(Ze.locatorHash)}for(let m of $e)Ze.dependencies.delete(m)}})}for(let rt of[...Be,...Te])rt();let Ge;do{Ge=!0;for(let[rt,Ye,Re]of ne){let yt=Vm(S,rt.locatorHash),nt=xa(...[...Re.dependencies.values()].map(I=>{let D=I.range!=="missing:"?r.get(I.descriptorHash):"missing:";if(typeof D=="undefined")throw new Error(`Assertion failed: Expected the resolution for ${ri(t.configuration,I)} to have been registered`);return D===De?`${D} (top)`:D}),Ye.identHash),Ze=yt.get(nt);if(typeof Ze=="undefined"){yt.set(nt,Ye);continue}if(Ze===Ye)continue;s.delete(Re.locatorHash),e.delete(Ye.descriptorHash),r.delete(Ye.descriptorHash),o.delete(Re.locatorHash)
|
|||
|
|
|||
|
${[w,B,S].join(`
|
|||
|
`)}`)}async setupResolutions(){var s;this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=$.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(ge.existsSync(e)){let o=await ge.readFilePromise(e,"utf8");this.lockFileChecksum=sfe(o);let n=ls(o);if(n.__metadata){let l=n.__metadata.version,u=n.__metadata.cacheKey;this.lockfileNeedsRefresh=l<nfe;for(let f of Object.keys(n)){if(f==="__metadata")continue;let g=n[f];if(typeof g.resolution=="undefined")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let C=Wh(g.resolution,!0),w=new Xt;w.load(g,{yamlCompatibilityMode:!0});let B=w.version,S=w.languageName||r,y=g.linkType.toUpperCase(),N=(s=g.conditions)!=null?s:null,L=w.dependencies,H=w.peerDependencies,G=w.dependenciesMeta,te=w.peerDependenciesMeta,ce=w.bin;if(g.checksum!=null){let Ce=typeof u!="undefined"&&!g.checksum.includes("/")?`${u}/${g.checksum}`:g.checksum;this.storedChecksums.set(C.locatorHash,Ce)}let me=Me(re({},C),{version:B,languageName:S,linkType:y,conditions:N,dependencies:L,peerDependencies:H,dependenciesMeta:G,peerDependenciesMeta:te,bin:ce});this.originalPackages.set(me.locatorHash,me);for(let Ce of f.split(olt)){let Se=Np(Ce);l<=6&&(Se=this.configuration.normalizeDependency(Se),Se=Hn(Se,Se.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(Se.descriptorHash,Se),this.storedResolutions.set(Se.descriptorHash,C.locatorHash)}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){let r=e;e=[];for(let s of r){if(this.workspacesByCwd.has(s))continue;let o=await this.addWorkspace(s);for(let n of o.workspacesCwds)e.push(n)}}}async addWorkspace(e){let r=new Ow(e,{project:this});await r.setup();let s=this.workspacesByIdent.get(r.locator.identHash);if(typeof s!="undefined")throw new Error(`Duplicate workspace name ${_s(this.configuration,r.locator)}: ${de.fromPortablePath(e)} conflicts with ${de.fromPortablePath(s.cwd)}`);return this.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){$.isAbsolute(e)||(e=$.resolve(this.cwd,e)),e=$.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)$.relative(s.cwd,e).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r=="undefined"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${_s(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){let r=this.tryWorkspaceByIdent(e);return r===null||(ng(e)&&(e=OE(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ri(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Dc(e)&&(e=UE(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Wr(this.configuration,e)})`);return r}refreshWorkspaceDependencies(){for(let e of this.workspaces){let r=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!r)throw new Error(`Assertion failed: Expected workspace ${jE(this.configuration,e)} (${gr(this.configuration,$.join(e.cwd,$r.manifest),Kt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);e.dependencies=new Map(r.de
|
|||
|
`;switch(rt){case XA.SCRIPT:Re+=`# Script name: ${Ye}
|
|||
|
`;break;case XA.SHELLCODE:Re+=`# Script code: ${Ye}
|
|||
|
`;break}let yt=null;if(!await ge.mktempPromise(async Ze=>{let $e=$.join(Ze,"build.log"),{stdout:k,stderr:I}=this.configuration.getSubprocessStreams($e,{header:Re,prefix:Wr(this.configuration,Be),report:r}),D;try{switch(rt){case XA.SCRIPT:D=await kk(Be,Ye,[],{cwd:Ge,project:this,stdin:yt,stdout:k,stderr:I});break;case XA.SHELLCODE:D=await gO(Be,Ye,[],{cwd:Ge,project:this,stdin:yt,stdout:k,stderr:I});break}}catch(F){I.write(F.stack),D=1}if(k.end(),I.end(),D===0)return xe.set(Be.locatorHash,_),!0;ge.detachTemp(Ze);let m=`${Wr(this.configuration,Be)} couldn't be built successfully (exit code ${gr(this.configuration,D,Kt.NUMBER)}, logs can be found here: ${gr(this.configuration,$e,Kt.PATH)})`;return this.optionalBuilds.has(Be.locatorHash)?(r.reportInfo(ke.BUILD_FAILED,m),xe.set(Be.locatorHash,_),!0):(r.reportError(ke.BUILD_FAILED,m),!1)}))return}})())}}if(await wc(fe),Ee===te.size){let ne=Array.from(te).map(Be=>{let Te=this.storedPackages.get(Be);if(!Te)throw new Error("Assertion failed: The package should have been registered");return Wr(this.configuration,Te)}).join(", ");r.reportError(ke.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ne})`);break}}this.storedBuildState=xe}async install(e){var u,f;let r=this.configuration.get("nodeLinker");(u=st.telemetry)==null||u.reportInstall(r),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(g=>g.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let g of this.configuration.packageExtensions.values())for(let[,C]of g)for(let w of C)w.status=$o.Inactive;let s=$.join(this.cwd,this.configuration.get("lockfileFilename")),o=null;if(e.immutable)try{o=await ge.readFilePromise(s,"utf8")}catch(g){throw g.code==="ENOENT"?new ar(ke.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):g}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,g]of this.configuration.packageExtensions)for(let[,C]of g)for(let w of C)if(w.userProvided){let B=gr(this.configuration,w,Kt.PACKAGE_EXTENSION);switch(w.status){case $o.Inactive:e.report.reportWarning(ke.UNUSED_PACKAGE_EXTENSION,`${B}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case $o.Redundant:e.report.reportWarning(ke.REDUNDANT_PACKAGE_EXTENSION,`${B}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(o!==null){let g=th(o,this.generateLockfile());if(g!==o){let C=hue(s,s,o,g,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let w of C.hunks){e.report.reportInfo(null,`@@ -${w.oldStart},${w.oldLines} +${w.newStart},${w.newLines} @@`);for(let B of w.lines)B.startsWith("+")?e.report.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,gr(this.configuration,B,Kt.ADDED)):B.startsWith("-")?e.report.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,gr(this.configuration,B,Kt.REMOVED)):e.report.reportInfo(null,gr(this.configuration,B,"grey"))}e.report.reportSeparator()}throw new ar(ke.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let g of this.configuration.packageExtensions.values())for(let[,C]of g)for(let w of C)w.userProvided&&w.status===$o.Active&&((f=st.telemetry)==null||f.reportPackageExtension(Uh(w,Kt.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject=="undefined"||e.persistProject)&&e.mode!==qs.UpdateLockfile&&await this.cacheCleanup(e)});let n=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],l=await Promise.all(n.map(async g=>kD(g,{cwd:this.cwd})));(typeof e.persistProject=="undefined"||e.persistProject
|
|||
|
`,`# Manual changes might be lost - proceed with caution!
|
|||
|
`].join("")}
|
|||
|
`+sA(r)}async persistLockfile(){let e=$.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await ge.readFilePromise(e,"utf8")}catch(n){}let s=this.generateLockfile(),o=th(r,s);o!==r&&(await ge.writeFilePromise(e,o),this.lockFileChecksum=sfe(o),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let l of Object.values(Z4))e.push(...l);let r=(0,IS.default)(this,e),s=V4.default.serialize(r),o=xa(s);if(this.installStateChecksum===o)return;let n=this.configuration.get("installStatePath");await ge.mkdirPromise($.dirname(n),{recursive:!0}),await ge.writeFilePromise(n,await Alt(s)),this.installStateChecksum=o}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let o=this.configuration.get("installStatePath"),n;try{let l=await llt(await ge.readFilePromise(o));n=V4.default.deserialize(l),this.installStateChecksum=xa(l)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData!="undefined"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,(0,IS.default)(n,Z4.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,IS.default)(n,Z4.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new fs}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return;let s=new Set([".gitignore"]);if(!fM(e.cwd,this.cwd)||!await ge.existsPromise(e.cwd))return;let o=this.configuration.get("preferAggregateCacheInfo"),n=0,l=null;for(let u of await ge.readdirPromise(e.cwd)){if(s.has(u))continue;let f=$.resolve(e.cwd,u);e.markedFiles.has(f)||(l=u,e.immutable?r.reportError(ke.IMMUTABLE_CACHE,`${gr(this.configuration,$.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(o?n+=1:r.reportInfo(ke.UNUSED_CACHE_ENTRY,`${gr(this.configuration,$.basename(f),"magenta")} appears to be unused - removing`),await ge.removePromise(f)))}o&&n!==0&&r.reportInfo(ke.UNUSED_CACHE_ENTRY,n>1?`${n} packages appeared to be unused and were removed`:`${l} appeared to be unused and was removed`)}}});var Ku,Uw,afe=St(()=>{Ht();Yh();JL();GA();(function(f){f.VERSION="version",f.COMMAND_NAME="commandName",f.PLUGIN_NAME="pluginName",f.INSTALL_COUNT="installCount",f.PROJECT_COUNT="projectCount",f.WORKSPACE_COUNT="workspaceCount",f.DEPENDENCY_COUNT="dependencyCount",f.EXTENSION="packageExtension"})(Ku||(Ku={}));Uw=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let s=this.getRegistryPath();this.isNew=!ge.existsSync(s),this.sendReport(r),this.startBuffer()}reportVersion(e){this.reportValue(Ku.VERSION,e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue(Ku.COMMAND_NAME,e||"<none>")}reportPluginName(e){this.reportValue(Ku.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(Ku.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(Ku.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(Ku.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(Ku.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(Ku.DEPENDENCY_COUNT,String(e))}reportValue(e,r){Nh(this.values,e).add(r)}reportEnumerator(e,r){Nh(this.enumerators,e).add(xa(r))}reportHit(e,r="*"){let s=Vm(this.hits,e),o=Xf(s,r,()=>0);s.set(r,o+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return $.join(e,"telemetry.json")}sendReport(e){var C,w,B;let r=this.getRegistryPath(),s;try{s=ge.readJsonSync(r)}catch{s={}}let o=Date.now(),n=this.configuration.get("telemetryInterval")*24*60*60*1e3,u=((C=s.lastUpdate)!=null?C:o+n+Math.floor(n*Math.random()))+n;if(u>o&&s.lastUpdate!=null)return;try{ge.mkdirSync($.dirname(r),{recursive:!0}),ge.writeJsonSync(r,{lastUpdate:o})}catch{return}if(u>o||!s.blocks)return;let f=`https://b
|
|||
|
`),g=l.length;for(g>0&&l.includes("unstyle")&&(l=[...new Set(["unstyle",...l])].reverse());g-- >0;)u=r(t.styles[l[g]],u,f);return u},o=(n,l,u)=>{t.styles[n]=e({name:n,codes:l}),(t.keys[u]||(t.keys[u]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(g){t.alias(n,g)},get(){let g=C=>s(C,g.stack);return Reflect.setPrototypeOf(g,t),g.stack=this.stack?this.stack.concat(n):[n],g}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=dlt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,l)=>{let u=typeof l=="string"?t[l]:l;if(typeof u!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");u.stack||(Reflect.defineProperty(u,"name",{value:n}),t.styles[n]=u,u.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(f){t.alias(n,f)},get(){let f=g=>s(g,f.stack);return Reflect.setPrototypeOf(f,t),f.stack=this.stack?this.stack.concat(u.stack):u.stack,f}})},t.theme=n=>{if(!hlt(n))throw new TypeError("Expected theme to be an object");for(let l of Object.keys(n))t.alias(l,n[l]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=gfe(),t.define=o,t};rU.exports=pfe();rU.exports.create=pfe});var sa=K(mn=>{"use strict";var mlt=Object.prototype.toString,zl=bc(),hfe=!1,nU=[],dfe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};mn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);mn.hasColor=t=>!!t&&zl.hasColor(t);var BS=mn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);mn.nativeType=t=>mlt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");mn.isAsyncFn=t=>mn.nativeType(t)==="asyncfunction";mn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";mn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;mn.scrollDown=(t=[])=>[...t.slice(1),t[0]];mn.scrollUp=(t=[])=>[t.pop(),...t];mn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};mn.swap=(t,e,r)=>{let s=t.length,o=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[o],t[o]=n};mn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};mn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};mn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:s=`
|
|||
|
`+r,width:o=80}=e;o-=((s+r).match(/[^\S\n]/g)||[]).length;let l=`.{1,${o}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,u=t.trim(),f=new RegExp(l,"g"),g=u.match(f)||[];return g=g.map(C=>C.replace(/\n$/,"")),e.padEnd&&(g=g.map(C=>C.padEnd(o," "))),e.padStart&&(g=g.map(C=>C.padStart(o," "))),r+g.join(s)};mn.unmute=t=>{let e=t.stack.find(s=>zl.keys.color.includes(s));return e?zl[e]:t.stack.find(s=>s.slice(2)==="bg")?zl[e.slice(2)]:s=>s};mn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";mn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>zl.keys.color.includes(s));if(e){let s=zl["bg"+mn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)==="bg");return r?zl[r.slice(2).toLowerCase()]||t:zl.none};mn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>zl.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)==="bg");if(e&&!r)return zl[dfe[e]||e];if(r){let s=r.slice(2).toLowerCase(),o=dfe[s];return o&&zl["bg"+mn.pascal(o)]||t}return zl.none};mn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?"pm":"am";e=e%12;let o=e===0?12:e,n=r<10?"0"+r:r;return o+":"+n+" "+s};mn.set=(t={},e="",r)=>e.split(".").reduce((s,o,n,l)=>{let u=l.length-1>n?s[o]||{}:r;return!mn.isObject(u)&&n<l.length-1&&(u={}),s[o]=u},t);mn.get=(t={},e="",r)=>{let s=t[e]==null?e.split(".").reduce((o,n)=>o&&o[n],t):t[e];return s==null?r:s};mn.mixin=(t,e)=>{if(!BS(t))return e;if(!BS(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&BS(s.value)){let o=Object.getOwnPropertyDescriptor(t,r);BS(o.value)?t[r]=mn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};mn.merge=(...t)=>{let e={};for(let r of t)mn.mixin(e,r);return e};mn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let o=r[s];typeof o=="function"?mn.define(t,s,o.bind(e)):mn.define(t,s,o)}};mn.onExit=t=>{let e=(r,s)=>{hfe||(hfe=!0,nU.forEach(o=>o()),r===!0&&process.exit(128+s))};nU.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),nU.push(t)};mn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};mn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(o){s=o},get(){return s?s():r()}})}});var mfe=K(Yy=>{"use strict";Yy.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"};Yy.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};Yy.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};Yy.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};Yy.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 Ife=K((g3t,yfe)=>{"use strict";var Cfe=require("readline"),ylt=mfe(),Clt=/^(?:\x1b)([a-zA-Z0-9])$/,Ilt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Elt={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
|
|||
|
`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x7F"||t==="\b")s.name="backspace",s.meta=t.charAt(0)==="";else if(t===""||t==="")s.name="escape",s.meta=t.length===2;else if(t===" "||t===" ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=Clt.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Ilt.exec(t)){let o=[...t];o[0]===""&&o[1]===""&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),l=(r[3]||r[5]||1)-1;s.ctrl=!!(l&4),s.meta=!!(l&10),s.shift=!!(l&1),s.code=n,s.name=Elt[n],s.shift=wlt(n)||s.shift,s.ctrl=Blt(n)||s.ctrl}return s};QS.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=Cfe.createInterface({terminal:!0,input:r});Cfe.emitKeypressEvents(r,s);let o=(u,f)=>e(u,QS(u,f),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",o),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",o),s.pause(),s.close()}};QS.action=(t,e,r)=>{let s=re(re({},ylt),r);return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};yfe.exports=QS});var wfe=K((p3t,Efe)=>{"use strict";Efe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),Qlt(t,r,s)}};function Qlt(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},o=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},o);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),t.once("close",()=>s.stop()),s.stop}});var vfe=K((h3t,Bfe)=>{"use strict";var{define:vlt,width:Dlt}=sa(),Qfe=class{constructor(e){let r=e.options;vlt(this,"_prompt",e),this.type=e.type,this.name=e.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=Dlt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e=re({},this);return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};Bfe.exports=Qfe});var kfe=K((d3t,Dfe)=>{"use strict";var iU=sa(),ko=bc(),sU={default:ko.noop,noop:ko.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||iU.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||iU.complement(this.primary)},primary:ko.cyan,success:ko.green,danger:ko.magenta,strong:ko.bold,warning:ko.yellow,muted:ko.dim,disabled:ko.gray,dark:ko.dim.gray,underline:ko.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typ
|
|||
|
`),g=f[0],C=f[f.length-1],B=(s+(r?" "+r:"")).length,S=B<g.length?g.slice(B+1):"";return{header:l,prompt:g,after:S,rest:f.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 e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
|||
|
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.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(e){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(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(md.cursor.down(e.rest.length)),this.write(`
|
|||
|
`.repeat(r))}catch(e){}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=uU.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:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let o=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await o(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(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,s){let{options:o,state:n,symbols:l,timers:u}=this,f=u&&u[e];n.timer=f;let g=o[e]||n[e]||l[e],C=r&&r[e]!=null?r[e]:await g;if(C==="")return C;let w=await this.resolve(C,n,r,s);return!w&&r&&r[e]?this.resolve(g,n,r,s):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,dA.isObject(e)&&(e=e[s.status]||e.pending),dA.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return dA.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let o=e[s.status]||e.pending||s.separator,n=await this.resolve(o,s);return dA.isObject(n)&&(n=n[s.status]||n.pending),dA.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&dA.hasColor(s))return s;if(s){let o=this.styles,n=this.index===r,l=n?o.primary:g=>g,u=await this.resolve(s[n?"on":"off"]||s,this.state),f=dA.hasColor(u)?u:l(u);return n?f:" ".repeat(u.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&dA.hasColor(s))return s;if(s){let o=this.styles,n=e.enabled===!0,l=n?o.success:o.dark,u=s[n?"on":"off"]||s;return dA.hasColor(u)?u:l(u)}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 e=await this.element("hint");return dA.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return dA.resolve(this,e,...r)}get base(){return vS.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||dA.height(this.stdout,25)}get width(){return this.options.columns||dA.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function Mlt(t){let e=o=>t[o]===void 0||typeof t[o]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let o of Object.keys(t.options)){if(r.includes(o)||/^on[A-Z]/.test(o))continue;let n=t.options[o];typeof n=="function"&&e(o)?s.includes(o)||(t[o]=n.bind(t)):typeof t[o]!="function"&&(t[o]=n)}}function Llt(t
|
|||
|
`:" ",s=[];for(let o=0;o<4;o++){let n=r(o);e[o]?s.push(n.repeat(e[o])):s.push("")}return s}Lfe.exports=vS});var Kfe=K((I3t,Ufe)=>{"use strict";var Olt=sa(),_fe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return _fe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};Ufe.exports=(t,e={})=>{let r=Olt.merge({},_fe,e.roles);return r[t]||r.default}});var qw=K((E3t,Hfe)=>{"use strict";var Ult=bc(),_lt=Wy(),Klt=Kfe(),DS=sa(),{reorder:fU,scrollUp:Hlt,scrollDown:qlt,isObject:qfe,swap:jlt}=DS,jfe=class extends _lt{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||Infinity,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.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:e,initial:r,autofocus:s,suggest:o}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof o!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");qfe(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],o=0,n=async(l,u)=>{typeof l=="function"&&(l=await l.call(this)),l instanceof Promise&&(l=await l);for(let f=0;f<l.length;f++){let g=l[f]=await this.toChoice(l[f],o++,u);s.push(g),g.choices&&await n(g.choices,g)}return s};return n(e,r).then(l=>(this.state.loadingChoices=!1,l))}async toChoice(e,r,s){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let o=e.value;if(e=Klt(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,DS.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Ult.unstyle(e.message).length));let l=re({},e);return e.reset=(u=l.input,f=l.value)=>{for(let g of Object.keys(l))e[g]=l[g];e.input=u,e.value=f},o==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let o=await this.toChoice(e,r,s);return this.choices.push(o),this.index=this.choices.length-1,this.limit=this.choices.length,o}async newItem(e,r,s){let o=re({name:"New choice name?",editable:!0,newChoice:!0},e),n=await this.addChoice(o,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,
|
|||
|
`),o;return this.options.choicesHeader&&(o=await this.resolve(this.options.choicesHeader,this.state)),[o,s].filter(Boolean).join(`
|
|||
|
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s="",o=await this.header(),n=await this.prefix(),l=await this.separator(),u=await this.message();this.options.promptLine!==!1&&(s=[n,u,l,""].join(" "),this.state.prompt=s);let f=await this.format(),g=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();f&&(s+=f),g&&!s.includes(g)&&(s+=" "+g),e&&!f&&!C.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([o,s,C,w].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};Yfe.exports=Wfe});var Vfe=K((B3t,Jfe)=>{"use strict";var Ylt=s0(),Wlt=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),l=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+l+s.slice(n+r.length):s}},zfe=class extends Ylt{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}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(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(o=>o.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Wlt(this.input,e),s=this.choices;this.choices=s.map(o=>Me(re({},o),{message:r(o.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Jfe.exports=zfe});var hU=K((Q3t,Xfe)=>{"use strict";var pU=sa();Xfe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:o,showCursor:n=!0,color:l}=e,u=l||t.styles.placeholder,f=pU.inverse(t.styles.primary),g=N=>f(t.styles.black(N)),C=r,w=" ",B=g(w);if(t.blink&&t.blink.off===!0&&(g=N=>N,B=""),n&&o===0&&s===""&&r==="")return g(w);if(n&&o===0&&(r===s||r===""))return g(s[0])+u(s.slice(1));s=pU.isPrimitive(s)?`${s}`:"",r=pU.isPrimitive(r)?`${r}`:"";let S=s&&s.startsWith(r)&&s!==r,y=S?g(s[r.length]):B;if(o!==r.length&&n===!0&&(C=r.slice(0,o)+g(r[o])+r.slice(o+1),y=""),n===!1&&(y=""),S){let N=t.styles.unstyle(C+y);return C+y+u(s.slice(N.length))}return C+y}});var kS=K((v3t,Zfe)=>{"use strict";var Jlt=bc(),zlt=s0(),Vlt=hU(),$fe=class extends zlt{constructor(e){super(Me(re({},e),{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(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:o}=r;return r.value=r.input=o.slice(0,s)+e+o.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let o=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=o,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r
|
|||
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};sge.exports=oge});var lge=K((b3t,age)=>{"use strict";var ict=SS(),Age=class extends ict{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};age.exports=Age});var fge=K((x3t,cge)=>{"use strict";var sct=s0(),oct=kS(),Jy=oct.prototype,uge=class extends sct{constructor(e){super(Me(re({},e),{multiple:!0}));this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,o=s.parent||{};return!s.editable&&!o.editable&&(e==="a"||e==="i")?super[e]():Jy.dispatch.call(this,e,r)}append(e,r){return Jy.append.call(this,e,r)}delete(e,r){return Jy.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Jy.next.call(this):super.next()}prev(){return this.focused.editable?Jy.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",o=e.editable?s:super.indicator(e,r);return await this.resolve(o,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?Jy.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};cge.exports=uge});var yd=K((P3t,gge)=>{"use strict";var act=Wy(),Act=hU(),{isPrimitive:lct}=sa(),pge=class extends act{constructor(e){super(e);this.initial=lct(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(`
|
|||
|
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),o=r.split(" ");this.state.clipboard.push(o.pop()),this.input=o.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.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(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Act(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),o=await this.message(),n=[r,o,s].filter(Boolean).join(" ");this.state.prompt=n;let l=await this.header(),u=await this.format(),f=await this.error()||await this.hint(),g=await this.footer();f&&!u.includes(f)&&(u+=" "+f),n+=" "+u,this.clear(e),this.write([l,n,g].filter(Boolean).join(`
|
|||
|
`)),this.restore()}};gge.exports=pge});var dge=K((F3t,hge)=>{"use strict";var cct=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),bS=t=>cct(t).filter(Boolean);hge.exports=(t,e={},r="")=>{let{past:s=[],present:o=""}=e,n,l;switch(t){case"prev":case"undo":return n=s.slice(0,s.length-1),l=s[s.length-1]||"",{past:bS([r,...n]),present:l};case"next":case"redo":return n=s.slice(1),l=s[0]||"",{past:bS([...n,r]),present:l};case"save":return{past:bS([...s,r]),present:""};case"remove":return l=bS(s.filter(u=>u!==r)),o="",l.length&&(o=l.pop()),{past:l,present:o};default:throw new Error(`Invalid action: "${t}"`)}}});var mU=K((R3t,mge)=>{"use strict";var uct=yd(),yge=dge(),Cge=class extends uct{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=yge(e,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=yge("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};mge.exports=Cge});var wge=K((T3t,Ige)=>{"use strict";var fct=yd(),Ege=class extends fct{format(){return""}};Ige.exports=Ege});var vge=K((N3t,Bge)=>{"use strict";var gct=yd(),Qge=class extends gct{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){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()}};Bge.exports=Qge});var Sge=K((M3t,Dge)=>{"use strict";var pct=s0(),kge=class extends pct{constructor(e){super(Me(re({},e),{multiple:!0}))}};Dge.exports=kge});var yU=K((L3t,bge)=>{"use strict";var hct=yd(),xge=class extends hct{constructor(e={}){super(re({style:"number"},e));this.min=this.isValue(e.min)?this.toNumber(e.min):-Infinity,this.max=this.isValue(e.max)?this.toNumber(e.max):Infinity,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}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(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};bge.exports=xge});var Fge=K((O3t,Pge)=>{Pge.exports=yU()});var Nge=K((U3t,Rge)=>{"use strict";var dct=yd(),Tge=class extends dct{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};Rge.exports=Tge});var
|
|||
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,o)=>({name:o+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(s=>` ${s.name} - ${s.message}`);return["",...e].map(s=>this.styles.muted(s)).join(`
|
|||
|
`)}renderScaleHeading(e){let r=this.scale.map(f=>f.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,o=Math.round(s/(r.length-1)),l=r.map(f=>this.styles.strong(f)).join(" ".repeat(o)),u=" ".repeat(this.widths[0]);return this.margin[3]+u+this.margin[1]+l}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let o=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):o?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),o=this.term==="Hyper"?"":" ";return s.join(o+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,o=await this.pointer(e,r),n=await e.hint;n&&!Lge.hasColor(n)&&(n=this.styles.muted(n));let l=y=>this.margin[3]+y.replace(/\s+$/,"").padEnd(this.widths[0]," "),u=this.newline,f=this.indent(e),g=await this.resolve(e.message,this.state,e,r),C=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=mct.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let S=Lge.wordWrap(g,{width:this.widths[0],newline:u}).split(`
|
|||
|
`).map(y=>l(y)+this.margin[1]);return s&&(C=this.styles.info(C),S=S.map(y=>this.styles.info(y))),S[0]+=C,this.linebreak&&S.push(""),[f+o,S.join(`
|
|||
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(o,n)=>await this.renderChoice(o,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(o=>o.join(" "))].join(`
|
|||
|
`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),o=await this.separator(),n=await this.message(),l="";this.options.promptLine!==!1&&(l=[s,n,o,""].join(" "),this.state.prompt=l);let u=await this.header(),f=await this.format(),g=await this.renderScaleKey(),C=await this.error()||await this.hint(),w=await this.renderChoices(),B=await this.footer(),S=this.emptyError;f&&(l+=f),C&&!l.includes(C)&&(l+=" "+C),e&&!f&&!w.trim()&&this.multiple&&S!=null&&(l+=this.styles.danger(S)),this.clear(r),this.write([u,l,g,w,B].filter(Boolean).join(`
|
|||
|
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};Mge.exports=Oge});var qge=K((K3t,_ge)=>{"use strict";var Kge=bc(),Cct=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",Hge=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Cct(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Ict=async(t={},e={},r=s=>s)=>{let s=new Set,o=t.fields||[],n=t.template,l=[],u=[],f=[],g=1;typeof n=="function"&&(n=await n());let C=-1,w=()=>n[++C],B=()=>n[C+1],S=y=>{y.line=g,l.push(y)};for(S({type:"bos",value:""});C<n.length-1;){let y=w();if(/^[^\S\n ]$/.test(y)){S({type:"text",value:y});continue}if(y===`
|
|||
|
`){S({type:"newline",value:y}),g++;continue}if(y==="\\"){y+=w(),S({type:"text",value:y});continue}if((y==="$"||y==="#"||y==="{")&&B()==="{"){y+=w();let H={type:"template",open:y,inner:"",close:"",value:y},G;for(;G=w();){if(G==="}"){B()==="}"&&(G+=w()),H.value+=G,H.close=G;break}G===":"?(H.initial="",H.key=H.inner):H.initial!==void 0&&(H.initial+=G),H.value+=G,H.inner+=G}H.template=H.open+(H.initial||H.inner)+H.close,H.key=H.key||H.inner,e.hasOwnProperty(H.key)&&(H.initial=e[H.key]),H=r(H),S(H),f.push(H.key),s.add(H.key);let te=u.find(ce=>ce.name===H.key);H.field=o.find(ce=>ce.name===H.key),te||(te=new Hge(H),u.push(te)),te.lines.push(H.line-1);continue}let N=l[l.length-1];N.type==="text"&&N.line===g?N.value+=y:S({type:"text",value:y})}return S({type:"eos",value:""}),{input:n,tabstops:l,unique:s,keys:f,items:u}};_ge.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s=re(re({},e.values),e.initial),{tabstops:o,items:n,keys:l}=await Ict(e,s),u=CU("result",t,e),f=CU("format",t,e),g=CU("validate",t,e,!0),C=t.isValue.bind(t);return async(w={},B=!1)=>{let S=0;w.required=r,w.items=n,w.keys=l,w.output="";let y=async(G,te,ce,me)=>{let Ce=await g(G,te,ce,me);return Ce===!1?"Invalid field "+ce.name:Ce};for(let G of o){let te=G.value,ce=G.key;if(G.type!=="template"){te&&(w.output+=te);continue}if(G.type==="template"){let me=n.find(Qe=>Qe.name===ce);e.required===!0&&w.required.add(me.name);let Ce=[me.input,w.values[me.value],me.value,te].find(C),ye=(me.field||{}).message||G.inner;if(B){let Qe=await y(w.values[ce],w,me,S);if(Qe&&typeof Qe=="string"||Qe===!1){w.invalid.set(ce,Qe);continue}w.invalid.delete(ce);let p=await u(w.values[ce],w,me,S);w.output+=Kge.unstyle(p);continue}me.placeholder=!1;let xe=te;te=await f(te,w,me,S),Ce!==te?(w.values[ce]=Ce,te=t.styles.typing(Ce),w.missing.delete(ye)):(w.values[ce]=void 0,Ce=`<${ye}>`,te=t.styles.primary(Ce),me.placeholder=!0,w.required.has(ce)&&w.missing.add(ye)),w.missing.has(ye)&&w.validating&&(te=t.styles.warning(Ce)),w.invalid.has(ce)&&w.validating&&(te=t.styles.danger(Ce)),S===w.index&&(xe!==te?te=t.styles.underline(te):te=t.styles.heading(Kge.unstyle(te))),S++}te&&(w.output+=te)}let N=w.output.split(`
|
|||
|
`).map(G=>" "+G),L=n.length,H=0;for(let G of n)w.invalid.has(G.name)&&G.lines.forEach(te=>{N[te][0]===" "&&(N[te]=w.styles.danger(w.symbols.bullet)+N[te].slice(1))}),t.isValue(w.values[G.name])&&H++;return w.completed=(H/L*100).toFixed(0),w.output=N.join(`
|
|||
|
`),w.output}};function CU(t,e,r,s){return(o,n,l,u)=>typeof l.field[t]=="function"?l.field[t].call(e,o,n,l,u):[s,o].find(f=>e.isValue(f))}});var Yge=K((H3t,jge)=>{"use strict";var Ect=bc(),wct=qge(),Bct=Wy(),Gge=class extends Bct{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await wct(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),o=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${o}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-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(e){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:e,keys:r=[],submitted:s,size:o}=this.state,n=[this.options.newline,`
|
|||
|
`].find(G=>G!=null),l=await this.prefix(),u=await this.separator(),f=await this.message(),g=[l,f,u].filter(Boolean).join(" ");this.state.prompt=g;let C=await this.header(),w=await this.error()||"",B=await this.hint()||"",S=s?"":await this.interpolate(this.state),y=this.state.key=r[e]||"",N=await this.format(y),L=await this.footer();N&&(g+=" "+N),B&&!N&&this.state.completed===0&&(g+=" "+B),this.clear(o);let H=[C,g,S,L,w.trim()];this.write(H.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:o}=this.state,n=r.find(l=>l.name===s[o]);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:e,missing:r,output:s,values:o}=this.state;if(e.size){let u="";for(let[f,g]of e)u+=`Invalid ${f}: ${g}
|
|||
|
`;return this.state.error=u,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let l=Ect.unstyle(s).split(`
|
|||
|
`).map(u=>u.slice(1)).join(`
|
|||
|
`);return this.value={values:o,result:l},super.submit()}};jge.exports=Gge});var zge=K((q3t,Wge)=>{"use strict";var Qct="(Use <shift>+<up/down> to sort)",vct=s0(),Jge=class extends vct{constructor(e){super(Me(re({},e),{reorder:!1,sort:!0,multiple:!0}));this.state.hint=[this.options.hint,Qct].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),o=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(o):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Wge.exports=Jge});var Zge=K((j3t,Vge)=>{"use strict";var Dct=qw(),Xge=class extends Dct{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`
|
|||
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=kct(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(o=>o.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,o=this.term==="Hyper",n=o?9:8,l=o?"":" ",u=this.symbols.line.repeat(n),f=" ".repeat(n+(o?0:1)),g=te=>(te?this.styles.success("\u25C9"):"\u25EF")+l,C=r+1+".",w=s?this.styles.heading:this.styles.noop,B=await this.resolve(e.message,this.state,e,r),S=this.indent(e),y=S+e.scale.map((te,ce)=>g(ce===e.scaleIdx)).join(u),N=te=>te===e.scaleIdx?w(te):te,L=S+e.scale.map((te,ce)=>N(ce)).join(f),H=()=>[C,B].filter(Boolean).join(" "),G=()=>[H(),y,L," "].filter(Boolean).join(`
|
|||
|
`);return s&&(y=this.styles.cyan(y),L=this.styles.cyan(L)),G()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,o)=>await this.renderChoice(s,o)),r=await Promise.all(e);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:e,size:r}=this.state,s=await this.prefix(),o=await this.separator(),n=await this.message(),l=[s,n,o].filter(Boolean).join(" ");this.state.prompt=l;let u=await this.header(),f=await this.format(),g=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();(f||!g)&&(l+=" "+f),g&&!l.includes(g)&&(l+=" "+g),e&&!f&&!C&&this.multiple&&this.type!=="form"&&(l+=this.styles.danger(this.emptyError)),this.clear(r),this.write([l,u,C,w].filter(Boolean).join(`
|
|||
|
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function kct(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>re({},s));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Vge.exports=Xge});var epe=K((G3t,$ge)=>{$ge.exports=mU()});var npe=K((Y3t,tpe)=>{"use strict";var Sct=SS(),rpe=class extends Sct{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(e="",r){switch(e.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 e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),o=await this.separator(),n=await this.message(),l=await this.format(),u=await this.error()||await this.hint(),f=await this.footer(),g=[s,n,o,l].join(" ");this.state.prompt=g,u&&!g.includes(u)&&(g+=" "+u),this.clear(e),this.write([r,g,f].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};tpe.exports=rpe});var ope=K((W3t,ipe)=>{"use strict";var bct=s0(),spe=class extends bct{constructor(e){super(e);if(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(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};ipe.exports=spe});var Ape=K(IU=>{"use strict";var ape=sa(),js=(t,e)=>{ape.defineExport(IU,t,e),ape.defineExport(IU,t.toLowerCase(),e)};js("AutoComplete",()=>Vfe());js("BasicAuth",()=>ige());js("Confirm",()=>lge());js("Editable",()=>fge());js("Form",()=>kS());js("Input",()=>mU());js("Invisible",()=>wge());js("List",()=>vge());js("MultiSelect",()=>Sge());js("Numeral",()=>Fge());js("Password",()=>Nge());js("Scale",()=>Uge());js("Select",()=>s0());js("Snippet",()=>Yge());js("Sort",()=>zge());js("Survey",()=>Zge());js("Text",()=>epe());js("Toggle",()=>npe());js("Quiz",()=>ope())});var cpe=K((z3t,lpe)=>{lpe.exports={ArrayPrompt:qw(),AuthPrompt:dU(),BooleanPrompt:SS(),NumberPrompt:yU(),StringPrompt:yd()}});var Gw=K((V3t,upe)=>{"use strict";var fpe=require("assert"),EU=require("events"),o0=sa(),Hu=class extends EU{constructor(e,r){super();this.options=o0.merge({},e),this.answers=re({},r)}register(e,r){if(o0.isObject(e)){for(let o of Object.keys(e))this.register(o,e[o]);return this}fpe.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(o0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=o0.merge({},this.options,e),{type:s,name:o}=e,{set:n,get:l}=o0;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[o];fpe(this.prompts[s],`Prompt "${s}" is not registered`);let u=new this.prompts[s](r),f=l(this.answers,o);u.state.answers=this.answers,u.enquirer=this,o&&u.on("submit",C=>{this.emit("answer",o,C,u),n(this.answers,o,C)});let g=u.emit.bind(u);return u.emit=(...C)=>(this.emit.call(this,...C),g(...C)),this.emit("prompt",u,this),r.autofill&&f!=null?(u.value=u.input=f,r.autofill==="show"&&await u.submit()):f=u.value=await u.run(),f}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||Wy()}static get prompts(){return Ape()}static get types(){return cpe()}static get prompt(){let e=(r,...s)=>{let o=new this(...s),n=o.emit.bind(o);return o.emit=(...l)=>(e.emit(...l),n(...l)),o.prompt(r)};return o0.mixinEmitter(e,new EU),e}};o0.mixinEmitter(Hu,new EU);var wU=Hu.prompts;for(let t of Object.keys(wU)){let e=t.toLowerCase(),r=s=>new wU[t](s).run();Hu.prompt[e]=r,Hu[e]=r,Hu[t]||Reflect.defineProperty(Hu,t,{get:()=>wU[t]})}var jw=t=>{o0.defineExport(Hu,t,()=>Hu.types[t])};jw("ArrayPrompt");jw("AuthPrompt");jw("BooleanPrompt");jw("NumberPrompt");jw("StringPrompt");upe.exports=Hu});var Xw=K((T8t,Epe)=>{var Nct=yS();function Mct(t,e,r){var s=t==null?void 0:Nct(t,e);return s===void 0?r:s}Epe.exports=Mct});var vpe=K((_8t,Qpe)=>{function Lct(t,e){for(var r=-1,s=t==null?0:t.length;++r<s&&e(t[r],r,t)!==!1;);return t}Qpe.exports=Lct});var kpe=K((K8t,Dpe)=>{var Oct=Th(),Uct=jv();function _ct(t,e){return t&&Oct(e,Uct(e),t)}Dpe.exports=_ct});var bpe=K((H8t,Spe)=>{var Kct=Th(),Hct=Jm();function qct(t,e){return t&&Kct(e,Hct(e),t)}Spe.ex
|
|||
|
`+f:"")),l.error.method="_execFileSync",l.error.program=o,l.error.args=n,l.error.extMessage=f,l.error.exitCode=+u),si.unlinkSync(g),si.unlinkSync(C),si.unlinkSync(w),si.unlinkSync(B),l}function upt(t){var e,r={},s,o={env:process.env,encoding:t.encoding};if(c0||(Ed?process.env.PSModulePath?(c0="powershell.exe",OS=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(c0="cscript.exe",OS=["//nologo",__dirname+"\\read.cs.js"]):(c0="/bin/sh",OS=[__dirname+"/read.sh"])),Ed&&!process.env.PSModulePath&&(o.stdio=[process.stdin]),u3.execFileSync){e=rde(t),kB&&kB("execFileSync",e);try{r.input=u3.execFileSync(c0,e,o)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Zhe+(s?`
|
|||
|
`+s:"")),r.error.method="execFileSync",r.error.program=c0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=cpt(t,o);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function d3(t){var e="",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function o(){var n=upt(t);if(n.error)throw n.error;return n.input}return h3&&h3(t),function(){var n,l,u;function f(){return n||(n=process.binding("fs"),l=process.binding("constants")),n}if(typeof wg=="string")if(wg=null,Ed){if(u=function(g){var C=g.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),!(u>=20302&&u<40204||u>=5e4&&u<50100||u>=50600&&u<60200)&&process.stdin.isTTY)process.stdin.pause(),wg=process.stdin.fd,$y=process.stdin._handle;else try{wg=f().open("CONIN$",l.O_RDWR,parseInt("0666",8)),$y=new $he(wg,!0)}catch(g){}if(process.stdout.isTTY)Pc=process.stdout.fd;else{try{Pc=si.openSync("\\\\.\\CON","w")}catch(g){}if(typeof Pc!="number")try{Pc=f().open("CONOUT$",l.O_RDWR,parseInt("0666",8))}catch(g){}}}else{if(process.stdin.isTTY){process.stdin.pause();try{wg=si.openSync("/dev/tty","r"),$y=process.stdin._handle}catch(g){}}else try{wg=si.openSync("/dev/tty","r"),$y=new $he(wg,!1)}catch(g){}if(process.stdout.isTTY)Pc=process.stdout.fd;else try{Pc=si.openSync("/dev/tty","w")}catch(g){}}}(),function(){var n,l,u=!t.hideEchoBack&&!t.keyIn,f,g,C,w,B;US="";function S(y){return y===ede?!0:$y.setRawMode(y)!==0?!1:(ede=y,!0)}if(tde||!$y||typeof Pc!="number"&&(t.display||!u)){e=o();return}if(t.display&&(si.writeSync(Pc,t.display),t.display=""),!t.displayOnly){if(!S(!u)){e=o();return}for(g=t.keyIn?1:t.bufferSize,f=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(g):new Buffer(g),t.keyIn&&t.limit&&(l=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){C=0;try{C=si.readSync(wg,f,0,g)}catch(y){if(y.code!=="EOF"){S(!1),e+=o();return}}if(C>0?(w=f.toString(t.encoding,0,C),US+=w):(w=`
|
|||
|
`,US+=String.fromCharCode(0)),w&&typeof(B=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=B,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&l&&(w=w.replace(l,"")),w&&(u||(t.hideEchoBack?t.mask&&si.writeSync(Pc,new Array(w.length+1).join(t.mask)):si.writeSync(Pc,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=g)break}!u&&!s&&si.writeSync(Pc,`
|
|||
|
`),S(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
|||
|
`),t.encoding),t.displayOnly?"":p3=t.keepWhitespace||t.keyIn?e:e.trim()}function fpt(t,e){var r=[];function s(o){o!=null&&(Array.isArray(o)?o.forEach(s):(!e||e(o))&&r.push(o))}return s(t),r}function m3(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function no(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(f3),t.unshift(f3))),t.reduce(function(s,o){return o==null||(o.hasOwnProperty("noEchoBack")&&!o.hasOwnProperty("hideEchoBack")&&(o.hideEchoBack=o.noEchoBack,delete o.noEchoBack),o.hasOwnProperty("noTrim")&&!o.hasOwnProperty("keepWhitespace")&&(o.keepWhitespace=o.noTrim,delete o.noTrim),r||(e=Object.keys(o)),e.forEach(function(n){var l;if(!!o.hasOwnProperty(n))switch(l=o[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":l=l!=null?l+"":"",l&&n!=="limitMessage"&&(l=l.replace(/[\r\n]/g,"")),s[n]=l;break;case"bufferSize":!isNaN(l=parseInt(l,10))&&typeof l=="number"&&(s[n]=l);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!l;break;case"limit":case"trueValue":case"falseValue":s[n]=fpt(l,function(u){var f=typeof u;return f==="string"||f==="number"||f==="function"||u instanceof RegExp}).map(function(u){return typeof u=="string"?u.replace(/[\r\n]/g,""):u});break;case"print":case"phContent":case"preCheck":s[n]=typeof l=="function"?l:void 0;break;case"prompt":case"display":s[n]=l!=null?l:"";break}})),s},{})}function y3(t,e,r){return e.some(function(s){var o=typeof s;return o==="string"?r?t===s:t.toLowerCase()===s.toLowerCase():o==="number"?parseFloat(t)===s:o==="function"?s(t):s instanceof RegExp?s.test(t):!1})}function C3(t,e){var r=l0.normalize(Ed?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=l0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+m3(r)+"(?=\\/|\\\\|$)",Ed?"i":""),"~")}function eC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),o=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(l,u,f,g,C,w){var B;return u||typeof(B=e(C))!="string"?f:B?(g||"")+B+(w||""):""}return t.replace(s,n).replace(o,n)}function nde(t,e,r){var s,o=[],n=-1,l=0,u="",f;function g(C,w){return w.length>3?(C.push(w[0]+"..."+w[w.length-1]),f=!0):w.length&&(C=C.concat(w)),C}return s=t.reduce(function(C,w){return C.concat((w+"").split(""))},[]).reduce(function(C,w){var B,S;return e||(w=w.toLowerCase()),B=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&B===0?u+=w:(S=w.charCodeAt(0),B&&B===n&&S===l+1?o.push(w):(C=g(C,o),o=[w],n=B),l=S),C},[]),s=g(s,o),u&&(s.push(u),f=!0),{values:s,suppressed:f}}function ide(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function sde(t,e){var r,s,o={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":s=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(o=nde(s,e.caseSensitive),s=o.values):s=s.filter(function(l){var u=typeof l;return u==="string"||u==="number"}),r=ide(s,o.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=p3;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=l0.basename(r):t==="cwdHome"&&(r=C3(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(l){return l.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=wd[wd.length-n]||"")}return r}function ode(t){var e=/^(.)-(.)$/.exec(t),r="",s,o,n,l;if(!e)return null;for(s=e[1].charCodeAt(0),o=e[2].charCodeAt(0),l=s<o?1:-1,n=s;n!==o+l;n+=l)r+=String.fromC
|
|||
|
`:"")+C}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=eC(t.display+"",f);;){if(e=d3(t),r=!1,s="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((o=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=wd[0]||"",o[1]?r=!0:e=n,g(n+`
|
|||
|
`),r||(t.displayOnly=!0,d3(t),t.displayOnly=!1)):e&&e!==wd[wd.length-1]&&(wd=[e])),!r&&t.cd&&e)switch(l=I3(e),l[0].toLowerCase()){case"cd":if(l[1])try{process.chdir(C3(l[1],!0))}catch(C){g(C+"")}r=!0;break;case"pwd":g(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(u=t.preCheck(e,t),e=u.res,u.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||y3(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=eC(t.limitMessage,f))}g((s?s+`
|
|||
|
`:"")+eC(t.displaySrc+"",f))}return ade(e,t)}rn._DBG_set_useExt=function(t){tde=t};rn._DBG_set_checkOptions=function(t){h3=t};rn._DBG_set_checkMethod=function(t){kB=t};rn._DBG_clearHistory=function(){p3="",wd=[]};rn.setDefaultOptions=function(t){return f3=no(!0,t),no(!0)};rn.question=function(t,e){return Ade(no(no(!0,e),{display:t}))};rn.prompt=function(t){var e=no(!0,t);return e.display=e.prompt,Ade(e)};rn.keyIn=function(t,e){var r=no(no(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var o=typeof s;return o==="string"||o==="number"}).map(function(s){return eC(s+"",ode)}),r.limit=m3(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(s){r[s]=r[s].reduce(function(o,n){var l=typeof n;return l==="string"||l==="number"?o=o.concat((n+"").split("")):o.push(n),o},[])}),r.display=eC(r.display+"",function(s){return sde(s,r)}),ade(d3(r),r)};rn.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),rn.question(t,no({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},e,{keepWhitespace:!1,cd:!1}))};rn.questionNewPassword=function(t,e){var r,s,o,n=no({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
|
|||
|
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(S){return S==="charlist"?r.text:S==="length"?s+"..."+o:null}}),l,u,f,g,C,w,B;for(e=e||{},l=eC(e.charlist?e.charlist+"":"$<!-~>",ode),(isNaN(s=parseInt(e.min,10))||typeof s!="number")&&(s=12),(isNaN(o=parseInt(e.max,10))||typeof o!="number")&&(o=24),g=new RegExp("^["+m3(l)+"]{"+s+","+o+"}$"),r=nde([l],n.caseSensitive,!0),r.text=ide(r.values,r.suppressed),u=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",f=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),C=n.limitMessage;!B;)n.limit=g,n.limitMessage=C,w=rn.question(t,n),n.limit=[w,""],n.limitMessage=f,B=rn.question(u,n);return w};function lde(t,e,r){var s;function o(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return rn.question(t,no({limitMessage:"Input valid number, please."},e,{limit:o,cd:!1})),s}rn.questionInt=function(t,e){return lde(t,e,function(r){return parseInt(r,10)})};rn.questionFloat=function(t,e){return lde(t,e,parseFloat)};rn.questionPath=function(t,e){var r,s="",o=no({hideEchoBack:!1,limitMessage:`$<error(
|
|||
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var l,u,f;n=C3(n,!0),s="";function g(C){C.split(/\/|\\/).reduce(function(w,B){var S=l0.resolve(w+=B+l0.sep);if(!si.existsSync(S))si.mkdirSync(S);else if(!si.statSync(S).isDirectory())throw new Error("Non directory already exists: "+S);return w},"")}try{if(l=si.existsSync(n),r=l?si.realpathSync(n):l0.resolve(n),!e.hasOwnProperty("exists")&&!l||typeof e.exists=="boolean"&&e.exists!==l)return s=(l?"Already exists":"No such file or directory")+": "+r,!1;if(!l&&e.create&&(e.isDirectory?g(r):(g(l0.dirname(r)),si.closeSync(si.openSync(r,"w"))),r=si.realpathSync(r)),l&&(e.min||e.max||e.isFile||e.isDirectory)){if(u=si.statSync(r),e.isFile&&!u.isFile())return s="Not file: "+r,!1;if(e.isDirectory&&!u.isDirectory())return s="Not directory: "+r,!1;if(e.min&&u.size<+e.min||e.max&&u.size>+e.max)return s="Size "+u.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(f=e.validate(r))!==!0)return typeof f=="string"&&(s=f),!1}catch(C){return s=C+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),rn.question(t,o),r};function cde(t,e){var r={},s={};return typeof t=="object"?(Object.keys(t).forEach(function(o){typeof t[o]=="function"&&(s[e.caseSensitive?o:o.toLowerCase()]=t[o])}),r.preCheck=function(o){var n;return r.args=I3(o),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(o,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(o,r.args):null,{res:o,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var o=r.args[0]||"";return e.caseSensitive||(o=o.toLowerCase()),s.hasOwnProperty(o)})):r.preCheck=function(o){return r.args=I3(o),r.hRes=typeof t=="function"?t.apply(o,r.args):!0,{res:o,forceNext:!1}},r}rn.promptCL=function(t,e){var r=no({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=cde(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,rn.prompt(r),s.args};rn.promptLoop=function(t,e){for(var r=no({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(rn.prompt(r)););};rn.promptCLLoop=function(t,e){var r=no({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=cde(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;rn.prompt(r),!s.hRes;);};rn.promptSimShell=function(t){return rn.prompt(no({hideEchoBack:!1,history:!0},t,{prompt:function(){return Ed?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function ude(t,e,r){var s;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=rn.keyIn(t,no(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}rn.keyInYN=function(t,e){return ude(t,e)};rn.keyInYNStrict=function(t,e){return ude(t,e,"yn")};rn.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),rn.keyIn(t,no({limit:null},e,{hideEchoBack:!0,mask:""}))};rn.keyInSelect=function(t,e,r){var s=no({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(f){return f==="itemsCount"?t.length+"":f==="firstItem"?(t[0]+"").trim():f==="lastItem"?(t[t.length-1]+"").trim():null}}),o="",n={},l=49,u=`
|
|||
|
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(f,g){var C=String.fromCharCode(l);o+=C,n[C]=g,u+="["+C+"] "+(f+"").trim()+`
|
|||
|
`,l=l===57?97:l+1}),(!r||r.cancel!==!1)&&(o+="0",n["0"]=-1,u+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
|||
|
`),s.limit=o,u+=`
|
|||
|
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),u+=e),n[rn.keyIn(u,s).toLowerCase()]};rn.getRawInput=function(){return US};function SB(t,e){var r;return e.length&&(r={},r[t]=e[0]),rn.setDefaultOptions(r)[t]}rn.setPrint=function(){return SB("print",arguments)};rn.setPrompt=function(){return SB("prompt",arguments)};rn.setEncoding=function(){return SB("encoding",arguments)};rn.setMask=function(){return SB("mask",arguments)};rn.setBufferSize=function(){return SB("bufferSize",arguments)}});var E3=K((wGt,$A)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,D,m){var F=tau_file_system.files[I];if(!F){if(m==="read")return null;F={path:I,text:"",type:D,get:function(X,ee){return ee===this.text.length||ee>this.text.length?"end_of_file":this.text.substring(ee,ee+X)},put:function(X,ee){return ee==="end_of_file"?(this.text+=X,!0):ee==="past_end_of_file"?null:(this.text=this.text.substring(0,ee)+X+this.text.substring(ee+X.length),!0)},get_byte:function(X){if(X==="end_of_stream")return-1;var ee=Math.floor(X/2);if(this.text.length<=ee)return-1;var ie=n(this.text[Math.floor(X/2)],0);return X%2==0?ie&255:ie/256>>>0},put_byte:function(X,ee){var ie=ee==="end_of_stream"?this.text.length:Math.floor(ee/2);if(this.text.length<ie)return null;var Ae=this.text.length===ie?-1:n(this.text[Math.floor(ee/2)],0);return ee%2==0?(Ae=Ae/256>>>0,Ae=(Ae&255)<<8|X&255):(Ae=Ae&255,Ae=(X&255)<<8|Ae&255),this.text.length===ie?this.text+=l(Ae):this.text=this.text.substring(0,ie)+l(Ae)+this.text.substring(ie+1),!0},flush:function(){return!0},close:function(){var X=tau_file_system.files[this.path];return X?!0:null}},tau_file_system.files[I]=F}return m==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(I,D){for(var m;tau_user_input.buffer.length<I;)m=window.prompt(),m&&(tau_user_input.buffer+=m);return m=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),m}},tau_user_output={put:function(I,D){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,D,m){var F=require("fs"),X=F.openSync(I,m[0]);return m==="read"&&!F.existsSync(I)?null:{get:function(ee,ie){var Ae=new Buffer(ee);return F.readSync(X,Ae,0,ee,ie),Ae.toString()},put:function(ee,ie){var Ae=Buffer.from(ee);if(ie==="end_of_file")F.writeSync(X,Ae);else{if(ie==="past_end_of_file")return null;F.writeSync(X,Ae,0,Ae.length,ie)}return!0},get_byte:function(ee){return null},put_byte:function(ee,ie){return null},flush:function(){return!0},close:function(){return F.closeSync(X),!0}}}},nodejs_user_input={buffer:"",get:function(I,D){for(var m,F=fde();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=F.question();return m=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),m}},nodejs_user_output={put:function(I,D){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,D){return I.indexOf(D)}:e=function(I,D){for(var m=I.length,F=0;F<m;F++)if(D===I[F])return F;return-1};var r=function(I,D){if(I.length!==0){for(var m=I[0],F=I.length,X=1;X<F;X++)m=D(m,I[X]);return m}},s;Array.prototype.map?s=function(I,D){return I.map(D)}:s=function(I,D){for(var m=[],F=I.length,X=0;X<F;X++)m.push(D(I[X]));return m};var o;Array.prototype.filter?o=function(I,D){return I.filter(D)}:o=function(I,D){for(var m=[],F=I.length,X=0;X<F;X++)D(I[X])&&m.push(I[X]);return m};var n;String.prototype.codePointAt?n=function(I,D){return I.codePointAt(D)}:n=function(I,D){return I.charCodeAt(D)};var l;String.fromCodePoint?l=function(){return String.fromCodePoint.apply(null,arguments)}:l=function(){return String.fromCharCode.apply(null,arguments)};var u=0,f=1,g=/(\\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 D=[],m=!1;return I.replace(g,function(F,X,ee,ie,Ae,Fe,_e,Ct,vt,Wt,cr,Ut,Cn,Ur,Rr,_r,hn){switch(!0){c
|
|||
|
`,"\r"," ","\v"].indexOf(ee)!==-1)switch(F+=1,ee){case"a":m+="a";break;case"b":m+="\b";break;case"f":m+="\f";break;case"n":m+=`
|
|||
|
`;break;case"r":m+="\r";break;case"t":m+=" ";break;case"v":m+="\v";break;case"'":m+="'";break;case'"':m+='"';break;case"\\":m+="\\";break}else return null;else m+=X}return m}function S(I){for(var D="",m=0;m<I.length;m++)switch(I.charAt(m)){case"'":D+="\\'";break;case"\\":D+="\\\\";break;case"\b":D+="\\b";break;case"\f":D+="\\f";break;case`
|
|||
|
`:D+="\\n";break;case"\r":D+="\\r";break;case" ":D+="\\t";break;case"\v":D+="\\v";break;default:D+=I.charAt(m);break}return D}function y(I){var D=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(D,16);case"0b":return parseInt(D,2);case"0o":return parseInt(D,8);case"0'":return w(D)[0];default:return parseFloat(I)}}var N={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 L(I,D){return I.get_flag("char_conversion").id==="on"?D.replace(/./g,function(m){return I.get_char_conversion(m)}):D}function H(I){this.thread=I,this.text="",this.tokens=[]}H.prototype.set_last_tokens=function(I){return this.tokens=I},H.prototype.new_text=function(I){this.text=I,this.tokens=[]},H.prototype.get_tokens=function(I){var D,m=0,F=0,X=0,ee=[],ie=!1;if(I){var Ae=this.tokens[I-1];m=Ae.len,D=L(this.thread,this.text.substr(Ae.len)),F=Ae.line,X=Ae.start}else D=this.text;if(/^\s*$/.test(D))return null;for(;D!=="";){var Fe=[],_e=!1;if(/^\n/.exec(D)!==null){F++,X=0,m++,D=D.replace(/\n/,""),ie=!0;continue}for(var Ct in N)if(N.hasOwnProperty(Ct)){var vt=N[Ct].exec(D);vt&&Fe.push({value:vt[0],name:Ct,matches:vt})}if(!Fe.length)return this.set_last_tokens([{value:D,matches:[],name:"lexical",line:F,start:X}]);var Ae=r(Fe,function(Ur,Rr){return Ur.value.length>=Rr.value.length?Ur:Rr});switch(Ae.start=X,Ae.line=F,D=D.replace(Ae.value,""),X+=Ae.value.length,m+=Ae.value.length,Ae.name){case"atom":Ae.raw=Ae.value,Ae.value.charAt(0)==="'"&&(Ae.value=B(Ae.value.substr(1,Ae.value.length-2),"'"),Ae.value===null&&(Ae.name="lexical",Ae.value="unknown escape sequence"));break;case"number":Ae.float=Ae.value.substring(0,2)!=="0x"&&Ae.value.match(/[.eE]/)!==null&&Ae.value!=="0'.",Ae.value=y(Ae.value),Ae.blank=_e;break;case"string":var Wt=Ae.value.charAt(0);Ae.value=B(Ae.value.substr(1,Ae.value.length-2),Wt),Ae.value===null&&(Ae.name="lexical",Ae.value="unknown escape sequence");break;case"whitespace":var cr=ee[ee.length-1];cr&&(cr.space=!0),_e=!0;continue;case"r_bracket":ee.length>0&&ee[ee.length-1].name==="l_bracket"&&(Ae=ee.pop(),Ae.name="atom",Ae.value="{}",Ae.raw="{}",Ae.space=!1);break;case"r_brace":ee.length>0&&ee[ee.length-1].name==="l_brace"&&(Ae=ee.pop(),Ae.name="atom",Ae.value="[]",Ae.raw="[]",Ae.space=!1);break}Ae.len=m,ee.push(Ae),_e=!1}var Ut=this.set_last_tokens(ee);return Ut.length===0?null:Ut};function G(I,D,m,F,X){if(!D[m])return{type:u,value:k.error.syntax(D[m-1],"expression expected",!0)};var ee;if(F==="0"){var ie=D[m];switch(ie.name){case"number":return{type:f,len:m+1,value:new k.type.Num(ie.value,ie.float)};case"variable":return{type:f,len:m+1,value:new k.type.Var(ie.value)};case"string":var Ae;switch(I.get_flag("double_quotes").id){case"atom":Ae=new _(ie.value,[]);break;case"codes":Ae=new _("[]",[]);for(var Fe=ie.value.length-1;Fe>=0;Fe--)Ae=new _(".",[new k.type.Num(n(ie.value,Fe),!1),Ae]);break;case"chars":Ae=new _("[]",[]);for(var Fe=ie.value.length-1;Fe>=0;Fe--)Ae=new _(".",[new k.type.Term(ie.value.charAt(Fe),[]),Ae]);break}return{type:f,len:m+1,value:Ae};case"l_paren":var Ut=G(I,D,m+1,I.__get_max_priority(),!0);return Ut.type!==f?Ut:D[Ut.len]&&D[Ut.len].name==="r_paren"?(Ut.len++,Ut):{type:u,derived:!0,value:k.error.syntax(D[Ut.len]?D[Ut.len]:D[Ut.len-1],") or operator expected",!D[Ut.len])};case"l_bracket":var Ut=G(I,D,m+1,I.__get_max_priority(),!0);return Ut.type!==f?Ut:D[Ut.len]&&D[Ut.len].name==="r_bracket"?(Ut.len++,Ut.value=new _("{}",[Ut.value]),Ut):{type:u,derived:!0,value:k.error.syntax(D[Ut.len]?D[Ut.len]:D[Ut.len-1],"} or operator expected",!D[Ut.len])}}var _e=te(I,D,m,X);return _e.type===f||_e.derived||(_e=ce(I,D,m),_e.type===f||_e.derived)?_e
|
|||
|
`;D+=`
|
|||
|
`;for(key in this.rules)for(m=0;m<this.rules[key].length;m++)D+=this.rules[key][m].toString(I),D+=`
|
|||
|
`;return D},Be.prototype.clone=function(){return new Be(this.id)},Te.prototype.clone=function(){return new Te(this.value,this.is_float)},_.prototype.clone=function(){return new _(this.id,s(this.args,function(I){return I.clone()}))},rt.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ye.prototype.clone=function(){var I={};for(var D in this.links)!this.links.hasOwnProperty(D)||(I[D]=this.links[D].clone());return new Ye(I)},Re.prototype.clone=function(){return new Re(this.goal.clone(),this.substitution.clone(),this.parent)},yt.prototype.clone=function(){return new yt(this.head.clone(),this.body!==null?this.body.clone():null)},Be.prototype.equals=function(I){return k.type.is_variable(I)&&this.id===I.id},Te.prototype.equals=function(I){return k.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},_.prototype.equals=function(I){if(!k.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var D=0;D<this.args.length;D++)if(!this.args[D].equals(I.args[D]))return!1;return!0},rt.prototype.equals=function(I){return k.type.is_stream(I)&&this.id===I.id},Ye.prototype.equals=function(I){var D;if(!k.type.is_substitution(I))return!1;for(D in this.links)if(!!this.links.hasOwnProperty(D)&&(!I.links[D]||!this.links[D].equals(I.links[D])))return!1;for(D in I.links)if(!!I.links.hasOwnProperty(D)&&!this.links[D])return!1;return!0},Re.prototype.equals=function(I){return k.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},yt.prototype.equals=function(I){return k.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},Be.prototype.rename=function(I){return I.get_free_variable(this)},Te.prototype.rename=function(I){return this},_.prototype.rename=function(I){return new _(this.id,s(this.args,function(D){return D.rename(I)}))},rt.prototype.rename=function(I){return this},yt.prototype.rename=function(I){return new yt(this.head.rename(I),this.body!==null?this.body.rename(I):null)},Be.prototype.variables=function(){return[this.id]},Te.prototype.variables=function(){return[]},_.prototype.variables=function(){return[].concat.apply([],s(this.args,function(I){return I.variables()}))},rt.prototype.variables=function(){return[]},yt.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Be.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},Te.prototype.apply=function(I){return this},_.prototype.apply=function(I){if(this.indicator==="./2"){for(var D=[],m=this;m.indicator==="./2";)D.push(m.args[0].apply(I)),m=m.args[1];for(var F=m.apply(I),X=D.length-1;X>=0;X--)F=new _(".",[D[X],F]);return F}return new _(this.id,s(this.args,function(ee){return ee.apply(I)}),this.ref)},rt.prototype.apply=function(I){return this},yt.prototype.apply=function(I){return new yt(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Ye.prototype.apply=function(I){var D,m={};for(D in this.links)!this.links.hasOwnProperty(D)||(m[D]=this.links[D].apply(I));return new Ye(m)},_.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},_.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new _(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new _(",",[I,this.args[1]]):I},_.prototype.search=function(I){if(k.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var D=0;D<this.args.length;D++)if(k.type.is_term(this.args[D])&&this.args[D].search(I))return!0;return!1},nt.prototype.get_current_input=function(){return this.current_input},Ze.prototype.get_current_input=function(){return this.session.get_current_input()},nt.prototype.get_current_output=function(){return this.current_output},Ze.prototype.get_current_output=function(){return this.session.get_current_output()},nt.prototype.set_current_input=function(I){this.current_input=I},Ze.prototype.set_current_input=function(I){return
|
|||
|
`,[])])])),D.substitution,D)])},"nl/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _("put_char",[F,new _(`
|
|||
|
`,[])])),D.substitution,D)])},"get_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("get_byte",[new Be("S"),F])])),D.substitution,D)])},"get_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(k.type.is_variable(F))I.throw_error(k.error.instantiation(m.indicator));else if(!k.type.is_variable(X)&&!k.type.is_byte(X))I.throw_error(k.error.type("in_byte",char,m.indicator));else if(!k.type.is_stream(F)&&!k.type.is_atom(F))I.throw_error(k.error.domain("stream_or_alias",F,m.indicator));else if(!k.type.is_stream(ee)||ee.stream===null)I.throw_error(k.error.existence("stream",F,m.indicator));else if(ee.output)I.throw_error(k.error.permission("input","stream",F,m.indicator));else if(ee.type==="text")I.throw_error(k.error.permission("input","text_stream",F,m.indicator));else if(ee.position==="past_end_of_stream"&&ee.eof_action==="error")I.throw_error(k.error.permission("input","past_end_of_stream",F,m.indicator));else{var ie;if(ee.position==="end_of_stream")ie="end_of_file",ee.position="past_end_of_stream";else{if(ie=ee.stream.get_byte(ee.position),ie===null){I.throw_error(k.error.representation("byte",m.indicator));return}ee.position++}I.prepend([new Re(D.goal.replace(new _("=",[new Te(ie,!1),X])),D.substitution,D)])}},"peek_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("peek_byte",[new Be("S"),F])])),D.substitution,D)])},"peek_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(k.type.is_variable(F))I.throw_error(k.error.instantiation(m.indicator));else if(!k.type.is_variable(X)&&!k.type.is_byte(X))I.throw_error(k.error.type("in_byte",char,m.indicator));else if(!k.type.is_stream(F)&&!k.type.is_atom(F))I.throw_error(k.error.domain("stream_or_alias",F,m.indicator));else if(!k.type.is_stream(ee)||ee.stream===null)I.throw_error(k.error.existence("stream",F,m.indicator));else if(ee.output)I.throw_error(k.error.permission("input","stream",F,m.indicator));else if(ee.type==="text")I.throw_error(k.error.permission("input","text_stream",F,m.indicator));else if(ee.position==="past_end_of_stream"&&ee.eof_action==="error")I.throw_error(k.error.permission("input","past_end_of_stream",F,m.indicator));else{var ie;if(ee.position==="end_of_stream")ie="end_of_file",ee.position="past_end_of_stream";else if(ie=ee.stream.get_byte(ee.position),ie===null){I.throw_error(k.error.representation("byte",m.indicator));return}I.prepend([new Re(D.goal.replace(new _("=",[new Te(ie,!1),X])),D.substitution,D)])}},"put_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_output",[new Be("S")]),new _("put_byte",[new Be("S"),F])])),D.substitution,D)])},"put_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);k.type.is_variable(F)||k.type.is_variable(X)?I.throw_error(k.error.instantiation(m.indicator)):k.type.is_byte(X)?!k.type.is_variable(F)&&!k.type.is_stream(F)&&!k.type.is_atom(F)?I.throw_error(k.error.domain("stream_or_alias",F,m.indicator)):!k.type.is_stream(ee)||ee.stream===null?I.throw_error(k.error.existence("stream",F,m.indicator)):ee.input?I.throw_error(k.error.permission("output","stream",F,m.indicator)):ee.type==="text"?I.throw_error(k.error.permission("output","text_stream",F,m.indicator)):ee.stream.put_byte(X.value,ee.position)&&(typeof ee.position=="number"&&ee.position++,I.success(D)):I.throw_error(k.error.type("byte",X,m.indicator))},"read/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("read_term",[new Be("S"),F,new _("[]",[])])])),D.substitution,D)])},"read/2":function(I,D,m){var F=m.args[0],X=m.args[1];I.prepend([new Re(D.goal.replace(new _("read_term",[F,X,new _("[]",[])])),D.substitution,D)])},"read_term/2":function(I,D,m){var F=m.args[0],X=m.args[1];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_in
|
|||
|
`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${f0(s)}).
|
|||
|
`,e+=`workspace_ident(${f0(s)}, ${f0(W.stringifyIdent(r.locator))}).
|
|||
|
`,e+=`workspace_version(${f0(s)}, ${f0(r.manifest.version)}).
|
|||
|
`;for(let o of Cde)for(let n of r.manifest[o].values())e+=`workspace_has_dependency(${f0(s)}, ${f0(W.stringifyIdent(n))}, ${f0(n.range)}, ${o}).
|
|||
|
`}return e+=`workspace(_) :- false.
|
|||
|
`,e+=`workspace_ident(_, _) :- false.
|
|||
|
`,e+=`workspace_version(_, _) :- false.
|
|||
|
`,e+=`workspace_has_dependency(_, _, _, _) :- false.
|
|||
|
`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false.
|
|||
|
`,e+=`gen_enforced_field(_, _, _) :- false.
|
|||
|
`,e}get fullSource(){return`${this.getProjectDatabase()}
|
|||
|
${this.source}
|
|||
|
${this.getDeclarations()}`}createSession(){return new Ede(this.project,this.fullSource)}async process(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let o=$.resolve(this.project.cwd,Bd(s.links.WorkspaceCwd)),n=Bd(s.links.DependencyIdent),l=Bd(s.links.DependencyRange),u=Bd(s.links.DependencyType);if(o===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(o),g=W.parseIdent(n);r.push({workspace:f,dependencyIdent:g,dependencyRange:l,dependencyType:u})}return it.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>W.stringifyIdent(s.locator),({dependencyIdent:s})=>W.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let o=$.resolve(this.project.cwd,Bd(s.links.WorkspaceCwd)),n=Bd(s.links.FieldPath),l=dpt(s.links.FieldValue);if(o===null||n===null)throw new Error("Invalid rule");let u=this.project.getWorkspaceByCwd(o);r.push({workspace:u,fieldPath:n,fieldValue:l})}return it.sortMap(r,[({workspace:s})=>W.stringifyIdent(s.locator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let o={};for(let[n,l]of Object.entries(s.links))n!=="_"&&(o[n]=Bd(l));yield o}}}});var Ude=K(GS=>{"use strict";Object.defineProperty(GS,"__esModule",{value:!0});function OB(t){let e=[...t.caches],r=e.shift();return r===void 0?Ode():{get(s,o,n={miss:()=>Promise.resolve()}){return r.get(s,o,n).catch(()=>OB({caches:e}).get(s,o,n))},set(s,o){return r.set(s,o).catch(()=>OB({caches:e}).set(s,o))},delete(s){return r.delete(s).catch(()=>OB({caches:e}).delete(s))},clear(){return r.clear().catch(()=>OB({caches:e}).clear())}}}function Ode(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(o=>Promise.all([o,r.miss(o)])).then(([o])=>o)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}GS.createFallbackableCache=OB;GS.createNullCache=Ode});var Kde=K((pYt,_de)=>{_de.exports=Ude()});var Hde=K(z3=>{"use strict";Object.defineProperty(z3,"__esModule",{value:!0});function Opt(t={serializable:!0}){let e={};return{get(r,s,o={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let l=s(),u=o&&o.miss||(()=>Promise.resolve());return l.then(f=>u(f)).then(()=>l)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}z3.createInMemoryCache=Opt});var jde=K((dYt,qde)=>{qde.exports=Hde()});var Yde=K(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});function Upt(t,e,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===V3.WithinHeaders?s:{}},queryParameters(){return t===V3.WithinQueryParameters?s:{}}}}function _pt(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function Gde(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return Gde(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function Kpt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function Hpt(t,e){return Object.keys(e!==void 0?e:{}).forEach(r=>{t[r]=e[r](t)}),t}function qpt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var jpt="4.2.0",Gpt=t=>()=>t.transporter.requester.destroy(),V3={WithinQueryParameters:0,WithinHeaders:1};Fc.AuthMode=V3;Fc.addMethods=Hpt;Fc.createAuth=Upt;Fc.createRetryablePromise=_pt;Fc.createWaitablePromise=Gde;Fc.destroy=Gpt;Fc.encode=qpt;Fc.shuffle=Kpt;Fc.version=jpt});var UB=K((yYt,Wde)=>{Wde.ex
|
|||
|
`;u!==s&&(s=u,t.write(wye.default.eraseLines(r)+u),r=u.split(`
|
|||
|
`).length)};return n.clear=()=>{t.write(wye.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,e||(Bye.default.show(),o=!1)},n};VB.default={create:Wht}});var Dye=K((WYt,vye)=>{vye.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 bye=K(el=>{"use strict";var kye=Dye(),Gu=process.env;Object.defineProperty(el,"_vendors",{value:kye.map(function(t){return t.constant})});el.name=null;el.isPR=null;kye.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return Sye(s)});if(el[t.constant]=r,r)switch(el.name=t.name,typeof t.pr){case"string":el.isPR=!!Gu[t.pr];break;case"object":"env"in t.pr?el.isPR=t.pr.env in Gu&&Gu[t.pr.env]!==t.pr.ne:"any"in t.pr?el.isPR=t.pr.any.some(function(s){return!!Gu[s]}):el.isPR=Sye(t.pr);break;default:el.isPR=null}});el.isCI=!!(Gu.CI||Gu.CONTINUOUS_INTEGRATION||Gu.BUILD_NUMBER||Gu.RUN_ID||el.name);function Sye(t){return typeof t=="string"?!!Gu[t]:Object.keys(t).every(function(e){return Gu[e]===t[e]})}});var Pye=K((zYt,xye)=>{"use strict";xye.exports=bye().isCI});var Rye=K((VYt,Fye)=>{"use strict";var Jht=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};Fye.exports=(t,{include:e,exclude:r}={})=>{let s=o=>{let n=l=>typeof l=="string"?o===l:l.test(o);return e?e.some(n):r?!r.some(n):!0};for(let[o,n]of Jht(t.constructor.prototype)){if(n==="constructor"||!s(n))continue;let l=Reflect.getOwnPropertyDescriptor(o,n);l&&typeof l.value=="function"&&(t[n]=t[n].bind(t))}return t}});var _ye=K(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});var pC,XB,ab,Ab,P8;typeof window=="undefined"||typeof MessageChannel!="function"?(hC=null,F8=null,R8=function(){if(hC!==null)try{var t=qn.unstable_now();hC(!0,t),hC=null}catch(e){throw setTimeout(R8,0),e}},Tye=Date.now(),qn.unstable_now=function(){return Date.now()-Tye},pC=function(t){hC!==null?setTimeout(pC,0,t):(hC=t,setTimeout(R8,0))},XB=function(t,e){F8=setTimeout(t,e)},ab=function(){clearTimeout(F8)},Ab=function(){return!1},P8=qn.unstable_forceFrameRate=function(){}):(lb=wi
|
|||
|
in `+(j||"Unknown")+pe}Q+=R,v=v.return}while(v);return Q}new Set;var Xe=[],Vn=-1;function Ai(v){0>Vn||(v.current=Xe[Vn],Xe[Vn]=null,Vn--)}function rr(v,Q){Vn++,Xe[Vn]=v.current,v.current=Q}var Ui={},Xn={current:Ui},ms={current:!1},Ft=Ui;function $i(v,Q){var R=v.type.contextTypes;if(!R)return Ui;var j=v.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===Q)return j.__reactInternalMemoizedMaskedChildContext;var z={},pe;for(pe in R)z[pe]=Q[pe];return j&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=Q,v.__reactInternalMemoizedMaskedChildContext=z),z}function Fn(v){return v=v.childContextTypes,v!=null}function ys(v){Ai(ms,v),Ai(Xn,v)}function wA(v){Ai(ms,v),Ai(Xn,v)}function Pr(v,Q,R){if(Xn.current!==Ui)throw Error(n(168));rr(Xn,Q,v),rr(ms,R,v)}function Ro(v,Q,R){var j=v.stateNode;if(v=Q.childContextTypes,typeof j.getChildContext!="function")return R;j=j.getChildContext();for(var z in j)if(!(z in v))throw Error(n(108,ye(Q)||"Unknown",z));return r({},R,{},j)}function mr(v){var Q=v.stateNode;return Q=Q&&Q.__reactInternalMemoizedMergedChildContext||Ui,Ft=Xn.current,rr(Xn,Q,v),rr(ms,ms.current,v),!0}function Ha(v,Q,R){var j=v.stateNode;if(!j)throw Error(n(169));R?(Q=Ro(v,Q,Ft),j.__reactInternalMemoizedMergedChildContext=Q,Ai(ms,v),Ai(Xn,v),rr(Xn,Q,v)):Ai(ms,v),rr(ms,R,v)}var Z=o.unstable_runWithPriority,nn=o.unstable_scheduleCallback,we=o.unstable_cancelCallback,qt=o.unstable_shouldYield,sl=o.unstable_requestPaint,es=o.unstable_now,tc=o.unstable_getCurrentPriorityLevel,zt=o.unstable_ImmediatePriority,BA=o.unstable_UserBlockingPriority,Jc=o.unstable_NormalPriority,rf=o.unstable_LowPriority,ol=o.unstable_IdlePriority,zc={},On=sl!==void 0?sl:function(){},wi=null,al=null,Vc=!1,ca=es(),ts=1e4>ca?es:function(){return es()-ca};function To(){switch(tc()){case zt:return 99;case BA:return 98;case Jc:return 97;case rf:return 96;case ol:return 95;default:throw Error(n(332))}}function at(v){switch(v){case 99:return zt;case 98:return BA;case 97:return Jc;case 96:return rf;case 95:return ol;default:throw Error(n(332))}}function ao(v,Q){return v=at(v),Z(v,Q)}function qa(v,Q,R){return v=at(v),nn(v,Q,R)}function rc(v){return wi===null?(wi=[v],al=nn(zt,ja)):wi.push(v),zc}function Yi(){if(al!==null){var v=al;al=null,we(v)}ja()}function ja(){if(!Vc&&wi!==null){Vc=!0;var v=0;try{var Q=wi;ao(99,function(){for(;v<Q.length;v++){var R=Q[v];do R=R(!0);while(R!==null)}}),wi=null}catch(R){throw wi!==null&&(wi=wi.slice(v+1)),nn(zt,Yi),R}finally{Vc=!1}}}var QA=3;function xr(v,Q,R){return R/=10,1073741821-(((1073741821-v+Q/10)/R|0)+1)*R}function vA(v,Q){return v===Q&&(v!==0||1/v==1/Q)||v!==v&&Q!==Q}var ks=typeof Object.is=="function"?Object.is:vA,jt=Object.prototype.hasOwnProperty;function Rn(v,Q){if(ks(v,Q))return!0;if(typeof v!="object"||v===null||typeof Q!="object"||Q===null)return!1;var R=Object.keys(v),j=Object.keys(Q);if(R.length!==j.length)return!1;for(j=0;j<R.length;j++)if(!jt.call(Q,R[j])||!ks(v[R[j]],Q[R[j]]))return!1;return!0}function hi(v,Q){if(v&&v.defaultProps){Q=r({},Q),v=v.defaultProps;for(var R in v)Q[R]===void 0&&(Q[R]=v[R])}return Q}var ua={current:null},Ao=null,Ss=null,fa=null;function nr(){fa=Ss=Ao=null}function ga(v,Q){var R=v.type._context;k?(rr(ua,R._currentValue,v),R._currentValue=Q):(rr(ua,R._currentValue2,v),R._currentValue2=Q)}function bs(v){var Q=ua.current;Ai(ua,v),v=v.type._context,k?v._currentValue=Q:v._currentValue2=Q}function lo(v,Q){for(;v!==null;){var R=v.alternate;if(v.childExpirationTime<Q)v.childExpirationTime=Q,R!==null&&R.childExpirationTime<Q&&(R.childExpirationTime=Q);else if(R!==null&&R.childExpirationTime<Q)R.childExpirationTime=Q;else break;v=v.return}}function co(v,Q){Ao=v,fa=Ss=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.expirationTime>=Q&&(ma=!0),v.firstContext=null)}function uo(v,Q){if(fa!==v&&Q!==!1&&Q!==0)if((typeof Q!="number"||Q===1073741823)&&(fa=v,Q=1073741823),Q={context:v,observedBits:Q,next:null},Ss===null){if(Ao===null)throw Error(n(308));Ss=Q,Ao.dependencies={expirationTime:0,firstContext:Q,responders:null}}else Ss=Ss.next=Q;return k?v._currentValue:v._cur
|
|||
|
|
|||
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+il(z))}Cs!==lc&&(Cs=Ki),pe=M0(pe,z),kt=j;do{switch(kt.tag){case 3:be=pe,kt.effectTag|=4096,kt.expirationTime=Q;var et=N2(kt,be,Q);Al(kt,et);break e;case 1:be=pe;var Et=kt.type,Zt=kt.stateNode;if((kt.effectTag&64)==0&&(typeof Et.getDerivedStateFromError=="function"||Zt!==null&&typeof Zt.componentDidCatch=="function"&&(iu===null||!iu.has(Zt)))){kt.effectTag|=4096,kt.expirationTime=Q;var Fr=M2(kt,be,Q);Al(kt,Fr);break e}}kt=kt.return}while(kt!==null)}Jr=K2(Jr)}catch(Un){Q=Un;continue}break}while(1)}function pf(){var v=Vg.current;return Vg.current=Oo,v===null?Oo:v}function VC(v,Q){v<PA&&2<v&&(PA=v),Q!==null&&v<Af&&2<v&&(Af=v,zd=Q)}function $d(v){v>Xg&&(Xg=v)}function Tx(){for(;Jr!==null;)Jr=_2(Jr)}function Nx(){for(;Jr!==null&&!qt();)Jr=_2(Jr)}function _2(v){var Q=q2(v.alternate,v,Rs);return v.memoizedProps=v.pendingProps,Q===null&&(Q=K2(v)),GC.current=null,Q}function K2(v){Jr=v;do{var Q=Jr.alternate;if(v=Jr.return,(Jr.effectTag&2048)==0){e:{var R=Q;Q=Jr;var j=Rs,z=Q.pendingProps;switch(Q.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:Fn(Q.type)&&ys(Q);break;case 3:ul(Q),wA(Q),z=Q.stateNode,z.pendingContext&&(z.context=z.pendingContext,z.pendingContext=null),(R===null||R.child===null)&&SA(Q)&&Xa(Q),pl(Q);break;case 5:qg(Q);var pe=ha(cl.current);if(j=Q.type,R!==null&&Q.stateNode!=null)Ps(R,Q,j,z,pe),R.ref!==Q.ref&&(Q.effectTag|=128);else if(z){if(R=ha(fo.current),SA(Q)){if(z=Q,!m)throw Error(n(175));R=Og(z.stateNode,z.type,z.memoizedProps,pe,R,z),z.updateQueue=R,R=R!==null,R&&Xa(Q)}else{var be=Qt(j,z,pe,R,Q);ac(be,Q,!1,!1),Q.stateNode=be,Ge(be,j,z,pe,R)&&Xa(Q)}Q.ref!==null&&(Q.effectTag|=128)}else if(Q.stateNode===null)throw Error(n(166));break;case 6:if(R&&Q.stateNode!=null)tn(R,Q,R.memoizedProps,z);else{if(typeof z!="string"&&Q.stateNode===null)throw Error(n(166));if(R=ha(cl.current),pe=ha(fo.current),SA(Q)){if(R=Q,!m)throw Error(n(176));(R=Ug(R.stateNode,R.memoizedProps,R))&&Xa(Q)}else Q.stateNode=yt(z,R,pe,Q)}break;case 11:break;case 13:if(Ai(ci,Q),z=Q.memoizedState,(Q.effectTag&64)!=0){Q.expirationTime=j;break e}z=z!==null,pe=!1,R===null?Q.memoizedProps.fallback!==void 0&&SA(Q):(j=R.memoizedState,pe=j!==null,z||j===null||(j=R.child.sibling,j!==null&&(be=Q.firstEffect,be!==null?(Q.firstEffect=j,j.nextEffect=be):(Q.firstEffect=Q.lastEffect=j,j.nextEffect=null),j.effectTag=8))),z&&!pe&&(Q.mode&2)!=0&&(R===null&&Q.memoizedProps.unstable_avoidThisFallback!==!0||(ci.current&1)!=0?Cs===ru&&(Cs=Za):((Cs===ru||Cs===Za)&&(Cs=hl),Xg!==0&&Ti!==null&&(mf(Ti,Rs),G2(Ti,Xg)))),D&&z&&(Q.effectTag|=4),I&&(z||pe)&&(Q.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:ul(Q),pl(Q);break;case 10:bs(Q);break;case 9:break;case 14:break;case 17:Fn(Q.type)&&ys(Q);break;case 19:if(Ai(ci,Q),z=Q.memoizedState,z===null)break;if(pe=(Q.effectTag&64)!=0,be=z.rendering,be===null){if(pe)Ac(z,!1);else if(Cs!==ru||R!==null&&(R.effectTag&64)!=0)for(R=Q.child;R!==null;){if(be=nf(R),be!==null){for(Q.effectTag|=64,Ac(z,!1),R=be.updateQueue,R!==null&&(Q.updateQueue=R,Q.effectTag|=4),z.lastEffect===null&&(Q.firstEffect=null),Q.lastEffect=z.lastEffect,R=j,z=Q.child;z!==null;)pe=z,j=R,pe.effectTag&=2,pe.nextEffect=null,pe.firstEffect=null,pe.lastEffect=null,be=pe.alternate,be===null?(pe.childExpirationTime=0,pe.expirationTime=j,pe.child=null,pe.memoizedProps=null,pe.memoizedState=null,pe.updateQueue=null,pe.dependencies=null):(pe.childExpirationTime=be.childExpirationTime,pe.expirationTime=be.expirationTime,pe.child=be.child,pe.memoizedProps=be.memoizedProps,pe.memoizedState=be.memoizedState,pe.updateQueue=be.updateQueue,j=be.dependencies,pe.dependencies=j===null?null:{expirationTime:j.expirationTime,firstContext:j.firstContext,responders:j.responders}),z=z.sibling;rr(ci,ci.current&1|2,Q),Q=Q.child;break e}R=R.sibling}}else{if(!pe)if(R=nf(be),R!==null){if(Q.effectTag|=64,pe=!0,R=R.updateQueue,R!==null&&(Q.updateQueue=R,Q.effectTag|=4),Ac(z,!0),z.tail===null&&z.tailMode==="hidden"&&!be.alternate){Q=Q.lastEffect=z.lastEff
|
|||
|
`+Module.extraStackTrace()),demangleAll(t)}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(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.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(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,o=new Array(s),n=stringToUTF8Array(t,o,0,o.length);return e&&(o.length=n),o}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,o;r&&(o=e+lengthBytesUTF8(t),s=HEAP8[o]),stringToUTF8(t,e,Infinity),r&&(HEAP8[o]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;func
|
|||
|
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),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 Sd=K((n7t,Zye)=>{"use strict";var edt=Vye(),tdt=Xye(),j8=!1,G8=null;tdt({},function(t,e){if(!j8){if(j8=!0,t)throw t;G8=e}});if(!j8)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");Zye.exports=edt(G8.bind,G8.lib)});var W8=K((i7t,Y8)=>{"use strict";var $ye=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Y8.exports=$ye;Y8.exports.default=$ye});var tCe=K((s7t,eCe)=>{"use strict";eCe.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
|
|||
|
`))e=Math.max(e,sdt(r));return e};z8.exports=nCe;z8.exports.default=nCe});var iCe=K(r1=>{"use strict";var odt=r1&&r1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r1,"__esModule",{value:!0});var adt=odt(V8()),X8={};r1.default=t=>{if(t.length===0)return{width:0,height:0};if(X8[t])return X8[t];let e=adt.default(t),r=t.split(`
|
|||
|
`).length;return X8[t]={width:e,height:r},{width:e,height:r}}});var sCe=K(n1=>{"use strict";var Adt=n1&&n1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n1,"__esModule",{value:!0});var xn=Adt(Sd()),ldt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?xn.default.POSITION_TYPE_ABSOLUTE:xn.default.POSITION_TYPE_RELATIVE)},cdt=(t,e)=>{"marginLeft"in e&&t.setMargin(xn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(xn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(xn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(xn.default.EDGE_BOTTOM,e.marginBottom||0)},udt=(t,e)=>{"paddingLeft"in e&&t.setPadding(xn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(xn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(xn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(xn.default.EDGE_BOTTOM,e.paddingBottom||0)},fdt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(xn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(xn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(xn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(xn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(xn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(xn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(xn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(xn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(xn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(xn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(xn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(xn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(xn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(xn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(xn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(xn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(xn.default.JUSTIFY_SPACE_AROUND))},gdt=(t,e)=>{var r,s;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},pdt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?xn.default.DISPLAY_FLEX:xn.default.DISPLAY_NONE)},hdt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(xn.default.EDGE_TOP,r),t.setBorder(xn.default.EDGE_BOTTOM,r),t.setBorder(xn.default.EDGE_LEFT,r),t.setBorder(xn.default.EDGE_RIGHT,r)}};n1.default=(t,e={})=>{ldt(t,e),cdt(t,e),udt(t,e),fdt(t,e),gdt(t,e),pdt(t,e),hdt(t,e)}});var ACe=K((c7t,oCe)=>{"use strict";var i1=mb(),ddt=Pv(),mdt=sE(),Z8=new Set(["","\x9B"]),ydt=39,aCe=t=>`${Z8.values().next().value}[${t}m`,Cdt=t=>t.split(" ").map(e=>i1(e)),$8=(t,e,r)=>{let s=[...e],o=!1,n=i1(ddt(t[t.length-1]));for(let[l,u]of s.entries()){let f=i1(u);if
|
|||
|
`);for(let[f,g]of[...s].entries()){if(o+=g,Z8.has(g)){let w=parseFloat(/\d[^m]*/.exec(s.slice(f,f+4)));n=w===ydt?null:w}let C=mdt.codes.get(Number(n));n&&C&&(s[f+1]===`
|
|||
|
`?o+=aCe(C):g===`
|
|||
|
`&&(o+=aCe(n)))}return o};oCe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|||
|
`).split(`
|
|||
|
`).map(s=>Edt(s,e,r)).join(`
|
|||
|
`)});var uCe=K((u7t,lCe)=>{"use strict";var cCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",wdt=t=>t&&t.exact?new RegExp(`^${cCe}$`):new RegExp(cCe,"g");lCe.exports=wdt});var e_=K((f7t,fCe)=>{"use strict";var Bdt=W8(),Qdt=uCe(),gCe=sE(),pCe=["","\x9B"],yb=t=>`${pCe[0]}[${t}m`,hCe=(t,e,r)=>{let s=[];t=[...t];for(let o of t){let n=o;o.match(";")&&(o=o.split(";")[0][0]+"0");let l=gCe.codes.get(parseInt(o,10));if(l){let u=t.indexOf(l.toString());u>=0?t.splice(u,1):s.push(yb(e?l:n))}else if(e){s.push(yb(0));break}else s.push(yb(n))}if(e&&(s=s.filter((o,n)=>s.indexOf(o)===n),r!==void 0)){let o=yb(gCe.codes.get(parseInt(r,10)));s=s.reduce((n,l)=>l===o?[l,...n]:[...n,l],[])}return s.join("")};fCe.exports=(t,e,r)=>{let s=[...t.normalize()],o=[];r=typeof r=="number"?r:s.length;let n=!1,l,u=0,f="";for(let[g,C]of s.entries()){let w=!1;if(pCe.includes(C)){let B=/\d[^m]*/.exec(t.slice(g,g+18));l=B&&B.length>0?B[0]:void 0,u<r&&(n=!0,l!==void 0&&o.push(l))}else n&&C==="m"&&(n=!1,w=!0);if(!n&&!w&&++u,!Qdt({exact:!0}).test(C)&&Bdt(C.codePointAt())&&++u,u>e&&u<=r)f+=C;else if(u===e&&!n&&l!==void 0)f=hCe(o);else if(u>=r){f+=hCe(o,!0,l);break}}return f}});var mCe=K((g7t,dCe)=>{"use strict";var h0=e_(),vdt=mb();function Cb(t,e,r){if(t.charAt(e)===" ")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===" ")return e+s}else if(t.charAt(e-s)===" ")return e-s;return e}dCe.exports=(t,e,r)=>{r=re({position:"end",preferTruncationOnSpace:!1},r);let{position:s,space:o,preferTruncationOnSpace:n}=r,l="\u2026",u=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return l;let f=vdt(t);if(f<=e)return t;if(s==="start"){if(n){let g=Cb(t,f-e+1,!0);return l+h0(t,g,f).trim()}return o===!0&&(l+=" ",u=2),l+h0(t,f-e+u,f)}if(s==="middle"){o===!0&&(l=" "+l+" ",u=3);let g=Math.floor(e/2);if(n){let C=Cb(t,g),w=Cb(t,f-(e-g)+1,!0);return h0(t,0,C)+l+h0(t,w,f).trim()}return h0(t,0,g)+l+h0(t,f-(e-g)+u,f)}if(s==="end"){if(n){let g=Cb(t,e-1);return h0(t,0,g)+l}return o===!0&&(l=" "+l,u=2),h0(t,0,e-u)+l}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var r_=K(s1=>{"use strict";var yCe=s1&&s1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(s1,"__esModule",{value:!0});var Ddt=yCe(ACe()),kdt=yCe(mCe()),t_={};s1.default=(t,e,r)=>{let s=t+String(e)+String(r);if(t_[s])return t_[s];let o=t;if(r==="wrap"&&(o=Ddt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),o=kdt.default(t,e,{position:n})}return t_[s]=o,o}});var i_=K(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var CCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=CCe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),e+=s}return e};n_.default=CCe});var s_=K(Pi=>{"use strict";var o1=Pi&&Pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.setTextNodeValue=Pi.createTextNode=Pi.setStyle=Pi.setAttribute=Pi.removeChildNode=Pi.insertBeforeNode=Pi.appendChildNode=Pi.createNode=Pi.TEXT_NAME=void 0;var Sdt=o1(Sd()),ICe=o1(iCe()),bdt=o1(sCe()),xdt=o1(r_()),Pdt=o1(i_());Pi.TEXT_NAME="#text";Pi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:Sdt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(Fdt.bind(null,r))),r};Pi.appendChildNode=(t,e)=>{var r;e.parentNode&&Pi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Ib(t)};Pi.insertBefore
|
|||
|
`:`
|
|||
|
`)+r,o=s+1,s=t.indexOf(`
|
|||
|
`,o)}while(s!==-1);return n+=t.substr(o),n};TCe.exports={stringReplaceAll:Ndt,stringEncaseCRLFWithFirstIndex:Mdt}});var _Ce=K((B7t,MCe)=>{"use strict";var Ldt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,LCe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Odt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Udt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,_dt=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function OCe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):_dt.get(t)||t}function Kdt(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),o;for(let n of s){let l=Number(n);if(!Number.isNaN(l))r.push(l);else if(o=n.match(Odt))r.push(o[2].replace(Udt,(u,f,g)=>f?OCe(f):g));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Hdt(t){LCe.lastIndex=0;let e=[],r;for(;(r=LCe.exec(t))!==null;){let s=r[1];if(r[2]){let o=Kdt(s,r[2]);e.push([s].concat(o))}else e.push([s])}return e}function UCe(t,e){let r={};for(let o of e)for(let n of o.styles)r[n[0]]=o.inverse?null:n.slice(1);let s=t;for(let[o,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(o in s))throw new Error(`Unknown Chalk style: ${o}`);s=n.length>0?s[o](...n):s[o]}return s}MCe.exports=(t,e)=>{let r=[],s=[],o=[];if(e.replace(Ldt,(n,l,u,f,g,C)=>{if(l)o.push(OCe(l));else if(f){let w=o.join("");o=[],s.push(r.length===0?w:UCe(t,r)(w)),r.push({inverse:u,styles:Hdt(f)})}else if(g){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(UCe(t,r)(o.join(""))),o=[],r.pop()}else o.push(C)}),s.push(o.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var Db=K((Q7t,KCe)=>{"use strict";var l1=sE(),{stdout:a_,stderr:A_}=FR(),{stringReplaceAll:qdt,stringEncaseCRLFWithFirstIndex:jdt}=NCe(),{isArray:wb}=Array,HCe=["ansi","ansi","ansi256","ansi16m"],dC=Object.create(null),Gdt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=a_?a_.level:0;t.level=e.level===void 0?r:e.level},qCe=class{constructor(e){return jCe(e)}},jCe=t=>{let e={};return Gdt(e,t),e.template=(...r)=>GCe(e.template,...r),Object.setPrototypeOf(e,Bb.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=qCe,e.template};function Bb(t){return jCe(t)}for(let[t,e]of Object.entries(l1))dC[t]={get(){let r=Qb(this,l_(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};dC.visible={get(){let t=Qb(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var YCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of YCe)dC[t]={get(){let{level:e}=this;return function(...r){let s=l_(l1.color[HCe[e]][t](...r),l1.color.close,this._styler);return Qb(this,s,this._isEmpty)}}};for(let t of YCe){let e="bg"+t[0].toUpperCase()+t.slice(1);dC[e]={get(){let{level:r}=this;return function(...s){let o=l_(l1.bgColor[HCe[r]][t](...s),l1.bgColor.close,this._styler);return Qb(this,o,this._isEmpty)}}}}var Ydt=Object.defineProperties(()=>{},Me(re({},dC),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),l_=(t,e,r)=>{let s,o;return r===void 0?(s=t,o=e):(s=r.openAll+t,o=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:o,parent:r}},Qb=(t,e,r)=>{let s=(...o)=>wb(o[0])&&wb(o[0].raw)?WCe(s,GCe(s,...o)):WCe(s,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(s,Ydt),s._generator=t,s._styler=e,s._isEmpty=r,s},WCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:o}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=qdt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
|||
|
`);return n!==-1&&(e=jdt(e,o,s,n)),s+e+o},c_,GCe=(t,...e)=>{let[r]=e;if(!wb(r)||!wb(r.raw))return e.join(" ");let s=e.slice(1),o=[r.raw[0]];for(let n=1;n<r.length;n++)o.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return c_===void 0&&(c_=_Ce()),c_(t,o.join(""))};Object.defineProperties(Bb.prototype,dC);var vb=Bb();vb.supportsColor=a_;vb.stderr=Bb({level:A_?A_.level:0});vb.stderr.supportsColor=A_;KCe.exports=vb});var u_=K(c1=>{"use strict";var Wdt=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,"__esModule",{value:!0});var u1=Wdt(Db()),Jdt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,zdt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,kb=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);c1.default=(t,e,r)=>{if(!e)return t;if(e in u1.default){let o=kb(e,r);return u1.default[o](t)}if(e.startsWith("#")){let o=kb("hex",r);return u1.default[o](e)(t)}if(e.startsWith("ansi")){let o=zdt.exec(e);if(!o)return t;let n=kb(o[1],r),l=Number(o[2]);return u1.default[n](l)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let o=Jdt.exec(e);if(!o)return t;let n=kb(o[1],r),l=Number(o[2]),u=Number(o[3]),f=Number(o[4]);return u1.default[n](l,u,f)(t)}return t}});var zCe=K(f1=>{"use strict";var JCe=f1&&f1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(f1,"__esModule",{value:!0});var Vdt=JCe(RCe()),f_=JCe(u_());f1.default=(t,e,r,s)=>{if(typeof r.style.borderStyle=="string"){let o=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),l=r.style.borderColor,u=Vdt.default[r.style.borderStyle],f=f_.default(u.topLeft+u.horizontal.repeat(o-2)+u.topRight,l,"foreground"),g=(f_.default(u.vertical,l,"foreground")+`
|
|||
|
`).repeat(n-2),C=f_.default(u.bottomLeft+u.horizontal.repeat(o-2)+u.bottomRight,l,"foreground");s.write(t,e,f,{transformers:[]}),s.write(t,e+1,g,{transformers:[]}),s.write(t+o-1,e+1,g,{transformers:[]}),s.write(t,e+n-1,C,{transformers:[]})}}});var XCe=K(g1=>{"use strict";var bd=g1&&g1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g1,"__esModule",{value:!0});var Xdt=bd(Sd()),Zdt=bd(V8()),$dt=bd(SCe()),emt=bd(r_()),tmt=bd(bCe()),rmt=bd(i_()),nmt=bd(zCe()),imt=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let o=s.getComputedLeft(),n=s.getComputedTop();e=`
|
|||
|
`.repeat(n)+$dt.default(e,o)}return e},VCe=(t,e,r)=>{var s;let{offsetX:o=0,offsetY:n=0,transformers:l=[],skipStaticElements:u}=r;if(u&&t.internal_static)return;let{yogaNode:f}=t;if(f){if(f.getDisplay()===Xdt.default.DISPLAY_NONE)return;let g=o+f.getComputedLeft(),C=n+f.getComputedTop(),w=l;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...l]),t.nodeName==="ink-text"){let B=rmt.default(t);if(B.length>0){let S=Zdt.default(B),y=tmt.default(f);if(S>y){let N=(s=t.style.textWrap)!==null&&s!==void 0?s:"wrap";B=emt.default(B,y,N)}B=imt(t,B),e.write(g,C,B,{transformers:w})}return}if(t.nodeName==="ink-box"&&nmt.default(g,C,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let B of t.childNodes)VCe(B,e,{offsetX:g,offsetY:C,transformers:w,skipStaticElements:u})}};g1.default=VCe});var $Ce=K((S7t,ZCe)=>{"use strict";ZCe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\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(e,t.onlyFirst?void 0:"g")}});var tIe=K((b7t,g_)=>{"use strict";var smt=$Ce(),eIe=t=>typeof t=="string"?t.replace(smt(),""):t;g_.exports=eIe;g_.exports.default=eIe});var iIe=K((x7t,rIe)=>{"use strict";var nIe="[\uD800-\uDBFF][\uDC00-\uDFFF]";rIe.exports=t=>t&&t.exact?new RegExp(`^${nIe}$`):new RegExp(nIe,"g")});var oIe=K((P7t,p_)=>{"use strict";var omt=tIe(),amt=iIe(),sIe=t=>omt(t).replace(amt()," ").length;p_.exports=sIe;p_.exports.default=sIe});var cIe=K(p1=>{"use strict";var aIe=p1&&p1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(p1,"__esModule",{value:!0});var AIe=aIe(e_()),Amt=aIe(oIe()),lIe=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,o){let{transformers:n}=o;!s||this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(" ".repeat(this.width));for(let s of this.writes){let{x:o,y:n,text:l,transformers:u}=s,f=l.split(`
|
|||
|
`),g=0;for(let C of f){let w=e[n+g];if(!w)continue;let B=Amt.default(C);for(let S of u)C=S(C);e[n+g]=AIe.default(w,0,o)+C+AIe.default(w,o+B),g++}}return{output:e.map(s=>s.trimRight()).join(`
|
|||
|
`),height:e.length}}};p1.default=lIe});var gIe=K(h1=>{"use strict";var h_=h1&&h1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(h1,"__esModule",{value:!0});var lmt=h_(Sd()),uIe=h_(XCe()),fIe=h_(cIe());h1.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,lmt.default.DIRECTION_LTR);let s=new fIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});uIe.default(t,s,{skipStaticElements:!0});let o;((r=t.staticNode)===null||r===void 0?void 0:r.yogaNode)&&(o=new fIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),uIe.default(t.staticNode,o,{skipStaticElements:!1}));let{output:n,height:l}=s.get();return{output:n,outputHeight:l,staticOutput:o?`${o.get().output}
|
|||
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var mIe=K((T7t,pIe)=>{"use strict";var hIe=require("stream"),dIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],d_={},cmt=t=>{let e=new hIe.PassThrough,r=new hIe.PassThrough;e.write=o=>t("stdout",o),r.write=o=>t("stderr",o);let s=new console.Console(e,r);for(let o of dIe)d_[o]=console[o],console[o]=s[o];return()=>{for(let o of dIe)console[o]=d_[o];d_={}}};pIe.exports=cmt});var y_=K(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.default=new WeakMap});var I_=K(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});var umt=yn(),yIe=umt.createContext({exit:()=>{}});yIe.displayName="InternalAppContext";C_.default=yIe});var w_=K(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var fmt=yn(),CIe=fmt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});CIe.displayName="InternalStdinContext";E_.default=CIe});var Q_=K(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var gmt=yn(),IIe=gmt.createContext({stdout:void 0,write:()=>{}});IIe.displayName="InternalStdoutContext";B_.default=IIe});var D_=K(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var pmt=yn(),EIe=pmt.createContext({stderr:void 0,write:()=>{}});EIe.displayName="InternalStderrContext";v_.default=EIe});var Sb=K(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});var hmt=yn(),wIe=hmt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});wIe.displayName="InternalFocusContext";k_.default=wIe});var QIe=K((K7t,BIe)=>{"use strict";var dmt=/[|\\{}()[\]^$+*?.-]/g;BIe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(dmt,"\\$&")}});var SIe=K((H7t,vIe)=>{"use strict";var mmt=QIe(),ymt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",DIe=[].concat(require("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));DIe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var bb=class{constructor(e){e=re({ignoredPackages:[]},e),"internals"in e||(e.internals=bb.nodeInternals()),"cwd"in e||(e.cwd=ymt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Cmt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...DIe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
|
|||
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,o=null,n=[];return e.forEach(l=>{if(l=l.replace(/\\/g,"/"),this._internals.some(f=>f.test(l)))return;let u=/^\s*at /.test(l);s?l=l.trimEnd().replace(/^(\s+)at /,"$1"):(l=l.trim(),u&&(l=l.slice(3))),l=l.replace(`${this._cwd}/`,""),l&&(u?(o&&(n.push(o),o=null),n.push(l)):(s=!0,o=l))}),n.map(l=>`${r}${l}
|
|||
|
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=Infinity);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let o={};Error.captureStackTrace(o,r);let{stack:n}=o;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=Infinity);let{prepareStackTrace:s,stackTraceLimit:o}=Error;Error.prepareStackTrace=(u,f)=>this._wrapCallSite?f.map(this._wrapCallSite):f,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:l}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:o}),l}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};kIe(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let o;try{o=r.getTypeName()}catch(u){}o&&o!=="Object"&&o!=="[object Object]"&&(s.type=o);let n=r.getFunctionName();n&&(s.function=n);let l=r.getMethodName();return l&&n!==l&&(s.method=l),s}parseLine(e){let r=e&&e.match(Imt);if(!r)return null;let s=r[1]==="new",o=r[2],n=r[3],l=r[4],u=Number(r[5]),f=Number(r[6]),g=r[7],C=r[8],w=r[9],B=r[10]==="native",S=r[11]===")",y,N={};if(C&&(N.line=Number(C)),w&&(N.column=Number(w)),S&&g){let L=0;for(let H=g.length-1;H>0;H--)if(g.charAt(H)===")")L++;else if(g.charAt(H)==="("&&g.charAt(H-1)===" "&&(L--,L===-1&&g.charAt(H-1)===" ")){let G=g.slice(0,H-1);g=g.slice(H+1),o+=` (${G}`;break}}if(o){let L=o.match(Emt);L&&(o=L[1],y=L[2])}return kIe(N,g,this._cwd),s&&(N.constructor=!0),n&&(N.evalOrigin=n,N.evalLine=u,N.evalColumn=f,N.evalFile=l&&l.replace(/\\/g,"/")),B&&(N.native=!0),o&&(N.function=o),y&&o!==y&&(N.method=y),N}};function kIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function Cmt(t){if(t.length===0)return[];let e=t.map(r=>mmt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Imt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Emt=/^(.*?) \[as (.*?)\]$/;vIe.exports=bb});var xIe=K((q7t,bIe)=>{"use strict";bIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var FIe=K((j7t,PIe)=>{"use strict";var wmt=xIe(),Bmt=(t,e)=>{let r=[],s=t-e,o=t+e;for(let n=s;n<=o;n++)r.push(n);return r};PIe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=wmt(t).split(/\r?\n/),!(e>t.length))return r=re({around:3},r),Bmt(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var xb=K(Mc=>{"use strict";var Qmt=Mc&&Mc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),vmt=Mc&&Mc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Dmt=Mc&&Mc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Qmt(e,t,r);return vmt(e,t),e},kmt=Mc&&Mc.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(r[s[o]]=t[s[o]]);return r};Object.defineProperty(Mc,"__esModule",{value:!0});var RIe=Dmt(yn()),S_=RIe.forwardRef((t,e)=>{var{children:r}=t,s=kmt(t,["children"]);let o=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop
|
|||
|
`).slice(1):void 0,r=e?LIe.parseLine(e[0]):void 0,s,o=0;if((r==null?void 0:r.file)&&(r==null?void 0:r.line)&&NIe.existsSync(r.file)){let n=NIe.readFileSync(r.file,"utf8");if(s=Fmt.default(n,r.line),s)for(let{line:l}of s)o=Math.max(o,String(l).length)}return Gs.default.createElement(Qg.default,{flexDirection:"column",padding:1},Gs.default.createElement(Qg.default,null,Gs.default.createElement(Yu.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Gs.default.createElement(Yu.default,null," ",t.message)),r&&Gs.default.createElement(Qg.default,{marginTop:1},Gs.default.createElement(Yu.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Gs.default.createElement(Qg.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:l})=>Gs.default.createElement(Qg.default,{key:n},Gs.default.createElement(Qg.default,{width:o+1},Gs.default.createElement(Yu.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(o," "),":")),Gs.default.createElement(Yu.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+l)))),t.stack&&Gs.default.createElement(Qg.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
|||
|
`).slice(1).map(n=>{let l=LIe.parseLine(n);return l?Gs.default.createElement(Qg.default,{key:n},Gs.default.createElement(Yu.default,{dimColor:!0},"- "),Gs.default.createElement(Yu.default,{dimColor:!0,bold:!0},l.function),Gs.default.createElement(Yu.default,{dimColor:!0,color:"gray"}," ","(",l.file,":",l.line,":",l.column,")")):Gs.default.createElement(Qg.default,{key:n},Gs.default.createElement(Yu.default,{dimColor:!0},"- "),Gs.default.createElement(Yu.default,{dimColor:!0,bold:!0},n))})))};Lc.default=Rmt});var _Ie=K(Oc=>{"use strict";var Tmt=Oc&&Oc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Nmt=Oc&&Oc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mmt=Oc&&Oc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Tmt(e,t,r);return Nmt(e,t),e},xd=Oc&&Oc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oc,"__esModule",{value:!0});var Pd=Mmt(yn()),UIe=xd(x8()),Lmt=xd(I_()),Omt=xd(w_()),Umt=xd(Q_()),_mt=xd(D_()),Kmt=xd(Sb()),Hmt=xd(OIe()),qmt=" ",jmt="[Z",Gmt="",F_=class extends Pd.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{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"),e){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=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===Gmt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===qmt&&this.focusNext(),e===jmt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let o=s.activeFocusId;return!o&&r&&(o=e),{activeFocusId:o,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(s=>s.id===e.activeFocusId);for(let s=r+1;s<e.focusables.length;s++)if(e.focusables[s].isActive)return e.focusables[s].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(s=>s.id===e.activeFocusId);for(let s=r-1;s>=0;s--)if(e.focusables[s].isActive)return e.focusables[s].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Pd.default.createElement(Lmt.default.Provider,{value:{exit:this.handleExit}},Pd.default.createElement(Omt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Pd.default.createElement(Umt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Pd.default.createElement(_mt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Pd.default.createElement(Kmt.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?Pd.default.createElement(Hmt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){UIe.default.hide(this.props.stdout)}componentWillUnmount(){UIe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};Oc.default=F_;F_.displayName="InternalApp"});var jIe=K(Uc=>{"use strict";var Ymt=Uc&&Uc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Wmt=Uc&&Uc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jmt=Uc&&Uc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Ymt(e,t,r);return Wmt(e,t),e},_c=Uc&&Uc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Uc,"__esModule",{value:!0});var zmt=_c(yn()),KIe=iM(),Vmt=_c(Qye()),Xmt=_c(v8()),Zmt=_c(Pye()
|
|||
|
`;if(this.options.debug){n&&(this.fullStaticOutput+=o),this.options.stdout.write(this.fullStaticOutput+r);return}if(yC){n&&this.options.stdout.write(o),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=o),s>=this.options.stdout.rows){this.options.stdout.write(Xmt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(o),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},$mt.default(this),this.options=e,this.rootNode=nyt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:KIe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Vmt.default.create(e.stdout),this.throttledLog=e.debug?this.log:KIe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=R_.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=tyt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),yC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=zmt.default.createElement(syt.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},e);R_.default.updateContainer(r,this.container,null,HIe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(yC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(yC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),yC?this.options.stdout.write(this.lastOutput+`
|
|||
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,R_.default.updateContainer(null,this.container,null,HIe),iyt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!yC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=ryt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};Uc.default=qIe});var YIe=K(y1=>{"use strict";var GIe=y1&&y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(y1,"__esModule",{value:!0});var oyt=GIe(jIe()),Pb=GIe(y_()),ayt=require("stream"),cyt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},Ayt(e)),s=lyt(r.stdout,()=>new oyt.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>Pb.default.delete(r.stdout),clear:s.clear}};y1.default=cyt;var Ayt=(t={})=>t instanceof ayt.Stream?{stdout:t,stdin:process.stdin}:t,lyt=(t,e)=>{let r;return Pb.default.has(t)?r=Pb.default.get(t):(r=e(),Pb.default.set(t,r)),r}});var JIe=K(vg=>{"use strict";var uyt=vg&&vg.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),fyt=vg&&vg.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gyt=vg&&vg.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&uyt(e,t,r);return fyt(e,t),e};Object.defineProperty(vg,"__esModule",{value:!0});var C1=gyt(yn()),WIe=t=>{let{items:e,children:r,style:s}=t,[o,n]=C1.useState(0),l=C1.useMemo(()=>e.slice(o),[e,o]);C1.useLayoutEffect(()=>{n(e.length)},[e.length]);let u=l.map((g,C)=>r(g,o+C)),f=C1.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return C1.default.createElement("ink-box",{internal_static:!0,style:f},u)};WIe.displayName="Static";vg.default=WIe});var VIe=K(I1=>{"use strict";var pyt=I1&&I1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(I1,"__esModule",{value:!0});var hyt=pyt(yn()),zIe=({children:t,transform:e})=>t==null?null:hyt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);zIe.displayName="Transform";I1.default=zIe});var ZIe=K(E1=>{"use strict";var dyt=E1&&E1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(E1,"__esModule",{value:!0});var myt=dyt(yn()),XIe=({count:t=1})=>myt.default.createElement("ink-text",null,`
|
|||
|
`.repeat(t));XIe.displayName="Newline";E1.default=XIe});var tEe=K(w1=>{"use strict";var $Ie=w1&&w1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(w1,"__esModule",{value:!0});var yyt=$Ie(yn()),Cyt=$Ie(xb()),eEe=()=>yyt.default.createElement(Cyt.default,{flexGrow:1});eEe.displayName="Spacer";w1.default=eEe});var Fb=K(B1=>{"use strict";var Iyt=B1&&B1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(B1,"__esModule",{value:!0});var Eyt=yn(),wyt=Iyt(w_()),Byt=()=>Eyt.useContext(wyt.default);B1.default=Byt});var nEe=K(Q1=>{"use strict";var Qyt=Q1&&Q1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Q1,"__esModule",{value:!0});var rEe=yn(),vyt=Qyt(Fb()),Dyt=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:o}=vyt.default();rEe.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),rEe.useEffect(()=>{if(e.isActive===!1)return;let n=l=>{let u=String(l),f={upArrow:u==="[A",downArrow:u==="[B",leftArrow:u==="[D",rightArrow:u==="[C",pageDown:u==="[6~",pageUp:u==="[5~",return:u==="\r",escape:u==="",ctrl:!1,shift:!1,tab:u===" "||u==="[Z",backspace:u==="\b",delete:u==="\x7F"||u==="[3~",meta:!1};u<=""&&!f.return&&(u=String.fromCharCode(u.charCodeAt(0)+"a".charCodeAt(0)-1),f.ctrl=!0),u.startsWith("")&&(u=u.slice(1),f.meta=!0);let g=u>="A"&&u<="Z",C=u>="\u0410"&&u<="\u042F";u.length===1&&(g||C)&&(f.shift=!0),f.tab&&u==="[Z"&&(f.shift=!0),(f.tab||f.backspace||f.delete)&&(u=""),(!(u==="c"&&f.ctrl)||!o)&&t(u,f)};return r==null||r.on("data",n),()=>{r==null||r.off("data",n)}},[e.isActive,r,o,t])};Q1.default=Dyt});var iEe=K(v1=>{"use strict";var kyt=v1&&v1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(v1,"__esModule",{value:!0});var Syt=yn(),byt=kyt(I_()),xyt=()=>Syt.useContext(byt.default);v1.default=xyt});var sEe=K(D1=>{"use strict";var Pyt=D1&&D1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(D1,"__esModule",{value:!0});var Fyt=yn(),Ryt=Pyt(Q_()),Tyt=()=>Fyt.useContext(Ryt.default);D1.default=Tyt});var oEe=K(k1=>{"use strict";var Nyt=k1&&k1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k1,"__esModule",{value:!0});var Myt=yn(),Lyt=Nyt(D_()),Oyt=()=>Myt.useContext(Lyt.default);k1.default=Oyt});var AEe=K(S1=>{"use strict";var aEe=S1&&S1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(S1,"__esModule",{value:!0});var b1=yn(),Uyt=aEe(Sb()),_yt=aEe(Fb()),Kyt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:s}=_yt.default(),{activeId:o,add:n,remove:l,activate:u,deactivate:f}=b1.useContext(Uyt.default),g=b1.useMemo(()=>Math.random().toString().slice(2,7),[]);return b1.useEffect(()=>(n(g,{autoFocus:e}),()=>{l(g)}),[g,e]),b1.useEffect(()=>{t?u(g):f(g)},[t,g]),b1.useEffect(()=>{if(!(!r||!t))return s(!0),()=>{s(!1)}},[t]),{isFocused:Boolean(g)&&o===g}};S1.default=Kyt});var lEe=K(x1=>{"use strict";var Hyt=x1&&x1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(x1,"__esModule",{value:!0});var qyt=yn(),jyt=Hyt(Sb()),Gyt=()=>{let t=qyt.useContext(jyt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};x1.default=Gyt});var cEe=K(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});T_.default=t=>{var e,r,s,o;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(o=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&o!==void 0?o:0}}});var Xl=K(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});var Yyt=YIe();Object.defineProperty(bo,"render",{enumerable:!0,get:function(){return Yyt.default}});var Wyt=xb();Object.defineProperty(bo,"Box",{enumerable:!0,get:function(){return Wyt.default}});var Jyt=P_();Object.defineProperty(bo,"Text",{enumerable:!0,get:function(){return Jyt.default}});var zyt=JIe();Obje
|
|||
|
`:"";return l?w+=`@IF EXIST ${l} (\r
|
|||
|
${l} ${f} ${o} ${C}%*\r
|
|||
|
) ELSE (\r
|
|||
|
@SETLOCAL\r
|
|||
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
|||
|
${u} ${f} ${o} ${C}%*\r
|
|||
|
)\r
|
|||
|
`:w+=`@${u} ${f} ${o} ${C}%*\r
|
|||
|
`,w}function lIt(t,e,r){let s=Zl.relative(Zl.dirname(e),t),o=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let l=Zl.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,u=r.args||"",f=CK(r.nodePath).posix;o?(n=`"$basedir/${r.prog}"`,s=l):(o=l,u="",s="");let g=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="${f}"
|
|||
|
`:"";return n?C+=`${w}if [ -x ${n} ]; then
|
|||
|
exec ${n} ${u} ${s} ${g}"$@"
|
|||
|
else
|
|||
|
exec ${o} ${u} ${s} ${g}"$@"
|
|||
|
fi
|
|||
|
`:C+=`${w}${o} ${u} ${s} ${g}"$@"
|
|||
|
exit $?
|
|||
|
`,C}function cIt(t,e,r){let s=Zl.relative(Zl.dirname(e),t),o=r.prog&&r.prog.split("\\").join("/"),n=o&&`"${o}$exe"`,l;s=s.split("\\").join("/");let u=Zl.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",g=CK(r.nodePath),C=g.win32,w=g.posix;n?(l=`"$basedir/${r.prog}$exe"`,s=u):(n=u,f="",s="");let B=r.progArgs?`${r.progArgs.join(" ")} `:"",S=`#!/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&&(S+=` else {
|
|||
|
$env:NODE_PATH="${w}"
|
|||
|
}`),l?S+=`
|
|||
|
$ret=0
|
|||
|
if (Test-Path ${l}) {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${l} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${l} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
} else {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${n} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $ret
|
|||
|
`:S+=`
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${n} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $LASTEXITCODE
|
|||
|
`,S}function fIt(t,e){return e.fs_.chmod(t,493)}function CK(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Zl.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let o=e[s].split("/").join("\\"),n=uwe()?e[s].split("\\").join("/").replace(/^([^:\\/]*):/,(l,u)=>`/mnt/${u.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${o}`:o,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:o,posix:n}}return r}cwe.exports=yK});var TK=K((sZt,Rwe)=>{Rwe.exports=require("stream")});var Lwe=K((oZt,Twe)=>{"use strict";function Nwe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,s)}return r}function RIt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nwe(Object(r),!0).forEach(function(s){FIt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nwe(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function FIt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TIt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mwe(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function NIt(t,e,r){return e&&Mwe(t.prototype,e),r&&Mwe(t,r),t}var MIt=require("buffer"),Xb=MIt.Buffer,LIt=require("util"),NK=LIt.inspect,OIt=NK&&NK.custom||"inspect";function UIt(t,e,r){Xb.prototype.copy.call(t,e,r)}Twe.exports=function(){function t(){TIt(this,t),this.head=null,this.tail=null,this.length=0}return NIt(t,[{key:"push",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,o=""+s.data;s=s.next;)o+=r+s.data;return o}},{key:"concat",value:function(r){if(this.length===0)return Xb.alloc(0);for(var s=Xb.allocUnsafe(r>>>0),o=this.head,n=0;o;)UIt(o.data,s,n),n+=o.data.length,o=o.next;return s}},{key:"consume",value:function(r,s){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=s?this._getString(r):this._getBuffer(r),o}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var s=this.head,o=1,n=s.data;for(r-=n.length;s=s.next;){var l=s.data,u=r>l.length?l.length:r;if(u===l.length?n+=l:n+=l.slice(0,r),r-=u,r===0){u===l.length?(++o,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=l.slice(u));break}++o}return this.length-=o,n}},{key:"_getBuffer",value:function(r){var s=Xb.allocUnsafe(r),o=this.head,n=1;for(o.data.copy(s),r-=o.data.length;o=o.next;){var l=o.data,u=r>l.length?l.length:r;if(l.copy(s,s.length-r,0,u),r-=u,r===0){u===l.length?(++n,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=l.slice(u));break}++n}return this.length-=n,s}},{key:OIt,value:function(r,s){return NK(this,RIt({},s,{depth:0,customInspect:!1}))}}]),t}()});var LK=K((aZt,Owe)=>{"use strict";function _It(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(MK,this,t)):process.nextTick(MK,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(
|
|||
|
`)),t.linkname&&(e+=fH(" linkpath="+t.linkname+`
|
|||
|
`));var r=t.pax;if(r)for(var s in r)e+=fH(" "+s+"="+r[s]+`
|
|||
|
`);return Buffer.from(e)};xC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var o=t.slice(r+1,s-1).toString(),n=o.indexOf("=");if(n===-1)return e;e[o.slice(0,n)]=o.slice(n+1),t=t.slice(s)}return e};xC.encode=function(t){var e=Twt(512),r=t.name,s="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var o=r.indexOf("/");if(o===-1)return null;s+=s?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(S0(t.mode&_wt,6),100),e.write(S0(t.uid,6),108),e.write(S0(t.gid,6),116),e.write(S0(t.size,11),124),e.write(S0(t.mtime.getTime()/1e3|0,11),136),e[156]=UBe+qwt(t.type),t.linkname&&e.write(t.linkname,157),_Be.copy(e,n2),Lwt.copy(e,uH),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(S0(t.devmajor||0,6),329),e.write(S0(t.devminor||0,6),337),s&&e.write(s,345),e.write(S0(HBe(e),6),148),e)};xC.decode=function(t,e,r){var s=t[156]===0?0:t[156]-UBe,o=PC(t,0,100,e),n=b0(t,100,8),l=b0(t,108,8),u=b0(t,116,8),f=b0(t,124,12),g=b0(t,136,12),C=Hwt(s),w=t[157]===0?null:PC(t,157,100,e),B=PC(t,265,32),S=PC(t,297,32),y=b0(t,329,8),N=b0(t,337,8),L=HBe(t);if(L===8*32)return null;if(L!==b0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(_Be.compare(t,n2,n2+6)===0)t[345]&&(o=PC(t,345,155,e)+"/"+o);else if(!(Owt.compare(t,n2,n2+6)===0&&Uwt.compare(t,uH,uH+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&o&&o[o.length-1]==="/"&&(s=5),{name:o,mode:n,uid:l,gid:u,size:f,mtime:new Date(1e3*g),type:C,linkname:w,uname:B,gname:S,devmajor:y,devminor:N}}});var zBe=K((kZt,qBe)=>{var jBe=require("util"),Gwt=OBe(),i2=gH(),GBe=bC().Writable,YBe=bC().PassThrough,WBe=function(){},JBe=function(t){return t&=511,t&&512-t},Ywt=function(t,e){var r=new gx(t,e);return r.end(),r},Wwt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},gx=function(t,e){this._parent=t,this.offset=e,YBe.call(this,{autoDestroy:!1})};jBe.inherits(gx,YBe);gx.prototype.destroy=function(t){this._parent.destroy(t)};var Mg=function(t){if(!(this instanceof Mg))return new Mg(t);GBe.call(this,t),t=t||{},this._offset=0,this._buffer=Gwt(),this._missing=0,this._partial=!1,this._onparse=WBe,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 e=this,r=e._buffer,s=function(){e._continue()},o=function(B){if(e._locked=!1,B)return e.destroy(B);e._stream||s()},n=function(){e._stream=null;var B=JBe(e._header.size);B?e._parse(B,l):e._parse(512,w),e._locked||s()},l=function(){e._buffer.consume(JBe(e._header.size)),e._parse(512,w),s()},u=function(){var B=e._header.size;e._paxGlobal=i2.decodePax(r.slice(0,B)),r.consume(B),n()},f=function(){var B=e._header.size;e._pax=i2.decodePax(r.slice(0,B)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(B),n()},g=function(){var B=e._header.size;this._gnuLongPath=i2.decodeLongPath(r.slice(0,B),t.filenameEncoding),r.consume(B),n()},C=function(){var B=e._header.size;this._gnuLongLinkPath=i2.decodeLongPath(r.slice(0,B),t.filenameEncoding),r.consume(B),n()},w=function(){var B=e._offset,S;try{S=e._header=i2.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(y){e.emit("error",y)}if(r.consume(512),!S){e._parse(512,w),s();return}if(S.type==="gnu-long-path"){e._parse(S.size,g),s();return}if(S.type==="gnu-long-link-path"){e._parse(S.size,C),s();return}if(S.type==="pax-global-header"){e._parse(S.size,u),s();return}if(S.type==="pax-header"){e._parse(S.size,f),s();return}if(e._gnuLongPath&&(S.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(S.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=S=Wwt(S,e._pax),e
|
|||
|
Wanted: ${r.size}
|
|||
|
Found: ${t.length}`);throw u.code="EBADSIZE",u.found=t.length,u.expected=r.size,u.sri=e,u}else{let u=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw u.code="EINTEGRITY",u.found=n,u.expected=e,u.algorithm=s,u.sri=e,u}}Xu.exports.checkStream=vBt;function vBt(t,e,r){r=Oa(r);let s=r.Promise||Promise,o=QH(r.concat({integrity:e}));return new s((n,l)=>{t.pipe(o),t.on("error",l),o.on("error",l);let u;o.on("verified",f=>{u=f}),o.on("end",()=>n(u)),o.on("data",()=>{})})}Xu.exports.integrityStream=QH;function QH(t){t=Oa(t);let e=t.integrity&&Zu(t.integrity,t),r=e&&Object.keys(e).length,s=r&&e.pickAlgorithm(t),o=r&&e[s],n=Array.from(new Set(t.algorithms.concat(s?[s]:[]))),l=n.map(a2.createHash),u=0,f=new hBt({transform(g,C,w){u+=g.length,l.forEach(B=>B.update(g,C)),w(null,g,C)}}).on("end",()=>{let g=t.options&&t.options.length?`?${t.options.join("?")}`:"",C=Zu(l.map((B,S)=>`${n[S]}-${B.digest("base64")}${g}`).join(" "),t),w=r&&C.match(e,t);if(typeof t.size=="number"&&u!==t.size){let B=new Error(`stream size mismatch when checking ${e}.
|
|||
|
Wanted: ${t.size}
|
|||
|
Found: ${u}`);B.code="EBADSIZE",B.found=u,B.expected=t.size,B.sri=e,f.emit("error",B)}else if(t.integrity&&!w){let B=new Error(`${e} integrity checksum failed when using ${s}: wanted ${o} but got ${C}. (${u} bytes)`);B.code="EINTEGRITY",B.found=C,B.expected=o,B.algorithm=s,B.sri=e,f.emit("error",B)}else f.emit("size",u),f.emit("integrity",C),w&&f.emit("verified",w)});return f}Xu.exports.create=DBt;function DBt(t){t=Oa(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",s=e.map(a2.createHash);return{update:function(o,n){return s.forEach(l=>l.update(o,n)),this},digest:function(o){return e.reduce((l,u)=>{let f=s.shift().digest("base64"),g=new Hd(`${u}-${f}${r}`,t);if(g.algorithm&&g.digest){let C=g.algorithm;l[C]||(l[C]=[]),l[C].push(g)}return l},new NC)}}}var kBt=new Set(a2.getHashes()),y1e=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>kBt.has(t));function IBt(t,e){return y1e.indexOf(t.toLowerCase())>=y1e.indexOf(e.toLowerCase())?t:e}});var d2e=K((Qnr,h2e)=>{var b1t=QT();function x1t(t){return b1t(t)?void 0:t}h2e.exports=x1t});var y2e=K((vnr,m2e)=>{var P1t=iO(),F1t=bU(),R1t=RU(),T1t=hd(),N1t=Th(),M1t=d2e(),L1t=q4(),O1t=SU(),U1t=1,_1t=2,K1t=4,H1t=L1t(function(t,e){var r={};if(t==null)return r;var s=!1;e=P1t(e,function(n){return n=T1t(n,t),s||(s=n.length>1),n}),N1t(t,O1t(t),r),s&&(r=F1t(r,U1t|_1t|K1t,M1t));for(var o=e.length;o--;)R1t(r,e[o]);return r});m2e.exports=H1t});je();je();Ht();var $4=He(require("child_process")),Afe=He(dh());tr();var eU=He(require("fs"));var jy=new Map([]);function ult(t){let e=de.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,$4.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:Me(re({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})}):(0,$4.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:Me(re({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})})}async function ES({binaryVersion:t,pluginConfiguration:e}){async function r(){let o=new Da({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await s(o)}catch(n){process.stdout.write(o.error(n)),process.exitCode=1}}async function s(o){var N,L,H,G,te;let n=process.versions.node,l=">=14.15.0";if(!it.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!pn.satisfiesWithPrereleases(n,l))throw new ht(`This tool requires a Node version compatible with ${l} (got ${n}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let f=await st.find(de.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),g=f.get("yarnPath"),C=f.get("ignorePath"),w=f.get("ignoreCwd"),B=de.toPortablePath(de.resolve(process.argv[1])),S=ce=>ge.readFilePromise(ce).catch(()=>Buffer.of());if(!C&&!w&&await(async()=>g&&(g===B||Buffer.compare(...await Promise.all([S(g),S(B)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await s(o);return}else if(g!==null&&!C)if(!ge.existsSync(g))process.stdout.write(o.error(new Error(`The "yarn-path" option has been set (in ${f.sources.get("yarnPath")}), but the specified location doesn't exist (${g}).`))),process.exitCode=1;else try{ult(g)}catch(ce){process.exitCode=ce.code||1}else{C&&delete process.env.YARN_IGNORE_PATH,f.get("enableTelemetry")&&!Afe.isCI&&process.stdout.isTTY&&(st.telemetry=new Uw(f,"puba9cdc10ec5790a2cf4969dd413a47270")),(N=st.telemetry)==null||N.reportVersion(t);for(let[ye,xe]of f.plugins.entries()){jy.has((H=(L=ye.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:L[1])!=null?H:"")&&((G=st.telemetry)==null||G.reportPluginName(ye));for(let Qe of xe.commands||[])o.register(Qe)}let me={cwd:de.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},Ce=o.process(process.argv.slice(2),me);Ce.help||(te=st.telemetry)==null||te.reportCommandName(Ce.path.join(" "));let Se=Ce.cwd;if(typeof Se!="undefined"&&!w){let ye=(0,eU.realpathSync)(process.cwd()),xe=(0,eU.realpathSync)(Se);if(ye!==xe){process.chdir(Se),await r();return}}await o.runExit(Ce,me)}}r
|
|||
|
Try running the command again with the package name prefixed: ${Oe.pretty(e,"yarn add",Oe.Type.CODE)} ${Oe.pretty(e,W.makeDescriptor(W.makeIdent(null,"my-package"),`${ce[0]}...`),Oe.Type.DESCRIPTOR)}`);if(!te)throw new ht(`The ${Oe.pretty(e,G,Oe.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let me=Tct(s,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional}),Ce=await Ww(te,{project:r,workspace:s,cache:o,fixed:n,target:me,modifier:f,strategies:g,maxResults:C});return[te,Ce,me]})),B=await Cg.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async G=>{for(let[te,{suggestions:ce,rejections:me}]of w)if(ce.filter(Se=>Se.descriptor!==null).length===0){let[Se]=me;if(typeof Se=="undefined")throw new Error("Assertion failed: Expected an error to have been set");r.configuration.get("enableNetwork")?G.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,te)} can't be resolved to a satisfying range`):G.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),G.reportSeparator(),G.reportExceptionOnce(Se)}});if(B.hasErrors())return B.exitCode();let S=!1,y=[],N=[];for(let[,{suggestions:G},te]of w){let ce,me=G.filter(xe=>xe.descriptor!==null),Ce=me[0].descriptor,Se=me.every(xe=>W.areDescriptorsEqual(xe.descriptor,Ce));me.length===1||Se?ce=Ce:(S=!0,{answer:ce}=await(0,mpe.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:G.map(({descriptor:xe,name:Qe,reason:p})=>xe?{name:Qe,hint:p,descriptor:xe}:{name:Qe,hint:p,disabled:!0}),onCancel:()=>process.exit(130),result(xe){return this.find(xe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ye=s.manifest[te].get(ce.identHash);(typeof ye=="undefined"||ye.descriptorHash!==ce.descriptorHash)&&(s.manifest[te].set(ce.identHash,ce),this.optional&&(te==="dependencies"?s.manifest.ensureDependencyMeta(Me(re({},ce),{range:"unknown"})).optional=!0:te==="peerDependencies"&&(s.manifest.ensurePeerDependencyMeta(Me(re({},ce),{range:"unknown"})).optional=!0)),typeof ye=="undefined"?y.push([s,te,ce,g]):N.push([s,te,ye,ce]))}return await e.triggerMultipleHooks(G=>G.afterWorkspaceDependencyAddition,y),await e.triggerMultipleHooks(G=>G.afterWorkspaceDependencyReplacement,N),S&&this.context.stdout.write(`
|
|||
|
`),(await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async G=>{await r.install({cache:o,report:G,mode:this.mode})})).exitCode()}};Jw.paths=[["add"]],Jw.usage=dt.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 later 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 lo
|
|||
|
`),0}return(await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{let l=await vn.getPackageAccessibleBinaries(s,{project:r}),f=Array.from(l.keys()).reduce((g,C)=>Math.max(g,C.length),0);for(let[g,[C,w]]of l)n.reportJson({name:g,source:W.stringifyIdent(C),path:w});if(this.verbose)for(let[g,[C]]of l)n.reportInfo(null,`${g.padEnd(f," ")} ${W.prettyLocator(e,C)}`);else for(let g of l.keys())n.reportInfo(null,g)})).exitCode()}};zw.paths=[["bin"]],zw.usage=dt.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"]]});var Cpe=zw;je();Ht();tr();var Vw=class extends It{constructor(){super(...arguments);this.mirror=Ie.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=Ie.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=await en.find(e);return(await Tt.start({configuration:e,stdout:this.context.stdout},async()=>{let o=(this.all||this.mirror)&&r.mirrorCwd!==null,n=!this.mirror;o&&(await ge.removePromise(r.mirrorCwd),await e.triggerHook(l=>l.cleanGlobalArtifacts,e)),n&&await ge.removePromise(r.cwd)})).exitCode()}};Vw.paths=[["cache","clean"],["cache","clear"]],Vw.usage=dt.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"]]});var Ipe=Vw;je();tr();var wpe=He(Xw()),DU=He(require("util")),Zw=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=Ie.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=this.name.replace(/[.[].*$/,""),s=this.name.replace(/^[^.[]*/,"");if(typeof e.settings.get(r)=="undefined")throw new ht(`Couldn't find a configuration settings named "${r}"`);let n=e.getSpecial(r,{hideSecrets:!this.unsafe,getNativePaths:!0}),l=it.convertMapsToIndexableObjects(n),u=s?(0,wpe.default)(l,s):l,f=await Tt.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async g=>{g.reportJson(u)});if(!this.json){if(typeof u=="string")return this.context.stdout.write(`${u}
|
|||
|
`),f.exitCode();DU.inspect.styles.name="cyan",this.context.stdout.write(`${(0,DU.inspect)(u,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}
|
|||
|
`)}return f.exitCode()}};Zw.paths=[["config","get"]],Zw.usage=dt.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"]]});var Bpe=Zw;je();tr();var g0e=He(xU()),p0e=He(Xw()),h0e=He(PU()),FU=He(require("util")),$w=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=Ie.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Ie.String();this.value=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new ht("This command must be run from within a project folder");return e.projectCwd},s=this.name.replace(/[.[].*$/,""),o=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(s)=="undefined")throw new ht(`Couldn't find a configuration settings named "${s}"`);if(s==="enableStrictSettings")throw new ht("This setting only affects the file it's in, and thus cannot be set from the CLI");let l=this.json?JSON.parse(this.value):this.value;await(this.home?S=>st.updateHomeConfiguration(S):S=>st.updateConfiguration(r(),S))(S=>{if(o){let y=(0,g0e.default)(S);return(0,h0e.default)(y,this.name,l),y}else return Me(re({},S),{[s]:l})});let g=(await st.find(this.context.cwd,this.context.plugins)).getSpecial(s,{hideSecrets:!0,getNativePaths:!0}),C=it.convertMapsToIndexableObjects(g),w=o?(0,p0e.default)(C,o):C;return(await Tt.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async S=>{FU.inspect.styles.name="cyan",S.reportInfo(ke.UNNAMED,`Successfully set ${this.name} to ${(0,FU.inspect)(w,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}};$w.paths=[["config","set"]],$w.usage=dt.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"`]]});var d0e=$w;je();tr();var k0e=He(xU()),S0e=He(I0e()),b0e=He(TU()),eB=class extends It{constructor(){super(...arguments);this.home=Ie.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new ht("This command must be run from within a project folder");return e.projectCwd},s=this.name.replace(/[.[].*$/,""),o=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(s)=="undefined")throw new ht(`Couldn't find a configuration settings named "${s}"`);let l=this.home?f=>st.updateHomeConfiguration(f):f=>st.updateConfiguration(r(),f);return(await Tt.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async f=>{let g=!1;await l(C=>{if(!(0,S0e.default)(C,this.name))return f.reportWarning(ke.UNNAMED,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),g=!0,C;let w=o?(0,k0e.default)(C):re({},C);return(0,b0e.default)(w,this.name),w}),g||f.reportInfo(ke.UNNAMED,`Successfully unset ${this.name}`)})).exitCode()}};eB.paths=[["config","unset"]],eB.usage=dt.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"]]});var x0e=eB;je();je();tr();var NU=He(require("util")),tB=class extends It{constructor(){super(...arguments);this.verbose=Ie.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=Ie.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{if(e.invalid.size>0&&!this.json){for(let[o,n]of e.invalid)s.reportError(ke.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${o}" in ${n}`);s.reportSeparator()}if(this.json){let o=it.sortMap(e.settings.keys(),n=>n);for(let n of o){let l=e.settings.get(n),u=e.getSpecial(n,{hideSecrets:!0,getNativePaths:!0}),f=e.sources.get(n);this.verbose?s.reportJson({key:n,effective:u,source:f}):s.reportJson(re({key:n,effective:u,source:f},l))}}else{let o=it.sortMap(e.settings.keys(),u=>u),n=o.reduce((u,f)=>Math.max(u,f.length),0),l={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let u=o.map(g=>{let C=e.settings.get(g);if(!C)throw new Error(`Assertion failed: This settings ("${g}") should have been registered`);let w=this.why?e.sources.get(g)||"<default>":C.description;return[g,w]}),f=u.reduce((g,[,C])=>Math.max(g,C.length),0);for(let[g,C]of u)s.reportInfo(null,`${g.padEnd(n," ")} ${C.padEnd(f," ")} ${(0,NU.inspect)(e.getSpecial(g,{hideSecrets:!0,getNativePaths:!0}),l)}`)}else for(let u of o)s.reportInfo(null,`${u.padEnd(n," ")} ${(0,NU.inspect)(e.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),l)}`)}})).exitCode()}};tB.paths=[["config"]],tB.usage=dt.Usage({description:"display the current configuration",details:`
|
|||
|
This command prints the current active configuration settings.
|
|||
|
`,examples:[["Print the active configuration settings","$0 config"]]});var P0e=tB;je();tr();_A();var MU={};or(MU,{Strategy:()=>Cd,acceptedStrategies:()=>dgt,dedupe:()=>LU});je();je();var F0e=He(Sa()),Cd;(function(e){e.HIGHEST="highest"})(Cd||(Cd={}));var dgt=new Set(Object.values(Cd)),mgt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:o,fetchOptions:n})=>{let l=new Map;for(let[f,g]of t.storedResolutions){let C=t.storedDescriptors.get(f);if(typeof C=="undefined")throw new Error(`Assertion failed: The descriptor (${f}) should have been registered`);it.getSetWithDefault(l,C.identHash).add(g)}let u=new Map(it.mapAndFilter(t.storedDescriptors.values(),f=>W.isVirtualDescriptor(f)?it.mapAndFilter.skip:[f.descriptorHash,it.makeDeferred()]));for(let f of t.storedDescriptors.values()){let g=u.get(f.descriptorHash);if(typeof g=="undefined")throw new Error(`Assertion failed: The descriptor (${f.descriptorHash}) should have been registered`);let C=t.storedResolutions.get(f.descriptorHash);if(typeof C=="undefined")throw new Error(`Assertion failed: The resolution (${f.descriptorHash}) should have been registered`);let w=t.originalPackages.get(C);if(typeof w=="undefined")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{var te;let B=r.getResolutionDependencies(f,o),S=Object.fromEntries(await it.allSettledSafe(Object.entries(B).map(async([ce,me])=>{let Ce=u.get(me.descriptorHash);if(typeof Ce=="undefined")throw new Error(`Assertion failed: The descriptor (${me.descriptorHash}) should have been registered`);let Se=await Ce.promise;if(!Se)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[ce,Se.updatedPackage]})));if(e.length&&!F0e.default.isMatch(W.stringifyIdent(f),e)||!r.shouldPersistResolution(w,o))return w;let y=l.get(f.identHash);if(typeof y=="undefined")throw new Error(`Assertion failed: The resolutions (${f.identHash}) should have been registered`);if(y.size===1)return w;let N=[...y].map(ce=>{let me=t.originalPackages.get(ce);if(typeof me=="undefined")throw new Error(`Assertion failed: The package (${ce}) should have been registered`);return me}),L=await r.getSatisfying(f,S,N,o),H=(te=L.locators)==null?void 0:te[0];if(typeof H=="undefined"||!L.sorted)return w;let G=t.originalPackages.get(H.locatorHash);if(typeof G=="undefined")throw new Error(`Assertion failed: The package (${H.locatorHash}) should have been registered`);return G}).then(async B=>{let S=await t.preparePackage(B,{resolver:r,resolveOptions:o});g.resolve({descriptor:f,currentPackage:w,updatedPackage:B,resolvedPackage:S})}).catch(B=>{g.reject(B)})}return[...u.values()].map(f=>f.promise)}};async function LU(t,{strategy:e,patterns:r,cache:s,report:o}){let{configuration:n}=t,l=new fs,u=n.makeResolver(),f=n.makeFetcher(),g={cache:s,checksums:t.storedChecksums,fetcher:f,project:t,report:l,cacheOptions:{skipIntegrityCheck:!0}},C={project:t,resolver:u,report:l,fetchOptions:g};return await o.startTimerPromise("Deduplication step",async()=>{let B=await mgt[e](t,r,{resolver:u,resolveOptions:C,fetcher:f,fetchOptions:g}),S=ea.progressViaCounter(B.length);o.reportProgress(S);let y=0;await Promise.all(B.map(H=>H.then(G=>{if(G===null||G.currentPackage.locatorHash===G.updatedPackage.locatorHash)return;y++;let{descriptor:te,currentPackage:ce,updatedPackage:me}=G;o.reportInfo(ke.UNNAMED,`${W.prettyDescriptor(n,te)} can be deduped from ${W.prettyLocator(n,ce)} to ${W.prettyLocator(n,me)}`),o.reportJson({descriptor:W.stringifyDescriptor(te),currentResolution:W.stringifyLocator(ce),updatedResolution:W.stringifyLocator(me)}),t.storedResolutions.set(te.descriptorHash,me.locatorHash)}).finally(()=>S.tick())));let N;switch(y){case 0:N="No packages";break;case 1:N="One package";break;default:N=`${y} packages`}let L=Oe.pretty(n,e,Oe.Type.CODE);return o.reportInfo(ke.UNNAMED,`${N} can be deduped using the ${L} strategy`),y})}var rB=class extends It{constructor(){super(...arguments);this.strategy=Ie.String("-s,--strategy",Cd.HIGHEST,{description:"The stra
|
|||
|
`)}};PS.paths=[["--clipanion=definitions"]];var M0e=PS;var RS=class extends It{async execute(){this.context.stdout.write(this.cli.usage(null))}};RS.paths=[["help"],["--help"],["-h"]];var L0e=RS;je();Ht();tr();var OU=class extends It{constructor(){super(...arguments);this.leadingArgument=Ie.String();this.args=Ie.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!W.tryParseIdent(this.leadingArgument)){let e=$.resolve(this.context.cwd,de.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}},O0e=OU;je();var TS=class extends It{async execute(){this.context.stdout.write(`${ni||"<unknown>"}
|
|||
|
`)}};TS.paths=[["-v"],["--version"]];var U0e=TS;je();je();tr();var nB=class extends It{constructor(){super(...arguments);this.commandName=Ie.String();this.args=Ie.Proxy()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,locator:s}=await Mt.find(e,this.context.cwd);return await r.restoreInstallState(),await vn.executePackageShellcode(s,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:r})}};nB.paths=[["exec"]],nB.usage=dt.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"']]});var _0e=nB;je();tr();_A();var iB=class extends It{constructor(){super(...arguments);this.hash=Ie.String({required:!1,validator:Ch(_I(),[KI(/^p[0-9a-f]{5}$/)])})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Mt.find(e,this.context.cwd);return await r.restoreInstallState({restoreResolutions:!1}),await r.applyLightResolution(),typeof this.hash!="undefined"?await ygt(this.hash,r,{stdout:this.context.stdout}):(await Tt.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async o=>{var l;let n=[([,u])=>W.stringifyLocator(r.storedPackages.get(u.subject)),([,u])=>W.stringifyIdent(u.requested)];for(let[u,f]of it.sortMap(r.peerRequirements,n)){let g=r.storedPackages.get(f.subject);if(typeof g=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=r.storedPackages.get(f.rootRequester);if(typeof C=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let w=(l=g.dependencies.get(f.requested.identHash))!=null?l:null,B=Oe.pretty(e,u,Oe.Type.CODE),S=W.prettyLocator(e,g),y=W.prettyIdent(e,f.requested),N=W.prettyIdent(e,C),L=f.allRequesters.length-1,H=`descendant${L===1?"":"s"}`,G=L>0?` and ${L} ${H}`:"",te=w!==null?"provides":"doesn't provide";o.reportInfo(null,`${B} \u2192 ${S} ${te} ${y} to ${N}${G}`)}})).exitCode()}};iB.paths=[["explain","peer-requirements"]],iB.usage=dt.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"]]});var K0e=iB;async function ygt(t,e,r){let{configuration:s}=e,o=e.peerRequirements.get(t);if(typeof o=="undefined")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Tt.start({configuration:s,stdout:r.stdout,includeFooter:!1},async l=>{var H,G;let u=e.storedPackages.get(o.subject);if(typeof u=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let f=e.storedPackages.get(o.rootRequester);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let g=(H=u.dependencies.get(o.requested.identHash))!=null?H:null,C=g!==null?e.storedResolutions.get(g.descriptorHash):null;if(typeof C=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let w=C!==null?e.storedPackages.get(C):null;if(typeof w=="undefined")throw new Error("Assertion failed: Expected the provided package to have been registered");let B=[...o.allRequesters.values()].map(te=>{let ce=e.storedPackages.get(te);if(typeof ce=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let me=W.devirtualizeLocator(ce),Ce=e.storedPackages.get(me.locatorHash);if(typeof Ce=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let Se=Ce.peerDependencies.get(o.requested.identHash);if(typeof Se=="undefined")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:ce,peerDependency:Se}});if(w!==null){let te=B.every(({peerDependency:ce})=>pn.satisfiesWithPrereleases(w.version,ce.range));l.reportInfo(ke.UNNAMED,`${W.prettyLocator(s,u)} provides ${W.prettyLocator(s,w)} with version ${W.prettyReference(s,(G=w.version)!=null?G:"<missing>")}, which ${te?"satisfies":"doesn't satisfy"} the following requirements:`)}else l.reportInfo(ke.UNNAMED,`${W.prettyLocator(s,u)} doesn't provide ${W.prettyIdent(s,o.requested)}, breaking the following requirements:`);l.reportSeparator();let S=Oe.mark(s),y=[];for(let{pkg:te,peerDependency:ce}of it.sortMap(B,me=>W.stringifyLocator(me.pkg))){let Ce=(w!==null?pn.satisfiesWithPrereleases(w.version,ce.range):!1)?S.Check:S.Cross;y.push({stringifiedLocator:W.stringifyLocator(te),prettyLocator:W.prettyLocator(s,te),prettyRange:W.prettyRange(s,ce.range),mark:Ce})}let N=Math.max(...y.map(({stringifiedLocator:te})=>te.length)),L=Math.max(...y.map(({prettyRange:te})=>te.length));for(let{stringifiedLocator:te,prettyLocator:ce,prettyRange:me,mark:Ce}of it.sortMap(y,({stringifiedLocator:Se})=>Se))l.reportInfo(null,`${ce.padEnd(N+(ce.length-te.length)," ")} \u2192 ${me.padEnd(L," ")} ${Ce}`);y.length>1&&(l.reportSeparator(),l.reportInfo(ke.UNNAMED,`Note: these requirements start with ${W.prettyLocator(e.configuration,f)}`))})).exitCode()}je();tr();_A();je();je();Ht();tr();var H0e=He(ki()),sB=class extends It{constructor(){super(...arguments);this.useYarnPath=Ie.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=Ie.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=Ie.String()}async execute(){var l;let e=await st.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let r=()=>{if(typeof ni=="undefined")throw new ht("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},s,o=(u,f)=>({version:f,url:u.replace(/\{\}/g,f)});if(this.version==="self")s={url:r(),version:(l=ni)!=null?l:"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")s=o("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await oB(e,"stable"));else if(this.version==="canary")s=o("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await o
|
|||
|
${e}`)})}let u=(te=t.projectCwd)!=null?te:t.startingCwd,f=$.resolve(u,".yarn/releases"),g=$.resolve(f,`yarn-${e}.cjs`),C=$.relative(t.startingCwd,g),w=it.isTaggedYarnVersion(e),B=t.get("yarnPath"),S=!w,y=S||!!B||!!o;if(o===!1){if(S)throw new ar(ke.UNNAMED,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");y=!1}else!y&&!process.env.COREPACK_ROOT&&(s.reportWarning(ke.UNNAMED,`You don't seem to have ${Oe.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${Oe.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),y=!0);if(y){let ce=await l();s.reportInfo(ke.UNNAMED,`Saving the new release in ${Oe.pretty(t,C,"magenta")}`),await ge.removePromise($.dirname(g)),await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.writeFilePromise(g,ce,{mode:493}),(!B||$.contains(f,B))&&await st.updateConfiguration(u,{yarnPath:$.relative(u,g)})}else await ge.removePromise($.dirname(g)),await st.updateConfiguration(u,{yarnPath:st.deleteProperty});let N=await Xt.tryFind(u)||new Xt;N.packageManager=`yarn@${w?e:await oB(t,"stable")}`;let L={};N.exportTo(L);let H=$.join(u,Xt.fileName),G=`${JSON.stringify(L,null,N.indent)}
|
|||
|
`;return await ge.changeFilePromise(H,G,{automaticNewlines:!0}),{bundleVersion:e}}function j0e(t){return ke[ov(t)]}var Igt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function Egt(t){let r=`https://repo.yarnpkg.com/${it.isTaggedYarnVersion(ni)?ni:await oB(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,s=await Yn.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Igt),({groups:o})=>{if(!o)throw new Error("Assertion failed: Expected the match to have been successful");let n=j0e(o.code);if(o.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${o.name}" to be named "${n}"`);return[o.code,o.details]}))}var aB=class extends It{constructor(){super(...arguments);this.code=Ie.String({required:!1,validator:Ch(_I(),[KI(/^YN[0-9]{4}$/)])});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);if(typeof this.code!="undefined"){let r=j0e(this.code),s=Oe.pretty(e,r,Oe.Type.CODE),o=this.cli.format().header(`${this.code} - ${s}`),l=(await Egt(e)).get(this.code),u=typeof l!="undefined"?Oe.jsonOrPretty(this.json,e,Oe.tuple(Oe.Type.MARKDOWN,{text:l,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}:
|
|||
|
${Oe.jsonOrPretty(this.json,e,Oe.tuple(Oe.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:r,details:u})}
|
|||
|
`):this.context.stdout.write(`${o}
|
|||
|
|
|||
|
${u}
|
|||
|
`)}else{let r={children:it.mapAndFilter(Object.entries(ke),([s,o])=>Number.isNaN(Number(s))?it.mapAndFilter.skip:{label:wu(Number(s)),value:Oe.tuple(Oe.Type.CODE,o)})};VA.emitTree(r,{configuration:e,stdout:this.context.stdout,json:this.json})}}};aB.paths=[["explain"]],aB.usage=dt.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"]]});var G0e=aB;je();Ht();tr();var Y0e=He(Sa()),AB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=Ie.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=Ie.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=Ie.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=Ie.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=Ie.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=Ie.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s&&!this.all)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState();let n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");let l=(te,{recursive:ce})=>{let me=te.anchoredLocator.locatorHash,Ce=new Map,Se=[me];for(;Se.length>0;){let ye=Se.shift();if(Ce.has(ye))continue;let xe=r.storedPackages.get(ye);if(typeof xe=="undefined")throw new Error("Assertion failed: Expected the package to be registered");if(Ce.set(ye,xe),W.isVirtualLocator(xe)&&Se.push(W.devirtualizeLocator(xe).locatorHash),!(!ce&&ye!==me))for(let Qe of xe.dependencies.values()){let p=r.storedResolutions.get(Qe.descriptorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");Se.push(p)}}return Ce.values()},u=({recursive:te})=>{let ce=new Map;for(let me of r.workspaces)for(let Ce of l(me,{recursive:te}))ce.set(Ce.locatorHash,Ce);return ce.values()},f=({all:te,recursive:ce})=>te&&ce?r.storedPackages.values():te?u({recursive:ce}):l(s,{recursive:ce}),g=({all:te,recursive:ce})=>{let me=f({all:te,recursive:ce}),Ce=this.patterns.map(xe=>{let Qe=W.parseLocator(xe),p=Y0e.default.makeRe(W.stringifyIdent(Qe)),Ue=W.isVirtualLocator(Qe),De=Ue?W.devirtualizeLocator(Qe):Qe;return Ee=>{let fe=W.stringifyIdent(Ee);if(!p.test(fe))return!1;if(Qe.reference==="unknown")return!0;let ne=W.isVirtualLocator(Ee),Be=ne?W.devirtualizeLocator(Ee):Ee;return!(Ue&&ne&&Qe.reference!==Ee.reference||De.reference!==Be.reference)}}),Se=it.sortMap([...me],xe=>W.stringifyLocator(xe));return{selection:Se.filter(xe=>Ce.length===0||Ce.some(Qe=>Qe(xe))),sortedLookup:Se}},{selection:C,sortedLookup:w}=g({all:this.all,recursive:this.recursive});if(C.length===0)throw new ht("No package matched your request");let B=new Map;if(this.dependents)for(let te of w)for(let ce of te.dependencies.values()){let me=r.storedResolutions.get(ce.descriptorHash);if(typeof me=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");it.getArrayWithDefault(B,me).push(te)}let S=new Map;for(let te of w){if(!W.isVirtualLocator(te))continue;let ce=W.devirtualizeLocator(te);it.getArrayWithDefault(S,ce.locatorHash).push(te)}let y={},N={children:y},L=e.makeFetcher(),H={project:r,fetcher:L,cache:o,checksums:r.storedChecksums,report:new fs,cacheOptions:{skipIntegrityCheck:!0}},G=[async(te,ce,me)=>{var ye,xe;if(!ce.has("manifest"))return;let Ce=await L.fetch(te,H),Se;try{Se=await Xt.find(Ce.prefixPath,{baseFs:Ce.packageFs})}finally{(ye=Ce.releaseFs)==null||ye.call(Ce)}me("Manifest",{License:Oe.tuple(Oe.Type.NO_HINT,Se.license),Homepage:Oe.tuple(Oe.Type.URL,(xe=Se.raw.homepage)!=null?xe:null)})},async(te,ce,
|
|||
|
`),e[1].join(`
|
|||
|
`)]}je();Ht();tr();var cB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=Ie.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=Ie.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=r.topLevelWorkspace,l=[];for(let f of this.destinations){let g=$.resolve(this.context.cwd,de.toPortablePath(f)),C=await st.find(g,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:B}=await Mt.find(C,g);if(r.cwd===w.cwd)throw new ht(`Invalid destination '${f}'; Can't link the project to itself`);if(!B)throw new pr(w.cwd,g);if(this.all){let S=!1;for(let y of w.workspaces)y.manifest.name&&(!y.manifest.private||this.private)&&(l.push(y),S=!0);if(!S)throw new ht(`No workspace found to be linked in the target project: ${f}`)}else{if(!B.manifest.name)throw new ht(`The target workspace at '${f}' doesn't have a name and thus cannot be linked`);if(B.manifest.private&&!this.private)throw new ht(`The target workspace at '${f}' is marked private - use the --private flag to link it anyway`);l.push(B)}}for(let f of l){let g=W.stringifyIdent(f.locator),C=this.relative?$.relative(r.cwd,f.cwd):f.cwd;n.manifest.resolutions.push({pattern:{descriptor:{fullName:g}},reference:`portal:${C}`})}return(await Tt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};cB.paths=[["link"]],cB.usage=dt.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var V0e=cB;tr();var uB=class extends It{constructor(){super(...arguments);this.args=Ie.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};uB.paths=[["node"]],uB.usage=dt.Usage({description:"run node with the hook already setup",details:`
|
|||
|
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"]]});var X0e=uB;je();je();Ht();tr();var ohe=He(require("os"));je();Ht();tr();var $0e=He(require("os"));je();Sl();tr();var kgt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Id(t,e){let r=await Yn.get(kgt,{configuration:t}),s=ls(r.toString());return Object.fromEntries(Object.entries(s).filter(([o,n])=>{var l;return!e||pn.satisfiesWithPrereleases(e,(l=n.range)!=null?l:"<4.0.0-rc.1")}))}var fB=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{let o=await Id(e,ni);for(let n of Object.entries(o)){let[f,l]=n,u=l,{experimental:g}=u,C=an(u,["experimental"]);let w=f;g&&(w+=" [experimental]"),s.reportJson(re({name:f,experimental:g},C)),s.reportInfo(null,w)}})).exitCode()}};fB.paths=[["plugin","list"]],fB.usage=dt.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 Z0e=fB;var Sgt=/^[0-9]+$/;function ehe(t){return Sgt.test(t)?`pull/${t}/head`:t}var bgt=({repository:t,branch:e},r)=>[["git","init",de.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",ehe(e)],["git","reset","--hard","FETCH_HEAD"]],xgt=({branch:t})=>[["git","fetch","origin","--depth=1",ehe(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],Pgt=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(s=>["--plugin",$.resolve(r,s)])),...e?["--no-minify"]:[],"|"]],gB=class extends It{constructor(){super(...arguments);this.installPath=Ie.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Ie.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Ie.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=Ie.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=Ie.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=Ie.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=Ie.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Mt.find(e,this.context.cwd),s=typeof this.installPath!="undefined"?$.resolve(this.context.cwd,de.toPortablePath(this.installPath)):$.resolve(de.toPortablePath((0,$0e.tmpdir)()),"yarnpkg-sources",ro.makeHash(this.repository).slice(0,6));return(await Tt.start({configuration:e,stdout:this.context.stdout},async n=>{await KU(this,{configuration:e,report:n,target:s}),n.reportSeparator(),n.reportInfo(ke.UNNAMED,"Building a fresh bundle"),n.reportSeparator(),await pB(Pgt(this,s),{configuration:e,context:this.context,target:s}),n.reportSeparator();let l=$.resolve(s,"packages/yarnpkg-cli/bundles/yarn.js"),u=await ge.readFilePromise(l),{bundleVersion:f}=await UU(e,null,async()=>u,{report:n});this.skipPlugins||await Fgt(this,f,{project:r,report:n,target:s})})).exitCode()}};gB.paths=[["set","version","from","sources"]],gB.usage=dt.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"]]});var the=gB;async function pB(t,{configuration:e,context:r,target:s}){for(let[o,...n]of t){let l=n[n.length-1]==="|";if(l&&n.pop(),l)await wn.pipevp(o,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${Oe.pretty(e,` $ ${[o,...n].join(" ")}`,"grey")}
|
|||
|
`);try{await wn.execvp(o,n,{cwd:s,strict:!0})}catch(u){throw r.stdout.write(u.stdout||u.stack),u}}}}async function KU(t,{configuration:e,report:r,target:s}){let o=!1;if(!t.force&&ge.existsSync($.join(s,".git"))){r.reportInfo(ke.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await pB(xgt(t),{configuration:e,context:t.context,target:s}),o=!0}catch(n){r.reportSeparator(),r.reportWarning(ke.UNNAMED,"Repository update failed; we'll try to regenerate it")}}o||(r.reportInfo(ke.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await ge.removePromise(s),await ge.mkdirPromise(s,{recursive:!0}),await pB(bgt(t,s),{configuration:e,context:t.context,target:s}))}async function Fgt(t,e,{project:r,report:s,target:o}){let n=await Id(r.configuration,e),l=new Set(Object.keys(n));for(let u of r.configuration.plugins.keys())!l.has(u)||await _U(u,t,{project:r,report:s,target:o})}je();je();Ht();tr();var rhe=He(ki()),nhe=He(require("url")),ihe=He(require("vm"));var hB=class extends It{constructor(){super(...arguments);this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Tt.start({configuration:e,stdout:this.context.stdout},async s=>{let{project:o}=await Mt.find(e,this.context.cwd),n,l;if(this.name.match(/^\.{0,2}[\\/]/)||de.isAbsolute(this.name)){let u=$.resolve(this.context.cwd,de.toPortablePath(this.name));s.reportInfo(ke.UNNAMED,`Reading ${Oe.pretty(e,u,Oe.Type.PATH)}`),n=$.relative(o.cwd,u),l=await ge.readFilePromise(u)}else{let u;if(this.name.match(/^https?:/)){try{new nhe.URL(this.name)}catch{throw new ar(ke.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}n=this.name,u=this.name}else{let f=W.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(f.reference!=="unknown"&&!rhe.default.valid(f.reference))throw new ar(ke.UNNAMED,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let g=W.stringifyIdent(f),C=await Id(e,ni);if(!Object.prototype.hasOwnProperty.call(C,g)){let w=`Couldn't find a plugin named ${W.prettyIdent(e,f)} on the remote registry.
|
|||
|
`;throw e.plugins.has(g)?w+=`A plugin named ${W.prettyIdent(e,f)} is already installed; possibly attempting to import a built-in plugin.`:w+=`Note that only the plugins referenced on our website (${Oe.pretty(e,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",Oe.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${Oe.pretty(e,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",Oe.Type.URL)}).`,new ar(ke.PLUGIN_NAME_NOT_FOUND,w)}n=g,u=C[g].url,f.reference!=="unknown"?u=u.replace(/\/master\//,`/${g}/${f.reference}/`):ni!==null&&(u=u.replace(/\/master\//,`/@yarnpkg/cli/${ni}/`))}s.reportInfo(ke.UNNAMED,`Downloading ${Oe.pretty(e,u,"green")}`),l=await Yn.get(u,{configuration:e})}await HU(n,l,{project:o,report:s})})).exitCode()}};hB.paths=[["plugin","import"]],hB.usage=dt.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.
|
|||
|
|
|||
|
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"]]});var she=hB;async function HU(t,e,{project:r,report:s}){let{configuration:o}=r,n={},l={exports:n};(0,ihe.runInNewContext)(e.toString(),{module:l,exports:n});let u=l.exports.name,f=`.yarn/plugins/${u}.cjs`,g=$.resolve(r.cwd,f);s.reportInfo(ke.UNNAMED,`Saving the new plugin in ${Oe.pretty(o,f,"magenta")}`),await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.writeFilePromise(g,e);let C={path:f,spec:t};await st.updateConfiguration(r.cwd,w=>{let B=[],S=!1;for(let y of w.plugins||[]){let N=typeof y!="string"?y.path:y,L=$.resolve(r.cwd,de.toPortablePath(N)),{name:H}=it.dynamicRequire(L);H!==u?B.push(y):(B.push(C),S=!0)}return S||B.push(C),Me(re({},w),{plugins:B})})}var Rgt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],dB=class extends It{constructor(){super(...arguments);this.installPath=Ie.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Ie.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Ie.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=Ie.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=Ie.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=typeof this.installPath!="undefined"?$.resolve(this.context.cwd,de.toPortablePath(this.installPath)):$.resolve(de.toPortablePath((0,ohe.tmpdir)()),"yarnpkg-sources",ro.makeHash(this.repository).slice(0,6));return(await Tt.start({configuration:e,stdout:this.context.stdout},async o=>{let{project:n}=await Mt.find(e,this.context.cwd),l=W.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),u=W.stringifyIdent(l),f=await Id(e,ni);if(!Object.prototype.hasOwnProperty.call(f,u))throw new ar(ke.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${u}" 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 g=u;await KU(this,{configuration:e,report:o,target:r}),await _U(g,this,{project:n,report:o,target:r})})).exitCode()}};dB.paths=[["plugin","import","from","sources"]],dB.usage=dt.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"]]});var ahe=dB;async function _U(t,{context:e,noMinify:r},{project:s,report:o,target:n}){let l=t.replace(/@yarnpkg\//,""),{configuration:u}=s;o.reportSeparator(),o.reportInfo(ke.UNNAMED,`Building a fresh ${l}`),o.reportSeparator(),await pB(Rgt({pluginName:l,noMinify:r},n),{configuration:u,context:e,target:n}),o.reportSeparator();let f=$.resolve(n,`packages/${l}/bundles/${t}.js`),g=await ge.readFilePromise(f);await HU(t,g,{project:s,report:o})}je();Ht();tr();var mB=class extends It{constructor(){super(...arguments);this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Mt.find(e,this.context.cwd);return(await Tt.start({configuration:e,stdout:this.context.stdout},async o=>{let n=this.name,l=W.parseIdent(n);if(!e.plugins.has(n))throw new ht(`${W.prettyIdent(e,l)} isn't referenced by the current configuration`);let u=`.yarn/plugins/${n}.cjs`,f=$.resolve(r.cwd,u);ge.existsSync(f)&&(o.reportInfo(ke.UNNAMED,`Removing ${Oe.pretty(e,u,Oe.Type.PATH)}...`),await ge.removePromise(f)),o.reportInfo(ke.UNNAMED,"Updating the configuration..."),await st.updateConfiguration(r.cwd,g=>{if(!Array.isArray(g.plugins))return g;let C=g.plugins.filter(w=>w.path!==u);return g.plugins.length===C.length?g:Me(re({},g),{plugins:C})})})).exitCode()}};mB.paths=[["plugin","remove"]],mB.usage=dt.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"]]});var Ahe=mB;je();tr();var yB=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{for(let o of e.plugins.keys()){let n=this.context.plugins.plugins.has(o),l=o;n&&(l+=" [builtin]"),s.reportJson({name:o,builtin:n}),s.reportInfo(null,`${l}`)}})).exitCode()}};yB.paths=[["plugin","runtime"]],yB.usage=dt.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"]]});var lhe=yB;je();je();tr();var CB=class extends It{constructor(){super(...arguments);this.idents=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);let n=new Set;for(let u of this.idents)n.add(W.parseIdent(u).identHash);if(await r.restoreInstallState({restoreResolutions:!1}),await r.resolveEverything({cache:o,report:new fs}),n.size>0)for(let u of r.storedPackages.values())n.has(u.identHash)&&r.storedBuildState.delete(u.locatorHash);else r.storedBuildState.clear();return(await Tt.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async u=>{await r.install({cache:o,report:u})})).exitCode()}};CB.paths=[["rebuild"]],CB.usage=dt.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"]]});var che=CB;je();je();je();tr();var qU=He(Sa());_A();var IB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=Ie.String("--mode",{description:"Change what artifacts installs generate",validator:wo(qs)});this.patterns=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=this.all?r.workspaces:[s],l=[zi.REGULAR,zi.DEVELOPMENT,zi.PEER],u=[],f=!1,g=[];for(let S of this.patterns){let y=!1,N=W.parseIdent(S);for(let L of n){let H=[...L.manifest.peerDependenciesMeta.keys()];for(let G of(0,qU.default)(H,S))L.manifest.peerDependenciesMeta.delete(G),f=!0,y=!0;for(let G of l){let te=L.manifest.getForScope(G),ce=[...te.values()].map(me=>W.stringifyIdent(me));for(let me of(0,qU.default)(ce,W.stringifyIdent(N))){let{identHash:Ce}=W.parseIdent(me),Se=te.get(Ce);if(typeof Se=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");L.manifest[G].delete(Ce),g.push([L,G,Se]),f=!0,y=!0}}}y||u.push(S)}let C=u.length>1?"Patterns":"Pattern",w=u.length>1?"don't":"doesn't",B=this.all?"any":"this";if(u.length>0)throw new ht(`${C} ${Oe.prettyList(e,u,Oe.Type.CODE)} ${w} match any packages referenced by ${B} workspace`);return f?(await e.triggerMultipleHooks(y=>y.afterWorkspaceDependencyRemoval,g),(await Tt.start({configuration:e,stdout:this.context.stdout},async y=>{await r.install({cache:o,report:y,mode:this.mode})})).exitCode()):0}};IB.paths=[["remove"]],IB.usage=dt.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 later 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}'"]]});var uhe=IB;je();je();var fhe=He(require("util")),MS=class extends It{async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);return(await Tt.start({configuration:e,stdout:this.context.stdout},async n=>{let l=s.manifest.scripts,u=it.sortMap(l.keys(),C=>C),f={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2},g=u.reduce((C,w)=>Math.max(C,w.length),0);for(let[C,w]of l.entries())n.reportInfo(null,`${C.padEnd(g," ")} ${(0,fhe.inspect)(w,f)}`)})).exitCode()}};MS.paths=[["run"]];var ghe=MS;je();je();tr();var EB=class extends It{constructor(){super(...arguments);this.inspect=Ie.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=Ie.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=Ie.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=Ie.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=Ie.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=Ie.Boolean("--silent",{hidden:!0});this.scriptName=Ie.String();this.args=Ie.Proxy()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s,locator:o}=await Mt.find(e,this.context.cwd);await r.restoreInstallState();let n=this.topLevel?r.topLevelWorkspace.anchoredLocator:o;if(!this.binariesOnly&&await vn.hasPackageScript(n,this.scriptName,{project:r}))return await vn.executePackageScript(n,this.scriptName,this.args,{project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let l=await vn.getPackageAccessibleBinaries(n,{project:r});if(l.get(this.scriptName)){let f=[];return this.inspect&&(typeof this.inspect=="string"?f.push(`--inspect=${this.inspect}`):f.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?f.push(`--inspect-brk=${this.inspectBrk}`):f.push("--inspect-brk")),this.require&&f.push(`--require=${this.require}`),await vn.executePackageAccessibleBinary(n,this.scriptName,this.args,{cwd:this.context.cwd,project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:f,packageAccessibleBinaries:l})}if(!this.topLevel&&!this.binariesOnly&&s&&this.scriptName.includes(":")){let g=(await Promise.all(r.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(g.length===1)return await vn.executeWorkspaceScript(g[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 ht(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(e,o)}). 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 ht(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(e,o)}).`);{if(this.scriptName==="global")throw new ht("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let f=[this.scriptName].concat(th
|
|||
|
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"]]});var phe=EB;je();je();tr();var wB=class extends It{constructor(){super(...arguments);this.save=Ie.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=Ie.String();this.resolution=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(await r.restoreInstallState({restoreResolutions:!1}),!s)throw new pr(r.cwd,this.context.cwd);let n=W.parseDescriptor(this.descriptor,!0),l=W.makeDescriptor(n,this.resolution);return r.storedDescriptors.set(n.descriptorHash,n),r.storedDescriptors.set(l.descriptorHash,l),r.resolutionAliases.set(n.descriptorHash,l.descriptorHash),(await Tt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};wB.paths=[["set","resolution"]],wB.usage=dt.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"]]});var hhe=wB;je();Ht();tr();var dhe=He(Sa()),BB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);let n=r.topLevelWorkspace,l=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:f,reference:g}of n.manifest.resolutions)g.startsWith("portal:")&&l.add(f.descriptor.fullName);if(this.leadingArguments.length>0)for(let f of this.leadingArguments){let g=$.resolve(this.context.cwd,de.toPortablePath(f));if(it.isPathLike(f)){let C=await st.find(g,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:B}=await Mt.find(C,g);if(!B)throw new pr(w.cwd,g);if(this.all){for(let S of w.workspaces)S.manifest.name&&l.add(W.stringifyIdent(S.locator));if(l.size===0)throw new ht("No workspace found to be unlinked in the target project")}else{if(!B.manifest.name)throw new ht("The target workspace doesn't have a name and thus cannot be unlinked");l.add(W.stringifyIdent(B.locator))}}else{let C=[...n.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,dhe.default)(C,f))l.add(w)}}return n.manifest.resolutions=n.manifest.resolutions.filter(({pattern:f})=>!l.has(f.descriptor.fullName)),(await Tt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};BB.paths=[["unlink"]],BB.usage=dt.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}'"]]});var mhe=BB;je();je();je();tr();var yhe=He(Gw()),jU=He(Sa());_A();var Vy=class extends It{constructor(){super(...arguments);this.interactive=Ie.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=Ie.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=Ie.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Ie.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Ie.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=Ie.String("--mode",{description:"Change what artifacts installs generate",validator:wo(qs)});this.patterns=Ie.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=[...r.storedDescriptors.values()],l=n.map(C=>W.stringifyIdent(C)),u=new Set;for(let C of this.patterns){if(W.parseDescriptor(C).range!=="unknown")throw new ht("Ranges aren't allowed when using --recursive");for(let w of(0,jU.default)(l,C)){let B=W.parseIdent(w);u.add(B.identHash)}}let f=n.filter(C=>u.has(C.identHash));for(let C of f)r.storedDescriptors.delete(C.descriptorHash),r.storedResolutions.delete(C.descriptorHash);return(await Tt.start({configuration:e,stdout:this.context.stdout},async C=>{await r.install({cache:o,report:C})})).exitCode()}async executeUpClassic(){var L;let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd),o=await en.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=this.fixed,l=(L=this.interactive)!=null?L:e.get("preferInteractive"),u=Yw(this,r),f=l?[gs.KEEP,gs.REUSE,gs.PROJECT,gs.LATEST]:[gs.PROJECT,gs.LATEST],g=[],C=[];for(let H of this.patterns){let G=!1,te=W.parseDescriptor(H);for(let ce of r.workspaces)for(let me of[zi.REGULAR,zi.DEVELOPMENT]){let Se=[...ce.manifest.getForScope(me).values()].map(ye=>W.stringifyIdent(ye));for(let ye of(0,jU.default)(Se,W.stringifyIdent(te))){let xe=W.parseIdent(ye),Qe=ce.manifest[me].get(xe.identHash);if(typeof Qe=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");let p=W.makeDescriptor(xe,te.range);g.push(Promise.resolve().then(async()=>[ce,me,Qe,await Ww(p,{project:r,workspace:ce,cache:o,target:me,fixed:n,modifier:u,strategies:f})])),G=!0}}G||C.push(H)}if(C.length>1)throw new ht(`Patterns ${Oe.prettyList(e,C,Oe.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new ht(`Pattern ${Oe.prettyList(e,C,Oe.Type.CODE)} doesn't match any packages referenced by any workspace`);let w=await Promise.all(g),B=await Cg.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async H=>{for(let[,,G,{suggestions:te,rejections:ce}]of w){let me=te.filter(Ce=>Ce.descriptor!==null);if(me.length===0){let[Ce]=ce;if(typeof Ce=="undefined")throw new Error("Assertion failed: Expected an error to have been set");let Se=this.cli.error(Ce);r.configuration.get("enableNetwork")?H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} can't be resolved to a satisfying range
|
|||
|
|
|||
|
${Se}`):H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
|||
|
|
|||
|
${Se}`)}else me.length>1&&!l&&H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(B.hasErrors())return B.exitCode();let S=!1,y=[];for(let[H,G,,{suggestions:te}]of w){let ce,me=te.filter(xe=>xe.descriptor!==null),Ce=me[0].descriptor,Se=me.every(xe=>W.areDescriptorsEqual(xe.descriptor,Ce));me.length===1||Se?ce=Ce:(S=!0,{answer:ce}=await(0,yhe.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${W.prettyWorkspace(e,H)} \u276F ${G}?`,choices:te.map(({descriptor:xe,name:Qe,reason:p})=>xe?{name:Qe,hint:p,descriptor:xe}:{name:Qe,hint:p,disabled:!0}),onCancel:()=>process.exit(130),result(xe){return this.find(xe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ye=H.manifest[G].get(ce.identHash);if(typeof ye=="undefined")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ye.descriptorHash!==ce.descriptorHash)H.manifest[G].set(ce.identHash,ce),y.push([H,G,ye,ce]);else{let xe=e.makeResolver(),Qe={project:r,resolver:xe},p=e.normalizeDependency(ye),Ue=xe.bindDescriptor(p,H.anchoredLocator,Qe);r.forgetResolution(Ue)}}return await e.triggerMultipleHooks(H=>H.afterWorkspaceDependencyReplacement,y),S&&this.context.stdout.write(`
|
|||
|
`),(await Tt.start({configuration:e,stdout:this.context.stdout},async H=>{await r.install({cache:o,report:H,mode:this.mode})})).exitCode()}};Vy.paths=[["up"]],Vy.usage=dt.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 later 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'"]]}),Vy.schema=[cR("recursive",Ih.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var Che=Vy;je();je();je();tr();var QB=class extends It{constructor(){super(...arguments);this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=Ie.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=Ie.String()}async execute(){let e=await st.find
|
|||
|
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"]]});var Ihe=QB;function Tgt(t,e,{configuration:r,peers:s}){let o=it.sortMap(t.storedPackages.values(),u=>W.stringifyLocator(u)),n={},l={children:n};for(let u of o){let f={},g=null;for(let C of u.dependencies.values()){if(!s&&u.peerDependencies.has(C.identHash))continue;let w=t.storedResolutions.get(C.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let B=t.storedPackages.get(w);if(!B)throw new Error("Assertion failed: The package should have been registered");if(B.identHash!==e)continue;if(g===null){let y=W.stringifyLocator(u);n[y]={value:[u,Oe.Type.LOCATOR],children:f}}let S=W.stringifyLocator(B);f[S]={value:[{descriptor:C,locator:B},Oe.Type.DEPENDENT]}}}return l}function Ngt(t,e,{configuration:r,peers:s}){let o=it.sortMap(t.workspaces,B=>W.stringifyLocator(B.anchoredLocator)),n=new Set,l=new Set,u=B=>{if(n.has(B.locatorHash))return l.has(B.locatorHash);if(n.add(B.locatorHash),B.identHash===e)return l.add(B.locatorHash),!0;let S=!1;B.identHash===e&&(S=!0);for(let y of B.dependencies.values()){if(!s&&B.peerDependencies.has(y.identHash))continue;let N=t.storedResolutions.get(y.descriptorHash);if(!N)throw new Error("Assertion failed: The resolution should have been registered");let L=t.storedPackages.get(N);if(!L)throw new Error("Assertion failed: The package should have been registered");u(L)&&(S=!0)}return S&&l.add(B.locatorHash),S};for(let B of o){let S=t.storedPackages.get(B.anchoredLocator.locatorHash);if(!S)throw new Error("Assertion failed: The package should have been registered");u(S)}let f=new Set,g={},C={children:g},w=(B,S,y)=>{if(!l.has(B.locatorHash))return;let N=y!==null?Oe.tuple(Oe.Type.DEPENDENT,{locator:B,descriptor:y}):Oe.tuple(Oe.Type.LOCATOR,B),L={},H={value:N,children:L},G=W.stringifyLocator(B);if(S[G]=H,!f.has(B.locatorHash)&&(f.add(B.locatorHash),!(y!==null&&t.tryWorkspaceByLocator(B))))for(let te of B.dependencies.values()){if(!s&&B.peerDependencies.has(te.identHash))continue;let ce=t.storedResolutions.get(te.descriptorHash);if(!ce)throw new Error("Assertion failed: The resolution should have been registered");let me=t.storedPackages.get(ce);if(!me)throw new Error("Assertion failed: The package should have been registered");w(me,L,te)}};for(let B of o){let S=t.storedPackages.get(B.anchoredLocator.locatorHash);if(!S)throw new Error("Assertion failed: The package should have been registered");w(S,g,null)}return C}je();var r3={};or(r3,{default:()=>rpt,gitUtils:()=>ZA});je();je();Ht();var ZA={};or(ZA,{TreeishProtocols:()=>oa,clone:()=>$U,fetchBase:()=>Hhe,fetchChangedFiles:()=>qhe,fetchChangedWorkspaces:()=>ept,fetchRoot:()=>Khe,isGitUrl:()=>Zy,lsRemote:()=>_he,normalizeLocator:()=>zU,normalizeRepoUrl:()=>LS,resolveUrl:()=>ZU,splitRepoUrl:()=>A0,validateRepoUrl:()=>VU});je();Ht();tr();var Mhe=He(Nhe()),Lhe=He(lO()),Xy=He(require("querystring")),JU=He(ki()),Ohe=He(require("url"));function Uhe(){return Me(re({},process.env),{GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`})}var $gt=[/^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\/(.+)?$/],oa;(function(o){o.Commit="commit",o.Head="head",o.Tag="tag",o.Semver="semver"})(oa||(oa={}));function Zy(t){return t?$gt.some(e=>!!t.match(e)):!1}function A0(t){t=LS(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:oa.Head,request:"HEAD"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let o=Xy.default.parse(s);for(let[f,g]of Object.entries(o))if(typeof g!="string")throw new Error(`Assertion failed: The ${f} parameter must be a literal string`);let n=Object.values(oa).find(f=>Object.prototype.hasOwnProperty.call(o,f)),[l,u]=typeof n!="undefined"?[n,o[n]]:[oa.Head,"HEAD"
|
|||
|
- ${u.join(`
|
|||
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:l.cwd})}};DB.paths=[["workspace"]],DB.usage=dt.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 Ghe=DB;var npt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:ct.BOOLEAN,default:Yhe.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:ct.STRING,values:["^","~",""],default:qu.CARET},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:ct.BOOLEAN,default:!1}},commands:[Ipe,Bpe,d0e,x0e,hhe,the,q0e,jhe,M0e,L0e,O0e,U0e,ype,Cpe,P0e,R0e,_0e,K0e,G0e,W0e,J0e,V0e,mhe,X0e,ahe,she,Ahe,Z0e,lhe,che,uhe,ghe,phe,Che,Ihe,Ghe]},ipt=npt;var A3={};or(A3,{default:()=>opt});je();var Ot={optional:!0},i3=[["@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:Ot,zenObservable:Ot}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Ot,zenObservable:Ot}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Ot}}],["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"]:Ot,["postcss-jsx"]:Ot,["postcss-less"]:Ot,["postcss-markdown"]:Ot,["postcss-scss"]:Ot}}],["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:Ot}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Ot}}],["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:Ot,"vue-template-compiler":Ot}}],["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:Ot,"utf-8-validate":Ot}}],["react-portal@*",{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"}}],["@webpa
|
|||
|
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, _, _).'"]]});var wde=bB;function mpt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function ypt(t,e){let r=t===0,s=t===e-1;return r&&s?"":r?"\u250C ":s?"\u2514 ":"\u2502 "}je();tr();var xB=class extends It{constructor(){super(...arguments);this.verbose=Ie.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:e}=await Promise.resolve().then(()=>(HS(),_S)),r=await st.find(this.context.cwd,this.context.plugins),{project:s}=await Mt.find(r,this.context.cwd),o=await e.find(s);this.context.stdout.write(this.verbose?o.fullSource:o.source)}};xB.paths=[["constraints","source"]],xB.usage=dt.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"]]});var Bde=xB;je();je();je();tr();var Qde=He(Xw()),vde=He(PU()),Dde=He(TU()),PB=class extends It{constructor(){super(...arguments);this.fix=Ie.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"})}async execute(){let{Constraints:e}=await Promise.resolve().then(()=>(HS(),_S)),r=await st.find(this.context.cwd,this.context.plugins),{project:s}=await Mt.find(r,this.context.cwd),o=await e.find(s),n=await Tt.start({configuration:r,stdout:this.context.stdout},async l=>{let u=new Set,f=[];for(let g=0,C=this.fix?10:1;g<C;++g){f=[];let w=await o.process(),B=new Set;await Cpt(B,f,w.enforcedDependencies,{fix:this.fix,configuration:r});for(let{manifest:y}of B){let N={};y.exportTo(N),y.raw=N}let S=new Set;await Ipt(S,f,w.enforcedFields,{fix:this.fix,configuration:r});for(let{manifest:y}of S)y.load(y.raw);if(u=new Set([...u,...B,...S]),B.size===0&&S.size===0)break}await Promise.all([...u].map(async g=>{await g.persistManifest()}));for(let[g,C]of f)l.reportError(g,C)});return n.hasErrors()?n.exitCode():0}};PB.paths=[["constraints"]],PB.usage=dt.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"]]});var kde=PB;async function Cpt(t,e,r,{configuration:s,fix:o}){let n=new Map,l=new Map;for(let{workspace:u,dependencyIdent:f,dependencyRange:g,dependencyType:C}of r){let w=l.get(u);typeof w=="undefined"&&l.set(u,w=new Map);let B=w.get(f.identHash);typeof B=="undefined"&&w.set(f.identHash,B=new Map);let S=B.get(C);typeof S=="undefined"&&B.set(C,S=new Set),n.set(f.identHash,f),S.add(g)}for(let[u,f]of l)for(let[g,C]of f){let w=n.get(g);if(typeof w=="undefined")throw new Error("Assertion failed: The ident should have been registered");for(let[B,S]of C){let y=S.has(null)?[null]:[...S];if(y.length>2)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via conflicting ranges ${y.slice(0,-1).map(N=>W.prettyRange(s,String(N))).join(", ")}, and ${W.prettyRange(s,String(y[y.length-1]))} (in ${B})`]);else if(y.length>1)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via conflicting ranges ${W.prettyRange(s,String(y[0]))} and ${W.prettyRange(s,String(y[1]))} (in ${B})`]);else{let N=u.manifest[B].get(w.identHash),[L]=y;L!==null?N?N.range!==L&&(o?(u.manifest[B].set(w.identHash,W.makeDescriptor(w,L)),t.add(u)):e.push([ke.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via ${W.prettyRange(s,L)}, but uses ${W.prettyRange(s,N.range)} instead (in ${B})`])):o?(u.manifest[B].set(w.identHash,W.makeDescriptor(w,L)),t.add(u)):e.push([ke.CONSTRAINTS_MISSING_DEPENDENCY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} (via ${W.prettyRange(s,L)}), but doesn't (in ${B})`]):N&&(o?(u.manifest[B].delete(w.identHash),t.add(u)):e.push([ke.CONSTRAINTS_EXTRANEOUS_DEPENDENCY,`${W.prettyWorkspace(s,u)} has an extraneous dependency on ${W.prettyIdent(s,w)} (in ${B})`]))}}}}async function Ipt(t,e,r,{configuration:s,fix:o}){let n=new Map;for(let{workspace:l,fieldPath:u,fieldValue:f}of r){let g=it.getMapWithDefault(n,l);it.getSetWithDefault(g,u).add(f)}for(let[l,u]of n)for(let[f,g]of u){let C=[...g];if(C.length>2)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,l)} must have a field ${Oe.pretty(s,f,"cyan")} set to conflicting values ${C.slice(0,-1).map(w=>Oe.pretty(s,String(w),"magenta")).join(", ")}, or ${Oe.pretty(s,String(C[C.length-1]),"magenta")}`]);else if(C.length>1)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,l)} must have a field ${Oe.pretty(s,f,"cyan")} set to conflicting values ${Oe.pretty(s,String(C[0]),"magenta")} or ${Oe.pretty(s,String(C[1]),"magenta")}`]);else{let w=(0,Qde.default)(l.manifest.raw,f),[B]=C;B!==null?w===void 0?o?(await Q3(l,f,B),t.add(l)):e.push([ke.CONSTRAINTS_MISSING_FIELD,`${W.prettyWorkspace(s,l)} must have a field ${Oe.pretty(s,f,"cyan")} set to ${Oe.pretty(s,String(B),"magenta")}, but doesn't`]):JSON.stringify(w)!==B&&(o?(await Q3(l,f,B),t.add(l)):e.push([ke.CONSTRAINTS_INCOMPATIBLE_FIELD,`${W.prettyWorkspace(s,l)} must have a field ${Oe.pretty(s,f,"cyan")} set to ${Oe.pretty(s,String(B),"magenta")}, but is set to ${Oe.pretty(s,JSON.stringify(w),"magenta")} instead`])):w!=null&&(o?(await Q3(l,f,null),t.add(l)):e.push([ke.CONSTRAINTS_EXTRANEOUS_FIELD,`${W.prettyWorkspace(s,l)} has an extraneous field ${Oe.pretty(s,f,"cyan")} set to ${Oe.pretty(s,JSON.stringify(w),"magenta")}`]))}}}async function Q3(t,e,r){r===null?(0,Dde.default)(t.manifest.raw,e):(0,vde.default)(t.manifest.raw,e,JSON.parse(r))}var Ept={configuration:{constraintsPath:{description:"The path of the constraints file.",type:ct.ABSOLUTE_PATH,default:"./constraints.pro"}},commands:[wde,Bde,kde]},wpt=Ept;var D3={};or(D3,{default:()=>Qpt});je();tr();var qS=class extends It{constructor(){super(...arguments);this.pkg=Ie.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=Ie.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=Ie.String();this.arg
|
|||
|
`),await ge.writeFilePromise($.join(r,"yarn.lock"),"");let s=$.join(r,".yarnrc.yml"),o=await st.findProjectCwd(this.context.cwd,$r.lockfile),l={enableGlobalCache:!(await st.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:wu(ke.UNUSED_PACKAGE_EXTENSION),level:Oe.LogLevel.Discard}]},u=o!==null?$.join(o,".yarnrc.yml"):null;u!==null&&ge.existsSync(u)?(await ge.copyFilePromise(u,s),await st.updateConfiguration(r,L=>{let H=it.toMerged(L,l);return Array.isArray(L.plugins)&&(H.plugins=L.plugins.map(G=>{let te=typeof G=="string"?G:G.path,ce=de.isAbsolute(te)?te:de.resolve(de.fromPortablePath(o),te);return typeof G=="string"?ce:{path:ce,spec:G.spec}})),H})):await ge.writeJsonPromise(s,l);let f=(N=this.packages)!=null?N:[this.command],g=W.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...f],{cwd:r,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`
|
|||
|
`);let w=await st.find(r,this.context.plugins),{project:B,workspace:S}=await Mt.find(w,r);if(S===null)throw new pr(B.cwd,r);await B.restoreInstallState();let y=await vn.getWorkspaceAccessibleBinaries(S);return y.has(g)===!1&&y.size===1&&typeof this.packages=="undefined"&&(g=Array.from(y)[0][0]),await vn.executeWorkspaceAccessibleBinary(S,g,this.args,{packageAccessibleBinaries:y,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};FB.paths=[["dlx"]],FB.usage=dt.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 bde=FB;var Bpt={commands:[Sde,bde]},Qpt=Bpt;var F3={};or(F3,{default:()=>kpt,execUtils:()=>k3});je();je();Ht();var ju="exec:";var k3={};or(k3,{loadGeneratorFile:()=>RB,makeLocator:()=>b3,makeSpec:()=>xde,parseSpec:()=>S3});je();Ht();function S3(t){let{params:e,selector:r}=W.parseRange(t),s=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:s}}function xde({parentLocator:t,path:e,generatorHash:r,protocol:s}){let o=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r!="undefined"?{hash:r}:{};return W.makeRange({protocol:s,source:e,selector:e,params:re(re({},n),o)})}function b3(t,{parentLocator:e,path:r,generatorHash:s,protocol:o}){return W.makeLocator(t,xde({parentLocator:e,path:r,generatorHash:s,protocol:o}))}async function RB(t,e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(t,{protocol:e}),n=$.isAbsolute(o)?{packageFs:new bn(xt.root),prefixPath:xt.dot,localPath:xt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new bn(xt.root),prefixPath:$.relative(xt.root,n.localPath)}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.join(l.prefixPath,o);return await u.readFilePromise(f,"utf8")}var x3=class{supports(e,r){return!!e.reference.startsWith(ju)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:ju});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r)},r.cacheOptions));return{packageFs:o,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:l}}async fetchFromDisk(e,r){let s=await RB(e.reference,ju,r);return ge.mktempPromise(async o=>{let n=$.join(o,"generator.js");return await ge.writeFilePromise(n,s),ge.mktempPromise(async l=>{if(await this.generatePackage(l,e,n,r),!ge.existsSync($.join(l,"build")))throw new Error("The script should have generated a build directory");return await Bs.makeArchiveFromDirectory($.join(l,"build"),{prefixPath:W.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,s,o){return await ge.mktempPromise(async n=>{let l=await vn.makeScriptEnv({project:o.project,binFolder:n}),u=$.join(e,"runtime.js");return await ge.mktempPromise(async f=>{let g=$.join(f,"buildfile.log"),C=null,w=ge.createWriteStream(g),B=w,S=$.join(e,"generator"),y=$.join(e,"build");await ge.mkdirPromise(S),await ge.mkdirPromise
|
|||
|
// 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(N)},
|
|||
|
},
|
|||
|
enumerable: true,
|
|||
|
});
|
|||
|
`);let L=l.NODE_OPTIONS||"",H=/\s*--require\s+\S*\.pnp\.c?js\s*/g;L=L.replace(H," ").trim(),l.NODE_OPTIONS=L,w.write(`# This file contains the result of Yarn generating a package (${W.stringifyLocator(r)})
|
|||
|
`),w.write(`
|
|||
|
`);let{code:G}=await wn.pipevp(process.execPath,["--require",de.fromPortablePath(u),de.fromPortablePath(s),W.stringifyIdent(r)],{cwd:e,env:l,stdin:C,stdout:w,stderr:B});if(G!==0)throw ge.detachTemp(f),new Error(`Package generation failed (exit code ${G}, logs can be found here: ${Oe.pretty(o.project.configuration,g,Oe.Type.PATH)})`)})})}};je();je();je();var vpt=2,P3=class{supportsDescriptor(e,r){return!!e.range.startsWith(ju)}supportsLocator(e,r){return!!e.reference.startsWith(ju)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:o,parentLocator:n}=S3(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let l=await RB(W.makeRange({protocol:ju,source:o,selector:o,params:{locator:W.stringifyLocator(n)}}),ju,s.fetchOptions),u=ro.makeHash(`${vpt}`,l).slice(0,6);return[b3(e,{parentLocator:n,path:o,generatorHash:u,protocol:ju})]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),o=await it.releaseAfterUseAsync(async()=>await Xt.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return Me(re({},e),{version:o.version||"0.0.0",languageName:o.languageName||r.project.configuration.get("defaultLanguageName"),linkType:Vr.HARD,conditions:o.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(o.dependencies),peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};var Dpt={fetchers:[x3],resolvers:[P3]},kpt=Dpt;var K3={};or(K3,{default:()=>xpt,fileUtils:()=>R3});je();Ht();var nC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,TB=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,ps="file:";var R3={};or(R3,{makeArchiveFromLocator:()=>jS,makeBufferFromLocator:()=>M3,makeLocator:()=>N3,makeSpec:()=>Pde,parseSpec:()=>T3});je();Ht();function T3(t){let{params:e,selector:r}=W.parseRange(t),s=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:s}}function Pde({parentLocator:t,path:e,folderHash:r,protocol:s}){let o=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r!="undefined"?{hash:r}:{};return W.makeRange({protocol:s,source:e,selector:e,params:re(re({},n),o)})}function N3(t,{parentLocator:e,path:r,folderHash:s,protocol:o}){return W.makeLocator(t,Pde({parentLocator:e,path:r,folderHash:s,protocol:o}))}async function jS(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:o,path:n}=W.parseFileStyleRange(t.reference,{protocol:e}),l=$.isAbsolute(n)?{packageFs:new bn(xt.root),prefixPath:xt.dot,localPath:xt.root}:await r.fetcher.fetch(o,r),u=l.localPath?{packageFs:new bn(xt.root),prefixPath:$.relative(xt.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();let f=u.packageFs,g=$.join(u.prefixPath,n);return await it.releaseAfterUseAsync(async()=>await Bs.makeArchiveFromDirectory(g,{baseFs:f,prefixPath:W.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),u.releaseFs)}async function M3(t,{protocol:e,fetchOptions:r}){return(await jS(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var L3=class{supports(e,r){return!!e.reference.startsWith(ps)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:ps});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in th
|
|||
|
`);let l=$.join(this.context.cwd,Xt.fileName);await ge.changeFilePromise(l,`${JSON.stringify(n,null,2)}
|
|||
|
`,{automaticNewlines:!0});let u=$.join(this.context.cwd,"README.md");if(ge.existsSync(u)||await ge.writeFilePromise(u,`# ${W.stringifyIdent(s.name)}
|
|||
|
`),!r||r.cwd===this.context.cwd){let g=$.join(this.context.cwd,$r.lockfile);ge.existsSync(g)||await ge.writeFilePromise(g,"");let w=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!.yarn/cache","#.pnp.*"].map(L=>`${L}
|
|||
|
`).join(""),B=$.join(this.context.cwd,".gitignore");ge.existsSync(B)||await ge.writeFilePromise(B,w);let S={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};it.mergeIntoTarget(S,e.get("initEditorConfig"));let y=`root = true
|
|||
|
`;for(let[L,H]of Object.entries(S)){y+=`
|
|||
|
[${L}]
|
|||
|
`;for(let[G,te]of Object.entries(H))y+=`${G.replace(/[A-Z]/g,me=>`_${me.toLowerCase()}`)} = ${te}
|
|||
|
`}let N=$.join(this.context.cwd,".editorconfig");ge.existsSync(N)||await ge.writeFilePromise(N,y),ge.existsSync($.join(this.context.cwd,".git"))||await wn.execvp("git",["init"],{cwd:this.context.cwd})}}};LB.paths=[["init"]],LB.usage=dt.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 Mde=LB;var Mpt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:ct.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:ct.MAP,valueDefinition:{description:"",type:ct.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:ct.MAP,valueDefinition:{description:"",type:ct.ANY}}},commands:[Mde]},Lpt=Mpt;var W_={};or(W_,{default:()=>fCt});je();var Lde=He(require("os"));function iC({stdout:t}){if(Lde.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(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}tr();var Wme=He(u8()),f8={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Bht=(0,Wme.default)(f8.appId,f8.apiKey).initIndex(f8.indexName),g8=async(t,e=0)=>await Bht.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var N1=["regular","dev","peer"],M1=class extends It{async execute(){iC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(Rb(),N_)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Lb(),Mb)),{useKeypress:s}=await Promise.resolve().then(()=>(P1(),fEe)),{useMinistore:o}=await Promise.resolve().then(()=>(H_(),K_)),{renderForm:n}=await Promise.resolve().then(()=>(Kb(),Ub)),{default:l}=await Promise.resolve().then(()=>He(wEe())),{Box:u,Text:f}=await Promise.resolve().then(()=>He(Xl())),{default:g,useEffect:C,useState:w}=await Promise.resolve().then(()=>He(yn())),B=await st.find(this.context.cwd,this.context.plugins),S=()=>g.createElement(u,{flexDirection:"row"},g.createElement(u,{flexDirection:"column",width:48},g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<up>"),"/",g.createElement(f,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),g.createElement(u,{flexDirection:"column"},g.createElement(u,{marginLeft:1},g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages."))
|
|||
|
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"]]});var BEe=M1;je();tr();U4();var bEe=He(ki()),xEe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,PEe=(t,e)=>t.length>0?[t.slice(0,e)].concat(PEe(t.slice(e),e)):[],O1=class extends It{async execute(){iC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(SEe(),kEe)),{Pad:r}=await Promise.resolve().then(()=>(Y_(),QEe)),{ScrollableItems:s}=await Promise.resolve().then(()=>(Lb(),Mb)),{useMinistore:o}=await Promise.resolve().then(()=>(H_(),K_)),{renderForm:n}=await Promise.resolve().then(()=>(Kb(),Ub)),{Box:l,Text:u}=await Promise.resolve().then(()=>He(Xl())),{default:f,useEffect:g,useRef:C,useState:w}=await Promise.resolve().then(()=>He(yn())),B=await st.find(this.context.cwd,this.context.plugins),{project:S,workspace:y}=await Mt.find(B,this.context.cwd),N=await en.find(B);if(!y)throw new pr(S.cwd,this.context.cwd);await S.restoreInstallState({restoreResolutions:!1});let L=this.context.stdout.rows-7,H=(De,Ee)=>{let fe=pue(De,Ee),ne="";for(let Be of fe)Be.added?ne+=Oe.pretty(B,Be.value,"green"):Be.removed||(ne+=Be.value);return ne},G=(De,Ee)=>{if(De===Ee)return Ee;let fe=W.parseRange(De),ne=W.parseRange(Ee),Be=fe.selector.match(xEe),Te=ne.selector.match(xEe);if(!Be||!Te)return H(De,Ee);let Qt=["gray","red","yellow","green","magenta"],_=null,Ge="";for(let rt=1;rt<Qt.length;++rt)_!==null||Be[rt]!==Te[rt]?(_===null&&(_=Qt[rt-1]),Ge+=Oe.pretty(B,Te[rt],_)):Ge+=Te[rt];return Ge},te=async(De,Ee,fe)=>{let ne=await a0.fetchDescriptorFrom(De,fe,{project:S,cache:N,preserveModifier:Ee,workspace:y});return ne!==null?ne.range:De.range},ce=async De=>{let Ee=bEe.default.valid(De.range)?`^${De.range}`:De.range,[fe,ne]=await Promise.all([te(De,De.range,Ee).catch(()=>null),te(De,De.range,"latest").catch(()=>null)]),Be=[{value:null,label:De.range}];return fe&&fe!==De.range?Be.push({value:fe,label:G(De.range,fe)}):Be.push({value:null,label:""}),ne&&ne!==fe&&ne!==De.range?Be.push({value:ne,label:G(De.range,ne)}):Be.push({value:null,label:""}),Be},me=()=>f.createElement(l,{flexDirection:"row"},f.createElement(l,{flexDirection:"column",width:49},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<up>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<left>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),f.createElement(l,{flexDirection:"column"},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),Ce=()=>f.createElement(l,{flexDirection:"row",paddingTop:1,paddingBottom:1},f.createElement(l,{width:50},f.createElement(u,{bold:!0},f.createElement(u,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Current")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Range")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Latest"))),Se=({active:De,descriptor:Ee,suggestions:fe})=>{let[ne,Be]=o(Ee.descriptorHash,null),Te=W.stringifyIdent(Ee),Qt=Math.max(0,45-Te.length);return f.createElement(f.Fragment,null,f.createElement(l,null,f.createElement(l,{width:45},f.createElement(u,{bold:!0},W.prettyIdent(B,Ee)),f.createElement(r,{active:De,length:Qt})),f.createElement(e,{active:De,options:fe,value:ne,skewer:!0,onChange:Be,sizes:[17,17,17]})))},ye=({dependencies:De})=>{let[Ee,fe]=w(De.map(()=>null)),ne=C(!0),Be=async Te=>{let Qt=await ce(Te);return Qt.filter(_=>_.label!=="").length<=1?null:{descriptor:Te,suggestions:Qt}};return g(()=>()=>{ne.current=!1},[]),g(()=>{let Te=Math.trunc(L*1.75),Qt=De.slice(0,Te),_=De.slice(Te),Ge=PEe(_,L),rt=Q
|
|||
|
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 FEe=O1;var uCt={commands:[BEe,FEe]},fCt=uCt;var Z_={};or(Z_,{default:()=>pCt});je();Ht();var kg="portal:",Sg="link:";var J_=class{supports(e,r){return!!e.reference.startsWith(kg)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:kg});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){var g;let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:kg}),n=$.isAbsolute(o)?{packageFs:new bn(xt.root),prefixPath:xt.dot,localPath:xt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new bn(xt.root),prefixPath:$.relative(xt.root,n.localPath),localPath:xt.root}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.resolve((g=l.localPath)!=null?g:l.packageFs.getRealPath(),l.prefixPath,o);return n.localPath?{packageFs:new bn(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:xt.dot,localPath:f}:{packageFs:new qf(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:xt.dot}}};je();je();je();Ht();var z_=class{supportsDescriptor(e,r){return!!e.range.startsWith(kg)}supportsLocator(e,r){return!!e.reference.startsWith(kg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let o=e.range.slice(kg.length);return[W.makeLocator(e,`${kg}${de.toPortablePath(o)}`)]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),o=await it.releaseAfterUseAsync(async()=>await Xt.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return Me(re({},e),{version:o.version||"0.0.0",languageName:o.languageName||r.project.configuration.get("defaultLanguageName"),linkType:Vr.SOFT,conditions:o.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(o.dependencies),peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};je();Ht();var V_=class{supports(e,r){return!!e.reference.startsWith(Sg)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:Sg});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){var g;let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:Sg}),n=$.isAbsolute(o)?{packageFs:new bn(xt.root),prefixPath:xt.dot,localPath:xt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new bn(xt.root),prefixPath:$.relative(xt.root,n.localPath),localPath:xt.root}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.resolve((g=l.localPath)!=null?g:l.packageFs.getRealPath(),l.prefixPath,o);return n.localPath?{packageFs:new bn(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:xt.dot,discardFromLookup:!0,localPath:f}:{packageFs:new qf(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:xt.dot,discardFromLookup:!0}}};je();je();Ht();var X_=class{supportsDescriptor(e,r){return!!e.range.startsWith(Sg)}supportsLocator(e,r){return!!e.reference.startsWith(Sg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let o=e.range.slice(Sg.length);return[W.makeLocator(e,`${Sg}${de.toPortablePath(o)}`)]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return Me(re({},e),{version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:Vr.SOFT,conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map})}};var gCt={fetchers:[V_,J_],resolvers:[X_,z_]
|
|||
|
${C}, next tree:
|
|||
|
${U1(u)}`);let B=TEe(u);if(B)throw new Error(`${B}, after hoisting finished:
|
|||
|
${U1(u)}`)}return n.debugLevel>=2&&console.log(U1(u)),dCt(u)},mCt=t=>{let e=t[t.length-1],r=new Map,s=new Set,o=n=>{if(!s.has(n)){s.add(n);for(let l of n.hoistedDependencies.values())r.set(l.name,l);for(let l of n.dependencies.values())n.peerNames.has(l.name)||o(l)}};return o(e),r},yCt=t=>{let e=t[t.length-1],r=new Map,s=new Set,o=new Set,n=(l,u)=>{if(s.has(l))return;s.add(l);for(let g of l.hoistedDependencies.values())if(!u.has(g.name)){let C;for(let w of t)C=w.dependencies.get(g.name),C&&r.set(C.name,C)}let f=new Set;for(let g of l.dependencies.values())f.add(g.name);for(let g of l.dependencies.values())l.peerNames.has(g.name)||n(g,f)};return n(e,o),r},MEe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:o,locator:n,dependencies:l,originalDependencies:u,hoistedDependencies:f,peerNames:g,reasons:C,isHoistBorder:w,hoistPriority:B,dependencyKind:S,hoistedFrom:y,hoistedTo:N}=e,L={name:r,references:new Set(s),ident:o,locator:n,dependencies:new Map(l),originalDependencies:new Map(u),hoistedDependencies:new Map(f),peerNames:new Set(g),reasons:new Map(C),decoupled:!0,isHoistBorder:w,hoistPriority:B,dependencyKind:S,hoistedFrom:new Map(y),hoistedTo:new Map(N)},H=L.dependencies.get(r);return H&&H.ident==L.ident&&L.dependencies.set(r,L),t.dependencies.set(L.name,L),L},CCt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let o of t.dependencies.values())t.peerNames.has(o.name)||r.set(o.name,[o.ident]);let s=Array.from(e.keys());s.sort((o,n)=>{let l=e.get(o),u=e.get(n);return u.hoistPriority!==l.hoistPriority?u.hoistPriority-l.hoistPriority:u.peerDependents.size!==l.peerDependents.size?u.peerDependents.size-l.peerDependents.size:u.dependents.size-l.dependents.size});for(let o of s){let n=o.substring(0,o.indexOf("@",1)),l=o.substring(n.length+1);if(!t.peerNames.has(n)){let u=r.get(n);u||(u=[],r.set(n,u)),u.indexOf(l)<0&&u.push(l)}}return r},tK=t=>{let e=new Set,r=(s,o=new Set)=>{if(!o.has(s)){o.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let l=t.dependencies.get(n);l&&!e.has(l)&&r(l,o)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},eK=(t,e,r,s,o,n=new Set)=>{let l=e[e.length-1];if(n.has(l))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(l);let u=ECt(l),f=CCt(l,u),g=t==l?new Map:o.fastLookupPossible?mCt(e):yCt(e),C,w=!1,B=!1,S=new Map(Array.from(f.entries()).map(([N,L])=>[N,L[0]])),y=new Map;do{let N=ICt(t,e,r,g,S,f,s,y,o);N.isGraphChanged&&(B=!0),N.anotherRoundNeeded&&(w=!0),C=!1;for(let[L,H]of f)H.length>1&&!l.dependencies.has(L)&&(S.delete(L),H.shift(),S.set(L,H[0]),C=!0)}while(C);for(let N of l.dependencies.values())if(!l.peerNames.has(N.name)&&!r.has(N.locator)){r.add(N.locator);let L=eK(t,[...e,N],r,y,o);L.isGraphChanged&&(B=!0),L.anotherRoundNeeded&&(w=!0),r.delete(N.locator)}return{anotherRoundNeeded:w,isGraphChanged:B}},wCt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},BCt=(t,e,r,s,o,n,l,u,{outputReason:f,fastLookupPossible:g})=>{let C,w=null,B=new Set;f&&(C=`${Array.from(e).map(L=>xo(L)).join("\u2192")}`);let S=r[r.length-1],N=!(s.ident===S.ident);if(f&&!N&&(w="- self-reference"),N&&(N=s.dependencyKind!==1,f&&!N&&(w="- workspace")),N&&s.dependencyKind===2&&(N=!wCt(s),f&&!N&&(w="- external soft link with unhoisted dependencies")),N&&(N=S.dependencyKind!==1||S.hoistedFrom.has(s.name)||e.size===1,f&&!N&&(w=S.reasons.get(s.name))),N&&(N=!t.peerNames.has(s.name),f&&!N&&(w=`- cannot shadow peer: ${xo(t.originalDependencies.get(s.name).locator)} at ${C}`)),N){let L=!1,H=o.get(s.name);if(L=!H||H.ident===s.ident,f&&!L&&(w=`- filled by: ${xo(H.locator)} at ${C}`),L)for(let G=r.length-1;G>=1;G--){let ce=r[G].dependencies.get(s.name);if(ce&&ce.ident!==s.ident){L=!1;let me=u.get(S);me||(me=new Set,u.set(S,me)),me.add(s.name),f&&(w=`- filled by ${xo(ce.locator)} at ${r.slice(0,G).map(Ce=>xo(Ce.locator)).join("\u2192")}`);break}}N=L}if(N&&(N=n.get(s.name)===s.ident,f&&!N&&(w=`- filled by: ${xo(l.get(s.name)[0])} at ${C}`)),N){let L=!0,H=new Set(s.peerNames);for(let G=r.length-1;G>=1;G--){let te=r[G];for(let ce of H){if(
|
|||
|
${U1(t)}`)}let De=tK(ce);for(let Ee of De)if(Qe.has(Ee)){let fe=xe.get(Ee);if((o.get(Ee.name)===Ee.ident||!ce.reasons.has(Ee.name))&&fe.isHoistable!==0&&ce.reasons.set(Ee.name,fe.reason),!Ee.isHoistBorder&&Se.indexOf(Hb(Ee))<0){C.add(ce);let Be=MEe(ce,Ee);S([...H,ce],Ce,Se,Be,N),C.delete(ce)}}},y,N=new Set(tK(g)),L=Array.from(e).map(H=>Hb(H));do{y=N,N=new Set;for(let H of y){if(H.locator===g.locator||H.isHoistBorder)continue;let G=MEe(g,H);S([],Array.from(r),L,G,N)}}while(N.size>0);return{anotherRoundNeeded:w,isGraphChanged:B}},TEe=t=>{let e=[],r=new Set,s=new Set,o=(n,l,u)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let f=new Map(l);for(let g of n.dependencies.values())n.peerNames.has(g.name)||f.set(g.name,g);for(let g of n.originalDependencies.values()){let C=f.get(g.name),w=()=>`${Array.from(s).concat([n]).map(B=>xo(B.locator)).join("\u2192")}`;if(n.peerNames.has(g.name)){let B=l.get(g.name);(B!==C||!B||B.ident!==g.ident)&&e.push(`${w()} - broken peer promise: expected ${g.ident} but found ${B&&B.ident}`)}else{let B=u.hoistedFrom.get(n.name),S=n.hoistedTo.get(g.name),y=`${B?` hoisted from ${B.join(", ")}`:""}`,N=`${S?` hoisted to ${S}`:""}`,L=`${w()}${y}`;C?C.ident!==g.ident&&e.push(`${L} - broken require promise for ${g.name}${N}: expected ${g.ident}, but found: ${C.ident}`):e.push(`${L} - broken require promise: no required dependency ${g.name}${N} found`)}}s.add(n);for(let g of n.dependencies.values())n.peerNames.has(g.name)||o(g,f,n);s.delete(n)};return o(t,t.dependencies,t),e.join(`
|
|||
|
`)},hCt=(t,e)=>{let{identName:r,name:s,reference:o,peerNames:n}=t,l={name:s,references:new Set([o]),locator:$_(r,o),ident:REe(r,o),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},u=new Map([[t,l]]),f=(g,C)=>{let w=u.get(g),B=!!w;if(!w){let{name:S,identName:y,reference:N,peerNames:L,hoistPriority:H,dependencyKind:G}=g,te=e.hoistingLimits.get(C.locator);w={name:S,references:new Set([N]),locator:$_(y,N),ident:REe(y,N),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(L),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(S):!1,hoistPriority:H||0,dependencyKind:G||0,hoistedFrom:new Map,hoistedTo:new Map},u.set(g,w)}if(C.dependencies.set(g.name,w),C.originalDependencies.set(g.name,w),B){let S=new Set,y=N=>{if(!S.has(N)){S.add(N),N.decoupled=!1;for(let L of N.dependencies.values())N.peerNames.has(L.name)||y(L)}};y(w)}else for(let S of g.dependencies)f(S,w)};for(let g of t.dependencies)f(g,l);return l},rK=t=>t.substring(0,t.indexOf("@",1)),dCt=t=>{let e={name:t.name,identName:rK(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(o,n,l)=>{let u=r.has(o),f;if(n===o)f=l;else{let{name:g,references:C,locator:w}=o;f={name:g,identName:rK(w),references:C,dependencies:new Set}}if(l.dependencies.add(f),!u){r.add(o);for(let g of o.dependencies.values())o.peerNames.has(g.name)||s(g,o,f);r.delete(o)}};for(let o of t.dependencies.values())s(o,t,e);return e},ECt=t=>{let e=new Map,r=new Set([t]),s=l=>`${l.name}@${l.ident}`,o=l=>{let u=s(l),f=e.get(u);return f||(f={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(u,f)),f},n=(l,u)=>{let f=!!r.has(u);if(o(u).dependents.add(l.ident),!f){r.add(u);for(let C of u.dependencies.values()){let w=o(C);w.hoistPriority=Math.max(w.hoistPriority,C.hoistPriority),u.peerNames.has(C.name)?w.peerDependents.add(u.ident):n(u,C)}}};for(let l of t.dependencies.values())t.peerNames.has(l.name)||n(t,l);return e},xo=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=t.substring(e+1);if(s==="workspace:.")return".";if(s){let o=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),o.startsWith("workspace")&&(r=`w:${r}`,o=""),`${r}${o?`@${o}`:""}`}else return`${r}`},LEe=5e4,U1=t=>{let e=0,r=(o,n,l="")=>{if(e>LEe||n.has(o))return"";e++;let u=Array.from(o.dependencies.values()).sort((g,C)=>g.name===C.name?0:g.name>C.name?1:-1),f="";n.add(o);for(let g=0;g<u.length;g++){let C=u[g];if(!o.peerNames.has(C.name)&&C!==o){let w=o.reasons.get(C.name),B=rK(C.locator);f+=`${l}${g<u.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(B!==C.name?`a:${C.name}:`:"")+xo(C.locator)+(w?` ${w}`:"")}
|
|||
|
`,f+=r(C,n,`${l}${g<u.length-1?"\u2502 ":" "}`)}}return n.delete(o),f};return r(t,new Set)+(e>LEe?`
|
|||
|
Tree is too large, part of the tree has been dunped
|
|||
|
`:"")};var Hc;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(Hc||(Hc={}));var EA;(function(s){s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none"})(EA||(EA={}));var OEe="node_modules",Nd="$wsroot$";var _1=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:o,preserveSymlinksRequired:n}=QCt(t,e),l=null;if(o.length===0){let u=NEe(r,{hoistingLimits:s});l=vCt(t,u,e)}return{tree:l,errors:o,preserveSymlinksRequired:n}},Wu=t=>`${t.name}@${t.reference}`,nK=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let o=e.get(s.locator);o||(o={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,o)),o.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,o)=>{let n=s.split($.delimiter).length,l=o.split($.delimiter).length;return o===s?0:n!==l?l-n:o>s?1:-1});return e},UEe=(t,e)=>{let r=W.isVirtualLocator(t)?W.devirtualizeLocator(t):t,s=W.isVirtualLocator(e)?W.devirtualizeLocator(e):e;return W.areLocatorsEqual(r,s)},iK=(t,e,r,s)=>{if(t.linkType!==Hc.SOFT)return!1;let o=de.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return $.contains(s,o)===null},DCt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=de.toPortablePath(e.packageLocation.slice(0,-1)),o=new Map,n={children:new Map},l=t.getDependencyTreeRoots(),u=new Map,f=new Set,g=(B,S)=>{let y=Wu(B);if(f.has(y))return;f.add(y);let N=t.getPackageInformation(B);if(N){let L=S?Wu(S):"";if(Wu(B)!==L&&N.linkType===Hc.SOFT&&!iK(N,B,t,s)){let H=_Ee(N,B,t);(!u.get(H)||B.reference.startsWith("workspace:"))&&u.set(H,B)}for(let[H,G]of N.packageDependencies)G!==null&&(N.packagePeers.has(H)||g(t.getLocator(H,G),B))}};for(let B of l)g(B,null);let C=s.split($.sep);for(let B of u.values()){let S=t.getPackageInformation(B),N=de.toPortablePath(S.packageLocation.slice(0,-1)).split($.sep).slice(C.length),L=n;for(let H of N){let G=L.children.get(H);G||(G={children:new Map},L.children.set(H,G)),L=G}L.workspaceLocator=B}let w=(B,S)=>{if(B.workspaceLocator){let y=Wu(S),N=o.get(y);N||(N=new Set,o.set(y,N)),N.add(B.workspaceLocator)}for(let y of B.children.values())w(y,B.workspaceLocator||S)};for(let B of n.children.values())w(B,n.workspaceLocator);return o},QCt=(t,e)=>{let r=[],s=!1,o=new Map,n=DCt(t),l=t.getPackageInformation(t.topLevel);if(l===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let u=t.findPackageLocator(l.packageLocation);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let f=de.toPortablePath(l.packageLocation.slice(0,-1)),g={name:u.name,identName:u.name,reference:u.reference,peerNames:l.packagePeers,dependencies:new Set,dependencyKind:IA.WORKSPACE},C=new Map,w=(S,y)=>`${Wu(y)}:${S}`,B=(S,y,N,L,H,G,te,ce)=>{var Ee,fe;let me=w(S,N),Ce=C.get(me),Se=!!Ce;!Se&&N.name===u.name&&N.reference===u.reference&&(Ce=g,C.set(me,g));let ye=iK(y,N,t,f);if(!Ce){let ne=IA.REGULAR;ye?ne=IA.EXTERNAL_SOFT_LINK:y.linkType===Hc.SOFT&&N.name.endsWith(Nd)&&(ne=IA.WORKSPACE),Ce={name:S,identName:N.name,reference:N.reference,dependencies:new Set,peerNames:ne===IA.WORKSPACE?new Set:y.packagePeers,dependencyKind:ne},C.set(me,Ce)}let xe;if(ye?xe=2:H.linkType===Hc.SOFT?xe=1:xe=0,Ce.hoistPriority=Math.max(Ce.hoistPriority||0,xe),ce&&!ye){let ne=Wu({name:L.identName,reference:L.reference}),Be=o.get(ne)||new Set;o.set(ne,Be),Be.add(Ce.name)}let Qe=new Map(y.packageDependencies);if(e.project){let ne=e.project.workspacesByCwd.get(de.toPortablePath(y.packageLocation.slice(0,-1)));if(ne){let Be=new Set([...Array.from(ne.manifest.peerDependencies.values(),Te=>W.stringifyIdent(Te)),...Array.from(ne.manifest.peerDependenciesMeta.keys())]);for(let Te of Be)Qe.has(Te)||(Qe.set(Te,G.get(Te)||null),Ce.peerNames.add(Te))}}let p=Wu({
|
|||
|
`;for(let n=0,l=t.length;n<l;++n)o+=s+qb(String(n),t[n],e,s).replace(/^ +/,""),n+1<l&&(o+=","),o+=`
|
|||
|
`;return o+=r,o+="]",o}function xCt(t,e,r){let s=Object.keys(t),o="";o+="{";for(let n=0,l=s.length,u=0;n<l;++n){let f=s[n],g=t[f];typeof g!="undefined"&&(u!==0&&(o+=", "),o+=JSON.stringify(f),o+=": ",o+=qb(f,g,e,r).replace(/^ +/g,""),u+=1)}return o+="}",o}function PCt(t,e,r){let s=Object.keys(t),o=`${r} `,n="";n+=r,n+=`{
|
|||
|
`;let l=0;for(let u=0,f=s.length;u<f;++u){let g=s[u],C=t[g];typeof C!="undefined"&&(l!==0&&(n+=",",n+=`
|
|||
|
`),n+=o,n+=JSON.stringify(g),n+=": ",n+=qb(g,C,e,o).replace(/^ +/g,""),l+=1)}return l!==0&&(n+=`
|
|||
|
`),n+=r,n+="}",n}function qb(t,e,r,s){let{next:o}=HEe[r],n=o[t]||o["*"];return qEe(e,n,s)}function qEe(t,e,r){let{collapsed:s}=HEe[e];return Array.isArray(t)?s?SCt(t,e,r):bCt(t,e,r):typeof t=="object"&&t!==null?s?xCt(t,e,r):PCt(t,e,r):JSON.stringify(t)}function jEe(t){return qEe(t,Jn.TOP_LEVEL,"")}function K1(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(l=>n(l)));let o=r.map((n,l)=>l);return o.sort((n,l)=>{for(let u of s){let f=u[n]<u[l]?-1:u[n]>u[l]?1:0;if(f!==0)return f}return 0}),o.map(n=>r[n])}function FCt(t){let e=new Map,r=K1(t.fallbackExclusionList||[],[({name:s,reference:o})=>s,({name:s,reference:o})=>o]);for(let{name:s,reference:o}of r){let n=e.get(s);typeof n=="undefined"&&e.set(s,n=new Set),n.add(o)}return Array.from(e).map(([s,o])=>[s,Array.from(o)])}function RCt(t){return K1(t.fallbackPool||[],([e])=>e)}function TCt(t){let e=[];for(let[r,s]of K1(t.packageRegistry,([o])=>o===null?"0":`1${o}`)){let o=[];e.push([r,o]);for(let[n,{packageLocation:l,packageDependencies:u,packagePeers:f,linkType:g,discardFromLookup:C}]of K1(s,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!u.has(r)&&w.push([r,n]);for(let[y,N]of K1(u.entries(),([L])=>L))w.push([y,N]);let B=f&&f.size>0?Array.from(f):void 0,S=C||void 0;o.push([n,{packageLocation:l,packageDependencies:w,packagePeers:B,linkType:g,discardFromLookup:S}])}}return e}function H1(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:FCt(t),fallbackPool:RCt(t),packageRegistryData:TCt(t)}}var WEe=He(YEe());function JEe(t,e){return[t?`${t}
|
|||
|
`:"",`/* eslint-disable */
|
|||
|
|
|||
|
`,`try {
|
|||
|
`,` Object.freeze({}).detectStrictMode = true;
|
|||
|
`,`} catch (error) {
|
|||
|
`," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n",`}
|
|||
|
`,`
|
|||
|
`,e,`
|
|||
|
`,(0,WEe.default)()].join("")}function NCt(t){return JSON.stringify(t,null,2)}function MCt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
|||
|
`)}'`}function LCt(t){return[`const RAW_RUNTIME_STATE =
|
|||
|
`,`${MCt(jEe(t))};
|
|||
|
|
|||
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
|||
|
`,`}
|
|||
|
`].join("")}function OCt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` return hydrateRuntimeState(require(${JSON.stringify(`./${$r.pnpData}`)}), {basePath: basePath || __dirname});
|
|||
|
`,`}
|
|||
|
`].join("")}function zEe(t){let e=H1(t),r=LCt(e);return JEe(t.shebang,r)}function VEe(t){let e=H1(t),r=OCt(),s=JEe(t.shebang,r);return{dataFile:NCt(e),loaderFile:s}}var jCt=He(require("path"));Ht();function oK(t,{basePath:e}){let r=de.toPortablePath(e),s=$.resolve(r),o=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,l=new Map(t.packageRegistryData.map(([w,B])=>[w,new Map(B.map(([S,y])=>{var te;if(w===null!=(S===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let N=(te=y.discardFromLookup)!=null?te:!1,L={name:w,reference:S},H=n.get(y.packageLocation);H?(H.discardFromLookup=H.discardFromLookup&&N,N||(H.locator=L)):n.set(y.packageLocation,{locator:L,discardFromLookup:N});let G=null;return[S,{packageDependencies:new Map(y.packageDependencies),packagePeers:new Set(y.packagePeers),linkType:y.linkType,discardFromLookup:N,get packageLocation(){return G||(G=$.join(s,y.packageLocation))}}]}))])),u=new Map(t.fallbackExclusionList.map(([w,B])=>[w,new Set(B)])),f=new Map(t.fallbackPool),g=t.dependencyTreeRoots,C=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:g,enableTopLevelFallback:C,fallbackExclusionList:u,fallbackPool:f,ignorePattern:o,packageLocatorsByLocations:n,packageRegistry:l}}Ht();Ht();var q1=He(require("module"));function CC(t,e){if(typeof t=="string")return t;if(t){let r,s;if(Array.isArray(t)){for(r=0;r<t.length;r++)if(s=CC(t[r],e))return s}else for(r in t)if(e.has(r))return CC(t[r],e)}}function Md(t,e,r){throw new Error(r?`No known conditions for "${e}" entry in "${t}" package`:`Missing "${e}" export in "${t}" package`)}function UCt(t,e){return e===t?".":e[0]==="."?e:e.replace(new RegExp("^"+t+"/"),"./")}function XEe(t,e=".",r={}){let{name:s,exports:o}=t;if(o){let{browser:n,require:l,unsafe:u,conditions:f=[]}=r,g=UCt(s,e);if(g[0]!=="."&&(g="./"+g),typeof o=="string")return g==="."?o:Md(s,g);let C=new Set(["default",...f]);u||C.add(l?"require":"import"),u||C.add(n?"browser":"node");let w,B,S=!1;for(w in o){S=w[0]!==".";break}if(S)return g==="."?CC(o,C)||Md(s,g,1):Md(s,g);if(B=o[g])return CC(B,C)||Md(s,g,1);for(w in o){if(B=w[w.length-1],B==="/"&&g.startsWith(w))return(B=CC(o[w],C))?B+g.substring(w.length):Md(s,g,1);if(B==="*"&&g.startsWith(w.slice(0,-1))&&g.substring(w.length-1).length>0)return(B=CC(o[w],C))?B.replace("*",g.substring(w.length-1)):Md(s,g,1)}return Md(s,g)}}var aK=He(require("util"));Ht();var gi;(function(g){g.API_ERROR="API_ERROR",g.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",g.EXPORTS_RESOLUTION_FAILED="EXPORTS_RESOLUTION_FAILED",g.MISSING_DEPENDENCY="MISSING_DEPENDENCY",g.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",g.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",g.INTERNAL="INTERNAL",g.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",g.UNSUPPORTED="UNSUPPORTED"})(gi||(gi={}));var _Ct=new Set([gi.BUILTIN_NODE_RESOLUTION_FAILED,gi.MISSING_DEPENDENCY,gi.MISSING_PEER_DEPENDENCY,gi.QUALIFIED_PATH_RESOLUTION_FAILED,gi.UNDECLARED_DEPENDENCY]);function vs(t,e,r={},s){s!=null||(s=_Ct.has(t)?"MODULE_NOT_FOUND":t);let o={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:Me(re({},o),{value:s}),pnpCode:Me(re({},o),{value:t}),data:Me(re({},o),{value:r})})}function qc(t){return de.normalize(de.fromPortablePath(t))}Ht();var KCt=He(require("fs")),ZEe=He(require("module")),HCt=He(require("path")),qCt=new Set(ZEe.Module.builtinModules||Object.keys(process.binding("natives"))),jb=t=>t.startsWith("node:")||qCt.has(t);function AK(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,l=/\/$/,u=/^\.{0,2}\//,f={name:null,reference:null},g=[],C=new Set;if(t.enableTopLevelFallback===!0&&g.push(f),e.compatibilityMode!==!1)for(let _ of["react-scripts","gatsby"]){let Ge=t.packageRegistry.get(_);if(Ge)for(let rt of Ge.keys()){if(rt===null)throw new Error("Assertion failed: This reference shouldn't be null
|
|||
|
|
|||
|
Require request: "${Ye}"
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re});return de.toPortablePath(Ze)}let yt,nt=_.match(o);if(nt){if(!Ge)throw vs(gi.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Re});let[,Ze,$e]=nt,k=Ee(Ge);if(!k){let Ae=Se(_,Ge);if(Ae===!1)throw vs(gi.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: "${Ye}"
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re});return de.toPortablePath(Ae)}let D=H(k).packageDependencies.get(Ze),m=null;if(D==null&&k.name!==null){let Ae=t.fallbackExclusionList.get(k.name);if(!Ae||!Ae.has(k.reference)){for(let _e=0,Ct=g.length;_e<Ct;++_e){let Wt=H(g[_e]).packageDependencies.get(Ze);if(Wt!=null){r?m=Wt:D=Wt;break}}if(t.enableTopLevelFallback&&D==null&&m===null){let _e=t.fallbackPool.get(Ze);_e!=null&&(m=_e)}}}let F=null;if(D===null)if(G(k))F=vs(gi.MISSING_PEER_DEPENDENCY,`Your application tried to access ${Ze} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re,dependencyName:Ze});else{let Ae=De(Ze,k);Ae.every(Fe=>G(Fe))?F=vs(gi.MISSING_PEER_DEPENDENCY,`${k.name} tried to access ${Ze} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
${Ae.map(Fe=>`Ancestor breaking the chain: ${Fe.name}@${Fe.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:Ye,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze,brokenAncestors:Ae}):F=vs(gi.MISSING_PEER_DEPENDENCY,`${k.name} tried to access ${Ze} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
|
|||
|
${Ae.map(Fe=>`Ancestor breaking the chain: ${Fe.name}@${Fe.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:Ye,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze,brokenAncestors:Ae})}else D===void 0&&(!rt&&jb(_)?G(k)?F=vs(gi.UNDECLARED_DEPENDENCY,`Your application tried to access ${Ze}. 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 ${Ze} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re,dependencyName:Ze}):F=vs(gi.UNDECLARED_DEPENDENCY,`${k.name} tried to access ${Ze}. 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 ${Ze} isn't otherwise declared in ${k.name}'s dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze}):G(k)?F=vs(gi.UNDECLARED_DEPENDENCY,`Your application tried to access ${Ze}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:Ye,issuer:Re,dependencyName:Ze}):F=vs(gi.UNDECLARED_DEPENDENCY,`${k.name} tried to access ${Ze}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
`,{request:Ye,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze}));if(D==null){if(m===null||F===null)throw F||new Error("Assertion failed: Expected an error to have been set");D=m;let Ae=F.message.replace(/\n.*/g,"");F.message=Ae,!C.has(Ae)&&s!==0&&(C.add(Ae),process.emitWarning(F))}let X=Array.isArray(D)?{name:D[0],reference:D[1]}:{name:Ze,reference:D},ee=H(X);if(!ee.packageLocation)throw vs(gi.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: ${X.name}@${X.reference}${X.name!==Ye?` (via "${Ye}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
`,{request:Ye,issuer:Re,dependencyLocator:Object.assign({},X)});let ie=ee.packageLocation;$e?yt=$.join(ie,$e):yt=ie}else if($.isAbsolute(_))yt=$.normalize(_);else{if(!Ge)throw vs(gi.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Re});let Ze=$.resolve(Ge);Ge.match(l)?yt=$.normalize($.join(Ze,_)):yt=$.normalize($.join($.dirname(Ze),_))}return $.normalize(yt)}function ne(_,Ge,rt=te){if(n.test(_))return Ge;let Ye=ce(Ge,rt);return Ye?$.normalize(Ye):Ge}function Be(_,{extensions:Ge=Object.keys(q1.Module._extensions)}={}){var Re,yt;let rt=[],Ye=me(_,rt,{extensions:Ge});if(Ye)return $.normalize(Ye);{let nt=qc(_),Ze=Ee(_);if(Ze){let{packageLocation:$e}=H(Ze),k=!0;try{e.fakeFs.accessSync($e)}catch(I){if((I==null?void 0:I.code)==="ENOENT")k=!1;else{let D=((yt=(Re=I==null?void 0:I.message)!=null?Re:I)!=null?yt:"empty exception thrown").replace(/^[A-Z]/,m=>m.toLowerCase());throw vs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`Required package exists but could not be accessed (${D}).
|
|||
|
|
|||
|
Missing package: ${Ze.name}@${Ze.reference}
|
|||
|
Expected package location: ${qc($e)}
|
|||
|
`,{unqualifiedPath:nt,extensions:Ge})}}if(!k){let I=$e.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 vs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`${I}
|
|||
|
|
|||
|
Missing package: ${Ze.name}@${Ze.reference}
|
|||
|
Expected package location: ${qc($e)}
|
|||
|
`,{unqualifiedPath:nt,extensions:Ge})}}throw vs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
|||
|
|
|||
|
Source path: ${nt}
|
|||
|
${rt.map($e=>`Not found: ${qc($e)}
|
|||
|
`).join("")}`,{unqualifiedPath:nt,extensions:Ge})}}function Te(_,Ge,{considerBuiltins:rt,extensions:Ye,conditions:Re}={}){try{let yt=fe(_,Ge,{considerBuiltins:rt});if(_==="pnpapi")return yt;if(yt===null)return null;let nt=()=>Ge!==null?ye(Ge):!1,Ze=(!rt||!jb(_))&&!nt()?ne(_,yt,Re):yt;return Be(Ze,{extensions:Ye})}catch(yt){throw Object.prototype.hasOwnProperty.call(yt,"pnpCode")&&Object.assign(yt.data,{request:qc(_),issuer:Ge&&qc(Ge)}),yt}}function Qt(_){let Ge=$.normalize(_),rt=As.resolveVirtual(Ge);return rt!==Ge?rt:null}return{VERSIONS:xe,topLevel:Qe,getLocator:(_,Ge)=>Array.isArray(Ge)?{name:Ge[0],reference:Ge[1]}:{name:_,reference:Ge},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let _=[];for(let[Ge,rt]of B)for(let Ye of rt.keys())Ge!==null&&Ye!==null&&_.push({name:Ge,reference:Ye});return _},getPackageInformation:_=>{let Ge=p(_);if(Ge===null)return null;let rt=de.fromPortablePath(Ge.packageLocation);return Me(re({},Ge),{packageLocation:rt})},findPackageLocator:_=>Ee(de.toPortablePath(_)),resolveToUnqualified:L("resolveToUnqualified",(_,Ge,rt)=>{let Ye=Ge!==null?de.toPortablePath(Ge):null,Re=fe(de.toPortablePath(_),Ye,rt);return Re===null?null:de.fromPortablePath(Re)}),resolveUnqualified:L("resolveUnqualified",(_,Ge)=>de.fromPortablePath(Be(de.toPortablePath(_),Ge))),resolveRequest:L("resolveRequest",(_,Ge,rt)=>{let Ye=Ge!==null?de.toPortablePath(Ge):null,Re=Te(de.toPortablePath(_),Ye,rt);return Re===null?null:de.fromPortablePath(Re)}),resolveVirtual:L("resolveVirtual",_=>{let Ge=Qt(de.toPortablePath(_));return Ge!==null?de.fromPortablePath(Ge):null})}}Ht();var $Ee=(t,e,r)=>{let s=H1(t),o=oK(s,{basePath:e}),n=de.join(e,$r.pnpCjs);return AK(o,{fakeFs:r,pnpapiResolution:n})};var cK=He(twe());tr();var Ju={};or(Ju,{checkAndReportManifestCompatibility:()=>nwe,checkManifestCompatibility:()=>rwe,extractBuildScripts:()=>Gb,getExtractHint:()=>uK,hasBindingGyp:()=>fK});je();Ht();function rwe(t){return W.isPackageCompatible(t,gy.getArchitectureSet())}function nwe(t,e,{configuration:r,report:s}){return rwe(t)?!0:(s==null||s.reportWarningOnce(ke.INCOMPATIBLE_ARCHITECTURE,`${W.prettyLocator(r,t)} The ${gy.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}function Gb(t,e,r,{configuration:s,report:o}){let n=[];for(let u of["preinstall","install","postinstall"])e.manifest.scripts.has(u)&&n.push([XA.SCRIPT,u]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&n.push([XA.SHELLCODE,"node-gyp rebuild"]),n.length===0?[]:t.linkType!==Vr.HARD?(o==null||o.reportWarningOnce(ke.SOFT_LINK_BUILD,`${W.prettyLocator(s,t)} 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?(o==null||o.reportInfoOnce(ke.BUILD_DISABLED,`${W.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!s.get("enableScripts")&&!r.built?(o==null||o.reportWarningOnce(ke.DISABLED_BUILD_SCRIPTS,`${W.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`),[]):nwe(t,"build",{configuration:s,report:o})?n:[]}var GCt=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function uK(t){return t.packageFs.getExtractHint({relevantExtensions:GCt})}function fK(t){let e=$.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var gK={};or(gK,{getUnpluggedPath:()=>j1});je();Ht();function j1(t,{configuration:e}){return $.resolve(e.get("pnpUnpluggedFolder"),W.slugifyLocator(t))}var YCt=new Set([W.makeIdent(null,"nan").identHash,W.makeIdent(null,"node-gyp").identHash,W.makeIdent(null,"node-pre-gyp").identHash,W.makeIdent(null,"node-addon-api").identHash,W.makeIdent(null,"fsevents").identHash,W.makeIdent(null,"open").identHash,W.makeIdent(null,"opn").identHash]),Ld=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new E
|
|||
|
`,n+=`# cause your node_modules installation to become invalidated.
|
|||
|
`,n+=`
|
|||
|
`,n+=`__metadata:
|
|||
|
`,n+=` version: ${dwe}
|
|||
|
`,n+=` nmMode: ${s.value}
|
|||
|
`;let l=Array.from(e.keys()).sort(),u=W.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let C of l){let w=e.get(C);n+=`
|
|||
|
`,n+=`${JSON.stringify(C)}:
|
|||
|
`,n+=` locations:
|
|||
|
`;for(let B of w.locations){let S=$.contains(t.cwd,B);if(S===null)throw new Error(`Assertion failed: Expected the path to be within the project (${B})`);n+=` - ${JSON.stringify(S)}
|
|||
|
`}if(w.aliases.length>0){n+=` aliases:
|
|||
|
`;for(let B of w.aliases)n+=` - ${JSON.stringify(B)}
|
|||
|
`}if(C===u&&r.size>0){n+=` bin:
|
|||
|
`;for(let[B,S]of r){let y=$.contains(t.cwd,B);if(y===null)throw new Error(`Assertion failed: Expected the path to be within the project (${B})`);n+=` ${JSON.stringify(y)}:
|
|||
|
`;for(let[N,L]of S){let H=$.relative($.join(B,Xi),L);n+=` ${JSON.stringify(N)}: ${JSON.stringify(H)}
|
|||
|
`}}}}let f=t.cwd,g=$.join(f,Xi,mwe);o&&await ge.removePromise(g),await ge.changeFilePromise(g,n,{automaticNewlines:!0})}async function wK(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=$.join(r,Xi,mwe),o;try{o=await ge.statPromise(s)}catch(g){}if(!o)return null;let n=ls(await ge.readFilePromise(s,"utf8"));if(n.__metadata.version>dwe)return null;let l=n.__metadata.nmMode||Po.HARDLINKS_LOCAL,u=new Map,f=new Map;delete n.__metadata;for(let[g,C]of Object.entries(n)){let w=C.locations.map(S=>$.join(r,S)),B=C.bin;if(B)for(let[S,y]of Object.entries(B)){let N=$.join(r,de.toPortablePath(S)),L=it.getMapWithDefault(f,N);for(let[H,G]of Object.entries(y))L.set(as(H),de.toPortablePath([N,Xi,G].join($.sep)))}if(u.set(g,{target:xt.dot,linkType:Vr.HARD,locations:w,aliases:C.aliases||[]}),e&&C.aliases)for(let S of C.aliases){let{scope:y,name:N}=W.parseLocator(g),L=W.makeLocator(W.makeIdent(y,N),S),H=W.stringifyLocator(L);u.set(H,{target:xt.dot,linkType:Vr.HARD,locations:w,aliases:[]})}}return{locatorMap:u,binSymlinks:f,locationTree:Iwe(u,{skipPrefix:t.cwd}),nmMode:l,mtimeMs:o.mtimeMs}}var wC=async(t,e)=>{if(t.split($.sep).indexOf(Xi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let s=e.allowSymlink?await ge.statPromise(t):await ge.lstatPromise(t);if(e.allowSymlink&&!s.isDirectory()||!e.allowSymlink&&s.isSymbolicLink()){await ge.unlinkPromise(t);return}}let r=await ge.readdirPromise(t,{withFileTypes:!0});for(let s of r){let o=$.join(t,as(s.name));s.isDirectory()?(s.name!==Xi||e&&e.innerLoop)&&await wC(o,{innerLoop:!0,contentsOnly:!1}):await ge.unlinkPromise(o)}e.contentsOnly||await ge.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},Ewe=4,Wb=(t,{skipPrefix:e})=>{let r=$.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split($.sep).filter(f=>f!==""),o=s.indexOf(Xi),n=s.slice(0,o).join($.sep),l=$.join(e,n),u=s.slice(o);return{locationRoot:l,segments:u}},Iwe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:Vr.HARD});for(let[o,n]of t.entries()){if(n.linkType===Vr.SOFT&&$.contains(e,n.target)!==null){let u=it.getFactoryWithDefault(r,n.target,s);u.locator=o,u.linkType=n.linkType}for(let l of n.locations){let{locationRoot:u,segments:f}=Wb(l,{skipPrefix:e}),g=it.getFactoryWithDefault(r,u,s);for(let C=0;C<f.length;++C){let w=f[C];if(w!=="."){let B=it.getFactoryWithDefault(g.children,w,s);g.children.set(w,B),g=B}C===f.length-1&&(g.locator=o,g.linkType=n.linkType)}}}return r},BK=async(t,e)=>{let r;try{process.platform==="win32"&&(r=await ge.lstatPromise(t))}catch(s){}process.platform=="win32"&&(!r||r.isDirectory())?await ge.symlinkPromise(t,e,"junction"):await ge.symlinkPromise($.relative($.dirname(e),t),e)};async function wwe(t,e,r){let s=$.join(t,as(`${IK.default.randomBytes(16).toString("hex")}.tmp`));try{await ge.writeFilePromise(s,r);try{await ge.linkPromise(s,e)}catch(o){}}finally{await ge.unlinkPromise(s)}}async function mIt({srcPath:t,dstPath:e,srcMode:r,globalHardlinksStore:s,baseFs:o,nmMode:n,digest:l}){if(n.value===Po.HARDLINKS_GLOBAL&&s&&l){let f=$.join(s,l.substring(0,2),`${l.substring(2)}.dat`),g;try{if(await ro.checksumFile(f,{baseFs:ge,algorithm:"sha1"})!==l){let w=$.join(s,as(`${IK.default.randomBytes(16).toString("hex")}.tmp`));await ge.renamePromise(f,w);let B=await o.readFilePromise(t);await ge.writeFilePromise(w,B);try{await ge.linkPromise(w,f),await ge.unlinkPromise(w)}catch(S){}}await ge.linkPromise(f,e),g=!0}catch(C){g=!1}if(!g){let C=await o.readFilePromise(t);await wwe(s,f,C);try{await ge.linkPromise(f,e)}catch(w){w&&w.code&&w.code=="EXDEV"&&(n.value=Po.HARDLINKS_LOCAL,await o.copyFilePromise(t,e))}}}else await o.copyFilePromise(t,e);let u=r&511;u!==420&&await ge.chmodPromise(e,u)}var C0;(function(s){s.FILE="file",s.DIRECTORY="directory",s.SYMLINK="symlink"})(C0||(C0={}));var yIt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:o,packageChecksum:n})=>{await ge.mkdirPromise(t,{recursive:!0});
|
|||
|
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 ${l2.map(e=>`\`${e}\``).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"]]});var P1e=u2;je();je();Ht();tr();var kH=He(ki()),SH=He(require("util")),f2=class extends It{constructor(){super(...arguments);this.fields=Ie.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Mt.find(e,this.context.cwd),s=typeof this.fields!="undefined"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,o=[],n=!1,l=await Tt.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async u=>{for(let f of this.packages){let g;if(f==="."){let te=r.topLevelWorkspace;if(!te.manifest.name)throw new ht(`Missing ${Oe.pretty(e,"name",Oe.Type.CODE)} field in ${de.fromPortablePath($.join(te.cwd,$r.manifest))}`);g=W.makeDescriptor(te.manifest.name,"unknown")}else g=W.parseDescriptor(f);let C=jn.getIdentUrl(g),w=bH(await jn.get(C,{configuration:e,ident:g,jsonResponse:!0,customErrorMessage:jn.customPackageError})),B=Object.keys(w.versions).sort(kH.default.compareLoose),y=w["dist-tags"].latest||B[B.length-1],N=pn.validRange(g.range);if(N){let te=kH.default.maxSatisfying(B,N);te!==null?y=te:(u.reportWarning(ke.UNNAMED,`Unmet range ${W.prettyRange(e,g.range)}; falling back to the latest version`),n=!0)}else Object.prototype.hasOwnProperty.call(w["dist-tags"],g.range)?y=w["dist-tags"][g.range]:g.range!=="unknown"&&(u.reportWarning(ke.UNNAMED,`Unknown tag ${W.prettyRange(e,g.range)}; falling back to the latest version`),n=!0);let L=w.versions[y],H=Me(re(re({},w),L),{version:y,versions:B}),G;if(s!==null){G={};for(let te of s){let ce=H[te];if(typeof ce!="undefined")G[te]=ce;else{u.reportWarning(ke.EXCEPTION,`The ${Oe.pretty(e,te,Oe.Type.CODE)} field doesn't exist inside ${W.prettyIdent(e,g)}'s information`),n=!0;continue}}}else this.json||(delete H.dist,delete H.readme,delete H.users),G=H;u.reportJson(G),this.json||o.push(G)}});SH.inspect.styles.name="cyan";for(let u of o)(u!==o[0]||n)&&this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`${(0,SH.inspect)(u,{depth:Infinity,colors:!0,compact:!1})}
|
|||
|
`);return l.exitCode()}};f2.paths=[["npm","info"]],f2.usage=dt.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"]]});var F1e=f2;function bH(t){if(Array.isArray(t)){let e=[];for(let r of t)r=bH(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let s=bH(t[r]);s&&(e[r]=s)}return e}else return t||null}je();je();tr();var R1e=He(Gw()),g2=class extends It{constructor(){super(...arguments);this.scope=Ie.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=Ie.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=await Ix({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Tt.start({configuration:e,stdout:this.context.stdout},async o=>{let n=await MBt({registry:r,report:o,stdin:this.context.stdin,stdout:this.context.stdout}),l=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,u=await jn.put(l,n,{attemptedAs:n.name,configuration:e,registry:r,jsonResponse:!0,authType:jn.AuthType.NO_AUTH});return await NBt(r,u.token,{configuration:e,scope:this.scope}),o.reportInfo(ke.UNNAMED,"Successfully logged in")})).exitCode()}};g2.paths=[["npm","login"]],g2.usage=dt.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});var T1e=g2;async function Ix({sc
|
|||
|
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"]]});var O1e=d2;async function m2(t,e){let r=`/-/package${jn.getIdentUrl(t)}/dist-tags`;return jn.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:jn.customPackageError})}var y2=class extends It{constructor(){super(...arguments);this.package=Ie.String();this.tag=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);let o=W.parseDescriptor(this.package,!0),n=o.range;if(!U1e.default.valid(n))throw new ht(`The range ${Oe.pretty(e,o.range,Oe.Type.RANGE)} must be a valid semver version`);let l=Fi.getPublishRegistry(s.manifest,{configuration:e}),u=Oe.pretty(e,o,Oe.Type.IDENT),f=Oe.pretty(e,n,Oe.Type.RANGE),g=Oe.pretty(e,this.tag,Oe.Type.CODE);return(await Tt.start({configuration:e,stdout:this.context.stdout},async w=>{let B=await m2(o,e);Object.prototype.hasOwnProperty.call(B,this.tag)&&B[this.tag]===n&&w.reportWarning(ke.UNNAMED,`Tag ${g} is already set to version ${f}`);let S=`/-/package${jn.getIdentUrl(o)}/dist-tags/${encodeURIComponent(this.tag)}`;await jn.put(S,n,{configuration:e,registry:l,ident:o,jsonRequest:!0,jsonResponse:!0}),w.reportInfo(ke.UNNAMED,`Tag ${g} added to version ${f} of package ${u}`)})).exitCode()}};y2.paths=[["npm","tag","add"]],y2.usage=dt.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"]]});var _1e=y2;je();tr();var C2=class extends It{constructor(){super(...arguments);this.package=Ie.String();this.tag=Ie.String()}async execute(){if(this.tag==="latest")throw new ht("The 'latest' tag cannot be removed.");let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);let o=W.parseIdent(this.package),n=Fi.getPublishRegistry(s.manifest,{configuration:e}),l=Oe.pretty(e,this.tag,Oe.Type.CODE),u=Oe.pretty(e,o,Oe.Type.IDENT),f=await m2(o,e);if(!Object.prototype.hasOwnProperty.call(f,this.tag))throw new ht(`${l} is not a tag of package ${u}`);return(await Tt.start({configuration:e,stdout:this.context.stdout},async C=>{let w=`/-/package${jn.getIdentUrl(o)}/dist-tags/${encodeURIComponent(this.tag)}`;await jn.del(w,{configuration:e,registry:n,ident:o,jsonResponse:!0}),C.reportInfo(ke.UNNAMED,`Tag ${l} removed from package ${u}`)})).exitCode()}};C2.paths=[["npm","tag","remove"]],C2.usage=dt.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"]]});var K1e=C2;je();je();tr();var I2=class extends It{constructor(){super(...arguments);this.scope=Ie.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=Ie.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r;return this.scope&&this.publish?r=Fi.getScopeRegistry(this.scope,{configuration:e,type:Fi.RegistryType.PUBLISH_REGISTRY}):this.scope?r=Fi.getScopeRegistry(this.scope,{configuration:e}):this.publish?r=Fi.getPublishRegistry((await Gy(e,this.context.cwd)).manifest,{configuration:e}):r=Fi.getDefaultRegistry({configuration:e}),(await Tt.start({configuration:e,stdout:this.context.stdout},async o=>{var l,u;let n;try{n=await jn.get("/-/whoami",{configuration:e,registry:r,authType:jn.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?W.makeIdent(this.scope,""):void 0})}catch(f){if(((l=f.response)==null?void 0:l.statusCode)===401||((u=f.response)==null?void 0:u.statusCode)===403){o.reportError(ke.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired");return}else throw f}o.reportInfo(ke.UNNAMED,n.username)})).exitCode()}};I2.paths=[["npm","whoami"]],I2.usage=dt.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 H1e=I2;var UBt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:ct.STRING,default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:ct.STRING,default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:ct.STRING,default:[],isArray:!0}},commands:[P1e,F1e,T1e,M1e,L1e,_1e,O1e,K1e,H1e]},_Bt=UBt;var UH={};or(UH,{default:()=>n1t,patchUtils:()=>PH});je();je();je();Ht();cg();var PH={};or(PH,{applyPatchFile:()=>Bx,diffFolders:()=>MH,ensureUnpatchedDescriptor:()=>FH,ensureUnpatchedLocator:()=>vx,extractPackageToDisk:()=>NH,extractPatchFlags:()=>z1e,isParentRequired:()=>TH,isPatchDescriptor:()=>Qx,isPatchLocator:()=>x0,loadPatchFiles:()=>Q2,makeDescriptor:()=>Dx,makeLocator:()=>RH,parseDescriptor:()=>w2,parseLocator:()=>B2,parsePatchFile:()=>wx,unpatchDescriptor:()=>$Bt,unpatchLocator:()=>e1t});je();Ht();je();Ht();var E2=class extends Error{constructor(e,r){super(`Cannot apply hunk #${e+1}`);this.hunk=r}};je();Ht();var KBt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function OC(t){return $.relative(xt.root,$.resolve(xt.root,de.toPortablePath(t)))}function HBt(t){let e=t.trim().match(KBt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var qBt=420,jBt=493,hs;(function(s){s.Context="context",s.Insertion="insertion",s.Deletion="deletion"})(hs||(hs={}));var q1e=()=>({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
|
|||
|
`)+(o.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
|||
|
`):"";await e.mkdirpPromise($.dirname(o.path),{chmod:493,utimes:[Hi.SAFE_TIME,Hi.SAFE_TIME]}),await e.writeFilePromise(o.path,n,{mode:o.mode}),await e.utimesPromise(o.path,Hi.SAFE_TIME,Hi.SAFE_TIME)}break;case"patch":await UC(e,o.path,async()=>{await VBt(o,{baseFs:e,dryRun:r})});break;case"mode change":{let l=(await e.statPromise(o.path)).mode;if(j1e(o.newMode)!==j1e(l))continue;await UC(e,o.path,async()=>{await e.chmodPromise(o.path,o.newMode)})}break;default:it.assertNever(o);break}}function j1e(t){return(t&64)>0}function G1e(t){return t.replace(/\s+$/,"")}function XBt(t,e){return G1e(t)===G1e(e)}async function VBt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let o=await r.statSync(e).mode,l=(await r.readFileSync(e,"utf8")).split(/\n/),u=[],f=0,g=0;for(let w of t){let B=Math.max(g,w.header.patched.start+f),S=Math.max(0,B-g),y=Math.max(0,l.length-B-w.header.original.length),N=Math.max(S,y),L=0,H=0,G=null;for(;L<=N;){if(L<=S&&(H=B-L,G=Y1e(w,l,H),G!==null)){L=-L;break}if(L<=y&&(H=B+L,G=Y1e(w,l,H),G!==null))break;L+=1}if(G===null)throw new E2(t.indexOf(w),w);u.push(G),f+=L,g=H+w.header.original.length}if(s)return;let C=0;for(let w of u)for(let B of w)switch(B.type){case"splice":{let S=B.index+C;l.splice(S,B.numToDelete,...B.linesToInsert),C+=B.linesToInsert.length-B.numToDelete}break;case"pop":l.pop();break;case"push":l.push(B.line);break;default:it.assertNever(B);break}await r.writeFilePromise(e,l.join(`
|
|||
|
`),{mode:o})}function Y1e(t,e,r){let s=[];for(let o of t.parts)switch(o.type){case hs.Context:case hs.Deletion:{for(let n of o.lines){let l=e[r];if(l==null||!XBt(l,n))return null;r+=1}o.type===hs.Deletion&&(s.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case hs.Insertion:s.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:it.assertNever(o.type);break}return s}var ZBt=/^builtin<([^>]+)>$/;function _C(t,e){let{protocol:r,source:s,selector:o,params:n}=W.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let l=o?o.split(/&/).map(C=>de.toPortablePath(C)):[],u=n&&typeof n.locator=="string"?W.parseLocator(n.locator):null,f=n&&typeof n.version=="string"?n.version:null,g=e(s);return{parentLocator:u,sourceItem:g,patchPaths:l,sourceVersion:f}}function Qx(t){return t.range.startsWith("patch:")}function x0(t){return t.reference.startsWith("patch:")}function w2(t){let s=_C(t.range,W.parseDescriptor),{sourceItem:e}=s,r=an(s,["sourceItem"]);return Me(re({},r),{sourceDescriptor:e})}function B2(t){let s=_C(t.reference,W.parseLocator),{sourceItem:e}=s,r=an(s,["sourceItem"]);return Me(re({},r),{sourceLocator:e})}function $Bt(t){let{sourceItem:e}=_C(t.range,W.parseDescriptor);return e}function e1t(t){let{sourceItem:e}=_C(t.reference,W.parseLocator);return e}function FH(t){if(!Qx(t))return t;let{sourceItem:e}=_C(t.range,W.parseDescriptor);return e}function vx(t){if(!x0(t))return t;let{sourceItem:e}=_C(t.reference,W.parseLocator);return e}function W1e({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:o},n){let l=t!==null?{locator:W.stringifyLocator(t)}:{},u=typeof s!="undefined"?{version:s}:{},f=typeof o!="undefined"?{hash:o}:{};return W.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:re(re(re({},u),f),l)})}function Dx(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return W.makeDescriptor(t,W1e({parentLocator:e,sourceItem:r,patchPaths:s},W.stringifyDescriptor))}function RH(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:o}){return W.makeLocator(t,W1e({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:o},W.stringifyLocator))}function J1e({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},o){let n=o.lastIndexOf("!");n!==-1&&(o=o.slice(n+1));let l=o.match(ZBt);return l!==null?s(l[1]):o.startsWith("~/")?r(o.slice(2)):$.isAbsolute(o)?t(o):e(o)}function z1e(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function TH(t){return J1e({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function Q2(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,o=s&&s.localPath?{packageFs:new bn(xt.root),prefixPath:$.relative(xt.root,s.localPath)}:s;s&&s!==o&&s.releaseFs&&s.releaseFs();let n=await it.releaseAfterUseAsync(async()=>await Promise.all(e.map(async l=>{let u=z1e(l),f=await J1e({onAbsolute:async g=>await ge.readFilePromise(g,"utf8"),onRelative:async g=>{if(o===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await o.packageFs.readFilePromise($.join(o.prefixPath,g),"utf8")},onProject:async g=>await ge.readFilePromise($.join(r.project.cwd,g),"utf8"),onBuiltin:async g=>await r.project.configuration.firstHook(C=>C.getBuiltinPatch,r.project,g)},l);return Me(re({},u),{source:f})})));for(let l of n)typeof l.source=="string"&&(l.source=l.source.replace(/\r\n?/g,`
|
|||
|
`));return n}async function NH(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let o=vx(t),n=r.storedChecksums,l=new fs,u=await ge.mktempPromise(),f=$.join(u,"source"),g=$.join(u,"user"),C=$.join(u,".yarn-patch.json"),w=r.configuration.makeFetcher(),B=[];try{let S,y;if(t.locatorHash===o.locatorHash){let N=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l});B.push(()=>{var L;return(L=N.releaseFs)==null?void 0:L.call(N)}),S=N,y=N}else S=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l}),B.push(()=>{var N;return(N=S.releaseFs)==null?void 0:N.call(S)}),y=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l}),B.push(()=>{var N;return(N=y.releaseFs)==null?void 0:N.call(y)});await Promise.all([ge.copyPromise(f,S.prefixPath,{baseFs:S.packageFs}),ge.copyPromise(g,y.prefixPath,{baseFs:y.packageFs}),ge.writeJsonPromise(C,{locator:W.stringifyLocator(t),version:s.version})])}finally{for(let S of B)S()}return ge.detachTemp(u),g}async function MH(t,e){let r=de.fromPortablePath(t).replace(/\\/g,"/"),s=de.fromPortablePath(e).replace(/\\/g,"/"),{stdout:o,stderr:n}=await wn.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,s],{cwd:de.toPortablePath(process.cwd()),env:Me(re({},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 l=r.startsWith("/")?u=>u.slice(1):u=>u;return o.replace(new RegExp(`(a|b)(${it.escapeRegExp(`/${l(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${it.escapeRegExp(`/${l(s)}/`)}`,"g"),"$1/").replace(new RegExp(it.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(it.escapeRegExp(`${s}/`),"g"),"")}je();function V1e(t,{configuration:e,report:r}){for(let s of t.parts)for(let o of s.lines)switch(s.type){case hs.Context:r.reportInfo(null,` ${Oe.pretty(e,o,"grey")}`);break;case hs.Deletion:r.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,`- ${Oe.pretty(e,o,Oe.Type.REMOVED)}`);break;case hs.Insertion:r.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,`+ ${Oe.pretty(e,o,Oe.Type.ADDED)}`);break;default:it.assertNever(s.type)}}var LH=class{supports(e,r){return!!x0(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r)},r.cacheOptions));return{packageFs:o,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:l}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:o,sourceVersion:n,patchPaths:l}=B2(e),u=await Q2(s,l,r),f=await ge.mktempPromise(),g=$.join(f,"current.zip"),C=await r.fetcher.fetch(o,r),w=W.getIdentVendorPath(e),B=await Ra(),S=new Ls(g,{libzip:B,create:!0,level:r.project.configuration.get("compressionLevel")});await it.releaseAfterUseAsync(async()=>{await S.copyPromise(w,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),S.saveAndClose();for(let{source:y,optional:N}of u){if(y===null)continue;let L=new Ls(g,{libzip:B,level:r.project.configuration.get("compressionLevel")}),H=new bn($.resolve(xt.root,w),{baseFs:L});try{await Bx(wx(y),{baseFs:H,version:n})}catch(G){if(!(G instanceof E2))throw G;let te=r.project.configuration.get("enableInlineHunks"),ce=!te&&!N?" (set enableInlineHunks for details)":"",me=`${W.prettyLocator(r.project.configuration,e)}: ${G.message}${ce}`,Ce=Se=>{!te||V1e(G.hunk,{configuration:r.project.configuration,report:Se})};if(L.discardAndClose(),N){r.report.reportWarningOnce(ke.PATCH_HUNK_FAILED,me,{reportExtra:Ce});continue}else throw new ar(ke.PATCH_HUNK_FAILED,me,Ce)}L.saveAndClose()}return new Ls(g,{libzip:B,level:r.project.configuration.get("compressionLevel")})}};je();je();var t1t=3,OH=class{supportsDescriptor(e,r){return!!Qx(e)}supportsLocator(e,r){return!!x0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:o}=w2(e);return o.every(n=>!TH(n))?e:W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=w2(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:o,patchPaths:n}=w2(e),l=await Q2(o,n,s.fetchOptions),u=r.sourceDescriptor;if(typeof u=="undefined")throw new Error("Assertion failed: The dependency should have been resolved");let f=ro.makeHash(`${t1t}`,...l.map(g=>JSON.stringify(g))).slice(0,6);return[RH(e,{parentLocator:o,sourcePackage:u,patchPaths:n,patchHash:f})]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=B2(e),o=await r.resolver.resolve(s,r);return re(re({},o),e)}};je();Ht();tr();var v2=class extends It{constructor(){super(...arguments);this.save=Ie.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Mt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState();let o=$.resolve(this.context.cwd,de.toPortablePath(this.patchFolder)),n=$.join(o,"../sourc
|
|||
|
${l.map(u=>`
|
|||
|
- ${W.prettyLocator(e,u)}`).join("")}`);n=l[0]}if(!r.storedPackages.has(n.locatorHash))throw new ht("No package found in the project for the given locator");await Tt.start({configuration:e,json:this.json,stdout:this.context.stdout},async l=>{let u=vx(n),f=await NH(n,{cache:o,project:r});l.reportJson({locator:W.stringifyLocator(u),path:de.fromPortablePath(f)});let g=this.update?" along with its current modifications":"";l.reportInfo(ke.UNNAMED,`Package ${W.prettyLocator(e,u)} got extracted with success${g}!`),l.reportInfo(ke.UNNAMED,`You can now edit the following folder: ${Oe.pretty(e,de.fromPortablePath(f),"magenta")}`),l.reportInfo(ke.UNNAMED,`Once you are done run ${Oe.pretty(e,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${de.fromPortablePath(f)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};D2.paths=[["patch"]],D2.usage=dt.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 Z1e=D2;var r1t={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:ct.BOOLEAN,default:!1},patchFolder:{description:"Folder where the patch files must be written",type:ct.ABSOLUTE_PATH,default:"./.yarn/patches"}},commands:[X1e,Z1e],fetchers:[LH],resolvers:[OH]},n1t=r1t;var HH={};or(HH,{default:()=>A1t});je();Ht();tr();var _H=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),o=r.project.linkersCustomData.get(s);if(!o)throw new ht(`The project in ${Oe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Oe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=o.pathsByLocator.get(e.locatorHash);if(typeof n=="undefined")throw new ht(`Couldn't find ${W.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),o=r.project.linkersCustomData.get(s);if(!o)throw new ht(`The project in ${Oe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Oe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let f=o.locatorByPath.get(n[1]);if(f)return f}let l=e,u=e;do{u=l,l=$.dirname(u);let f=o.locatorByPath.get(u);if(f)return f}while(l!==u);return null}makeInstaller(e){return new $1e(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},$1e=class{constructor(e){this.opts=e;this.asyncActions=new it.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=mQ(ge,{indexPath:$.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case Vr.SOFT:return this.installPackageSoft(e,r,s);case Vr.HARD:return this.installPackageHard(e,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,s){let o=$.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?$.join(o,$r.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{pac
|
|||
|
|
|||
|
${u1t}
|
|||
|
`,"--",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>de.fromPortablePath(s.path));await wn.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var l2e={async findRoot(t){return await kx(t,{marker:".hg"})},async filterChanges(t,e,r){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,r){},async makeReset(t,e){},async makeUpdate(t,e){}};var d1t=[A2e,l2e],k2=class extends It{constructor(){super(...arguments);this.commit=Ie.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=Ie.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=Ie.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=Ie.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Mt.find(e,this.context.cwd),{driver:s,root:o}=await m1t(r.cwd),n=[e.get("cacheFolder"),e.get("globalFolder"),e.get("virtualFolder"),e.get("yarnPath")];await e.triggerHook(C=>C.populateYarnPaths,r,C=>{n.push(C)});let l=new Set;for(let C of n)for(let w of y1t(o,C))l.add(w);let u=new Set([e.get("rcFilename"),e.get("lockfileFilename"),"package.json"]),f=await s.filterChanges(o,l,u),g=await s.genCommitMessage(o,f);if(this.dryRun)if(this.commit)this.context.stdout.write(`${g}
|
|||
|
`);else for(let C of f)this.context.stdout.write(`${de.fromPortablePath(C.path)}
|
|||
|
`);else if(this.reset){let C=await s.filterChanges(o,l,u,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await s.makeReset(o,C)}else f.length===0?this.context.stdout.write("No changes found!"):this.commit?await s.makeCommit(o,f,g):(await s.makeStage(o,f),this.context.stdout.write(g))}};k2.paths=[["stage"]],k2.usage=dt.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"]]});var c2e=k2;async function m1t(t){let e=null,r=null;for(let s of d1t)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new ht("No stage driver has been found for your current project");return{driver:e,root:r}}function y1t(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=ge.statSync(e)}catch(o){break}if(s.isSymbolicLink())e=$.resolve($.dirname(e),ge.readlinkSync(e));else break}return r}var C1t={commands:[c2e]},I1t=C1t;var GH={};or(GH,{default:()=>S1t});je();je();Ht();var g2e=He(ki());je();var u2e=He(u8()),E1t="e8e1bd300d860104bb8c58453ffa1eb4",w1t="OFCNCOG2CU",f2e=async(t,e)=>{var n;let r=W.stringifyIdent(t),o=B1t(e).initIndex("npm-search");try{return((n=(await o.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:n.ts)==="definitely-typed"}catch(l){return!1}},B1t=t=>(0,u2e.default)(w1t,E1t,{requester:{async send(r){try{let s=await Yn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var p2e=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,Q1t=async(t,e,r,s)=>{var L;if(r.scope==="types")return;let{project:o}=t,{configuration:n}=o;if(!((L=n.get("tsEnableAutoTypes"))!=null?L:ge.existsSync($.join(o.cwd,"tsconfig.json"))))return;let u=n.makeResolver(),f={project:o,resolver:u,report:new fs};if(!await f2e(r,n))return;let C=p2e(r),w=W.parseRange(r.range).selector;if(!pn.validRange(w)){let H=n.normalizeDependency(r),G=await u.getCandidates(H,{},f);w=W.parseRange(G[0].reference).selector}let B=g2e.default.coerce(w);if(B===null)return;let S=`${a0.Modifier.CARET}${B.major}`,y=W.makeDescriptor(W.makeIdent("types",C),S),N=it.mapAndFind(o.workspaces,H=>{var me,Ce;let G=(me=H.manifest.dependencies.get(r.identHash))==null?void 0:me.descriptorHash,te=(Ce=H.manifest.devDependencies.get(r.identHash))==null?void 0:Ce.descriptorHash;if(G!==r.descriptorHash&&te!==r.descriptorHash)return it.mapAndFind.skip;let ce=[];for(let Se of Xt.allDependencies){let ye=H.manifest[Se].get(y.identHash);typeof ye!="undefined"&&ce.push([Se,ye])}return ce.length===0?it.mapAndFind.skip:ce});if(typeof N!="undefined")for(let[H,G]of N)t.manifest[H].set(G.identHash,G);else{try{let H=n.normalizeDependency(y);if((await u.getCandidates(H,{},f)).length===0)return}catch{return}t.manifest[a0.Target.DEVELOPMENT].set(y.identHash,y)}},v1t=async(t,e,r)=>{var f;if(r.scope==="types")return;let{project:s}=t,{configuration:o}=s;if(!((f=o.get("tsEnableAutoTypes"))!=null?f:ge.existsSync($.join(s.cwd,"tsconfig.json"))))return;let l=p2e(r),u=W.makeIdent("types",l);for(let g of Xt.allDependencies)typeof t.manifest[
|
|||
|
- ${u.map(S=>de.fromPortablePath(S)).join(`
|
|||
|
- `)}`);let f=new Set(it.mapAndFilter(n,S=>{let y=t.tryWorkspaceByFilePath(S);return y===null?it.mapAndFilter.skip:y}));if(u.length===0&&f.size===0&&!e)return null;let g=u.length===1?u[0]:$.join(l,`${ro.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=ge.existsSync(g)?await ge.readFilePromise(g,"utf8"):"{}",w=ls(C),B=new Map;for(let S of w.declined||[]){let y=W.parseIdent(S),N=t.getWorkspaceByIdent(y);B.set(N,pi.DECLINE)}for(let[S,y]of Object.entries(w.releases||{})){let N=W.parseIdent(S),L=t.getWorkspaceByIdent(N);B.set(L,KC(y))}return{project:t,root:s,baseHash:o!==null?o.hash:null,baseTitle:o!==null?o.title:null,changedFiles:new Set(n),changedWorkspaces:f,releaseRoots:new Set([...f].filter(S=>S.manifest.version!==null)),releases:B,async saveAll(){let S={},y=[],N=[];for(let L of t.workspaces){if(L.manifest.version===null)continue;let H=W.stringifyIdent(L.locator),G=B.get(L);G===pi.DECLINE?y.push(H):typeof G!="undefined"?S[H]=KC(G):f.has(L)&&N.push(H)}await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.changeFilePromise(g,sA(new sA.PreserveOrdering({releases:Object.keys(S).length>0?S:void 0,declined:y.length>0?y:void 0,undecided:N.length>0?N:void 0})))}}}function j1t(t){return bx(t).size>0||b2(t).length>0}function bx(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function b2(t,{include:e=new Set}={}){let r=[],s=new Map(it.mapAndFilter([...t.releases],([n,l])=>l===pi.DECLINE?it.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),o=new Map(it.mapAndFilter([...t.releases],([n,l])=>l!==pi.DECLINE?it.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(o.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let l of Xt.hardDependencies)for(let u of n.manifest.getForScope(l).values()){let f=t.project.tryWorkspaceByDescriptor(u);f!==null&&s.has(f.anchoredLocator.locatorHash)&&r.push([n,f])}return r}function zH(t,e){let r=ef.default.clean(e);for(let s of Object.values(pi))if(s!==pi.UNDECIDED&&s!==pi.DECLINE&&ef.default.inc(t,s)===r)return s;return null}function Sx(t,e){if(ef.default.valid(e))return e;if(t===null)throw new ht(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!ef.default.valid(t))throw new ht(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=ef.default.inc(t,e);if(r===null)throw new ht(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function VH(t,e,{report:r}){let s=new Map;for(let o of t.workspaces)for(let n of Xt.allDependencies)for(let l of o.manifest[n].values()){let u=t.tryWorkspaceByDescriptor(l);if(u===null||!e.has(u))continue;it.getArrayWithDefault(s,u).push([o,n,l.identHash])}for(let[o,n]of e){let l=o.manifest.version;o.manifest.version=n,ef.default.prerelease(n)===null?delete o.manifest.raw.stableVersion:o.manifest.raw.stableVersion||(o.manifest.raw.stableVersion=l);let u=o.manifest.name!==null?W.stringifyIdent(o.manifest.name):null;r.reportInfo(ke.UNNAMED,`${W.prettyLocator(t.configuration,o.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:de.fromPortablePath(o.cwd),ident:u,oldVersion:l,newVersion:n});let f=s.get(o);if(typeof f!="undefined")for(let[g,C,w]of f){let B=g.manifest[C].get(w);if(typeof B=="undefined")throw new Error("Assertion failed: The dependency should have existed");let S=B.range,y=!1;if(S.startsWith(Li.protocol)&&(S=S.slice(Li.protocol.length),y=!0,S===o.relativeCwd))continue;let N=S.match(q1t);if(!N){r.reportWarning(ke.UNNAMED,`Couldn't auto-upgrade range ${S} (in ${W.prettyLocator(t.configuration,g.anchoredLocator)})`);continue}let L=`${N[1]}${n}`;y&&(L=`${Li.protocol}${L}`);let H=W.makeDescriptor(B,L);g.manifest[C].set(w,H)}}}var G1t=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function I2e(t,{current:e,prerelease:r}){let s=new ef.default.SemVer(e),o=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(o.length=0);let l=!0,u=r.sp
|
|||
|
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"]]});var E2e=x2;je();Ht();tr();var xx=He(ki());var P2=class extends It{constructor(){super(...arguments);this.interactive=Ie.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(){iC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(Rb(),N_)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Lb(),Mb)),{FocusRequest:s}=await Promise.resolve().then(()=>(O_(),pEe)),{useListInput:o}=await Promise.resolve().then(()=>(Nb(),hEe)),{renderForm:n}=await Promise.resolve().then(()=>(Kb(),Ub)),{Box:l,Text:u}=await Promise.resolve().then(()=>He(Xl())),{default:f,useCallback:g,useState:C}=await Promise.resolve().then(()=>He(yn())),w=await st.find(this.context.cwd,this.context.plugins),{project:B,workspace:S}=await Mt.find(w,this.context.cwd);if(!S)throw new pr(B.cwd,this.context.cwd);await B.restoreInstallState();let y=await HC(B);if(y===null||y.releaseRoots.size===0)return 0;if(y.root===null)throw new ht("This command can only be run on Git repositories");let N=()=>f.createElement(l,{flexDirection:"row",paddingBottom:1},f.createElement(l,{flexDirection:"column",width:60},f.createElement(l,null,f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<up>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),f.createElement(l,null,f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<left>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),f.createElement(l,{flexDirection:"column"},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),L=({workspace:Ce,active:Se,decision:ye,setDecision:xe})=>{var De;let Qe=(De=Ce.manifest.raw.stableVersion)!=null?De:Ce.manifest.version;if(Qe===null)throw new Error(`Assertion failed: The version should have been set (${W.prettyLocator(w,Ce.anchoredLocator)})`);if(xx.default.prerelease(Qe)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${Qe})`);let p=[pi.UNDECIDED,pi.DECLINE,pi.PATCH,pi.MINOR,pi.MAJOR];o(ye,p,{active:Se,minus:"left",plus:"right",set:xe});let Ue=ye===pi.UNDECIDED?f.createElement(u,{color:"yellow"},Qe):ye===pi.DECLINE?f.createElement(u,{color:"green"},Qe):f.createElement(u,null,f.createElement(u,{color:"magenta"},Qe)," \u2192 ",f.createElement(u,{color:"green"},xx.default.valid(ye)?ye:xx.default.inc(Qe,ye)));return f.createElement(l,{flexDirection:"column"},f.createElement(l,null,f.createElement(u,null,W.prettyLocator(w,Ce.anchoredLocator)," - ",Ue)),f.createElement(l,null,p.map(Ee=>f.createElement(l,{key:Ee,paddingLeft:2},f.createElement(u,null,f.createElement(e,{active:Ee===ye})," ",Ee)))))},H=Ce=>{let Se=new Set(y.releaseRoots),ye=new Map([...Ce].filter(([xe])=>Se.has(xe)));for(;;){let xe=b2({project:y.project,releases:ye}),Qe=!1;if(xe.length>0){for(let[p]of xe)if(!Se.has(p)){Se.add(p),Qe=!0;let Ue=Ce.get(p);typeof Ue!="undefined"&&ye.set(p,Ue)}}if(!Qe)break}return{relevantWorkspaces:Se,relevantReleases:ye}},G=()=>{let[Ce,Se]=C(()=>new Map(y.releases)),ye=g((xe,Qe)=>{let p=new Map(Ce);Qe!==pi.UNDECIDED?p.set(xe,Qe):p.delete(xe);let{relevantReleases:Ue}=H(p);Se(Ue)},[Ce,Se]);return[Ce,ye]},te=({workspaces:Ce,releases:Se})=>{let ye=[];ye.push(`${Ce.size} total`);let xe=0,Qe=0;for(let p of Ce){let Ue=Se.get(p);typeof Ue=="undefined"?Qe+=1:Ue!==pi.DECLINE&&(xe+=1)}return ye.push(`${xe} release${xe===1?"":"s"}`),ye.push(`${Qe} remaining`),f.createElement(u,{color:"yellow"},ye.join(", "))},me=await n(({useSubmit:Ce})=>{let[Se,ye]=G();Ce
|
|||
|
/*
|
|||
|
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 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.
|
|||
|
*/
|