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 kz=Object.create;var{getPrototypeOf:Tz,defineProperty:g9,getOwnPropertyNames:xz}=Object;var dz=Object.prototype.hasOwnProperty;var HI=(A,i,I)=>{I=A!=null?kz(Tz(A)):{};let g=i||!A||!A.__esModule?g9(I,"default",{value:A,enumerable:!0}):I;for(let p of xz(A))if(!dz.call(g,p))g9(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((se,EK)=>{EK.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 Rm=N((re,uK)=>{var Ma=0,_m=1000,hm=(_m>>1)-1,cp,Pm=Symbol("kFastTimer"),ap=[],Om=-2,bm=-1,KK=0,XK=1;function Nm(){Ma+=hm;let A=0,i=ap.length;while(A<i){let I=ap[A];if(I._state===KK)I._idleStart=Ma-hm,I._state=XK;else if(I._state===XK&&Ma>=I._idleStart+I._idleTimeout)I._state=bm,I._idleStart=-1,I._onTimeout(I._timerArg);if(I._state===bm){if(I._state=Om,--i!==0)ap[A]=ap[i]}else++A}if(ap.length=i,ap.length!==0)$K()}function $K(){if(cp)cp.refresh();else if(clearTimeout(cp),cp=setTimeout(Nm,hm),cp.unref)cp.unref()}class Dm{[Pm]=!0;_state=Om;_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===Om)ap.push(this);if(!cp||ap.length===1)$K();this._state=KK}clear(){this._state=bm,this._idleStart=-1}}uK.exports={setTimeout(A,i,I){return i<=_m?setTimeout(A,i,I):new Dm(A,i,I)},clearTimeout(A){if(A[Pm])A.clear();else clearTimeout(A)},setFastTimeout(A,i,I){return new Dm(A,i,I)},clearFastTimeout(A){A.clear()},now(){return Ma},tick(A=0){Ma+=A-_m+1,Nm(),Nm()},reset(){Ma=0,ap.length=0,clearTimeout(cp),cp=null},kFastTimer:Pm}});var Ii=N((Qe,TK)=>{class Di extends Error{constructor(A,i){super(A,i);this.name="UndiciError",this.code="UND_ERR"}}class oK extends Di{constructor(A){super(A);this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}}class WK extends Di{constructor(A){super(A);this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}}class qK extends Di{constructor(A){super(A);this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}}class HK extends Di{constructor(A){super(A);this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}}class lK 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 JK extends Di{constructor(A){super(A);this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}}class jK extends Di{constructor(A){super(A);this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}}class km extends Di{constructor(A){super(A);this.name="AbortError",this.message=A||"The operation was aborted"}}class ZK extends km{constructor(A){super(A);this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}}class zK extends Di{constructor(A){super(A);this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}}class fK 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 MK 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 VK extends Di{constructor(A){super(A);this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}}class _K extends Di{constructor(A){super(A);this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}}class hK extends Di{constructor(A,i){super(A);this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=i}}class PK extends Di{constructor(A){super(A);this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}}class OK 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 bK 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 NK 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 DK 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 RK 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 kK 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}}TK.exports={AbortError:km,HTTPParserError:bK,UndiciError:Di,HeadersTimeoutError:WK,HeadersOverflowError:qK,BodyTimeoutError:HK,RequestContentLengthMismatchError:fK,ConnectTimeoutError:oK,ResponseStatusCodeError:lK,InvalidArgumentError:JK,InvalidReturnValueError:jK,RequestAbortedError:ZK,ClientDestroyedError:VK,ClientClosedError:_K,InformationalError:zK,SocketError:hK,NotSupportedError:PK,ResponseContentLengthMismatchError:MK,BalancedPoolMissingUpstreamError:OK,ResponseExceededMaxSizeError:NK,RequestRetryError:DK,ResponseError:RK,SecureProxyConnectionError:kK}});var dY=N((te,dK)=>{var Tm=["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"],xY={};Object.setPrototypeOf(xY,null);var xK={};Object.setPrototypeOf(xK,null);function KM(A){let i=xK[A];if(i===void 0)i=Buffer.from(A);return i}for(let A=0;A<Tm.length;++A){let i=Tm[A],I=i.toLowerCase();xY[i]=xY[I]=I}dK.exports={wellknownHeaderNames:Tm,headerNameLowerCasedRecord:xY,getHeaderNameAsBuffer:KM}});var yK=N((Fe,LK)=>{var{wellknownHeaderNames:SK,headerNameLowerCasedRecord:$M}=dY();class Va{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 Va(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 Va(A,i,g);break}else if(p.code<c)if(p.left!==null)p=p.left;else{p.left=new Va(A,i,g);break}else if(p.right!==null)p=p.right;else{p.right=new Va(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 xm{node=null;insert(A,i){if(this.node===null)this.node=new Va(A,i,0);else this.node.add(A,i)}lookup(A){return this.node?.search(A)?.value??null}}var BK=new xm;for(let A=0;A<SK.length;++A){let i=$M[SK[A]];BK.insert(i,i)}LK.exports={TernarySearchTree:xm,tree:BK}});var LA=N((ee,G5)=>{var Qn=Q("node:assert"),{kDestroyed:tK,kBodyUsed:_a,kListeners:BY,kBody:sK}=oi(),{IncomingMessage:uM}=Q("node:http"),FK=Q("node:stream"),oM=Q("node:net"),{Blob:WM}=Q("node:buffer"),qM=Q("node:util"),{stringify:HM}=Q("node:querystring"),{EventEmitter:lM}=Q("node:events"),SY=Rm(),{InvalidArgumentError:pI,ConnectTimeoutError:JM}=Ii(),{headerNameLowerCasedRecord:jM}=dY(),{tree:eK}=yK(),[ZM,zM]=process.versions.node.split(".",2).map((A)=>Number(A));class dm{constructor(A){this[sK]=A,this[_a]=!1}async*[Symbol.asyncIterator](){Qn(!this[_a],"disturbed"),this[_a]=!0,yield*this[sK]}}function rK(){}function fM(A){if(yY(A)){if(g5(A)===0)A.on("data",function(){Qn(!1)});if(typeof A.readableDidRead!=="boolean")A[_a]=!1,lM.prototype.on.call(A,"data",function(){this[_a]=!0});return A}else if(A&&typeof A.pipeTo==="function")return new dm(A);else if(A&&typeof A!=="string"&&!ArrayBuffer.isView(A)&&I5(A))return new dm(A);else return A}function yY(A){return A&&typeof A==="object"&&typeof A.pipe==="function"&&typeof A.on==="function"}function UK(A){if(A===null)return!1;else if(A instanceof WM)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 MM(A,i){if(A.includes("?")||A.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let I=HM(i);if(I)A+="?"+I;return A}function A5(A){let i=parseInt(A,10);return i===Number(A)&&i>=0&&i<=65535}function LY(A){return A!=null&&A[0]==="h"&&A[1]==="t"&&A[2]==="t"&&A[3]==="p"&&(A[4]===":"||A[4]==="s"&&A[5]===":")}function i5(A){if(typeof A==="string"){if(A=new URL(A),!LY(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!==""&&A5(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(!LY(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(!LY(A.origin||A.protocol))throw new pI("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}function VM(A){if(A=i5(A),A.pathname!=="/"||A.search||A.hash)throw new pI("invalid url");return A}function _M(A){if(A[0]==="["){let I=A.indexOf("]");return Qn(I!==-1),A.substring(1,I)}let i=A.indexOf(":");if(i===-1)return A;return A.substring(0,i)}function hM(A){if(!A)return null;Qn(typeof A==="string");let i=_M(A);if(oM.isIP(i))return"";return i}function PM(A){return JSON.parse(JSON.stringify(A))}function OM(A){return A!=null&&typeof A[Symbol.asyncIterator]==="function"}function I5(A){return A!=null&&(typeof A[Symbol.iterator]==="function"||typeof A[Symbol.asyncIterator]==="function")}function g5(A){if(A==null)return 0;else if(yY(A)){let i=A._readableState;return i&&i.objectMode===!1&&i.ended===!0&&Number.isFinite(i.length)?i.length:null}else if(UK(A))return A.size!=null?A.size:null;else if(n5(A))return A.byteLength;return null}function p5(A){return A&&!!(A.destroyed||A[tK]||FK.isDestroyed?.(A))}function c5(A,i){if(A==null||!yY(A)||p5(A))return;if(typeof A.destroy==="function"){if(Object.getPrototypeOf(A).constructor===uM)A.socket=null;A.destroy(i)}else if(i)queueMicrotask(()=>{A.emit("error",i)});if(A.destroyed!==!0)A[tK]=!0}var bM=/timeout=(\d+)/;function NM(A){let i=A.match(bM);return i?parseInt(i[1],10)*1000:null}function a5(A){return typeof A==="string"?jM[A]??A.toLowerCase():eK.lookup(A)??A.toString("latin1").toLowerCase()}function DM(A){return eK.lookup(A)??A.toString("latin1").toLowerCase()}function RM(A,i){if(i===void 0)i={};for(let I=0;I<A.length;I+=2){let g=a5(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 kM(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 TM(A){if(!Array.isArray(A))throw new TypeError("expected headers to be an array");return A.map((i)=>Buffer.from(i))}function n5(A){return A instanceof Uint8Array||Buffer.isBuffer(A)}function xM(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 dM(A){return!!(A&&(FK.isDisturbed(A)||A[_a]))}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 BM(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 LM(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 yM(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 C5=(()=>{if(typeof String.prototype.toWellFormed==="function")return(A)=>`${A}`.toWellFormed();else return qM.toUSVString})(),sM=(()=>{if(typeof String.prototype.isWellFormed==="function")return(A)=>`${A}`.isWellFormed();else return(A)=>C5(A)===`${A}`})();function Y5(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 rM(A){if(A.length===0)return!1;for(let i=0;i<A.length;++i)if(!Y5(A.charCodeAt(i)))return!1;return!0}var QM=/[^\t\x20-\x7e\x80-\xff]/;function tM(A){return!QM.test(A)}var FM=/^bytes (\d+)-(\d+)\/(\d+)?$/;function eM(A){if(A==null||A==="")return{start:0,end:null,size:null};let i=A?A.match(FM):null;return i?{start:parseInt(i[1]),end:i[2]?parseInt(i[2]):null,size:i[3]?parseInt(i[3]):null}:null}function UM(A,i,I){return(A[BY]??=[]).push([i,I]),A.on(i,I),A}function AV(A){if(A[BY]!=null){for(let[i,I]of A[BY])A.removeListener(i,I);A[BY]=null}return A}function iV(A,i,I){try{i.onError(I),Qn(i.aborted)}catch(g){A.emit("error",g)}}var IV=process.platform==="win32"?(A,i)=>{if(!i.timeout)return rK;let I=null,g=null,p=SY.setFastTimeout(()=>{I=setImmediate(()=>{g=setImmediate(()=>QK(A.deref(),i))})},i.timeout);return()=>{SY.clearFastTimeout(p),clearImmediate(I),clearImmediate(g)}}:(A,i)=>{if(!i.timeout)return rK;let I=null,g=SY.setFastTimeout(()=>{I=setImmediate(()=>{QK(A.deref(),i)})},i.timeout);return()=>{SY.clearFastTimeout(g),clearImmediate(I)}};function QK(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)`,c5(A,new JM(I))}var w5=Object.create(null);w5.enumerable=!0;var Sm={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},v5={...Sm,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(Sm,null);Object.setPrototypeOf(v5,null);G5.exports={kEnumerableProperty:w5,isDisturbed:dM,toUSVString:C5,isUSVString:sM,isBlobLike:UK,parseOrigin:VM,parseURL:i5,getServerName:hM,isStream:yY,isIterable:I5,isAsyncIterable:OM,isDestroyed:p5,headerNameToString:a5,bufferToLowerCasedHeaderName:DM,addListener:UM,removeAllListeners:AV,errorRequest:iV,parseRawHeaders:kM,encodeRawHeaders:TM,parseHeaders:RM,parseKeepAliveTimeout:NM,destroy:c5,bodyLength:g5,deepClone:PM,ReadableStreamFrom:BM,isBuffer:n5,assertRequestHandler:xM,getSocketInfo:SM,isFormDataLike:LM,serializePathWithQuery:MM,addAbortListener:yM,isValidHTTPToken:rM,isValidHeaderValue:tM,isTokenCharCode:Y5,parseRangeHeader:eM,normalizedMethodRecordsBase:Sm,normalizedMethodRecords:v5,isValidPort:A5,isHttpOrHttpsPrefixed:LY,nodeMajor:ZM,nodeMinor:zM,safeHTTPMethods:Object.freeze(["GET","HEAD","OPTIONS","TRACE"]),wrapRequestBody:fM,setupConnectTimeout:IV}});var np=N((Ue,$5)=>{var Zi=Q("node:diagnostics_channel"),Bm=Q("node:util"),lc=Bm.debuglog("undici"),tn=Bm.debuglog("fetch"),sY=Bm.debuglog("websocket"),gV={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")},m5=!1;function K5(A=lc){if(m5)return;m5=!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 E5=!1;function pV(A=lc){if(E5)return;E5=!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 X5=!1;function cV(A=sY){if(X5)return;X5=!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(lc.enabled||tn.enabled)K5(tn.enabled?tn:lc),pV(tn.enabled?tn:lc);if(sY.enabled)K5(lc.enabled?lc:sY),cV(sY);$5.exports={channels:gV}});var l5=N((AU,H5)=>{var{InvalidArgumentError:Mi,NotSupportedError:aV}=Ii(),hg=Q("node:assert"),{isValidHTTPToken:W5,isValidHeaderValue:u5,isStream:nV,destroy:CV,isBuffer:YV,isFormDataLike:wV,isIterable:vV,isBlobLike:GV,serializePathWithQuery:mV,assertRequestHandler:EV,getServerName:XV,normalizedMethodRecords:KV}=LA(),{channels:Pg}=np(),{headerNameLowerCasedRecord:o5}=dY(),$V=/[^\u0021-\u00ff]/,FI=Symbol("handler");class q5{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($V.test(i))throw new Mi("invalid request path");if(typeof I!=="string")throw new Mi("method must be a string");else if(KV[I]===void 0&&!W5(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(nV(g)){this.body=g;let W=this.body._readableState;if(!W||!W.autoDestroy)this.endHandler=function o(){CV(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(YV(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(wV(g)||vV(g)||GV(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?mV(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)rY(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");rY(this,W[0],W[1])}else{let W=Object.keys(p);for(let o=0;o<W.length;++o)rY(this,W[o],p[W[o]])}else if(p!=null)throw new Mi("headers must be an object or an array");if(EV(Z,I,C),this.servername=$||XV(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 rY(this,A,i),this}}function rY(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=o5[i];if(g===void 0){if(g=i.toLowerCase(),o5[g]===void 0&&!W5(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(!u5(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(!u5(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 aV("expect header not supported");else A.headers.push(i,I)}H5.exports=q5});var QY=N((iU,J5)=>{var{InvalidArgumentError:uV}=Ii();J5.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 uV("invalid onError method");this.#A.onError?.(I)}}});var Fn=N((IU,Z5)=>{var oV=Q("node:events"),WV=QY(),qV=(A)=>(i,I)=>A(i,WV.wrap(I));class j5 extends oV{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=qV(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]})}}Z5.exports=j5});var M5=N((gU,f5)=>{var{parseHeaders:Lm}=LA(),{InvalidArgumentError:HV}=Ii(),ym=Symbol("resume");class z5{#A=!1;#i=null;#I=!1;#g;[ym]=null;constructor(A){this.#g=A}pause(){this.#A=!0}resume(){if(this.#A)this.#A=!1,this[ym]?.()}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}}f5.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 z5(i),this.#A.onRequestStart?.(this.#i,I)}onUpgrade(i,I,g){this.#A.onRequestUpgrade?.(this.#i,i,Lm(I),g)}onHeaders(i,I,g,p){return this.#i[ym]=g,this.#A.onResponseStart?.(this.#i,i,Lm(I),p),!this.#i.paused}onData(i){return this.#A.onResponseData?.(this.#i,i),!this.#i.paused}onComplete(i){this.#A.onResponseEnd?.(this.#i,Lm(i))}onError(i){if(!this.#A.onResponseError)throw new HV("invalid onError method");this.#A.onResponseError?.(this.#i,i)}}});var Jc=N((pU,_5)=>{var lV=Fn(),JV=M5(),{ClientDestroyedError:sm,ClientClosedError:jV,InvalidArgumentError:tY}=Ii(),{kDestroy:ZV,kClose:zV,kClosed:en,kDestroyed:ha,kDispatch:fV}=oi(),Cp=Symbol("onDestroyed"),Pa=Symbol("onClosed");class V5 extends lV{constructor(){super();this[ha]=!1,this[Cp]=null,this[en]=!1,this[Pa]=[]}get destroyed(){return this[ha]}get closed(){return this[en]}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 tY("invalid callback");if(this[ha]){queueMicrotask(()=>A(new sm,null));return}if(this[en]){if(this[Pa])this[Pa].push(A);else queueMicrotask(()=>A(null,null));return}this[en]=!0,this[Pa].push(A);let i=()=>{let I=this[Pa];this[Pa]=null;for(let g=0;g<I.length;g++)I[g](null,null)};this[zV]().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 tY("invalid callback");if(this[ha]){if(this[Cp])this[Cp].push(i);else queueMicrotask(()=>i(null,null));return}if(!A)A=new sm;this[ha]=!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[ZV](A).then(()=>{queueMicrotask(I)})}dispatch(A,i){if(!i||typeof i!=="object")throw new tY("handler must be an object");i=JV.unwrap(i);try{if(!A||typeof A!=="object")throw new tY("opts must be an object.");if(this[ha]||this[Cp])throw new sm;if(this[en])throw new jV;return this[fV](A,i)}catch(I){if(typeof i.onError!=="function")throw I;return i.onError(I),!1}}}_5.exports=V5});var Un=N((cU,O5)=>{var MV=Q("node:net"),h5=Q("node:assert"),P5=LA(),{InvalidArgumentError:VV}=Ii(),rm,Qm;if(global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG))Qm=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 Qm=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 _V({allowH2:A,maxCachedSessions:i,socketPath:I,timeout:g,session:p,...c}){if(i!=null&&(!Number.isInteger(i)||i<0))throw new VV("maxCachedSessions must be a positive integer or zero");let a={path:I,...c},n=new Qm(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(!rm)rm=Q("node:tls");$=$||a.servername||P5.getServerName(w)||null;let _=$||Y;h5(_);let D=p||n.get(_)||null;G=G||443,o=rm.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 h5(!Z,"httpSocket can only be sent on TLS update"),G=G||80,o=MV.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=P5.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}}O5.exports=_V});var D5=N((b5)=>{Object.defineProperty(b5,"__esModule",{value:!0});b5.enumToMap=void 0;function hV(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))}))}b5.enumToMap=hV});var B5=N((R5)=>{Object.defineProperty(R5,"__esModule",{value:!0});R5.SPECIAL_HEADERS=R5.MINOR=R5.MAJOR=R5.HTAB_SP_VCHAR_OBS_TEXT=R5.QUOTED_STRING=R5.CONNECTION_TOKEN_CHARS=R5.HEADER_CHARS=R5.TOKEN=R5.HEX=R5.URL_CHAR=R5.USERINFO_CHARS=R5.MARK=R5.ALPHANUM=R5.NUM=R5.HEX_MAP=R5.NUM_MAP=R5.ALPHA=R5.STATUSES_HTTP=R5.H_METHOD_MAP=R5.METHOD_MAP=R5.METHODS_RTSP=R5.METHODS_ICE=R5.METHODS_HTTP=R5.HEADER_STATE=R5.FINISH=R5.STATUSES=R5.METHODS=R5.LENIENT_FLAGS=R5.FLAGS=R5.TYPE=R5.ERROR=void 0;var PV=D5();R5.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};R5.TYPE={BOTH:0,REQUEST:1,RESPONSE:2};R5.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};R5.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};R5.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};R5.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};R5.FINISH={SAFE:0,SAFE_WITH_CB:1,UNSAFE:2};R5.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};R5.METHODS_HTTP=[R5.METHODS.DELETE,R5.METHODS.GET,R5.METHODS.HEAD,R5.METHODS.POST,R5.METHODS.PUT,R5.METHODS.CONNECT,R5.METHODS.OPTIONS,R5.METHODS.TRACE,R5.METHODS.COPY,R5.METHODS.LOCK,R5.METHODS.MKCOL,R5.METHODS.MOVE,R5.METHODS.PROPFIND,R5.METHODS.PROPPATCH,R5.METHODS.SEARCH,R5.METHODS.UNLOCK,R5.METHODS.BIND,R5.METHODS.REBIND,R5.METHODS.UNBIND,R5.METHODS.ACL,R5.METHODS.REPORT,R5.METHODS.MKACTIVITY,R5.METHODS.CHECKOUT,R5.METHODS.MERGE,R5.METHODS["M-SEARCH"],R5.METHODS.NOTIFY,R5.METHODS.SUBSCRIBE,R5.METHODS.UNSUBSCRIBE,R5.METHODS.PATCH,R5.METHODS.PURGE,R5.METHODS.MKCALENDAR,R5.METHODS.LINK,R5.METHODS.UNLINK,R5.METHODS.PRI,R5.METHODS.SOURCE,R5.METHODS.QUERY];R5.METHODS_ICE=[R5.METHODS.SOURCE];R5.METHODS_RTSP=[R5.METHODS.OPTIONS,R5.METHODS.DESCRIBE,R5.METHODS.ANNOUNCE,R5.METHODS.SETUP,R5.METHODS.PLAY,R5.METHODS.PAUSE,R5.METHODS.TEARDOWN,R5.METHODS.GET_PARAMETER,R5.METHODS.SET_PARAMETER,R5.METHODS.REDIRECT,R5.METHODS.RECORD,R5.METHODS.FLUSH,R5.METHODS.GET,R5.METHODS.POST];R5.METHOD_MAP=PV.enumToMap(R5.METHODS);R5.H_METHOD_MAP=Object.fromEntries(Object.entries(R5.METHODS).filter(([A])=>A.startsWith("H")));R5.STATUSES_HTTP=[R5.STATUSES.CONTINUE,R5.STATUSES.SWITCHING_PROTOCOLS,R5.STATUSES.PROCESSING,R5.STATUSES.EARLY_HINTS,R5.STATUSES.RESPONSE_IS_STALE,R5.STATUSES.REVALIDATION_FAILED,R5.STATUSES.DISCONNECTED_OPERATION,R5.STATUSES.HEURISTIC_EXPIRATION,R5.STATUSES.MISCELLANEOUS_WARNING,R5.STATUSES.OK,R5.STATUSES.CREATED,R5.STATUSES.ACCEPTED,R5.STATUSES.NON_AUTHORITATIVE_INFORMATION,R5.STATUSES.NO_CONTENT,R5.STATUSES.RESET_CONTENT,R5.STATUSES.PARTIAL_CONTENT,R5.STATUSES.MULTI_STATUS,R5.STATUSES.ALREADY_REPORTED,R5.STATUSES.TRANSFORMATION_APPLIED,R5.STATUSES.IM_USED,R5.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,R5.STATUSES.MULTIPLE_CHOICES,R5.STATUSES.MOVED_PERMANENTLY,R5.STATUSES.FOUND,R5.STATUSES.SEE_OTHER,R5.STATUSES.NOT_MODIFIED,R5.STATUSES.USE_PROXY,R5.STATUSES.SWITCH_PROXY,R5.STATUSES.TEMPORARY_REDIRECT,R5.STATUSES.PERMANENT_REDIRECT,R5.STATUSES.BAD_REQUEST,R5.STATUSES.UNAUTHORIZED,R5.STATUSES.PAYMENT_REQUIRED,R5.STATUSES.FORBIDDEN,R5.STATUSES.NOT_FOUND,R5.STATUSES.METHOD_NOT_ALLOWED,R5.STATUSES.NOT_ACCEPTABLE,R5.STATUSES.PROXY_AUTHENTICATION_REQUIRED,R5.STATUSES.REQUEST_TIMEOUT,R5.STATUSES.CONFLICT,R5.STATUSES.GONE,R5.STATUSES.LENGTH_REQUIRED,R5.STATUSES.PRECONDITION_FAILED,R5.STATUSES.PAYLOAD_TOO_LARGE,R5.STATUSES.URI_TOO_LONG,R5.STATUSES.UNSUPPORTED_MEDIA_TYPE,R5.STATUSES.RANGE_NOT_SATISFIABLE,R5.STATUSES.EXPECTATION_FAILED,R5.STATUSES.IM_A_TEAPOT,R5.STATUSES.PAGE_EXPIRED,R5.STATUSES.ENHANCE_YOUR_CALM,R5.STATUSES.MISDIRECTED_REQUEST,R5.STATUSES.UNPROCESSABLE_ENTITY,R5.STATUSES.LOCKED,R5.STATUSES.FAILED_DEPENDENCY,R5.STATUSES.TOO_EARLY,R5.STATUSES.UPGRADE_REQUIRED,R5.STATUSES.PRECONDITION_REQUIRED,R5.STATUSES.TOO_MANY_REQUESTS,R5.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,R5.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,R5.STATUSES.LOGIN_TIMEOUT,R5.STATUSES.NO_RESPONSE,R5.STATUSES.RETRY_WITH,R5.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,R5.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,R5.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,R5.STATUSES.INVALID_X_FORWARDED_FOR,R5.STATUSES.REQUEST_HEADER_TOO_LARGE,R5.STATUSES.SSL_CERTIFICATE_ERROR,R5.STATUSES.SSL_CERTIFICATE_REQUIRED,R5.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,R5.STATUSES.INVALID_TOKEN,R5.STATUSES.CLIENT_CLOSED_REQUEST,R5.STATUSES.INTERNAL_SERVER_ERROR,R5.STATUSES.NOT_IMPLEMENTED,R5.STATUSES.BAD_GATEWAY,R5.STATUSES.SERVICE_UNAVAILABLE,R5.STATUSES.GATEWAY_TIMEOUT,R5.STATUSES.HTTP_VERSION_NOT_SUPPORTED,R5.STATUSES.VARIANT_ALSO_NEGOTIATES,R5.STATUSES.INSUFFICIENT_STORAGE,R5.STATUSES.LOOP_DETECTED,R5.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,R5.STATUSES.NOT_EXTENDED,R5.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,R5.STATUSES.WEB_SERVER_UNKNOWN_ERROR,R5.STATUSES.WEB_SERVER_IS_DOWN,R5.STATUSES.CONNECTION_TIMEOUT,R5.STATUSES.ORIGIN_IS_UNREACHABLE,R5.STATUSES.TIMEOUT_OCCURED,R5.STATUSES.SSL_HANDSHAKE_FAILED,R5.STATUSES.INVALID_SSL_CERTIFICATE,R5.STATUSES.RAILGUN_ERROR,R5.STATUSES.SITE_IS_OVERLOADED,R5.STATUSES.SITE_IS_FROZEN,R5.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,R5.STATUSES.NETWORK_READ_TIMEOUT,R5.STATUSES.NETWORK_CONNECT_TIMEOUT];R5.ALPHA=[];for(let A=65;A<=90;A++)R5.ALPHA.push(String.fromCharCode(A)),R5.ALPHA.push(String.fromCharCode(A+32));R5.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};R5.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};R5.NUM=["0","1","2","3","4","5","6","7","8","9"];R5.ALPHANUM=R5.ALPHA.concat(R5.NUM);R5.MARK=["-","_",".","!","~","*","'","(",")"];R5.USERINFO_CHARS=R5.ALPHANUM.concat(R5.MARK).concat(["%",";",":","&","=","+","$",","]);R5.URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(R5.ALPHANUM);R5.HEX=R5.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);R5.TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(R5.ALPHANUM);R5.HEADER_CHARS=["\t"];for(let A=32;A<=255;A++)if(A!==127)R5.HEADER_CHARS.push(A);R5.CONNECTION_TOKEN_CHARS=R5.HEADER_CHARS.filter((A)=>A!==44);R5.QUOTED_STRING=["\t"," "];for(let A=33;A<=255;A++)if(A!==34&&A!==92)R5.QUOTED_STRING.push(A);R5.HTAB_SP_VCHAR_OBS_TEXT=["\t"," "];for(let A=33;A<=126;A++)R5.HTAB_SP_VCHAR_OBS_TEXT.push(A);for(let A=128;A<=255;A++)R5.HTAB_SP_VCHAR_OBS_TEXT.push(A);R5.MAJOR=R5.NUM_MAP;R5.MINOR=R5.MAJOR;R5.SPECIAL_HEADERS={connection:R5.HEADER_STATE.CONNECTION,"content-length":R5.HEADER_STATE.CONTENT_LENGTH,"proxy-connection":R5.HEADER_STATE.CONNECTION,"transfer-encoding":R5.HEADER_STATE.TRANSFER_ENCODING,upgrade:R5.HEADER_STATE.UPGRADE}});var AE=N((CU,L5)=>{var{Buffer:eV}=Q("node:buffer"),Um;Object.defineProperty(L5,"exports",{get:()=>{return Um?Um:Um=eV.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzQzBQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEDAAADAAAABAUBcAESEgUDAQACBggBfwFBgNgECwfFBygGbWVtb3J5AgALX2luaXRpYWxpemUACBlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQACRhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUANgxsbGh0dHBfYWxsb2MACwZtYWxsb2MAOAtsbGh0dHBfZnJlZQAMBGZyZWUADA9sbGh0dHBfZ2V0X3R5cGUADRVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADhVsbGh0dHBfZ2V0X2h0dHBfbWlub3IADxFsbGh0dHBfZ2V0X21ldGhvZAAQFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAERJsbGh0dHBfZ2V0X3VwZ3JhZGUAEgxsbGh0dHBfcmVzZXQAEw5sbGh0dHBfZXhlY3V0ZQAUFGxsaHR0cF9zZXR0aW5nc19pbml0ABUNbGxodHRwX2ZpbmlzaAAWDGxsaHR0cF9wYXVzZQAXDWxsaHR0cF9yZXN1bWUAGBtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGRBsbGh0dHBfZ2V0X2Vycm5vABoXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AGxdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAcFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB0RbGxodHRwX2Vycm5vX25hbWUAHhJsbGh0dHBfbWV0aG9kX25hbWUAHxJsbGh0dHBfc3RhdHVzX25hbWUAIBpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAhIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAiHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACMkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACQabGxodHRwX3NldF9sZW5pZW50X3ZlcnNpb24AJSNsbGh0dHBfc2V0X2xlbmllbnRfZGF0YV9hZnRlcl9jbG9zZQAmJ2xsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9sZl9hZnRlcl9jcgAnLGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcmxmX2FmdGVyX2NodW5rACgobGxodHRwX3NldF9sZW5pZW50X29wdGlvbmFsX2NyX2JlZm9yZV9sZgApKmxsaHR0cF9zZXRfbGVuaWVudF9zcGFjZXNfYWZ0ZXJfY2h1bmtfc2l6ZQAqGGxsaHR0cF9tZXNzYWdlX25lZWRzX2VvZgA1CRcBAEEBCxEBAgMEBQoGBzEzMi0uLCsvMAq8ywIzFgBB/NMAKAIABEAAC0H80wBBATYCAAsUACAAEDcgACACNgI4IAAgAToAKAsUACAAIAAvATQgAC0AMCAAEDYQAAseAQF/QcAAEDkiARA3IAFBgAg2AjggASAAOgAoIAELjwwBB38CQCAARQ0AIABBCGsiASAAQQRrKAIAIgBBeH