UNPKG

@alipay/mcp-server-alipay

Version:

由支付宝开放平台提供的支付创建和管理 MCP 服务。A mcp server to create and process payment with Alipay open APIs.

2 lines 1.17 MB
#!/usr/bin/env node import{createRequire as sz}from"node:module";var Sz=Object.create;var{getPrototypeOf:Bz,defineProperty:n9,getOwnPropertyNames:Lz}=Object;var yz=Object.prototype.hasOwnProperty;var JI=(A,i,I)=>{I=A!=null?Sz(Bz(A)):{};let g=i||!A||!A.__esModule?n9(I,"default",{value:A,enumerable:!0}):I;for(let p of Lz(A))if(!yz.call(g,p))n9(g,p,{get:()=>A[p],enumerable:!0});return g};var N=(A,i)=>()=>(i||A((i={exports:{}}).exports,i),i.exports);var Q=sz(import.meta.url);var oi=N((Fe,uK)=>{uK.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Sm=N((ee,HK)=>{var _a=0,Nm=1000,Dm=(Nm>>1)-1,cp,Rm=Symbol("kFastTimer"),ap=[],km=-2,Tm=-1,WK=0,oK=1;function xm(){_a+=Dm;let A=0,i=ap.length;while(A<i){let I=ap[A];if(I._state===WK)I._idleStart=_a-Dm,I._state=oK;else if(I._state===oK&&_a>=I._idleStart+I._idleTimeout)I._state=Tm,I._idleStart=-1,I._onTimeout(I._timerArg);if(I._state===Tm){if(I._state=km,--i!==0)ap[A]=ap[i]}else++A}if(ap.length=i,ap.length!==0)qK()}function qK(){if(cp)cp.refresh();else if(clearTimeout(cp),cp=setTimeout(xm,Dm),cp.unref)cp.unref()}class dm{[Rm]=!0;_state=km;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(A,i,I){this._onTimeout=A,this._idleTimeout=i,this._timerArg=I,this.refresh()}refresh(){if(this._state===km)ap.push(this);if(!cp||ap.length===1)qK();this._state=WK}clear(){this._state=Tm,this._idleStart=-1}}HK.exports={setTimeout(A,i,I){return i<=Nm?setTimeout(A,i,I):new dm(A,i,I)},clearTimeout(A){if(A[Rm])A.clear();else clearTimeout(A)},setFastTimeout(A,i,I){return new dm(A,i,I)},clearFastTimeout(A){A.clear()},now(){return _a},tick(A=0){_a+=A-Nm+1,xm(),xm()},reset(){_a=0,ap.length=0,clearTimeout(cp),cp=null},kFastTimer:Rm}});var Ii=N((Ue,BK)=>{class Di extends Error{constructor(A,i){super(A,i);this.name="UndiciError",this.code="UND_ERR"}}class JK extends Di{constructor(A){super(A);this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}}class jK extends Di{constructor(A){super(A);this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}}class lK extends Di{constructor(A){super(A);this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}}class ZK extends Di{constructor(A){super(A);this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}}class zK extends Di{constructor(A,i,I,g){super(A);this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=g,this.status=i,this.statusCode=i,this.headers=I}}class fK extends Di{constructor(A){super(A);this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}}class MK extends Di{constructor(A){super(A);this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}}class Bm extends Di{constructor(A){super(A);this.name="AbortError",this.message=A||"The operation was aborted"}}class VK extends Bm{constructor(A){super(A);this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}}class _K extends Di{constructor(A){super(A);this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}}class hK extends Di{constructor(A){super(A);this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}}class PK extends Di{constructor(A){super(A);this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}}class OK extends Di{constructor(A){super(A);this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}}class bK extends Di{constructor(A){super(A);this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}}class NK extends Di{constructor(A,i){super(A);this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=i}}class DK extends Di{constructor(A){super(A);this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}}class RK extends Di{constructor(A){super(A);this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}}class kK extends Error{constructor(A,i,I){super(A);this.name="HTTPParserError",this.code=i?`HPE_${i}`:void 0,this.data=I?I.toString():void 0}}class TK extends Di{constructor(A){super(A);this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}}class xK extends Di{constructor(A,i,{headers:I,data:g}){super(A);this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=i,this.data=g,this.headers=I}}class dK extends Di{constructor(A,i,{headers:I,body:g}){super(A);this.name="ResponseError",this.message=A||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=i,this.body=g,this.headers=I}}class SK extends Di{constructor(A,i,I={}){super(i,{cause:A,...I});this.name="SecureProxyConnectionError",this.message=i||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=A}}BK.exports={AbortError:Bm,HTTPParserError:kK,UndiciError:Di,HeadersTimeoutError:jK,HeadersOverflowError:lK,BodyTimeoutError:ZK,RequestContentLengthMismatchError:hK,ConnectTimeoutError:JK,ResponseStatusCodeError:zK,InvalidArgumentError:fK,InvalidReturnValueError:MK,RequestAbortedError:VK,ClientDestroyedError:OK,ClientClosedError:bK,InformationalError:_K,SocketError:NK,NotSupportedError:DK,ResponseContentLengthMismatchError:PK,BalancedPoolMissingUpstreamError:RK,ResponseExceededMaxSizeError:TK,RequestRetryError:xK,ResponseError:dK,SecureProxyConnectionError:SK}});var SY=N((AU,yK)=>{var Lm=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"],dY={};Object.setPrototypeOf(dY,null);var LK={};Object.setPrototypeOf(LK,null);function WM(A){let i=LK[A];if(i===void 0)i=Buffer.from(A);return i}for(let A=0;A<Lm.length;++A){let i=Lm[A],I=i.toLowerCase();dY[i]=dY[I]=I}yK.exports={wellknownHeaderNames:Lm,headerNameLowerCasedRecord:dY,getHeaderNameAsBuffer:WM}});var tK=N((iU,QK)=>{var{wellknownHeaderNames:sK,headerNameLowerCasedRecord:qM}=SY();class ha{value=null;left=null;middle=null;right=null;code;constructor(A,i,I){if(I===void 0||I>=A.length)throw new TypeError("Unreachable");if((this.code=A.charCodeAt(I))>127)throw new TypeError("key must be ascii string");if(A.length!==++I)this.middle=new ha(A,i,I);else this.value=i}add(A,i){let I=A.length;if(I===0)throw new TypeError("Unreachable");let g=0,p=this;while(!0){let c=A.charCodeAt(g);if(c>127)throw new TypeError("key must be ascii string");if(p.code===c)if(I===++g){p.value=i;break}else if(p.middle!==null)p=p.middle;else{p.middle=new ha(A,i,g);break}else if(p.code<c)if(p.left!==null)p=p.left;else{p.left=new ha(A,i,g);break}else if(p.right!==null)p=p.right;else{p.right=new ha(A,i,g);break}}}search(A){let i=A.length,I=0,g=this;while(g!==null&&I<i){let p=A[I];if(p<=90&&p>=65)p|=32;while(g!==null){if(p===g.code){if(i===++I)return g;g=g.middle;break}g=g.code<p?g.left:g.right}}return null}}class ym{node=null;insert(A,i){if(this.node===null)this.node=new ha(A,i,0);else this.node.add(A,i)}lookup(A){return this.node?.search(A)?.value??null}}var rK=new ym;for(let A=0;A<sK.length;++A){let i=qM[sK[A]];rK.insert(i,i)}QK.exports={TernarySearchTree:ym,tree:rK}});var LA=N((IU,K2)=>{var tn=Q("node:assert"),{kDestroyed:A2,kBodyUsed:Pa,kListeners:LY,kBody:FK}=oi(),{IncomingMessage:HM}=Q("node:http"),i2=Q("node:stream"),JM=Q("node:net"),{Blob:jM}=Q("node:buffer"),lM=Q("node:util"),{stringify:ZM}=Q("node:querystring"),{EventEmitter:zM}=Q("node:events"),BY=Sm(),{InvalidArgumentError:pI,ConnectTimeoutError:fM}=Ii(),{headerNameLowerCasedRecord:MM}=SY(),{tree:I2}=tK(),[VM,_M]=process.versions.node.split(".",2).map((A)=>Number(A));class sm{constructor(A){this[FK]=A,this[Pa]=!1}async*[Symbol.asyncIterator](){tn(!this[Pa],"disturbed"),this[Pa]=!0,yield*this[FK]}}function eK(){}function hM(A){if(sY(A)){if(n2(A)===0)A.on("data",function(){tn(!1)});if(typeof A.readableDidRead!=="boolean")A[Pa]=!1,zM.prototype.on.call(A,"data",function(){this[Pa]=!0});return A}else if(A&&typeof A.pipeTo==="function")return new sm(A);else if(A&&typeof A!=="string"&&!ArrayBuffer.isView(A)&&a2(A))return new sm(A);else return A}function sY(A){return A&&typeof A==="object"&&typeof A.pipe==="function"&&typeof A.on==="function"}function g2(A){if(A===null)return!1;else if(A instanceof jM)return!0;else if(typeof A!=="object")return!1;else{let i=A[Symbol.toStringTag];return(i==="Blob"||i==="File")&&(("stream"in A)&&typeof A.stream==="function"||("arrayBuffer"in A)&&typeof A.arrayBuffer==="function")}}function PM(A,i){if(A.includes("?")||A.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let I=ZM(i);if(I)A+="?"+I;return A}function p2(A){let i=parseInt(A,10);return i===Number(A)&&i>=0&&i<=65535}function yY(A){return A!=null&&A[0]==="h"&&A[1]==="t"&&A[2]==="t"&&A[3]==="p"&&(A[4]===":"||A[4]==="s"&&A[5]===":")}function c2(A){if(typeof A==="string"){if(A=new URL(A),!yY(A.origin||A.protocol))throw new pI("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}if(!A||typeof A!=="object")throw new pI("Invalid URL: The URL argument must be a non-null object.");if(!(A instanceof URL)){if(A.port!=null&&A.port!==""&&p2(A.port)===!1)throw new pI("Invalid URL: port must be a valid integer or a string representation of an integer.");if(A.path!=null&&typeof A.path!=="string")throw new pI("Invalid URL path: the path must be a string or null/undefined.");if(A.pathname!=null&&typeof A.pathname!=="string")throw new pI("Invalid URL pathname: the pathname must be a string or null/undefined.");if(A.hostname!=null&&typeof A.hostname!=="string")throw new pI("Invalid URL hostname: the hostname must be a string or null/undefined.");if(A.origin!=null&&typeof A.origin!=="string")throw new pI("Invalid URL origin: the origin must be a string or null/undefined.");if(!yY(A.origin||A.protocol))throw new pI("Invalid URL protocol: the URL must start with `http:` or `https:`.");let i=A.port!=null?A.port:A.protocol==="https:"?443:80,I=A.origin!=null?A.origin:`${A.protocol||""}//${A.hostname||""}:${i}`,g=A.path!=null?A.path:`${A.pathname||""}${A.search||""}`;if(I[I.length-1]==="/")I=I.slice(0,I.length-1);if(g&&g[0]!=="/")g=`/${g}`;return new URL(`${I}${g}`)}if(!yY(A.origin||A.protocol))throw new pI("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}function OM(A){if(A=c2(A),A.pathname!=="/"||A.search||A.hash)throw new pI("invalid url");return A}function bM(A){if(A[0]==="["){let I=A.indexOf("]");return tn(I!==-1),A.substring(1,I)}let i=A.indexOf(":");if(i===-1)return A;return A.substring(0,i)}function NM(A){if(!A)return null;tn(typeof A==="string");let i=bM(A);if(JM.isIP(i))return"";return i}function DM(A){return JSON.parse(JSON.stringify(A))}function RM(A){return A!=null&&typeof A[Symbol.asyncIterator]==="function"}function a2(A){return A!=null&&(typeof A[Symbol.iterator]==="function"||typeof A[Symbol.asyncIterator]==="function")}function n2(A){if(A==null)return 0;else if(sY(A)){let i=A._readableState;return i&&i.objectMode===!1&&i.ended===!0&&Number.isFinite(i.length)?i.length:null}else if(g2(A))return A.size!=null?A.size:null;else if(v2(A))return A.byteLength;return null}function C2(A){return A&&!!(A.destroyed||A[A2]||i2.isDestroyed?.(A))}function Y2(A,i){if(A==null||!sY(A)||C2(A))return;if(typeof A.destroy==="function"){if(Object.getPrototypeOf(A).constructor===HM)A.socket=null;A.destroy(i)}else if(i)queueMicrotask(()=>{A.emit("error",i)});if(A.destroyed!==!0)A[A2]=!0}var kM=/timeout=(\d+)/;function TM(A){let i=A.match(kM);return i?parseInt(i[1],10)*1000:null}function w2(A){return typeof A==="string"?MM[A]??A.toLowerCase():I2.lookup(A)??A.toString("latin1").toLowerCase()}function xM(A){return I2.lookup(A)??A.toString("latin1").toLowerCase()}function dM(A,i){if(i===void 0)i={};for(let I=0;I<A.length;I+=2){let g=w2(A[I]),p=i[g];if(p){if(typeof p==="string")p=[p],i[g]=p;p.push(A[I+1].toString("utf8"))}else{let c=A[I+1];if(typeof c==="string")i[g]=c;else i[g]=Array.isArray(c)?c.map((a)=>a.toString("utf8")):c.toString("utf8")}}if("content-length"in i&&"content-disposition"in i)i["content-disposition"]=Buffer.from(i["content-disposition"]).toString("latin1");return i}function SM(A){let i=A.length,I=new Array(i),g=!1,p=-1,c,a,n=0;for(let C=0;C<i;C+=2){if(c=A[C],a=A[C+1],typeof c!=="string"&&(c=c.toString()),typeof a!=="string"&&(a=a.toString("utf8")),n=c.length,n===14&&c[7]==="-"&&(c==="content-length"||c.toLowerCase()==="content-length"))g=!0;else if(n===19&&c[7]==="-"&&(c==="content-disposition"||c.toLowerCase()==="content-disposition"))p=C+1;I[C]=c,I[C+1]=a}if(g&&p!==-1)I[p]=Buffer.from(I[p]).toString("latin1");return I}function BM(A){if(!Array.isArray(A))throw new TypeError("expected headers to be an array");return A.map((i)=>Buffer.from(i))}function v2(A){return A instanceof Uint8Array||Buffer.isBuffer(A)}function LM(A,i,I){if(!A||typeof A!=="object")throw new pI("handler must be an object");if(typeof A.onRequestStart==="function")return;if(typeof A.onConnect!=="function")throw new pI("invalid onConnect method");if(typeof A.onError!=="function")throw new pI("invalid onError method");if(typeof A.onBodySent!=="function"&&A.onBodySent!==void 0)throw new pI("invalid onBodySent method");if(I||i==="CONNECT"){if(typeof A.onUpgrade!=="function")throw new pI("invalid onUpgrade method")}else{if(typeof A.onHeaders!=="function")throw new pI("invalid onHeaders method");if(typeof A.onData!=="function")throw new pI("invalid onData method");if(typeof A.onComplete!=="function")throw new pI("invalid onComplete method")}}function yM(A){return!!(A&&(i2.isDisturbed(A)||A[Pa]))}function sM(A){return{localAddress:A.localAddress,localPort:A.localPort,remoteAddress:A.remoteAddress,remotePort:A.remotePort,remoteFamily:A.remoteFamily,timeout:A.timeout,bytesWritten:A.bytesWritten,bytesRead:A.bytesRead}}function rM(A){let i;return new ReadableStream({async start(){i=A[Symbol.asyncIterator]()},pull(I){async function g(){let{done:p,value:c}=await i.next();if(p)queueMicrotask(()=>{I.close(),I.byobRequest?.respond(0)});else{let a=Buffer.isBuffer(c)?c:Buffer.from(c);if(a.byteLength)I.enqueue(new Uint8Array(a));else return await g()}}return g()},async cancel(){await i.return()},type:"bytes"})}function QM(A){return A&&typeof A==="object"&&typeof A.append==="function"&&typeof A.delete==="function"&&typeof A.get==="function"&&typeof A.getAll==="function"&&typeof A.has==="function"&&typeof A.set==="function"&&A[Symbol.toStringTag]==="FormData"}function tM(A,i){if("addEventListener"in A)return A.addEventListener("abort",i,{once:!0}),()=>A.removeEventListener("abort",i);return A.once("abort",i),()=>A.removeListener("abort",i)}var G2=(()=>{if(typeof String.prototype.toWellFormed==="function")return(A)=>`${A}`.toWellFormed();else return lM.toUSVString})(),FM=(()=>{if(typeof String.prototype.isWellFormed==="function")return(A)=>`${A}`.isWellFormed();else return(A)=>G2(A)===`${A}`})();function m2(A){switch(A){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return A>=33&&A<=126}}function eM(A){if(A.length===0)return!1;for(let i=0;i<A.length;++i)if(!m2(A.charCodeAt(i)))return!1;return!0}var UM=/[^\t\x20-\x7e\x80-\xff]/;function AV(A){return!UM.test(A)}var iV=/^bytes (\d+)-(\d+)\/(\d+)?$/;function IV(A){if(A==null||A==="")return{start:0,end:null,size:null};let i=A?A.match(iV):null;return i?{start:parseInt(i[1]),end:i[2]?parseInt(i[2]):null,size:i[3]?parseInt(i[3]):null}:null}function gV(A,i,I){return(A[LY]??=[]).push([i,I]),A.on(i,I),A}function pV(A){if(A[LY]!=null){for(let[i,I]of A[LY])A.removeListener(i,I);A[LY]=null}return A}function cV(A,i,I){try{i.onError(I),tn(i.aborted)}catch(g){A.emit("error",g)}}var aV=process.platform==="win32"?(A,i)=>{if(!i.timeout)return eK;let I=null,g=null,p=BY.setFastTimeout(()=>{I=setImmediate(()=>{g=setImmediate(()=>UK(A.deref(),i))})},i.timeout);return()=>{BY.clearFastTimeout(p),clearImmediate(I),clearImmediate(g)}}:(A,i)=>{if(!i.timeout)return eK;let I=null,g=BY.setFastTimeout(()=>{I=setImmediate(()=>{UK(A.deref(),i)})},i.timeout);return()=>{BY.clearFastTimeout(g),clearImmediate(I)}};function UK(A,i){if(A==null)return;let I="Connect Timeout Error";if(Array.isArray(A.autoSelectFamilyAttemptedAddresses))I+=` (attempted addresses: ${A.autoSelectFamilyAttemptedAddresses.join(", ")},`;else I+=` (attempted address: ${i.hostname}:${i.port},`;I+=` timeout: ${i.timeout}ms)`,Y2(A,new fM(I))}var E2=Object.create(null);E2.enumerable=!0;var rm={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},X2={...rm,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(rm,null);Object.setPrototypeOf(X2,null);K2.exports={kEnumerableProperty:E2,isDisturbed:yM,toUSVString:G2,isUSVString:FM,isBlobLike:g2,parseOrigin:OM,parseURL:c2,getServerName:NM,isStream:sY,isIterable:a2,isAsyncIterable:RM,isDestroyed:C2,headerNameToString:w2,bufferToLowerCasedHeaderName:xM,addListener:gV,removeAllListeners:pV,errorRequest:cV,parseRawHeaders:SM,encodeRawHeaders:BM,parseHeaders:dM,parseKeepAliveTimeout:TM,destroy:Y2,bodyLength:n2,deepClone:DM,ReadableStreamFrom:rM,isBuffer:v2,assertRequestHandler:LM,getSocketInfo:sM,isFormDataLike:QM,serializePathWithQuery:PM,addAbortListener:tM,isValidHTTPToken:eM,isValidHeaderValue:AV,isTokenCharCode:m2,parseRangeHeader:IV,normalizedMethodRecordsBase:rm,normalizedMethodRecords:X2,isValidPort:p2,isHttpOrHttpsPrefixed:yY,nodeMajor:VM,nodeMinor:_M,safeHTTPMethods:Object.freeze(["GET","HEAD","OPTIONS","TRACE"]),wrapRequestBody:hM,setupConnectTimeout:aV}});var np=N((gU,q2)=>{var zi=Q("node:diagnostics_channel"),Qm=Q("node:util"),jc=Qm.debuglog("undici"),Fn=Qm.debuglog("fetch"),rY=Qm.debuglog("websocket"),nV={beforeConnect:zi.channel("undici:client:beforeConnect"),connected:zi.channel("undici:client:connected"),connectError:zi.channel("undici:client:connectError"),sendHeaders:zi.channel("undici:client:sendHeaders"),create:zi.channel("undici:request:create"),bodySent:zi.channel("undici:request:bodySent"),headers:zi.channel("undici:request:headers"),trailers:zi.channel("undici:request:trailers"),error:zi.channel("undici:request:error"),open:zi.channel("undici:websocket:open"),close:zi.channel("undici:websocket:close"),socketError:zi.channel("undici:websocket:socket_error"),ping:zi.channel("undici:websocket:ping"),pong:zi.channel("undici:websocket:pong")},$2=!1;function W2(A=jc){if($2)return;$2=!0,zi.subscribe("undici:client:beforeConnect",(i)=>{let{connectParams:{version:I,protocol:g,port:p,host:c}}=i;A("connecting to %s%s using %s%s",c,p?`:${p}`:"",g,I)}),zi.subscribe("undici:client:connected",(i)=>{let{connectParams:{version:I,protocol:g,port:p,host:c}}=i;A("connected to %s%s using %s%s",c,p?`:${p}`:"",g,I)}),zi.subscribe("undici:client:connectError",(i)=>{let{connectParams:{version:I,protocol:g,port:p,host:c},error:a}=i;A("connection to %s%s using %s%s errored - %s",c,p?`:${p}`:"",g,I,a.message)}),zi.subscribe("undici:client:sendHeaders",(i)=>{let{request:{method:I,path:g,origin:p}}=i;A("sending request to %s %s/%s",I,p,g)})}var u2=!1;function CV(A=jc){if(u2)return;u2=!0,zi.subscribe("undici:request:headers",(i)=>{let{request:{method:I,path:g,origin:p},response:{statusCode:c}}=i;A("received response to %s %s/%s - HTTP %d",I,p,g,c)}),zi.subscribe("undici:request:trailers",(i)=>{let{request:{method:I,path:g,origin:p}}=i;A("trailers received from %s %s/%s",I,p,g)}),zi.subscribe("undici:request:error",(i)=>{let{request:{method:I,path:g,origin:p},error:c}=i;A("request to %s %s/%s errored - %s",I,p,g,c.message)})}var o2=!1;function YV(A=rY){if(o2)return;o2=!0,zi.subscribe("undici:websocket:open",(i)=>{let{address:{address:I,port:g}}=i;A("connection opened %s%s",I,g?`:${g}`:"")}),zi.subscribe("undici:websocket:close",(i)=>{let{websocket:I,code:g,reason:p}=i;A("closed connection to %s - %s %s",I.url,g,p)}),zi.subscribe("undici:websocket:socket_error",(i)=>{A("connection errored - %s",i.message)}),zi.subscribe("undici:websocket:ping",(i)=>{A("ping received")}),zi.subscribe("undici:websocket:pong",(i)=>{A("pong received")})}if(jc.enabled||Fn.enabled)W2(Fn.enabled?Fn:jc),CV(Fn.enabled?Fn:jc);if(rY.enabled)W2(jc.enabled?jc:rY),YV(rY);q2.exports={channels:nV}});var z2=N((pU,Z2)=>{var{InvalidArgumentError:Mi,NotSupportedError:wV}=Ii(),hg=Q("node:assert"),{isValidHTTPToken:j2,isValidHeaderValue:H2,isStream:vV,destroy:GV,isBuffer:mV,isFormDataLike:EV,isIterable:XV,isBlobLike:KV,serializePathWithQuery:$V,assertRequestHandler:uV,getServerName:oV,normalizedMethodRecords:WV}=LA(),{channels:Pg}=np(),{headerNameLowerCasedRecord:J2}=SY(),qV=/[^\u0021-\u00ff]/,FI=Symbol("handler");class l2{constructor(A,{path:i,method:I,body:g,headers:p,query:c,idempotent:a,blocking:n,upgrade:C,headersTimeout:Y,bodyTimeout:w,reset:m,expectContinue:G,servername:$,throwOnError:X},Z){if(typeof i!=="string")throw new Mi("path must be a string");else if(i[0]!=="/"&&!(i.startsWith("http://")||i.startsWith("https://"))&&I!=="CONNECT")throw new Mi("path must be an absolute URL or start with a slash");else if(qV.test(i))throw new Mi("invalid request path");if(typeof I!=="string")throw new Mi("method must be a string");else if(WV[I]===void 0&&!j2(I))throw new Mi("invalid request method");if(C&&typeof C!=="string")throw new Mi("upgrade must be a string");if(Y!=null&&(!Number.isFinite(Y)||Y<0))throw new Mi("invalid headersTimeout");if(w!=null&&(!Number.isFinite(w)||w<0))throw new Mi("invalid bodyTimeout");if(m!=null&&typeof m!=="boolean")throw new Mi("invalid reset");if(G!=null&&typeof G!=="boolean")throw new Mi("invalid expectContinue");if(X!=null)throw new Mi("invalid throwOnError");if(this.headersTimeout=Y,this.bodyTimeout=w,this.method=I,this.abort=null,g==null)this.body=null;else if(vV(g)){this.body=g;let W=this.body._readableState;if(!W||!W.autoDestroy)this.endHandler=function o(){GV(this)},this.body.on("end",this.endHandler);this.errorHandler=(o)=>{if(this.abort)this.abort(o);else this.error=o},this.body.on("error",this.errorHandler)}else if(mV(g))this.body=g.byteLength?g:null;else if(ArrayBuffer.isView(g))this.body=g.buffer.byteLength?Buffer.from(g.buffer,g.byteOffset,g.byteLength):null;else if(g instanceof ArrayBuffer)this.body=g.byteLength?Buffer.from(g):null;else if(typeof g==="string")this.body=g.length?Buffer.from(g):null;else if(EV(g)||XV(g)||KV(g))this.body=g;else throw new Mi("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=C||null,this.path=c?$V(i,c):i,this.origin=A,this.idempotent=a==null?I==="HEAD"||I==="GET":a,this.blocking=n??this.method!=="HEAD",this.reset=m==null?null:m,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=G!=null?G:!1,Array.isArray(p)){if(p.length%2!==0)throw new Mi("headers array must be even");for(let W=0;W<p.length;W+=2)QY(this,p[W],p[W+1])}else if(p&&typeof p==="object")if(p[Symbol.iterator])for(let W of p){if(!Array.isArray(W)||W.length!==2)throw new Mi("headers must be in key-value pair format");QY(this,W[0],W[1])}else{let W=Object.keys(p);for(let o=0;o<W.length;++o)QY(this,W[o],p[W[o]])}else if(p!=null)throw new Mi("headers must be an object or an array");if(uV(Z,I,C),this.servername=$||oV(this.host)||null,this[FI]=Z,Pg.create.hasSubscribers)Pg.create.publish({request:this})}onBodySent(A){if(this[FI].onBodySent)try{return this[FI].onBodySent(A)}catch(i){this.abort(i)}}onRequestSent(){if(Pg.bodySent.hasSubscribers)Pg.bodySent.publish({request:this});if(this[FI].onRequestSent)try{return this[FI].onRequestSent()}catch(A){this.abort(A)}}onConnect(A){if(hg(!this.aborted),hg(!this.completed),this.error)A(this.error);else return this.abort=A,this[FI].onConnect(A)}onResponseStarted(){return this[FI].onResponseStarted?.()}onHeaders(A,i,I,g){if(hg(!this.aborted),hg(!this.completed),Pg.headers.hasSubscribers)Pg.headers.publish({request:this,response:{statusCode:A,headers:i,statusText:g}});try{return this[FI].onHeaders(A,i,I,g)}catch(p){this.abort(p)}}onData(A){hg(!this.aborted),hg(!this.completed);try{return this[FI].onData(A)}catch(i){return this.abort(i),!1}}onUpgrade(A,i,I){return hg(!this.aborted),hg(!this.completed),this[FI].onUpgrade(A,i,I)}onComplete(A){if(this.onFinally(),hg(!this.aborted),hg(!this.completed),this.completed=!0,Pg.trailers.hasSubscribers)Pg.trailers.publish({request:this,trailers:A});try{return this[FI].onComplete(A)}catch(i){this.onError(i)}}onError(A){if(this.onFinally(),Pg.error.hasSubscribers)Pg.error.publish({request:this,error:A});if(this.aborted)return;return this.aborted=!0,this[FI].onError(A)}onFinally(){if(this.errorHandler)this.body.off("error",this.errorHandler),this.errorHandler=null;if(this.endHandler)this.body.off("end",this.endHandler),this.endHandler=null}addHeader(A,i){return QY(this,A,i),this}}function QY(A,i,I){if(I&&(typeof I==="object"&&!Array.isArray(I)))throw new Mi(`invalid ${i} header`);else if(I===void 0)return;let g=J2[i];if(g===void 0){if(g=i.toLowerCase(),J2[g]===void 0&&!j2(g))throw new Mi("invalid header key")}if(Array.isArray(I)){let p=[];for(let c=0;c<I.length;c++)if(typeof I[c]==="string"){if(!H2(I[c]))throw new Mi(`invalid ${i} header`);p.push(I[c])}else if(I[c]===null)p.push("");else if(typeof I[c]==="object")throw new Mi(`invalid ${i} header`);else p.push(`${I[c]}`);I=p}else if(typeof I==="string"){if(!H2(I))throw new Mi(`invalid ${i} header`)}else if(I===null)I="";else I=`${I}`;if(A.host===null&&g==="host"){if(typeof I!=="string")throw new Mi("invalid host header");A.host=I}else if(A.contentLength===null&&g==="content-length"){if(A.contentLength=parseInt(I,10),!Number.isFinite(A.contentLength))throw new Mi("invalid content-length header")}else if(A.contentType===null&&g==="content-type")A.contentType=I,A.headers.push(i,I);else if(g==="transfer-encoding"||g==="keep-alive"||g==="upgrade")throw new Mi(`invalid ${g} header`);else if(g==="connection"){let p=typeof I==="string"?I.toLowerCase():null;if(p!=="close"&&p!=="keep-alive")throw new Mi("invalid connection header");if(p==="close")A.reset=!0}else if(g==="expect")throw new wV("expect header not supported");else A.headers.push(i,I)}Z2.exports=l2});var tY=N((cU,f2)=>{var{InvalidArgumentError:HV}=Ii();f2.exports=class A{#A;constructor(i){this.#A=i}static wrap(i){return i.onRequestStart?i:new A(i)}onConnect(i,I){return this.#A.onConnect?.(i,I)}onHeaders(i,I,g,p){return this.#A.onHeaders?.(i,I,g,p)}onUpgrade(i,I,g){return this.#A.onUpgrade?.(i,I,g)}onData(i){return this.#A.onData?.(i)}onComplete(i){return this.#A.onComplete?.(i)}onError(i){if(!this.#A.onError)throw i;return this.#A.onError?.(i)}onRequestStart(i,I){this.#A.onConnect?.((g)=>i.abort(g),I)}onRequestUpgrade(i,I,g,p){let c=[];for(let[a,n]of Object.entries(g))c.push(Buffer.from(a),Array.isArray(n)?n.map((C)=>Buffer.from(C)):Buffer.from(n));this.#A.onUpgrade?.(I,c,p)}onResponseStart(i,I,g,p){let c=[];for(let[a,n]of Object.entries(g))c.push(Buffer.from(a),Array.isArray(n)?n.map((C)=>Buffer.from(C)):Buffer.from(n));if(this.#A.onHeaders?.(I,c,()=>i.resume(),p)===!1)i.pause()}onResponseData(i,I){if(this.#A.onData?.(I)===!1)i.pause()}onResponseEnd(i,I){let g=[];for(let[p,c]of Object.entries(I))g.push(Buffer.from(p),Array.isArray(c)?c.map((a)=>Buffer.from(a)):Buffer.from(c));this.#A.onComplete?.(g)}onResponseError(i,I){if(!this.#A.onError)throw new HV("invalid onError method");this.#A.onError?.(I)}}});var en=N((aU,V2)=>{var JV=Q("node:events"),jV=tY(),lV=(A)=>(i,I)=>A(i,jV.wrap(I));class M2 extends JV{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...A){let i=Array.isArray(A[0])?A[0]:A,I=this.dispatch.bind(this);for(let g of i){if(g==null)continue;if(typeof g!=="function")throw new TypeError(`invalid interceptor, expected function received ${typeof g}`);if(I=g(I),I=lV(I),I==null||typeof I!=="function"||I.length!==2)throw new TypeError("invalid interceptor")}return new Proxy(this,{get:(g,p)=>p==="dispatch"?I:g[p]})}}V2.exports=M2});var P2=N((nU,h2)=>{var{parseHeaders:tm}=LA(),{InvalidArgumentError:ZV}=Ii(),Fm=Symbol("resume");class _2{#A=!1;#i=null;#I=!1;#g;[Fm]=null;constructor(A){this.#g=A}pause(){this.#A=!0}resume(){if(this.#A)this.#A=!1,this[Fm]?.()}abort(A){if(!this.#I)this.#I=!0,this.#i=A,this.#g(A)}get aborted(){return this.#I}get reason(){return this.#i}get paused(){return this.#A}}h2.exports=class A{#A;#i;constructor(i){this.#A=i}static unwrap(i){return!i.onRequestStart?i:new A(i)}onConnect(i,I){this.#i=new _2(i),this.#A.onRequestStart?.(this.#i,I)}onUpgrade(i,I,g){this.#A.onRequestUpgrade?.(this.#i,i,tm(I),g)}onHeaders(i,I,g,p){return this.#i[Fm]=g,this.#A.onResponseStart?.(this.#i,i,tm(I),p),!this.#i.paused}onData(i){return this.#A.onResponseData?.(this.#i,i),!this.#i.paused}onComplete(i){this.#A.onResponseEnd?.(this.#i,tm(i))}onError(i){if(!this.#A.onResponseError)throw new ZV("invalid onError method");this.#A.onResponseError?.(this.#i,i)}}});var lc=N((CU,b2)=>{var zV=en(),fV=P2(),{ClientDestroyedError:em,ClientClosedError:MV,InvalidArgumentError:FY}=Ii(),{kDestroy:VV,kClose:_V,kClosed:Un,kDestroyed:Oa,kDispatch:hV}=oi(),Cp=Symbol("onDestroyed"),ba=Symbol("onClosed");class O2 extends zV{constructor(){super();this[Oa]=!1,this[Cp]=null,this[Un]=!1,this[ba]=[]}get destroyed(){return this[Oa]}get closed(){return this[Un]}close(A){if(A===void 0)return new Promise((I,g)=>{this.close((p,c)=>{return p?g(p):I(c)})});if(typeof A!=="function")throw new FY("invalid callback");if(this[Oa]){queueMicrotask(()=>A(new em,null));return}if(this[Un]){if(this[ba])this[ba].push(A);else queueMicrotask(()=>A(null,null));return}this[Un]=!0,this[ba].push(A);let i=()=>{let I=this[ba];this[ba]=null;for(let g=0;g<I.length;g++)I[g](null,null)};this[_V]().then(()=>this.destroy()).then(()=>{queueMicrotask(i)})}destroy(A,i){if(typeof A==="function")i=A,A=null;if(i===void 0)return new Promise((g,p)=>{this.destroy(A,(c,a)=>{return c?p(c):g(a)})});if(typeof i!=="function")throw new FY("invalid callback");if(this[Oa]){if(this[Cp])this[Cp].push(i);else queueMicrotask(()=>i(null,null));return}if(!A)A=new em;this[Oa]=!0,this[Cp]=this[Cp]||[],this[Cp].push(i);let I=()=>{let g=this[Cp];this[Cp]=null;for(let p=0;p<g.length;p++)g[p](null,null)};this[VV](A).then(()=>{queueMicrotask(I)})}dispatch(A,i){if(!i||typeof i!=="object")throw new FY("handler must be an object");i=fV.unwrap(i);try{if(!A||typeof A!=="object")throw new FY("opts must be an object.");if(this[Oa]||this[Cp])throw new em;if(this[Un])throw new MV;return this[hV](A,i)}catch(I){if(typeof i.onError!=="function")throw I;return i.onError(I),!1}}}b2.exports=O2});var AC=N((YU,R2)=>{var PV=Q("node:net"),N2=Q("node:assert"),D2=LA(),{InvalidArgumentError:OV}=Ii(),Um,AE;if(global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG))AE=class A{constructor(i){this._maxCachedSessions=i,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry((I)=>{if(this._sessionCache.size<this._maxCachedSessions)return;let g=this._sessionCache.get(I);if(g!==void 0&&g.deref()===void 0)this._sessionCache.delete(I)})}get(i){let I=this._sessionCache.get(i);return I?I.deref():null}set(i,I){if(this._maxCachedSessions===0)return;this._sessionCache.set(i,new WeakRef(I)),this._sessionRegistry.register(I,i)}};else AE=class A{constructor(i){this._maxCachedSessions=i,this._sessionCache=new Map}get(i){return this._sessionCache.get(i)}set(i,I){if(this._maxCachedSessions===0)return;if(this._sessionCache.size>=this._maxCachedSessions){let{value:g}=this._sessionCache.keys().next();this._sessionCache.delete(g)}this._sessionCache.set(i,I)}};function bV({allowH2:A,maxCachedSessions:i,socketPath:I,timeout:g,session:p,...c}){if(i!=null&&(!Number.isInteger(i)||i<0))throw new OV("maxCachedSessions must be a positive integer or zero");let a={path:I,...c},n=new AE(i==null?100:i);return g=g==null?1e4:g,A=A!=null?A:!1,function C({hostname:Y,host:w,protocol:m,port:G,servername:$,localAddress:X,httpSocket:Z},W){let o;if(m==="https:"){if(!Um)Um=Q("node:tls");$=$||a.servername||D2.getServerName(w)||null;let _=$||Y;N2(_);let D=p||n.get(_)||null;G=G||443,o=Um.connect({highWaterMark:16384,...a,servername:$,session:D,localAddress:X,ALPNProtocols:A?["http/1.1","h2"]:["http/1.1"],socket:Z,port:G,host:Y}),o.on("session",function(k){n.set(_,k)})}else N2(!Z,"httpSocket can only be sent on TLS update"),G=G||80,o=PV.connect({highWaterMark:65536,...a,localAddress:X,port:G,host:Y});if(a.keepAlive==null||a.keepAlive){let _=a.keepAliveInitialDelay===void 0?60000:a.keepAliveInitialDelay;o.setKeepAlive(!0,_)}let K=D2.setupConnectTimeout(new WeakRef(o),{timeout:g,hostname:Y,port:G});return o.setNoDelay(!0).once(m==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(K),W){let _=W;W=null,_(null,this)}}).on("error",function(_){if(queueMicrotask(K),W){let D=W;W=null,D(_)}}),o}}R2.exports=bV});var x2=N((k2)=>{Object.defineProperty(k2,"__esModule",{value:!0});k2.enumToMap=void 0;function NV(A,i=[],I=[]){var g,p;let c=((g=i===null||i===void 0?void 0:i.length)!==null&&g!==void 0?g:0)===0,a=((p=I===null||I===void 0?void 0:I.length)!==null&&p!==void 0?p:0)===0;return Object.fromEntries(Object.entries(A).filter(([,n])=>{return typeof n==="number"&&(c||i.includes(n))&&(a||!I.includes(n))}))}k2.enumToMap=NV});var r2=N((d2)=>{Object.defineProperty(d2,"__esModule",{value:!0});d2.SPECIAL_HEADERS=d2.MINOR=d2.MAJOR=d2.HTAB_SP_VCHAR_OBS_TEXT=d2.QUOTED_STRING=d2.CONNECTION_TOKEN_CHARS=d2.HEADER_CHARS=d2.TOKEN=d2.HEX=d2.URL_CHAR=d2.USERINFO_CHARS=d2.MARK=d2.ALPHANUM=d2.NUM=d2.HEX_MAP=d2.NUM_MAP=d2.ALPHA=d2.STATUSES_HTTP=d2.H_METHOD_MAP=d2.METHOD_MAP=d2.METHODS_RTSP=d2.METHODS_ICE=d2.METHODS_HTTP=d2.HEADER_STATE=d2.FINISH=d2.STATUSES=d2.METHODS=d2.LENIENT_FLAGS=d2.FLAGS=d2.TYPE=d2.ERROR=void 0;var DV=x2();d2.ERROR={OK:0,INTERNAL:1,STRICT:2,CR_EXPECTED:25,LF_EXPECTED:3,UNEXPECTED_CONTENT_LENGTH:4,UNEXPECTED_SPACE:30,CLOSED_CONNECTION:5,INVALID_METHOD:6,INVALID_URL:7,INVALID_CONSTANT:8,INVALID_VERSION:9,INVALID_HEADER_TOKEN:10,INVALID_CONTENT_LENGTH:11,INVALID_CHUNK_SIZE:12,INVALID_STATUS:13,INVALID_EOF_STATE:14,INVALID_TRANSFER_ENCODING:15,CB_MESSAGE_BEGIN:16,CB_HEADERS_COMPLETE:17,CB_MESSAGE_COMPLETE:18,CB_CHUNK_HEADER:19,CB_CHUNK_COMPLETE:20,PAUSED:21,PAUSED_UPGRADE:22,PAUSED_H2_UPGRADE:23,USER:24,CB_URL_COMPLETE:26,CB_STATUS_COMPLETE:27,CB_METHOD_COMPLETE:32,CB_VERSION_COMPLETE:33,CB_HEADER_FIELD_COMPLETE:28,CB_HEADER_VALUE_COMPLETE:29,CB_CHUNK_EXTENSION_NAME_COMPLETE:34,CB_CHUNK_EXTENSION_VALUE_COMPLETE:35,CB_RESET:31};d2.TYPE={BOTH:0,REQUEST:1,RESPONSE:2};d2.FLAGS={CONNECTION_KEEP_ALIVE:1,CONNECTION_CLOSE:2,CONNECTION_UPGRADE:4,CHUNKED:8,UPGRADE:16,CONTENT_LENGTH:32,SKIPBODY:64,TRAILING:128,TRANSFER_ENCODING:512};d2.LENIENT_FLAGS={HEADERS:1,CHUNKED_LENGTH:2,KEEP_ALIVE:4,TRANSFER_ENCODING:8,VERSION:16,DATA_AFTER_CLOSE:32,OPTIONAL_LF_AFTER_CR:64,OPTIONAL_CRLF_AFTER_CHUNK:128,OPTIONAL_CR_BEFORE_LF:256,SPACES_AFTER_CHUNK_SIZE:512};d2.METHODS={DELETE:0,GET:1,HEAD:2,POST:3,PUT:4,CONNECT:5,OPTIONS:6,TRACE:7,COPY:8,LOCK:9,MKCOL:10,MOVE:11,PROPFIND:12,PROPPATCH:13,SEARCH:14,UNLOCK:15,BIND:16,REBIND:17,UNBIND:18,ACL:19,REPORT:20,MKACTIVITY:21,CHECKOUT:22,MERGE:23,"M-SEARCH":24,NOTIFY:25,SUBSCRIBE:26,UNSUBSCRIBE:27,PATCH:28,PURGE:29,MKCALENDAR:30,LINK:31,UNLINK:32,SOURCE:33,PRI:34,DESCRIBE:35,ANNOUNCE:36,SETUP:37,PLAY:38,PAUSE:39,TEARDOWN:40,GET_PARAMETER:41,SET_PARAMETER:42,REDIRECT:43,RECORD:44,FLUSH:45,QUERY:46};d2.STATUSES={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,RESPONSE_IS_STALE:110,REVALIDATION_FAILED:111,DISCONNECTED_OPERATION:112,HEURISTIC_EXPIRATION:113,MISCELLANEOUS_WARNING:199,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,TRANSFORMATION_APPLIED:214,IM_USED:226,MISCELLANEOUS_PERSISTENT_WARNING:299,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,SWITCH_PROXY:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,PAGE_EXPIRED:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,LOGIN_TIMEOUT:440,NO_RESPONSE:444,RETRY_WITH:449,BLOCKED_BY_PARENTAL_CONTROL:450,UNAVAILABLE_FOR_LEGAL_REASONS:451,CLIENT_CLOSED_LOAD_BALANCED_REQUEST:460,INVALID_X_FORWARDED_FOR:463,REQUEST_HEADER_TOO_LARGE:494,SSL_CERTIFICATE_ERROR:495,SSL_CERTIFICATE_REQUIRED:496,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,INVALID_TOKEN:498,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511,WEB_SERVER_UNKNOWN_ERROR:520,WEB_SERVER_IS_DOWN:521,CONNECTION_TIMEOUT:522,ORIGIN_IS_UNREACHABLE:523,TIMEOUT_OCCURED:524,SSL_HANDSHAKE_FAILED:525,INVALID_SSL_CERTIFICATE:526,RAILGUN_ERROR:527,SITE_IS_OVERLOADED:529,SITE_IS_FROZEN:530,IDENTITY_PROVIDER_AUTHENTICATION_ERROR:561,NETWORK_READ_TIMEOUT:598,NETWORK_CONNECT_TIMEOUT:599};d2.FINISH={SAFE:0,SAFE_WITH_CB:1,UNSAFE:2};d2.HEADER_STATE={GENERAL:0,CONNECTION:1,CONTENT_LENGTH:2,TRANSFER_ENCODING:3,UPGRADE:4,CONNECTION_KEEP_ALIVE:5,CONNECTION_CLOSE:6,CONNECTION_UPGRADE:7,TRANSFER_ENCODING_CHUNKED:8};d2.METHODS_HTTP=[d2.METHODS.DELETE,d2.METHODS.GET,d2.METHODS.HEAD,d2.METHODS.POST,d2.METHODS.PUT,d2.METHODS.CONNECT,d2.METHODS.OPTIONS,d2.METHODS.TRACE,d2.METHODS.COPY,d2.METHODS.LOCK,d2.METHODS.MKCOL,d2.METHODS.MOVE,d2.METHODS.PROPFIND,d2.METHODS.PROPPATCH,d2.METHODS.SEARCH,d2.METHODS.UNLOCK,d2.METHODS.BIND,d2.METHODS.REBIND,d2.METHODS.UNBIND,d2.METHODS.ACL,d2.METHODS.REPORT,d2.METHODS.MKACTIVITY,d2.METHODS.CHECKOUT,d2.METHODS.MERGE,d2.METHODS["M-SEARCH"],d2.METHODS.NOTIFY,d2.METHODS.SUBSCRIBE,d2.METHODS.UNSUBSCRIBE,d2.METHODS.PATCH,d2.METHODS.PURGE,d2.METHODS.MKCALENDAR,d2.METHODS.LINK,d2.METHODS.UNLINK,d2.METHODS.PRI,d2.METHODS.SOURCE,d2.METHODS.QUERY];d2.METHODS_ICE=[d2.METHODS.SOURCE];d2.METHODS_RTSP=[d2.METHODS.OPTIONS,d2.METHODS.DESCRIBE,d2.METHODS.ANNOUNCE,d2.METHODS.SETUP,d2.METHODS.PLAY,d2.METHODS.PAUSE,d2.METHODS.TEARDOWN,d2.METHODS.GET_PARAMETER,d2.METHODS.SET_PARAMETER,d2.METHODS.REDIRECT,d2.METHODS.RECORD,d2.METHODS.FLUSH,d2.METHODS.GET,d2.METHODS.POST];d2.METHOD_MAP=DV.enumToMap(d2.METHODS);d2.H_METHOD_MAP=Object.fromEntries(Object.entries(d2.METHODS).filter(([A])=>A.startsWith("H")));d2.STATUSES_HTTP=[d2.STATUSES.CONTINUE,d2.STATUSES.SWITCHING_PROTOCOLS,d2.STATUSES.PROCESSING,d2.STATUSES.EARLY_HINTS,d2.STATUSES.RESPONSE_IS_STALE,d2.STATUSES.REVALIDATION_FAILED,d2.STATUSES.DISCONNECTED_OPERATION,d2.STATUSES.HEURISTIC_EXPIRATION,d2.STATUSES.MISCELLANEOUS_WARNING,d2.STATUSES.OK,d2.STATUSES.CREATED,d2.STATUSES.ACCEPTED,d2.STATUSES.NON_AUTHORITATIVE_INFORMATION,d2.STATUSES.NO_CONTENT,d2.STATUSES.RESET_CONTENT,d2.STATUSES.PARTIAL_CONTENT,d2.STATUSES.MULTI_STATUS,d2.STATUSES.ALREADY_REPORTED,d2.STATUSES.TRANSFORMATION_APPLIED,d2.STATUSES.IM_USED,d2.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,d2.STATUSES.MULTIPLE_CHOICES,d2.STATUSES.MOVED_PERMANENTLY,d2.STATUSES.FOUND,d2.STATUSES.SEE_OTHER,d2.STATUSES.NOT_MODIFIED,d2.STATUSES.USE_PROXY,d2.STATUSES.SWITCH_PROXY,d2.STATUSES.TEMPORARY_REDIRECT,d2.STATUSES.PERMANENT_REDIRECT,d2.STATUSES.BAD_REQUEST,d2.STATUSES.UNAUTHORIZED,d2.STATUSES.PAYMENT_REQUIRED,d2.STATUSES.FORBIDDEN,d2.STATUSES.NOT_FOUND,d2.STATUSES.METHOD_NOT_ALLOWED,d2.STATUSES.NOT_ACCEPTABLE,d2.STATUSES.PROXY_AUTHENTICATION_REQUIRED,d2.STATUSES.REQUEST_TIMEOUT,d2.STATUSES.CONFLICT,d2.STATUSES.GONE,d2.STATUSES.LENGTH_REQUIRED,d2.STATUSES.PRECONDITION_FAILED,d2.STATUSES.PAYLOAD_TOO_LARGE,d2.STATUSES.URI_TOO_LONG,d2.STATUSES.UNSUPPORTED_MEDIA_TYPE,d2.STATUSES.RANGE_NOT_SATISFIABLE,d2.STATUSES.EXPECTATION_FAILED,d2.STATUSES.IM_A_TEAPOT,d2.STATUSES.PAGE_EXPIRED,d2.STATUSES.ENHANCE_YOUR_CALM,d2.STATUSES.MISDIRECTED_REQUEST,d2.STATUSES.UNPROCESSABLE_ENTITY,d2.STATUSES.LOCKED,d2.STATUSES.FAILED_DEPENDENCY,d2.STATUSES.TOO_EARLY,d2.STATUSES.UPGRADE_REQUIRED,d2.STATUSES.PRECONDITION_REQUIRED,d2.STATUSES.TOO_MANY_REQUESTS,d2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,d2.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,d2.STATUSES.LOGIN_TIMEOUT,d2.STATUSES.NO_RESPONSE,d2.STATUSES.RETRY_WITH,d2.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,d2.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,d2.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,d2.STATUSES.INVALID_X_FORWARDED_FOR,d2.STATUSES.REQUEST_HEADER_TOO_LARGE,d2.STATUSES.SSL_CERTIFICATE_ERROR,d2.STATUSES.SSL_CERTIFICATE_REQUIRED,d2.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,d2.STATUSES.INVALID_TOKEN,d2.STATUSES.CLIENT_CLOSED_REQUEST,d2.STATUSES.INTERNAL_SERVER_ERROR,d2.STATUSES.NOT_IMPLEMENTED,d2.STATUSES.BAD_GATEWAY,d2.STATUSES.SERVICE_UNAVAILABLE,d2.STATUSES.GATEWAY_TIMEOUT,d2.STATUSES.HTTP_VERSION_NOT_SUPPORTED,d2.STATUSES.VARIANT_ALSO_NEGOTIATES,d2.STATUSES.INSUFFICIENT_STORAGE,d2.STATUSES.LOOP_DETECTED,d2.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,d2.STATUSES.NOT_EXTENDED,d2.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,d2.STATUSES.WEB_SERVER_UNKNOWN_ERROR,d2.STATUSES.WEB_SERVER_IS_DOWN,d2.STATUSES.CONNECTION_TIMEOUT,d2.STATUSES.ORIGIN_IS_UNREACHABLE,d2.STATUSES.TIMEOUT_OCCURED,d2.STATUSES.SSL_HANDSHAKE_FAILED,d2.STATUSES.INVALID_SSL_CERTIFICATE,d2.STATUSES.RAILGUN_ERROR,d2.STATUSES.SITE_IS_OVERLOADED,d2.STATUSES.SITE_IS_FROZEN,d2.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,d2.STATUSES.NETWORK_READ_TIMEOUT,d2.STATUSES.NETWORK_CONNECT_TIMEOUT];d2.ALPHA=[];for(let A=65;A<=90;A++)d2.ALPHA.push(String.fromCharCode(A)),d2.ALPHA.push(String.fromCharCode(A+32));d2.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};d2.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};d2.NUM=["0","1","2","3","4","5","6","7","8","9"];d2.ALPHANUM=d2.ALPHA.concat(d2.NUM);d2.MARK=["-","_",".","!","~","*","'","(",")"];d2.USERINFO_CHARS=d2.ALPHANUM.concat(d2.MARK).concat(["%",";",":","&","=","+","$",","]);d2.URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(d2.ALPHANUM);d2.HEX=d2.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);d2.TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(d2.ALPHANUM);d2.HEADER_CHARS=["\t"];for(let A=32;A<=255;A++)if(A!==127)d2.HEADER_CHARS.push(A);d2.CONNECTION_TOKEN_CHARS=d2.HEADER_CHARS.filter((A)=>A!==44);d2.QUOTED_STRING=["\t"," "];for(let A=33;A<=255;A++)if(A!==34&&A!==92)d2.QUOTED_STRING.push(A);d2.HTAB_SP_VCHAR_OBS_TEXT=["\t"," "];for(let A=33;A<=126;A++)d2.HTAB_SP_VCHAR_OBS_TEXT.push(A);for(let A=128;A<=255;A++)d2.HTAB_SP_VCHAR_OBS_TEXT.push(A);d2.MAJOR=d2.NUM_MAP;d2.MINOR=d2.MAJOR;d2.SPECIAL_HEADERS={connection:d2.HEADER_STATE.CONNECTION,"content-length":d2.HEADER_STATE.CONTENT_LENGTH,"proxy-connection":d2.HEADER_STATE.CONNECTION,"transfer-encoding":d2.HEADER_STATE.TRANSFER_ENCODING,upgrade:d2.HEADER_STATE.UPGRADE}});var cE=N((GU,Q2)=>{var{Buffer:I_}=Q("node:buffer"),pE;Object.defineProperty(Q2,"exports",{get:()=>{return pE?pE:pE=I_.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzQzBQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEDAAADAAAABAUBcAESEgUDAQACBggBfwFBgNgECwfFBygGbWVtb3J5AgALX2luaXRpYWxpemUACBlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQACRhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUANgxsbGh0dHBfYWxsb2MACwZtYWxsb2MAOAtsbGh0dHBfZnJlZQAMBGZyZWUADA9sbGh0dHBfZ2V0X3R5cGUADRVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADhVsbGh0dHBfZ2V0X2h0dHBfbWlub3IADxFsbGh0dHBfZ2V0X21ldGhvZAAQFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAERJsbGh0dHBfZ2V0X3VwZ3JhZGUAEgxsbGh0dHBfcmVzZXQAEw5sbGh0dHBfZXhlY3V0ZQAUFGxsaHR0cF9zZXR0aW5nc19pbml0ABUNbGxodHRwX2ZpbmlzaAAWDGxsaHR0cF9wYXVzZQAXDWxsaHR0cF9yZXN1bWUAGBtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGRBsbGh0dHBfZ2V0X2Vycm5vABoXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AGxdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAcFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB0RbGxodHRwX2Vycm5vX25hbWUAHhJsbGh0dHBfbWV0aG9kX25hbWUAHxJsbGh0dHBfc3RhdHVzX25hbWUAIBpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAhIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAiHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACMkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACQabGxodHRwX3NldF9sZW5pZW50X3ZlcnNpb24AJSNsbGh0dHBfc2V0X2xlbmllbnRfZGF0YV9hZnRlcl9jbG9zZQAmJ2xsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9sZl9hZnRlcl9jcgAnLGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcmxmX2FmdGVyX2NodW5rACgobGxodHRwX3NldF9sZW5pZW50X29wdGlvbmFsX2NyX2JlZm9yZV9sZgApKmxsaHR0cF9zZXRfbGVuaWVudF9zcGFjZXNfYWZ0ZXJfY2h1bmtfc2l6ZQAqGGxsaHR0cF9tZXNzYWdlX25lZWRzX2VvZgA1CRcBAEEBCxEBAgMEBQoGBzEzMi0uLCsvMAq8ywIzFgBB/NMAKAIABEAAC0H80wBBATYCAAsUACAAEDcgACACNgI4IAAgAToAKAsUACAAIAAvATQgAC0AMCAAEDYQAAseAQF/QcAAEDkiARA3IAFBgAg2AjggASAAOgAoIAELjwwBB38CQCAARQ0AIABBCGsiASAAQQRrKAIAIgBBeH