aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
8 lines • 1.24 MB
JavaScript
"use strict";var xh=Object.create,$t=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Ph=Object.getOwnPropertyNames,Oh=Object.getPrototypeOf,qh=Object.prototype.hasOwnProperty,Vh=(I,A)=>()=>(I&&(A=I(I=0)),A),U=(I,A)=>()=>(A||I((A={exports:{}}).exports,A),A.exports),Dr=(I,A)=>{for(var e in A)$t(I,e,{get:A[e],enumerable:!0})},hr=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Ph(A))!qh.call(I,t)&&t!==e&&$t(I,t,{get:()=>A[t],enumerable:!(g=Th(A,t))||g.enumerable});return I},lr=(I,A,e)=>(e=I!=null?xh(Oh(I)):{},hr(A||!I||!I.__esModule?$t(e,"default",{value:I,enumerable:!0}):e,I)),PA=I=>hr($t({},"__esModule",{value:!0}),I),Mr=U((PM,kr)=>{"use strict";var AC=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,Zh=Object.getOwnPropertyNames,_h=Object.prototype.hasOwnProperty,eC=(I,A)=>AC(I,"name",{value:A,configurable:!0}),Xh=(I,A)=>{for(var e in A)AC(I,e,{get:A[e],enumerable:!0})},jh=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Zh(A))!_h.call(I,t)&&t!==e&&AC(I,t,{get:()=>A[t],enumerable:!(g=Wh(A,t))||g.enumerable});return I},zh=I=>jh(AC({},"__esModule",{value:!0}),I),wr={};Xh(wr,{AlgorithmId:()=>pr,EndpointURLScheme:()=>yr,FieldPosition:()=>Fr,HttpApiKeyAuthLocation:()=>dr,HttpAuthLocation:()=>fr,IniSectionType:()=>Sr,RequestHandlerProtocol:()=>Rr,SMITHY_CONTEXT_KEY:()=>Il,getDefaultClientConfiguration:()=>el,resolveDefaultRuntimeConfig:()=>gl}),kr.exports=zh(wr);var fr=(I=>(I.HEADER="header",I.QUERY="query",I))(fr||{}),dr=(I=>(I.HEADER="header",I.QUERY="query",I))(dr||{}),yr=(I=>(I.HTTP="http",I.HTTPS="https",I))(yr||{}),pr=(I=>(I.MD5="md5",I.CRC32="crc32",I.CRC32C="crc32c",I.SHA1="sha1",I.SHA256="sha256",I))(pr||{}),$h=eC(I=>{let A=[];return I.sha256!==void 0&&A.push({algorithmId:()=>"sha256",checksumConstructor:()=>I.sha256}),I.md5!=null&&A.push({algorithmId:()=>"md5",checksumConstructor:()=>I.md5}),{_checksumAlgorithms:A,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Al=eC(I=>{let A={};return I.checksumAlgorithms().forEach(e=>{A[e.algorithmId()]=e.checksumConstructor()}),A},"resolveChecksumRuntimeConfig"),el=eC(I=>({...$h(I)}),"getDefaultClientConfiguration"),gl=eC(I=>({...Al(I)}),"resolveDefaultRuntimeConfig"),Fr=(I=>(I[I.HEADER=0]="HEADER",I[I.TRAILER=1]="TRAILER",I))(Fr||{}),Il="__smithy_context",Sr=(I=>(I.PROFILE="profile",I.SSO_SESSION="sso-session",I.SERVICES="services",I))(Sr||{}),Rr=(I=>(I.HTTP_0_9="http/0.9",I.HTTP_1_0="http/1.0",I.TDS_8_0="tds/8.0",I))(Rr||{})}),vr=U((WM,br)=>{"use strict";var gC=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Cl=Object.getOwnPropertyNames,il=Object.prototype.hasOwnProperty,vg=(I,A)=>gC(I,"name",{value:A,configurable:!0}),Bl=(I,A)=>{for(var e in A)gC(I,e,{get:A[e],enumerable:!0})},Ql=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Cl(A))!il.call(I,t)&&t!==e&&gC(I,t,{get:()=>A[t],enumerable:!(g=tl(A,t))||g.enumerable});return I},El=I=>Ql(gC({},"__esModule",{value:!0}),I),mr={};Bl(mr,{Field:()=>nl,Fields:()=>ol,HttpRequest:()=>al,HttpResponse:()=>ul,IHttpRequest:()=>Gr.HttpRequest,getHttpHandlerExtensionConfiguration:()=>rl,isValidHostname:()=>Hr,resolveHttpHandlerRuntimeConfig:()=>sl}),br.exports=El(mr);var rl=vg(I=>{let A=I.httpHandler;return{setHttpHandler(e){A=e},httpHandler(){return A},updateHttpClientConfig(e,g){A.updateHttpClientConfig(e,g)},httpHandlerConfigs(){return A.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),sl=vg(I=>({httpHandler:I.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Gr=Mr(),Nr=class{constructor({name:A,kind:e=Gr.FieldPosition.HEADER,values:g=[]}){this.name=A,this.kind=e,this.values=g}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter(e=>e!==A)}toString(){return this.values.map(A=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}};vg(Nr,"Field");var nl=Nr,Ur=class{constructor({fields:A=[],encoding:e="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=e}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter(e=>e.kind===A)}};vg(Ur,"Fields");var ol=Ur,Lr=class gB{constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let e=new gB({...A,headers:{...A.headers}});return e.query&&(e.query=Jr(e.query)),e}static isInstance(A){if(!A)return!1;let e=A;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query=="object"&&typeof e.headers=="object"}clone(){return gB.clone(this)}};vg(Lr,"HttpRequest");var al=Lr;function Jr(I){return Object.keys(I).reduce((A,e)=>{let g=I[e];return{...A,[e]:Array.isArray(g)?[...g]:g}},{})}vg(Jr,"cloneQuery");var Kr=class{constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let e=A;return typeof e.statusCode=="number"&&typeof e.headers=="object"}};vg(Kr,"HttpResponse");var ul=Kr;function Hr(I){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(I)}vg(Hr,"isValidHostname")}),Pr=U((ZM,Tr)=>{"use strict";var IC=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,Dl=Object.getOwnPropertyNames,hl=Object.prototype.hasOwnProperty,IB=(I,A)=>IC(I,"name",{value:A,configurable:!0}),ll=(I,A)=>{for(var e in A)IC(I,e,{get:A[e],enumerable:!0})},wl=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Dl(A))!hl.call(I,t)&&t!==e&&IC(I,t,{get:()=>A[t],enumerable:!(g=cl(A,t))||g.enumerable});return I},fl=I=>wl(IC({},"__esModule",{value:!0}),I),Yr={};ll(Yr,{escapeUri:()=>xr,escapeUriPath:()=>yl}),Tr.exports=fl(Yr);var xr=IB(I=>encodeURIComponent(I).replace(/[!'()*]/g,dl),"escapeUri"),dl=IB(I=>`%${I.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),yl=IB(I=>I.split("/").map(xr).join("/"),"escapeUriPath")}),Wr=U((_M,Vr)=>{"use strict";var tC=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Fl=Object.getOwnPropertyNames,Sl=Object.prototype.hasOwnProperty,Rl=(I,A)=>tC(I,"name",{value:A,configurable:!0}),kl=(I,A)=>{for(var e in A)tC(I,e,{get:A[e],enumerable:!0})},Ml=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Fl(A))!Sl.call(I,t)&&t!==e&&tC(I,t,{get:()=>A[t],enumerable:!(g=pl(A,t))||g.enumerable});return I},ml=I=>Ml(tC({},"__esModule",{value:!0}),I),Or={};kl(Or,{buildQueryString:()=>qr}),Vr.exports=ml(Or);var tB=Pr();function qr(I){let A=[];for(let e of Object.keys(I).sort()){let g=I[e];if(e=(0,tB.escapeUri)(e),Array.isArray(g))for(let t=0,C=g.length;t<C;t++)A.push(`${e}=${(0,tB.escapeUri)(g[t])}`);else{let t=e;(g||typeof g=="string")&&(t+=`=${(0,tB.escapeUri)(g)}`),A.push(t)}}return A.join("&")}Rl(qr,"buildQueryString")}),os=U(($M,ns)=>{"use strict";var Gl=Object.create,ct=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Ul=Object.getOwnPropertyNames,Ll=Object.getPrototypeOf,Jl=Object.prototype.hasOwnProperty,NA=(I,A)=>ct(I,"name",{value:A,configurable:!0}),Kl=(I,A)=>{for(var e in A)ct(I,e,{get:A[e],enumerable:!0})},zr=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let t of Ul(A))!Jl.call(I,t)&&t!==e&&ct(I,t,{get:()=>A[t],enumerable:!(g=Nl(A,t))||g.enumerable});return I},Hl=(I,A,e)=>(e=I!=null?Gl(Ll(I)):{},zr(A||!I||!I.__esModule?ct(e,"default",{value:I,enumerable:!0}):e,I)),bl=I=>zr(ct({},"__esModule",{value:!0}),I),$r={};Kl($r,{DEFAULT_REQUEST_TIMEOUT:()=>Ol,NodeHttp2Handler:()=>_l,NodeHttpHandler:()=>ql,streamCollector:()=>jl}),ns.exports=bl($r);var As=vr(),es=Wr(),CB=require("http"),iB=require("https"),vl=["ECONNRESET","EPIPE","ETIMEDOUT"],gs=NA(I=>{let A={};for(let e of Object.keys(I)){let g=I[e];A[e]=Array.isArray(g)?g.join(","):g}return A},"getTransformedHeaders"),Zr=1e3,Yl=NA((I,A,e=0)=>{if(!e)return-1;let g=NA(t=>{let C=setTimeout(()=>{I.destroy(),A(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-t),Q=NA(u=>{u?.connecting?u.on("connect",()=>{clearTimeout(C)}):clearTimeout(C)},"doWithSocket");I.socket?Q(I.socket):I.on("socket",Q)},"registerTimeout");return e<2e3?(g(0),0):setTimeout(g.bind(null,Zr),Zr)},"setConnectionTimeout"),xl=3e3,Tl=NA((I,{keepAlive:A,keepAliveMsecs:e},g=xl)=>{if(A!==!0)return-1;let t=NA(()=>{I.socket?I.socket.setKeepAlive(A,e||0):I.on("socket",C=>{C.setKeepAlive(A,e||0)})},"registerListener");return g===0?(t(),0):setTimeout(t,g)},"setSocketKeepAlive"),_r=3e3,Pl=NA((I,A,e=0)=>{let g=NA(t=>{I.setTimeout(e-t,()=>{I.destroy(),A(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))})},"registerTimeout");return 0<e&&e<6e3?(g(0),0):setTimeout(g.bind(null,e===0?0:_r),_r)},"setSocketTimeout"),Is=require("stream"),Xr=1e3;async function QB(I,A,e=Xr){let g=A.headers??{},t=g.Expect||g.expect,C=-1,Q=!1;t==="100-continue"&&await Promise.race([new Promise(u=>{C=Number(setTimeout(u,Math.max(Xr,e)))}),new Promise(u=>{I.on("continue",()=>{clearTimeout(C),u()}),I.on("error",()=>{Q=!0,clearTimeout(C),u()})})]),Q||ts(I,A.body)}NA(QB,"writeRequestBody");function ts(I,A){if(A instanceof Is.Readable){A.pipe(I);return}if(A){if(Buffer.isBuffer(A)||typeof A=="string"){I.end(A);return}let e=A;if(typeof e=="object"&&e.buffer&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number"){I.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}I.end(Buffer.from(A));return}I.end()}NA(ts,"writeBody");var Ol=0,Cs=class BB{constructor(A){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(t=>{e(this.resolveDefaultConfig(t))}).catch(g):e(this.resolveDefaultConfig(A))})}static create(A){return typeof A?.handle=="function"?A:new BB(A)}static checkSocketUsage(A,e,g=console){var t,C,Q;let{sockets:u,requests:c,maxSockets:h}=A;if(typeof h!="number"||h===1/0||Date.now()-15e3<e)return e;if(u&&c)for(let a in u){let s=((t=u[a])==null?void 0:t.length)??0,i=((C=c[a])==null?void 0:C.length)??0;if(s>=h&&i>=2*h)return(Q=g?.warn)==null||Q.call(g,`@smithy/node-http-handler:WARN - socket usage at capacity=${s} and ${i} additional requests are enqueued.
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}resolveDefaultConfig(A){let{requestTimeout:e,connectionTimeout:g,socketTimeout:t,httpAgent:C,httpsAgent:Q}=A||{},u=!0,c=50;return{connectionTimeout:g,requestTimeout:e??t,httpAgent:C instanceof CB.Agent||typeof C?.destroy=="function"?C:new CB.Agent({keepAlive:u,maxSockets:c,...C}),httpsAgent:Q instanceof iB.Agent||typeof Q?.destroy=="function"?Q:new iB.Agent({keepAlive:u,maxSockets:c,...Q}),logger:console}}destroy(){var A,e,g,t;(e=(A=this.config)==null?void 0:A.httpAgent)==null||e.destroy(),(t=(g=this.config)==null?void 0:g.httpsAgent)==null||t.destroy()}async handle(A,{abortSignal:e}={}){return this.config||(this.config=await this.configProvider),new Promise((g,t)=>{let C,Q=[],u=NA(async F=>{await C,Q.forEach(clearTimeout),g(F)},"resolve"),c=NA(async F=>{await C,Q.forEach(clearTimeout),t(F)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){let F=new Error("Request aborted");F.name="AbortError",c(F);return}let h=A.protocol==="https:",r=h?this.config.httpsAgent:this.config.httpAgent;Q.push(setTimeout(()=>{this.socketWarningTimestamp=BB.checkSocketUsage(r,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3)));let a=(0,es.buildQueryString)(A.query||{}),s;if(A.username!=null||A.password!=null){let F=A.username??"",R=A.password??"";s=`${F}:${R}`}let i=A.path;a&&(i+=`?${a}`),A.fragment&&(i+=`#${A.fragment}`);let B=A.hostname??"";B[0]==="["&&B.endsWith("]")?B=A.hostname.slice(1,-1):B=A.hostname;let E={headers:A.headers,host:B,method:A.method,path:i,port:A.port,agent:r,auth:s},D=(h?iB.request:CB.request)(E,F=>{let R=new As.HttpResponse({statusCode:F.statusCode||-1,reason:F.statusMessage,headers:gs(F.headers),body:F});u({response:R})});if(D.on("error",F=>{vl.includes(F.code)?c(Object.assign(F,{name:"TimeoutError"})):c(F)}),e){let F=NA(()=>{D.destroy();let R=new Error("Request aborted");R.name="AbortError",c(R)},"onAbort");if(typeof e.addEventListener=="function"){let R=e;R.addEventListener("abort",F,{once:!0}),D.once("close",()=>R.removeEventListener("abort",F))}else e.onabort=F}Q.push(Yl(D,c,this.config.connectionTimeout)),Q.push(Pl(D,c,this.config.requestTimeout));let w=E.agent;typeof w=="object"&&"keepAlive"in w&&Q.push(Tl(D,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),C=QB(D,A,this.config.requestTimeout).catch(F=>(Q.forEach(clearTimeout),t(F)))})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}};NA(Cs,"NodeHttpHandler");var ql=Cs,jr=require("http2"),Vl=Hl(require("http2")),is=class{constructor(A){this.sessions=[],this.sessions=A??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(A){this.sessions.push(A)}contains(A){return this.sessions.includes(A)}remove(A){this.sessions=this.sessions.filter(e=>e!==A)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(A){for(let e of this.sessions)e===A&&(e.destroyed||e.destroy())}};NA(is,"NodeHttp2ConnectionPool");var Wl=is,Bs=class{constructor(A){if(this.sessionCache=new Map,this.config=A,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(A,e){let g=this.getUrlString(A),t=this.sessionCache.get(g);if(t){let c=t.poll();if(c&&!this.config.disableConcurrency)return c}let C=Vl.default.connect(g);this.config.maxConcurrency&&C.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+A.destination.toString())}),C.unref();let Q=NA(()=>{C.destroy(),this.deleteSession(g,C)},"destroySessionCb");C.on("goaway",Q),C.on("error",Q),C.on("frameError",Q),C.on("close",()=>this.deleteSession(g,C)),e.requestTimeout&&C.setTimeout(e.requestTimeout,Q);let u=this.sessionCache.get(g)||new Wl;return u.offerLast(C),this.sessionCache.set(g,u),C}deleteSession(A,e){let g=this.sessionCache.get(A);g&&g.contains(e)&&(g.remove(e),this.sessionCache.set(A,g))}release(A,e){var g;let t=this.getUrlString(A);(g=this.sessionCache.get(t))==null||g.offerLast(e)}destroy(){for(let[A,e]of this.sessionCache){for(let g of e)g.destroyed||g.destroy(),e.remove(g);this.sessionCache.delete(A)}}setMaxConcurrentStreams(A){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=A}setDisableConcurrentStreams(A){this.config.disableConcurrency=A}getUrlString(A){return A.destination.toString()}};NA(Bs,"NodeHttp2ConnectionManager");var Zl=Bs,Qs=class Es{constructor(A){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Zl({}),this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(t=>{e(t||{})}).catch(g):e(A||{})})}static create(A){return typeof A?.handle=="function"?A:new Es(A)}destroy(){this.connectionManager.destroy()}async handle(A,{abortSignal:e}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:g,disableConcurrentStreams:t}=this.config;return new Promise((C,Q)=>{var u;let c=!1,h,r=NA(async L=>{await h,C(L)},"resolve"),a=NA(async L=>{await h,Q(L)},"reject");if(e?.aborted){c=!0;let L=new Error("Request aborted");L.name="AbortError",a(L);return}let{hostname:s,method:i,port:B,protocol:E,query:n}=A,D="";if(A.username!=null||A.password!=null){let L=A.username??"",Z=A.password??"";D=`${L}:${Z}@`}let w=`${E}//${D}${s}${B?`:${B}`:""}`,F={destination:new URL(w)},R=this.connectionManager.lease(F,{requestTimeout:(u=this.config)==null?void 0:u.sessionTimeout,disableConcurrentStreams:t||!1}),M=NA(L=>{t&&this.destroySession(R),c=!0,a(L)},"rejectWithDestroy"),G=(0,es.buildQueryString)(n||{}),J=A.path;G&&(J+=`?${G}`),A.fragment&&(J+=`#${A.fragment}`);let P=R.request({...A.headers,[jr.constants.HTTP2_HEADER_PATH]:J,[jr.constants.HTTP2_HEADER_METHOD]:i});if(R.ref(),P.on("response",L=>{let Z=new As.HttpResponse({statusCode:L[":status"]||-1,headers:gs(L),body:P});c=!0,r({response:Z}),t&&(R.close(),this.connectionManager.deleteSession(w,R))}),g&&P.setTimeout(g,()=>{P.close();let L=new Error(`Stream timed out because of no activity for ${g} ms`);L.name="TimeoutError",M(L)}),e){let L=NA(()=>{P.close();let Z=new Error("Request aborted");Z.name="AbortError",M(Z)},"onAbort");if(typeof e.addEventListener=="function"){let Z=e;Z.addEventListener("abort",L,{once:!0}),P.once("close",()=>Z.removeEventListener("abort",L))}else e.onabort=L}P.on("frameError",(L,Z,W)=>{M(new Error(`Frame type id ${L} in stream id ${W} has failed with code ${Z}.`))}),P.on("error",M),P.on("aborted",()=>{M(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${P.rstCode}.`))}),P.on("close",()=>{R.unref(),t&&R.destroy(),c||M(new Error("Unexpected error: http2 request did not get a response"))}),h=QB(P,A,g)})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}destroySession(A){A.destroyed||A.destroy()}};NA(Qs,"NodeHttp2Handler");var _l=Qs,rs=class extends Is.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(A,e,g){this.bufferedBytes.push(A),g()}};NA(rs,"Collector");var Xl=rs,jl=NA(I=>zl(I)?ss(I):new Promise((A,e)=>{let g=new Xl;I.pipe(g),I.on("error",t=>{g.end(),e(t)}),g.on("error",e),g.on("finish",function(){let t=new Uint8Array(Buffer.concat(this.bufferedBytes));A(t)})}),"streamCollector"),zl=NA(I=>typeof ReadableStream=="function"&&I instanceof ReadableStream,"isReadableStreamInstance");async function ss(I){let A=[],e=I.getReader(),g=!1,t=0;for(;!g;){let{done:u,value:c}=await e.read();c&&(A.push(c),t+=c.length),g=u}let C=new Uint8Array(t),Q=0;for(let u of A)C.set(u,Q),Q+=u.length;return C}NA(ss,"collectReadableStream")}),hs=U((gm,Ds)=>{"use strict";var Dt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,$l=typeof AbortController=="function",CC=$l?AbortController:class{constructor(){this.signal=new as}abort(A=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||A,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},A0=typeof AbortSignal=="function",e0=typeof CC.AbortSignal=="function",as=A0?AbortSignal:e0?CC.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(A){A.type==="abort"&&(this.aborted=!0,this.onabort(A),this._listeners.forEach(e=>e(A),this))}onabort(){}addEventListener(A,e){A==="abort"&&this._listeners.push(e)}removeEventListener(A,e){A==="abort"&&(this._listeners=this._listeners.filter(g=>g!==e))}},nB=new Set,EB=(I,A)=>{let e=`LRU_CACHE_OPTION_${I}`;iC(e)&&oB(e,`${I} option`,`options.${A}`,fI)},rB=(I,A)=>{let e=`LRU_CACHE_METHOD_${I}`;if(iC(e)){let{prototype:g}=fI,{get:t}=Object.getOwnPropertyDescriptor(g,I);oB(e,`${I} method`,`cache.${A}()`,t)}},g0=(I,A)=>{let e=`LRU_CACHE_PROPERTY_${I}`;if(iC(e)){let{prototype:g}=fI,{get:t}=Object.getOwnPropertyDescriptor(g,I);oB(e,`${I} property`,`cache.${A}`,t)}},us=(...I)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...I):console.error(...I)},iC=I=>!nB.has(I),oB=(I,A,e,g)=>{nB.add(I);let t=`The ${A} is deprecated. Please use ${e} instead.`;us(t,"DeprecationWarning",I,g)},Yg=I=>I&&I===Math.floor(I)&&I>0&&isFinite(I),cs=I=>Yg(I)?I<=Math.pow(2,8)?Uint8Array:I<=Math.pow(2,16)?Uint16Array:I<=Math.pow(2,32)?Uint32Array:I<=Number.MAX_SAFE_INTEGER?wI:null:null,wI=class extends Array{constructor(A){super(A),this.fill(0)}},sB=class{constructor(A){if(A===0)return[];let e=cs(A);this.heap=new e(A),this.length=0}push(A){this.heap[this.length++]=A}pop(){return this.heap[--this.length]}},fI=class I{constructor(A={}){let{max:e=0,ttl:g,ttlResolution:t=1,ttlAutopurge:C,updateAgeOnGet:Q,updateAgeOnHas:u,allowStale:c,dispose:h,disposeAfter:r,noDisposeOnSet:a,noUpdateTTL:s,maxSize:i=0,maxEntrySize:B=0,sizeCalculation:E,fetchMethod:n,fetchContext:D,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:M,ignoreFetchAbort:G}=A,{length:J,maxAge:P,stale:L}=A instanceof I?{}:A;if(e!==0&&!Yg(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?cs(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=i,this.maxEntrySize=B||this.maxSize,this.sizeCalculation=E||J,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=n||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=D,!this.fetchMethod&&D!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new Z(e),this.prev=new Z(e),this.head=0,this.tail=0,this.free=new sB(e),this.initialFill=1,this.size=0,typeof h=="function"&&(this.dispose=h),typeof r=="function"?(this.disposeAfter=r,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!a,this.noUpdateTTL=!!s,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!M,this.ignoreFetchAbort=!!G,this.maxEntrySize!==0){if(this.maxSize!==0&&!Yg(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Yg(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!L,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!u,this.ttlResolution=Yg(t)||t===0?t:1,this.ttlAutopurge=!!C,this.ttl=g||P||0,this.ttl){if(!Yg(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let W="LRU_CACHE_UNBOUNDED";iC(W)&&(nB.add(W),us("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",W,I))}L&&EB("stale","allowStale"),P&&EB("maxAge","ttl"),J&&EB("length","sizeCalculation")}getRemainingTTL(A){return this.has(A,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new wI(this.max),this.starts=new wI(this.max),this.setItemTTL=(g,t,C=Dt.now())=>{if(this.starts[g]=t!==0?C:0,this.ttls[g]=t,t!==0&&this.ttlAutopurge){let Q=setTimeout(()=>{this.isStale(g)&&this.delete(this.keyList[g])},t+1);Q.unref&&Q.unref()}},this.updateItemAge=g=>{this.starts[g]=this.ttls[g]!==0?Dt.now():0},this.statusTTL=(g,t)=>{g&&(g.ttl=this.ttls[t],g.start=this.starts[t],g.now=A||e(),g.remainingTTL=g.now+g.ttl-g.start)};let A=0,e=()=>{let g=Dt.now();if(this.ttlResolution>0){A=g;let t=setTimeout(()=>A=0,this.ttlResolution);t.unref&&t.unref()}return g};this.getRemainingTTL=g=>{let t=this.keyMap.get(g);return t===void 0?0:this.ttls[t]===0||this.starts[t]===0?1/0:this.starts[t]+this.ttls[t]-(A||e())},this.isStale=g=>this.ttls[g]!==0&&this.starts[g]!==0&&(A||e())-this.starts[g]>this.ttls[g]}updateItemAge(A){}statusTTL(A,e){}setItemTTL(A,e,g){}isStale(A){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new wI(this.max),this.removeItemSize=A=>{this.calculatedSize-=this.sizes[A],this.sizes[A]=0},this.requireSize=(A,e,g,t)=>{if(this.isBackgroundFetch(e))return 0;if(!Yg(g))if(t){if(typeof t!="function")throw new TypeError("sizeCalculation must be a function");if(g=t(e,A),!Yg(g))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return g},this.addItemSize=(A,e,g)=>{if(this.sizes[A]=e,this.maxSize){let t=this.maxSize-this.sizes[A];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[A],g&&(g.entrySize=e,g.totalCalculatedSize=this.calculatedSize)}}removeItemSize(A){}addItemSize(A,e){}requireSize(A,e,g,t){if(g||t)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.tail;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.head));)e=this.prev[e]}*rindexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.head;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.tail));)e=this.next[e]}isValidIndex(A){return A!==void 0&&this.keyMap.get(this.keyList[A])===A}*entries(){for(let A of this.indexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*rentries(){for(let A of this.rindexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*keys(){for(let A of this.indexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*rkeys(){for(let A of this.rindexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*values(){for(let A of this.indexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}*rvalues(){for(let A of this.rindexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}[Symbol.iterator](){return this.entries()}find(A,e){for(let g of this.indexes()){let t=this.valList[g],C=this.isBackgroundFetch(t)?t.__staleWhileFetching:t;if(C!==void 0&&A(C,this.keyList[g],this))return this.get(this.keyList[g],e)}}forEach(A,e=this){for(let g of this.indexes()){let t=this.valList[g],C=this.isBackgroundFetch(t)?t.__staleWhileFetching:t;C!==void 0&&A.call(e,C,this.keyList[g],this)}}rforEach(A,e=this){for(let g of this.rindexes()){let t=this.valList[g],C=this.isBackgroundFetch(t)?t.__staleWhileFetching:t;C!==void 0&&A.call(e,C,this.keyList[g],this)}}get prune(){return rB("prune","purgeStale"),this.purgeStale}purgeStale(){let A=!1;for(let e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),A=!0);return A}dump(){let A=[];for(let e of this.indexes({allowStale:!0})){let g=this.keyList[e],t=this.valList[e],C=this.isBackgroundFetch(t)?t.__staleWhileFetching:t;if(C===void 0)continue;let Q={value:C};if(this.ttls){Q.ttl=this.ttls[e];let u=Dt.now()-this.starts[e];Q.start=Math.floor(Date.now()-u)}this.sizes&&(Q.size=this.sizes[e]),A.unshift([g,Q])}return A}load(A){this.clear();for(let[e,g]of A){if(g.start){let t=Date.now()-g.start;g.start=Dt.now()-t}this.set(e,g.value,g)}}dispose(A,e,g){}set(A,e,{ttl:g=this.ttl,start:t,noDisposeOnSet:C=this.noDisposeOnSet,size:Q=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,status:h}={}){if(Q=this.requireSize(A,e,Q,u),this.maxEntrySize&&Q>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.delete(A),this;let r=this.size===0?void 0:this.keyMap.get(A);if(r===void 0)r=this.newIndex(),this.keyList[r]=A,this.valList[r]=e,this.keyMap.set(A,r),this.next[this.tail]=r,this.prev[r]=this.tail,this.tail=r,this.size++,this.addItemSize(r,Q,h),h&&(h.set="add"),c=!1;else{this.moveToTail(r);let a=this.valList[r];if(e!==a){if(this.isBackgroundFetch(a)?a.__abortController.abort(new Error("replaced")):C||(this.dispose(a,A,"set"),this.disposeAfter&&this.disposed.push([a,A,"set"])),this.removeItemSize(r),this.valList[r]=e,this.addItemSize(r,Q,h),h){h.set="replace";let s=a&&this.isBackgroundFetch(a)?a.__staleWhileFetching:a;s!==void 0&&(h.oldValue=s)}}else h&&(h.set="update")}if(g!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(r,g,t),this.statusTTL(h,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let A=this.valList[this.head];return this.evict(!0),A}}evict(A){let e=this.head,g=this.keyList[e],t=this.valList[e];return this.isBackgroundFetch(t)?t.__abortController.abort(new Error("evicted")):(this.dispose(t,g,"evict"),this.disposeAfter&&this.disposed.push([t,g,"evict"])),this.removeItemSize(e),A&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(g),this.size--,e}has(A,{updateAgeOnHas:e=this.updateAgeOnHas,status:g}={}){let t=this.keyMap.get(A);if(t!==void 0)if(this.isStale(t))g&&(g.has="stale",this.statusTTL(g,t));else return e&&this.updateItemAge(t),g&&(g.has="hit"),this.statusTTL(g,t),!0;else g&&(g.has="miss");return!1}peek(A,{allowStale:e=this.allowStale}={}){let g=this.keyMap.get(A);if(g!==void 0&&(e||!this.isStale(g))){let t=this.valList[g];return this.isBackgroundFetch(t)?t.__staleWhileFetching:t}}backgroundFetch(A,e,g,t){let C=e===void 0?void 0:this.valList[e];if(this.isBackgroundFetch(C))return C;let Q=new CC;g.signal&&g.signal.addEventListener("abort",()=>Q.abort(g.signal.reason));let u={signal:Q.signal,options:g,context:t},c=(i,B=!1)=>{let{aborted:E}=Q.signal,n=g.ignoreFetchAbort&&i!==void 0;return g.status&&(E&&!B?(g.status.fetchAborted=!0,g.status.fetchError=Q.signal.reason,n&&(g.status.fetchAbortIgnored=!0)):g.status.fetchResolved=!0),E&&!n&&!B?r(Q.signal.reason):(this.valList[e]===s&&(i===void 0?s.__staleWhileFetching?this.valList[e]=s.__staleWhileFetching:this.delete(A):(g.status&&(g.status.fetchUpdated=!0),this.set(A,i,u.options))),i)},h=i=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=i),r(i)),r=i=>{let{aborted:B}=Q.signal,E=B&&g.allowStaleOnFetchAbort,n=E||g.allowStaleOnFetchRejection,D=n||g.noDeleteOnFetchRejection;if(this.valList[e]===s&&(!D||s.__staleWhileFetching===void 0?this.delete(A):E||(this.valList[e]=s.__staleWhileFetching)),n)return g.status&&s.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),s.__staleWhileFetching;if(s.__returned===s)throw i},a=(i,B)=>{this.fetchMethod(A,C,u).then(E=>i(E),B),Q.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(i(),g.allowStaleOnFetchAbort&&(i=E=>c(E,!0)))})};g.status&&(g.status.fetchDispatched=!0);let s=new Promise(a).then(c,h);return s.__abortController=Q,s.__staleWhileFetching=C,s.__returned=null,e===void 0?(this.set(A,s,{...u.options,status:void 0}),e=this.keyMap.get(A)):this.valList[e]=s,s}isBackgroundFetch(A){return A&&typeof A=="object"&&typeof A.then=="function"&&Object.prototype.hasOwnProperty.call(A,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(A,"__returned")&&(A.__returned===A||A.__returned===null)}async fetch(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:t=this.noDeleteOnStaleGet,ttl:C=this.ttl,noDisposeOnSet:Q=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:r=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:a=this.allowStaleOnFetchRejection,ignoreFetchAbort:s=this.ignoreFetchAbort,allowStaleOnFetchAbort:i=this.allowStaleOnFetchAbort,fetchContext:B=this.fetchContext,forceRefresh:E=!1,status:n,signal:D}={}){if(!this.fetchMethod)return n&&(n.fetch="get"),this.get(A,{allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:t,status:n});let w={allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:t,ttl:C,noDisposeOnSet:Q,size:u,sizeCalculation:c,noUpdateTTL:h,noDeleteOnFetchRejection:r,allowStaleOnFetchRejection:a,allowStaleOnFetchAbort:i,ignoreFetchAbort:s,status:n,signal:D},F=this.keyMap.get(A);if(F===void 0){n&&(n.fetch="miss");let R=this.backgroundFetch(A,F,w,B);return R.__returned=R}else{let R=this.valList[F];if(this.isBackgroundFetch(R)){let L=e&&R.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",L&&(n.returnedStale=!0)),L?R.__staleWhileFetching:R.__returned=R}let M=this.isStale(F);if(!E&&!M)return n&&(n.fetch="hit"),this.moveToTail(F),g&&this.updateItemAge(F),this.statusTTL(n,F),R;let G=this.backgroundFetch(A,F,w,B),J=G.__staleWhileFetching!==void 0,P=J&&e;return n&&(n.fetch=J&&M?"stale":"refresh",P&&M&&(n.returnedStale=!0)),P?G.__staleWhileFetching:G.__returned=G}}get(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:t=this.noDeleteOnStaleGet,status:C}={}){let Q=this.keyMap.get(A);if(Q!==void 0){let u=this.valList[Q],c=this.isBackgroundFetch(u);return this.statusTTL(C,Q),this.isStale(Q)?(C&&(C.get="stale"),c?(C&&(C.returnedStale=e&&u.__staleWhileFetching!==void 0),e?u.__staleWhileFetching:void 0):(t||this.delete(A),C&&(C.returnedStale=e),e?u:void 0)):(C&&(C.get="hit"),c?u.__staleWhileFetching:(this.moveToTail(Q),g&&this.updateItemAge(Q),u))}else C&&(C.get="miss")}connect(A,e){this.prev[e]=A,this.next[A]=e}moveToTail(A){A!==this.tail&&(A===this.head?this.head=this.next[A]:this.connect(this.prev[A],this.next[A]),this.connect(this.tail,A),this.tail=A)}get del(){return rB("del","delete"),this.delete}delete(A){let e=!1;if(this.size!==0){let g=this.keyMap.get(A);if(g!==void 0)if(e=!0,this.size===1)this.clear();else{this.removeItemSize(g);let t=this.valList[g];this.isBackgroundFetch(t)?t.__abortController.abort(new Error("deleted")):(this.dispose(t,A,"delete"),this.disposeAfter&&this.disposed.push([t,A,"delete"])),this.keyMap.delete(A),this.keyList[g]=null,this.valList[g]=null,g===this.tail?this.tail=this.prev[g]:g===this.head?this.head=this.next[g]:(this.next[this.prev[g]]=this.next[g],this.prev[this.next[g]]=this.prev[g]),this.size--,this.free.push(g)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(let A of this.rindexes({allowStale:!0})){let e=this.valList[A];if(this.isBackgroundFetch(e))e.__abortController.abort(new Error("deleted"));else{let g=this.keyList[A];this.dispose(e,g,"delete"),this.disposeAfter&&this.disposed.push([e,g,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return rB("reset","clear"),this.clear}get length(){return g0("length","size"),this.size}static get AbortController(){return CC}static get AbortSignal(){return as}};Ds.exports=fI}),fs=U(Me=>{"use strict";var I0=Me&&Me.__createBinding||(Object.create?function(I,A,e,g){g===void 0&&(g=e);var t=Object.getOwnPropertyDescriptor(A,e);(!t||("get"in t?!A.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,t)}:function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]}),t0=Me&&Me.__setModuleDefault||(Object.create?function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}:function(I,A){I.default=A}),ls=Me&&Me.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&I0(A,I,e);return t0(A,I),A};Object.defineProperty(Me,"__esModule",{value:!0}),Me.req=Me.json=Me.toBuffer=void 0;var C0=ls(require("http")),i0=ls(require("https"));async function ws(I){let A=0,e=[];for await(let g of I)A+=g.length,e.push(g);return Buffer.concat(e,A)}Me.toBuffer=ws;async function B0(I){let e=(await ws(I)).toString("utf8");try{return JSON.parse(e)}catch(g){let t=g;throw t.message+=` (input: ${e})`,t}}Me.json=B0;function Q0(I,A={}){let g=((typeof I=="string"?I:I.href).startsWith("https:")?i0:C0).request(I,A),t=new Promise((C,Q)=>{g.once("response",C).once("error",Q).end()});return g.then=t.then.bind(t),g}Me.req=Q0}),dI=U(Ue=>{"use strict";var ys=Ue&&Ue.__createBinding||(Object.create?function(I,A,e,g){g===void 0&&(g=e);var t=Object.getOwnPropertyDescriptor(A,e);(!t||("get"in t?!A.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,t)}:function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]}),E0=Ue&&Ue.__setModuleDefault||(Object.create?function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}:function(I,A){I.default=A}),ps=Ue&&Ue.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&ys(A,I,e);return E0(A,I),A},r0=Ue&&Ue.__exportStar||function(I,A){for(var e in I)e!=="default"&&!Object.prototype.hasOwnProperty.call(A,e)&&ys(A,I,e)};Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.Agent=void 0;var s0=ps(require("net")),ds=ps(require("http")),n0=require("https");r0(fs(),Ue);var ng=Symbol("AgentBaseInternalState"),aB=class extends ds.Agent{constructor(A){super(A),this[ng]={}}isSecureEndpoint(A){if(A){if(typeof A.secureEndpoint=="boolean")return A.secureEndpoint;if(typeof A.protocol=="string")return A.protocol==="https:"}let{stack:e}=new Error;return typeof e!="string"?!1:e.split(`
`).some(g=>g.indexOf("(https.js:")!==-1||g.indexOf("node:https:")!==-1)}incrementSockets(A){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[A]||(this.sockets[A]=[]);let e=new s0.Socket({writable:!1});return this.sockets[A].push(e),this.totalSocketCount++,e}decrementSockets(A,e){if(!this.sockets[A]||e===null)return;let g=this.sockets[A],t=g.indexOf(e);t!==-1&&(g.splice(t,1),this.totalSocketCount--,g.length===0&&delete this.sockets[A])}getName(A){return(typeof A.secureEndpoint=="boolean"?A.secureEndpoint:this.isSecureEndpoint(A))?n0.Agent.prototype.getName.call(this,A):super.getName(A)}createSocket(A,e,g){let t={...e,secureEndpoint:this.isSecureEndpoint(e)},C=this.getName(t),Q=this.incrementSockets(C);Promise.resolve().then(()=>this.connect(A,t)).then(u=>{if(this.decrementSockets(C,Q),u instanceof ds.Agent)return u.addRequest(A,t);this[ng].currentSocket=u,super.createSocket(A,e,g)},u=>{this.decrementSockets(C,Q),g(u)})}createConnection(){let A=this[ng].currentSocket;if(this[ng].currentSocket=void 0,!A)throw new Error("No socket was returned in the `connect()` function");return A}get defaultPort(){return this[ng].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(A){this[ng]&&(this[ng].defaultPort=A)}get protocol(){return this[ng].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(A){this[ng]&&(this[ng].protocol=A)}};Ue.Agent=aB}),Ss=U((Cm,Fs)=>{"use strict";var yI=1e3,pI=yI*60,FI=pI*60,BI=FI*24,o0=BI*7,a0=BI*365.25;Fs.exports=function(I,A){A=A||{};var e=typeof I;if(e==="string"&&I.length>0)return u0(I);if(e==="number"&&isFinite(I))return A.long?D0(I):c0(I);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(I))};function u0(I){if(I=String(I),!(I.length>100)){var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(I);if(A){var e=parseFloat(A[1]),g=(A[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return e*a0;case"weeks":case"week":case"w":return e*o0;case"days":case"day":case"d":return e*BI;case"hours":case"hour":case"hrs":case"hr":case"h":return e*FI;case"minutes":case"minute":case"mins":case"min":case"m":return e*pI;case"seconds":case"second":case"secs":case"sec":case"s":return e*yI;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function c0(I){var A=Math.abs(I);return A>=BI?Math.round(I/BI)+"d":A>=FI?Math.round(I/FI)+"h":A>=pI?Math.round(I/pI)+"m":A>=yI?Math.round(I/yI)+"s":I+"ms"}function D0(I){var A=Math.abs(I);return A>=BI?BC(I,A,BI,"day"):A>=FI?BC(I,A,FI,"hour"):A>=pI?BC(I,A,pI,"minute"):A>=yI?BC(I,A,yI,"second"):I+" ms"}function BC(I,A,e,g){var t=A>=e*1.5;return Math.round(I/e)+" "+g+(t?"s":"")}}),uB=U((im,Rs)=>{"use strict";function h0(I){e.debug=e,e.default=e,e.coerce=c,e.disable=C,e.enable=t,e.enabled=Q,e.humanize=Ss(),e.destroy=h,Object.keys(I).forEach(r=>{e[r]=I[r]}),e.names=[],e.skips=[],e.formatters={};function A(r){let a=0;for(let s=0;s<r.length;s++)a=(a<<5)-a+r.charCodeAt(s),a|=0;return e.colors[Math.abs(a)%e.colors.length]}e.selectColor=A;function e(r){let a,s=null,i,B;function E(...n){if(!E.enabled)return;let D=E,w=Number(new Date),F=w-(a||w);D.diff=F,D.prev=a,D.curr=w,a=w,n[0]=e.coerce(n[0]),typeof n[0]!="string"&&n.unshift("%O");let R=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(G,J)=>{if(G==="%%")return"%";R++;let P=e.formatters[J];if(typeof P=="function"){let L=n[R];G=P.call(D,L),n.splice(R,1),R--}return G}),e.formatArgs.call(D,n),(D.log||e.log).apply(D,n)}return E.namespace=r,E.useColors=e.useColors(),E.color=e.selectColor(r),E.extend=g,E.destroy=e.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>s!==null?s:(i!==e.namespaces&&(i=e.namespaces,B=e.enabled(r)),B),set:n=>{s=n}}),typeof e.init=="function"&&e.init(E),E}function g(r,a){let s=e(this.namespace+(typeof a>"u"?":":a)+r);return s.log=this.log,s}function t(r){e.save(r),e.namespaces=r,e.names=[],e.skips=[];let a,s=(typeof r=="string"?r:"").split(/[\s,]+/),i=s.length;for(a=0;a<i;a++)s[a]&&(r=s[a].replace(/\*/g,".*?"),r[0]==="-"?e.skips.push(new RegExp("^"+r.slice(1)+"$")):e.names.push(new RegExp("^"+r+"$")))}function C(){let r=[...e.names.map(u),...e.skips.map(u).map(a=>"-"+a)].join(",");return e.enable(""),r}function Q(r){if(r[r.length-1]==="*")return!0;let a,s;for(a=0,s=e.skips.length;a<s;a++)if(e.skips[a].test(r))return!1;for(a=0,s=e.names.length;a<s;a++)if(e.names[a].test(r))return!0;return!1}function u(r){return r.toString().substring(2,r.toString().length-2).replace(/\.\*\?$/,"*")}function c(r){return r instanceof Error?r.stack||r.message:r}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}Rs.exports=h0}),ks=U((Le,QC)=>{"use strict";Le.formatArgs=w0,Le.save=f0,Le.load=d0,Le.useColors=l0,Le.storage=y0(),Le.destroy=(()=>{let I=!1;return()=>{I||(I=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),Le.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function l0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let I;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(I=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(I[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function w0(I){if(I[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+I[0]+(this.useColors?"%c ":" ")+"+"+QC.exports.humanize(this.diff),!this.useColors)return;let A="color: "+this.color;I.splice(1,0,A,"color: inherit");let e=0,g=0;I[0].replace(/%[a-zA-Z%]/g,t=>{t!=="%%"&&(e++,t==="%c"&&(g=e))}),I.splice(g,0,A)}Le.log=console.debug||console.log||(()=>{});function f0(I){try{I?Le.storage.setItem("debug",I):Le.storage.removeItem("debug")}catch{}}function d0(){let I;try{I=Le.storage.getItem("debug")}catch{}return!I&&typeof process<"u"&&"env"in process&&(I=process.env.DEBUG),I}function y0(){try{return localStorage}catch{}}QC.exports=uB()(Le);var{formatters:p0}=QC.exports;p0.j=function(I){try{return JSON.stringify(I)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}}),ms=U((Bm,Ms)=>{"use strict";Ms.exports=(I,A=process.argv)=>{let e=I.startsWith("-")?"":I.length===1?"-":"--",g=A.indexOf(e+I),t=A.indexOf("--");return g!==-1&&(t===-1||g<t)}}),Us=U((Qm,Ns)=>{"use strict";var F0=require("os"),Gs=require("tty"),Ye=ms(),{env:Ae}=process,xg;Ye("no-color")||Ye("no-colors")||Ye("color=false")||Ye("color=never")?xg=0:(Ye("color")||Ye("colors")||Ye("color=true")||Ye("color=always"))&&(xg=1),"FORCE_COLOR"in Ae&&(Ae.FORCE_COLOR==="true"?xg=1:Ae.FORCE_COLOR==="false"?xg=0:xg=Ae.FORCE_COLOR.length===0?1:Math.min(parseInt(Ae.FORCE_COLOR,10),3));function cB(I){return I===0?!1:{level:I,hasBasic:!0,has256:I>=2,has16m:I>=3}}function DB(I,A){if(xg===0)return 0;if(Ye("color=16m")||Ye("color=full")||Ye("color=truecolor"))return 3;if(Ye("color=256"))return 2;if(I&&!A&&xg===void 0)return 0;let e=xg||0;if(Ae.TERM==="dumb")return e;if(process.platform==="win32"){let g=F0.release().split(".");return Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?3:2:1}if("CI"in Ae)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(g=>g in Ae)||Ae.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ae.TEAMCITY_VERSION)?1:0;if(Ae.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ae){let g=parseInt((Ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ae.TERM_PROGRAM){case"iTerm.app":return g>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ae.TERM)||"COLORTERM"in Ae?1:e}function S0(I){let A=DB(I,I&&I.isTTY);return cB(A)}Ns.exports={supportsColor:S0,stdout:cB(DB(!0,Gs.isatty(1))),stderr:cB(DB(!0,Gs.isatty(2)))}}),Js=U((ee,rC)=>{"use strict";var R0=require("tty"),EC=require("util");ee.init=L0,ee.log=G0,ee.formatArgs=M0,ee.save=N0,ee.load=U0,ee.useColors=k0,ee.destroy=EC.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),ee.colors=[6,2,3,4,5,1];try{let I=Us();I&&(I.stderr||I).level>=2&&(ee.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ee.inspectOpts=Object.keys(process.env).filter(I=>/^debug_/i.test(I)).reduce((I,A)=>{let e=A.substring(6).toLowerCase().replace(/_([a-z])/g,(t,C)=>C.toUpperCase()),g=process.env[A];return/^(yes|on|true|enabled)$/i.test(g)?g=!0:/^(no|off|false|disabled)$/i.test(g)?g=!1:g==="null"?g=null:g=Number(g),I[e]=g,I},{});function k0(){return"colors"in ee.inspectOpts?!!ee.inspectOpts.colors:R0.isatty(process.stderr.fd)}function M0(I){let{namespace:A,useColors:e}=this;if(e){let g=this.color,t="\x1B[3"+(g<8?g:"8;5;"+g),C=` ${t};1m${A} \x1B[0m`;I[0]=C+I[0].split(`
`).join(`
`+C),I.push(t+"m+"+rC.exports.humanize(this.diff)+"\x1B[0m")}else I[0]=m0()+A+" "+I[0]}function m0(){return ee.inspectOpts.hideDate?"":new Date().toISOString()+" "}function G0(...I){return process.stderr.write(EC.formatWithOptions(ee.inspectOpts,...I)+`
`)}function N0(I){I?process.env.DEBUG=I:delete process.env.DEBUG}function U0(){return process.env.DEBUG}function L0(I){I.inspectOpts={};let A=Object.keys(ee.inspectOpts);for(let e=0;e<A.length;e++)I.inspectOpts[A[e]]=ee.inspectOpts[A[e]]}rC.exports=uB()(ee);var{formatters:Ls}=rC.exports;Ls.o=function(I){return this.inspectOpts.colors=this.useColors,EC.inspect(I,this.inspectOpts).split(`
`).map(A=>A.trim()).join(" ")},Ls.O=function(I){return this.inspectOpts.colors=this.useColors,EC.inspect(I,this.inspectOpts)}}),xe=U((Em,hB)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?hB.exports=ks():hB.exports=Js()}),Hs=U(Ks=>{"use strict";var J0=require("url").parse,K0={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},H0=String.prototype.endsWith||function(I){return I.length<=this.length&&this.indexOf(I,this.length-I.length)!==-1};function b0(I){var A=typeof I=="string"?J0(I):I||{},e=A.protocol,g=A.host,t=A.port;if(typeof g!="string"||!g||typeof e!="str