npm-check-updates
Version:
Find newer versions of dependencies than what your package.json allows
9 lines • 130 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("node:process"),Er=require("node:child_process"),Me=require("node:url"),N=require("node:path"),U=require("node:util"),Be=require("node:os"),V=require("./index.js"),I=require("node:fs"),Kt=require("node:constants"),Ou=require("node:stream"),zt=require("node:assert"),Z=require("./index-Bl96b__P.js"),Cr=require("node:events"),gr=require("node:http"),Xt=require("./index-B-xDFGsq.js");var ye=typeof document<"u"?document.currentScript:null,Xe,Mu;function mr(){if(Mu)return Xe;Mu=1;var u=Kt,e=process.cwd,t=null,i=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return t||(t=e.call(process)),t};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var s=process.chdir;process.chdir=function(r){t=null,s.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}Xe=o;function o(r){u.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&n(r),r.lutimes||c(r),r.chown=E(r.chown),r.fchown=E(r.fchown),r.lchown=E(r.lchown),r.chmod=a(r.chmod),r.fchmod=a(r.fchmod),r.lchmod=a(r.lchmod),r.chownSync=h(r.chownSync),r.fchownSync=h(r.fchownSync),r.lchownSync=h(r.lchownSync),r.chmodSync=l(r.chmodSync),r.fchmodSync=l(r.fchmodSync),r.lchmodSync=l(r.lchmodSync),r.stat=F(r.stat),r.fstat=F(r.fstat),r.lstat=F(r.lstat),r.statSync=d(r.statSync),r.fstatSync=d(r.fstatSync),r.lstatSync=d(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(D,f,C){C&&process.nextTick(C)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(D,f,C,g){g&&process.nextTick(g)},r.lchownSync=function(){}),i==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:(function(D){function f(C,g,m){var v=Date.now(),B=0;D(C,g,function A(x){if(x&&(x.code==="EACCES"||x.code==="EPERM"||x.code==="EBUSY")&&Date.now()-v<6e4){setTimeout(function(){r.stat(g,function(k,P){k&&k.code==="ENOENT"?D(C,g,A):m(x)})},B),B<100&&(B+=10);return}m&&m(x)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,D),f})(r.rename)),r.read=typeof r.read!="function"?r.read:(function(D){function f(C,g,m,v,B,A){var x;if(A&&typeof A=="function"){var k=0;x=function(P,ee,Y){if(P&&P.code==="EAGAIN"&&k<10)return k++,D.call(r,C,g,m,v,B,x);A.apply(this,arguments)}}return D.call(r,C,g,m,v,B,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,D),f})(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:(function(D){return function(f,C,g,m,v){for(var B=0;;)try{return D.call(r,f,C,g,m,v)}catch(A){if(A.code==="EAGAIN"&&B<10){B++;continue}throw A}}})(r.readSync);function n(D){D.lchmod=function(f,C,g){D.open(f,u.O_WRONLY|u.O_SYMLINK,C,function(m,v){if(m){g&&g(m);return}D.fchmod(v,C,function(B){D.close(v,function(A){g&&g(B||A)})})})},D.lchmodSync=function(f,C){var g=D.openSync(f,u.O_WRONLY|u.O_SYMLINK,C),m=!0,v;try{v=D.fchmodSync(g,C),m=!1}finally{if(m)try{D.closeSync(g)}catch{}else D.closeSync(g)}return v}}function c(D){u.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(f,C,g,m){D.open(f,u.O_SYMLINK,function(v,B){if(v){m&&m(v);return}D.futimes(B,C,g,function(A){D.close(B,function(x){m&&m(A||x)})})})},D.lutimesSync=function(f,C,g){var m=D.openSync(f,u.O_SYMLINK),v,B=!0;try{v=D.futimesSync(m,C,g),B=!1}finally{if(B)try{D.closeSync(m)}catch{}else D.closeSync(m)}return v}):D.futimes&&(D.lutimes=function(f,C,g,m){m&&process.nextTick(m)},D.lutimesSync=function(){})}function a(D){return D&&function(f,C,g){return D.call(r,f,C,function(m){p(m)&&(m=null),g&&g.apply(this,arguments)})}}function l(D){return D&&function(f,C){try{return D.call(r,f,C)}catch(g){if(!p(g))throw g}}}function E(D){return D&&function(f,C,g,m){return D.call(r,f,C,g,function(v){p(v)&&(v=null),m&&m.apply(this,arguments)})}}function h(D){return D&&function(f,C,g){try{return D.call(r,f,C,g)}catch(m){if(!p(m))throw m}}}function F(D){return D&&function(f,C,g){typeof C=="function"&&(g=C,C=null);function m(v,B){B&&(B.uid<0&&(B.uid+=4294967296),B.gid<0&&(B.gid+=4294967296)),g&&g.apply(this,arguments)}return C?D.call(r,f,C,m):D.call(r,f,m)}}function d(D){return D&&function(f,C){var g=C?D.call(r,f,C):D.call(r,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function p(D){if(!D||D.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(D.code==="EINVAL"||D.code==="EPERM"))}}return Xe}var Qe,Uu;function yr(){if(Uu)return Qe;Uu=1;var u=Ou.Stream;Qe=e;function e(t){return{ReadStream:i,WriteStream:s};function i(o,r){if(!(this instanceof i))return new i(o,r);u.call(this);var n=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var c=Object.keys(r),a=0,l=c.length;a<l;a++){var E=c[a];this[E]=r[E]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){n._read()});return}t.open(this.path,this.flags,this.mode,function(h,F){if(h){n.emit("error",h),n.readable=!1;return}n.fd=F,n.emit("open",F),n._read()})}function s(o,r){if(!(this instanceof s))return new s(o,r);u.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var n=Object.keys(r),c=0,a=n.length;c<a;c++){var l=n[c];this[l]=r[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return Qe}var Ze,Wu;function Br(){if(Wu)return Ze;Wu=1,Ze=e;var u=Object.getPrototypeOf||function(t){return t.__proto__};function e(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var i={__proto__:u(t)};else var i=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))}),i}return Ze}var Oe,Gu;function Ar(){if(Gu)return Oe;Gu=1;var u=I,e=mr(),t=yr(),i=Br(),s=U,o,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",r="___graceful-fs.previous");function n(){}function c(D,f){Object.defineProperty(D,o,{get:function(){return f}})}var a=n;if(s.debuglog?a=s.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(a=function(){var D=s.format.apply(s,arguments);D="GFS4: "+D.split(/\n/).join(`
GFS4: `),console.error(D)}),!u[o]){var l=V.commonjsGlobal[o]||[];c(u,l),u.close=(function(D){function f(C,g){return D.call(u,C,function(m){m||d(),typeof g=="function"&&g.apply(this,arguments)})}return Object.defineProperty(f,r,{value:D}),f})(u.close),u.closeSync=(function(D){function f(C){D.apply(u,arguments),d()}return Object.defineProperty(f,r,{value:D}),f})(u.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){a(u[o]),zt.equal(u[o].length,0)})}V.commonjsGlobal[o]||c(V.commonjsGlobal,u[o]),Oe=E(i(u)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!u.__patched&&(Oe=E(u),u.__patched=!0);function E(D){e(D),D.gracefulify=E,D.createReadStream=Je,D.createWriteStream=Ke;var f=D.readFile;D.readFile=C;function C(y,b,w){return typeof b=="function"&&(w=b,b=null),$(y,b,w);function $(j,L,O,T){return f(j,L,function(_){_&&(_.code==="EMFILE"||_.code==="ENFILE")?h([$,[j,L,O],_,T||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var g=D.writeFile;D.writeFile=m;function m(y,b,w,$){return typeof w=="function"&&($=w,w=null),j(y,b,w,$);function j(L,O,T,_,q){return g(L,O,T,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?h([j,[L,O,T,_],R,q||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}var v=D.appendFile;v&&(D.appendFile=B);function B(y,b,w,$){return typeof w=="function"&&($=w,w=null),j(y,b,w,$);function j(L,O,T,_,q){return v(L,O,T,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?h([j,[L,O,T,_],R,q||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}var A=D.copyFile;A&&(D.copyFile=x);function x(y,b,w,$){return typeof w=="function"&&($=w,w=0),j(y,b,w,$);function j(L,O,T,_,q){return A(L,O,T,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?h([j,[L,O,T,_],R,q||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}var k=D.readdir;D.readdir=ee;var P=/^v[0-5]\./;function ee(y,b,w){typeof b=="function"&&(w=b,b=null);var $=P.test(process.version)?function(O,T,_,q){return k(O,j(O,T,_,q))}:function(O,T,_,q){return k(O,T,j(O,T,_,q))};return $(y,b,w);function j(L,O,T,_){return function(q,R){q&&(q.code==="EMFILE"||q.code==="ENFILE")?h([$,[L,O,T],q,_||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof T=="function"&&T.call(this,q,R))}}}if(process.version.substr(0,4)==="v0.8"){var Y=t(D);W=Y.ReadStream,G=Y.WriteStream}var H=D.ReadStream;H&&(W.prototype=Object.create(H.prototype),W.prototype.open=Ve);var fe=D.WriteStream;fe&&(G.prototype=Object.create(fe.prototype),G.prototype.open=He),Object.defineProperty(D,"ReadStream",{get:function(){return W},set:function(y){W=y},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return G},set:function(y){G=y},enumerable:!0,configurable:!0});var Ae=W;Object.defineProperty(D,"FileReadStream",{get:function(){return Ae},set:function(y){Ae=y},enumerable:!0,configurable:!0});var ve=G;Object.defineProperty(D,"FileWriteStream",{get:function(){return ve},set:function(y){ve=y},enumerable:!0,configurable:!0});function W(y,b){return this instanceof W?(H.apply(this,arguments),this):W.apply(Object.create(W.prototype),arguments)}function Ve(){var y=this;le(y.path,y.flags,y.mode,function(b,w){b?(y.autoClose&&y.destroy(),y.emit("error",b)):(y.fd=w,y.emit("open",w),y.read())})}function G(y,b){return this instanceof G?(fe.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function He(){var y=this;le(y.path,y.flags,y.mode,function(b,w){b?(y.destroy(),y.emit("error",b)):(y.fd=w,y.emit("open",w))})}function Je(y,b){return new D.ReadStream(y,b)}function Ke(y,b){return new D.WriteStream(y,b)}var ze=D.open;D.open=le;function le(y,b,w,$){return typeof w=="function"&&($=w,w=null),j(y,b,w,$);function j(L,O,T,_,q){return ze(L,O,T,function(R,pr){R&&(R.code==="EMFILE"||R.code==="ENFILE")?h([j,[L,O,T,_],R,q||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}return D}function h(D){a("ENQUEUE",D[0].name,D[1]),u[o].push(D),p()}var F;function d(){for(var D=Date.now(),f=0;f<u[o].length;++f)u[o][f].length>2&&(u[o][f][3]=D,u[o][f][4]=D);p()}function p(){if(clearTimeout(F),F=void 0,u[o].length!==0){var D=u[o].shift(),f=D[0],C=D[1],g=D[2],m=D[3],v=D[4];if(m===void 0)a("RETRY",f.name,C),f.apply(null,C);else if(Date.now()-m>=6e4){a("TIMEOUT",f.name,C);var B=C.pop();typeof B=="function"&&B.call(null,g)}else{var A=Date.now()-v,x=Math.max(v-m,1),k=Math.min(x*1.2,100);A>=k?(a("RETRY",f.name,C),f.apply(null,C.concat([m]))):u[o].push(D)}F===void 0&&(F=setTimeout(p,0))}}return Oe}var vr=Ar();const je=V.getDefaultExportFromCjs(vr),ce=Be.homedir(),{env:Ce}=process,Yu=Ce.XDG_DATA_HOME||(ce?N.join(ce,".local","share"):void 0),qe=Ce.XDG_CONFIG_HOME||(ce?N.join(ce,".config"):void 0);Ce.XDG_STATE_HOME||ce&&N.join(ce,".local","state");Ce.XDG_CACHE_HOME||ce&&N.join(ce,".cache");Ce.XDG_RUNTIME_DIR;const wr=(Ce.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");Yu&&wr.unshift(Yu);const br=(Ce.XDG_CONFIG_DIRS||"/etc/xdg").split(":");qe&&br.unshift(qe);const ne=(u,e)=>{const{onError:t}=e;return function(...s){return u.apply(void 0,s).catch(t)}},re=(u,e)=>{const{onError:t}=e;return function(...s){try{return u.apply(void 0,s)}catch(o){return t(o)}}},Sr=250,De=(u,e)=>{const{isRetriable:t}=e;return function(s){const{timeout:o}=s,r=s.interval??Sr,n=Date.now()+o;return function c(...a){return u.apply(void 0,a).catch(l=>{if(!t(l)||Date.now()>=n)throw l;const E=Math.round(r*Math.random());return E>0?new Promise(F=>setTimeout(F,E)).then(()=>c.apply(void 0,a)):c.apply(void 0,a)})}}},ie=(u,e)=>{const{isRetriable:t}=e;return function(s){const{timeout:o}=s,r=Date.now()+o;return function(...c){for(;;)try{return u.apply(void 0,c)}catch(a){if(!t(a)||Date.now()>=r)throw a;continue}}}},me={isChangeErrorOk:u=>{if(!me.isNodeError(u))return!1;const{code:e}=u;return e==="ENOSYS"||!_r&&(e==="EINVAL"||e==="EPERM")},isNodeError:u=>u instanceof Error,isRetriableError:u=>{if(!me.isNodeError(u))return!1;const{code:e}=u;return e==="EMFILE"||e==="ENFILE"||e==="EAGAIN"||e==="EBUSY"||e==="EACCESS"||e==="EACCES"||e==="EACCS"||e==="EPERM"},onChangeError:u=>{if(!me.isNodeError(u))throw u;if(!me.isChangeErrorOk(u))throw u}},Te={onError:me.onChangeError},X={onError:()=>{}},_r=S.getuid?!S.getuid():!1,J={isRetriable:me.isRetriableError},K={attempt:{chmod:ne(U.promisify(I.chmod),Te),chown:ne(U.promisify(I.chown),Te),close:ne(U.promisify(I.close),X),fsync:ne(U.promisify(I.fsync),X),mkdir:ne(U.promisify(I.mkdir),X),realpath:ne(U.promisify(I.realpath),X),stat:ne(U.promisify(I.stat),X),unlink:ne(U.promisify(I.unlink),X),chmodSync:re(I.chmodSync,Te),chownSync:re(I.chownSync,Te),closeSync:re(I.closeSync,X),existsSync:re(I.existsSync,X),fsyncSync:re(I.fsync,X),mkdirSync:re(I.mkdirSync,X),realpathSync:re(I.realpathSync,X),statSync:re(I.statSync,X),unlinkSync:re(I.unlinkSync,X)},retry:{close:De(U.promisify(I.close),J),fsync:De(U.promisify(I.fsync),J),open:De(U.promisify(I.open),J),readFile:De(U.promisify(I.readFile),J),rename:De(U.promisify(I.rename),J),stat:De(U.promisify(I.stat),J),write:De(U.promisify(I.write),J),writeFile:De(U.promisify(I.writeFile),J),closeSync:ie(I.closeSync,J),fsyncSync:ie(I.fsyncSync,J),openSync:ie(I.openSync,J),readFileSync:ie(I.readFileSync,J),renameSync:ie(I.renameSync,J),statSync:ie(I.statSync,J),writeSync:ie(I.writeSync,J),writeFileSync:ie(I.writeFileSync,J)}},xr="utf8",Vu=438,Rr=511,Or={},Tr=S.geteuid?S.geteuid():-1,Ir=S.getegid?S.getegid():-1,Nr=1e3,Pr=!!S.getuid;S.getuid&&S.getuid();const Hu=128,Lr=u=>u instanceof Error&&"code"in u,Ju=u=>typeof u=="string",eu=u=>u===void 0,$r=S.platform==="linux",Qt=S.platform==="win32",Tu=["SIGHUP","SIGINT","SIGTERM"];Qt||Tu.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");$r&&Tu.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");class jr{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(const t of this.callbacks)t();e&&(Qt&&e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"?S.kill(S.pid,"SIGTERM"):S.kill(S.pid,e))}},this.hook=()=>{S.once("exit",()=>this.exit());for(const e of Tu)try{S.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}const qr=new jr,kr=qr.register,z={store:{},create:u=>{const e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),s=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${u}${s}`},get:(u,e,t=!0)=>{const i=z.truncate(e(u));return i in z.store?z.get(u,e,t):(z.store[i]=t,[i,()=>delete z.store[i]])},purge:u=>{z.store[u]&&(delete z.store[u],K.attempt.unlink(u))},purgeSync:u=>{z.store[u]&&(delete z.store[u],K.attempt.unlinkSync(u))},purgeSyncAll:()=>{for(const u in z.store)z.purgeSync(u)},truncate:u=>{const e=N.basename(u);if(e.length<=Hu)return u;const t=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!t)return u;const i=e.length-Hu;return`${u.slice(0,-e.length)}${t[1]}${t[2].slice(0,-i)}${t[3]}`}};kr(z.purgeSyncAll);function Su(u,e,t=Or){if(Ju(t))return Su(u,e,{encoding:t});const s={timeout:t.timeout??Nr};let o=null,r=null,n=null;try{const c=K.attempt.realpathSync(u),a=!!c;u=c||u,[r,o]=z.get(u,t.tmpCreate||z.create,t.tmpPurge!==!1);const l=Pr&&eu(t.chown),E=eu(t.mode);if(a&&(l||E)){const h=K.attempt.statSync(u);h&&(t={...t},l&&(t.chown={uid:h.uid,gid:h.gid}),E&&(t.mode=h.mode))}if(!a){const h=N.dirname(u);K.attempt.mkdirSync(h,{mode:Rr,recursive:!0})}n=K.retry.openSync(s)(r,"w",t.mode||Vu),t.tmpCreated&&t.tmpCreated(r),Ju(e)?K.retry.writeSync(s)(n,e,0,t.encoding||xr):eu(e)||K.retry.writeSync(s)(n,e,0,e.length,0),t.fsync!==!1&&(t.fsyncWait!==!1?K.retry.fsyncSync(s)(n):K.attempt.fsync(n)),K.retry.closeSync(s)(n),n=null,t.chown&&(t.chown.uid!==Tr||t.chown.gid!==Ir)&&K.attempt.chownSync(r,t.chown.uid,t.chown.gid),t.mode&&t.mode!==Vu&&K.attempt.chmodSync(r,t.mode);try{K.retry.renameSync(s)(r,u)}catch(h){if(!Lr(h)||h.code!=="ENAMETOOLONG")throw h;K.retry.renameSync(s)(r,z.truncate(u))}o(),r=null}finally{n&&K.attempt.closeSync(n),r&&z.purge(r)}}const Ee=u=>{const e=typeof u;return u!==null&&(e==="object"||e==="function")},uu=new Set(["__proto__","prototype","constructor"]),Mr=new Set("0123456789");function Ue(u){const e=[];let t="",i="start",s=!1;for(const o of u)switch(o){case"\\":{if(i==="index")throw new Error("Invalid character in an index");if(i==="indexEnd")throw new Error("Invalid character after an index");s&&(t+=o),i="property",s=!s;break}case".":{if(i==="index")throw new Error("Invalid character in an index");if(i==="indexEnd"){i="property";break}if(s){s=!1,t+=o;break}if(uu.has(t))return[];e.push(t),t="",i="property";break}case"[":{if(i==="index")throw new Error("Invalid character in an index");if(i==="indexEnd"){i="index";break}if(s){s=!1,t+=o;break}if(i==="property"){if(uu.has(t))return[];e.push(t),t=""}i="index";break}case"]":{if(i==="index"){e.push(Number.parseInt(t,10)),t="",i="indexEnd";break}if(i==="indexEnd")throw new Error("Invalid character after an index")}default:{if(i==="index"&&!Mr.has(o))throw new Error("Invalid character in an index");if(i==="indexEnd")throw new Error("Invalid character after an index");i==="start"&&(i="property"),s&&(s=!1,t+="\\"),t+=o}}switch(s&&(t+="\\"),i){case"property":{if(uu.has(t))return[];e.push(t);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Iu(u,e){if(typeof e!="number"&&Array.isArray(u)){const t=Number.parseInt(e,10);return Number.isInteger(t)&&u[t]===u[e]}return!1}function Zt(u,e){if(Iu(u,e))throw new Error("Cannot use string index")}function Ur(u,e,t){if(!Ee(u)||typeof e!="string")return t===void 0?u:t;const i=Ue(e);if(i.length===0)return t;for(let s=0;s<i.length;s++){const o=i[s];if(Iu(u,o)?u=s===i.length-1?void 0:null:u=u[o],u==null){if(s!==i.length-1)return t;break}}return u===void 0?t:u}function Ku(u,e,t){if(!Ee(u)||typeof e!="string")return u;const i=u,s=Ue(e);for(let o=0;o<s.length;o++){const r=s[o];Zt(u,r),o===s.length-1?u[r]=t:Ee(u[r])||(u[r]=typeof s[o+1]=="number"?[]:{}),u=u[r]}return i}function Wr(u,e){if(!Ee(u)||typeof e!="string")return!1;const t=Ue(e);for(let i=0;i<t.length;i++){const s=t[i];if(Zt(u,s),i===t.length-1)return delete u[s],!0;if(u=u[s],!Ee(u))return!1}}function Gr(u,e){if(!Ee(u)||typeof e!="string")return!1;const t=Ue(e);if(t.length===0)return!1;for(const i of t){if(!Ee(u)||!(i in u)||Iu(u,i))return!1;u=u[i]}return!0}function Yr(u,e){const t=e?N.join(u,"config.json"):N.join("configstore",`${u}.json`),i=qe??je.mkdtempSync(je.realpathSync(Be.tmpdir())+N.sep);return N.join(i,t)}const Vr="You don't have access to this file.",Hr={mode:448,recursive:!0},zu={mode:384};function Xu(u){throw u.code==="EACCES"&&(u.message=`${u.message}
${Vr}
`),u}class Jr{constructor(e,t,i={}){this._path=i.configPath??Yr(e,i.globalConfigPath),this._clearInvalidConfig=i.clearInvalidConfig??!0,t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(je.readFileSync(this._path,"utf8"))}catch(e){if(e.code==="ENOENT")return{};if(e.name==="SyntaxError"){if(this._clearInvalidConfig)return Su(this._path,"",zu),{};throw e}return Xu(e),{}}}set all(e){try{je.mkdirSync(N.dirname(this._path),Hr),Su(this._path,JSON.stringify(e,void 0," "),zu)}catch(t){Xu(t)}}get size(){return Object.keys(this.all||{}).length}get(e){return Ur(this.all,e)}set(e,t){const i=this.all;if(typeof e=="object"&&arguments.length===1)for(const s of Object.keys(e))Ku(i,s,e[s]);else Ku(i,e,t);this.all=i}has(e){return Gr(this.all,e)}delete(e){const t=this.all;Wr(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}var Kr=V.requireDiff();const zr=V.getDefaultExportFromCjs(Kr);var Xr=V.requireGt();const Qr=V.getDefaultExportFromCjs(Xr);class _u extends Error{response;request;options;constructor(e,t,i){const s=e.status||e.status===0?e.status:"",o=e.statusText??"",r=`${s} ${o}`.trim(),n=r?`status code ${r}`:"an unknown error";super(`Request failed with ${n}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=i}}class er extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{typeof e=="string"?t=e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&(t=e.message)}catch{}super(t),this.value=e}}class tu extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new er(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}const Qu=(()=>{let u=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(t&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return u&&!e})(),Zr=typeof globalThis.AbortController=="function",ur=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",en=typeof globalThis.ReadableStream=="function",un=typeof globalThis.FormData=="function",tr=["get","post","put","patch","head","delete"],tn={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},ru=2147483647,rn=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,rr=Symbol("stop");class nr{options;constructor(e){this.options=e}}const nn=u=>new nr(u),Dn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},on={next:!0},sn={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},an=u=>{if(!u)return 0;if(u instanceof FormData){let e=0;for(const[t,i]of u)e+=rn,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(u instanceof Blob)return u.size;if(u instanceof ArrayBuffer)return u.byteLength;if(typeof u=="string")return new TextEncoder().encode(u).length;if(u instanceof URLSearchParams)return new TextEncoder().encode(u.toString()).length;if("byteLength"in u)return u.byteLength;if(typeof u=="object"&&u!==null)try{const e=JSON.stringify(u);return new TextEncoder().encode(e).length}catch{return 0}return 0},Dr=(u,e,t)=>{let i,s=0;return u.pipeThrough(new TransformStream({transform(o,r){if(r.enqueue(o),i){s+=i.byteLength;let n=e===0?0:s/e;n>=1&&(n=1-Number.EPSILON),t?.({percent:n,totalBytes:Math.max(e,s),transferredBytes:s},i)}i=o},flush(){i&&(s+=i.byteLength,t?.({percent:1,totalBytes:Math.max(e,s),transferredBytes:s},i))}}))},cn=(u,e)=>{if(!u.body)return u;if(u.status===204)return new Response(null,{status:u.status,statusText:u.statusText,headers:u.headers});const t=Math.max(0,Number(u.headers.get("content-length"))||0);return new Response(Dr(u.body,t,e),{status:u.status,statusText:u.statusText,headers:u.headers})},fn=(u,e,t)=>{if(!u.body)return u;const i=an(t??u.body);return new Request(u,{duplex:"half",body:Dr(u.body,i,e)})},pe=u=>u!==null&&typeof u=="object",Ie=(...u)=>{for(const e of u)if((!pe(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Nu({},...u)},ir=(u={},e={})=>{const t=new globalThis.Headers(u),i=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[o,r]of s.entries())i&&r==="undefined"||r===void 0?t.delete(o):t.set(o,r);return t};function Ne(u,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:Nu(u[t]??[],e[t]??[])}const or=(u={},e={})=>({beforeRequest:Ne(u,e,"beforeRequest"),beforeRetry:Ne(u,e,"beforeRetry"),afterResponse:Ne(u,e,"afterResponse"),beforeError:Ne(u,e,"beforeError")}),ln=(u,e)=>{const t=new URLSearchParams;for(const i of[u,e])if(i!==void 0)if(i instanceof URLSearchParams)for(const[s,o]of i.entries())t.append(s,o);else if(Array.isArray(i))for(const s of i){if(!Array.isArray(s)||s.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");t.append(String(s[0]),String(s[1]))}else if(pe(i))for(const[s,o]of Object.entries(i))o!==void 0&&t.append(s,String(o));else{const s=new URLSearchParams(i);for(const[o,r]of s.entries())t.append(o,r)}return t},Nu=(...u)=>{let e={},t={},i={},s;const o=[];for(const r of u)if(Array.isArray(r))Array.isArray(e)||(e=[]),e=[...e,...r];else if(pe(r)){for(let[n,c]of Object.entries(r)){if(n==="signal"&&c instanceof globalThis.AbortSignal){o.push(c);continue}if(n==="context"){if(c!=null&&(!pe(c)||Array.isArray(c)))throw new TypeError("The `context` option must be an object");e={...e,context:c==null?{}:{...e.context,...c}};continue}if(n==="searchParams"){c==null?s=void 0:s=s===void 0?c:ln(s,c);continue}pe(c)&&n in e&&(c=Nu(e[n],c)),e={...e,[n]:c}}pe(r.hooks)&&(i=or(i,r.hooks),e.hooks=i),pe(r.headers)&&(t=ir(t,r.headers),e.headers=t)}return s!==void 0&&(e.searchParams=s),o.length>0&&(o.length===1?e.signal=o[0]:ur?e.signal=AbortSignal.any(o):e.signal=o.at(-1)),e},Fn=u=>tr.includes(u)?u.toUpperCase():u,hn=["get","put","head","delete","options","trace"],dn=[408,413,429,500,502,503,504],pn=[413,429,503],Zu={limit:2,methods:hn,statusCodes:dn,afterStatusCodes:pn,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:u=>.3*2**(u-1)*1e3,jitter:void 0,retryOnTimeout:!1},En=(u={})=>{if(typeof u=="number")return{...Zu,limit:u};if(u.methods&&!Array.isArray(u.methods))throw new Error("retry.methods must be an array");if(u.methods&&=u.methods.map(t=>t.toLowerCase()),u.statusCodes&&!Array.isArray(u.statusCodes))throw new Error("retry.statusCodes must be an array");const e=Object.fromEntries(Object.entries(u).filter(([,t])=>t!==void 0));return{...Zu,...e}};class xu extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}async function Cn(u,e,t,i){return new Promise((s,o)=>{const r=setTimeout(()=>{t&&t.abort(),o(new xu(u))},i.timeout);i.fetch(u,e).then(s).catch(o).then(()=>{clearTimeout(r)})})}async function gn(u,{signal:e}){return new Promise((t,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(o),i(e.reason)}const o=setTimeout(()=>{e?.removeEventListener("abort",s),t()},u)})}const mn=(u,e)=>{const t={};for(const i in e)Object.hasOwn(e,i)&&!(i in sn)&&!(i in Dn)&&(!(i in u)||i in on)&&(t[i]=e[i]);return t},yn=u=>u===void 0?!1:Array.isArray(u)?u.length>0:u instanceof URLSearchParams?u.size>0:typeof u=="object"?Object.keys(u).length>0:typeof u=="string"?u.trim().length>0:!!u;function Bn(u){return u instanceof _u||u?.name===_u.name}function An(u){return u instanceof xu||u?.name===xu.name}class be{static create(e,t){const i=new be(e,t),s=async()=>{if(typeof i.#e.timeout=="number"&&i.#e.timeout>ru)throw new RangeError(`The \`timeout\` option cannot be greater than ${ru}`);await Promise.resolve();let r=await i.#E();for(const n of i.#e.hooks.afterResponse){const c=i.#F(r.clone());let a;try{a=await n(i.request,i.#a(),c,{retryCount:i.#r})}catch(E){throw i.#D(c),i.#D(r),E}if(a instanceof nr)throw i.#D(c),i.#D(r),new tu(a.options);const l=a instanceof globalThis.Response?a:r;c!==l&&i.#D(c),r!==l&&i.#D(r),r=l}if(i.#F(r),!r.ok&&(typeof i.#e.throwHttpErrors=="function"?i.#e.throwHttpErrors(r.status):i.#e.throwHttpErrors)){let n=new _u(r,i.request,i.#a());for(const c of i.#e.hooks.beforeError)n=await c(n,{retryCount:i.#r});throw n}if(i.#e.onDownloadProgress){if(typeof i.#e.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!en)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const n=r.clone();return i.#D(r),cn(n,i.#e.onDownloadProgress)}return r},o=i.#h(s).finally(()=>{const r=i.#o;i.#f(r?.body??void 0),i.#f(i.request.body??void 0)});for(const[r,n]of Object.entries(tn))r==="bytes"&&typeof globalThis.Response?.prototype?.bytes!="function"||(o[r]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||n);const c=await o;if(r==="json"){if(c.status===204)return"";const a=await c.text();return a===""?"":t.parseJson?t.parseJson(a):JSON.parse(a)}return c[r]()});return o}static#i(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):e}request;#t;#r=0;#u;#e;#o;#n;#s;constructor(e,t={}){if(this.#u=e,this.#e={...t,headers:ir(this.#u.headers,t.headers),hooks:or({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:Fn(t.method??this.#u.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:En(t.retry),throwHttpErrors:t.throwHttpErrors??!0,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis),context:t.context??{}},typeof this.#u!="string"&&!(this.#u instanceof URL||this.#u instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&typeof this.#u=="string"){if(this.#u.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#u=this.#e.prefixUrl+this.#u}Zr&&ur&&(this.#n=this.#e.signal??this.#u.signal,this.#t=new globalThis.AbortController,this.#e.signal=this.#n?AbortSignal.any([this.#n,this.#t.signal]):this.#t.signal),Qu&&(this.#e.duplex="half"),this.#e.json!==void 0&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const i=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#u instanceof globalThis.Request&&(un&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!i&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#u,this.#e),yn(this.#e.searchParams)){const o="?"+(typeof this.#e.searchParams=="string"?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(be.#i(this.#e.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);this.request=new globalThis.Request(r,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!Qu)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#d(this.request,this.#e.body??void 0)}}#c(){const e=this.#e.retry.delay(this.#r);let t=e;this.#e.retry.jitter===!0?t=Math.random()*e:typeof this.#e.retry.jitter=="function"&&(t=this.#e.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const i=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(i,t)}async#p(e){if(this.#r++,this.#r>this.#e.retry.limit)throw e;const t=e instanceof Error?e:new er(e);if(t instanceof tu)return t.customDelay??this.#c();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#e.retry.shouldRetry!==void 0){const i=await this.#e.retry.shouldRetry({error:t,retryCount:this.#r});if(i===!1)throw e;if(i===!0)return this.#c()}if(An(e)&&!this.#e.retry.retryOnTimeout)throw e;if(Bn(e)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let s=Number(i)*1e3;Number.isNaN(s)?s=Date.parse(i)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const o=this.#e.retry.maxRetryAfter??s;return s<o?s:o}if(e.response.status===413)throw e}return this.#c()}#F(e){return this.#e.parseJson&&(e.json=async()=>this.#e.parseJson(await e.text())),e}#f(e){e&&e.cancel().catch(()=>{})}#D(e){this.#f(e.body??void 0)}async#h(e){try{return await e()}catch(t){const i=Math.min(await this.#p(t),ru);if(this.#r<1)throw t;if(await gn(i,this.#n?{signal:this.#n}:{}),t instanceof tu&&t.customRequest){const s=this.#e.signal?new globalThis.Request(t.customRequest,{signal:this.#e.signal}):new globalThis.Request(t.customRequest);this.#l(s)}for(const s of this.#e.hooks.beforeRetry){const o=await s({request:this.request,options:this.#a(),error:t,retryCount:this.#r});if(o instanceof globalThis.Request){this.#l(o);break}if(o instanceof globalThis.Response)return o;if(o===rr)return}return this.#h(e)}}async#E(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#e.signal=this.#n?AbortSignal.any([this.#n,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(const t of this.#e.hooks.beforeRequest){const i=await t(this.request,this.#a(),{retryCount:this.#r});if(i instanceof Response)return i;if(i instanceof globalThis.Request){this.#l(i);break}}const e=mn(this.request,this.#e);return this.#o=this.request,this.request=this.#o.clone(),this.#e.timeout===!1?this.#e.fetch(this.#o,e):Cn(this.#o,e,this.#t,this.#e)}#a(){if(!this.#s){const{hooks:e,...t}=this.#e;this.#s=Object.freeze(t)}return this.#s}#l(e){this.#s=void 0,this.request=this.#d(e)}#d(e,t){return!this.#e.onUploadProgress||!e.body?e:fn(e,this.#e.onUploadProgress,t??this.#e.body??void 0)}}const Ru=u=>{const e=(t,i)=>be.create(t,Ie(u,i));for(const t of tr)e[t]=(i,s)=>be.create(i,Ie(u,s,{method:t}));return e.create=t=>Ru(Ie(t)),e.extend=t=>(typeof t=="function"&&(t=t(u??{})),Ru(Ie(u,t))),e.stop=rr,e.retry=nn,e},vn=Ru();var Fe={},oe={},et;function wn(){if(et)return oe;et=1,oe.parse=oe.decode=i,oe.stringify=oe.encode=e,oe.safe=o,oe.unsafe=r;var u=typeof process<"u"&&process.platform==="win32"?`\r
`:`
`;function e(n,c){var a=[],l="";typeof c=="string"?c={section:c,whitespace:!1}:(c=c||{},c.whitespace=c.whitespace===!0);var E=c.whitespace?" = ":"=";return Object.keys(n).forEach(function(h,F,d){var p=n[h];p&&Array.isArray(p)?p.forEach(function(D){l+=o(h+"[]")+E+o(D)+`
`}):p&&typeof p=="object"?a.push(h):l+=o(h)+E+o(p)+u}),c.section&&l.length&&(l="["+o(c.section)+"]"+u+l),a.forEach(function(h,F,d){var p=t(h).join("\\."),D=(c.section?c.section+".":"")+p,f=e(n[h],{section:D,whitespace:c.whitespace});l.length&&f.length&&(l+=u),l+=f}),l}function t(n){return n.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(c){return c.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function i(n){var c={},a=c,l=null,E=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,h=n.split(/[\r\n]+/g);return h.forEach(function(F,d,p){if(!(!F||F.match(/^\s*[;#]/))){var D=F.match(E);if(D){if(D[1]!==void 0){if(l=r(D[1]),l==="__proto__"){a={};return}a=c[l]=c[l]||{};return}var f=r(D[2]);if(f!=="__proto__"){var C=D[3]?r(D[4]):!0;switch(C){case"true":case"false":case"null":C=JSON.parse(C)}if(f.length>2&&f.slice(-2)==="[]"){if(f=f.substring(0,f.length-2),f==="__proto__")return;a[f]?Array.isArray(a[f])||(a[f]=[a[f]]):a[f]=[]}Array.isArray(a[f])?a[f].push(C):a[f]=C}}}}),Object.keys(c).filter(function(F,d,p){if(!c[F]||typeof c[F]!="object"||Array.isArray(c[F]))return!1;var D=t(F),f=c,C=D.pop(),g=C.replace(/\\\./g,".");return D.forEach(function(m,v,B){m!=="__proto__"&&((!f[m]||typeof f[m]!="object")&&(f[m]={}),f=f[m])}),f===c&&g===C?!1:(f[g]=c[F],!0)}).forEach(function(F,d,p){delete c[F]}),c}function s(n){return n.charAt(0)==='"'&&n.slice(-1)==='"'||n.charAt(0)==="'"&&n.slice(-1)==="'"}function o(n){return typeof n!="string"||n.match(/[=\r\n]/)||n.match(/^\[/)||n.length>1&&s(n)||n!==n.trim()?JSON.stringify(n):n.replace(/;/g,"\\;").replace(/#/g,"\\#")}function r(n,c){if(n=(n||"").trim(),s(n)){n.charAt(0)==="'"&&(n=n.substr(1,n.length-2));try{n=JSON.parse(n)}catch{}}else{for(var a=!1,l="",E=0,h=n.length;E<h;E++){var F=n.charAt(E);if(a)"\\;#".indexOf(F)!==-1?l+=F:l+="\\"+F,a=!1;else{if(";#".indexOf(F)!==-1)break;F==="\\"?a=!0:l+=F}}return a&&(l+="\\"),l.trim()}return n}return oe}var nu,ut;function bn(){if(ut)return nu;ut=1;var u=1,e=2;function t(){return""}function i(s,o,r){return s.slice(o,r).replace(/\S/g," ")}return nu=function(s,o){o=o||{};for(var r,n,c=!1,a=!1,l=0,E="",h=o.whitespace===!1?t:i,F=0;F<s.length;F++){if(r=s[F],n=s[F+1],!a&&r==='"'){var d=s[F-1]==="\\"&&s[F-2]!=="\\";d||(c=!c)}if(!c){if(!a&&r+n==="//")E+=s.slice(l,F),l=F,a=u,F++;else if(a===u&&r+n===`\r
`){F++,a=!1,E+=h(s,l,F),l=F;continue}else if(a===u&&r===`
`)a=!1,E+=h(s,l,F),l=F;else if(!a&&r+n==="/*"){E+=s.slice(l,F),l=F,a=e,F++;continue}else if(a===e&&r+n==="*/"){F++,a=!1,E+=h(s,l,F+1),l=F+1;continue}}}return E+(a?h(s.substr(l)):s.substr(l))},nu}var tt;function Sn(){if(tt)return Fe;tt=1;var u=I,e=wn(),t=N,i=bn(),s=Fe.parse=function(r){return/^\s*{/.test(r)?JSON.parse(i(r)):e.parse(r)},o=Fe.file=function(){var r=[].slice.call(arguments).filter(function(a){return a!=null});for(var n in r)if(typeof r[n]!="string")return;var c=t.join.apply(null,r);try{return u.readFileSync(c,"utf-8")}catch{return}};return Fe.json=function(){var r=o.apply(null,arguments);return r?s(r):null},Fe.env=function(r,n){n=n||process.env;var c={},a=r.length;for(var l in n)if(l.toLowerCase().indexOf(r.toLowerCase())===0){for(var E=l.substring(a).split("__"),h;(h=E.indexOf(""))>-1;)E.splice(h,1);var F=c;E.forEach(function(p,D){!p||typeof F!="object"||(D===E.length-1&&(F[p]=n[l]),F[p]===void 0&&(F[p]={}),F=F[p])})}return c},Fe.find=function(){var r=t.join.apply(null,[].slice.call(arguments));function n(c,a){var l=t.join(c,a);try{return u.statSync(l),l}catch{if(t.dirname(c)!==c)return n(t.dirname(c),a)}}return n(process.cwd(),r)},Fe}var Du={exports:{}};var rt;function _n(){if(rt)return Du.exports;rt=1;function u(o){return o instanceof Buffer||o instanceof Date||o instanceof RegExp}function e(o){if(o instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(o.length):new Buffer(o.length);return o.copy(r),r}else{if(o instanceof Date)return new Date(o.getTime());if(o instanceof RegExp)return new RegExp(o);throw new Error("Unexpected situation")}}function t(o){var r=[];return o.forEach(function(n,c){typeof n=="object"&&n!==null?Array.isArray(n)?r[c]=t(n):u(n)?r[c]=e(n):r[c]=s({},n):r[c]=n}),r}function i(o,r){return r==="__proto__"?void 0:o[r]}var s=Du.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var o=arguments[0],r=Array.prototype.slice.call(arguments,1),n,c;return r.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(l){if(c=i(o,l),n=i(a,l),n!==o)if(typeof n!="object"||n===null){o[l]=n;return}else if(Array.isArray(n)){o[l]=t(n);return}else if(u(n)){o[l]=e(n);return}else if(typeof c!="object"||c===null||Array.isArray(c)){o[l]=s({},n);return}else{o[l]=s(c,n);return}})}),o};return Du.exports}var iu,nt;function xn(){if(nt)return iu;nt=1;function u(i,s){var o=i;s.slice(0,-1).forEach(function(n){o=o[n]||{}});var r=s[s.length-1];return r in o}function e(i){return typeof i=="number"||/^0x[0-9a-f]+$/i.test(i)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i)}function t(i,s){return s==="constructor"&&typeof i[s]=="function"||s==="__proto__"}return iu=function(i,s){s||(s={});var o={bools:{},strings:{},unknownFn:null};typeof s.unknown=="function"&&(o.unknownFn=s.unknown),typeof s.boolean=="boolean"&&s.boolean?o.allBools=!0:[].concat(s.boolean).filter(Boolean).forEach(function(A){o.bools[A]=!0});var r={};function n(A){return r[A].some(function(x){return o.bools[x]})}Object.keys(s.alias||{}).forEach(function(A){r[A]=[].concat(s.alias[A]),r[A].forEach(function(x){r[x]=[A].concat(r[A].filter(function(k){return x!==k}))})}),[].concat(s.string).filter(Boolean).forEach(function(A){o.strings[A]=!0,r[A]&&[].concat(r[A]).forEach(function(x){o.strings[x]=!0})});var c=s.default||{},a={_:[]};function l(A,x){return o.allBools&&/^--[^=]+$/.test(x)||o.strings[A]||o.bools[A]||r[A]}function E(A,x,k){for(var P=A,ee=0;ee<x.length-1;ee++){var Y=x[ee];if(t(P,Y))return;P[Y]===void 0&&(P[Y]={}),(P[Y]===Object.prototype||P[Y]===Number.prototype||P[Y]===String.prototype)&&(P[Y]={}),P[Y]===Array.prototype&&(P[Y]=[]),P=P[Y]}var H=x[x.length-1];t(P,H)||((P===Object.prototype||P===Number.prototype||P===String.prototype)&&(P={}),P===Array.prototype&&(P=[]),P[H]===void 0||o.bools[H]||typeof P[H]=="boolean"?P[H]=k:Array.isArray(P[H])?P[H].push(k):P[H]=[P[H],k])}function h(A,x,k){if(!(k&&o.unknownFn&&!l(A,k)&&o.unknownFn(k)===!1)){var P=!o.strings[A]&&e(x)?Number(x):x;E(a,A.split("."),P),(r[A]||[]).forEach(function(ee){E(a,ee.split("."),P)})}}Object.keys(o.bools).forEach(function(A){h(A,c[A]===void 0?!1:c[A])});var F=[];i.indexOf("--")!==-1&&(F=i.slice(i.indexOf("--")+1),i=i.slice(0,i.indexOf("--")));for(var d=0;d<i.length;d++){var p=i[d],D,f;if(/^--.+=/.test(p)){var C=p.match(/^--([^=]+)=([\s\S]*)$/);D=C[1];var g=C[2];o.bools[D]&&(g=g!=="false"),h(D,g,p)}else if(/^--no-.+/.test(p))D=p.match(/^--no-(.+)/)[1],h(D,!1,p);else if(/^--.+/.test(p))D=p.match(/^--(.+)/)[1],f=i[d+1],f!==void 0&&!/^(-|--)[^-]/.test(f)&&!o.bools[D]&&!o.allBools&&(!r[D]||!n(D))?(h(D,f,p),d+=1):/^(true|false)$/.test(f)?(h(D,f==="true",p),d+=1):h(D,o.strings[D]?"":!0,p);else if(/^-[^-]+/.test(p)){for(var m=p.slice(1,-1).split(""),v=!1,B=0;B<m.length;B++){if(f=p.slice(B+2),f==="-"){h(m[B],f,p);continue}if(/[A-Za-z]/.test(m[B])&&f[0]==="="){h(m[B],f.slice(1),p),v=!0;break}if(/[A-Za-z]/.test(m[B])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(f)){h(m[B],f,p),v=!0;break}if(m[B+1]&&m[B+1].match(/\W/)){h(m[B],p.slice(B+2),p),v=!0;break}else h(m[B],o.strings[m[B]]?"":!0,p)}D=p.slice(-1)[0],!v&&D!=="-"&&(i[d+1]&&!/^(-|--)[^-]/.test(i[d+1])&&!o.bools[D]&&(!r[D]||!n(D))?(h(D,i[d+1],p),d+=1):i[d+1]&&/^(true|false)$/.test(i[d+1])?(h(D,i[d+1]==="true",p),d+=1):h(D,o.strings[D]?"":!0,p))}else if((!o.unknownFn||o.unknownFn(p)!==!1)&&a._.push(o.strings._||!e(p)?p:Number(p)),s.stopEarly){a._.push.apply(a._,i.slice(d+1));break}}return Object.keys(c).forEach(function(A){u(a,A.split("."))||(E(a,A.split("."),c[A]),(r[A]||[]).forEach(function(x){E(a,x.split("."),c[A])}))}),s["--"]?a["--"]=F.slice():F.forEach(function(A){a._.push(A)}),a},iu}var ou,Dt;function Rn(){if(Dt)return ou;Dt=1;var u=Sn(),e=N.join,t=_n(),i="/etc",s=process.platform==="win32",o=s?process.env.USERPROFILE:process.env.HOME;return ou=function(r,n,c,a){if(typeof r!="string")throw new Error("rc(name): name *must* be string");c||(c=xn()(process.argv.slice(2))),n=(typeof n=="string"?u.json(n):n)||{},a=a||u.parse;var l=u.env(r+"_"),E=[n],h=[];function F(d){if(!(h.indexOf(d)>=0)){var p=u.file(d);p&&(E.push(a(p)),h.push(d))}}return s||[e(i,r,"config"),e(i,r+"rc")].forEach(F),o&&[e(o,".config",r,"config"),e(o,".config",r),e(o,"."+r,"config"),e(o,"."+r+"rc")].forEach(F),F(u.find("."+r+"rc")),l.config&&F(l.config),c.config&&F(c.config),t.apply(null,E.concat([l,c,h.length?{configs:h,config:h[h.length-1]}:void 0]))},ou}var On=Rn();const Tn=V.getDefaultExportFromCjs(On);function In(u){const e=Tn("npm",{registry:"https://registry.npmjs.org/"}),t=e[`${u}:registry`]||e.config_registry||e.registry;return t.slice(-1)==="/"?t:`${t}/`}var su={exports:{}},he={},de={},au,it;function Nn(){if(it)return au;it=1;var u=Kt,e=process.cwd,t=null,i=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return t||(t=e.call(process)),t};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var s=process.chdir;process.chdir=function(r){t=null,s.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}au=o;function o(r){u.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&n(r),r.lutimes||c(r),r.chown=E(r.chown),r.fchown=E(r.fchown),r.lchown=E(r.lchown),r.chmod=a(r.chmod),r.fchmod=a(r.fchmod),r.lchmod=a(r.lchmod),r.chownSync=h(r.chownSync),r.fchownSync=h(r.fchownSync),r.lchownSync=h(r.lchownSync),r.chmodSync=l(r.chmodSync),r.fchmodSync=l(r.fchmodSync),r.lchmodSync=l(r.lchmodSync),r.stat=F(r.stat),r.fstat=F(r.fstat),r.lstat=F(r.lstat),r.statSync=d(r.statSync),r.fstatSync=d(r.fstatSync),r.lstatSync=d(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(D,f,C){C&&process.nextTick(C)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(D,f,C,g){g&&process.nextTick(g)},r.lchownSync=function(){}),i==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:(function(D){function f(C,g,m){var v=Date.now(),B=0;D(C,g,function A(x){if(x&&(x.code==="EACCES"||x.code==="EPERM")&&Date.now()-v<6e4){setTimeout(function(){r.stat(g,function(k,P){k&&k.code==="ENOENT"?D(C,g,A):m(x)})},B),B<100&&(B+=10);return}m&&m(x)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,D),f})(r.rename)),r.read=typeof r.read!="function"?r.read:(function(D){function f(C,g,m,v,B,A){var x;if(A&&typeof A=="function"){var k=0;x=function(P,ee,Y){if(P&&P.code==="EAGAIN"&&k<10)return k++,D.call(r,C,g,m,v,B,x);A.apply(this,arguments)}}return D.call(r,C,g,m,v,B,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,D),f})(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:(function(D){return function(f,C,g,m,v){for(var B=0;;)try{return D.call(r,f,C,g,m,v)}catch(A){if(A.code==="EAGAIN"&&B<10){B++;continue}throw A}}})(r.readSync);function n(D){D.lchmod=function(f,C,g){D.open(f,u.O_WRONLY|u.O_SYMLINK,C,function(m,v){if(m){g&&g(m);return}D.fchmod(v,C,function(B){D.close(v,function(A){g&&g(B||A)})})})},D.lchmodSync=function(f,C){var g=D.openSync(f,u.O_WRONLY|u.O_SYMLINK,C),m=!0,v;try{v=D.fchmodSync(g,C),m=!1}finally{if(m)try{D.closeSync(g)}catch{}else D.closeSync(g)}return v}}function c(D){u.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(f,C,g,m){D.open(f,u.O_SYMLINK,function(v,B){if(v){m&&m(v);return}D.futimes(B,C,g,function(A){D.close(B,function(x){m&&m(A||x)})})})},D.lutimesSync=function(f,C,g){var m=D.openSync(f,u.O_SYMLINK),v,B=!0;try{v=D.futimesSync(m,C,g),B=!1}finally{if(B)try{D.closeSync(m)}catch{}else D.closeSync(m)}return v}):D.futimes&&(D.lutimes=function(f,C,g,m){m&&process.nextTick(m)},D.lutimesSync=function(){})}function a(D){return D&&function(f,C,g){return D.call(r,f,C,function(m){p(m)&&(m=null),g&&g.apply(this,arguments)})}}function l(D){return D&&function(f,C){try{return D.call(r,f,C)}catch(g){if(!p(g))throw g}}}function E(D){return D&&function(f,C,g,m){return D.call(r,f,C,g,function(v){p(v)&&(v=null),m&&m.apply(this,arguments)})}}function h(D){return D&&function(f,C,g){try{return D.call(r,f,C,g)}catch(m){if(!p(m))throw m}}}function F(D){return D&&function(f,C,g){typeof C=="function"&&(g=C,C=null);function m(v,B){B&&(B.uid<0&&(B.uid+=4294967296),B.gid<0&&(B.gid+=4294967296)),g&&g.apply(this,arguments)}return C?D.call(r,f,C,m):D.call(r,f,m)}}function d(D){return D&&function(f,C){var g=C?D.call(r,f,C):D.call(r,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function p(D){if(!D||D.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(D.code==="EINVAL"||D.code==="EPERM"))}}return au}var cu,ot;function Pn(){if(ot)return cu;ot=1;var u=Ou.Stream;cu=e;function e(t){return{ReadStream:i,WriteStream:s};function i(o,r){if(!(this instanceof i))return new i(o,r);u.call(this);var n=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var c=Object.keys(r),a=0,l=c.length;a<l;a++){var E=c[a];this[E]=r[E]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){n._read()});return}t.open(this.path,this.flags,this.mode,function(h,F){if(h){n.emit("error",h),n.readable=!1;return}n.fd=F,n.emit("open",F),n._read()})}function s(o,r){if(!(this instanceof s))return new s(o,r);u.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var n=Object.keys(r),c=0,a=n.length;c<a;c++){var l=n[c];this[l]=r[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return cu}var fu,st;function Ln(){if(st)return fu;st=1,fu=e;var u=Object.getPrototypeOf||function(t){return t.__proto__};function e(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var i={__proto__:u(t)};else var i=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))}),i}return fu}var Pe,at;function $n(){if(at)return Pe;at=1;var u=I,e=Nn(),t=Pn(),i=Ln(),s=U,o,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",r="___graceful-fs.p