immosquare-cleaner 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/lib/immosquare-cleaner.rb +1 -0
  4. data/node_modules/@eslint/js/package.json +1 -1
  5. data/node_modules/eslint/lib/api.js +29 -1
  6. data/node_modules/eslint/lib/config/flat-config-schema.js +35 -20
  7. data/node_modules/eslint/lib/eslint/eslint.js +7 -0
  8. data/node_modules/eslint/lib/eslint/flat-eslint.js +17 -4
  9. data/node_modules/eslint/lib/options.js +1 -1
  10. data/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +10 -1
  11. data/node_modules/eslint/package.json +4 -4
  12. data/node_modules/npm-check-updates/README.md +8 -4
  13. data/node_modules/npm-check-updates/build/cli.d.ts +1 -0
  14. data/node_modules/npm-check-updates/build/cli.js +28 -0
  15. data/node_modules/npm-check-updates/build/cli.js.map +1 -0
  16. data/node_modules/npm-check-updates/build/index-BnIU43YD.js +2 -0
  17. data/node_modules/npm-check-updates/build/index-BnIU43YD.js.map +1 -0
  18. data/node_modules/npm-check-updates/build/index-CI_x-D21.js +593 -0
  19. data/node_modules/npm-check-updates/build/index-CI_x-D21.js.map +1 -0
  20. data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js +6 -0
  21. data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js.map +1 -0
  22. data/node_modules/npm-check-updates/build/index-DgVn3Gax.js +36 -0
  23. data/node_modules/npm-check-updates/build/index-DgVn3Gax.js.map +1 -0
  24. data/node_modules/npm-check-updates/build/index-_DliZFxU.js +5 -0
  25. data/node_modules/npm-check-updates/build/index-_DliZFxU.js.map +1 -0
  26. data/node_modules/npm-check-updates/build/index.d.ts +209 -0
  27. data/node_modules/npm-check-updates/build/index.js +2 -0
  28. data/node_modules/npm-check-updates/build/index.js.map +1 -0
  29. data/node_modules/npm-check-updates/build/package.json +1 -1
  30. data/node_modules/npm-check-updates/build/src/cli-options.js +10 -4
  31. data/node_modules/npm-check-updates/build/src/cli-options.js.map +1 -1
  32. data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js +2 -1
  33. data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js.map +1 -1
  34. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.d.ts +2 -0
  35. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js +10 -3
  36. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js.map +1 -1
  37. data/node_modules/npm-check-updates/build/src/package-managers/npm.js +1 -5
  38. data/node_modules/npm-check-updates/build/src/package-managers/npm.js.map +1 -1
  39. data/node_modules/npm-check-updates/package.json +1 -1
  40. data/package.json +2 -2
  41. metadata +20 -7
  42. data/node_modules/npm-check-updates/build/src/lib/queryVersions.d.mts +0 -13
  43. data/node_modules/npm-check-updates/build/src/lib/queryVersions.mjs +0 -111
  44. data/node_modules/npm-check-updates/build/src/lib/queryVersions.mjs.map +0 -1
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("node:process"),Vs=require("node:child_process"),re=require("node:url"),Su=require("node:path"),oe=require("node:util"),V=require("path"),zt=require("os"),v=require("./index-CI_x-D21.js"),ge=require("fs"),vu=require("constants"),le=require("stream"),Me=require("util"),Gt=require("assert"),ct=require("events"),Tr=require("crypto"),ue=require("./index-Ci8A2QXv.js"),it=require("node:http"),Ou=require("node:https"),Pu=require("node:events"),Pt=require("node:buffer"),Wt=require("node:stream"),Js=require("node:crypto"),Ys=require("buffer"),Ks=require("zlib"),Qs=require("node:net"),Xs=require("node:tls"),He=require("node:dns"),Zs=require("node:os"),kr=require("http2"),Oe=require("url"),Vt=require("tls"),Jt=require("http"),$r=require("https"),ei=require("net"),Ru=require("./index-BnIU43YD.js");var en=typeof document<"u"?document.currentScript:null,fe=vu,ti=process.cwd,Rt=null,ri=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Rt||(Rt=ti.call(process)),Rt};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var tn=process.chdir;process.chdir=function(t){Rt=null,tn.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,tn)}var ni=ui;function ui(t){fe.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=s(t.chmodSync),t.fchmodSync=s(t.fchmodSync),t.lchmodSync=s(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(D,d,h){h&&process.nextTick(h)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(D,d,h,p){p&&process.nextTick(p)},t.lchownSync=function(){}),ri==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(D){function d(h,p,m){var f=Date.now(),F=0;D(h,p,function y(_){if(_&&(_.code==="EACCES"||_.code==="EPERM"||_.code==="EBUSY")&&Date.now()-f<6e4){setTimeout(function(){t.stat(p,function(C,P){C&&C.code==="ENOENT"?D(h,p,y):m(_)})},F),F<100&&(F+=10);return}m&&m(_)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,D),d}(t.rename)),t.read=typeof t.read!="function"?t.read:function(D){function d(h,p,m,f,F,y){var _;if(y&&typeof y=="function"){var C=0;_=function(P,I,G){if(P&&P.code==="EAGAIN"&&C<10)return C++,D.call(t,h,p,m,f,F,_);y.apply(this,arguments)}}return D.call(t,h,p,m,f,F,_)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,D),d}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(D){return function(d,h,p,m,f){for(var F=0;;)try{return D.call(t,d,h,p,m,f)}catch(y){if(y.code==="EAGAIN"&&F<10){F++;continue}throw y}}}(t.readSync);function e(D){D.lchmod=function(d,h,p){D.open(d,fe.O_WRONLY|fe.O_SYMLINK,h,function(m,f){if(m){p&&p(m);return}D.fchmod(f,h,function(F){D.close(f,function(y){p&&p(F||y)})})})},D.lchmodSync=function(d,h){var p=D.openSync(d,fe.O_WRONLY|fe.O_SYMLINK,h),m=!0,f;try{f=D.fchmodSync(p,h),m=!1}finally{if(m)try{D.closeSync(p)}catch{}else D.closeSync(p)}return f}}function r(D){fe.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(d,h,p,m){D.open(d,fe.O_SYMLINK,function(f,F){if(f){m&&m(f);return}D.futimes(F,h,p,function(y){D.close(F,function(_){m&&m(y||_)})})})},D.lutimesSync=function(d,h,p){var m=D.openSync(d,fe.O_SYMLINK),f,F=!0;try{f=D.futimesSync(m,h,p),F=!1}finally{if(F)try{D.closeSync(m)}catch{}else D.closeSync(m)}return f}):D.futimes&&(D.lutimes=function(d,h,p,m){m&&process.nextTick(m)},D.lutimesSync=function(){})}function n(D){return D&&function(d,h,p){return D.call(t,d,h,function(m){l(m)&&(m=null),p&&p.apply(this,arguments)})}}function s(D){return D&&function(d,h){try{return D.call(t,d,h)}catch(p){if(!l(p))throw p}}}function i(D){return D&&function(d,h,p,m){return D.call(t,d,h,p,function(f){l(f)&&(f=null),m&&m.apply(this,arguments)})}}function u(D){return D&&function(d,h,p){try{return D.call(t,d,h,p)}catch(m){if(!l(m))throw m}}}function a(D){return D&&function(d,h,p){typeof h=="function"&&(p=h,h=null);function m(f,F){F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),p&&p.apply(this,arguments)}return h?D.call(t,d,h,m):D.call(t,d,m)}}function c(D){return D&&function(d,h){var p=h?D.call(t,d,h):D.call(t,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function l(D){if(!D||D.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(D.code==="EINVAL"||D.code==="EPERM"))}}var rn=le.Stream,si=ii;function ii(t){return{ReadStream:e,WriteStream:r};function e(n,s){if(!(this instanceof e))return new e(n,s);rn.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),a=0,c=u.length;a<c;a++){var l=u[a];this[l]=s[l]}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(){i._read()});return}t.open(this.path,this.flags,this.mode,function(D,d){if(D){i.emit("error",D),i.readable=!1;return}i.fd=d,i.emit("open",d),i._read()})}function r(n,s){if(!(this instanceof r))return new r(n,s);rn.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),u=0,a=i.length;u<a;u++){var c=i[u];this[c]=s[c]}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())}}var oi=ci,ai=Object.getPrototypeOf||function(t){return t.__proto__};function ci(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:ai(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var H=ge,Di=ni,li=si,fi=oi,dt=Me,K,jt;typeof Symbol=="function"&&typeof Symbol.for=="function"?(K=Symbol.for("graceful-fs.queue"),jt=Symbol.for("graceful-fs.previous")):(K="___graceful-fs.queue",jt="___graceful-fs.previous");function hi(){}function Tu(t,e){Object.defineProperty(t,K,{get:function(){return e}})}var Ae=hi;dt.debuglog?Ae=dt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ae=function(){var t=dt.format.apply(dt,arguments);t="GFS4: "+t.split(/\n/).join(`
2
+ GFS4: `),console.error(t)});if(!H[K]){var di=v.commonjsGlobal[K]||[];Tu(H,di),H.close=function(t){function e(r,n){return t.call(H,r,function(s){s||nn(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,jt,{value:t}),e}(H.close),H.closeSync=function(t){function e(r){t.apply(H,arguments),nn()}return Object.defineProperty(e,jt,{value:t}),e}(H.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Ae(H[K]),Gt.equal(H[K].length,0)})}v.commonjsGlobal[K]||Tu(v.commonjsGlobal,H[K]);var ku=jr(fi(H));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!H.__patched&&(ku=jr(H),H.__patched=!0);function jr(t){Di(t),t.gracefulify=jr,t.createReadStream=I,t.createWriteStream=G;var e=t.readFile;t.readFile=r;function r(E,x,w){return typeof x=="function"&&(w=x,x=null),T(E,x,w);function T(k,R,S,O){return e(k,R,function(A){A&&(A.code==="EMFILE"||A.code==="ENFILE")?Te([T,[k,R,S],A,O||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return n(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Te([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=u);function u(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return i(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Te([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(E,x,w,T){return typeof w=="function"&&(T=w,w=0),k(E,x,w,T);function k(R,S,O,A,$){return a(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Te([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var l=t.readdir;t.readdir=d;var D=/^v[0-5]\./;function d(E,x,w){typeof x=="function"&&(w=x,x=null);var T=D.test(process.version)?function(S,O,A,$){return l(S,k(S,O,A,$))}:function(S,O,A,$){return l(S,O,k(S,O,A,$))};return T(E,x,w);function k(R,S,O,A){return function($,B){$&&($.code==="EMFILE"||$.code==="ENFILE")?Te([T,[R,S,O],$,A||Date.now(),Date.now()]):(B&&B.sort&&B.sort(),typeof O=="function"&&O.call(this,$,B))}}}if(process.version.substr(0,4)==="v0.8"){var h=li(t);y=h.ReadStream,C=h.WriteStream}var p=t.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=_);var m=t.WriteStream;m&&(C.prototype=Object.create(m.prototype),C.prototype.open=P),Object.defineProperty(t,"ReadStream",{get:function(){return y},set:function(E){y=E},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return C},set:function(E){C=E},enumerable:!0,configurable:!0});var f=y;Object.defineProperty(t,"FileReadStream",{get:function(){return f},set:function(E){f=E},enumerable:!0,configurable:!0});var F=C;Object.defineProperty(t,"FileWriteStream",{get:function(){return F},set:function(E){F=E},enumerable:!0,configurable:!0});function y(E,x){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function _(){var E=this;ce(E.path,E.flags,E.mode,function(x,w){x?(E.autoClose&&E.destroy(),E.emit("error",x)):(E.fd=w,E.emit("open",w),E.read())})}function C(E,x){return this instanceof C?(m.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function P(){var E=this;ce(E.path,E.flags,E.mode,function(x,w){x?(E.destroy(),E.emit("error",x)):(E.fd=w,E.emit("open",w))})}function I(E,x){return new t.ReadStream(E,x)}function G(E,x){return new t.WriteStream(E,x)}var se=t.open;t.open=ce;function ce(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return se(R,S,O,function(B,Ws){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Te([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}return t}function Te(t){Ae("ENQUEUE",t[0].name,t[1]),H[K].push(t),Lr()}var pt;function nn(){for(var t=Date.now(),e=0;e<H[K].length;++e)H[K][e].length>2&&(H[K][e][3]=t,H[K][e][4]=t);Lr()}function Lr(){if(clearTimeout(pt),pt=void 0,H[K].length!==0){var t=H[K].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Ae("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Ae("TIMEOUT",e.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-s,1),l=Math.min(c*1.2,100);a>=l?(Ae("RETRY",e.name,r),e.apply(null,r.concat([s]))):H[K].push(t)}pt===void 0&&(pt=setTimeout(Lr,0))}}const un=v.getDefaultExportFromCjs(ku),Fe=zt.homedir(),{env:Pe}=process,sn=Pe.XDG_DATA_HOME||(Fe?V.join(Fe,".local","share"):void 0),Lt=Pe.XDG_CONFIG_HOME||(Fe?V.join(Fe,".config"):void 0);Pe.XDG_STATE_HOME||Fe&&V.join(Fe,".local","state");Pe.XDG_CACHE_HOME||Fe&&V.join(Fe,".cache");Pe.XDG_RUNTIME_DIR;const pi=(Pe.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");sn&&pi.unshift(sn);const mi=(Pe.XDG_CONFIG_DIRS||"/etc/xdg").split(":");Lt&&mi.unshift(Lt);var Dt={exports:{}},Ne={exports:{}},ur={exports:{}},on;function yi(){return on||(on=1,function(t){t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(ur)),ur.exports}var N=v.commonjsGlobal.process;const Ee=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};if(!Ee(N))Ne.exports=function(){return function(){}};else{var Fi=Gt,We=yi(),gi=/^win/i.test(N.platform),mt=ct;typeof mt!="function"&&(mt=mt.EventEmitter);var J;N.__signal_exit_emitter__?J=N.__signal_exit_emitter__:(J=N.__signal_exit_emitter__=new mt,J.count=0,J.emitted={}),J.infinite||(J.setMaxListeners(1/0),J.infinite=!0),Ne.exports=function(t,e){if(!Ee(v.commonjsGlobal.process))return function(){};Fi.equal(typeof t,"function","a callback must be provided for exit handler"),Ve===!1&&an();var r="exit";e&&e.alwaysLast&&(r="afterexit");var n=function(){J.removeListener(r,t),J.listeners("exit").length===0&&J.listeners("afterexit").length===0&&sr()};return J.on(r,t),n};var sr=function(){!Ve||!Ee(v.commonjsGlobal.process)||(Ve=!1,We.forEach(function(e){try{N.removeListener(e,ir[e])}catch{}}),N.emit=or,N.reallyExit=cn,J.count-=1)};Ne.exports.unload=sr;var ke=function(e,r,n){J.emitted[e]||(J.emitted[e]=!0,J.emit(e,r,n))},ir={};We.forEach(function(t){ir[t]=function(){if(Ee(v.commonjsGlobal.process)){var r=N.listeners(t);r.length===J.count&&(sr(),ke("exit",null,t),ke("afterexit",null,t),gi&&t==="SIGHUP"&&(t="SIGINT"),N.kill(N.pid,t))}}}),Ne.exports.signals=function(){return We};var Ve=!1,an=function(){Ve||!Ee(v.commonjsGlobal.process)||(Ve=!0,J.count+=1,We=We.filter(function(e){try{return N.on(e,ir[e]),!0}catch{return!1}}),N.emit=Ci,N.reallyExit=Ei)};Ne.exports.load=an;var cn=N.reallyExit,Ei=function(e){Ee(v.commonjsGlobal.process)&&(N.exitCode=e||0,ke("exit",N.exitCode,null),ke("afterexit",N.exitCode,null),cn.call(N,N.exitCode))},or=N.emit,Ci=function(e,r){if(e==="exit"&&Ee(v.commonjsGlobal.process)){r!==void 0&&(N.exitCode=r);var n=or.apply(this,arguments);return ke("exit",N.exitCode,null),ke("afterexit",N.exitCode,null),n}else return or.apply(this,arguments)}}var bi=Ne.exports,$u=Ir;Ir.strict=ju;Ir.loose=Lu;var wi=Object.prototype.toString,_i={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function Ir(t){return ju(t)||Lu(t)}function ju(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function Lu(t){return _i[wi.call(t)]}var xi=$u.strict,Ai=function(e){if(xi(e)){var r=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(r=r.slice(e.byteOffset,e.byteOffset+e.byteLength)),r}else return Buffer.from(e)};Dt.exports=Ti;Dt.exports.sync=ki;Dt.exports._getTmpname=Nr;Dt.exports._cleanupOnExit=qr;const U=ge,Bi=v.imurmurhashExports,Iu=bi,Si=V,Nu=$u,qu=Ai,{promisify:ie}=Me,ye={},vi=function(){try{return require("worker_threads").threadId}catch{return 0}}();let Oi=0;function Nr(t){return t+"."+Bi(__filename).hash(String(process.pid)).hash(String(vi)).hash(String(++Oi)).result()}function qr(t){return()=>{try{U.unlinkSync(typeof t=="function"?t():t)}catch{}}}function Pi(t){return new Promise(e=>{ye[t]||(ye[t]=[]),ye[t].push(e),ye[t].length===1&&e()})}function It(t){return t.code==="ENOSYS"||(!process.getuid||process.getuid()!==0)&&(t.code==="EINVAL"||t.code==="EPERM")}async function Ri(t,e,r={}){typeof r=="string"&&(r={encoding:r});let n,s;const i=Iu(qr(()=>s)),u=Si.resolve(t);try{await Pi(u);const a=await ie(U.realpath)(t).catch(()=>t);if(s=Nr(a),!r.mode||!r.chown){const c=await ie(U.stat)(a).catch(()=>{});c&&(r.mode==null&&(r.mode=c.mode),r.chown==null&&process.getuid&&(r.chown={uid:c.uid,gid:c.gid}))}n=await ie(U.open)(s,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(s),Nu(e)&&(e=qu(e)),Buffer.isBuffer(e)?await ie(U.write)(n,e,0,e.length,0):e!=null&&await ie(U.write)(n,String(e),0,String(r.encoding||"utf8")),r.fsync!==!1&&await ie(U.fsync)(n),await ie(U.close)(n),n=null,r.chown&&await ie(U.chown)(s,r.chown.uid,r.chown.gid).catch(c=>{if(!It(c))throw c}),r.mode&&await ie(U.chmod)(s,r.mode).catch(c=>{if(!It(c))throw c}),await ie(U.rename)(s,a)}finally{n&&await ie(U.close)(n).catch(()=>{}),i(),await ie(U.unlink)(s).catch(()=>{}),ye[u].shift(),ye[u].length>0?ye[u][0]():delete ye[u]}}function Ti(t,e,r,n){r instanceof Function&&(n=r,r={});const s=Ri(t,e,r);return n&&s.then(n,n),s}function ki(t,e,r){typeof r=="string"?r={encoding:r}:r||(r={});try{t=U.realpathSync(t)}catch{}const n=Nr(t);if(!r.mode||!r.chown)try{const c=U.statSync(t);r=Object.assign({},r),r.mode||(r.mode=c.mode),!r.chown&&process.getuid&&(r.chown={uid:c.uid,gid:c.gid})}catch{}let s;const i=qr(n),u=Iu(i);let a=!0;try{if(s=U.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),Nu(e)&&(e=qu(e)),Buffer.isBuffer(e)?U.writeSync(s,e,0,e.length,0):e!=null&&U.writeSync(s,String(e),0,String(r.encoding||"utf8")),r.fsync!==!1&&U.fsyncSync(s),U.closeSync(s),s=null,r.chown)try{U.chownSync(n,r.chown.uid,r.chown.gid)}catch(c){if(!It(c))throw c}if(r.mode)try{U.chmodSync(n,r.mode)}catch(c){if(!It(c))throw c}U.renameSync(n,t),a=!1}finally{if(s)try{U.closeSync(s)}catch{}u(),a&&i()}}var $i=Dt.exports;const Dn=v.getDefaultExportFromCjs($i);var ji=t=>{const e=typeof t;return t!==null&&(e==="object"||e==="function")};const Ce=ji,Li=new Set(["__proto__","prototype","constructor"]),Ii=t=>!t.some(e=>Li.has(e));function yt(t){const e=t.split("."),r=[];for(let n=0;n<e.length;n++){let s=e[n];for(;s[s.length-1]==="\\"&&e[n+1]!==void 0;)s=s.slice(0,-1)+".",s+=e[++n];r.push(s)}return Ii(r)?r:[]}var Ni={get(t,e,r){if(!Ce(t)||typeof e!="string")return r===void 0?t:r;const n=yt(e);if(n.length!==0){for(let s=0;s<n.length;s++)if(t=t[n[s]],t==null){if(s!==n.length-1)return r;break}return t===void 0?r:t}},set(t,e,r){if(!Ce(t)||typeof e!="string")return t;const n=t,s=yt(e);for(let i=0;i<s.length;i++){const u=s[i];Ce(t[u])||(t[u]={}),i===s.length-1&&(t[u]=r),t=t[u]}return n},delete(t,e){if(!Ce(t)||typeof e!="string")return!1;const r=yt(e);for(let n=0;n<r.length;n++){const s=r[n];if(n===r.length-1)return delete t[s],!0;if(t=t[s],!Ce(t))return!1}},has(t,e){if(!Ce(t)||typeof e!="string")return!1;const r=yt(e);if(r.length===0)return!1;for(let n=0;n<r.length;n++)if(Ce(t)){if(!(r[n]in t))return!1;t=t[r[n]]}else return!1;return!0}};const Je=v.getDefaultExportFromCjs(Ni),Uu=Me.promisify(Tr.randomBytes),qi="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),Ui="0123456789".split(""),Hi="CDEHKMPRTUWXY012458".split(""),Mi="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),zi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Gi=(t,e)=>{const r=e.length,n=Math.floor(65536/r)*r-1,s=2*Math.ceil(1.1*t);let i="",u=0;for(;u<t;){const a=Tr.randomBytes(s);let c=0;for(;c<s&&u<t;){const l=a.readUInt16LE(c);c+=2,!(l>n)&&(i+=e[l%r],u++)}}return i},Wi=async(t,e)=>{const r=e.length,n=Math.floor(65536/r)*r-1,s=2*Math.ceil(1.1*t);let i="",u=0;for(;u<t;){const a=await Uu(s);let c=0;for(;c<s&&u<t;){const l=a.readUInt16LE(c);c+=2,!(l>n)&&(i+=e[l%r],u++)}}return i},Vi=(t,e,r)=>Tr.randomBytes(t).toString(e).slice(0,r),Ji=async(t,e,r)=>(await Uu(t)).toString(e).slice(0,r),Yi=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),Hu=(t,e)=>({length:r,type:n,characters:s})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(n!==void 0&&s!==void 0)throw new TypeError("Expected either `type` or `characters`");if(s!==void 0&&typeof s!="string")throw new TypeError("Expected `characters` to be string");if(!Yi.has(n))throw new TypeError(`Unknown type: ${n}`);if(n===void 0&&s===void 0&&(n="hex"),n==="hex"||n===void 0&&s===void 0)return e(Math.ceil(r*.5),"hex",r);if(n==="base64")return e(Math.ceil(r*.75),"base64",r);if(n==="url-safe")return t(r,qi);if(n==="numeric")return t(r,Ui);if(n==="distinguishable")return t(r,Hi);if(n==="ascii-printable")return t(r,Mi);if(n==="alphanumeric")return t(r,zi);if(s.length===0)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(s.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return t(r,s.split(""))},Mu=Hu(Gi,Vi);Mu.async=Hu(Wi,Ji);function Ki(){return Mu({length:32})}const Qi=Lt||V.join(zt.tmpdir(),Ki()),ln="You don't have access to this file.",Xi={mode:448,recursive:!0},fn={mode:384};class Zi{constructor(e,r,n={}){const s=n.globalConfigPath?V.join(e,"config.json"):V.join("configstore",`${e}.json`);this._path=n.configPath||V.join(Qi,s),r&&(this.all={...r,...this.all})}get all(){try{return JSON.parse(un.readFileSync(this._path,"utf8"))}catch(e){if(e.code==="ENOENT")return{};if(e.code==="EACCES"&&(e.message=`${e.message}
3
+ ${ln}
4
+ `),e.name==="SyntaxError")return Dn.sync(this._path,"",fn),{};throw e}}set all(e){try{un.mkdirSync(V.dirname(this._path),Xi),Dn.sync(this._path,JSON.stringify(e,void 0," "),fn)}catch(r){throw r.code==="EACCES"&&(r.message=`${r.message}
5
+ ${ln}
6
+ `),r}}get size(){return Object.keys(this.all||{}).length}get(e){return Je.get(this.all,e)}set(e,r){const n=this.all;if(arguments.length===1)for(const s of Object.keys(e))Je.set(n,s,e[s]);else Je.set(n,e,r);this.all=n}has(e){return Je.has(this.all,e)}delete(e){const r=this.all;Je.delete(r,e),this.all=r}clear(){this.all={}}get path(){return this._path}}function eo(t,e){if(t=v.semver.parse(t),e=v.semver.parse(e),!(v.semver.compareBuild(t,e)>=0))return v.semver.diff(t,e)||"build"}const zu=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function to(t){return zu.includes(t)}const ro=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...zu];function no(t){return ro.includes(t)}const uo=["null","undefined","string","number","bigint","boolean","symbol"];function so(t){return uo.includes(t)}function ze(t){return e=>typeof e===t}const{toString:io}=Object.prototype,lt=t=>{const e=io.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&o.domElement(t))return"HTMLElement";if(no(e))return e},j=t=>e=>lt(e)===t;function o(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(o.observable(t))return"Observable";if(o.array(t))return"Array";if(o.buffer(t))return"Buffer";const e=lt(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"}o.undefined=ze("undefined");o.string=ze("string");const oo=ze("number");o.number=t=>oo(t)&&!o.nan(t);o.positiveNumber=t=>o.number(t)&&t>0;o.negativeNumber=t=>o.number(t)&&t<0;o.bigint=ze("bigint");o.function_=ze("function");o.null_=t=>t===null;o.class_=t=>o.function_(t)&&t.toString().startsWith("class ");o.boolean=t=>t===!0||t===!1;o.symbol=ze("symbol");o.numericString=t=>o.string(t)&&!o.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));o.array=(t,e)=>Array.isArray(t)?o.function_(e)?t.every(r=>e(r)):!0:!1;o.buffer=t=>t?.constructor?.isBuffer?.(t)??!1;o.blob=t=>j("Blob")(t);o.nullOrUndefined=t=>o.null_(t)||o.undefined(t);o.object=t=>!o.null_(t)&&(typeof t=="object"||o.function_(t));o.iterable=t=>o.function_(t?.[Symbol.iterator]);o.asyncIterable=t=>o.function_(t?.[Symbol.asyncIterator]);o.generator=t=>o.iterable(t)&&o.function_(t?.next)&&o.function_(t?.throw);o.asyncGenerator=t=>o.asyncIterable(t)&&o.function_(t.next)&&o.function_(t.throw);o.nativePromise=t=>j("Promise")(t);const ao=t=>o.function_(t?.then)&&o.function_(t?.catch);o.promise=t=>o.nativePromise(t)||ao(t);o.generatorFunction=j("GeneratorFunction");o.asyncGeneratorFunction=t=>lt(t)==="AsyncGeneratorFunction";o.asyncFunction=t=>lt(t)==="AsyncFunction";o.boundFunction=t=>o.function_(t)&&!t.hasOwnProperty("prototype");o.regExp=j("RegExp");o.date=j("Date");o.error=j("Error");o.map=t=>j("Map")(t);o.set=t=>j("Set")(t);o.weakMap=t=>j("WeakMap")(t);o.weakSet=t=>j("WeakSet")(t);o.weakRef=t=>j("WeakRef")(t);o.int8Array=j("Int8Array");o.uint8Array=j("Uint8Array");o.uint8ClampedArray=j("Uint8ClampedArray");o.int16Array=j("Int16Array");o.uint16Array=j("Uint16Array");o.int32Array=j("Int32Array");o.uint32Array=j("Uint32Array");o.float32Array=j("Float32Array");o.float64Array=j("Float64Array");o.bigInt64Array=j("BigInt64Array");o.bigUint64Array=j("BigUint64Array");o.arrayBuffer=j("ArrayBuffer");o.sharedArrayBuffer=j("SharedArrayBuffer");o.dataView=j("DataView");o.enumCase=(t,e)=>Object.values(e).includes(t);o.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;o.urlInstance=t=>j("URL")(t);o.urlString=t=>{if(!o.string(t))return!1;try{return new URL(t),!0}catch{return!1}};o.truthy=t=>!!t;o.falsy=t=>!t;o.nan=t=>Number.isNaN(t);o.primitive=t=>o.null_(t)||so(typeof t);o.integer=t=>Number.isInteger(t);o.safeInteger=t=>Number.isSafeInteger(t);o.plainObject=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};o.typedArray=t=>to(lt(t));const co=t=>o.safeInteger(t)&&t>=0;o.arrayLike=t=>!o.nullOrUndefined(t)&&!o.function_(t)&&co(t.length);o.tupleLike=(t,e)=>o.array(e)&&o.array(t)&&e.length===t.length?e.every((r,n)=>r(t[n])):!1;o.inRange=(t,e)=>{if(o.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(o.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};const Do=1,lo=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=t=>o.object(t)&&t.nodeType===Do&&o.string(t.nodeName)&&!o.plainObject(t)&&lo.every(e=>e in t);o.observable=t=>t?t===t[Symbol.observable]?.()||t===t["@@observable"]?.():!1;o.nodeStream=t=>o.object(t)&&o.function_(t.pipe)&&!o.observable(t);o.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;const Gu=t=>e=>o.integer(e)&&Math.abs(e%2)===t;o.evenInteger=Gu(0);o.oddInteger=Gu(1);o.emptyArray=t=>o.array(t)&&t.length===0;o.nonEmptyArray=t=>o.array(t)&&t.length>0;o.emptyString=t=>o.string(t)&&t.length===0;const fo=t=>o.string(t)&&!/\S/.test(t);o.emptyStringOrWhitespace=t=>o.emptyString(t)||fo(t);o.nonEmptyString=t=>o.string(t)&&t.length>0;o.nonEmptyStringAndNotWhitespace=t=>o.string(t)&&!o.emptyStringOrWhitespace(t);o.emptyObject=t=>o.object(t)&&!o.map(t)&&!o.set(t)&&Object.keys(t).length===0;o.nonEmptyObject=t=>o.object(t)&&!o.map(t)&&!o.set(t)&&Object.keys(t).length>0;o.emptySet=t=>o.set(t)&&t.size===0;o.nonEmptySet=t=>o.set(t)&&t.size>0;o.emptyMap=t=>o.map(t)&&t.size===0;o.nonEmptyMap=t=>o.map(t)&&t.size>0;o.propertyKey=t=>o.any([o.string,o.number,o.symbol],t);o.formData=t=>j("FormData")(t);o.urlSearchParams=t=>j("URLSearchParams")(t);const Wu=(t,e,r)=>{if(!o.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};o.any=(t,...e)=>(o.array(t)?t:[t]).some(n=>Wu(Array.prototype.some,n,e));o.all=(t,...e)=>Wu(Array.prototype.every,t,e);const b=(t,e,r,n={})=>{if(!t){const{multipleValues:s}=n,i=s?`received values of types ${[...new Set(r.map(u=>`\`${o(u)}\``))].join(", ")}`:`received value of type \`${o(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${i}.`)}},g={undefined:t=>b(o.undefined(t),"undefined",t),string:t=>b(o.string(t),"string",t),number:t=>b(o.number(t),"number",t),positiveNumber:t=>b(o.positiveNumber(t),"positive number",t),negativeNumber:t=>b(o.negativeNumber(t),"negative number",t),bigint:t=>b(o.bigint(t),"bigint",t),function_:t=>b(o.function_(t),"Function",t),null_:t=>b(o.null_(t),"null",t),class_:t=>b(o.class_(t),"Class",t),boolean:t=>b(o.boolean(t),"boolean",t),symbol:t=>b(o.symbol(t),"symbol",t),numericString:t=>b(o.numericString(t),"string with a number",t),array:(t,e)=>{b(o.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>b(o.buffer(t),"Buffer",t),blob:t=>b(o.blob(t),"Blob",t),nullOrUndefined:t=>b(o.nullOrUndefined(t),"null or undefined",t),object:t=>b(o.object(t),"Object",t),iterable:t=>b(o.iterable(t),"Iterable",t),asyncIterable:t=>b(o.asyncIterable(t),"AsyncIterable",t),generator:t=>b(o.generator(t),"Generator",t),asyncGenerator:t=>b(o.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>b(o.nativePromise(t),"native Promise",t),promise:t=>b(o.promise(t),"Promise",t),generatorFunction:t=>b(o.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>b(o.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>b(o.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>b(o.boundFunction(t),"Function",t),regExp:t=>b(o.regExp(t),"RegExp",t),date:t=>b(o.date(t),"Date",t),error:t=>b(o.error(t),"Error",t),map:t=>b(o.map(t),"Map",t),set:t=>b(o.set(t),"Set",t),weakMap:t=>b(o.weakMap(t),"WeakMap",t),weakSet:t=>b(o.weakSet(t),"WeakSet",t),weakRef:t=>b(o.weakRef(t),"WeakRef",t),int8Array:t=>b(o.int8Array(t),"Int8Array",t),uint8Array:t=>b(o.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>b(o.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>b(o.int16Array(t),"Int16Array",t),uint16Array:t=>b(o.uint16Array(t),"Uint16Array",t),int32Array:t=>b(o.int32Array(t),"Int32Array",t),uint32Array:t=>b(o.uint32Array(t),"Uint32Array",t),float32Array:t=>b(o.float32Array(t),"Float32Array",t),float64Array:t=>b(o.float64Array(t),"Float64Array",t),bigInt64Array:t=>b(o.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>b(o.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>b(o.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>b(o.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>b(o.dataView(t),"DataView",t),enumCase:(t,e)=>b(o.enumCase(t,e),"EnumCase",t),urlInstance:t=>b(o.urlInstance(t),"URL",t),urlString:t=>b(o.urlString(t),"string with a URL",t),truthy:t=>b(o.truthy(t),"truthy",t),falsy:t=>b(o.falsy(t),"falsy",t),nan:t=>b(o.nan(t),"NaN",t),primitive:t=>b(o.primitive(t),"primitive",t),integer:t=>b(o.integer(t),"integer",t),safeInteger:t=>b(o.safeInteger(t),"integer",t),plainObject:t=>b(o.plainObject(t),"plain object",t),typedArray:t=>b(o.typedArray(t),"TypedArray",t),arrayLike:t=>b(o.arrayLike(t),"array-like",t),tupleLike:(t,e)=>b(o.tupleLike(t,e),"tuple-like",t),domElement:t=>b(o.domElement(t),"HTMLElement",t),observable:t=>b(o.observable(t),"Observable",t),nodeStream:t=>b(o.nodeStream(t),"Node.js Stream",t),infinite:t=>b(o.infinite(t),"infinite number",t),emptyArray:t=>b(o.emptyArray(t),"empty array",t),nonEmptyArray:t=>b(o.nonEmptyArray(t),"non-empty array",t),emptyString:t=>b(o.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>b(o.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>b(o.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>b(o.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>b(o.emptyObject(t),"empty object",t),nonEmptyObject:t=>b(o.nonEmptyObject(t),"non-empty object",t),emptySet:t=>b(o.emptySet(t),"empty set",t),nonEmptySet:t=>b(o.nonEmptySet(t),"non-empty set",t),emptyMap:t=>b(o.emptyMap(t),"empty map",t),nonEmptyMap:t=>b(o.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>b(o.propertyKey(t),"PropertyKey",t),formData:t=>b(o.formData(t),"FormData",t),urlSearchParams:t=>b(o.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>b(o.evenInteger(t),"even integer",t),oddInteger:t=>b(o.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>b(o.directInstanceOf(t,e),"T",t),inRange:(t,e)=>b(o.inRange(t,e),"in range",t),any:(t,...e)=>b(o.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>b(o.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}});Object.defineProperties(g,{class:{value:g.class_},function:{value:g.function_},null:{value:g.null_}});let ho=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}};class Yt{static fn(e){return(...r)=>new Yt((n,s,i)=>{r.push(i),e(...r).then(n,s)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;const s=a=>{(!this._isCanceled||!u.shouldReject)&&(this._isPending=!1,r(a))},i=a=>{this._isPending=!1,n(a)},u=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};Object.defineProperties(u,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(s,i,u)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new ho(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(Yt.prototype,Promise.prototype);function po(t){return o.object(t)&&"_onResponse"in t}let W=class extends Error{constructor(e,r,n){if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,po(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,o.string(r.stack)&&o.string(this.stack)){const s=this.stack.indexOf(this.message)+this.message.length,i=this.stack.slice(s).split(`
7
+ `).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
8
+ `).reverse();for(;u.length>0&&u[0]===i[0];)i.shift();this.stack=`${this.stack.slice(0,s)}${i.reverse().join(`
9
+ `)}${u.reverse().join(`
10
+ `)}`}}};class mo extends W{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}class Nt extends W{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}let yo=class extends W{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};class hn extends W{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}let Fo=class extends W{constructor(e,r,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=r}};class dn extends W{constructor(e,r){super(e.message,e,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}class go extends W{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}}class Eo extends W{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}var Sr={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(s){return s.encrypted}const n=(s,i)=>{let u;typeof i=="function"?u={connect:i}:u=i;const a=typeof u.connect=="function",c=typeof u.secureConnect=="function",l=typeof u.close=="function",D=()=>{a&&u.connect(),r(s)&&c&&(s.authorized?u.secureConnect():s.authorizationError||s.once("secureConnect",u.secureConnect)),l&&s.once("close",u.close)};s.writable&&!s.connecting?D():s.connecting?s.once("connect",D):s.destroyed&&l&&u.close(s._hadError)};e.default=n,t.exports=n,t.exports.default=n})(Sr,Sr.exports);var Co=Sr.exports;const bo=v.getDefaultExportFromCjs(Co),wo=t=>{if(t.timings)return t.timings;const e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;const r=u=>{u.once(ct.errorMonitor,()=>{e.error=Date.now(),e.phases.total=e.error-e.start})};r(t);const n=()=>{e.abort=Date.now(),e.phases.total=e.abort-e.start};t.prependOnceListener("abort",n);const s=u=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,Me.types.isProxy(u))return;const a=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};u.prependOnceListener("lookup",a),bo(u,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(u.removeListener("lookup",a),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener("socket",s);const i=()=>{e.upload=Date.now(),e.phases.request=e.upload-(e.secureConnect??e.connect)};return t.writableFinished?i():t.prependOnceListener("finish",i),t.prependOnceListener("response",u=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,u.timings=e,r(u),u.prependOnceListener("end",()=>{t.off("abort",n),u.off("aborted",n),!e.phases.total&&(e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start)}),u.prependOnceListener("aborted",n)}),e},_o="text/plain",xo="us-ascii",ar=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Ao=new Set(["https:","http:","file:"]),Bo=t=>{try{const{protocol:e}=new URL(t);return e.endsWith(":")&&!Ao.has(e)}catch{return!1}},So=(t,{stripHash:e})=>{const r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:s,hash:i}=r.groups;const u=n.split(";");i=e?"":i;let a=!1;u[u.length-1]==="base64"&&(u.pop(),a=!0);const c=u.shift()?.toLowerCase()??"",D=[...u.map(d=>{let[h,p=""]=d.split("=").map(m=>m.trim());return h==="charset"&&(p=p.toLowerCase(),p===xo)?"":`${h}${p?`=${p}`:""}`}).filter(Boolean)];return a&&D.push("base64"),(D.length>0||c&&c!==_o)&&D.unshift(c),`data:${D.join(";")},${a?s.trim():s}${i?`#${i}`:""}`};function vo(t,e){if(e={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...e},typeof e.defaultProtocol=="string"&&!e.defaultProtocol.endsWith(":")&&(e.defaultProtocol=`${e.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return So(t,e);if(Bo(t))return t;const r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));const s=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&s.protocol==="https:"&&(s.protocol="http:"),e.forceHttps&&s.protocol==="http:"&&(s.protocol="https:"),e.stripAuthentication&&(s.username="",s.password=""),e.stripHash?s.hash="":e.stripTextFragment&&(s.hash=s.hash.replace(/#?:~:text.*?$/i,"")),s.pathname){const u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let a=0,c="";for(;;){const D=u.exec(s.pathname);if(!D)break;const d=D[0],h=D.index,p=s.pathname.slice(a,h);c+=p.replace(/\/{2,}/g,"/"),c+=d,a=h+d.length}const l=s.pathname.slice(a,s.pathname.length);c+=l.replace(/\/{2,}/g,"/"),s.pathname=c}if(s.pathname)try{s.pathname=decodeURI(s.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let u=s.pathname.split("/");const a=u[u.length-1];ar(a,e.removeDirectoryIndex)&&(u=u.slice(0,-1),s.pathname=u.slice(1).join("/")+"/")}if(s.hostname&&(s.hostname=s.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(s.hostname)&&(s.hostname=s.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(const u of[...s.searchParams.keys()])ar(u,e.removeQueryParameters)&&s.searchParams.delete(u);if(!Array.isArray(e.keepQueryParameters)&&e.removeQueryParameters===!0&&(s.search=""),Array.isArray(e.keepQueryParameters)&&e.keepQueryParameters.length>0)for(const u of[...s.searchParams.keys()])ar(u,e.keepQueryParameters)||s.searchParams.delete(u);if(e.sortQueryParameters){s.searchParams.sort();try{s.search=decodeURIComponent(s.search)}catch{}}e.removeTrailingSlash&&(s.pathname=s.pathname.replace(/\/$/,"")),e.removeExplicitPort&&s.port&&(s.port="");const i=t;return t=s.toString(),!e.removeSingleSlash&&s.pathname==="/"&&!i.endsWith("/")&&s.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||s.pathname==="/")&&s.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var ft={exports:{}};const{PassThrough:Oo}=le;var Po=t=>{t={...t};const{array:e}=t;let{encoding:r}=t;const n=r==="buffer";let s=!1;e?s=!(r||n):r=r||"utf8",n&&(r=null);const i=new Oo({objectMode:s});r&&i.setEncoding(r);let u=0;const a=[];return i.on("data",c=>{a.push(c),s?u=a.length:u+=c.length}),i.getBufferedValue=()=>e?a:n?Buffer.concat(a,u):a.join(""),i.getBufferedLength=()=>u,i};const{constants:Ro}=Ys,To=le,{promisify:ko}=Me,$o=Po,jo=ko(To.pipeline);class Vu extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function Ur(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};const{maxBuffer:r}=e,n=$o(e);return await new Promise((s,i)=>{const u=a=>{a&&n.getBufferedLength()<=Ro.MAX_LENGTH&&(a.bufferedData=n.getBufferedValue()),i(a)};(async()=>{try{await jo(t,n),s()}catch(a){u(a)}})(),n.on("data",()=>{n.getBufferedLength()>r&&u(new Vu)})}),n.getBufferedValue()}ft.exports=Ur;ft.exports.buffer=(t,e)=>Ur(t,{...e,encoding:"buffer"});ft.exports.array=(t,e)=>Ur(t,{...e,array:!0});ft.exports.MaxBufferError=Vu;var Lo=ft.exports;const Ju=v.getDefaultExportFromCjs(Lo);function vr(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLowerCase(),r]))}class pn extends Wt.Readable{statusCode;headers;body;url;constructor({statusCode:e,headers:r,body:n,url:s}){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if(typeof s!="string")throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=vr(r),this.body=n,this.url=s}}var Hr={};Hr.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var s=!0;for(var i in e){var u=typeof e[i]=="function"||!n&&typeof e[i]>"u";Object.hasOwnProperty.call(e,i)&&!u&&(s||(r+=","),s=!1,n?e[i]==null?r+="null":r+=t(e[i]):e[i]!==void 0&&(r+=t(i)+":"+t(e[i])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};Hr.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};const Io=ct,mn=Hr,No=t=>{const e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){const r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(v.commonjsRequire(e[r]))(t)}return new Map},yn=["sqlite","postgres","mysql","mongo","redis","tiered"];class qo extends Io{constructor(e,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:mn.stringify,deserialize:mn.parse,...typeof e=="string"?{uri:e}:e,...n},!this.opts.store){const i={...this.opts};this.opts.store=No(i)}if(this.opts.compression){const i=this.opts.compression;this.opts.serialize=i.serialize.bind(i),this.opts.deserialize=i.deserialize.bind(i)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace;const s=i=>async function*(){for await(const[u,a]of typeof i=="function"?i(this.opts.store.namespace):i){const c=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!u.includes(this.opts.store.namespace))){if(typeof c.expires=="number"&&Date.now()>c.expires){this.delete(u);continue}yield[this._getKeyUnprefix(u),c.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return yn.includes(this.opts.store.opts.dialect)||yn.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){const{store:n}=this.opts,s=Array.isArray(e),i=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&n.getMany===void 0){const u=[];for(const a of i)u.push(Promise.resolve().then(()=>n.get(a)).then(c=>typeof c=="string"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return typeof c.expires=="number"&&Date.now()>c.expires?this.delete(a).then(()=>{}):r&&r.raw?c:c.value}));return Promise.allSettled(u).then(a=>{const c=[];for(const l of a)c.push(l.value);return c})}return Promise.resolve().then(()=>s?n.getMany(i):n.get(i)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null){if(s){const a=[];for(let c of u){if(typeof c=="string"&&(c=this.opts.deserialize(c)),c==null){a.push(void 0);continue}typeof c.expires=="number"&&Date.now()>c.expires?(this.delete(e).then(()=>{}),a.push(void 0)):a.push(r&&r.raw?c:c.value)}return a}return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(e).then(()=>{}):r&&r.raw?u:u.value}})}set(e,r,n){const s=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);const{store:i}=this.opts;return Promise.resolve().then(()=>{const u=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:u},this.opts.serialize(r)}).then(u=>i.set(s,u,n)).then(()=>!0)}delete(e){const{store:r}=this.opts;if(Array.isArray(e)){const s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){const i=[];for(const u of s)i.push(r.delete(u));return Promise.allSettled(i).then(u=>u.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}const n=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(n))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){const r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(r):await n.get(r)!==void 0)}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}}var Uo=qo;const Ft=v.getDefaultExportFromCjs(Uo),Ho=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];function Mo(t,e){if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set([...Object.keys(t),...Ho]),n={};for(const s of r)s in e||(n[s]={get(){const i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}class zo extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class ut extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Go{constructor(e,r){this.hooks=new Map,this.request=()=>(n,s)=>{let i;if(typeof n=="string")i=cr(re.parse(n)),n={};else if(n instanceof re.URL)i=cr(re.parse(n.toString())),n={};else{const[h,...p]=(n.path??"").split("?"),m=p.length>0?`?${p.join("?")}`:"";i=cr({...n,pathname:h,search:m})}n={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...n,...Jo(i)},n.headers=Object.fromEntries(Wo(n.headers).map(([h,p])=>[h.toLowerCase(),p]));const u=new Pu,a=vo(re.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1});let c=`${n.method}:${a}`;n.body&&n.method!==void 0&&["POST","PATCH","PUT"].includes(n.method)&&(n.body instanceof Wt.Readable?n.cache=!1:c+=`:${Js.createHash("md5").update(n.body).digest("hex")}`);let l=!1,D=!1;const d=h=>{D=!0;let p=!1,m=()=>{};const f=new Promise(y=>{m=()=>{p||(p=!0,y())}}),F=async y=>{if(l){y.status=y.statusCode;const C=v.CachePolicy.fromObject(l.cachePolicy).revalidatedPolicy(h,y);if(!C.modified){y.resume(),await new Promise(I=>{y.once("end",I)});const P=Fn(C.policy.responseHeaders());y=new pn({statusCode:l.statusCode,headers:P,body:l.body,url:l.url}),y.cachePolicy=C.policy,y.fromCache=!0}}y.fromCache||(y.cachePolicy=new v.CachePolicy(h,y,h),y.fromCache=!1);let _;h.cache&&y.cachePolicy.storable()?(_=Vo(y),(async()=>{try{const C=Ju.buffer(y);await Promise.race([f,new Promise(se=>y.once("end",se)),new Promise(se=>y.once("close",se))]);const P=await C;let I={url:y.url,statusCode:y.fromCache?l.statusCode:y.statusCode,body:P,cachePolicy:y.cachePolicy.toObject()},G=h.strictTtl?y.cachePolicy.timeToLive():void 0;if(h.maxTtl&&(G=G?Math.min(G,h.maxTtl):h.maxTtl),this.hooks.size>0)for(const se of this.hooks.keys())I=await this.runHook(se,I,y);await this.cache.set(c,I,G)}catch(C){u.emit("error",new ut(C))}})()):h.cache&&l&&(async()=>{try{await this.cache.delete(c)}catch(C){u.emit("error",new ut(C))}})(),u.emit("response",_??y),typeof s=="function"&&s(_??y)};try{const y=this.cacheRequest(h,F);y.once("error",m),y.once("abort",m),y.once("destroy",m),u.emit("request",y)}catch(y){u.emit("error",new zo(y))}};return(async()=>{const h=async m=>{await Promise.resolve();const f=m.cache?await this.cache.get(c):void 0;if(f===void 0&&!m.forceRefresh){d(m);return}const F=v.CachePolicy.fromObject(f.cachePolicy);if(F.satisfiesWithoutRevalidation(m)&&!m.forceRefresh){const y=Fn(F.responseHeaders()),_=new pn({statusCode:f.statusCode,headers:y,body:f.body,url:f.url});_.cachePolicy=F,_.fromCache=!0,u.emit("response",_),typeof s=="function"&&s(_)}else F.satisfiesWithoutRevalidation(m)&&Date.now()>=F.timeToLive()&&m.forceRefresh?(await this.cache.delete(c),m.headers=F.revalidationHeaders(m),d(m)):(l=f,m.headers=F.revalidationHeaders(m),d(m))},p=m=>u.emit("error",new ut(m));if(this.cache instanceof Ft){const m=this.cache;m.once("error",p),u.on("error",()=>m.removeListener("error",p)),u.on("response",()=>m.removeListener("error",p))}try{await h(n)}catch(m){n.automaticFailover&&!D&&d(n),u.emit("error",new ut(m))}})(),u},this.addHook=(n,s)=>{this.hooks.has(n)||this.hooks.set(n,s)},this.removeHook=n=>this.hooks.delete(n),this.getHook=n=>this.hooks.get(n),this.runHook=async(n,...s)=>this.hooks.get(n)?.(...s),r instanceof Ft?this.cache=r:typeof r=="string"?this.cache=new Ft({uri:r,namespace:"cacheable-request"}):this.cache=new Ft({store:r,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}}const Wo=Object.entries,Vo=t=>{const e=new Wt.PassThrough({autoDestroy:!1});return Mo(t,e),t.pipe(e)},Jo=t=>{const e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e},cr=t=>({protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}),Fn=t=>{const e=[];for(const r of Object.keys(t))e[r.toLowerCase()]=t[r];return e},Yo=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];var Ko=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(Yo)),n={};for(const s of r)s in e||(n[s]={get(){const i=t[s];return typeof i=="function"?i.bind(t):i},set(i){t[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e};const{Transform:Qo,PassThrough:Xo}=le,Dr=Ks,Zo=Ko;var ea=t=>{const e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;const r=e==="br";if(r&&typeof Dr.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0;const s=new Qo({transform(a,c,l){n=!1,l(null,a)},flush(a){a()}}),i=new Xo({autoDestroy:!1,destroy(a,c){t.destroy(),c(a)}}),u=r?Dr.createBrotliDecompress():Dr.createUnzip();return u.once("error",a=>{if(n&&!t.readable){i.end();return}i.destroy(a)}),Zo(t,i),t.pipe(s).pipe(u).pipe(i),i};const ta=v.getDefaultExportFromCjs(ea),De=t=>typeof t=="function",ra=t=>De(t[Symbol.asyncIterator]);async function*na(t){const e=t.getReader();for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}const ua=t=>{if(ra(t))return t;if(De(t.getReader))return na(t);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")},gn="abcdefghijklmnopqrstuvwxyz0123456789";function sa(){let t=16,e="";for(;t--;)e+=gn[Math.random()*gn.length<<0];return e}const En=t=>String(t).replace(/\r|\n/g,(e,r,n)=>e==="\r"&&n[r+1]!==`
11
+ `||e===`
12
+ `&&n[r-1]!=="\r"?`\r
13
+ `:e),ia=t=>Object.prototype.toString.call(t).slice(8,-1).toLowerCase();function Cn(t){if(ia(t)!=="object")return!1;const e=Object.getPrototypeOf(t);return e==null?!0:(e.constructor&&e.constructor.toString())===Object.toString()}function bn(t,e){if(typeof e=="string"){for(const[r,n]of Object.entries(t))if(e.toLowerCase()===r.toLowerCase())return n}}const oa=t=>new Proxy(t,{get:(e,r)=>bn(e,r),has:(e,r)=>bn(e,r)!==void 0}),Mr=t=>!!(t&&De(t.constructor)&&t[Symbol.toStringTag]==="FormData"&&De(t.append)&&De(t.getAll)&&De(t.entries)&&De(t[Symbol.iterator])),wn=t=>String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),be=t=>!!(t&&typeof t=="object"&&De(t.constructor)&&t[Symbol.toStringTag]==="File"&&De(t.stream)&&t.name!=null);var Ye=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},L=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ke,he,Qe,gt,Xe,we,Ze,et,Et,lr,_n;const aa={enableAdditionalHeaders:!1},Ct={writable:!1,configurable:!1};class ca{constructor(e,r,n){if(Ke.add(this),he.set(this,`\r
14
+ `),Qe.set(this,void 0),gt.set(this,void 0),Xe.set(this,"-".repeat(2)),we.set(this,new TextEncoder),Ze.set(this,void 0),et.set(this,void 0),Et.set(this,void 0),!Mr(e))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(Cn(r)?n=r:s=r,s||(s=sa()),typeof s!="string")throw new TypeError("Expected boundary argument to be a string.");if(n&&!Cn(n))throw new TypeError("Expected options argument to be an object.");Ye(this,et,Array.from(e.entries()),"f"),Ye(this,Et,{...aa,...n},"f"),Ye(this,Qe,L(this,we,"f").encode(L(this,he,"f")),"f"),Ye(this,gt,L(this,Qe,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Ye(this,Ze,L(this,we,"f").encode(`${L(this,Xe,"f")}${this.boundary}${L(this,Xe,"f")}${L(this,he,"f").repeat(2)}`),"f");const i={"Content-Type":this.contentType},u=L(this,Ke,"m",_n).call(this);u&&(this.contentLength=u,i["Content-Length"]=u),this.headers=oa(Object.freeze(i)),Object.defineProperties(this,{boundary:Ct,contentType:Ct,contentLength:Ct,headers:Ct})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(const[e,r]of L(this,et,"f")){const n=be(r)?r:L(this,we,"f").encode(En(r));yield L(this,Ke,"m",lr).call(this,e,n),yield n,yield L(this,Qe,"f")}yield L(this,Ze,"f")}async*encode(){for(const e of this.values())be(e)?yield*ua(e.stream()):yield e}[(he=new WeakMap,Qe=new WeakMap,gt=new WeakMap,Xe=new WeakMap,we=new WeakMap,Ze=new WeakMap,et=new WeakMap,Et=new WeakMap,Ke=new WeakSet,lr=function(r,n){let s="";s+=`${L(this,Xe,"f")}${this.boundary}${L(this,he,"f")}`,s+=`Content-Disposition: form-data; name="${wn(r)}"`,be(n)&&(s+=`; filename="${wn(n.name)}"${L(this,he,"f")}`,s+=`Content-Type: ${n.type||"application/octet-stream"}`);const i=be(n)?n.size:n.byteLength;return L(this,Et,"f").enableAdditionalHeaders===!0&&i!=null&&!isNaN(i)&&(s+=`${L(this,he,"f")}Content-Length: ${be(n)?n.size:n.byteLength}`),L(this,we,"f").encode(`${s}${L(this,he,"f").repeat(2)}`)},_n=function(){let r=0;for(const[n,s]of L(this,et,"f")){const i=be(s)?s:L(this,we,"f").encode(En(s)),u=be(i)?i.size:i.byteLength;if(u==null||isNaN(u))return;r+=L(this,Ke,"m",lr).call(this,n,i).byteLength,r+=u,r+=L(this,gt,"f")}return String(r+L(this,Ze,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}function Yu(t){return o.nodeStream(t)&&o.function_(t.getBoundary)}async function Da(t,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(o.string(t))return Pt.Buffer.byteLength(t);if(o.buffer(t))return t.length;if(Yu(t))return oe.promisify(t.getLength.bind(t))()}function Ku(t,e,r){const n={};for(const s of r){const i=(...u)=>{e.emit(s,...u)};n[s]=i,t.on(s,i)}return()=>{for(const[s,i]of Object.entries(n))t.off(s,i)}}function la(){const t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(const e of t){const{origin:r,event:n,fn:s}=e;r.removeListener(n,s)}t.length=0}}}const xn=Symbol("reentry"),fa=()=>{};class Qu extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}}function ha(t,e,r){if(xn in t)return fa;t[xn]=!0;const n=[],{once:s,unhandleAll:i}=la(),u=(f,F,y)=>{const _=setTimeout(F,f,f,y);_.unref?.();const C=()=>{clearTimeout(_)};return n.push(C),C},{host:a,hostname:c}=r,l=(f,F)=>{t.destroy(new Qu(f,F))},D=()=>{for(const f of n)f();i()};if(t.once("error",f=>{if(D(),t.listenerCount("error")===0)throw f}),typeof e.request<"u"){const f=u(e.request,l,"request");s(t,"response",F=>{s(F,"end",f)})}if(typeof e.socket<"u"){const{socket:f}=e,F=()=>{l(f,"socket")};t.setTimeout(f,F),n.push(()=>{t.removeListener("timeout",F)})}const d=typeof e.lookup<"u",h=typeof e.connect<"u",p=typeof e.secureConnect<"u",m=typeof e.send<"u";return(d||h||p||m)&&s(t,"socket",f=>{const{socketPath:F}=t;if(f.connecting){const y=!!(F??Qs.isIP(c??a??"")!==0);if(d&&!y&&typeof f.address().address>"u"){const _=u(e.lookup,l,"lookup");s(f,"lookup",_)}if(h){const _=()=>u(e.connect,l,"connect");y?s(f,"connect",_()):s(f,"lookup",C=>{C===null&&s(f,"connect",_())})}p&&r.protocol==="https:"&&s(f,"connect",()=>{const _=u(e.secureConnect,l,"secureConnect");s(f,"secureConnect",_)})}if(m){const y=()=>u(e.send,l,"send");f.connecting?s(f,"connect",()=>{s(t,"upload-complete",y())}):s(t,"upload-complete",y())}}),typeof e.response<"u"&&s(t,"upload-complete",()=>{const f=u(e.response,l,"response");s(t,"response",f)}),typeof e.read<"u"&&s(t,"response",f=>{const F=u(e.read,l,"read");s(f,"end",F)}),D}function da(t){t=t;const e={protocol:t.protocol,hostname:o.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return o.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}class pa{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}}const ma=({attemptCount:t,retryOptions:e,error:r,retryAfter:n,computedValue:s})=>{if(r.name==="RetryError")return 1;if(t>e.limit)return 0;const i=e.methods.includes(r.options.method),u=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!u&&!a)return 0;if(r.response){if(n)return n>s?0:n;if(r.response.statusCode===413)return 0}const c=Math.random()*e.noise;return Math.min(2**(t-1)*1e3,e.backoffLimit)+c},{Resolver:An}=He.promises,$e=Symbol("cacheableLookupCreateConnection"),fr=Symbol("cacheableLookupInstance"),Bn=Symbol("expires"),ya=typeof He.ALL=="number",Sn=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Fa=t=>{for(const e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},vn=()=>{let t=!1,e=!1;for(const r of Object.values(Zs.networkInterfaces()))for(const n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},ga=t=>Symbol.iterator in t,bt=t=>t.catch(e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT")return[];throw e}),On={ttl:!0},Ea={all:!0},Ca={all:!0,family:4},ba={all:!0,family:6};class wa{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new An,lookup:u=He.lookup}={}){if(this.maxTtl=r,this.errorTtl=s,this._cache=e,this._resolver=i,this._dnsLookup=u&&oe.promisify(u),this.stats={cache:0,query:0},this._resolver instanceof An?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=oe.promisify(this._resolver.resolve4.bind(this._resolver)),this._resolve6=oe.promisify(this._resolver.resolve6.bind(this._resolver))),this._iface=vn(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){const a=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);a.unref&&a.unref(),this._fallbackInterval=a}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(s=>{r.all?n(null,s):n(null,s.address,s.family,s.expires,s.ttl,s.source)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){const s=n.filter(i=>i.family===6);r.hints&He.V4MAPPED&&(ya&&r.hints&He.ALL||s.length===0)?Fa(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&He.ADDRCONFIG){const{_iface:s}=this;n=n.filter(i=>i.family===6?s.has6:s.has4)}if(n.length===0){const s=new Error(`cacheableLookup ENOTFOUND ${e}`);throw s.code="ENOTFOUND",s.hostname=e,s}return r.all?n:n[0]}async query(e){let r="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){const s=this._pending[e];if(s)this.stats.cache++,n=await s;else{r="query";const i=this.queryAndCache(e);this._pending[e]=i,this.stats.query++;try{n=await i}finally{delete this._pending[e]}}}return n=n.map(s=>({...s,source:r})),n}async _resolve(e){const[r,n]=await Promise.all([bt(this._resolve4(e,On)),bt(this._resolve6(e,On))]);let s=0,i=0,u=0;const a=Date.now();for(const c of r)c.family=4,c.expires=a+c.ttl*1e3,s=Math.max(s,c.ttl);for(const c of n)c.family=6,c.expires=a+c.ttl*1e3,i=Math.max(i,c.ttl);return r.length>0?n.length>0?u=Math.min(s,i):u=s:u=i,{entries:[...r,...n],cacheTtl:u}}async _lookup(e){try{const[r,n]=await Promise.all([bt(this._dnsLookup(e,Ca)),bt(this._dnsLookup(e,ba))]);return{entries:[...r,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[Bn]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(s){this.lookupAsync=async()=>{const i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=s,i}}ga(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Ea);let r=await this._resolve(e);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(e),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));const n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){const r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0;const s=Date.now();for(const[i,u]of this._cache){const a=u[Bn];s>=a?this._cache.delete(i):a<n&&(n=a)}n!==1/0&&this._tick(n-s)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Sn(e),$e in e)throw new Error("CacheableLookup has been already installed");e[$e]=e.createConnection,e[fr]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[$e](r,n))}uninstall(e){if(Sn(e),e[$e]){if(e[fr]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[$e],delete e[$e],delete e[fr]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=vn(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}let _a=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(const[n,s]of this.oldCache.entries())this.onEviction(n,s);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){const r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(const r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};var Xu=_a,Zu=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{const n=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),n(s)})};const e=r=>{Promise.resolve().then(()=>{t.emit("error",r)})};return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e)}),t};const{URL:Pn}=Oe,xa=ct,Aa=Vt,Ba=kr,Sa=Xu,va=Zu,ee=Symbol("currentStreamCount"),Rn=Symbol("request"),te=Symbol("cachedOriginSet"),pe=Symbol("gracefullyClosing"),wt=Symbol("length"),Tn=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],Oa=(t,e,r)=>{let n=0,s=t.length;for(;n<s;){const i=n+s>>>1;r(t[i],e)?n=i+1:s=i}return n},Pa=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,hr=(t,e)=>{for(let r=0;r<t.length;r++){const n=t[r];n[te].length>0&&n[te].length<e[te].length&&n[te].every(s=>e[te].includes(s))&&n[ee]+e[ee]<=e.remoteSettings.maxConcurrentStreams&&es(n)}},kn=(t,e)=>{for(let r=0;r<t.length;r++){const n=t[r];if(e[te].length>0&&e[te].length<n[te].length&&e[te].every(s=>n[te].includes(s))&&e[ee]+n[ee]<=n.remoteSettings.maxConcurrentStreams)return es(e),!0}return!1},es=t=>{t[pe]=!0,t[ee]===0&&t.close()};let qt=class ts extends xa{constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new Sa({maxSize:s})}get protocol(){return"https:"}normalizeOptions(e){let r="";for(let n=0;n<Tn.length;n++){const s=Tn[n];r+=":",e&&e[s]!==void 0&&(r+=e[s])}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(const e in this.queue)for(const r in this.queue[e]){const n=this.queue[e][r];n.completed||(n.completed=!0,n())}}_isBetterSession(e,r){return e>r}_accept(e,r,n,s){let i=0;for(;i<r.length&&e[ee]<e.remoteSettings.maxConcurrentStreams;)r[i].resolve(e),i++;r.splice(0,i),r.length>0&&(this.getSession(n,s,r),r.length=0)}getSession(e,r,n){return new Promise((s,i)=>{Array.isArray(n)&&n.length>0?(n=[...n],s()):n=[{resolve:s,reject:i}];try{if(typeof e=="string")e=new Pn(e);else if(!(e instanceof Pn))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){const{servername:D}=r,{hostname:d}=e;if(D&&d!==D)throw new Error(`Origin ${d} differs from servername ${D}`)}}catch(D){for(let d=0;d<n.length;d++)n[d].reject(D);return}const u=this.normalizeOptions(r),a=e.origin;if(u in this.sessions){const D=this.sessions[u];let d=-1,h=-1,p;for(let m=0;m<D.length;m++){const f=D[m],F=f.remoteSettings.maxConcurrentStreams;if(F<d)break;if(!f[te].includes(a))continue;const y=f[ee];y>=F||f[pe]||f.destroyed||(p||(d=F),this._isBetterSession(y,h)&&(p=f,h=y))}if(p){this._accept(p,n,a,r);return}}if(u in this.queue){if(a in this.queue[u]){this.queue[u][a].listeners.push(...n);return}}else this.queue[u]={[wt]:0};const c=()=>{u in this.queue&&this.queue[u][a]===l&&(delete this.queue[u][a],--this.queue[u][wt]===0&&delete this.queue[u])},l=async()=>{this._sessionCount++;const D=`${a}:${u}`;let d=!1,h;try{const p={...r};p.settings===void 0&&(p.settings=this.settings),p.session===void 0&&(p.session=this.tlsSessionCache.get(D)),h=await(p.createConnection||this.createConnection).call(this,e,p),p.createConnection=()=>h;const f=Ba.connect(e,p);f[ee]=0,f[pe]=!1;const F=()=>{const{socket:C}=f;let P;return C.servername===!1?(C.servername=C.remoteAddress,P=f.originSet,C.servername=!1):P=f.originSet,P},y=()=>f[ee]<f.remoteSettings.maxConcurrentStreams;f.socket.once("session",C=>{this.tlsSessionCache.set(D,C)}),f.once("error",C=>{for(let P=0;P<n.length;P++)n[P].reject(C);this.tlsSessionCache.delete(D)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(this._sessionCount--,d){this._emptySessionCount--;const C=this.sessions[u];C.length===1?delete this.sessions[u]:C.splice(C.indexOf(f),1)}else{c();const C=new Error("Session closed without receiving a SETTINGS frame");C.code="HTTP2WRAPPER_NOSETTINGS";for(let P=0;P<n.length;P++)n[P].reject(C)}this._processQueue()});const _=()=>{const C=this.queue[u];if(!C)return;const P=f[te];for(let I=0;I<P.length;I++){const G=P[I];if(G in C){const{listeners:se,completed:ce}=C[G];let E=0;for(;E<se.length&&y();)se[E].resolve(f),E++;if(C[G].listeners.splice(0,E),C[G].listeners.length===0&&!ce&&(delete C[G],--C[wt]===0)){delete this.queue[u];break}if(!y())break}}};f.on("origin",()=>{f[te]=F()||[],f[pe]=!1,kn(this.sessions[u],f),!(f[pe]||!y())&&(_(),y()&&hr(this.sessions[u],f))}),f.once("remoteSettings",()=>{if(l.destroyed){const C=new Error("Agent has been destroyed");for(let P=0;P<n.length;P++)n[P].reject(C);f.destroy();return}if(f.setLocalWindowSize&&f.setLocalWindowSize(1024*1024*4),f[te]=F()||[],f.socket.encrypted){const C=f[te][0];if(C!==a){const P=new Error(`Requested origin ${a} does not match server ${C}`);for(let I=0;I<n.length;I++)n[I].reject(P);f.destroy();return}}c();{const C=this.sessions;if(u in C){const P=C[u];P.splice(Oa(P,f,Pa),0,f)}else C[u]=[f]}d=!0,this._emptySessionCount++,this.emit("session",f),this._accept(f,n,a,r),f[ee]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),f.on("remoteSettings",()=>{y()&&(_(),y()&&hr(this.sessions[u],f))})}),f[Rn]=f.request,f.request=(C,P)=>{if(f[pe])throw new Error("The session is gracefully closing. No new streams are allowed.");const I=f[Rn](C,P);return f.ref(),f[ee]++===0&&this._emptySessionCount--,I.once("close",()=>{if(--f[ee]===0&&(this._emptySessionCount++,f.unref(),this._emptySessionCount>this.maxEmptySessions||f[pe])){f.close();return}f.destroyed||f.closed||y()&&!kn(this.sessions[u],f)&&(hr(this.sessions[u],f),_(),f[ee]===0&&this._processQueue())}),I}}catch(p){c(),this._sessionCount--;for(let m=0;m<n.length;m++)n[m].reject(p)}};l.listeners=n,l.completed=!1,l.destroyed=!1,this.queue[u][a]=l,this.queue[u][wt]++,this._processQueue()})}request(e,r,n,s){return new Promise((i,u)=>{this.getSession(e,r,[{reject:u,resolve:a=>{try{const c=a.request(n,s);va(c),i(c)}catch(c){u(c)}}}])})}async createConnection(e,r){return ts.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];const n=e.port||443,s=e.hostname;typeof r.servername>"u"&&(r.servername=s);const i=Aa.connect(n,s,r);return r.socket&&(i._peername={family:void 0,address:void 0,port:n}),i}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0;const{sessions:n}=this;for(const s in n){const i=n[s];for(let u=0;u<i.length;u++){const a=i[u];if(a[ee]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){const{sessions:r,queue:n}=this;for(const s in r){const i=r[s];for(let u=0;u<i.length;u++)i[u].destroy(e)}for(const s in n){const i=n[s];for(const u in i)i[u].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};qt.kCurrentStreamCount=ee;qt.kGracefullyClosing=pe;var Ge={Agent:qt,globalAgent:new qt};const{Readable:Ra}=le;let Ta=class extends Ra{constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),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._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};var rs=Ta,ka=(t,e,r)=>{for(const n of r)t.on(n,(...s)=>e.emit(n,...s))},ns={exports:{}};(function(t){const e=(r,n,s)=>{t.exports[n]=class extends r{constructor(...u){super(typeof s=="string"?s:s(u)),this.name=`${super.name} [${n}]`,this.code=n}}};e(TypeError,"ERR_INVALID_ARG_TYPE",r=>{const n=r[0].includes(".")?"property":"argument";let s=r[1];const i=Array.isArray(s);return i&&(s=`${s.slice(0,-1).join(", ")} or ${s.slice(-1)}`),`The "${r[0]}" ${n} must be ${i?"one of":"of"} type ${s}. Received ${typeof r[2]}`}),e(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`),e(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`),e(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`),e(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`),e(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`),e(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")})(ns);var Kt=ns.exports,$a=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}};const{ERR_INVALID_HTTP_TOKEN:ja}=Kt,La=$a,Ia=/^[\^`\-\w!#$%&*+.|~]+$/;var us=t=>{if(typeof t!="string"||!Ia.test(t)&&!La(t))throw new ja("Header name",t)};const{ERR_HTTP_INVALID_HEADER_VALUE:Na,ERR_INVALID_CHAR:qa}=Kt,Ua=/[^\t\u0020-\u007E\u0080-\u00FF]/;var ss=(t,e)=>{if(typeof e>"u")throw new Na(e,t);if(Ua.test(e))throw new qa("header content",t)};const{ERR_HTTP2_NO_SOCKET_MANIPULATION:$n}=Kt,Ha={has(t,e){const r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{const{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new $n;default:{const r=t.session===void 0?t:t.session.socket,n=r[e];return typeof n=="function"?n.bind(r):n}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{const{session:n}=t;return n===void 0?t.setTimeout=r:n.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new $n;default:{const n=t.session===void 0?t:t.session.socket;return n[e]=r,!0}}}};var Ma=Ha;const{URL:dr,urlToHttpOptions:jn}=Oe,za=kr,{Writable:Ga}=le,{Agent:Wa,globalAgent:Va}=Ge,Ja=rs,Ya=ka,{ERR_INVALID_ARG_TYPE:_t,ERR_INVALID_PROTOCOL:Ka,ERR_HTTP_HEADERS_SENT:Ln}=Kt,Qa=us,Xa=ss,Za=Ma,{HTTP2_HEADER_STATUS:In,HTTP2_HEADER_METHOD:Nn,HTTP2_HEADER_PATH:qn,HTTP2_HEADER_AUTHORITY:tt,HTTP2_METHOD_CONNECT:ec}=za.constants,Y=Symbol("headers"),je=Symbol("origin"),rt=Symbol("session"),pr=Symbol("options"),xt=Symbol("flushedHeaders"),Le=Symbol("jobs"),nt=Symbol("pendingAgentPromise");let tc=class extends Ga{constructor(e,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=jn(new dr(e)):e instanceof dr?e=jn(e):e={...e},typeof r=="function"||r===void 0?(n=r,r=e):r=Object.assign(e,r),r.h2session){if(this[rt]=r.h2session,this[rt].destroyed)throw new Error("The session has been closed already");this.protocol=this[rt].socket.encrypted?"https:":"http:"}else if(r.agent===!1)this.agent=new Wa({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=Va;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new _t("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new Ka(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;const{timeout:s}=r;r.timeout=void 0,this[Y]=Object.create(null),this[Le]=[],this[nt]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;const{headers:i}=r;if(i)for(const a in i)this.setHeader(a,i[a]);r.auth&&!("authorization"in this[Y])&&(this[Y].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[pr]=r,this[je]=new dr(`${this.protocol}//${r.servername||r.host}:${r.port}`);const u=r._reuseSocket;u&&(r.createConnection=(...a)=>u.destroyed?this.agent.createConnection(...a):u,this.agent.getSession(this[je],this[pr]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[xt]=!1}get method(){return this[Y][Nn]}set method(e){e&&(this[Y][Nn]=e.toUpperCase())}get path(){const e=this.method==="CONNECT"?tt:qn;return this[Y][e]}set path(e){if(e){const r=this.method==="CONNECT"?tt:qn;this[Y][r]=e}}get host(){return this[je].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const s=()=>this._request.write(e,r,n);this._request?s():this[Le].push(s)}_final(e){this.flushHeaders();const r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e)};this._request?r():this[Le].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[nt]}catch(n){this.aborted&&(e=n)}r(e)}async flushHeaders(){if(this[xt]||this.destroyed)return;this[xt]=!0;const e=this.method===ec,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||Ya(n,this,["timeout","continue"]),n.once("error",i=>{this.destroy(i)}),n.once("aborted",()=>{const{res:i}=this;i?(i.aborted=!0,i.emit("aborted"),i.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});const s=(i,u,a)=>{const c=new Ja(this.socket,n.readableHighWaterMark);this.res=c,c.url=`${this[je].origin}${this.path}`,c.req=this,c.statusCode=i[In],c.headers=i,c.rawHeaders=a,c.once("end",()=>{c.complete=!0,c.socket=null,c.connection=null}),e?(c.upgrade=!0,this.emit("connect",c,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",l=>{!c._dumped&&!c.push(l)&&n.pause()}),n.once("end",()=>{this.aborted||c.push(null)}),this.emit("response",c)||c._dump())};n.once("response",s),n.once("headers",i=>this.emit("information",{statusCode:i[In]})),n.once("trailers",(i,u,a)=>{const{res:c}=this;if(c===null){s(i,u,a);return}c.trailers=i,c.rawTrailers=a}),n.once("close",()=>{const{aborted:i,res:u}=this;if(u){i&&(u.aborted=!0,u.emit("aborted"),u.destroy());const a=()=>{u.emit("close"),this.destroy(),this.emit("close")};u.readable?u.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close")}),this.socket=new Proxy(n,Za);for(const i of this[Le])i();this[Le].length=0,this.emit("socket",this.socket)};if(!(tt in this[Y])&&!e&&(this[Y][tt]=this[je].host),this[rt])try{r(this[rt].request(this[Y]))}catch(n){this.destroy(n)}else{this.reusedSocket=!0;try{const n=this.agent.request(this[je],this[pr],this[Y]);this[nt]=n,r(await n),this[nt]=!1}catch(n){this[nt]=!1,this.destroy(n)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[Y])}hasHeader(e){if(typeof e!="string")throw new _t("name","string",e);return!!this[Y][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new _t("name","string",e);return this[Y][e.toLowerCase()]}get headersSent(){return this[xt]}removeHeader(e){if(typeof e!="string")throw new _t("name","string",e);if(this.headersSent)throw new Ln("remove");delete this[Y][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Ln("set");Qa(e),Xa(e,r);const n=e.toLowerCase();if(n==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}n==="host"&&this.method==="CONNECT"?this[Y][tt]=r:this[Y][n]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){const n=()=>this._request.setTimeout(e,r);return this._request?n():this[Le].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};var is=tc,ht={exports:{}};const rc=Vt;var nc=(t={},e=rc.connect)=>new Promise((r,n)=>{let s=!1,i;const u=async()=>{await c,i.off("timeout",a),i.off("error",n),t.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:s}))},a=async()=>{s=!0,u()},c=(async()=>{try{i=await e(t,u),i.on("error",n),i.once("timeout",a)}catch(l){n(l)}})()});const{isIP:uc}=ei,sc=Gt,ic=t=>{if(t[0]==="["){const r=t.indexOf("]");return sc(r!==-1),t.slice(1,r)}const e=t.indexOf(":");return e===-1?t:t.slice(0,e)};var oc=t=>{const e=ic(t);return uc(e)?"":e};const{URL:Un,urlToHttpOptions:Hn}=Oe,Mn=Jt,mr=$r,ac=nc,cc=Xu,{Agent:Dc,globalAgent:lc}=Ge,fc=is,hc=oc,zn=Zu,os=new cc({maxSize:100}),dc=new Map,pc=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};const n=()=>{t.emit("free",e,r)};e.on("free",n);const s=()=>{t.removeSocket(e,r)};e.on("close",s);const i=()=>{const{freeSockets:a}=t;for(const c of Object.values(a))if(c.includes(e)){e.destroy();return}};e.on("timeout",i);const u=()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",n),e.off("timeout",i),e.off("agentRemove",u)};e.on("agentRemove",u),t.emit("free",e,r)},as=(t,e=new Map,r=void 0)=>async n=>{const s=`${n.host}:${n.port}:${n.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return{alpnProtocol:(await e.get(s)).alpnProtocol};const{path:i}=n;n.path=n.socketPath;const u=ac(n,r);e.set(s,u);try{const a=await u;return t.set(s,a.alpnProtocol),e.delete(s),n.path=i,a}catch(a){throw e.delete(s),n.path=i,a}}return{alpnProtocol:t.get(s)}},cs=as(os,dc);ht.exports=async(t,e,r)=>{if(typeof t=="string"?t=Hn(new Un(t)):t instanceof Un?t=Hn(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";const n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||hc(e.headers&&e.headers.host||e.host),e.port=e.port||(n?443:80),e._defaultAgent=n?mr.globalAgent:Mn.globalAgent;const s=e.resolveProtocol||cs;let{agent:i}=e;if(i!==void 0&&i!==!1&&i.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(n){e.resolveSocket=!0;let{socket:u,alpnProtocol:a,timeout:c}=await s(e);if(c){u&&u.destroy();const D=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw D.code="ETIMEDOUT",D.ms=e.timeout,D}u&&e.createConnection&&(u.destroy(),u=void 0),delete e.resolveSocket;const l=a==="h2";if(i&&(i=l?i.http2:i.https,e.agent=i),i===void 0&&(i=l?lc:mr.globalAgent),u)if(i===!1)u.destroy();else{const D=(l?Dc:mr.Agent).prototype.createConnection;i.createConnection===D?l?e._reuseSocket=u:pc(i,u,e):u.destroy()}if(l)return zn(new fc(e,r))}else i&&(e.agent=i.http);return zn(Mn.request(e,r))};ht.exports.protocolCache=os;ht.exports.resolveProtocol=cs;ht.exports.createResolveProtocol=as;var mc=ht.exports;const yc=le,Fc=Vt,gc=new Fc.TLSSocket(new yc.PassThrough)._handle._parentWrap.constructor;var Ds=gc;let Ec=class extends Error{constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r}};var ls=Ec;const Cc=(t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){const s=r.map(i=>typeof i=="string"?i:i.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}};var bc=Cc;const{URL:Gn}=Oe,At=bc;var fs=(t,e)=>{At("proxyOptions",e,["object"]),At("proxyOptions.headers",e.headers,["object","undefined"]),At("proxyOptions.raw",e.raw,["boolean","undefined"]),At("proxyOptions.url",e.url,[Gn,"string"]);const r=new Gn(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r}},zr=t=>{const{username:e,password:r}=t.proxyOptions.url;if(e||r){const n=`${e}:${r}`,s=`Basic ${Buffer.from(n).toString("base64")}`;return{"proxy-authorization":s,authorization:s}}return{}};const wc=Vt,_c=Jt,hs=$r,xc=Ds,{globalAgent:Ac}=Ge,Bc=ls,ds=fs,Sc=zr,ps=(t,e,r)=>{(async()=>{try{const{proxyOptions:n}=t,{url:s,headers:i,raw:u}=n,a=await Ac.request(s,n,{...Sc(t),...i,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",c=>{const l=c[":status"];if(l!==200){r(new Bc(l,""));return}const D=t instanceof hs.Agent;if(u&&D){e.socket=a;const h=wc.connect(e);h.once("close",()=>{a.destroy()}),r(null,h);return}const d=new xc(a);d.encrypted=!1,d._handle.getpeername=h=>{h.family=void 0,h.address=void 0,h.port=void 0},r(null,d)})}catch(n){r(n)}})()};let vc=class extends _c.Agent{constructor(e){super(e),ds(this,e.proxyOptions)}createConnection(e,r){ps(this,e,r)}},Oc=class extends hs.Agent{constructor(e){super(e),ds(this,e.proxyOptions)}createConnection(e,r){ps(this,e,r)}};var Pc={HttpOverHttp2:vc,HttpsOverHttp2:Oc};const{Agent:Rc}=Ge,Tc=Ds,kc=ls,$c=fs;let jc=class extends Rc{constructor(e){super(e),$c(this,e.proxyOptions)}async createConnection(e,r){const n=`${e.hostname}:${e.port||443}`,[s,i,u]=await this._getProxyStream(n);if(i!==200)throw new kc(i,u);if(this.proxyOptions.raw)r.socket=s;else{const a=new Tc(s);return a.encrypted=!1,a._handle.getpeername=c=>{c.family=void 0,c.address=void 0,c.port=void 0},a}return super.createConnection(e,r)}};var ms=jc;const{globalAgent:Lc}=Ge,Ic=ms,Nc=zr,qc=t=>new Promise((e,r)=>{t.once("error",r),t.once("response",n=>{t.off("error",r),e(n[":status"])})});let Uc=class extends Ic{async _getProxyStream(e){const{proxyOptions:r}=this,n={...Nc(this),...r.headers,":method":"CONNECT",":authority":e},s=await Lc.request(r.url,r,n),i=await qc(s);return[s,i,""]}};var Hc=Uc;const Mc=Jt,zc=$r,Gc=ms,Wc=zr,Vc=t=>new Promise((e,r)=>{const n=(s,i,u)=>{i.unshift(u),t.off("error",r),e([i,s.statusCode,s.statusMessage])};t.once("error",r),t.once("connect",n)});let Wn=class extends Gc{async _getProxyStream(e){const{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,u=(n.protocol==="https:"?zc:Mc).request({...r,hostname:n.hostname,port:n.port,path:e,headers:{...Wc(this),...s,host:e},method:"CONNECT"}).end();return Vc(u)}};var Jc={Http2OverHttp:Wn,Http2OverHttps:Wn};const Yc=kr,{Agent:Kc,globalAgent:Qc}=Ge,Gr=is,Xc=rs,Zc=mc,{HttpOverHttp2:eD,HttpsOverHttp2:tD}=Pc,rD=Hc,{Http2OverHttp:nD,Http2OverHttps:uD}=Jc,sD=us,iD=ss,oD=(t,e,r)=>new Gr(t,e,r),aD=(t,e,r)=>{const n=new Gr(t,e,r);return n.end(),n};var cD={...Yc,ClientRequest:Gr,IncomingMessage:Xc,Agent:Kc,globalAgent:Qc,request:oD,get:aD,auto:Zc,proxies:{HttpOverHttp2:eD,HttpsOverHttp2:tD,Http2OverHttp2:rD,Http2OverHttp:nD,Http2OverHttps:uD},validateHeaderName:sD,validateHeaderValue:iD};const DD=v.getDefaultExportFromCjs(cD);function lD(t){const e=[],r=t.split(",");for(const n of r){const[s,...i]=n.split(";"),u=s.trim();if(u[0]!=="<"||u[u.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${u}`);const a=u.slice(1,-1),c={};if(i.length===0)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(const l of i){const D=l.trim(),d=D.indexOf("=");if(d===-1)throw new Error(`Failed to parse Link header: ${t}`);const h=D.slice(0,d).trim(),p=D.slice(d+1).trim();c[h]=p}e.push({reference:a,parameters:c})}return e}const[Vn,fD]=z.versions.node.split(".").map(Number);function hD(t){for(const e in t){const r=t[e];g.any([o.string,o.number,o.boolean,o.null_,o.undefined],r)}}const dD=new Map;let Bt;const pD=()=>Bt||(Bt=new wa,Bt),mD={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(t){return t.request.options.responseType==="json"?t.body:JSON.parse(t.body)},paginate({response:t}){const e=t.headers.link;if(typeof e!="string"||e.trim()==="")return!1;const n=lD(e).find(s=>s.parameters.rel==="next"||s.parameters.rel==='"next"');return n?{url:new re.URL(n.reference,t.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},yD=t=>{const{hooks:e,retry:r}=t,n={...t,context:{...t.context},cacheOptions:{...t.cacheOptions},https:{...t.https},agent:{...t.agent},headers:{...t.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...t.timeout},hooks:{init:[...e.init],beforeRequest:[...e.beforeRequest],beforeError:[...e.beforeError],beforeRedirect:[...e.beforeRedirect],beforeRetry:[...e.beforeRetry],afterResponse:[...e.afterResponse]},searchParams:t.searchParams?new re.URLSearchParams(t.searchParams):void 0,pagination:{...t.pagination}};return n.url!==void 0&&(n.prefixUrl=""),n},FD=t=>{const{hooks:e,retry:r}=t,n={...t};return o.object(t.context)&&(n.context={...t.context}),o.object(t.cacheOptions)&&(n.cacheOptions={...t.cacheOptions}),o.object(t.https)&&(n.https={...t.https}),o.object(t.cacheOptions)&&(n.cacheOptions={...n.cacheOptions}),o.object(t.agent)&&(n.agent={...t.agent}),o.object(t.headers)&&(n.headers={...t.headers}),o.object(r)&&(n.retry={...r},o.array(r.errorCodes)&&(n.retry.errorCodes=[...r.errorCodes]),o.array(r.methods)&&(n.retry.methods=[...r.methods]),o.array(r.statusCodes)&&(n.retry.statusCodes=[...r.statusCodes])),o.object(t.timeout)&&(n.timeout={...t.timeout}),o.object(e)&&(n.hooks={...e},o.array(e.init)&&(n.hooks.init=[...e.init]),o.array(e.beforeRequest)&&(n.hooks.beforeRequest=[...e.beforeRequest]),o.array(e.beforeError)&&(n.hooks.beforeError=[...e.beforeError]),o.array(e.beforeRedirect)&&(n.hooks.beforeRedirect=[...e.beforeRedirect]),o.array(e.beforeRetry)&&(n.hooks.beforeRetry=[...e.beforeRetry]),o.array(e.afterResponse)&&(n.hooks.afterResponse=[...e.afterResponse])),o.object(t.pagination)&&(n.pagination={...t.pagination}),n},gD=t=>{const e=[t.timeout.socket,t.timeout.connect,t.timeout.lookup,t.timeout.request,t.timeout.secureConnect].filter(r=>typeof r=="number");if(e.length>0)return Math.min(...e)},Jn=(t,e,r)=>{const n=t.hooks?.init;if(n)for(const s of n)s(e,r)};class ae{constructor(e,r,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),g.any([o.string,o.urlInstance,o.object,o.undefined],e),g.any([o.object,o.undefined],r),g.any([o.object,o.undefined],n),e instanceof ae||r instanceof ae)throw new TypeError("The defaults must be passed as the third argument");this._internals=yD(n?._internals??n??mD),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(o.plainObject(e))try{this.merge(e),this.merge(r)}finally{this.url=e.url}else try{this.merge(r)}finally{if(r?.url!==void 0)if(e===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else e!==void 0&&(this.url=e)}}catch(s){throw s.options=this,s}}merge(e){if(e){if(e instanceof ae){for(const r of e._init)this.merge(r);return}e=FD(e),Jn(this,e,this),Jn(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let r=!1;for(const n in e)if(!(n==="mutableDefaults"||n==="handlers")&&n!=="url"){if(!(n in this))throw new Error(`Unexpected option: ${n}`);this[n]=e[n],r=!0}r&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){g.any([o.function_,o.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){g.plainObject(e);for(const r in e){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);g.any([o.object,o.undefined],e[r])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){g.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){g.plainObject(e);for(const r in e){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);g.any([o.number,o.undefined],e[r])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(g.any([o.string,o.urlInstance],e),e===""){this._internals.prefixUrl="";return}if(e=e.toString(),e.endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){const{href:r}=this._internals.url;this._internals.url.href=e+r.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){g.any([o.string,o.buffer,o.nodeStream,o.generator,o.asyncGenerator,Mr,o.undefined],e),o.nodeStream(e)&&g.truthy(e.readable),e!==void 0&&(g.undefined(this._internals.form),g.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){g.any([o.plainObject,o.undefined],e),e!==void 0&&(g.undefined(this._internals.body),g.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){e!==void 0&&(g.undefined(this._internals.body),g.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(g.any([o.string,o.urlInstance,o.undefined],e),e===void 0){this._internals.url=void 0;return}if(o.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");const r=`${this.prefixUrl}${e.toString()}`,n=new re.URL(r);if(this._internals.url=n,n.protocol==="unix:"&&(n.href=`http://unix${n.pathname}${n.search}`),n.protocol!=="http:"&&n.protocol!=="https:"){const s=new Error(`Unsupported protocol: ${n.protocol}`);throw s.code="ERR_UNSUPPORTED_PROTOCOL",s}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),n.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");const s=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(s?.groups){const{socketPath:i,path:u}=s.groups;this._unixOptions={socketPath:i,path:u,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(g.any([o.object,o.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:n}=e;g.function_(r),g.function_(n),r.length===4&&n.length===0?(r=oe.promisify(r.bind(e)),n=oe.promisify(n.bind(e)),this._internals.cookieJar={setCookie:r,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){g.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){g.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new re.URLSearchParams),this._internals.searchParams)}set searchParams(e){g.any([o.string,o.object,o.undefined],e);const r=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}const n=this.searchParams;let s;if(o.string(e))s=new re.URLSearchParams(e);else if(e instanceof re.URLSearchParams)s=e;else{hD(e),s=new re.URLSearchParams;for(const i in e){const u=e[i];u===null?s.append(i,""):u===void 0?n.delete(i):s.append(i,u)}}if(this._merging){for(const i of s.keys())n.delete(i);for(const[i,u]of s)n.append(i,u)}else r?r.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){g.any([o.function_,o.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){g.any([o.object,o.boolean,o.undefined],e),e===!0?this._internals.dnsCache=pD():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e}get context(){return this._internals.context}set context(e){g.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){g.object(e);for(const r in e){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);const n=r,s=e[n];if(g.any([o.array,o.undefined],s),s)for(const i of s)g.function_(i);if(this._merging)s&&this._internals.hooks[n].push(...s);else{if(!s)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...s]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){g.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){g.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){g.any([o.object,o.string,o.boolean,o.undefined],e),e===!0?this._internals.cache=dD:e===!1?this._internals.cache=void 0:this._internals.cache=e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){g.boolean(e),this._internals.throwHttpErrors=e}get username(){const e=this._internals.url,r=e?e.username:this._internals.username;return decodeURIComponent(r)}set username(e){g.string(e);const r=this._internals.url,n=encodeURIComponent(e);r?r.username=n:this._internals.username=n}get password(){const e=this._internals.url,r=e?e.password:this._internals.password;return decodeURIComponent(r)}set password(e){g.string(e);const r=this._internals.url,n=encodeURIComponent(e);r?r.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){g.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){g.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){g.plainObject(e),this._merging?Object.assign(this._internals.headers,vr(e)):this._internals.headers=vr(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){g.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){g.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){g.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(g.plainObject(e),g.any([o.function_,o.undefined],e.calculateDelay),g.any([o.number,o.undefined],e.maxRetryAfter),g.any([o.number,o.undefined],e.limit),g.any([o.array,o.undefined],e.methods),g.any([o.array,o.undefined],e.statusCodes),g.any([o.array,o.undefined],e.errorCodes),g.any([o.number,o.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(const n in e)if(!(n in this._internals.retry))throw new Error(`Unexpected retry option: ${n}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};const{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(n=>n.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){g.any([o.string,o.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){g.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){g.any([o.function_,o.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){g.plainObject(e),g.any([o.boolean,o.undefined],e.shared),g.any([o.number,o.undefined],e.cacheHeuristic),g.any([o.number,o.undefined],e.immutableMinTimeToLive),g.any([o.boolean,o.undefined],e.ignoreCargoCult);for(const r in e)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){g.plainObject(e),g.any([o.boolean,o.undefined],e.rejectUnauthorized),g.any([o.function_,o.undefined],e.checkServerIdentity),g.any([o.string,o.object,o.array,o.undefined],e.certificateAuthority),g.any([o.string,o.object,o.array,o.undefined],e.key),g.any([o.string,o.object,o.array,o.undefined],e.certificate),g.any([o.string,o.undefined],e.passphrase),g.any([o.string,o.buffer,o.array,o.undefined],e.pfx),g.any([o.array,o.undefined],e.alpnProtocols),g.any([o.string,o.undefined],e.ciphers),g.any([o.string,o.buffer,o.undefined],e.dhparam),g.any([o.string,o.undefined],e.signatureAlgorithms),g.any([o.string,o.undefined],e.minVersion),g.any([o.string,o.undefined],e.maxVersion),g.any([o.boolean,o.undefined],e.honorCipherOrder),g.any([o.number,o.undefined],e.tlsSessionLifetime),g.any([o.string,o.undefined],e.ecdhCurve),g.any([o.string,o.buffer,o.array,o.undefined],e.certificateRevocationLists);for(const r in e)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");g.any([o.string,o.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){g.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){g.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json")throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){g.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){g.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){g.any([o.number,o.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){g.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,r){return oe.inspect(this._internals,r)}createNativeRequestOptions(){const e=this._internals,r=e.url;let n;r.protocol==="https:"?n=e.http2?e.agent:e.agent.https:n=e.agent.http;const{https:s}=e;let{pfx:i}=s;return o.array(i)&&o.plainObject(i[0])&&(i=i.map(u=>({buf:u.buffer,passphrase:u.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:s.alpnProtocols,ca:s.certificateAuthority,cert:s.certificate,key:s.key,passphrase:s.passphrase,pfx:s.pfx,rejectUnauthorized:s.rejectUnauthorized,checkServerIdentity:s.checkServerIdentity??Xs.checkServerIdentity,ciphers:s.ciphers,honorCipherOrder:s.honorCipherOrder,minVersion:s.minVersion,maxVersion:s.maxVersion,sigalgs:s.signatureAlgorithms,sessionTimeout:s.tlsSessionLifetime,dhparam:s.dhparam,ecdhCurve:s.ecdhCurve,crl:s.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:n,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?gD(e):void 0,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url,{request:r}=this._internals;return!r&&e?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){const e=this._internals.url;if(e){if(e.protocol==="https:"){if(this._internals.http2){if(Vn<15||Vn===15&&fD<10){const r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return DD.auto}return Ou.request}return it.request}}freeze(){const e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}}const Ut=t=>{const{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304};class Yn extends W{constructor(e,r){const{options:n}=r.request;super(`${e.message} in "${n.url.toString()}"`,e,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}}const Kn=(t,e,r,n)=>{const{rawBody:s}=t;try{if(e==="text")return s.toString(n);if(e==="json")return s.length===0?"":r(s.toString(n));if(e==="buffer")return s}catch(i){throw new Yn(i,t)}throw new Yn({message:`Unknown body type '${e}'`,name:"Error"},t)};function ED(t){return t.writable&&!t.writableEnded}function Qn(t){return t.protocol==="unix:"||t.hostname==="unix"}const{buffer:CD}=Ju,bD=o.string(z.versions.brotli),wD=new Set(["GET","HEAD"]),yr=new pa,_D=new Set([300,301,302,303,304,307,308]),xD=["socket","connect","continue","information","upgrade"],St=()=>{};class Qt extends Wt.Duplex{constructor(e,r,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=St,this._triggerRead=!1,this._cancelTimeouts=St,this._removeListeners=St,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=St,this.on("pipe",i=>{i?.headers&&Object.assign(this.options.headers,i.headers)}),this.on("newListener",i=>{if(i==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new ae(e,r,n),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(i){const{options:u}=i;u&&(this.options=u),this.flush=async()=>{this.flush=async()=>{},this.destroy(i)};return}const{body:s}=this.options;if(o.nodeStream(s)&&s.once("error",i=>{this._flushed?this._beforeError(new hn(i,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new hn(i,this))}}),this.options.signal){const i=()=>{this.destroy(new Eo(this))};this.options.signal.aborted?i():(this.options.signal.addEventListener("abort",i),this._removeListeners=()=>{this.options.signal.removeEventListener("abort",i)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){this._request?.destroy();return}for(const e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;const{response:r,options:n}=this,s=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=!0,e instanceof W||(e=new W(e.message,e,this));const i=e;(async()=>{if(r?.readable&&!r.rawBody&&!this._request?.socket?.destroyed&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let u;try{let a;r&&"retry-after"in r.headers&&(a=Number(r.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(r.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3);const c=n.retry;u=await c.calculateDelay({attemptCount:s,retryOptions:c,error:i,retryAfter:a,computedValue:ma({attemptCount:s,retryOptions:c,error:i,retryAfter:a,computedValue:c.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(a){this._error(new W(a.message,a,this));return}if(u){if(await new Promise(a=>{const c=setTimeout(a,u);this._stopRetry=()=>{clearTimeout(c),a()}}),this.destroyed)return;try{for(const a of this.options.hooks.beforeRetry)await a(i,this.retryCount+1)}catch(a){this._error(new W(a.message,e,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,e,a=>{const c=new Qt(n.url,a,n);return c.retryCount=this.retryCount+1,z.nextTick(()=>{c.flush()}),c});return}}this._error(i)})()}_read(){this._triggerRead=!0;const{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let r;for(;(r=e.read())!==null;){this._downloadedSize+=r.length;const n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(r)}}}_write(e,r,n){const s=()=>{this._writeRequest(e,r,n)};this._requestInitialized?s():this._jobs.push(s)}_final(e){const r=()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(n=>{this._request._writableState?.errored||(n||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(n))})};this._requestInitialized?r():this._jobs.push(r)}_destroy(e,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){const{body:n}=this.options;o.nodeStream(n)&&n.destroy()}this._request&&this._request.destroy(),e!==null&&!o.undefined(e)&&!(e instanceof W)&&(e=new W(e.message,e,this)),r(e)}pipe(e,r){return e instanceof it.ServerResponse&&this._pipedServerResponses.add(e),super.pipe(e,r)}unpipe(e){return e instanceof it.ServerResponse&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){const{options:e}=this,{headers:r}=e,n=!o.undefined(e.form),s=!o.undefined(e.json),i=!o.undefined(e.body),u=wD.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=u,n||s||i){if(u)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);const a=!o.string(r["content-type"]);if(i){if(Mr(e.body)){const l=new ca(e.body);a&&(r["content-type"]=l.headers["Content-Type"]),"Content-Length"in l.headers&&(r["content-length"]=l.headers["Content-Length"]),e.body=l.encode()}Yu(e.body)&&a&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){a&&(r["content-type"]="application/x-www-form-urlencoded");const{form:l}=e;e.form=void 0,e.body=new re.URLSearchParams(l).toString()}else{a&&(r["content-type"]="application/json");const{json:l}=e;e.json=void 0,e.body=e.stringifyJson(l)}const c=await Da(e.body,e.headers);o.undefined(r["content-length"])&&o.undefined(r["transfer-encoding"])&&!u&&!o.undefined(c)&&(r["content-length"]=String(c))}e.responseType==="json"&&!("accept"in e.headers)&&(e.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;const{options:r}=this,{url:n}=r;this._nativeResponse=e,r.decompress&&(e=ta(e));const s=e.statusCode,i=e;i.statusMessage=i.statusMessage??it.STATUS_CODES[s],i.url=r.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=Ut(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{this._aborted=!0,e.destroy(),this._beforeError(new dn(a,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new dn({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const u=e.headers["set-cookie"];if(o.object(r.cookieJar)&&u){let a=u.map(async c=>r.cookieJar.setCookie(c,n.toString()));r.ignoreInvalidCookies&&(a=a.map(async c=>{try{await c}catch{}}));try{await Promise.all(a)}catch(c){this._beforeError(c);return}}if(!this.isAborted){if(r.followRedirect&&e.headers.location&&_D.has(s)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new mo(this));return}this._request=void 0;const a=new ae(void 0,void 0,this.options),c=s===303&&a.method!=="GET"&&a.method!=="HEAD",l=s!==307&&s!==308,D=a.methodRewriting&&l;(c||D)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{const d=Pt.Buffer.from(e.headers.location,"binary").toString(),h=new re.URL(d,n);if(!Qn(n)&&Qn(h)){this._beforeError(new W("Cannot redirect to UNIX socket",{},this));return}h.hostname!==n.hostname||h.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(h.username=a.username,h.password=a.password),this.redirectUrls.push(h),a.prefixUrl="",a.url=h;for(const p of a.hooks.beforeRedirect)await p(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(d){this._beforeError(d);return}return}if(r.isStream&&r.throwHttpErrors&&!Ut(i)){this._beforeError(new Nt(i));return}if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit("response",e);return}this.emit("response",e);for(const a of this._pipedServerResponses)if(!a.headersSent){for(const c in e.headers){const l=r.decompress?c!=="content-encoding":!0,D=e.headers[c];l&&a.setHeader(c,D)}a.statusCode=s}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{const r=await CD(e);if(!this.isAborted)return this.response.rawBody=r,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){const{options:r}=this,{timeout:n,url:s}=r;wo(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=ha(e,n,s);const i=r.cache?"cacheableResponse":"response";e.once(i,u=>{this._onResponse(u)}),e.once("error",u=>{this._aborted=!0,e.destroy(),u=u instanceof Qu?new Fo(u,this.timings,this):new W(u.message,u,this),this._beforeError(u)}),this._unproxyEvents=Ku(e,this,xD),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((r,n)=>{super.write(e,s=>{if(s){n(s);return}r()})})}_sendBody(){const{body:e}=this.options,r=this.redirectUrls.length===0?this:this._request??this;o.nodeStream(e)?e.pipe(r):o.generator(e)||o.asyncGenerator(e)?(async()=>{try{for await(const n of e)await this._asyncWrite(n);super.end()}catch(n){this._beforeError(n)}})():o.undefined(e)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(e,void 0,()=>{}),r.end())}_prepareCache(e){if(!yr.has(e)){const r=new Go((n,s)=>{const i=n._request(n,s);return o.promise(i)&&(i.once=(u,a)=>{if(u==="error")(async()=>{try{await i}catch(c){a(c)}})();else if(u==="abort")(async()=>{try{(await i).once("abort",a)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${u}`);return i}),i},e);yr.set(e,r.request())}}async _createCacheableRequest(e,r){return new Promise((n,s)=>{Object.assign(r,da(e));let i;const u=yr.get(r.cache)(r,async a=>{if(a._readableState.autoDestroy=!1,i){const c=()=>{a.req&&(a.complete=a.req.res.complete)};a.prependOnceListener("end",c),c(),(await i).emit("cacheableResponse",a)}n(a)});u.once("error",s),u.once("request",async a=>{i=a,n(i)})})}async _makeRequest(){const{options:e}=this,{headers:r,username:n,password:s}=e,i=e.cookieJar;for(const l in r)if(o.undefined(r[l]))delete r[l];else if(o.null_(r[l]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${l}\` header`);if(e.decompress&&o.undefined(r["accept-encoding"])&&(r["accept-encoding"]=bD?"gzip, deflate, br":"gzip, deflate"),n||s){const l=Pt.Buffer.from(`${n}:${s}`).toString("base64");r.authorization=`Basic ${l}`}if(i){const l=await i.getCookieString(e.url.toString());o.nonEmptyString(l)&&(r.cookie=l)}e.prefixUrl="";let u;for(const l of e.hooks.beforeRequest){const D=await l(e);if(!o.undefined(D)){u=()=>D;break}}u||(u=e.getRequestFunction());const a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=u,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));const c=e.cache?this._createCacheableRequest:u;try{let l=c(a,this._requestOptions);o.promise(l)&&(l=await l),o.undefined(l)&&(l=e.getFallbackRequestFunction()(a,this._requestOptions),o.promise(l)&&(l=await l)),ED(l)?this._onRequest(l):this.writable?(this.once("finish",()=>{this._onResponse(l)}),this._sendBody()):this._onResponse(l)}catch(l){throw l instanceof ut?new yo(l,this):l}}async _error(e){try{if(!(e instanceof Nt&&!this.options.throwHttpErrors))for(const r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new W(r.message,r,this)}this.destroy(e)}_writeRequest(e,r,n){!this._request||this._request.destroyed||this._request.write(e,r,s=>{if(!s&&!this._request.destroyed){this._uploadedSize+=Pt.Buffer.byteLength(e,r);const i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}n(s)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return this._responseSize?e=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?e=1:e=0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return this._bodySize?e=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?e=1:e=0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class AD extends W{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}const BD=["request","response","redirect","uploadProgress","downloadProgress"];function Xn(t){let e,r,n;const s=new Pu.EventEmitter,i=new Yt((a,c,l)=>{l(()=>{e.destroy()}),l.shouldReject=!1,l(()=>{c(new AD(e))});const D=d=>{l(()=>{});const h=t??new Qt(void 0,void 0,n);h.retryCount=d,h._noPipe=!0,e=h,h.once("response",async f=>{const F=(f.headers["content-encoding"]??"").toLowerCase(),y=F==="gzip"||F==="deflate"||F==="br",{options:_}=h;if(y&&!_.decompress)f.body=f.rawBody;else try{f.body=Kn(f,_.responseType,_.parseJson,_.encoding)}catch(C){if(f.body=f.rawBody.toString(),Ut(f)){h._beforeError(C);return}}try{const C=_.hooks.afterResponse;for(const[P,I]of C.entries())if(f=await I(f,async G=>{throw _.merge(G),_.prefixUrl="",G.url&&(_.url=G.url),_.hooks.afterResponse=_.hooks.afterResponse.slice(0,P),new go(h)}),!(o.object(f)&&o.number(f.statusCode)&&!o.nullOrUndefined(f.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(C){h._beforeError(C);return}if(r=f,!Ut(f)){h._beforeError(new Nt(f));return}h.destroy(),a(h.options.resolveBodyOnly?f.body:f)});const p=f=>{if(i.isCanceled)return;const{options:F}=h;if(f instanceof Nt&&!F.throwHttpErrors){const{response:y}=f;h.destroy(),a(h.options.resolveBodyOnly?y.body:y);return}c(f)};h.once("error",p);const m=h.options?.body;h.once("retry",(f,F)=>{t=void 0;const y=h.options.body;if(m===y&&o.nodeStream(y)){F.message="Cannot retry with consumed body stream",p(F);return}n=h.options,D(f)}),Ku(h,s,BD),o.undefined(t)&&h.flush()};D(0)});i.on=(a,c)=>(s.on(a,c),i),i.off=(a,c)=>(s.off(a,c),i);const u=a=>{const c=(async()=>{await i;const{options:l}=r.request;return Kn(r,a,l.parseJson,l.encoding)})();return Object.defineProperties(c,Object.getOwnPropertyDescriptors(i)),c};return i.json=()=>{if(e.options){const{headers:a}=e.options;!e.writableFinished&&!("accept"in a)&&(a.accept="application/json")}return u("json")},i.buffer=()=>u("buffer"),i.text=()=>u("text"),i}const SD=async t=>new Promise(e=>{setTimeout(e,t)}),vD=t=>o.function_(t),OD=["get","post","put","patch","head","delete"],ys=t=>{t={options:new ae(void 0,void 0,t.options),handlers:[...t.handlers],mutableDefaults:t.mutableDefaults},Object.defineProperty(t,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});const e=(n,s,i=t.options)=>{const u=new Qt(n,s,i);let a;const c=d=>(u.options=d,u._noPipe=!d.isStream,u.flush(),d.isStream?u:(a||(a=Xn(u)),a));let l=0;const D=d=>{const p=(t.handlers[l++]??c)(d,D);if(o.promise(p)&&!u.options.isStream&&(a||(a=Xn(u)),p!==a)){const m=Object.getOwnPropertyDescriptors(a);for(const f in m)f in p&&delete m[f];Object.defineProperties(p,m),p.cancel=a.cancel}return p};return D(u.options)};e.extend=(...n)=>{const s=new ae(void 0,void 0,t.options),i=[...t.handlers];let u;for(const a of n)vD(a)?(s.merge(a.defaults.options),i.push(...a.defaults.handlers),u=a.defaults.mutableDefaults):(s.merge(a),a.handlers&&i.push(...a.handlers),u=a.mutableDefaults);return ys({options:s,handlers:i,mutableDefaults:!!u})};const r=async function*(n,s){let i=new ae(n,s,t.options);i.resolveBodyOnly=!1;const{pagination:u}=i;g.function_(u.transform),g.function_(u.shouldContinue),g.function_(u.filter),g.function_(u.paginate),g.number(u.countLimit),g.number(u.requestLimit),g.number(u.backoff);const a=[];let{countLimit:c}=u,l=0;for(;l<u.requestLimit;){l!==0&&await SD(u.backoff);const D=await e(void 0,void 0,i),d=await u.transform(D),h=[];g.array(d);for(const m of d)if(u.filter({item:m,currentItems:h,allItems:a})&&(!u.shouldContinue({item:m,currentItems:h,allItems:a})||(yield m,u.stackAllItems&&a.push(m),h.push(m),--c<=0)))return;const p=u.paginate({response:D,currentItems:h,allItems:a});if(p===!1)return;p===D.request.options?i=D.request.options:(i.merge(p),g.any([o.urlInstance,o.undefined],p.url),p.url!==void 0&&(i.prefixUrl="",i.url=p.url)),l++}};e.paginate=r,e.paginate.all=async(n,s)=>{const i=[];for await(const u of r(n,s))i.push(u);return i},e.paginate.each=r,e.stream=(n,s)=>e(n,{...s,isStream:!0});for(const n of OD)e[n]=(s,i)=>e(s,{...i,method:n}),e.stream[n]=(s,i)=>e(s,{...i,method:n,isStream:!0});return t.mutableDefaults||(Object.freeze(t.handlers),t.options.freeze()),Object.defineProperty(e,"defaults",{value:t,writable:!1,configurable:!1,enumerable:!0}),e},PD={options:new ae,handlers:[],mutableDefaults:!1},RD=ys(PD);var TD=function(t,e){return e};const kD=v.getDefaultExportFromCjs(TD);function $D(t){const e=kD("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}var Fs={exports:{}},gs={},Xt={},de=vu,jD=process.cwd,Tt=null,LD=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Tt||(Tt=jD.call(process)),Tt};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var Zn=process.chdir;process.chdir=function(t){Tt=null,Zn.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Zn)}var ID=ND;function ND(t){de.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=s(t.chmodSync),t.fchmodSync=s(t.fchmodSync),t.lchmodSync=s(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(D,d,h){h&&process.nextTick(h)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(D,d,h,p){p&&process.nextTick(p)},t.lchownSync=function(){}),LD==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(D){function d(h,p,m){var f=Date.now(),F=0;D(h,p,function y(_){if(_&&(_.code==="EACCES"||_.code==="EPERM")&&Date.now()-f<6e4){setTimeout(function(){t.stat(p,function(C,P){C&&C.code==="ENOENT"?D(h,p,y):m(_)})},F),F<100&&(F+=10);return}m&&m(_)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,D),d}(t.rename)),t.read=typeof t.read!="function"?t.read:function(D){function d(h,p,m,f,F,y){var _;if(y&&typeof y=="function"){var C=0;_=function(P,I,G){if(P&&P.code==="EAGAIN"&&C<10)return C++,D.call(t,h,p,m,f,F,_);y.apply(this,arguments)}}return D.call(t,h,p,m,f,F,_)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,D),d}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(D){return function(d,h,p,m,f){for(var F=0;;)try{return D.call(t,d,h,p,m,f)}catch(y){if(y.code==="EAGAIN"&&F<10){F++;continue}throw y}}}(t.readSync);function e(D){D.lchmod=function(d,h,p){D.open(d,de.O_WRONLY|de.O_SYMLINK,h,function(m,f){if(m){p&&p(m);return}D.fchmod(f,h,function(F){D.close(f,function(y){p&&p(F||y)})})})},D.lchmodSync=function(d,h){var p=D.openSync(d,de.O_WRONLY|de.O_SYMLINK,h),m=!0,f;try{f=D.fchmodSync(p,h),m=!1}finally{if(m)try{D.closeSync(p)}catch{}else D.closeSync(p)}return f}}function r(D){de.hasOwnProperty("O_SYMLINK")&&D.futimes?(D.lutimes=function(d,h,p,m){D.open(d,de.O_SYMLINK,function(f,F){if(f){m&&m(f);return}D.futimes(F,h,p,function(y){D.close(F,function(_){m&&m(y||_)})})})},D.lutimesSync=function(d,h,p){var m=D.openSync(d,de.O_SYMLINK),f,F=!0;try{f=D.futimesSync(m,h,p),F=!1}finally{if(F)try{D.closeSync(m)}catch{}else D.closeSync(m)}return f}):D.futimes&&(D.lutimes=function(d,h,p,m){m&&process.nextTick(m)},D.lutimesSync=function(){})}function n(D){return D&&function(d,h,p){return D.call(t,d,h,function(m){l(m)&&(m=null),p&&p.apply(this,arguments)})}}function s(D){return D&&function(d,h){try{return D.call(t,d,h)}catch(p){if(!l(p))throw p}}}function i(D){return D&&function(d,h,p,m){return D.call(t,d,h,p,function(f){l(f)&&(f=null),m&&m.apply(this,arguments)})}}function u(D){return D&&function(d,h,p){try{return D.call(t,d,h,p)}catch(m){if(!l(m))throw m}}}function a(D){return D&&function(d,h,p){typeof h=="function"&&(p=h,h=null);function m(f,F){F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),p&&p.apply(this,arguments)}return h?D.call(t,d,h,m):D.call(t,d,m)}}function c(D){return D&&function(d,h){var p=h?D.call(t,d,h):D.call(t,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function l(D){if(!D||D.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(D.code==="EINVAL"||D.code==="EPERM"))}}var eu=le.Stream,qD=UD;function UD(t){return{ReadStream:e,WriteStream:r};function e(n,s){if(!(this instanceof e))return new e(n,s);eu.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),a=0,c=u.length;a<c;a++){var l=u[a];this[l]=s[l]}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(){i._read()});return}t.open(this.path,this.flags,this.mode,function(D,d){if(D){i.emit("error",D),i.readable=!1;return}i.fd=d,i.emit("open",d),i._read()})}function r(n,s){if(!(this instanceof r))return new r(n,s);eu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),u=0,a=i.length;u<a;u++){var c=i[u];this[c]=s[c]}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())}}var HD=zD,MD=Object.getPrototypeOf||function(t){return t.__proto__};function zD(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:MD(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var M=ge,GD=ID,WD=qD,VD=HD,vt=Me,Q,Ht;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Q=Symbol.for("graceful-fs.queue"),Ht=Symbol.for("graceful-fs.previous")):(Q="___graceful-fs.queue",Ht="___graceful-fs.previous");function JD(){}function Es(t,e){Object.defineProperty(t,Q,{get:function(){return e}})}var Be=JD;vt.debuglog?Be=vt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Be=function(){var t=vt.format.apply(vt,arguments);t="GFS4: "+t.split(/\n/).join(`
15
+ GFS4: `),console.error(t)});if(!M[Q]){var YD=v.commonjsGlobal[Q]||[];Es(M,YD),M.close=function(t){function e(r,n){return t.call(M,r,function(s){s||tu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Ht,{value:t}),e}(M.close),M.closeSync=function(t){function e(r){t.apply(M,arguments),tu()}return Object.defineProperty(e,Ht,{value:t}),e}(M.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Be(M[Q]),Gt.equal(M[Q].length,0)})}v.commonjsGlobal[Q]||Es(v.commonjsGlobal,M[Q]);var Cs=Wr(VD(M));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!M.__patched&&(Cs=Wr(M),M.__patched=!0);function Wr(t){GD(t),t.gracefulify=Wr,t.createReadStream=I,t.createWriteStream=G;var e=t.readFile;t.readFile=r;function r(E,x,w){return typeof x=="function"&&(w=x,x=null),T(E,x,w);function T(k,R,S,O){return e(k,R,function(A){A&&(A.code==="EMFILE"||A.code==="ENFILE")?Ie([T,[k,R,S],A,O||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return n(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Ie([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=u);function u(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return i(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Ie([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(E,x,w,T){return typeof w=="function"&&(T=w,w=0),k(E,x,w,T);function k(R,S,O,A,$){return a(R,S,O,function(B){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Ie([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var l=t.readdir;t.readdir=d;var D=/^v[0-5]\./;function d(E,x,w){typeof x=="function"&&(w=x,x=null);var T=D.test(process.version)?function(S,O,A,$){return l(S,k(S,O,A,$))}:function(S,O,A,$){return l(S,O,k(S,O,A,$))};return T(E,x,w);function k(R,S,O,A){return function($,B){$&&($.code==="EMFILE"||$.code==="ENFILE")?Ie([T,[R,S,O],$,A||Date.now(),Date.now()]):(B&&B.sort&&B.sort(),typeof O=="function"&&O.call(this,$,B))}}}if(process.version.substr(0,4)==="v0.8"){var h=WD(t);y=h.ReadStream,C=h.WriteStream}var p=t.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=_);var m=t.WriteStream;m&&(C.prototype=Object.create(m.prototype),C.prototype.open=P),Object.defineProperty(t,"ReadStream",{get:function(){return y},set:function(E){y=E},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return C},set:function(E){C=E},enumerable:!0,configurable:!0});var f=y;Object.defineProperty(t,"FileReadStream",{get:function(){return f},set:function(E){f=E},enumerable:!0,configurable:!0});var F=C;Object.defineProperty(t,"FileWriteStream",{get:function(){return F},set:function(E){F=E},enumerable:!0,configurable:!0});function y(E,x){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function _(){var E=this;ce(E.path,E.flags,E.mode,function(x,w){x?(E.autoClose&&E.destroy(),E.emit("error",x)):(E.fd=w,E.emit("open",w),E.read())})}function C(E,x){return this instanceof C?(m.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function P(){var E=this;ce(E.path,E.flags,E.mode,function(x,w){x?(E.destroy(),E.emit("error",x)):(E.fd=w,E.emit("open",w))})}function I(E,x){return new t.ReadStream(E,x)}function G(E,x){return new t.WriteStream(E,x)}var se=t.open;t.open=ce;function ce(E,x,w,T){return typeof w=="function"&&(T=w,w=null),k(E,x,w,T);function k(R,S,O,A,$){return se(R,S,O,function(B,Ws){B&&(B.code==="EMFILE"||B.code==="ENFILE")?Ie([k,[R,S,O,A],B,$||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}return t}function Ie(t){Be("ENQUEUE",t[0].name,t[1]),M[Q].push(t),Vr()}var Ot;function tu(){for(var t=Date.now(),e=0;e<M[Q].length;++e)M[Q][e].length>2&&(M[Q][e][3]=t,M[Q][e][4]=t);Vr()}function Vr(){if(clearTimeout(Ot),Ot=void 0,M[Q].length!==0){var t=M[Q].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Be("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Be("TIMEOUT",e.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-s,1),l=Math.min(c*1.2,100);a>=l?(Be("RETRY",e.name,r),e.apply(null,r.concat([s]))):M[Q].push(t)}Ot===void 0&&(Ot=setTimeout(Vr,0))}}var KD=v.commonjsGlobal&&v.commonjsGlobal.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.readCAFileSync=void 0;const QD=KD(Cs);function XD(t){try{const e=QD.default.readFileSync(t,"utf8"),r="-----END CERTIFICATE-----";return e.split(r).filter(s=>!!s.trim()).map(s=>`${s.trimLeft()}${r}`)}catch(e){if(e.code==="ENOENT")return;throw e}}Xt.readCAFileSync=XD;(function(t){var e=v.commonjsGlobal&&v.commonjsGlobal.__createBinding||(Object.create?function(n,s,i,u){u===void 0&&(u=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,u,a)}:function(n,s,i,u){u===void 0&&(u=i),n[u]=s[i]}),r=v.commonjsGlobal&&v.commonjsGlobal.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&e(s,n,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xt,t)})(gs);var bs={exports:{}},ZD=ws;function _e(t,e){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(t,e);t.__proto__=e}function ws(){this.list=[];var t=null;Object.defineProperty(this,"root",{get:function(){return t},set:function(e){t=e,this.list.length&&_e(this.list[this.list.length-1],e)},enumerable:!0,configurable:!0})}ws.prototype={get length(){return this.list.length},get keys(){var t=[];for(var e in this.list[0])t.push(e);return t},get snapshot(){var t={};return this.keys.forEach(function(e){t[e]=this.get(e)},this),t},get store(){return this.list[0]},push:function(t){return typeof t!="object"&&(t={valueOf:t}),this.list.length>=1&&_e(this.list[this.list.length-1],t),_e(t,this.root),this.list.push(t)},pop:function(){return this.list.length>=2&&_e(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(t){return _e(t,this.list[0]||this.root),this.list.unshift(t)},shift:function(){return this.list.length===1&&_e(this.list[0],this.root),this.list.shift()},get:function(t){return this.list[0][t]},set:function(t,e,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(t)&&this.push({}),this.list[0][t]=e},forEach:function(t,e){for(var r in this.list[0])t.call(e,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var t=this.list.splice.apply(this.list,arguments),e=0,r=this.list.length;e<r;e++)_e(this.list[e],this.list[e+1]||this.root);return t}};var Se={};Se.parse=Se.decode=el;Se.stringify=Se.encode=_s;Se.safe=qe;Se.unsafe=kt;var Fr=typeof process<"u"&&process.platform==="win32"?`\r
16
+ `:`
17
+ `;function _s(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var s=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(i,u,a){var c=t[i];c&&Array.isArray(c)?c.forEach(function(l){n+=qe(i+"[]")+s+qe(l)+`
18
+ `}):c&&typeof c=="object"?r.push(i):n+=qe(i)+s+qe(c)+Fr}),e.section&&n.length&&(n="["+qe(e.section)+"]"+Fr+n),r.forEach(function(i,u,a){var c=xs(i).join("\\."),l=(e.section?e.section+".":"")+c,D=_s(t[i],{section:l,whitespace:e.whitespace});n.length&&D.length&&(n+=Fr),n+=D}),n}function xs(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function el(t){var e={},r=e,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,i=t.split(/[\r\n]+/g);return i.forEach(function(u,a,c){if(!(!u||u.match(/^\s*[;#]/))){var l=u.match(s);if(l){if(l[1]!==void 0){if(n=kt(l[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var D=kt(l[2]);if(D!=="__proto__"){var d=l[3]?kt(l[4]):!0;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}if(D.length>2&&D.slice(-2)==="[]"){if(D=D.substring(0,D.length-2),D==="__proto__")return;r[D]?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]}Array.isArray(r[D])?r[D].push(d):r[D]=d}}}}),Object.keys(e).filter(function(u,a,c){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var l=xs(u),D=e,d=l.pop(),h=d.replace(/\\\./g,".");return l.forEach(function(p,m,f){p!=="__proto__"&&((!D[p]||typeof D[p]!="object")&&(D[p]={}),D=D[p])}),D===e&&h===d?!1:(D[h]=e[u],!0)}).forEach(function(u,a,c){delete e[u]}),e}function As(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function qe(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&As(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function kt(t,e){if(t=(t||"").trim(),As(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",s=0,i=t.length;s<i;s++){var u=t.charAt(s);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t}var Bs=ZD,st=V,Zt=ge,Or=Se,Pr=ct.EventEmitter,tl=Oe,rl=Jt,Re=bs.exports=function(){for(var t=[].slice.call(arguments),e=new X;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?ul(r):r)}return e};Re.find=function(){var t=st.join.apply(null,[].slice.call(arguments));function e(r,n){var s=st.join(r,n);try{return Zt.statSync(s),s}catch{if(st.dirname(r)!==r)return e(st.dirname(r),n)}}return e(__dirname,t)};var nl=Re.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return Or.parse(t);else try{return JSON.parse(t)}catch{return Or.parse(t)}},ul=Re.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=st.join.apply(null,t),r;try{r=Zt.readFileSync(e,"utf-8")}catch{return}return nl(r,e,"json")};Re.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var s in e)s.indexOf(t)===0&&(r[s.substring(n)]=e[s]);return r};Re.ConfigChain=X;function X(){Pr.apply(this),Bs.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var Ss={constructor:{value:X}};Object.keys(Pr.prototype).forEach(function(t){Ss[t]=Object.getOwnPropertyDescriptor(Pr.prototype,t)});X.prototype=Object.create(Bs.prototype,Ss);X.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,s=this.list.length;n<s;n++)delete this.list[n][t];return this};X.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};X.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};X.prototype.save=function(t,i,r){typeof i=="function"&&(r=i,i=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var s=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[s+a]=n.data[a]}),this}var i=i||n.type,u=n.data;return n.type==="json"?u=JSON.stringify(u):u=Or.stringify(u),this._saving++,Zt.writeFile(n.path,u,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};X.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),Zt.readFile(t,"utf8",function(s,i){s&&this.emit("error",s),this.addString(i,t,e,n)}.bind(this)),this};X.prototype.addEnv=function(t,e,r){r=r||"env";var n=Re.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};X.prototype.addUrl=function(t,e,r){this._await();var n=tl.format(t);r=r||n;var s={__source__:r};return this.sources[r]={href:n,type:e},this.push(s),rl.request(t,function(i){var u=[],a=i.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,s.type=e),i.on("data",u.push.bind(u)).on("end",function(){this.addString(Buffer.concat(u),n,e,s)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};X.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};X.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};X.prototype.parse=Re.parse;X.prototype._await=function(){this._awaiting++};X.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)};var sl=bs.exports,il=function(t){const e=t.indexOf(":");if(e===-1)return gr(t);const r=t.substr(0,e),n=t.substr(e+1);return`${gr(r)}:${gr(n)}`};function gr(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}var er={},vs={},tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.envReplace=void 0;const ol=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function al(t,e){return t.replace(ol,cl.bind(null,e))}tr.envReplace=al;function cl(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);const s=ll(t,n);if(s===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${s}`}const Dl=/([^:-]+)(:?)-(.+)/;function ll(t,e){const r=e.match(Dl);if(!r)return t[e];const[,n,s,i]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&s?i:t[n]:i}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.envReplace=void 0;var e=tr;Object.defineProperty(t,"envReplace",{enumerable:!0,get:function(){return e.envReplace}})})(vs);const fl=ge,xe=V,{envReplace:Os}=vs,hl=(t,e,r)=>{if(typeof e!="string")return e;const n=[].concat(t[r]),s=n.indexOf(xe)!==-1,i=n.indexOf(Boolean)!==-1,u=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(i&&!u&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=Os(e,process.env),s&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=xe.resolve(process.env.HOME,e.substr(2))),e=xe.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},dl=t=>{t=xe.resolve(t);let e=!1;for(;xe.basename(t)==="node_modules";)t=xe.dirname(t),e=!0;if(e)return t;const r=(n,s)=>{const i=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&i.test(n))return s;try{const u=fl.readdirSync(n);if(u.includes("node_modules")||u.includes("package.json")||u.includes("package.json5")||u.includes("package.yaml")||u.includes("pnpm-workspace.yaml"))return n;const a=xe.dirname(n);return a===n?s:r(a,s)}catch(u){if(n===s){if(u.code==="ENOENT")return s;throw u}return s}};return r(t,t)};er.envReplace=Os;er.findPrefix=dl;er.parseField=hl;var Er={},ru;function pl(){if(ru)return Er;ru=1;const t=V,e=le.Stream,r=Oe,n=()=>{},s=()=>[],i=()=>{};return Er.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,r],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":["",r],"init-license":String,"init-version":i,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":s(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:e,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,i],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,r],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,r],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:n,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean},Er}const{readCAFileSync:ml}=gs,nu=ge,Cr=V,{ConfigChain:yl}=sl,Fl=il,uu=er;class gl extends yl{constructor(e,r){super(e),this.root=e,this._parseField=uu.parseField.bind(null,r||pl())}add(e,r){try{for(const n of Object.keys(e))e[n]=this._parseField(e[n],n)}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;const n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{const s=nu.readFileSync(e,"utf8");this.addString(s,e,"ini",n)}catch(s){if(s.code==="ENOENT")this.add({},n);else return`Issue while reading "${e}". ${s.message}`}}addEnv(e){e=e||process.env;const r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{e[n]&&(r[Fl(n.substr(11))]=e[n])}),super.addEnv("",r,"env")}loadPrefix(){const e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{const s=this.get("global");this[s?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>Cr.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=Cr.resolve(e.prefix);else try{r=uu.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;const r=ml(e);r&&this.set("ca",r)}loadUser(){const e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}const r=Cr.resolve(this.get("prefix"));try{const n=nu.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}}var El=gl,Ps={};(function(t){const e=zt,r=V,n=e.tmpdir(),s=process.getuid?process.getuid():process.pid,i=()=>!0,u=process.platform==="win32",a={editor:()=>process.env.EDITOR||process.env.VISUAL||(u?"notepad.exe":"vi"),shell:()=>u?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},c={fromString:()=>process.umask()};let l=e.homedir();l?process.env.HOME=l:l=r.resolve(n,"npm-"+s);const D=process.platform==="win32"?"npm-cache":".npm",d=process.platform==="win32"&&process.env.APPDATA||l,h=r.resolve(d,D);let p,m;Object.defineProperty(t,"defaults",{get:function(){return p||(process.env.PREFIX?m=process.env.PREFIX:process.platform==="win32"?m=r.dirname(process.execPath):(m=r.dirname(r.dirname(process.execPath)),process.env.DESTDIR&&(m=r.join(process.env.DESTDIR,m))),p={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:h,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:a.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:r.resolve(m,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":r.resolve(l,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:m,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:a.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:n,unicode:i(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:r.resolve(l,".npmrc"),umask:process.umask?process.umask():c.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},p)}})})(Ps);(function(t){const e=V,r=El,n=Ps;t.exports=(s,i,u)=>{const a=new r(Object.assign({},n.defaults,u),i);a.add(Object.assign({},s),"cli");const c=[];let l=!1;if(require.resolve.paths){const p=require.resolve.paths("npm");let m;try{m=require.resolve("npm",{paths:p.slice(-1)})}catch{l=!0}m&&c.push(a.addFile(e.resolve(e.dirname(m),"..","npmrc"),"builtin"))}a.addEnv(),a.loadPrefix();const D=e.resolve(a.localPrefix,".npmrc"),d=a.get("userconfig");if(!a.get("global")&&D!==d?c.push(a.addFile(D,"project")):a.add({},"project"),a.get("workspace-prefix")&&a.get("workspace-prefix")!==D){const p=e.resolve(a.get("workspace-prefix"),".npmrc");c.push(a.addFile(p,"workspace"))}if(c.push(a.addFile(a.get("userconfig"),"user")),a.get("prefix")){const p=e.resolve(a.get("prefix"),"etc");a.root.globalconfig=e.resolve(p,"npmrc"),a.root.globalignorefile=e.resolve(p,"npmignore")}c.push(a.addFile(a.get("globalconfig"),"global")),a.loadUser();const h=a.get("cafile");return h&&a.loadCAFile(h),{config:a,warnings:c.filter(Boolean),failedToLoadBuiltInConfig:l}},Object.defineProperty(t.exports,"defaults",{get(){return n.defaults},enumerable:!0})})(Fs);var Cl=Fs.exports;const br=Oe,su=Cl,iu=":_authToken",ou=":_auth",au=":username",cu=":_password";var bl=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};const n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:s=>n[s]}}:su()).config,e=e||r.npmrc.get("registry")||su.defaults.registry,Rs(e,r)||wl(r.npmrc)};function Rs(t,e){const r=br.parse(t,!1,!0);let n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";const s="//"+r.host+n.replace(/\/$/,""),i=xl(s,e.npmrc);if(i)return i;if(!e.recursive)return/\/$/.test(t)?void 0:Rs(br.resolve(t,"."),e);r.pathname=br.resolve(_l(n),"..")||"/"}}function wl(t){return t.get("_auth")?{token:rr(t.get("_auth")),type:"Basic"}:void 0}function _l(t){return t[t.length-1]==="/"?t:t+"/"}function xl(t,e){const r=Al(e.get(t+iu)||e.get(t+"/"+iu));if(r)return r;const n=e.get(t+au)||e.get(t+"/"+au),s=e.get(t+cu)||e.get(t+"/"+cu),i=Bl(n,s);if(i)return i;const u=Sl(e.get(t+ou)||e.get(t+"/"+ou));if(u)return u}function rr(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Al(t){return t?{token:rr(t),type:"Bearer"}:void 0}function Bl(t,e){if(!t||!e)return;const r=Buffer.from(rr(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function Sl(t){return t?{token:rr(t),type:"Basic"}:void 0}const vl=v.getDefaultExportFromCjs(bl),Ts={keepAlive:!0,maxSockets:50},Ol=new it.Agent(Ts),Pl=new Ou.Agent(Ts);class Rl extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name="PackageNotFoundError"}}class Tl extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`),this.name="VersionNotFoundError"}}async function kl(t,e){e={version:"latest",...e};const r=t.split("/")[0],n=e.registryUrl||$D(r),s=new URL(encodeURIComponent(t).replace(/^%40/,"@"),n),i=vl(n.toString(),{recursive:!0}),u={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete u.accept,i&&(u.authorization=`${i.type} ${i.token}`);const a={headers:u,agent:{http:Ol,https:Pl}};e.agent&&(a.agent=e.agent);let c;try{c=await RD(s,a).json()}catch(d){throw d?.response?.statusCode===404?new Rl(t):d}if(e.allVersions)return c;let{version:l}=e;const D=new Tl(t,l);if(c["dist-tags"][l]){const d=c.time;c=c.versions[c["dist-tags"][l]],c.time=d}else if(l){if(!c.versions[l]){const h=Object.keys(c.versions);if(l=v.semver.maxSatisfying(h,l),!l)throw D}const d=c.time;if(c=c.versions[l],c.time=d,!c)throw D}return c}async function $l(t,e){const{version:r}=await kl(t.toLowerCase(),e);return r}const Du=z.env.npm_package_json,Mt=z.env.npm_config_user_agent,jl=!!(Mt&&Mt.startsWith("npm")),Ll=!!(Du&&Du.endsWith("package.json")),Il=jl||Ll,Nl=!!(Mt&&Mt.startsWith("yarn")),ql=Il||Nl;var ks={};const{hasOwnProperty:wr}=Object.prototype,_r=typeof process<"u"&&process.platform==="win32"?`\r
19
+ `:`
20
+ `,Rr=(t,e)=>{const r=[];let n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||Object.create(null),e.whitespace=e.whitespace===!0);const s=e.whitespace?" = ":"=";for(const i of Object.keys(t)){const u=t[i];if(u&&Array.isArray(u))for(const a of u)n+=Ue(i+"[]")+s+Ue(a)+`
21
+ `;else u&&typeof u=="object"?r.push(i):n+=Ue(i)+s+Ue(u)+_r}e.section&&n.length&&(n="["+Ue(e.section)+"]"+_r+n);for(const i of r){const u=$s(i).join("\\."),a=(e.section?e.section+".":"")+u,{whitespace:c}=e,l=Rr(t[i],{section:a,whitespace:c});n.length&&l.length&&(n+=_r),n+=l}return n},$s=t=>t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(e=>e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),lu=t=>{const e=Object.create(null);let r=e,n=null;const s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,i=t.split(/[\r\n]+/g);for(const a of i){if(!a||a.match(/^\s*[;#]/))continue;const c=a.match(s);if(!c)continue;if(c[1]!==void 0){if(n=$t(c[1]),n==="__proto__"){r=Object.create(null);continue}r=e[n]=e[n]||Object.create(null);continue}const l=$t(c[2]),D=l.length>2&&l.slice(-2)==="[]",d=D?l.slice(0,-2):l;if(d==="__proto__")continue;const h=c[3]?$t(c[4]):!0,p=h==="true"||h==="false"||h==="null"?JSON.parse(h):h;D&&(wr.call(r,d)?Array.isArray(r[d])||(r[d]=[r[d]]):r[d]=[]),Array.isArray(r[d])?r[d].push(p):r[d]=p}const u=[];for(const a of Object.keys(e)){if(!wr.call(e,a)||typeof e[a]!="object"||Array.isArray(e[a]))continue;const c=$s(a);let l=e;const D=c.pop(),d=D.replace(/\\\./g,".");for(const h of c)h!=="__proto__"&&((!wr.call(l,h)||typeof l[h]!="object")&&(l[h]=Object.create(null)),l=l[h]);l===e&&d===D||(l[d]=e[a],u.push(a))}for(const a of u)delete e[a];return e},js=t=>t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'",Ue=t=>typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&js(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#"),$t=(t,e)=>{if(t=(t||"").trim(),js(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{let r=!1,n="";for(let s=0,i=t.length;s<i;s++){const u=t.charAt(s);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t};var Ul={parse:lu,decode:lu,stringify:Rr,encode:Rr,safe:Ue,unsafe:$t};(function(t){const e=V,r=zt,n=ge,s=Ul,i=process.platform==="win32",u=f=>{try{return s.parse(n.readFileSync(f,"utf8")).prefix}catch{}},a=()=>Object.keys(process.env).reduce((f,F)=>/^npm_config_prefix$/i.test(F)?process.env[F]:f,void 0),c=()=>{if(i&&process.env.APPDATA)return e.join(process.env.APPDATA,"/npm/etc/npmrc");if(process.execPath.includes("/Cellar/node")){const f=process.execPath.slice(0,process.execPath.indexOf("/Cellar/node"));return e.join(f,"/lib/node_modules/npm/npmrc")}if(process.execPath.endsWith("/bin/node")){const f=e.dirname(e.dirname(process.execPath));return e.join(f,"/etc/npmrc")}},l=()=>{if(i){const{APPDATA:f}=process.env;return f?e.join(f,"npm"):e.dirname(process.execPath)}return e.dirname(e.dirname(process.execPath))},D=()=>{const f=a();if(f)return f;const F=u(e.join(r.homedir(),".npmrc"));if(F)return F;if(process.env.PREFIX)return process.env.PREFIX;const y=u(c());return y||l()},d=e.resolve(D()),h=()=>{if(i&&process.env.LOCALAPPDATA){const f=e.join(process.env.LOCALAPPDATA,"Yarn");if(n.existsSync(f))return f}return!1},p=()=>{if(process.env.PREFIX)return process.env.PREFIX;const f=h();if(f)return f;const F=e.join(r.homedir(),".config/yarn");if(n.existsSync(F))return F;const y=e.join(r.homedir(),".yarn-config");return n.existsSync(y)?y:d};t.npm={},t.npm.prefix=d,t.npm.packages=e.join(d,i?"node_modules":"lib/node_modules"),t.npm.binaries=i?d:e.join(d,"bin");const m=e.resolve(p());t.yarn={},t.yarn.prefix=m,t.yarn.packages=e.join(m,h()?"Data/global/node_modules":"global/node_modules"),t.yarn.binaries=e.join(t.yarn.packages,".bin")})(ks);const xr=V;var Hl=(t,e)=>{const r=xr.relative(e,t);return!!(r&&r!==".."&&!r.startsWith(`..${xr.sep}`)&&r!==xr.resolve(t))};const Ml=ge,fu=ks,hu=Hl;var zl=(()=>{try{return hu(__dirname,fu.yarn.packages)||hu(__dirname,Ml.realpathSync(fu.npm.packages))}catch{return!1}})();const Gl=v.getDefaultExportFromCjs(zl);var Ls={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var s=n.charCodeAt(0),i=n.length==2?n.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=i&&i<=57343&&(s&=1023,i&=1023,u=s<<10|i,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(n){var s=this.eastAsianWidth(n);return s=="F"||s=="W"||s=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var s=r(n),i=0,u=0;u<s.length;u++)i=i+this.characterLength(s[u]);return i},e.slice=function(n,s,i){textLen=e.length(n),s=s||0,i=i||1,s<0&&(s=textLen+s),i<0&&(i=textLen+i);for(var u="",a=0,c=r(n),l=0;l<c.length;l++){var D=c[l],d=e.length(D);if(a>=s-(d==2?1:0))if(a+d<=i)u+=D;else break;a+=d}return u}})(Ls);var Wl=Ls.exports;const Vl=v.getDefaultExportFromCjs(Wl);var Jl=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const Yl=v.getDefaultExportFromCjs(Jl);function ne(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=Ru.default(t),t.length===0))return 0;t=t.replace(Yl()," ");const r=e.ambiguousIsNarrow?1:2;let n=0;for(const s of t){const i=s.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(Vl.eastAsianWidth(s)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function Is(t){let e=0;for(const r of t.split(`
22
+ `))e=Math.max(e,ne(r));return e}var Jr={exports:{}};const Kl={topLeft:"┌",top:"─",topRight:"┐",right:"│",bottomRight:"┘",bottom:"─",bottomLeft:"└",left:"│"},Ql={topLeft:"╔",top:"═",topRight:"╗",right:"║",bottomRight:"╝",bottom:"═",bottomLeft:"╚",left:"║"},Xl={topLeft:"╭",top:"─",topRight:"╮",right:"│",bottomRight:"╯",bottom:"─",bottomLeft:"╰",left:"│"},Zl={topLeft:"┏",top:"━",topRight:"┓",right:"┃",bottomRight:"┛",bottom:"━",bottomLeft:"┗",left:"┃"},ef={topLeft:"╓",top:"─",topRight:"╖",right:"║",bottomRight:"╜",bottom:"─",bottomLeft:"╙",left:"║"},tf={topLeft:"╒",top:"═",topRight:"╕",right:"│",bottomRight:"╛",bottom:"═",bottomLeft:"╘",left:"│"},rf={topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},nf={topLeft:"↘",top:"↓",topRight:"↙",right:"←",bottomRight:"↖",bottom:"↑",bottomLeft:"↗",left:"→"},uf={single:Kl,double:Ql,round:Xl,bold:Zl,singleDouble:ef,doubleSingle:tf,classic:rf,arrow:nf},Ns=uf;Jr.exports=Ns;Jr.exports.default=Ns;var sf=Jr.exports;const of=v.getDefaultExportFromCjs(sf),af=/[\p{Lu}]/u,cf=/[\p{Ll}]/u,du=/^[\p{Lu}](?![\p{Lu}])/gu,qs=/([\p{Alpha}\p{N}_]|$)/u,Yr=/[_.\- ]+/,Df=new RegExp("^"+Yr.source),pu=new RegExp(Yr.source+qs.source,"gu"),mu=new RegExp("\\d+"+qs.source,"gu"),lf=(t,e,r,n)=>{let s=!1,i=!1,u=!1,a=!1;for(let c=0;c<t.length;c++){const l=t[c];a=c>2?t[c-3]==="-":!0,s&&af.test(l)?(t=t.slice(0,c)+"-"+t.slice(c),s=!1,u=i,i=!0,c++):i&&u&&cf.test(l)&&(!a||n)?(t=t.slice(0,c-1)+"-"+t.slice(c-1),u=i,i=!1,s=!0):(s=e(l)===l&&r(l)!==l,u=i,i=r(l)===l&&e(l)!==l)}return t},ff=(t,e)=>(du.lastIndex=0,t.replace(du,r=>e(r))),hf=(t,e)=>(pu.lastIndex=0,mu.lastIndex=0,t.replace(pu,(r,n)=>e(n)).replace(mu,r=>e(r)));function df(t,e){if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(i=>i.trim()).filter(i=>i.length).join("-"):t=t.trim(),t.length===0)return"";const r=e.locale===!1?i=>i.toLowerCase():i=>i.toLocaleLowerCase(e.locale),n=e.locale===!1?i=>i.toUpperCase():i=>i.toLocaleUpperCase(e.locale);return t.length===1?Yr.test(t)?"":e.pascalCase?n(t):r(t):(t!==r(t)&&(t=lf(t,r,n,e.preserveConsecutiveUppercase)),t=t.replace(Df,""),t=e.preserveConsecutiveUppercase?ff(t,r):r(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),hf(t,n))}var Kr={exports:{}},pf=({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[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?void 0:"g")};const mf=pf;var yf=t=>typeof t=="string"?t.replace(mf(),""):t,Ff=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const gf=yf,Ef=v.isFullwidthCodePointExports,Cf=Ff,Us=t=>{if(typeof t!="string"||t.length===0||(t=gf(t),t.length===0))return 0;t=t.replace(Cf()," ");let e=0;for(let r=0;r<t.length;r++){const n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=Ef(n)?2:1)}return e};Kr.exports=Us;Kr.exports.default=Us;var bf=Kr.exports;const wf=bf;function ve(t,e){if(!t)return t;e=e||{};const r=e.align||"center";if(r==="left")return t;const n=e.split||`
23
+ `,s=e.pad||" ",i=r!=="right"?xf:Af;let u=!1;Array.isArray(t)||(u=!0,t=String(t).split(n));let a,c=0;return t=t.map(function(l){return l=String(l),a=wf(l),c=Math.max(a,c),{str:l,width:a}}).map(function(l){return new Array(i(c,l.width)+1).join(s)+l.str}),u?t.join(n):t}ve.left=function(e){return ve(e,{align:"left"})};ve.center=function(e){return ve(e,{align:"center"})};ve.right=function(e){return ve(e,{align:"right"})};var _f=ve;function xf(t,e){return Math.floor((t-e)/2)}function Af(t,e){return t-e}const yu=v.getDefaultExportFromCjs(_f),Ar=10,Fu=(t=0)=>e=>`\x1B[${e+t}m`,gu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Eu=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(q.modifier);const Bf=Object.keys(q.color),Sf=Object.keys(q.bgColor);[...Bf,...Sf];function vf(){const t=new Map;for(const[e,r]of Object.entries(q)){for(const[n,s]of Object.entries(r))q[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=q[n],t.set(s[0],s[1]);Object.defineProperty(q,e,{value:r,enumerable:!1})}return Object.defineProperty(q,"codes",{value:t,enumerable:!1}),q.color.close="\x1B[39m",q.bgColor.close="\x1B[49m",q.color.ansi=Fu(),q.color.ansi256=gu(),q.color.ansi16m=Eu(),q.bgColor.ansi=Fu(Ar),q.bgColor.ansi256=gu(Ar),q.bgColor.ansi16m=Eu(Ar),Object.defineProperties(q,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));const s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>q.rgbToAnsi256(...q.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,s;if(e>=232)r=((e-232)*10+8)/255,n=r,s=r;else{e-=16;const a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,s=a%6/5}const i=Math.max(r,n,s)*2;if(i===0)return 30;let u=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>q.ansi256ToAnsi(q.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>q.ansi256ToAnsi(q.hexToAnsi256(e)),enumerable:!1}}),q}const Of=vf(),nr=new Set(["\x1B","›"]),Pf=39,Qr="\x07",Hs="[",Rf="]",Ms="m",Xr=`${Rf}8;;`,Cu=t=>`${nr.values().next().value}${Hs}${t}${Ms}`,bu=t=>`${nr.values().next().value}${Xr}${t}${Qr}`,Tf=t=>t.split(" ").map(e=>ne(e)),Br=(t,e,r)=>{const n=[...e];let s=!1,i=!1,u=ne(Ru.default(t[t.length-1]));for(const[a,c]of n.entries()){const l=ne(c);if(u+l<=r?t[t.length-1]+=c:(t.push(c),u=0),nr.has(c)&&(s=!0,i=n.slice(a+1).join("").startsWith(Xr)),s){i?c===Qr&&(s=!1,i=!1):c===Ms&&(s=!1);continue}u+=l,u===r&&a<n.length-1&&(t.push(""),u=0)}!u&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},kf=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&!(ne(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},$f=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",s,i;const u=Tf(t);let a=[""];for(const[l,D]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=ne(a[a.length-1]);if(l!==0&&(d>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&u[l]>e){const h=e-d,p=1+Math.floor((u[l]-h-1)/e);Math.floor((u[l]-1)/e)<p&&a.push(""),Br(a,D,e);continue}if(d+u[l]>e&&d>0&&u[l]>0){if(r.wordWrap===!1&&d<e){Br(a,D,e);continue}a.push("")}if(d+u[l]>e&&r.wordWrap===!1){Br(a,D,e);continue}a[a.length-1]+=D}r.trim!==!1&&(a=a.map(l=>kf(l)));const c=[...a.join(`
24
+ `)];for(const[l,D]of c.entries()){if(n+=D,nr.has(D)){const{groups:h}=new RegExp(`(?:\\${Hs}(?<code>\\d+)m|\\${Xr}(?<uri>.*)${Qr})`).exec(c.slice(l).join(""))||{groups:{}};if(h.code!==void 0){const p=Number.parseFloat(h.code);s=p===Pf?void 0:p}else h.uri!==void 0&&(i=h.uri.length===0?void 0:h.uri)}const d=Of.codes.get(Number(s));c[l+1]===`
25
+ `?(i&&(n+=bu("")),s&&d&&(n+=Cu(d))):D===`
26
+ `&&(s&&d&&(n+=Cu(s)),i&&(n+=bu(i)))}return n};function zs(t,e,r){return String(t).normalize().replace(/\r\n/g,`
27
+ `).split(`
28
+ `).map(n=>$f(n,e,r)).join(`
29
+ `)}const me=`
30
+ `,Z=" ",ot="none",Gs=()=>{const{env:t,stdout:e,stderr:r}=z;return e?.columns?e.columns:r?.columns?r.columns:t.COLUMNS?Number.parseInt(t.COLUMNS,10):80},wu=t=>typeof t=="number"?{top:t,right:t*3,bottom:t,left:t*3}:{top:0,right:0,bottom:0,left:0,...t},at=t=>t===ot?0:2,jf=t=>{const e=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"];let r;if(t===ot){t={};for(const n of e)t[n]=""}if(typeof t=="string"){if(r=of[t],!r)throw new TypeError(`Invalid border style: ${t}`)}else{typeof t?.vertical=="string"&&(t.left=t.vertical,t.right=t.vertical),typeof t?.horizontal=="string"&&(t.top=t.horizontal,t.bottom=t.horizontal);for(const n of e)if(t[n]===null||typeof t[n]!="string")throw new TypeError(`Invalid border style: ${n}`);r=t}return r},Lf=(t,e,r)=>{let n="";const s=ne(t);switch(r){case"left":{n=t+e.slice(s);break}case"right":{n=e.slice(s)+t;break}default:{e=e.slice(s),e.length%2===1?(e=e.slice(Math.floor(e.length/2)),n=e.slice(1)+t+e):(e=e.slice(e.length/2),n=e+t+e);break}}return n},If=(t,{padding:e,width:r,textAlignment:n,height:s})=>{t=yu(t,{align:n});let i=t.split(me);const u=Is(t),a=r-e.left-e.right;if(u>a){const D=[];for(const d of i){const h=zs(d,a,{hard:!0}),m=yu(h,{align:n}).split(`
31
+ `),f=Math.max(...m.map(F=>ne(F)));for(const F of m){let y;switch(n){case"center":{y=Z.repeat((a-f)/2)+F;break}case"right":{y=Z.repeat(a-f)+F;break}default:{y=F;break}}D.push(y)}}i=D}n==="center"&&u<a?i=i.map(D=>Z.repeat((a-u)/2)+D):n==="right"&&u<a&&(i=i.map(D=>Z.repeat(a-u)+D));const c=Z.repeat(e.left),l=Z.repeat(e.right);return i=i.map(D=>c+D+l),i=i.map(D=>{if(r-ne(D)>0)switch(n){case"center":return D+Z.repeat(r-ne(D));case"right":return D+Z.repeat(r-ne(D));default:return D+Z.repeat(r-ne(D))}return D}),e.top>0&&(i=[...Array.from({length:e.top}).fill(Z.repeat(r)),...i]),e.bottom>0&&(i=[...i,...Array.from({length:e.bottom}).fill(Z.repeat(r))]),s&&i.length>s?i=i.slice(0,s):s&&i.length<s&&(i=[...i,...Array.from({length:s-i.length}).fill(Z.repeat(r))]),i.join(me)},Nf=(t,e,r)=>{const n=D=>{const d=r.borderColor?Hf(r.borderColor)(D):D;return r.dimBorder?ue.default.dim(d):d},s=D=>r.backgroundColor?Mf(r.backgroundColor)(D):D,i=jf(r.borderStyle),u=Gs();let a=Z.repeat(r.margin.left);if(r.float==="center"){const D=Math.max((u-e-at(r.borderStyle))/2,0);a=Z.repeat(D)}else if(r.float==="right"){const D=Math.max(u-e-r.margin.right-at(r.borderStyle),0);a=Z.repeat(D)}let c="";r.margin.top&&(c+=me.repeat(r.margin.top)),(r.borderStyle!==ot||r.title)&&(c+=n(a+i.topLeft+(r.title?Lf(r.title,i.top.repeat(e),r.titleAlignment):i.top.repeat(e))+i.topRight)+me);const l=t.split(me);return c+=l.map(D=>a+n(i.left)+s(D)+n(i.right)).join(me),r.borderStyle!==ot&&(c+=me+n(a+i.bottomLeft+i.bottom.repeat(e)+i.bottomRight)),r.margin.bottom&&(c+=me.repeat(r.margin.bottom)),c},qf=t=>{if(t.fullscreen&&z?.stdout){let e=[z.stdout.columns,z.stdout.rows];typeof t.fullscreen=="function"&&(e=t.fullscreen(...e)),t.width||(t.width=e[0]),t.height||(t.height=e[1])}return t.width&&(t.width=Math.max(1,t.width-at(t.borderStyle))),t.height&&(t.height=Math.max(1,t.height-at(t.borderStyle))),t},_u=(t,e)=>e===ot?t:` ${t} `,Uf=(t,e)=>{e=qf(e);const r=e.width!==void 0,n=Gs(),s=at(e.borderStyle),i=n-e.margin.left-e.margin.right-s,u=Is(zs(t,n-s,{hard:!0,trim:!1}))+e.padding.left+e.padding.right;if(e.title&&r?(e.title=e.title.slice(0,Math.max(0,e.width-2)),e.title&&(e.title=_u(e.title,e.borderStyle))):e.title&&(e.title=e.title.slice(0,Math.max(0,i-2)),e.title&&(e.title=_u(e.title,e.borderStyle),ne(e.title)>u&&(e.width=ne(e.title)))),e.width=e.width?e.width:u,!r){if(e.margin.left&&e.margin.right&&e.width>i){const c=(n-e.width-s)/(e.margin.left+e.margin.right);e.margin.left=Math.max(0,Math.floor(e.margin.left*c)),e.margin.right=Math.max(0,Math.floor(e.margin.right*c))}e.width=Math.min(e.width,n-s-e.margin.left-e.margin.right)}return e.width-(e.padding.left+e.padding.right)<=0&&(e.padding.left=0,e.padding.right=0),e.height&&e.height-(e.padding.top+e.padding.bottom)<=0&&(e.padding.top=0,e.padding.bottom=0),e},Zr=t=>t.match(/^#(?:[0-f]{3}){1,2}$/i),xu=t=>typeof t=="string"&&(ue.default[t]??Zr(t)),Hf=t=>Zr(t)?ue.default.hex(t):ue.default[t],Mf=t=>Zr(t)?ue.default.bgHex(t):ue.default[df(["bg",t])];function Au(t,e){if(e={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...e},e.align&&(e.textAlignment=e.align),e.borderColor&&!xu(e.borderColor))throw new Error(`${e.borderColor} is not a valid borderColor`);if(e.backgroundColor&&!xu(e.backgroundColor))throw new Error(`${e.backgroundColor} is not a valid backgroundColor`);return e.padding=wu(e.padding),e.margin=wu(e.margin),e=Uf(t,e),t=If(t,e),Nf(t,e.width,e)}const zf=z.env.CI!=="0"&&z.env.CI!=="false"&&("CI"in z.env||"CONTINUOUS_INTEGRATION"in z.env||Object.keys(z.env).some(t=>t.startsWith("CI_"))),Gf=zf,Bu=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function Wf(t,...e){if(typeof t=="string")return Bu(t);let r=t[0];for(const[n,s]of e.entries())r=r+Bu(String(s))+t[n+1];return r}class Vf extends Error{constructor(e){super(`Missing a value for ${e?`the placeholder: ${e}`:"a placeholder"}`,e),this.name="MissingValueError",this.key=e}}function Jf(t,e,{ignoreMissing:r=!1,transform:n=({value:s})=>s}={}){if(typeof t!="string")throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof t}\``);if(typeof e!="object")throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof e}\``);const s=(c,l)=>{let D=e;for(const h of l.split("."))D=D?D[h]:void 0;const d=n({value:D,key:l});if(d===void 0){if(r)return c;throw new Vf(l)}return String(d)},i=c=>(...l)=>Wf(c(...l)),u=/{{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}}/gi;u.test(t)&&(t=t.replace(u,i(s)));const a=/{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}/gi;return t.replace(a,s)}const Yf=Su.dirname(re.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:en&&en.src||new URL("index-DgVn3Gax.js",document.baseURI).href)),Kf=1e3*60*60*24;class Qf{config;update;_packageName;_shouldNotifyInNpmScript;#t;#e;#n;#r;constructor(e={}){if(this.#t=e,e.pkg=e.pkg??{},e.distTag=e.distTag??"latest",e.pkg={name:e.pkg.name??e.packageName,version:e.pkg.version??e.packageVersion},!e.pkg.name||!e.pkg.version)throw new Error("pkg.name and pkg.version required");if(this._packageName=e.pkg.name,this.#e=e.pkg.version,this.#n=typeof e.updateCheckInterval=="number"?e.updateCheckInterval:Kf,this.#r="NO_UPDATE_NOTIFIER"in z.env||z.env.NODE_ENV==="test"||z.argv.includes("--no-update-notifier")||Gf,this._shouldNotifyInNpmScript=e.shouldNotifyInNpmScript,!this.#r)try{this.config=new Zi(`update-notifier-${this._packageName}`,{optOut:!1,lastUpdateCheck:Date.now()})}catch{const r=ue.default.yellow(oe.format(" %s update check failed ",e.pkg.name))+oe.format(`
32
+ Try running with %s or get access `,ue.default.cyan("sudo"))+`
33
+ to the local update config store via
34
+ `+ue.default.cyan(oe.format(" sudo chown -R $USER:$(id -gn $USER) %s ",Lt));z.on("exit",()=>{console.error(Au(r,{textAlignment:"center"}))})}}check(){!this.config||this.config.get("optOut")||this.#r||(this.update=this.config.get("update"),this.update&&(this.update.current=this.#e,this.config.delete("update")),!(Date.now()-this.config.get("lastUpdateCheck")<this.#n)&&Vs.spawn(z.execPath,[Su.join(Yf,"check.js"),JSON.stringify(this.#t)],{detached:!0,stdio:"ignore"}).unref())}async fetchInfo(){const{distTag:e}=this.#t,r=await $l(this._packageName,{version:e});return{latest:r,current:this.#e,type:eo(this.#e,r)??e,name:this._packageName}}notify(e){const r=!this._shouldNotifyInNpmScript&&ql;if(!z.stdout.isTTY||r||!this.update||!v.semver.gt(this.update.latest,this.update.current))return this;e={isGlobal:Gl,...e};const n=e.isGlobal?`npm i -g ${this._packageName}`:`npm i ${this._packageName}`,s="Update available "+ue.default.dim("{currentVersion}")+ue.default.reset(" → ")+ue.default.green("{latestVersion}")+`
35
+ Run `+ue.default.cyan("{updateCommand}")+" to update",i=e.message||s;e.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};const u=Au(Jf(i,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:n}),e.boxenOptions);return e.defer===!1?console.error(u):(z.on("exit",()=>{console.error(u)}),z.on("SIGINT",()=>{console.error(""),z.exit()})),this}}function Xf(t){const e=new Qf(t);return e.check(),e}exports.default=Xf;
36
+ //# sourceMappingURL=index-DgVn3Gax.js.map