@elizaos/plugin-elizacloud 1.5.18 → 1.5.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var k6=Object.create;var{getPrototypeOf:S6,defineProperty:z2,getOwnPropertyNames:W1,getOwnPropertyDescriptor:y6}=Object,M1=Object.prototype.hasOwnProperty;var f6=(w,B,h)=>{h=w!=null?k6(S6(w)):{};let U=B||!w||!w.__esModule?z2(h,"default",{value:w,enumerable:!0}):h;for(let I of W1(w))if(!M1.call(U,I))z2(U,I,{get:()=>w[I],enumerable:!0});return U},C1=new WeakMap,_0=(w)=>{var B=C1.get(w),h;if(B)return B;if(B=z2({},"__esModule",{value:!0}),w&&typeof w==="object"||typeof w==="function")W1(w).map((U)=>!M1.call(B,U)&&z2(B,U,{get:()=>w[U],enumerable:!(h=y6(w,U))||h.enumerable}));return C1.set(w,B),B},c6=(w,B)=>()=>(B||w((B={exports:{}}).exports,B),B.exports);var E1=(w,B)=>{for(var h in B)z2(w,h,{get:B[h],enumerable:!0,configurable:!0,set:(U)=>B[h]=()=>U})};var V1=(w,B)=>()=>(w&&(B=w(w=0)),B);var b0={};E1(b0,{transcode:()=>L8,resolveObjectURL:()=>V8,kStringMaxLength:()=>c1,kMaxLength:()=>G2,isUtf8:()=>j8,isAscii:()=>A8,default:()=>O8,constants:()=>a6,btoa:()=>m6,atob:()=>n6,INSPECT_MAX_BYTES:()=>f1,File:()=>o6,Buffer:()=>_,Blob:()=>r6});function p6(w){var B=w.length;if(B%4>0)throw Error("Invalid string. Length must be a multiple of 4");var h=w.indexOf("=");if(h===-1)h=B;var U=h===B?0:4-h%4;return[h,U]}function b6(w,B){return(w+B)*3/4-B}function i6(w){var B,h=p6(w),U=h[0],I=h[1],X=new Uint8Array(b6(U,I)),Z=0,Y=I>0?U-4:U,H;for(H=0;H<Y;H+=4)B=k0[w.charCodeAt(H)]<<18|k0[w.charCodeAt(H+1)]<<12|k0[w.charCodeAt(H+2)]<<6|k0[w.charCodeAt(H+3)],X[Z++]=B>>16&255,X[Z++]=B>>8&255,X[Z++]=B&255;if(I===2)B=k0[w.charCodeAt(H)]<<2|k0[w.charCodeAt(H+1)]>>4,X[Z++]=B&255;if(I===1)B=k0[w.charCodeAt(H)]<<10|k0[w.charCodeAt(H+1)]<<4|k0[w.charCodeAt(H+2)]>>2,X[Z++]=B>>8&255,X[Z++]=B&255;return X}function d6(w){return f0[w>>18&63]+f0[w>>12&63]+f0[w>>6&63]+f0[w&63]}function l6(w,B,h){var U,I=[];for(var X=B;X<h;X+=3)U=(w[X]<<16&16711680)+(w[X+1]<<8&65280)+(w[X+2]&255),I.push(d6(U));return I.join("")}function T1(w){var B,h=w.length,U=h%3,I=[],X=16383;for(var Z=0,Y=h-U;Z<Y;Z+=X)I.push(l6(w,Z,Z+X>Y?Y:Z+X));if(U===1)B=w[h-1],I.push(f0[B>>2]+f0[B<<4&63]+"==");else if(U===2)B=(w[h-2]<<8)+w[h-1],I.push(f0[B>>10]+f0[B>>4&63]+f0[B<<2&63]+"=");return I.join("")}function O2(w,B,h,U,I){var X,Z,Y=I*8-U-1,H=(1<<Y)-1,K=H>>1,N=-7,G=h?I-1:0,O=h?-1:1,x=w[B+G];G+=O,X=x&(1<<-N)-1,x>>=-N,N+=Y;for(;N>0;X=X*256+w[B+G],G+=O,N-=8);Z=X&(1<<-N)-1,X>>=-N,N+=U;for(;N>0;Z=Z*256+w[B+G],G+=O,N-=8);if(X===0)X=1-K;else if(X===H)return Z?NaN:(x?-1:1)*(1/0);else Z=Z+Math.pow(2,U),X=X-K;return(x?-1:1)*Z*Math.pow(2,X-U)}function y1(w,B,h,U,I,X){var Z,Y,H,K=X*8-I-1,N=(1<<K)-1,G=N>>1,O=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=U?0:X-1,l=U?1:-1,t=B<0||B===0&&1/B<0?1:0;if(B=Math.abs(B),isNaN(B)||B===1/0)Y=isNaN(B)?1:0,Z=N;else{if(Z=Math.floor(Math.log(B)/Math.LN2),B*(H=Math.pow(2,-Z))<1)Z--,H*=2;if(Z+G>=1)B+=O/H;else B+=O*Math.pow(2,1-G);if(B*H>=2)Z++,H/=2;if(Z+G>=N)Y=0,Z=N;else if(Z+G>=1)Y=(B*H-1)*Math.pow(2,I),Z=Z+G;else Y=B*Math.pow(2,G-1)*Math.pow(2,I),Z=0}for(;I>=8;w[h+x]=Y&255,x+=l,Y/=256,I-=8);Z=Z<<I|Y,K+=I;for(;K>0;w[h+x]=Z&255,x+=l,Z/=256,K-=8);w[h+x-l]|=t*128}function p0(w){if(w>G2)throw RangeError('The value "'+w+'" is invalid for option "size"');let B=new Uint8Array(w);return Object.setPrototypeOf(B,_.prototype),B}function m2(w,B,h){return class extends h{constructor(){super();Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${w}]`,this.stack,delete this.name}get code(){return w}set code(I){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:I,writable:!0})}toString(){return`${this.name} [${w}]: ${this.message}`}}}function _(w,B,h){if(typeof w==="number"){if(typeof B==="string")throw TypeError('The "string" argument must be of type string. Received type number');return n2(w)}return u1(w,B,h)}function u1(w,B,h){if(typeof w==="string")return B8(w,B);if(ArrayBuffer.isView(w))return h8(w);if(w==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w);if(c0(w,ArrayBuffer)||w&&c0(w.buffer,ArrayBuffer))return d2(w,B,h);if(typeof SharedArrayBuffer<"u"&&(c0(w,SharedArrayBuffer)||w&&c0(w.buffer,SharedArrayBuffer)))return d2(w,B,h);if(typeof w==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let U=w.valueOf&&w.valueOf();if(U!=null&&U!==w)return _.from(U,B,h);let I=w8(w);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof w[Symbol.toPrimitive]==="function")return _.from(w[Symbol.toPrimitive]("string"),B,h);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w)}function v1(w){if(typeof w!=="number")throw TypeError('"size" argument must be of type number');else if(w<0)throw RangeError('The value "'+w+'" is invalid for option "size"')}function e6(w,B,h){if(v1(w),w<=0)return p0(w);if(B!==void 0)return typeof h==="string"?p0(w).fill(B,h):p0(w).fill(B);return p0(w)}function n2(w){return v1(w),p0(w<0?0:o2(w)|0)}function B8(w,B){if(typeof B!=="string"||B==="")B="utf8";if(!_.isEncoding(B))throw TypeError("Unknown encoding: "+B);let h=g1(w,B)|0,U=p0(h),I=U.write(w,B);if(I!==h)U=U.slice(0,I);return U}function i2(w){let B=w.length<0?0:o2(w.length)|0,h=p0(B);for(let U=0;U<B;U+=1)h[U]=w[U]&255;return h}function h8(w){if(c0(w,Uint8Array)){let B=new Uint8Array(w);return d2(B.buffer,B.byteOffset,B.byteLength)}return i2(w)}function d2(w,B,h){if(B<0||w.byteLength<B)throw RangeError('"offset" is outside of buffer bounds');if(w.byteLength<B+(h||0))throw RangeError('"length" is outside of buffer bounds');let U;if(B===void 0&&h===void 0)U=new Uint8Array(w);else if(h===void 0)U=new Uint8Array(w,B);else U=new Uint8Array(w,B,h);return Object.setPrototypeOf(U,_.prototype),U}function w8(w){if(_.isBuffer(w)){let B=o2(w.length)|0,h=p0(B);if(h.length===0)return h;return w.copy(h,0,0,B),h}if(w.length!==void 0){if(typeof w.length!=="number"||Number.isNaN(w.length))return p0(0);return i2(w)}if(w.type==="Buffer"&&Array.isArray(w.data))return i2(w.data)}function o2(w){if(w>=G2)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G2.toString(16)+" bytes");return w|0}function g1(w,B){if(_.isBuffer(w))return w.length;if(ArrayBuffer.isView(w)||c0(w,ArrayBuffer))return w.byteLength;if(typeof w!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof w);let h=w.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&h===0)return 0;let I=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return l2(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return r1(w).length;default:if(I)return U?-1:l2(w).length;B=(""+B).toLowerCase(),I=!0}}function U8(w,B,h){let U=!1;if(B===void 0||B<0)B=0;if(B>this.length)return"";if(h===void 0||h>this.length)h=this.length;if(h<=0)return"";if(h>>>=0,B>>>=0,h<=B)return"";if(!w)w="utf8";while(!0)switch(w){case"hex":return H8(this,B,h);case"utf8":case"utf-8":return b1(this,B,h);case"ascii":return Y8(this,B,h);case"latin1":case"binary":return q8(this,B,h);case"base64":return J8(this,B,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z8(this,B,h);default:if(U)throw TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),U=!0}}function w2(w,B,h){let U=w[B];w[B]=w[h],w[h]=U}function p1(w,B,h,U,I){if(w.length===0)return-1;if(typeof h==="string")U=h,h=0;else if(h>2147483647)h=2147483647;else if(h<-2147483648)h=-2147483648;if(h=+h,Number.isNaN(h))h=I?0:w.length-1;if(h<0)h=w.length+h;if(h>=w.length)if(I)return-1;else h=w.length-1;else if(h<0)if(I)h=0;else return-1;if(typeof B==="string")B=_.from(B,U);if(_.isBuffer(B)){if(B.length===0)return-1;return R1(w,B,h,U,I)}else if(typeof B==="number"){if(B=B&255,typeof Uint8Array.prototype.indexOf==="function")if(I)return Uint8Array.prototype.indexOf.call(w,B,h);else return Uint8Array.prototype.lastIndexOf.call(w,B,h);return R1(w,[B],h,U,I)}throw TypeError("val must be string, number or Buffer")}function R1(w,B,h,U,I){let X=1,Z=w.length,Y=B.length;if(U!==void 0){if(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le"){if(w.length<2||B.length<2)return-1;X=2,Z/=2,Y/=2,h/=2}}function H(N,G){if(X===1)return N[G];else return N.readUInt16BE(G*X)}let K;if(I){let N=-1;for(K=h;K<Z;K++)if(H(w,K)===H(B,N===-1?0:K-N)){if(N===-1)N=K;if(K-N+1===Y)return N*X}else{if(N!==-1)K-=K-N;N=-1}}else{if(h+Y>Z)h=Z-Y;for(K=h;K>=0;K--){let N=!0;for(let G=0;G<Y;G++)if(H(w,K+G)!==H(B,G)){N=!1;break}if(N)return K}}return-1}function I8(w,B,h,U){h=Number(h)||0;let I=w.length-h;if(!U)U=I;else if(U=Number(U),U>I)U=I;let X=B.length;if(U>X/2)U=X/2;let Z;for(Z=0;Z<U;++Z){let Y=parseInt(B.substr(Z*2,2),16);if(Number.isNaN(Y))return Z;w[h+Z]=Y}return Z}function X8(w,B,h,U){return x2(l2(B,w.length-h),w,h,U)}function Z8(w,B,h,U){return x2(C8(B),w,h,U)}function Q8(w,B,h,U){return x2(r1(B),w,h,U)}function F8(w,B,h,U){return x2(W8(B,w.length-h),w,h,U)}function J8(w,B,h){if(B===0&&h===w.length)return T1(w);else return T1(w.slice(B,h))}function b1(w,B,h){h=Math.min(w.length,h);let U=[],I=B;while(I<h){let X=w[I],Z=null,Y=X>239?4:X>223?3:X>191?2:1;if(I+Y<=h){let H,K,N,G;switch(Y){case 1:if(X<128)Z=X;break;case 2:if(H=w[I+1],(H&192)===128){if(G=(X&31)<<6|H&63,G>127)Z=G}break;case 3:if(H=w[I+1],K=w[I+2],(H&192)===128&&(K&192)===128){if(G=(X&15)<<12|(H&63)<<6|K&63,G>2047&&(G<55296||G>57343))Z=G}break;case 4:if(H=w[I+1],K=w[I+2],N=w[I+3],(H&192)===128&&(K&192)===128&&(N&192)===128){if(G=(X&15)<<18|(H&63)<<12|(K&63)<<6|N&63,G>65535&&G<1114112)Z=G}}}if(Z===null)Z=65533,Y=1;else if(Z>65535)Z-=65536,U.push(Z>>>10&1023|55296),Z=56320|Z&1023;U.push(Z),I+=Y}return K8(U)}function K8(w){let B=w.length;if(B<=k1)return String.fromCharCode.apply(String,w);let h="",U=0;while(U<B)h+=String.fromCharCode.apply(String,w.slice(U,U+=k1));return h}function Y8(w,B,h){let U="";h=Math.min(w.length,h);for(let I=B;I<h;++I)U+=String.fromCharCode(w[I]&127);return U}function q8(w,B,h){let U="";h=Math.min(w.length,h);for(let I=B;I<h;++I)U+=String.fromCharCode(w[I]);return U}function H8(w,B,h){let U=w.length;if(!B||B<0)B=0;if(!h||h<0||h>U)h=U;let I="";for(let X=B;X<h;++X)I+=M8[w[X]];return I}function z8(w,B,h){let U=w.slice(B,h),I="";for(let X=0;X<U.length-1;X+=2)I+=String.fromCharCode(U[X]+U[X+1]*256);return I}function E0(w,B,h){if(w%1!==0||w<0)throw RangeError("offset is not uint");if(w+B>h)throw RangeError("Trying to access beyond buffer length")}function x0(w,B,h,U,I,X){if(!_.isBuffer(w))throw TypeError('"buffer" argument must be a Buffer instance');if(B>I||B<X)throw RangeError('"value" argument is out of bounds');if(h+U>w.length)throw RangeError("Index out of range")}function i1(w,B,h,U,I){o1(B,U,I,w,h,7);let X=Number(B&BigInt(4294967295));w[h++]=X,X=X>>8,w[h++]=X,X=X>>8,w[h++]=X,X=X>>8,w[h++]=X;let Z=Number(B>>BigInt(32)&BigInt(4294967295));return w[h++]=Z,Z=Z>>8,w[h++]=Z,Z=Z>>8,w[h++]=Z,Z=Z>>8,w[h++]=Z,h}function d1(w,B,h,U,I){o1(B,U,I,w,h,7);let X=Number(B&BigInt(4294967295));w[h+7]=X,X=X>>8,w[h+6]=X,X=X>>8,w[h+5]=X,X=X>>8,w[h+4]=X;let Z=Number(B>>BigInt(32)&BigInt(4294967295));return w[h+3]=Z,Z=Z>>8,w[h+2]=Z,Z=Z>>8,w[h+1]=Z,Z=Z>>8,w[h]=Z,h+8}function l1(w,B,h,U,I,X){if(h+U>w.length)throw RangeError("Index out of range");if(h<0)throw RangeError("Index out of range")}function m1(w,B,h,U,I){if(B=+B,h=h>>>0,!I)l1(w,B,h,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return y1(w,B,h,U,23,4),h+4}function n1(w,B,h,U,I){if(B=+B,h=h>>>0,!I)l1(w,B,h,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return y1(w,B,h,U,52,8),h+8}function S1(w){let B="",h=w.length,U=w[0]==="-"?1:0;for(;h>=U+4;h-=3)B=`_${w.slice(h-3,h)}${B}`;return`${w.slice(0,h)}${B}`}function $8(w,B,h){if(K2(B,"offset"),w[B]===void 0||w[B+h]===void 0)N2(B,w.length-(h+1))}function o1(w,B,h,U,I,X){if(w>h||w<B){let Z=typeof B==="bigint"?"n":"",Y;if(X>3)if(B===0||B===BigInt(0))Y=`>= 0${Z} and < 2${Z} ** ${(X+1)*8}${Z}`;else Y=`>= -(2${Z} ** ${(X+1)*8-1}${Z}) and < 2 ** ${(X+1)*8-1}${Z}`;else Y=`>= ${B}${Z} and <= ${h}${Z}`;throw new b2("value",Y,w)}$8(U,I,X)}function K2(w,B){if(typeof w!=="number")throw new t6(B,"number",w)}function N2(w,B,h){if(Math.floor(w)!==w)throw K2(w,h),new b2(h||"offset","an integer",w);if(B<0)throw new s6;throw new b2(h||"offset",`>= ${h?1:0} and <= ${B}`,w)}function N8(w){if(w=w.split("=")[0],w=w.trim().replace(G8,""),w.length<2)return"";while(w.length%4!==0)w=w+"=";return w}function l2(w,B){B=B||1/0;let h,U=w.length,I=null,X=[];for(let Z=0;Z<U;++Z){if(h=w.charCodeAt(Z),h>55295&&h<57344){if(!I){if(h>56319){if((B-=3)>-1)X.push(239,191,189);continue}else if(Z+1===U){if((B-=3)>-1)X.push(239,191,189);continue}I=h;continue}if(h<56320){if((B-=3)>-1)X.push(239,191,189);I=h;continue}h=(I-55296<<10|h-56320)+65536}else if(I){if((B-=3)>-1)X.push(239,191,189)}if(I=null,h<128){if((B-=1)<0)break;X.push(h)}else if(h<2048){if((B-=2)<0)break;X.push(h>>6|192,h&63|128)}else if(h<65536){if((B-=3)<0)break;X.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((B-=4)<0)break;X.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw Error("Invalid code point")}return X}function C8(w){let B=[];for(let h=0;h<w.length;++h)B.push(w.charCodeAt(h)&255);return B}function W8(w,B){let h,U,I,X=[];for(let Z=0;Z<w.length;++Z){if((B-=2)<0)break;h=w.charCodeAt(Z),U=h>>8,I=h%256,X.push(I),X.push(U)}return X}function r1(w){return i6(N8(w))}function x2(w,B,h,U){let I;for(I=0;I<U;++I){if(I+h>=B.length||I>=w.length)break;B[I+h]=w[I]}return I}function c0(w,B){return w instanceof B||w!=null&&w.constructor!=null&&w.constructor.name!=null&&w.constructor.name===B.name}function o0(w){return typeof BigInt>"u"?E8:w}function E8(){throw Error("BigInt not supported")}function r2(w){return()=>{throw Error(w+" is not implemented for node:buffer browser polyfill")}}var f0,k0,p2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h2,P1,_1,f1=50,G2=2147483647,c1=536870888,m6,n6,o6,r6,a6,s6,t6,b2,k1=4096,G8,M8,V8,j8,A8=(w)=>{for(let B of w)if(B.charCodeAt(0)>127)return!1;return!0},L8,O8;var i0=V1(()=>{f0=[],k0=[];for(h2=0,P1=p2.length;h2<P1;++h2)f0[h2]=p2[h2],k0[p2.charCodeAt(h2)]=h2;k0[45]=62;k0[95]=63;_1=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,m6=globalThis.btoa,n6=globalThis.atob,o6=globalThis.File,r6=globalThis.Blob,a6={MAX_LENGTH:G2,MAX_STRING_LENGTH:c1};s6=m2("ERR_BUFFER_OUT_OF_BOUNDS",function(w){if(w)return`${w} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),t6=m2("ERR_INVALID_ARG_TYPE",function(w,B){return`The "${w}" argument must be of type number. Received type ${typeof B}`},TypeError),b2=m2("ERR_OUT_OF_RANGE",function(w,B,h){let U=`The value of "${w}" is out of range.`,I=h;if(Number.isInteger(h)&&Math.abs(h)>4294967296)I=S1(String(h));else if(typeof h==="bigint"){if(I=String(h),h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))I=S1(I);I+="n"}return U+=` It must be ${B}. Received ${I}`,U},RangeError);Object.defineProperty(_.prototype,"parent",{enumerable:!0,get:function(){if(!_.isBuffer(this))return;return this.buffer}});Object.defineProperty(_.prototype,"offset",{enumerable:!0,get:function(){if(!_.isBuffer(this))return;return this.byteOffset}});_.poolSize=8192;_.from=function(w,B,h){return u1(w,B,h)};Object.setPrototypeOf(_.prototype,Uint8Array.prototype);Object.setPrototypeOf(_,Uint8Array);_.alloc=function(w,B,h){return e6(w,B,h)};_.allocUnsafe=function(w){return n2(w)};_.allocUnsafeSlow=function(w){return n2(w)};_.isBuffer=function(B){return B!=null&&B._isBuffer===!0&&B!==_.prototype};_.compare=function(B,h){if(c0(B,Uint8Array))B=_.from(B,B.offset,B.byteLength);if(c0(h,Uint8Array))h=_.from(h,h.offset,h.byteLength);if(!_.isBuffer(B)||!_.isBuffer(h))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(B===h)return 0;let U=B.length,I=h.length;for(let X=0,Z=Math.min(U,I);X<Z;++X)if(B[X]!==h[X]){U=B[X],I=h[X];break}if(U<I)return-1;if(I<U)return 1;return 0};_.isEncoding=function(B){switch(String(B).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};_.concat=function(B,h){if(!Array.isArray(B))throw TypeError('"list" argument must be an Array of Buffers');if(B.length===0)return _.alloc(0);let U;if(h===void 0){h=0;for(U=0;U<B.length;++U)h+=B[U].length}let I=_.allocUnsafe(h),X=0;for(U=0;U<B.length;++U){let Z=B[U];if(c0(Z,Uint8Array))if(X+Z.length>I.length){if(!_.isBuffer(Z))Z=_.from(Z);Z.copy(I,X)}else Uint8Array.prototype.set.call(I,Z,X);else if(!_.isBuffer(Z))throw TypeError('"list" argument must be an Array of Buffers');else Z.copy(I,X);X+=Z.length}return I};_.byteLength=g1;_.prototype._isBuffer=!0;_.prototype.swap16=function(){let B=this.length;if(B%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<B;h+=2)w2(this,h,h+1);return this};_.prototype.swap32=function(){let B=this.length;if(B%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<B;h+=4)w2(this,h,h+3),w2(this,h+1,h+2);return this};_.prototype.swap64=function(){let B=this.length;if(B%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<B;h+=8)w2(this,h,h+7),w2(this,h+1,h+6),w2(this,h+2,h+5),w2(this,h+3,h+4);return this};_.prototype.toString=function(){let B=this.length;if(B===0)return"";if(arguments.length===0)return b1(this,0,B);return U8.apply(this,arguments)};_.prototype.toLocaleString=_.prototype.toString;_.prototype.equals=function(B){if(!_.isBuffer(B))throw TypeError("Argument must be a Buffer");if(this===B)return!0;return _.compare(this,B)===0};_.prototype.inspect=function(){let B="",h=f1;if(B=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h)B+=" ... ";return"<Buffer "+B+">"};if(_1)_.prototype[_1]=_.prototype.inspect;_.prototype.compare=function(B,h,U,I,X){if(c0(B,Uint8Array))B=_.from(B,B.offset,B.byteLength);if(!_.isBuffer(B))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof B);if(h===void 0)h=0;if(U===void 0)U=B?B.length:0;if(I===void 0)I=0;if(X===void 0)X=this.length;if(h<0||U>B.length||I<0||X>this.length)throw RangeError("out of range index");if(I>=X&&h>=U)return 0;if(I>=X)return-1;if(h>=U)return 1;if(h>>>=0,U>>>=0,I>>>=0,X>>>=0,this===B)return 0;let Z=X-I,Y=U-h,H=Math.min(Z,Y),K=this.slice(I,X),N=B.slice(h,U);for(let G=0;G<H;++G)if(K[G]!==N[G]){Z=K[G],Y=N[G];break}if(Z<Y)return-1;if(Y<Z)return 1;return 0};_.prototype.includes=function(B,h,U){return this.indexOf(B,h,U)!==-1};_.prototype.indexOf=function(B,h,U){return p1(this,B,h,U,!0)};_.prototype.lastIndexOf=function(B,h,U){return p1(this,B,h,U,!1)};_.prototype.write=function(B,h,U,I){if(h===void 0)I="utf8",U=this.length,h=0;else if(U===void 0&&typeof h==="string")I=h,U=this.length,h=0;else if(isFinite(h))if(h=h>>>0,isFinite(U)){if(U=U>>>0,I===void 0)I="utf8"}else I=U,U=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-h;if(U===void 0||U>X)U=X;if(B.length>0&&(U<0||h<0)||h>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!I)I="utf8";let Z=!1;for(;;)switch(I){case"hex":return I8(this,B,h,U);case"utf8":case"utf-8":return X8(this,B,h,U);case"ascii":case"latin1":case"binary":return Z8(this,B,h,U);case"base64":return Q8(this,B,h,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F8(this,B,h,U);default:if(Z)throw TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),Z=!0}};_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};_.prototype.slice=function(B,h){let U=this.length;if(B=~~B,h=h===void 0?U:~~h,B<0){if(B+=U,B<0)B=0}else if(B>U)B=U;if(h<0){if(h+=U,h<0)h=0}else if(h>U)h=U;if(h<B)h=B;let I=this.subarray(B,h);return Object.setPrototypeOf(I,_.prototype),I};_.prototype.readUintLE=_.prototype.readUIntLE=function(B,h,U){if(B=B>>>0,h=h>>>0,!U)E0(B,h,this.length);let I=this[B],X=1,Z=0;while(++Z<h&&(X*=256))I+=this[B+Z]*X;return I};_.prototype.readUintBE=_.prototype.readUIntBE=function(B,h,U){if(B=B>>>0,h=h>>>0,!U)E0(B,h,this.length);let I=this[B+--h],X=1;while(h>0&&(X*=256))I+=this[B+--h]*X;return I};_.prototype.readUint8=_.prototype.readUInt8=function(B,h){if(B=B>>>0,!h)E0(B,1,this.length);return this[B]};_.prototype.readUint16LE=_.prototype.readUInt16LE=function(B,h){if(B=B>>>0,!h)E0(B,2,this.length);return this[B]|this[B+1]<<8};_.prototype.readUint16BE=_.prototype.readUInt16BE=function(B,h){if(B=B>>>0,!h)E0(B,2,this.length);return this[B]<<8|this[B+1]};_.prototype.readUint32LE=_.prototype.readUInt32LE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return(this[B]|this[B+1]<<8|this[B+2]<<16)+this[B+3]*16777216};_.prototype.readUint32BE=_.prototype.readUInt32BE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return this[B]*16777216+(this[B+1]<<16|this[B+2]<<8|this[B+3])};_.prototype.readBigUInt64LE=o0(function(B){B=B>>>0,K2(B,"offset");let h=this[B],U=this[B+7];if(h===void 0||U===void 0)N2(B,this.length-8);let I=h+this[++B]*256+this[++B]*65536+this[++B]*16777216,X=this[++B]+this[++B]*256+this[++B]*65536+U*16777216;return BigInt(I)+(BigInt(X)<<BigInt(32))});_.prototype.readBigUInt64BE=o0(function(B){B=B>>>0,K2(B,"offset");let h=this[B],U=this[B+7];if(h===void 0||U===void 0)N2(B,this.length-8);let I=h*16777216+this[++B]*65536+this[++B]*256+this[++B],X=this[++B]*16777216+this[++B]*65536+this[++B]*256+U;return(BigInt(I)<<BigInt(32))+BigInt(X)});_.prototype.readIntLE=function(B,h,U){if(B=B>>>0,h=h>>>0,!U)E0(B,h,this.length);let I=this[B],X=1,Z=0;while(++Z<h&&(X*=256))I+=this[B+Z]*X;if(X*=128,I>=X)I-=Math.pow(2,8*h);return I};_.prototype.readIntBE=function(B,h,U){if(B=B>>>0,h=h>>>0,!U)E0(B,h,this.length);let I=h,X=1,Z=this[B+--I];while(I>0&&(X*=256))Z+=this[B+--I]*X;if(X*=128,Z>=X)Z-=Math.pow(2,8*h);return Z};_.prototype.readInt8=function(B,h){if(B=B>>>0,!h)E0(B,1,this.length);if(!(this[B]&128))return this[B];return(255-this[B]+1)*-1};_.prototype.readInt16LE=function(B,h){if(B=B>>>0,!h)E0(B,2,this.length);let U=this[B]|this[B+1]<<8;return U&32768?U|4294901760:U};_.prototype.readInt16BE=function(B,h){if(B=B>>>0,!h)E0(B,2,this.length);let U=this[B+1]|this[B]<<8;return U&32768?U|4294901760:U};_.prototype.readInt32LE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return this[B]|this[B+1]<<8|this[B+2]<<16|this[B+3]<<24};_.prototype.readInt32BE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return this[B]<<24|this[B+1]<<16|this[B+2]<<8|this[B+3]};_.prototype.readBigInt64LE=o0(function(B){B=B>>>0,K2(B,"offset");let h=this[B],U=this[B+7];if(h===void 0||U===void 0)N2(B,this.length-8);let I=this[B+4]+this[B+5]*256+this[B+6]*65536+(U<<24);return(BigInt(I)<<BigInt(32))+BigInt(h+this[++B]*256+this[++B]*65536+this[++B]*16777216)});_.prototype.readBigInt64BE=o0(function(B){B=B>>>0,K2(B,"offset");let h=this[B],U=this[B+7];if(h===void 0||U===void 0)N2(B,this.length-8);let I=(h<<24)+this[++B]*65536+this[++B]*256+this[++B];return(BigInt(I)<<BigInt(32))+BigInt(this[++B]*16777216+this[++B]*65536+this[++B]*256+U)});_.prototype.readFloatLE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return O2(this,B,!0,23,4)};_.prototype.readFloatBE=function(B,h){if(B=B>>>0,!h)E0(B,4,this.length);return O2(this,B,!1,23,4)};_.prototype.readDoubleLE=function(B,h){if(B=B>>>0,!h)E0(B,8,this.length);return O2(this,B,!0,52,8)};_.prototype.readDoubleBE=function(B,h){if(B=B>>>0,!h)E0(B,8,this.length);return O2(this,B,!1,52,8)};_.prototype.writeUintLE=_.prototype.writeUIntLE=function(B,h,U,I){if(B=+B,h=h>>>0,U=U>>>0,!I){let Y=Math.pow(2,8*U)-1;x0(this,B,h,U,Y,0)}let X=1,Z=0;this[h]=B&255;while(++Z<U&&(X*=256))this[h+Z]=B/X&255;return h+U};_.prototype.writeUintBE=_.prototype.writeUIntBE=function(B,h,U,I){if(B=+B,h=h>>>0,U=U>>>0,!I){let Y=Math.pow(2,8*U)-1;x0(this,B,h,U,Y,0)}let X=U-1,Z=1;this[h+X]=B&255;while(--X>=0&&(Z*=256))this[h+X]=B/Z&255;return h+U};_.prototype.writeUint8=_.prototype.writeUInt8=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,1,255,0);return this[h]=B&255,h+1};_.prototype.writeUint16LE=_.prototype.writeUInt16LE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,2,65535,0);return this[h]=B&255,this[h+1]=B>>>8,h+2};_.prototype.writeUint16BE=_.prototype.writeUInt16BE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,2,65535,0);return this[h]=B>>>8,this[h+1]=B&255,h+2};_.prototype.writeUint32LE=_.prototype.writeUInt32LE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,4,4294967295,0);return this[h+3]=B>>>24,this[h+2]=B>>>16,this[h+1]=B>>>8,this[h]=B&255,h+4};_.prototype.writeUint32BE=_.prototype.writeUInt32BE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,4,4294967295,0);return this[h]=B>>>24,this[h+1]=B>>>16,this[h+2]=B>>>8,this[h+3]=B&255,h+4};_.prototype.writeBigUInt64LE=o0(function(B,h=0){return i1(this,B,h,BigInt(0),BigInt("0xffffffffffffffff"))});_.prototype.writeBigUInt64BE=o0(function(B,h=0){return d1(this,B,h,BigInt(0),BigInt("0xffffffffffffffff"))});_.prototype.writeIntLE=function(B,h,U,I){if(B=+B,h=h>>>0,!I){let H=Math.pow(2,8*U-1);x0(this,B,h,U,H-1,-H)}let X=0,Z=1,Y=0;this[h]=B&255;while(++X<U&&(Z*=256)){if(B<0&&Y===0&&this[h+X-1]!==0)Y=1;this[h+X]=(B/Z>>0)-Y&255}return h+U};_.prototype.writeIntBE=function(B,h,U,I){if(B=+B,h=h>>>0,!I){let H=Math.pow(2,8*U-1);x0(this,B,h,U,H-1,-H)}let X=U-1,Z=1,Y=0;this[h+X]=B&255;while(--X>=0&&(Z*=256)){if(B<0&&Y===0&&this[h+X+1]!==0)Y=1;this[h+X]=(B/Z>>0)-Y&255}return h+U};_.prototype.writeInt8=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,1,127,-128);if(B<0)B=255+B+1;return this[h]=B&255,h+1};_.prototype.writeInt16LE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,2,32767,-32768);return this[h]=B&255,this[h+1]=B>>>8,h+2};_.prototype.writeInt16BE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,2,32767,-32768);return this[h]=B>>>8,this[h+1]=B&255,h+2};_.prototype.writeInt32LE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,4,2147483647,-2147483648);return this[h]=B&255,this[h+1]=B>>>8,this[h+2]=B>>>16,this[h+3]=B>>>24,h+4};_.prototype.writeInt32BE=function(B,h,U){if(B=+B,h=h>>>0,!U)x0(this,B,h,4,2147483647,-2147483648);if(B<0)B=4294967295+B+1;return this[h]=B>>>24,this[h+1]=B>>>16,this[h+2]=B>>>8,this[h+3]=B&255,h+4};_.prototype.writeBigInt64LE=o0(function(B,h=0){return i1(this,B,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});_.prototype.writeBigInt64BE=o0(function(B,h=0){return d1(this,B,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});_.prototype.writeFloatLE=function(B,h,U){return m1(this,B,h,!0,U)};_.prototype.writeFloatBE=function(B,h,U){return m1(this,B,h,!1,U)};_.prototype.writeDoubleLE=function(B,h,U){return n1(this,B,h,!0,U)};_.prototype.writeDoubleBE=function(B,h,U){return n1(this,B,h,!1,U)};_.prototype.copy=function(B,h,U,I){if(!_.isBuffer(B))throw TypeError("argument should be a Buffer");if(!U)U=0;if(!I&&I!==0)I=this.length;if(h>=B.length)h=B.length;if(!h)h=0;if(I>0&&I<U)I=U;if(I===U)return 0;if(B.length===0||this.length===0)return 0;if(h<0)throw RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw RangeError("Index out of range");if(I<0)throw RangeError("sourceEnd out of bounds");if(I>this.length)I=this.length;if(B.length-h<I-U)I=B.length-h+U;let X=I-U;if(this===B&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(h,U,I);else Uint8Array.prototype.set.call(B,this.subarray(U,I),h);return X};_.prototype.fill=function(B,h,U,I){if(typeof B==="string"){if(typeof h==="string")I=h,h=0,U=this.length;else if(typeof U==="string")I=U,U=this.length;if(I!==void 0&&typeof I!=="string")throw TypeError("encoding must be a string");if(typeof I==="string"&&!_.isEncoding(I))throw TypeError("Unknown encoding: "+I);if(B.length===1){let Z=B.charCodeAt(0);if(I==="utf8"&&Z<128||I==="latin1")B=Z}}else if(typeof B==="number")B=B&255;else if(typeof B==="boolean")B=Number(B);if(h<0||this.length<h||this.length<U)throw RangeError("Out of range index");if(U<=h)return this;if(h=h>>>0,U=U===void 0?this.length:U>>>0,!B)B=0;let X;if(typeof B==="number")for(X=h;X<U;++X)this[X]=B;else{let Z=_.isBuffer(B)?B:_.from(B,I),Y=Z.length;if(Y===0)throw TypeError('The value "'+B+'" is invalid for argument "value"');for(X=0;X<U-h;++X)this[X+h]=Z[X%Y]}return this};G8=/[^+/0-9A-Za-z-_]/g;M8=function(){let w=Array(256);for(let B=0;B<16;++B){let h=B*16;for(let U=0;U<16;++U)w[h+U]="0123456789abcdef"[B]+"0123456789abcdef"[U]}return w}();V8=r2("resolveObjectURL"),j8=r2("isUtf8"),L8=r2("transcode"),O8=_});var W2={};E1(W2,{setMaxListeners:()=>Z6,once:()=>I6,listenerCount:()=>Q6,init:()=>r0,getMaxListeners:()=>J6,getEventListeners:()=>X6,default:()=>y8,captureRejectionSymbol:()=>B6,addAbortListener:()=>K6,EventEmitter:()=>r0});function h6(w,B){var{_events:h}=w;if(B[0]??=Error("Unhandled error."),!h)throw B[0];var U=h[e1];if(U)for(var I of s1.call(U))I.apply(w,B);var X=h.error;if(!X)throw B[0];for(var I of s1.call(X))I.apply(w,B);return!0}function P8(w,B,h,U){B.then(void 0,function(I){queueMicrotask(()=>T8(w,I,h,U))})}function T8(w,B,h,U){if(typeof w[a1]==="function")w[a1](B,h,...U);else try{w[U2]=!1,w.emit("error",B)}finally{w[U2]=!0}}function w6(w,B,h){h.warned=!0;let U=Error(`Possible EventEmitter memory leak detected. ${h.length} ${String(B)} listeners added to [${w.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);U.name="MaxListenersExceededWarning",U.emitter=w,U.type=B,U.count=h.length,console.warn(U)}function U6(w,B,...h){this.removeListener(w,B),B.apply(this,h)}function I6(w,B,h){var U=h?.signal;if(F6(U,"options.signal"),U?.aborted)throw new a2(void 0,{cause:U?.reason});let{resolve:I,reject:X,promise:Z}=$newPromiseCapability(Promise),Y=(N)=>{if(w.removeListener(B,H),U!=null)D2(U,"abort",K);X(N)},H=(...N)=>{if(typeof w.removeListener==="function")w.removeListener("error",Y);if(U!=null)D2(U,"abort",K);I(N)};if(t1(w,B,H,{once:!0}),B!=="error"&&typeof w.once==="function")w.once("error",Y);function K(){D2(w,B,H),D2(w,"error",Y),X(new a2(void 0,{cause:U?.reason}))}if(U!=null)t1(U,"abort",K,{once:!0});return Z}function X6(w,B){return w.listeners(B)}function Z6(w,...B){t2(w,"setMaxListeners",0);var h;if(B&&(h=B.length))for(let U=0;U<h;U++)B[U].setMaxListeners(w);else I2=w}function Q6(w,B){return w.listenerCount(B)}function D2(w,B,h,U){if(typeof w.removeListener==="function")w.removeListener(B,h);else w.removeEventListener(B,h,U)}function t1(w,B,h,U){if(typeof w.on==="function")if(U.once)w.once(B,h);else w.on(B,h);else w.addEventListener(B,h,U)}function Y2(w,B,h){let U=TypeError(`The "${w}" argument must be of type ${B}. Received ${h}`);return U.code="ERR_INVALID_ARG_TYPE",U}function k8(w,B,h){let U=RangeError(`The "${w}" argument is out of range. It must be ${B}. Received ${h}`);return U.code="ERR_OUT_OF_RANGE",U}function F6(w,B){if(w!==void 0&&(w===null||typeof w!=="object"||!("aborted"in w)))throw Y2(B,"AbortSignal",w)}function t2(w,B,h,U){if(typeof w!=="number")throw Y2(B,"number",w);if(h!=null&&w<h||U!=null&&w>U||(h!=null||U!=null)&&Number.isNaN(w))throw k8(B,`${h!=null?`>= ${h}`:""}${h!=null&&U!=null?" && ":""}${U!=null?`<= ${U}`:""}`,w)}function C2(w){if(typeof w!=="function")throw TypeError("The listener must be a function")}function S8(w,B){if(typeof w!=="boolean")throw Y2(B,"boolean",w)}function J6(w){return w?._maxListeners??I2}function K6(w,B){if(w===void 0)throw Y2("signal","AbortSignal",w);if(F6(w,"signal"),typeof B!=="function")throw Y2("listener","function",B);let h;if(w.aborted)queueMicrotask(()=>B());else w.addEventListener("abort",B,{__proto__:null,once:!0}),h=()=>{w.removeEventListener("abort",B)};return{__proto__:null,[Symbol.dispose](){h?.()}}}var s2,U2,e1,x8,D8,a1,B6,s1,I2=10,r0=function(B){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[U2]=B?.captureRejections?Boolean(B?.captureRejections):$0[U2])this.emit=R8},$0,_8=function(B,...h){if(B==="error")return h6(this,h);var{_events:U}=this;if(U===void 0)return!1;var I=U[B];if(I===void 0)return!1;let X=I.length>1?I.slice():I;for(let Z=0,{length:Y}=X;Z<Y;Z++){let H=X[Z];switch(h.length){case 0:H.call(this);break;case 1:H.call(this,h[0]);break;case 2:H.call(this,h[0],h[1]);break;case 3:H.call(this,h[0],h[1],h[2]);break;default:H.apply(this,h);break}}return!0},R8=function(B,...h){if(B==="error")return h6(this,h);var{_events:U}=this;if(U===void 0)return!1;var I=U[B];if(I===void 0)return!1;let X=I.length>1?I.slice():I;for(let Z=0,{length:Y}=X;Z<Y;Z++){let H=X[Z],K;switch(h.length){case 0:K=H.call(this);break;case 1:K=H.call(this,h[0]);break;case 2:K=H.call(this,h[0],h[1]);break;case 3:K=H.call(this,h[0],h[1],h[2]);break;default:K=H.apply(this,h);break}if(K!==void 0&&typeof K?.then==="function"&&K.then===Promise.prototype.then)P8(this,K,B,h)}return!0},a2,y8;var M2=V1(()=>{s2=Symbol.for,U2=Symbol("kCapture"),e1=s2("events.errorMonitor"),x8=Symbol("events.maxEventTargetListeners"),D8=Symbol("events.maxEventTargetListenersWarned"),a1=s2("nodejs.rejection"),B6=s2("nodejs.rejection"),s1=Array.prototype.slice,$0=r0.prototype={};$0._events=void 0;$0._eventsCount=0;$0._maxListeners=void 0;$0.setMaxListeners=function(B){return t2(B,"setMaxListeners",0),this._maxListeners=B,this};$0.constructor=r0;$0.getMaxListeners=function(){return this?._maxListeners??I2};$0.emit=_8;$0.addListener=function(B,h){C2(h);var U=this._events;if(!U)U=this._events={__proto__:null},this._eventsCount=0;else if(U.newListener)this.emit("newListener",B,h.listener??h);var I=U[B];if(!I)U[B]=[h],this._eventsCount++;else{I.push(h);var X=this._maxListeners??I2;if(X>0&&I.length>X&&!I.warned)w6(this,B,I)}return this};$0.on=$0.addListener;$0.prependListener=function(B,h){C2(h);var U=this._events;if(!U)U=this._events={__proto__:null},this._eventsCount=0;else if(U.newListener)this.emit("newListener",B,h.listener??h);var I=U[B];if(!I)U[B]=[h],this._eventsCount++;else{I.unshift(h);var X=this._maxListeners??I2;if(X>0&&I.length>X&&!I.warned)w6(this,B,I)}return this};$0.once=function(B,h){C2(h);let U=U6.bind(this,B,h);return U.listener=h,this.addListener(B,U),this};$0.prependOnceListener=function(B,h){C2(h);let U=U6.bind(this,B,h);return U.listener=h,this.prependListener(B,U),this};$0.removeListener=function(B,h){C2(h);var{_events:U}=this;if(!U)return this;var I=U[B];if(!I)return this;var X=I.length;let Z=-1;for(let Y=X-1;Y>=0;Y--)if(I[Y]===h||I[Y].listener===h){Z=Y;break}if(Z<0)return this;if(Z===0)I.shift();else I.splice(Z,1);if(I.length===0)delete U[B],this._eventsCount--;return this};$0.off=$0.removeListener;$0.removeAllListeners=function(B){var{_events:h}=this;if(B&&h){if(h[B])delete h[B],this._eventsCount--}else this._events={__proto__:null};return this};$0.listeners=function(B){var{_events:h}=this;if(!h)return[];var U=h[B];if(!U)return[];return U.map((I)=>I.listener??I)};$0.rawListeners=function(B){var{_events:h}=this;if(!h)return[];var U=h[B];if(!U)return[];return U.slice()};$0.listenerCount=function(B){var{_events:h}=this;if(!h)return 0;return h[B]?.length??0};$0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};$0[U2]=!1;a2=class a2 extends Error{constructor(w="The operation was aborted",B=void 0){if(B!==void 0&&typeof B!=="object")throw Y2("options","Object",B);super(w,B);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(r0,{captureRejections:{get(){return $0[U2]},set(w){S8(w,"EventEmitter.captureRejections"),$0[U2]=w},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return I2},set:(w)=>{t2(w,"defaultMaxListeners",0),I2=w}},kMaxEventTargetListeners:{value:x8,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:D8,enumerable:!1,configurable:!1,writable:!1}});Object.assign(r0,{once:I6,getEventListeners:X6,getMaxListeners:J6,setMaxListeners:Z6,EventEmitter:r0,usingDomains:!1,captureRejectionSymbol:B6,errorMonitor:e1,addAbortListener:K6,init:r0,listenerCount:Q6});y8=r0});var w1=c6((H4,C6)=>{var z0=(w,B)=>()=>(B||w((B={exports:{}}).exports,B),B.exports),N0=z0((w,B)=>{class h extends Error{constructor(U){if(!Array.isArray(U))throw TypeError(`Expected input to be an Array, got ${typeof U}`);let I="";for(let X=0;X<U.length;X++)I+=` ${U[X].stack}
2
- `;super(I);this.name="AggregateError",this.errors=U}}B.exports={AggregateError:h,ArrayIsArray(U){return Array.isArray(U)},ArrayPrototypeIncludes(U,I){return U.includes(I)},ArrayPrototypeIndexOf(U,I){return U.indexOf(I)},ArrayPrototypeJoin(U,I){return U.join(I)},ArrayPrototypeMap(U,I){return U.map(I)},ArrayPrototypePop(U,I){return U.pop(I)},ArrayPrototypePush(U,I){return U.push(I)},ArrayPrototypeSlice(U,I,X){return U.slice(I,X)},Error,FunctionPrototypeCall(U,I,...X){return U.call(I,...X)},FunctionPrototypeSymbolHasInstance(U,I){return Function.prototype[Symbol.hasInstance].call(U,I)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(U,I){return Object.defineProperties(U,I)},ObjectDefineProperty(U,I,X){return Object.defineProperty(U,I,X)},ObjectGetOwnPropertyDescriptor(U,I){return Object.getOwnPropertyDescriptor(U,I)},ObjectKeys(U){return Object.keys(U)},ObjectSetPrototypeOf(U,I){return Object.setPrototypeOf(U,I)},Promise,PromisePrototypeCatch(U,I){return U.catch(I)},PromisePrototypeThen(U,I,X){return U.then(I,X)},PromiseReject(U){return Promise.reject(U)},PromiseResolve(U){return Promise.resolve(U)},ReflectApply:Reflect.apply,RegExpPrototypeTest(U,I){return U.test(I)},SafeSet:Set,String,StringPrototypeSlice(U,I,X){return U.slice(I,X)},StringPrototypeToLowerCase(U){return U.toLowerCase()},StringPrototypeToUpperCase(U){return U.toUpperCase()},StringPrototypeTrim(U){return U.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(U,I,X){return U.set(I,X)},Boolean,Uint8Array}}),Y6=z0((w,B)=>{B.exports={format(h,...U){return h.replace(/%([sdifj])/g,function(...[I,X]){let Z=U.shift();if(X==="f")return Z.toFixed(6);else if(X==="j")return JSON.stringify(Z);else if(X==="s"&&typeof Z==="object")return`${Z.constructor!==Object?Z.constructor.name:""} {}`.trim();else return Z.toString()})},inspect(h){switch(typeof h){case"string":if(h.includes("'")){if(!h.includes('"'))return`"${h}"`;else if(!h.includes("`")&&!h.includes("${"))return`\`${h}\``}return`'${h}'`;case"number":if(isNaN(h))return"NaN";else if(Object.is(h,-0))return String(h);return h;case"bigint":return`${String(h)}n`;case"boolean":case"undefined":return String(h);case"object":return"{}"}}}}),L0=z0((w,B)=>{var{format:h,inspect:U}=Y6(),{AggregateError:I}=N0(),X=globalThis.AggregateError||I,Z=Symbol("kIsNodeError"),Y=["string","function","number","object","Function","Object","boolean","bigint","symbol"],H=/^([A-Z][a-z0-9]*)+$/,K={};function N(V,J){if(!V)throw new K.ERR_INTERNAL_ASSERTION(J)}function G(V){let J="",C=V.length,j=V[0]==="-"?1:0;for(;C>=j+4;C-=3)J=`_${V.slice(C-3,C)}${J}`;return`${V.slice(0,C)}${J}`}function O(V,J,C){if(typeof J==="function")return N(J.length<=C.length,`Code: ${V}; The provided arguments length (${C.length}) does not match the required ones (${J.length}).`),J(...C);let j=(J.match(/%[dfijoOs]/g)||[]).length;if(N(j===C.length,`Code: ${V}; The provided arguments length (${C.length}) does not match the required ones (${j}).`),C.length===0)return J;return h(J,...C)}function x(V,J,C){if(!C)C=Error;class j extends C{constructor(...T){super(O(V,J,T))}toString(){return`${this.name} [${V}]: ${this.message}`}}Object.defineProperties(j.prototype,{name:{value:C.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${V}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),j.prototype.code=V,j.prototype[Z]=!0,K[V]=j}function l(V){let J="__node_internal_"+V.name;return Object.defineProperty(V,"name",{value:J}),V}function t(V,J){if(V&&J&&V!==J){if(Array.isArray(J.errors))return J.errors.push(V),J;let C=new X([J,V],J.message);return C.code=J.code,C}return V||J}class v extends Error{constructor(V="The operation was aborted",J=void 0){if(J!==void 0&&typeof J!=="object")throw new K.ERR_INVALID_ARG_TYPE("options","Object",J);super(V,J);this.code="ABORT_ERR",this.name="AbortError"}}x("ERR_ASSERTION","%s",Error),x("ERR_INVALID_ARG_TYPE",(V,J,C)=>{if(N(typeof V==="string","'name' must be a string"),!Array.isArray(J))J=[J];let j="The ";if(V.endsWith(" argument"))j+=`${V} `;else j+=`"${V}" ${V.includes(".")?"property":"argument"} `;j+="must be ";let T=[],a=[],h0=[];for(let s of J)if(N(typeof s==="string","All expected entries have to be of type string"),Y.includes(s))T.push(s.toLowerCase());else if(H.test(s))a.push(s);else N(s!=="object",'The value "object" should be written as "Object"'),h0.push(s);if(a.length>0){let s=T.indexOf("object");if(s!==-1)T.splice(T,s,1),a.push("Object")}if(T.length>0){switch(T.length){case 1:j+=`of type ${T[0]}`;break;case 2:j+=`one of type ${T[0]} or ${T[1]}`;break;default:{let s=T.pop();j+=`one of type ${T.join(", ")}, or ${s}`}}if(a.length>0||h0.length>0)j+=" or "}if(a.length>0){switch(a.length){case 1:j+=`an instance of ${a[0]}`;break;case 2:j+=`an instance of ${a[0]} or ${a[1]}`;break;default:{let s=a.pop();j+=`an instance of ${a.join(", ")}, or ${s}`}}if(h0.length>0)j+=" or "}switch(h0.length){case 0:break;case 1:if(h0[0].toLowerCase()!==h0[0])j+="an ";j+=`${h0[0]}`;break;case 2:j+=`one of ${h0[0]} or ${h0[1]}`;break;default:{let s=h0.pop();j+=`one of ${h0.join(", ")}, or ${s}`}}if(C==null)j+=`. Received ${C}`;else if(typeof C==="function"&&C.name)j+=`. Received function ${C.name}`;else if(typeof C==="object"){var H0;if((H0=C.constructor)!==null&&H0!==void 0&&H0.name)j+=`. Received an instance of ${C.constructor.name}`;else{let s=U(C,{depth:-1});j+=`. Received ${s}`}}else{let s=U(C,{colors:!1});if(s.length>25)s=`${s.slice(0,25)}...`;j+=`. Received type ${typeof C} (${s})`}return j},TypeError),x("ERR_INVALID_ARG_VALUE",(V,J,C="is invalid")=>{let j=U(J);if(j.length>128)j=j.slice(0,128)+"...";return`The ${V.includes(".")?"property":"argument"} '${V}' ${C}. Received ${j}`},TypeError),x("ERR_INVALID_RETURN_VALUE",(V,J,C)=>{var j;let T=C!==null&&C!==void 0&&(j=C.constructor)!==null&&j!==void 0&&j.name?`instance of ${C.constructor.name}`:`type ${typeof C}`;return`Expected ${V} to be returned from the "${J}" function but got ${T}.`},TypeError),x("ERR_MISSING_ARGS",(...V)=>{N(V.length>0,"At least one arg needs to be specified");let J,C=V.length;switch(V=(Array.isArray(V)?V:[V]).map((j)=>`"${j}"`).join(" or "),C){case 1:J+=`The ${V[0]} argument`;break;case 2:J+=`The ${V[0]} and ${V[1]} arguments`;break;default:{let j=V.pop();J+=`The ${V.join(", ")}, and ${j} arguments`}break}return`${J} must be specified`},TypeError),x("ERR_OUT_OF_RANGE",(V,J,C)=>{N(J,'Missing "range" argument');let j;if(Number.isInteger(C)&&Math.abs(C)>4294967296)j=G(String(C));else if(typeof C==="bigint"){j=String(C);let T=BigInt(2)**BigInt(32);if(C>T||C<-T)j=G(j);j+="n"}else j=U(C);return`The value of "${V}" is out of range. It must be ${J}. Received ${j}`},RangeError),x("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),x("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),x("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),x("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),x("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),x("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),x("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),x("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),x("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),x("ERR_STREAM_WRITE_AFTER_END","write after end",Error),x("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),B.exports={AbortError:v,aggregateTwoErrors:l(t),hideStackFrames:l,codes:K}}),f8=z0((w,B)=>{Object.defineProperty(w,"__esModule",{value:!0});var h=new WeakMap,U=new WeakMap;function I(D){let u=h.get(D);return console.assert(u!=null,"'this' is expected an Event object, but got",D),u}function X(D){if(D.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",D.passiveListener);return}if(!D.event.cancelable)return;if(D.canceled=!0,typeof D.event.preventDefault==="function")D.event.preventDefault()}function Z(D,u){h.set(this,{eventTarget:D,event:u,eventPhase:2,currentTarget:D,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:u.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let A=Object.keys(u);for(let E=0;E<A.length;++E){let L=A[E];if(!(L in this))Object.defineProperty(this,L,Y(L))}}if(Z.prototype={get type(){return I(this).event.type},get target(){return I(this).eventTarget},get currentTarget(){return I(this).currentTarget},composedPath(){let D=I(this).currentTarget;if(D==null)return[];return[D]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return I(this).eventPhase},stopPropagation(){let D=I(this);if(D.stopped=!0,typeof D.event.stopPropagation==="function")D.event.stopPropagation()},stopImmediatePropagation(){let D=I(this);if(D.stopped=!0,D.immediateStopped=!0,typeof D.event.stopImmediatePropagation==="function")D.event.stopImmediatePropagation()},get bubbles(){return Boolean(I(this).event.bubbles)},get cancelable(){return Boolean(I(this).event.cancelable)},preventDefault(){X(I(this))},get defaultPrevented(){return I(this).canceled},get composed(){return Boolean(I(this).event.composed)},get timeStamp(){return I(this).timeStamp},get srcElement(){return I(this).eventTarget},get cancelBubble(){return I(this).stopped},set cancelBubble(D){if(!D)return;let u=I(this);if(u.stopped=!0,typeof u.event.cancelBubble==="boolean")u.event.cancelBubble=!0},get returnValue(){return!I(this).canceled},set returnValue(D){if(!D)X(I(this))},initEvent(){}},Object.defineProperty(Z.prototype,"constructor",{value:Z,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(Z.prototype,window.Event.prototype),U.set(window.Event.prototype,Z);function Y(D){return{get(){return I(this).event[D]},set(u){I(this).event[D]=u},configurable:!0,enumerable:!0}}function H(D){return{value(){let u=I(this).event;return u[D].apply(u,arguments)},configurable:!0,enumerable:!0}}function K(D,u){let A=Object.keys(u);if(A.length===0)return D;function E(L,M){D.call(this,L,M)}E.prototype=Object.create(D.prototype,{constructor:{value:E,configurable:!0,writable:!0}});for(let L=0;L<A.length;++L){let M=A[L];if(!(M in D.prototype)){let p=typeof Object.getOwnPropertyDescriptor(u,M).value==="function";Object.defineProperty(E.prototype,M,p?H(M):Y(M))}}return E}function N(D){if(D==null||D===Object.prototype)return Z;let u=U.get(D);if(u==null)u=K(N(Object.getPrototypeOf(D)),D),U.set(D,u);return u}function G(D,u){return new(N(Object.getPrototypeOf(u)))(D,u)}function O(D){return I(D).immediateStopped}function x(D,u){I(D).eventPhase=u}function l(D,u){I(D).currentTarget=u}function t(D,u){I(D).passiveListener=u}var v=new WeakMap,V=1,J=2,C=3;function j(D){return D!==null&&typeof D==="object"}function T(D){let u=v.get(D);if(u==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return u}function a(D){return{get(){let u=T(this).get(D);while(u!=null){if(u.listenerType===C)return u.listener;u=u.next}return null},set(u){if(typeof u!=="function"&&!j(u))u=null;let A=T(this),E=null,L=A.get(D);while(L!=null){if(L.listenerType===C)if(E!==null)E.next=L.next;else if(L.next!==null)A.set(D,L.next);else A.delete(D);else E=L;L=L.next}if(u!==null){let M={listener:u,listenerType:C,passive:!1,once:!1,next:null};if(E===null)A.set(D,M);else E.next=M}},configurable:!0,enumerable:!0}}function h0(D,u){Object.defineProperty(D,`on${u}`,a(u))}function H0(D){function u(){s.call(this)}u.prototype=Object.create(s.prototype,{constructor:{value:u,configurable:!0,writable:!0}});for(let A=0;A<D.length;++A)h0(u.prototype,D[A]);return u}function s(){if(this instanceof s){v.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return H0(arguments[0]);if(arguments.length>0){let D=Array(arguments.length);for(let u=0;u<arguments.length;++u)D[u]=arguments[u];return H0(D)}throw TypeError("Cannot call a class as a function")}if(s.prototype={addEventListener(D,u,A){if(u==null)return;if(typeof u!=="function"&&!j(u))throw TypeError("'listener' should be a function or an object.");let E=T(this),L=j(A),M=(L?Boolean(A.capture):Boolean(A))?V:J,p={listener:u,listenerType:M,passive:L&&Boolean(A.passive),once:L&&Boolean(A.once),next:null},e=E.get(D);if(e===void 0){E.set(D,p);return}let I0=null;while(e!=null){if(e.listener===u&&e.listenerType===M)return;I0=e,e=e.next}I0.next=p},removeEventListener(D,u,A){if(u==null)return;let E=T(this),L=(j(A)?Boolean(A.capture):Boolean(A))?V:J,M=null,p=E.get(D);while(p!=null){if(p.listener===u&&p.listenerType===L){if(M!==null)M.next=p.next;else if(p.next!==null)E.set(D,p.next);else E.delete(D);return}M=p,p=p.next}},dispatchEvent(D){if(D==null||typeof D.type!=="string")throw TypeError('"event.type" should be a string.');let u=T(this),A=D.type,E=u.get(A);if(E==null)return!0;let L=G(this,D),M=null;while(E!=null){if(E.once)if(M!==null)M.next=E.next;else if(E.next!==null)u.set(A,E.next);else u.delete(A);else M=E;if(t(L,E.passive?E.listener:null),typeof E.listener==="function")try{E.listener.call(this,L)}catch(p){if(typeof console<"u"&&typeof console.error==="function")console.error(p)}else if(E.listenerType!==C&&typeof E.listener.handleEvent==="function")E.listener.handleEvent(L);if(O(L))break;E=E.next}return t(L,null),x(L,0),l(L,null),!L.defaultPrevented}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(s.prototype,window.EventTarget.prototype);w.defineEventAttribute=h0,w.EventTarget=s,w.default=s,B.exports=s,B.exports.EventTarget=B.exports.default=s,B.exports.defineEventAttribute=h0}),E2=z0((w,B)=>{Object.defineProperty(w,"__esModule",{value:!0});var h=f8();class U extends h.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let N=Z.get(this);if(typeof N!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return N}}h.defineEventAttribute(U.prototype,"abort");function I(){let N=Object.create(U.prototype);return h.EventTarget.call(N),Z.set(N,!1),N}function X(N){if(Z.get(N)!==!1)return;Z.set(N,!0),N.dispatchEvent({type:"abort"})}var Z=new WeakMap;if(Object.defineProperties(U.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(U.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class Y{constructor(){H.set(this,I())}get signal(){return K(this)}abort(){X(K(this))}}var H=new WeakMap;function K(N){let G=H.get(N);if(G==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${N===null?"null":typeof N}`);return G}if(Object.defineProperties(Y.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(Y.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});w.AbortController=Y,w.AbortSignal=U,w.default=Y,B.exports=Y,B.exports.AbortController=B.exports.default=Y,B.exports.AbortSignal=U}),D0=z0((w,B)=>{var h=(i0(),_0(b0)),{format:U,inspect:I}=Y6(),{codes:{ERR_INVALID_ARG_TYPE:X}}=L0(),{kResistStopPropagation:Z,AggregateError:Y,SymbolDispose:H}=N0(),K=globalThis.AbortSignal||E2().AbortSignal,N=globalThis.AbortController||E2().AbortController,G=Object.getPrototypeOf(async function(){}).constructor,O=globalThis.Blob||h.Blob,x=typeof O<"u"?function(V){return V instanceof O}:function(V){return!1},l=(v,V)=>{if(v!==void 0&&(v===null||typeof v!=="object"||!("aborted"in v)))throw new X(V,"AbortSignal",v)},t=(v,V)=>{if(typeof v!=="function")throw new X(V,"Function",v)};B.exports={AggregateError:Y,kEmptyObject:Object.freeze({}),once(v){let V=!1;return function(...J){if(V)return;V=!0,v.apply(this,J)}},createDeferredPromise:function(){let v,V;return{promise:new Promise((J,C)=>{v=J,V=C}),resolve:v,reject:V}},promisify(v){return new Promise((V,J)=>{v((C,...j)=>{if(C)return J(C);return V(...j)})})},debuglog(){return function(){}},format:U,inspect:I,types:{isAsyncFunction(v){return v instanceof G},isArrayBufferView(v){return ArrayBuffer.isView(v)}},isBlob:x,deprecate(v,V){return v},addAbortListener:(M2(),_0(W2)).addAbortListener||function(V,J){if(V===void 0)throw new X("signal","AbortSignal",V);l(V,"signal"),t(J,"listener");let C;if(V.aborted)queueMicrotask(()=>J());else V.addEventListener("abort",J,{__proto__:null,once:!0,[Z]:!0}),C=()=>{V.removeEventListener("abort",J)};return{__proto__:null,[H](){var j;(j=C)===null||j===void 0||j()}}},AbortSignalAny:K.any||function(V){if(V.length===1)return V[0];let J=new N,C=()=>J.abort();return V.forEach((j)=>{l(j,"signals"),j.addEventListener("abort",C,{once:!0})}),J.signal.addEventListener("abort",()=>{V.forEach((j)=>j.removeEventListener("abort",C))},{once:!0}),J.signal}},B.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),V2=z0((w,B)=>{var{ArrayIsArray:h,ArrayPrototypeIncludes:U,ArrayPrototypeJoin:I,ArrayPrototypeMap:X,NumberIsInteger:Z,NumberIsNaN:Y,NumberMAX_SAFE_INTEGER:H,NumberMIN_SAFE_INTEGER:K,NumberParseInt:N,ObjectPrototypeHasOwnProperty:G,RegExpPrototypeExec:O,String:x,StringPrototypeToUpperCase:l,StringPrototypeTrim:t}=N0(),{hideStackFrames:v,codes:{ERR_SOCKET_BAD_PORT:V,ERR_INVALID_ARG_TYPE:J,ERR_INVALID_ARG_VALUE:C,ERR_OUT_OF_RANGE:j,ERR_UNKNOWN_SIGNAL:T}}=L0(),{normalizeEncoding:a}=D0(),{isAsyncFunction:h0,isArrayBufferView:H0}=D0().types,s={};function D($){return $===($|0)}function u($){return $===$>>>0}var A=/^[0-7]+$/,E="must be a 32-bit unsigned integer or an octal string";function L($,f,r){if(typeof $>"u")$=r;if(typeof $==="string"){if(O(A,$)===null)throw new C(f,$,E);$=N($,8)}return e($,f),$}var M=v(($,f,r=K,g=H)=>{if(typeof $!=="number")throw new J(f,"number",$);if(!Z($))throw new j(f,"an integer",$);if($<r||$>g)throw new j(f,`>= ${r} && <= ${g}`,$)}),p=v(($,f,r=-2147483648,g=2147483647)=>{if(typeof $!=="number")throw new J(f,"number",$);if(!Z($))throw new j(f,"an integer",$);if($<r||$>g)throw new j(f,`>= ${r} && <= ${g}`,$)}),e=v(($,f,r=!1)=>{if(typeof $!=="number")throw new J(f,"number",$);if(!Z($))throw new j(f,"an integer",$);let g=r?1:0,Z0=4294967295;if($<g||$>Z0)throw new j(f,`>= ${g} && <= ${Z0}`,$)});function I0($,f){if(typeof $!=="string")throw new J(f,"string",$)}function Y0($,f,r=void 0,g){if(typeof $!=="number")throw new J(f,"number",$);if(r!=null&&$<r||g!=null&&$>g||(r!=null||g!=null)&&Y($))throw new j(f,`${r!=null?`>= ${r}`:""}${r!=null&&g!=null?" && ":""}${g!=null?`<= ${g}`:""}`,$)}var S=v(($,f,r)=>{if(!U(r,$)){let g="must be one of: "+I(X(r,(Z0)=>typeof Z0==="string"?`'${Z0}'`:x(Z0)),", ");throw new C(f,$,g)}});function X0($,f){if(typeof $!=="boolean")throw new J(f,"boolean",$)}function q($,f,r){return $==null||!G($,f)?r:$[f]}var c=v(($,f,r=null)=>{let g=q(r,"allowArray",!1),Z0=q(r,"allowFunction",!1);if(!q(r,"nullable",!1)&&$===null||!g&&h($)||typeof $!=="object"&&(!Z0||typeof $!=="function"))throw new J(f,"Object",$)}),B0=v(($,f)=>{if($!=null&&typeof $!=="object"&&typeof $!=="function")throw new J(f,"a dictionary",$)}),R=v(($,f,r=0)=>{if(!h($))throw new J(f,"Array",$);if($.length<r){let g=`must be longer than ${r}`;throw new C(f,$,g)}});function U0($,f){R($,f);for(let r=0;r<$.length;r++)I0($[r],`${f}[${r}]`)}function Q0($,f){R($,f);for(let r=0;r<$.length;r++)X0($[r],`${f}[${r}]`)}function q0($,f){R($,f);for(let r=0;r<$.length;r++){let g=$[r],Z0=`${f}[${r}]`;if(g==null)throw new J(Z0,"AbortSignal",g);J0(g,Z0)}}function K0($,f="signal"){if(I0($,f),s[$]===void 0){if(s[l($)]!==void 0)throw new T($+" (signals must use all capital letters)");throw new T($)}}var k=v(($,f="buffer")=>{if(!H0($))throw new J(f,["Buffer","TypedArray","DataView"],$)});function y($,f){let r=a(f),g=$.length;if(r==="hex"&&g%2!==0)throw new C("encoding",f,`is invalid for data of length ${g}`)}function o($,f="Port",r=!0){if(typeof $!=="number"&&typeof $!=="string"||typeof $==="string"&&t($).length===0||+$!==+$>>>0||$>65535||$===0&&!r)throw new V(f,$,r);return $|0}var J0=v(($,f)=>{if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw new J(f,"AbortSignal",$)}),F0=v(($,f)=>{if(typeof $!=="function")throw new J(f,"Function",$)}),z=v(($,f)=>{if(typeof $!=="function"||h0($))throw new J(f,"Function",$)}),W=v(($,f)=>{if($!==void 0)throw new J(f,"undefined",$)});function P($,f,r){if(!U(r,$))throw new J(f,`('${I(r,"|")}')`,$)}var i=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function m($,f){if(typeof $>"u"||!O(i,$))throw new C(f,$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function b($){if(typeof $==="string")return m($,"hints"),$;else if(h($)){let f=$.length,r="";if(f===0)return r;for(let g=0;g<f;g++){let Z0=$[g];if(m(Z0,"hints"),r+=Z0,g!==f-1)r+=", "}return r}throw new C("hints",$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}B.exports={isInt32:D,isUint32:u,parseFileMode:L,validateArray:R,validateStringArray:U0,validateBooleanArray:Q0,validateAbortSignalArray:q0,validateBoolean:X0,validateBuffer:k,validateDictionary:B0,validateEncoding:y,validateFunction:F0,validateInt32:p,validateInteger:M,validateNumber:Y0,validateObject:c,validateOneOf:S,validatePlainFunction:z,validatePort:o,validateSignalName:K0,validateString:I0,validateUint32:e,validateUndefined:W,validateUnion:P,validateAbortSignal:J0,validateLinkHeaderValue:b}}),X2=z0((w,B)=>{B.exports=globalThis.process}),l0=z0((w,B)=>{var{SymbolAsyncIterator:h,SymbolIterator:U,SymbolFor:I}=N0(),X=I("nodejs.stream.destroyed"),Z=I("nodejs.stream.errored"),Y=I("nodejs.stream.readable"),H=I("nodejs.stream.writable"),K=I("nodejs.stream.disturbed"),N=I("nodejs.webstream.isClosedPromise"),G=I("nodejs.webstream.controllerErrorFunction");function O(q,c=!1){var B0;return!!(q&&typeof q.pipe==="function"&&typeof q.on==="function"&&(!c||typeof q.pause==="function"&&typeof q.resume==="function")&&(!q._writableState||((B0=q._readableState)===null||B0===void 0?void 0:B0.readable)!==!1)&&(!q._writableState||q._readableState))}function x(q){var c;return!!(q&&typeof q.write==="function"&&typeof q.on==="function"&&(!q._readableState||((c=q._writableState)===null||c===void 0?void 0:c.writable)!==!1))}function l(q){return!!(q&&typeof q.pipe==="function"&&q._readableState&&typeof q.on==="function"&&typeof q.write==="function")}function t(q){return q&&(q._readableState||q._writableState||typeof q.write==="function"&&typeof q.on==="function"||typeof q.pipe==="function"&&typeof q.on==="function")}function v(q){return!!(q&&!t(q)&&typeof q.pipeThrough==="function"&&typeof q.getReader==="function"&&typeof q.cancel==="function")}function V(q){return!!(q&&!t(q)&&typeof q.getWriter==="function"&&typeof q.abort==="function")}function J(q){return!!(q&&!t(q)&&typeof q.readable==="object"&&typeof q.writable==="object")}function C(q){return v(q)||V(q)||J(q)}function j(q,c){if(q==null)return!1;if(c===!0)return typeof q[h]==="function";if(c===!1)return typeof q[U]==="function";return typeof q[h]==="function"||typeof q[U]==="function"}function T(q){if(!t(q))return null;let{_writableState:c,_readableState:B0}=q,R=c||B0;return!!(q.destroyed||q[X]||R!==null&&R!==void 0&&R.destroyed)}function a(q){if(!x(q))return null;if(q.writableEnded===!0)return!0;let c=q._writableState;if(c!==null&&c!==void 0&&c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function h0(q,c){if(!x(q))return null;if(q.writableFinished===!0)return!0;let B0=q._writableState;if(B0!==null&&B0!==void 0&&B0.errored)return!1;if(typeof(B0===null||B0===void 0?void 0:B0.finished)!=="boolean")return null;return!!(B0.finished||c===!1&&B0.ended===!0&&B0.length===0)}function H0(q){if(!O(q))return null;if(q.readableEnded===!0)return!0;let c=q._readableState;if(!c||c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function s(q,c){if(!O(q))return null;let B0=q._readableState;if(B0!==null&&B0!==void 0&&B0.errored)return!1;if(typeof(B0===null||B0===void 0?void 0:B0.endEmitted)!=="boolean")return null;return!!(B0.endEmitted||c===!1&&B0.ended===!0&&B0.length===0)}function D(q){if(q&&q[Y]!=null)return q[Y];if(typeof(q===null||q===void 0?void 0:q.readable)!=="boolean")return null;if(T(q))return!1;return O(q)&&q.readable&&!s(q)}function u(q){if(q&&q[H]!=null)return q[H];if(typeof(q===null||q===void 0?void 0:q.writable)!=="boolean")return null;if(T(q))return!1;return x(q)&&q.writable&&!a(q)}function A(q,c){if(!t(q))return null;if(T(q))return!0;if((c===null||c===void 0?void 0:c.readable)!==!1&&D(q))return!1;if((c===null||c===void 0?void 0:c.writable)!==!1&&u(q))return!1;return!0}function E(q){var c,B0;if(!t(q))return null;if(q.writableErrored)return q.writableErrored;return(c=(B0=q._writableState)===null||B0===void 0?void 0:B0.errored)!==null&&c!==void 0?c:null}function L(q){var c,B0;if(!t(q))return null;if(q.readableErrored)return q.readableErrored;return(c=(B0=q._readableState)===null||B0===void 0?void 0:B0.errored)!==null&&c!==void 0?c:null}function M(q){if(!t(q))return null;if(typeof q.closed==="boolean")return q.closed;let{_writableState:c,_readableState:B0}=q;if(typeof(c===null||c===void 0?void 0:c.closed)==="boolean"||typeof(B0===null||B0===void 0?void 0:B0.closed)==="boolean")return(c===null||c===void 0?void 0:c.closed)||(B0===null||B0===void 0?void 0:B0.closed);if(typeof q._closed==="boolean"&&p(q))return q._closed;return null}function p(q){return typeof q._closed==="boolean"&&typeof q._defaultKeepAlive==="boolean"&&typeof q._removedConnection==="boolean"&&typeof q._removedContLen==="boolean"}function e(q){return typeof q._sent100==="boolean"&&p(q)}function I0(q){var c;return typeof q._consuming==="boolean"&&typeof q._dumped==="boolean"&&((c=q.req)===null||c===void 0?void 0:c.upgradeOrConnect)===void 0}function Y0(q){if(!t(q))return null;let{_writableState:c,_readableState:B0}=q,R=c||B0;return!R&&e(q)||!!(R&&R.autoDestroy&&R.emitClose&&R.closed===!1)}function S(q){var c;return!!(q&&((c=q[K])!==null&&c!==void 0?c:q.readableDidRead||q.readableAborted))}function X0(q){var c,B0,R,U0,Q0,q0,K0,k,y,o;return!!(q&&((c=(B0=(R=(U0=(Q0=(q0=q[Z])!==null&&q0!==void 0?q0:q.readableErrored)!==null&&Q0!==void 0?Q0:q.writableErrored)!==null&&U0!==void 0?U0:(K0=q._readableState)===null||K0===void 0?void 0:K0.errorEmitted)!==null&&R!==void 0?R:(k=q._writableState)===null||k===void 0?void 0:k.errorEmitted)!==null&&B0!==void 0?B0:(y=q._readableState)===null||y===void 0?void 0:y.errored)!==null&&c!==void 0?c:(o=q._writableState)===null||o===void 0?void 0:o.errored))}B.exports={isDestroyed:T,kIsDestroyed:X,isDisturbed:S,kIsDisturbed:K,isErrored:X0,kIsErrored:Z,isReadable:D,kIsReadable:Y,kIsClosedPromise:N,kControllerErrorFunction:G,kIsWritable:H,isClosed:M,isDuplexNodeStream:l,isFinished:A,isIterable:j,isReadableNodeStream:O,isReadableStream:v,isReadableEnded:H0,isReadableFinished:s,isReadableErrored:L,isNodeStream:t,isWebStream:C,isWritable:u,isWritableNodeStream:x,isWritableStream:V,isWritableEnded:a,isWritableFinished:h0,isWritableErrored:E,isServerRequest:I0,isServerResponse:e,willEmitClose:Y0,isTransformStream:J}}),a0=z0((w,B)=>{var h=X2(),{AbortError:U,codes:I}=L0(),{ERR_INVALID_ARG_TYPE:X,ERR_STREAM_PREMATURE_CLOSE:Z}=I,{kEmptyObject:Y,once:H}=D0(),{validateAbortSignal:K,validateFunction:N,validateObject:G,validateBoolean:O}=V2(),{Promise:x,PromisePrototypeThen:l,SymbolDispose:t}=N0(),{isClosed:v,isReadable:V,isReadableNodeStream:J,isReadableStream:C,isReadableFinished:j,isReadableErrored:T,isWritable:a,isWritableNodeStream:h0,isWritableStream:H0,isWritableFinished:s,isWritableErrored:D,isNodeStream:u,willEmitClose:A,kIsClosedPromise:E}=l0(),L;function M(S){return S.setHeader&&typeof S.abort==="function"}var p=()=>{};function e(S,X0,q){var c,B0;if(arguments.length===2)q=X0,X0=Y;else if(X0==null)X0=Y;else G(X0,"options");if(N(q,"callback"),K(X0.signal,"options.signal"),q=H(q),C(S)||H0(S))return I0(S,X0,q);if(!u(S))throw new X("stream",["ReadableStream","WritableStream","Stream"],S);let R=(c=X0.readable)!==null&&c!==void 0?c:J(S),U0=(B0=X0.writable)!==null&&B0!==void 0?B0:h0(S),Q0=S._writableState,q0=S._readableState,K0=()=>{if(!S.writable)o()},k=A(S)&&J(S)===R&&h0(S)===U0,y=s(S,!1),o=()=>{if(y=!0,S.destroyed)k=!1;if(k&&(!S.readable||R))return;if(!R||J0)q.call(S)},J0=j(S,!1),F0=()=>{if(J0=!0,S.destroyed)k=!1;if(k&&(!S.writable||U0))return;if(!U0||y)q.call(S)},z=($)=>{q.call(S,$)},W=v(S),P=()=>{W=!0;let $=D(S)||T(S);if($&&typeof $!=="boolean")return q.call(S,$);if(R&&!J0&&J(S,!0)){if(!j(S,!1))return q.call(S,new Z)}if(U0&&!y){if(!s(S,!1))return q.call(S,new Z)}q.call(S)},i=()=>{W=!0;let $=D(S)||T(S);if($&&typeof $!=="boolean")return q.call(S,$);q.call(S)},m=()=>{S.req.on("finish",o)};if(M(S)){if(S.on("complete",o),!k)S.on("abort",P);if(S.req)m();else S.on("request",m)}else if(U0&&!Q0)S.on("end",K0),S.on("close",K0);if(!k&&typeof S.aborted==="boolean")S.on("aborted",P);if(S.on("end",F0),S.on("finish",o),X0.error!==!1)S.on("error",z);if(S.on("close",P),W)h.nextTick(P);else if(Q0!==null&&Q0!==void 0&&Q0.errorEmitted||q0!==null&&q0!==void 0&&q0.errorEmitted){if(!k)h.nextTick(i)}else if(!R&&(!k||V(S))&&(y||a(S)===!1))h.nextTick(i);else if(!U0&&(!k||a(S))&&(J0||V(S)===!1))h.nextTick(i);else if(q0&&S.req&&S.aborted)h.nextTick(i);let b=()=>{if(q=p,S.removeListener("aborted",P),S.removeListener("complete",o),S.removeListener("abort",P),S.removeListener("request",m),S.req)S.req.removeListener("finish",o);S.removeListener("end",K0),S.removeListener("close",K0),S.removeListener("finish",o),S.removeListener("end",F0),S.removeListener("error",z),S.removeListener("close",P)};if(X0.signal&&!W){let $=()=>{let f=q;b(),f.call(S,new U(void 0,{cause:X0.signal.reason}))};if(X0.signal.aborted)h.nextTick($);else{L=L||D0().addAbortListener;let f=L(X0.signal,$),r=q;q=H((...g)=>{f[t](),r.apply(S,g)})}}return b}function I0(S,X0,q){let c=!1,B0=p;if(X0.signal)if(B0=()=>{c=!0,q.call(S,new U(void 0,{cause:X0.signal.reason}))},X0.signal.aborted)h.nextTick(B0);else{L=L||D0().addAbortListener;let U0=L(X0.signal,B0),Q0=q;q=H((...q0)=>{U0[t](),Q0.apply(S,q0)})}let R=(...U0)=>{if(!c)h.nextTick(()=>q.apply(S,U0))};return l(S[E].promise,R,R),p}function Y0(S,X0){var q;let c=!1;if(X0===null)X0=Y;if((q=X0)!==null&&q!==void 0&&q.cleanup)O(X0.cleanup,"cleanup"),c=X0.cleanup;return new x((B0,R)=>{let U0=e(S,X0,(Q0)=>{if(c)U0();if(Q0)R(Q0);else B0()})})}B.exports=e,B.exports.finished=Y0}),q2=z0((w,B)=>{var h=X2(),{aggregateTwoErrors:U,codes:{ERR_MULTIPLE_CALLBACK:I},AbortError:X}=L0(),{Symbol:Z}=N0(),{kIsDestroyed:Y,isDestroyed:H,isFinished:K,isServerRequest:N}=l0(),G=Z("kDestroy"),O=Z("kConstruct");function x(A,E,L){if(A){if(A.stack,E&&!E.errored)E.errored=A;if(L&&!L.errored)L.errored=A}}function l(A,E){let L=this._readableState,M=this._writableState,p=M||L;if(M!==null&&M!==void 0&&M.destroyed||L!==null&&L!==void 0&&L.destroyed){if(typeof E==="function")E();return this}if(x(A,M,L),M)M.destroyed=!0;if(L)L.destroyed=!0;if(!p.constructed)this.once(G,function(e){t(this,U(e,A),E)});else t(this,A,E);return this}function t(A,E,L){let M=!1;function p(e){if(M)return;M=!0;let{_readableState:I0,_writableState:Y0}=A;if(x(e,Y0,I0),Y0)Y0.closed=!0;if(I0)I0.closed=!0;if(typeof L==="function")L(e);if(e)h.nextTick(v,A,e);else h.nextTick(V,A)}try{A._destroy(E||null,p)}catch(e){p(e)}}function v(A,E){J(A,E),V(A)}function V(A){let{_readableState:E,_writableState:L}=A;if(L)L.closeEmitted=!0;if(E)E.closeEmitted=!0;if(L!==null&&L!==void 0&&L.emitClose||E!==null&&E!==void 0&&E.emitClose)A.emit("close")}function J(A,E){let{_readableState:L,_writableState:M}=A;if(M!==null&&M!==void 0&&M.errorEmitted||L!==null&&L!==void 0&&L.errorEmitted)return;if(M)M.errorEmitted=!0;if(L)L.errorEmitted=!0;A.emit("error",E)}function C(){let A=this._readableState,E=this._writableState;if(A)A.constructed=!0,A.closed=!1,A.closeEmitted=!1,A.destroyed=!1,A.errored=null,A.errorEmitted=!1,A.reading=!1,A.ended=A.readable===!1,A.endEmitted=A.readable===!1;if(E)E.constructed=!0,E.destroyed=!1,E.closed=!1,E.closeEmitted=!1,E.errored=null,E.errorEmitted=!1,E.finalCalled=!1,E.prefinished=!1,E.ended=E.writable===!1,E.ending=E.writable===!1,E.finished=E.writable===!1}function j(A,E,L){let{_readableState:M,_writableState:p}=A;if(p!==null&&p!==void 0&&p.destroyed||M!==null&&M!==void 0&&M.destroyed)return this;if(M!==null&&M!==void 0&&M.autoDestroy||p!==null&&p!==void 0&&p.autoDestroy)A.destroy(E);else if(E){if(E.stack,p&&!p.errored)p.errored=E;if(M&&!M.errored)M.errored=E;if(L)h.nextTick(J,A,E);else J(A,E)}}function T(A,E){if(typeof A._construct!=="function")return;let{_readableState:L,_writableState:M}=A;if(L)L.constructed=!1;if(M)M.constructed=!1;if(A.once(O,E),A.listenerCount(O)>1)return;h.nextTick(a,A)}function a(A){let E=!1;function L(M){if(E){j(A,M!==null&&M!==void 0?M:new I);return}E=!0;let{_readableState:p,_writableState:e}=A,I0=e||p;if(p)p.constructed=!0;if(e)e.constructed=!0;if(I0.destroyed)A.emit(G,M);else if(M)j(A,M,!0);else h.nextTick(h0,A)}try{A._construct((M)=>{h.nextTick(L,M)})}catch(M){h.nextTick(L,M)}}function h0(A){A.emit(O)}function H0(A){return(A===null||A===void 0?void 0:A.setHeader)&&typeof A.abort==="function"}function s(A){A.emit("close")}function D(A,E){A.emit("error",E),h.nextTick(s,A)}function u(A,E){if(!A||H(A))return;if(!E&&!K(A))E=new X;if(N(A))A.socket=null,A.destroy(E);else if(H0(A))A.abort();else if(H0(A.req))A.req.abort();else if(typeof A.destroy==="function")A.destroy(E);else if(typeof A.close==="function")A.close();else if(E)h.nextTick(D,A,E);else h.nextTick(s,A);if(!A.destroyed)A[Y]=!0}B.exports={construct:T,destroyer:u,destroy:l,undestroy:C,errorOrDestroy:j}}),e2=z0((w,B)=>{var{ArrayIsArray:h,ObjectSetPrototypeOf:U}=N0(),{EventEmitter:I}=(M2(),_0(W2));function X(Y){I.call(this,Y)}U(X.prototype,I.prototype),U(X,I),X.prototype.pipe=function(Y,H){let K=this;function N(V){if(Y.writable&&Y.write(V)===!1&&K.pause)K.pause()}K.on("data",N);function G(){if(K.readable&&K.resume)K.resume()}if(Y.on("drain",G),!Y._isStdio&&(!H||H.end!==!1))K.on("end",x),K.on("close",l);let O=!1;function x(){if(O)return;O=!0,Y.end()}function l(){if(O)return;if(O=!0,typeof Y.destroy==="function")Y.destroy()}function t(V){if(v(),I.listenerCount(this,"error")===0)this.emit("error",V)}Z(K,"error",t),Z(Y,"error",t);function v(){K.removeListener("data",N),Y.removeListener("drain",G),K.removeListener("end",x),K.removeListener("close",l),K.removeListener("error",t),Y.removeListener("error",t),K.removeListener("end",v),K.removeListener("close",v),Y.removeListener("close",v)}return K.on("end",v),K.on("close",v),Y.on("close",v),Y.emit("pipe",K),Y};function Z(Y,H,K){if(typeof Y.prependListener==="function")return Y.prependListener(H,K);if(!Y._events||!Y._events[H])Y.on(H,K);else if(h(Y._events[H]))Y._events[H].unshift(K);else Y._events[H]=[K,Y._events[H]]}B.exports={Stream:X,prependListener:Z}}),P2=z0((w,B)=>{var{SymbolDispose:h}=N0(),{AbortError:U,codes:I}=L0(),{isNodeStream:X,isWebStream:Z,kControllerErrorFunction:Y}=l0(),H=a0(),{ERR_INVALID_ARG_TYPE:K}=I,N,G=(O,x)=>{if(typeof O!=="object"||!("aborted"in O))throw new K(x,"AbortSignal",O)};B.exports.addAbortSignal=function(x,l){if(G(x,"signal"),!X(l)&&!Z(l))throw new K("stream",["ReadableStream","WritableStream","Stream"],l);return B.exports.addAbortSignalNoValidate(x,l)},B.exports.addAbortSignalNoValidate=function(O,x){if(typeof O!=="object"||!("aborted"in O))return x;let l=X(x)?()=>{x.destroy(new U(void 0,{cause:O.reason}))}:()=>{x[Y](new U(void 0,{cause:O.reason}))};if(O.aborted)l();else{N=N||D0().addAbortListener;let t=N(O,l);H(x,t[h])}return x}}),c8=z0((w,B)=>{var{StringPrototypeSlice:h,SymbolIterator:U,TypedArrayPrototypeSet:I,Uint8Array:X}=N0(),{Buffer:Z}=(i0(),_0(b0)),{inspect:Y}=D0();B.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(K){let N={data:K,next:null};if(this.length>0)this.tail.next=N;else this.head=N;this.tail=N,++this.length}unshift(K){let N={data:K,next:this.head};if(this.length===0)this.tail=N;this.head=N,++this.length}shift(){if(this.length===0)return;let K=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,K}clear(){this.head=this.tail=null,this.length=0}join(K){if(this.length===0)return"";let N=this.head,G=""+N.data;while((N=N.next)!==null)G+=K+N.data;return G}concat(K){if(this.length===0)return Z.alloc(0);let N=Z.allocUnsafe(K>>>0),G=this.head,O=0;while(G)I(N,G.data,O),O+=G.data.length,G=G.next;return N}consume(K,N){let G=this.head.data;if(K<G.length){let O=G.slice(0,K);return this.head.data=G.slice(K),O}if(K===G.length)return this.shift();return N?this._getString(K):this._getBuffer(K)}first(){return this.head.data}*[U](){for(let K=this.head;K;K=K.next)yield K.data}_getString(K){let N="",G=this.head,O=0;do{let x=G.data;if(K>x.length)N+=x,K-=x.length;else{if(K===x.length)if(N+=x,++O,G.next)this.head=G.next;else this.head=this.tail=null;else N+=h(x,0,K),this.head=G,G.data=h(x,K);break}++O}while((G=G.next)!==null);return this.length-=O,N}_getBuffer(K){let N=Z.allocUnsafe(K),G=K,O=this.head,x=0;do{let l=O.data;if(K>l.length)I(N,l,G-K),K-=l.length;else{if(K===l.length)if(I(N,l,G-K),++x,O.next)this.head=O.next;else this.head=this.tail=null;else I(N,new X(l.buffer,l.byteOffset,K),G-K),this.head=O,O.data=l.slice(K);break}++x}while((O=O.next)!==null);return this.length-=x,N}[Symbol.for("nodejs.util.inspect.custom")](K,N){return Y(this,{...N,depth:0,customInspect:!1})}}}),T2=z0((w,B)=>{var{MathFloor:h,NumberIsInteger:U}=N0(),{validateInteger:I}=V2(),{ERR_INVALID_ARG_VALUE:X}=L0().codes,Z=16384,Y=16;function H(O,x,l){return O.highWaterMark!=null?O.highWaterMark:x?O[l]:null}function K(O){return O?Y:Z}function N(O,x){if(I(x,"value",0),O)Y=x;else Z=x}function G(O,x,l,t){let v=H(x,t,l);if(v!=null){if(!U(v)||v<0){let V=t?`options.${l}`:"options.highWaterMark";throw new X(V,v)}return h(v)}return K(O.objectMode)}B.exports={getHighWaterMark:G,getDefaultHighWaterMark:K,setDefaultHighWaterMark:N}}),u8=z0((w,B)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var h=(i0(),_0(b0)),U=h.Buffer;function I(Z,Y){for(var H in Z)Y[H]=Z[H]}if(U.from&&U.alloc&&U.allocUnsafe&&U.allocUnsafeSlow)B.exports=h;else I(h,w),w.Buffer=X;function X(Z,Y,H){return U(Z,Y,H)}X.prototype=Object.create(U.prototype),I(U,X),X.from=function(Z,Y,H){if(typeof Z==="number")throw TypeError("Argument must not be a number");return U(Z,Y,H)},X.alloc=function(Z,Y,H){if(typeof Z!=="number")throw TypeError("Argument must be a number");var K=U(Z);if(Y!==void 0)if(typeof H==="string")K.fill(Y,H);else K.fill(Y);else K.fill(0);return K},X.allocUnsafe=function(Z){if(typeof Z!=="number")throw TypeError("Argument must be a number");return U(Z)},X.allocUnsafeSlow=function(Z){if(typeof Z!=="number")throw TypeError("Argument must be a number");return h.SlowBuffer(Z)}}),v8=z0((w)=>{var B=u8().Buffer,h=B.isEncoding||function(J){switch(J=""+J,J&&J.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function U(J){if(!J)return"utf8";var C;while(!0)switch(J){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return J;default:if(C)return;J=(""+J).toLowerCase(),C=!0}}function I(J){var C=U(J);if(typeof C!=="string"&&(B.isEncoding===h||!h(J)))throw Error("Unknown encoding: "+J);return C||J}w.StringDecoder=X;function X(J){this.encoding=I(J);var C;switch(this.encoding){case"utf16le":this.text=O,this.end=x,C=4;break;case"utf8":this.fillLast=K,C=4;break;case"base64":this.text=l,this.end=t,C=3;break;default:this.write=v,this.end=V;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=B.allocUnsafe(C)}X.prototype.write=function(J){if(J.length===0)return"";var C,j;if(this.lastNeed){if(C=this.fillLast(J),C===void 0)return"";j=this.lastNeed,this.lastNeed=0}else j=0;if(j<J.length)return C?C+this.text(J,j):this.text(J,j);return C||""},X.prototype.end=G,X.prototype.text=N,X.prototype.fillLast=function(J){if(this.lastNeed<=J.length)return J.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);J.copy(this.lastChar,this.lastTotal-this.lastNeed,0,J.length),this.lastNeed-=J.length};function Z(J){if(J<=127)return 0;else if(J>>5===6)return 2;else if(J>>4===14)return 3;else if(J>>3===30)return 4;return J>>6===2?-1:-2}function Y(J,C,j){var T=C.length-1;if(T<j)return 0;var a=Z(C[T]);if(a>=0){if(a>0)J.lastNeed=a-1;return a}if(--T<j||a===-2)return 0;if(a=Z(C[T]),a>=0){if(a>0)J.lastNeed=a-2;return a}if(--T<j||a===-2)return 0;if(a=Z(C[T]),a>=0){if(a>0)if(a===2)a=0;else J.lastNeed=a-3;return a}return 0}function H(J,C,j){if((C[0]&192)!==128)return J.lastNeed=0,"�";if(J.lastNeed>1&&C.length>1){if((C[1]&192)!==128)return J.lastNeed=1,"�";if(J.lastNeed>2&&C.length>2){if((C[2]&192)!==128)return J.lastNeed=2,"�"}}}function K(J){var C=this.lastTotal-this.lastNeed,j=H(this,J,C);if(j!==void 0)return j;if(this.lastNeed<=J.length)return J.copy(this.lastChar,C,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);J.copy(this.lastChar,C,0,J.length),this.lastNeed-=J.length}function N(J,C){var j=Y(this,J,C);if(!this.lastNeed)return J.toString("utf8",C);this.lastTotal=j;var T=J.length-(j-this.lastNeed);return J.copy(this.lastChar,0,T),J.toString("utf8",C,T)}function G(J){var C=J&&J.length?this.write(J):"";if(this.lastNeed)return C+"�";return C}function O(J,C){if((J.length-C)%2===0){var j=J.toString("utf16le",C);if(j){var T=j.charCodeAt(j.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=J[J.length-2],this.lastChar[1]=J[J.length-1],j.slice(0,-1)}return j}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=J[J.length-1],J.toString("utf16le",C,J.length-1)}function x(J){var C=J&&J.length?this.write(J):"";if(this.lastNeed){var j=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,j)}return C}function l(J,C){var j=(J.length-C)%3;if(j===0)return J.toString("base64",C);if(this.lastNeed=3-j,this.lastTotal=3,j===1)this.lastChar[0]=J[J.length-1];else this.lastChar[0]=J[J.length-2],this.lastChar[1]=J[J.length-1];return J.toString("base64",C,J.length-j)}function t(J){var C=J&&J.length?this.write(J):"";if(this.lastNeed)return C+this.lastChar.toString("base64",0,3-this.lastNeed);return C}function v(J){return J.toString(this.encoding)}function V(J){return J&&J.length?this.write(J):""}}),q6=z0((w,B)=>{var h=X2(),{PromisePrototypeThen:U,SymbolAsyncIterator:I,SymbolIterator:X}=N0(),{Buffer:Z}=(i0(),_0(b0)),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_NULL_VALUES:H}=L0().codes;function K(N,G,O){let x;if(typeof G==="string"||G instanceof Z)return new N({objectMode:!0,...O,read(){this.push(G),this.push(null)}});let l;if(G&&G[I])l=!0,x=G[I]();else if(G&&G[X])l=!1,x=G[X]();else throw new Y("iterable",["Iterable"],G);let t=new N({objectMode:!0,highWaterMark:1,...O}),v=!1;t._read=function(){if(!v)v=!0,J()},t._destroy=function(C,j){U(V(C),()=>h.nextTick(j,C),(T)=>h.nextTick(j,T||C))};async function V(C){let j=C!==void 0&&C!==null,T=typeof x.throw==="function";if(j&&T){let{value:a,done:h0}=await x.throw(C);if(await a,h0)return}if(typeof x.return==="function"){let{value:a}=await x.return();await a}}async function J(){for(;;){try{let{value:C,done:j}=l?await x.next():x.next();if(j)t.push(null);else{let T=C&&typeof C.then==="function"?await C:C;if(T===null)throw v=!1,new H;else if(t.push(T))continue;else v=!1}}catch(C){t.destroy(C)}break}}return t}B.exports=K}),_2=z0((w,B)=>{var h=X2(),{ArrayPrototypeIndexOf:U,NumberIsInteger:I,NumberIsNaN:X,NumberParseInt:Z,ObjectDefineProperties:Y,ObjectKeys:H,ObjectSetPrototypeOf:K,Promise:N,SafeSet:G,SymbolAsyncDispose:O,SymbolAsyncIterator:x,Symbol:l}=N0();B.exports=g,g.ReadableState=r;var{EventEmitter:t}=(M2(),_0(W2)),{Stream:v,prependListener:V}=e2(),{Buffer:J}=(i0(),_0(b0)),{addAbortSignal:C}=P2(),j=a0(),T=D0().debuglog("stream",(Q)=>{T=Q}),a=c8(),h0=q2(),{getHighWaterMark:H0,getDefaultHighWaterMark:s}=T2(),{aggregateTwoErrors:D,codes:{ERR_INVALID_ARG_TYPE:u,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:E,ERR_STREAM_PUSH_AFTER_EOF:L,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:M},AbortError:p}=L0(),{validateObject:e}=V2(),I0=l("kPaused"),{StringDecoder:Y0}=v8(),S=q6();K(g.prototype,v.prototype),K(g,v);var X0=()=>{},{errorOrDestroy:q}=h0,c=1,B0=2,R=4,U0=8,Q0=16,q0=32,K0=64,k=128,y=256,o=512,J0=1024,F0=2048,z=4096,W=8192,P=16384,i=32768,m=65536,b=131072,$=262144;function f(Q){return{enumerable:!1,get(){return(this.state&Q)!==0},set(F){if(F)this.state|=Q;else this.state&=~Q}}}Y(r.prototype,{objectMode:f(c),ended:f(B0),endEmitted:f(R),reading:f(U0),constructed:f(Q0),sync:f(q0),needReadable:f(K0),emittedReadable:f(k),readableListening:f(y),resumeScheduled:f(o),errorEmitted:f(J0),emitClose:f(F0),autoDestroy:f(z),destroyed:f(W),closed:f(P),closeEmitted:f(i),multiAwaitDrain:f(m),readingMore:f(b),dataEmitted:f($)});function r(Q,F,d){if(typeof d!=="boolean")d=F instanceof d0();if(this.state=F0|z|Q0|q0,Q&&Q.objectMode)this.state|=c;if(d&&Q&&Q.readableObjectMode)this.state|=c;if(this.highWaterMark=Q?H0(this,Q,"readableHighWaterMark",d):s(!1),this.buffer=new a,this.length=0,this.pipes=[],this.flowing=null,this[I0]=null,Q&&Q.emitClose===!1)this.state&=~F0;if(Q&&Q.autoDestroy===!1)this.state&=~z;if(this.errored=null,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,Q&&Q.encoding)this.decoder=new Y0(Q.encoding),this.encoding=Q.encoding}function g(Q){if(!(this instanceof g))return new g(Q);let F=this instanceof d0();if(this._readableState=new r(Q,this,F),Q){if(typeof Q.read==="function")this._read=Q.read;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal&&!F)C(Q.signal,this)}v.call(this,Q),h0.construct(this,()=>{if(this._readableState.needReadable)F2(this,this._readableState)})}g.prototype.destroy=h0.destroy,g.prototype._undestroy=h0.undestroy,g.prototype._destroy=function(Q,F){F(Q)},g.prototype[t.captureRejectionSymbol]=function(Q){this.destroy(Q)},g.prototype[O]=function(){let Q;if(!this.destroyed)Q=this.readableEnded?null:new p,this.destroy(Q);return new N((F,d)=>j(this,(n)=>n&&n!==Q?d(n):F(null)))},g.prototype.push=function(Q,F){return Z0(this,Q,F,!1)},g.prototype.unshift=function(Q,F){return Z0(this,Q,F,!0)};function Z0(Q,F,d,n){T("readableAddChunk",F);let w0=Q._readableState,j0;if((w0.state&c)===0){if(typeof F==="string"){if(d=d||w0.defaultEncoding,w0.encoding!==d)if(n&&w0.encoding)F=J.from(F,d).toString(w0.encoding);else F=J.from(F,d),d=""}else if(F instanceof J)d="";else if(v._isUint8Array(F))F=v._uint8ArrayToBuffer(F),d="";else if(F!=null)j0=new u("chunk",["string","Buffer","Uint8Array"],F)}if(j0)q(Q,j0);else if(F===null)w0.state&=~U0,V0(Q,w0);else if((w0.state&c)!==0||F&&F.length>0)if(n)if((w0.state&R)!==0)q(Q,new M);else if(w0.destroyed||w0.errored)return!1;else P0(Q,w0,F,!0);else if(w0.ended)q(Q,new L);else if(w0.destroyed||w0.errored)return!1;else if(w0.state&=~U0,w0.decoder&&!d)if(F=w0.decoder.write(F),w0.objectMode||F.length!==0)P0(Q,w0,F,!1);else F2(Q,w0);else P0(Q,w0,F,!1);else if(!n)w0.state&=~U0,F2(Q,w0);return!w0.ended&&(w0.length<w0.highWaterMark||w0.length===0)}function P0(Q,F,d,n){if(F.flowing&&F.length===0&&!F.sync&&Q.listenerCount("data")>0){if((F.state&m)!==0)F.awaitDrainWriters.clear();else F.awaitDrainWriters=null;F.dataEmitted=!0,Q.emit("data",d)}else{if(F.length+=F.objectMode?1:d.length,n)F.buffer.unshift(d);else F.buffer.push(d);if((F.state&K0)!==0)O0(Q)}F2(Q,F)}g.prototype.isPaused=function(){let Q=this._readableState;return Q[I0]===!0||Q.flowing===!1},g.prototype.setEncoding=function(Q){let F=new Y0(Q);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;let d=this._readableState.buffer,n="";for(let w0 of d)n+=F.write(w0);if(d.clear(),n!=="")d.push(n);return this._readableState.length=n.length,this};var C0=1073741824;function M0(Q){if(Q>C0)throw new E("size","<= 1GiB",Q);else Q--,Q|=Q>>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++;return Q}function t0(Q,F){if(Q<=0||F.length===0&&F.ended)return 0;if((F.state&c)!==0)return 1;if(X(Q)){if(F.flowing&&F.length)return F.buffer.first().length;return F.length}if(Q<=F.length)return Q;return F.ended?F.length:0}g.prototype.read=function(Q){if(T("read",Q),Q===void 0)Q=NaN;else if(!I(Q))Q=Z(Q,10);let F=this._readableState,d=Q;if(Q>F.highWaterMark)F.highWaterMark=M0(Q);if(Q!==0)F.state&=~k;if(Q===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(T("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)k2(this);else O0(this);return null}if(Q=t0(Q,F),Q===0&&F.ended){if(F.length===0)k2(this);return null}let n=(F.state&K0)!==0;if(T("need readable",n),F.length===0||F.length-Q<F.highWaterMark)n=!0,T("length less than watermark",n);if(F.ended||F.reading||F.destroyed||F.errored||!F.constructed)n=!1,T("reading, ended or constructing",n);else if(n){if(T("do read"),F.state|=U0|q0,F.length===0)F.state|=K0;try{this._read(F.highWaterMark)}catch(j0){q(this,j0)}if(F.state&=~q0,!F.reading)Q=t0(d,F)}let w0;if(Q>0)w0=H1(Q,F);else w0=null;if(w0===null)F.needReadable=F.length<=F.highWaterMark,Q=0;else if(F.length-=Q,F.multiAwaitDrain)F.awaitDrainWriters.clear();else F.awaitDrainWriters=null;if(F.length===0){if(!F.ended)F.needReadable=!0;if(d!==Q&&F.ended)k2(this)}if(w0!==null&&!F.errorEmitted&&!F.closeEmitted)F.dataEmitted=!0,this.emit("data",w0);return w0};function V0(Q,F){if(T("onEofChunk"),F.ended)return;if(F.decoder){let d=F.decoder.end();if(d&&d.length)F.buffer.push(d),F.length+=F.objectMode?1:d.length}if(F.ended=!0,F.sync)O0(Q);else F.needReadable=!1,F.emittedReadable=!0,Q2(Q)}function O0(Q){let F=Q._readableState;if(T("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)T("emitReadable",F.flowing),F.emittedReadable=!0,h.nextTick(Q2,Q)}function Q2(Q){let F=Q._readableState;if(T("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&!F.errored&&(F.length||F.ended))Q.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,Y1(Q)}function F2(Q,F){if(!F.readingMore&&F.constructed)F.readingMore=!0,h.nextTick(S0,Q,F)}function S0(Q,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){let d=F.length;if(T("maybeReadMore read 0"),Q.read(0),d===F.length)break}F.readingMore=!1}g.prototype._read=function(Q){throw new A("_read()")},g.prototype.pipe=function(Q,F){let d=this,n=this._readableState;if(n.pipes.length===1){if(!n.multiAwaitDrain)n.multiAwaitDrain=!0,n.awaitDrainWriters=new G(n.awaitDrainWriters?[n.awaitDrainWriters]:[])}n.pipes.push(Q),T("pipe count=%d opts=%j",n.pipes.length,F);let w0=(!F||F.end!==!1)&&Q!==h.stdout&&Q!==h.stderr?T0:H2;if(n.endEmitted)h.nextTick(w0);else d.once("end",w0);Q.on("unpipe",j0);function j0(B2,u0){if(T("onunpipe"),B2===d){if(u0&&u0.hasUnpiped===!1)u0.hasUnpiped=!0,R6()}}function T0(){T("onend"),Q.end()}let e0,$1=!1;function R6(){if(T("cleanup"),Q.removeListener("close",f2),Q.removeListener("finish",c2),e0)Q.removeListener("drain",e0);if(Q.removeListener("error",y2),Q.removeListener("unpipe",j0),d.removeListener("end",T0),d.removeListener("end",H2),d.removeListener("data",N1),$1=!0,e0&&n.awaitDrainWriters&&(!Q._writableState||Q._writableState.needDrain))e0()}function G1(){if(!$1){if(n.pipes.length===1&&n.pipes[0]===Q)T("false write response, pause",0),n.awaitDrainWriters=Q,n.multiAwaitDrain=!1;else if(n.pipes.length>1&&n.pipes.includes(Q))T("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(Q);d.pause()}if(!e0)e0=L6(d,Q),Q.on("drain",e0)}d.on("data",N1);function N1(B2){T("ondata");let u0=Q.write(B2);if(T("dest.write",u0),u0===!1)G1()}function y2(B2){if(T("onerror",B2),H2(),Q.removeListener("error",y2),Q.listenerCount("error")===0){let u0=Q._writableState||Q._readableState;if(u0&&!u0.errorEmitted)q(Q,B2);else Q.emit("error",B2)}}V(Q,"error",y2);function f2(){Q.removeListener("finish",c2),H2()}Q.once("close",f2);function c2(){T("onfinish"),Q.removeListener("close",f2),H2()}Q.once("finish",c2);function H2(){T("unpipe"),d.unpipe(Q)}if(Q.emit("pipe",d),Q.writableNeedDrain===!0)G1();else if(!n.flowing)T("pipe resume"),d.resume();return Q};function L6(Q,F){return function(){let n=Q._readableState;if(n.awaitDrainWriters===F)T("pipeOnDrain",1),n.awaitDrainWriters=null;else if(n.multiAwaitDrain)T("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(F);if((!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&Q.listenerCount("data"))Q.resume()}}g.prototype.unpipe=function(Q){let F=this._readableState,d={hasUnpiped:!1};if(F.pipes.length===0)return this;if(!Q){let w0=F.pipes;F.pipes=[],this.pause();for(let j0=0;j0<w0.length;j0++)w0[j0].emit("unpipe",this,{hasUnpiped:!1});return this}let n=U(F.pipes,Q);if(n===-1)return this;if(F.pipes.splice(n,1),F.pipes.length===0)this.pause();return Q.emit("unpipe",this,d),this},g.prototype.on=function(Q,F){let d=v.prototype.on.call(this,Q,F),n=this._readableState;if(Q==="data"){if(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1)this.resume()}else if(Q==="readable"){if(!n.endEmitted&&!n.readableListening){if(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,T("on readable",n.length,n.reading),n.length)O0(this);else if(!n.reading)h.nextTick(O6,this)}}return d},g.prototype.addListener=g.prototype.on,g.prototype.removeListener=function(Q,F){let d=v.prototype.removeListener.call(this,Q,F);if(Q==="readable")h.nextTick(K1,this);return d},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(Q){let F=v.prototype.removeAllListeners.apply(this,arguments);if(Q==="readable"||Q===void 0)h.nextTick(K1,this);return F};function K1(Q){let F=Q._readableState;if(F.readableListening=Q.listenerCount("readable")>0,F.resumeScheduled&&F[I0]===!1)F.flowing=!0;else if(Q.listenerCount("data")>0)Q.resume();else if(!F.readableListening)F.flowing=null}function O6(Q){T("readable nexttick read 0"),Q.read(0)}g.prototype.resume=function(){let Q=this._readableState;if(!Q.flowing)T("resume"),Q.flowing=!Q.readableListening,x6(this,Q);return Q[I0]=!1,this};function x6(Q,F){if(!F.resumeScheduled)F.resumeScheduled=!0,h.nextTick(D6,Q,F)}function D6(Q,F){if(T("resume",F.reading),!F.reading)Q.read(0);if(F.resumeScheduled=!1,Q.emit("resume"),Y1(Q),F.flowing&&!F.reading)Q.read(0)}g.prototype.pause=function(){if(T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)T("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[I0]=!0,this};function Y1(Q){let F=Q._readableState;T("flow",F.flowing);while(F.flowing&&Q.read()!==null);}g.prototype.wrap=function(Q){let F=!1;Q.on("data",(n)=>{if(!this.push(n)&&Q.pause)F=!0,Q.pause()}),Q.on("end",()=>{this.push(null)}),Q.on("error",(n)=>{q(this,n)}),Q.on("close",()=>{this.destroy()}),Q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(F&&Q.resume)F=!1,Q.resume()};let d=H(Q);for(let n=1;n<d.length;n++){let w0=d[n];if(this[w0]===void 0&&typeof Q[w0]==="function")this[w0]=Q[w0].bind(Q)}return this},g.prototype[x]=function(){return q1(this)},g.prototype.iterator=function(Q){if(Q!==void 0)e(Q,"options");return q1(this,Q)};function q1(Q,F){if(typeof Q.read!=="function")Q=g.wrap(Q,{objectMode:!0});let d=P6(Q,F);return d.stream=Q,d}async function*P6(Q,F){let d=X0;function n(T0){if(this===Q)d(),d=X0;else d=T0}Q.on("readable",n);let w0,j0=j(Q,{writable:!1},(T0)=>{w0=T0?D(w0,T0):null,d(),d=X0});try{while(!0){let T0=Q.destroyed?null:Q.read();if(T0!==null)yield T0;else if(w0)throw w0;else if(w0===null)return;else await new N(n)}}catch(T0){throw w0=D(w0,T0),w0}finally{if((w0||(F===null||F===void 0?void 0:F.destroyOnReturn)!==!1)&&(w0===void 0||Q._readableState.autoDestroy))h0.destroyer(Q,null);else Q.off("readable",n),j0()}}Y(g.prototype,{readable:{__proto__:null,get(){let Q=this._readableState;return!!Q&&Q.readable!==!1&&!Q.destroyed&&!Q.errorEmitted&&!Q.endEmitted},set(Q){if(this._readableState)this._readableState.readable=!!Q}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(Q){if(this._readableState)this._readableState.flowing=Q}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(Q){if(!this._readableState)return;this._readableState.destroyed=Q}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),Y(r.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[I0]!==!1},set(Q){this[I0]=!!Q}}}),g._fromList=H1;function H1(Q,F){if(F.length===0)return null;let d;if(F.objectMode)d=F.buffer.shift();else if(!Q||Q>=F.length){if(F.decoder)d=F.buffer.join("");else if(F.buffer.length===1)d=F.buffer.first();else d=F.buffer.concat(F.length);F.buffer.clear()}else d=F.buffer.consume(Q,F.decoder);return d}function k2(Q){let F=Q._readableState;if(T("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,h.nextTick(T6,F,Q)}function T6(Q,F){if(T("endReadableNT",Q.endEmitted,Q.length),!Q.errored&&!Q.closeEmitted&&!Q.endEmitted&&Q.length===0){if(Q.endEmitted=!0,F.emit("end"),F.writable&&F.allowHalfOpen===!1)h.nextTick(_6,F);else if(Q.autoDestroy){let d=F._writableState;if(!d||d.autoDestroy&&(d.finished||d.writable===!1))F.destroy()}}}function _6(Q){if(Q.writable&&!Q.writableEnded&&!Q.destroyed)Q.end()}g.from=function(Q,F){return S(g,Q,F)};var S2;function z1(){if(S2===void 0)S2={};return S2}g.fromWeb=function(Q,F){return z1().newStreamReadableFromReadableStream(Q,F)},g.toWeb=function(Q,F){return z1().newReadableStreamFromStreamReadable(Q,F)},g.wrap=function(Q,F){var d,n;return new g({objectMode:(d=(n=Q.readableObjectMode)!==null&&n!==void 0?n:Q.objectMode)!==null&&d!==void 0?d:!0,...F,destroy(w0,j0){h0.destroyer(Q,w0),j0(w0)}}).wrap(Q)}}),B1=z0((w,B)=>{var h=X2(),{ArrayPrototypeSlice:U,Error:I,FunctionPrototypeSymbolHasInstance:X,ObjectDefineProperty:Z,ObjectDefineProperties:Y,ObjectSetPrototypeOf:H,StringPrototypeToLowerCase:K,Symbol:N,SymbolHasInstance:G}=N0();B.exports=e,e.WritableState=M;var{EventEmitter:O}=(M2(),_0(W2)),x=e2().Stream,{Buffer:l}=(i0(),_0(b0)),t=q2(),{addAbortSignal:v}=P2(),{getHighWaterMark:V,getDefaultHighWaterMark:J}=T2(),{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:a,ERR_STREAM_DESTROYED:h0,ERR_STREAM_ALREADY_FINISHED:H0,ERR_STREAM_NULL_VALUES:s,ERR_STREAM_WRITE_AFTER_END:D,ERR_UNKNOWN_ENCODING:u}=L0().codes,{errorOrDestroy:A}=t;H(e.prototype,x.prototype),H(e,x);function E(){}var L=N("kOnFinished");function M(z,W,P){if(typeof P!=="boolean")P=W instanceof d0();if(this.objectMode=!!(z&&z.objectMode),P)this.objectMode=this.objectMode||!!(z&&z.writableObjectMode);this.highWaterMark=z?V(this,z,"writableHighWaterMark",P):J(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let i=!!(z&&z.decodeStrings===!1);this.decodeStrings=!i,this.defaultEncoding=z&&z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=q.bind(void 0,W),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,p(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!z||z.emitClose!==!1,this.autoDestroy=!z||z.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[L]=[]}function p(z){z.buffered=[],z.bufferedIndex=0,z.allBuffers=!0,z.allNoop=!0}M.prototype.getBuffer=function(){return U(this.buffered,this.bufferedIndex)},Z(M.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function e(z){let W=this instanceof d0();if(!W&&!X(e,this))return new e(z);if(this._writableState=new M(z,this,W),z){if(typeof z.write==="function")this._write=z.write;if(typeof z.writev==="function")this._writev=z.writev;if(typeof z.destroy==="function")this._destroy=z.destroy;if(typeof z.final==="function")this._final=z.final;if(typeof z.construct==="function")this._construct=z.construct;if(z.signal)v(z.signal,this)}x.call(this,z),t.construct(this,()=>{let P=this._writableState;if(!P.writing)U0(this,P);k(this,P)})}Z(e,G,{__proto__:null,value:function(z){if(X(this,z))return!0;if(this!==e)return!1;return z&&z._writableState instanceof M}}),e.prototype.pipe=function(){A(this,new a)};function I0(z,W,P,i){let m=z._writableState;if(typeof P==="function")i=P,P=m.defaultEncoding;else{if(!P)P=m.defaultEncoding;else if(P!=="buffer"&&!l.isEncoding(P))throw new u(P);if(typeof i!=="function")i=E}if(W===null)throw new s;else if(!m.objectMode)if(typeof W==="string"){if(m.decodeStrings!==!1)W=l.from(W,P),P="buffer"}else if(W instanceof l)P="buffer";else if(x._isUint8Array(W))W=x._uint8ArrayToBuffer(W),P="buffer";else throw new C("chunk",["string","Buffer","Uint8Array"],W);let b;if(m.ending)b=new D;else if(m.destroyed)b=new h0("write");if(b)return h.nextTick(i,b),A(z,b,!0),b;return m.pendingcb++,Y0(z,m,W,P,i)}e.prototype.write=function(z,W,P){return I0(this,z,W,P)===!0},e.prototype.cork=function(){this._writableState.corked++},e.prototype.uncork=function(){let z=this._writableState;if(z.corked){if(z.corked--,!z.writing)U0(this,z)}},e.prototype.setDefaultEncoding=function(W){if(typeof W==="string")W=K(W);if(!l.isEncoding(W))throw new u(W);return this._writableState.defaultEncoding=W,this};function Y0(z,W,P,i,m){let b=W.objectMode?1:P.length;W.length+=b;let $=W.length<W.highWaterMark;if(!$)W.needDrain=!0;if(W.writing||W.corked||W.errored||!W.constructed){if(W.buffered.push({chunk:P,encoding:i,callback:m}),W.allBuffers&&i!=="buffer")W.allBuffers=!1;if(W.allNoop&&m!==E)W.allNoop=!1}else W.writelen=b,W.writecb=m,W.writing=!0,W.sync=!0,z._write(P,i,W.onwrite),W.sync=!1;return $&&!W.errored&&!W.destroyed}function S(z,W,P,i,m,b,$){if(W.writelen=i,W.writecb=$,W.writing=!0,W.sync=!0,W.destroyed)W.onwrite(new h0("write"));else if(P)z._writev(m,W.onwrite);else z._write(m,b,W.onwrite);W.sync=!1}function X0(z,W,P,i){--W.pendingcb,i(P),R(W),A(z,P)}function q(z,W){let P=z._writableState,i=P.sync,m=P.writecb;if(typeof m!=="function"){A(z,new T);return}if(P.writing=!1,P.writecb=null,P.length-=P.writelen,P.writelen=0,W){if(W.stack,!P.errored)P.errored=W;if(z._readableState&&!z._readableState.errored)z._readableState.errored=W;if(i)h.nextTick(X0,z,P,W,m);else X0(z,P,W,m)}else{if(P.buffered.length>P.bufferedIndex)U0(z,P);if(i)if(P.afterWriteTickInfo!==null&&P.afterWriteTickInfo.cb===m)P.afterWriteTickInfo.count++;else P.afterWriteTickInfo={count:1,cb:m,stream:z,state:P},h.nextTick(c,P.afterWriteTickInfo);else B0(z,P,1,m)}}function c({stream:z,state:W,count:P,cb:i}){return W.afterWriteTickInfo=null,B0(z,W,P,i)}function B0(z,W,P,i){if(!W.ending&&!z.destroyed&&W.length===0&&W.needDrain)W.needDrain=!1,z.emit("drain");while(P-- >0)W.pendingcb--,i();if(W.destroyed)R(W);k(z,W)}function R(z){if(z.writing)return;for(let m=z.bufferedIndex;m<z.buffered.length;++m){var W;let{chunk:b,callback:$}=z.buffered[m],f=z.objectMode?1:b.length;z.length-=f,$((W=z.errored)!==null&&W!==void 0?W:new h0("write"))}let P=z[L].splice(0);for(let m=0;m<P.length;m++){var i;P[m]((i=z.errored)!==null&&i!==void 0?i:new h0("end"))}p(z)}function U0(z,W){if(W.corked||W.bufferProcessing||W.destroyed||!W.constructed)return;let{buffered:P,bufferedIndex:i,objectMode:m}=W,b=P.length-i;if(!b)return;let $=i;if(W.bufferProcessing=!0,b>1&&z._writev){W.pendingcb-=b-1;let f=W.allNoop?E:(g)=>{for(let Z0=$;Z0<P.length;++Z0)P[Z0].callback(g)},r=W.allNoop&&$===0?P:U(P,$);r.allBuffers=W.allBuffers,S(z,W,!0,W.length,r,"",f),p(W)}else{do{let{chunk:f,encoding:r,callback:g}=P[$];P[$++]=null;let Z0=m?1:f.length;S(z,W,!1,Z0,f,r,g)}while($<P.length&&!W.writing);if($===P.length)p(W);else if($>256)P.splice(0,$),W.bufferedIndex=0;else W.bufferedIndex=$}W.bufferProcessing=!1}e.prototype._write=function(z,W,P){if(this._writev)this._writev([{chunk:z,encoding:W}],P);else throw new j("_write()")},e.prototype._writev=null,e.prototype.end=function(z,W,P){let i=this._writableState;if(typeof z==="function")P=z,z=null,W=null;else if(typeof W==="function")P=W,W=null;let m;if(z!==null&&z!==void 0){let b=I0(this,z,W);if(b instanceof I)m=b}if(i.corked)i.corked=1,this.uncork();if(m);else if(!i.errored&&!i.ending)i.ending=!0,k(this,i,!0),i.ended=!0;else if(i.finished)m=new H0("end");else if(i.destroyed)m=new h0("end");if(typeof P==="function")if(m||i.finished)h.nextTick(P,m);else i[L].push(P);return this};function Q0(z){return z.ending&&!z.destroyed&&z.constructed&&z.length===0&&!z.errored&&z.buffered.length===0&&!z.finished&&!z.writing&&!z.errorEmitted&&!z.closeEmitted}function q0(z,W){let P=!1;function i(m){if(P){A(z,m!==null&&m!==void 0?m:T());return}if(P=!0,W.pendingcb--,m){let b=W[L].splice(0);for(let $=0;$<b.length;$++)b[$](m);A(z,m,W.sync)}else if(Q0(W))W.prefinished=!0,z.emit("prefinish"),W.pendingcb++,h.nextTick(y,z,W)}W.sync=!0,W.pendingcb++;try{z._final(i)}catch(m){i(m)}W.sync=!1}function K0(z,W){if(!W.prefinished&&!W.finalCalled)if(typeof z._final==="function"&&!W.destroyed)W.finalCalled=!0,q0(z,W);else W.prefinished=!0,z.emit("prefinish")}function k(z,W,P){if(Q0(W)){if(K0(z,W),W.pendingcb===0){if(P)W.pendingcb++,h.nextTick((i,m)=>{if(Q0(m))y(i,m);else m.pendingcb--},z,W);else if(Q0(W))W.pendingcb++,y(z,W)}}}function y(z,W){W.pendingcb--,W.finished=!0;let P=W[L].splice(0);for(let i=0;i<P.length;i++)P[i]();if(z.emit("finish"),W.autoDestroy){let i=z._readableState;if(!i||i.autoDestroy&&(i.endEmitted||i.readable===!1))z.destroy()}}Y(e.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(z){if(this._writableState)this._writableState.destroyed=z}},writable:{__proto__:null,get(){let z=this._writableState;return!!z&&z.writable!==!1&&!z.destroyed&&!z.errored&&!z.ending&&!z.ended},set(z){if(this._writableState)this._writableState.writable=!!z}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let z=this._writableState;if(!z)return!1;return!z.destroyed&&!z.ending&&z.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var o=t.destroy;e.prototype.destroy=function(z,W){let P=this._writableState;if(!P.destroyed&&(P.bufferedIndex<P.buffered.length||P[L].length))h.nextTick(R,P);return o.call(this,z,W),this},e.prototype._undestroy=t.undestroy,e.prototype._destroy=function(z,W){W(z)},e.prototype[O.captureRejectionSymbol]=function(z){this.destroy(z)};var J0;function F0(){if(J0===void 0)J0={};return J0}e.fromWeb=function(z,W){return F0().newStreamWritableFromWritableStream(z,W)},e.toWeb=function(z){return F0().newWritableStreamFromStreamWritable(z)}}),g8=z0((w,B)=>{var h=X2(),U=(i0(),_0(b0)),{isReadable:I,isWritable:X,isIterable:Z,isNodeStream:Y,isReadableNodeStream:H,isWritableNodeStream:K,isDuplexNodeStream:N,isReadableStream:G,isWritableStream:O}=l0(),x=a0(),{AbortError:l,codes:{ERR_INVALID_ARG_TYPE:t,ERR_INVALID_RETURN_VALUE:v}}=L0(),{destroyer:V}=q2(),J=d0(),C=_2(),j=B1(),{createDeferredPromise:T}=D0(),a=q6(),h0=globalThis.Blob||U.Blob,H0=typeof h0<"u"?function(M){return M instanceof h0}:function(M){return!1},s=globalThis.AbortController||E2().AbortController,{FunctionPrototypeCall:D}=N0();class u extends J{constructor(L){super(L);if((L===null||L===void 0?void 0:L.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((L===null||L===void 0?void 0:L.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}B.exports=function L(M,p){if(N(M))return M;if(H(M))return E({readable:M});if(K(M))return E({writable:M});if(Y(M))return E({writable:!1,readable:!1});if(G(M))return E({readable:C.fromWeb(M)});if(O(M))return E({writable:j.fromWeb(M)});if(typeof M==="function"){let{value:I0,write:Y0,final:S,destroy:X0}=A(M);if(Z(I0))return a(u,I0,{objectMode:!0,write:Y0,final:S,destroy:X0});let q=I0===null||I0===void 0?void 0:I0.then;if(typeof q==="function"){let c,B0=D(q,I0,(R)=>{if(R!=null)throw new v("nully","body",R)},(R)=>{V(c,R)});return c=new u({objectMode:!0,readable:!1,write:Y0,final(R){S(async()=>{try{await B0,h.nextTick(R,null)}catch(U0){h.nextTick(R,U0)}})},destroy:X0})}throw new v("Iterable, AsyncIterable or AsyncFunction",p,I0)}if(H0(M))return L(M.arrayBuffer());if(Z(M))return a(u,M,{objectMode:!0,writable:!1});if(G(M===null||M===void 0?void 0:M.readable)&&O(M===null||M===void 0?void 0:M.writable))return u.fromWeb(M);if(typeof(M===null||M===void 0?void 0:M.writable)==="object"||typeof(M===null||M===void 0?void 0:M.readable)==="object"){let I0=M!==null&&M!==void 0&&M.readable?H(M===null||M===void 0?void 0:M.readable)?M===null||M===void 0?void 0:M.readable:L(M.readable):void 0,Y0=M!==null&&M!==void 0&&M.writable?K(M===null||M===void 0?void 0:M.writable)?M===null||M===void 0?void 0:M.writable:L(M.writable):void 0;return E({readable:I0,writable:Y0})}let e=M===null||M===void 0?void 0:M.then;if(typeof e==="function"){let I0;return D(e,M,(Y0)=>{if(Y0!=null)I0.push(Y0);I0.push(null)},(Y0)=>{V(I0,Y0)}),I0=new u({objectMode:!0,writable:!1,read(){}})}throw new t(p,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],M)};function A(L){let{promise:M,resolve:p}=T(),e=new s,I0=e.signal;return{value:L(async function*(){while(!0){let Y0=M;M=null;let{chunk:S,done:X0,cb:q}=await Y0;if(h.nextTick(q),X0)return;if(I0.aborted)throw new l(void 0,{cause:I0.reason});({promise:M,resolve:p}=T()),yield S}}(),{signal:I0}),write(Y0,S,X0){let q=p;p=null,q({chunk:Y0,done:!1,cb:X0})},final(Y0){let S=p;p=null,S({done:!0,cb:Y0})},destroy(Y0,S){e.abort(),S(Y0)}}}function E(L){let M=L.readable&&typeof L.readable.read!=="function"?C.wrap(L.readable):L.readable,p=L.writable,e=!!I(M),I0=!!X(p),Y0,S,X0,q,c;function B0(R){let U0=q;if(q=null,U0)U0(R);else if(R)c.destroy(R)}if(c=new u({readableObjectMode:!!(M!==null&&M!==void 0&&M.readableObjectMode),writableObjectMode:!!(p!==null&&p!==void 0&&p.writableObjectMode),readable:e,writable:I0}),I0)x(p,(R)=>{if(I0=!1,R)V(M,R);B0(R)}),c._write=function(R,U0,Q0){if(p.write(R,U0))Q0();else Y0=Q0},c._final=function(R){p.end(),S=R},p.on("drain",function(){if(Y0){let R=Y0;Y0=null,R()}}),p.on("finish",function(){if(S){let R=S;S=null,R()}});if(e)x(M,(R)=>{if(e=!1,R)V(M,R);B0(R)}),M.on("readable",function(){if(X0){let R=X0;X0=null,R()}}),M.on("end",function(){c.push(null)}),c._read=function(){while(!0){let R=M.read();if(R===null){X0=c._read;return}if(!c.push(R))return}};return c._destroy=function(R,U0){if(!R&&q!==null)R=new l;if(X0=null,Y0=null,S=null,q===null)U0(R);else q=U0,V(p,R),V(M,R)},c}}),d0=z0((w,B)=>{var{ObjectDefineProperties:h,ObjectGetOwnPropertyDescriptor:U,ObjectKeys:I,ObjectSetPrototypeOf:X}=N0();B.exports=H;var Z=_2(),Y=B1();X(H.prototype,Z.prototype),X(H,Z);{let O=I(Y.prototype);for(let x=0;x<O.length;x++){let l=O[x];if(!H.prototype[l])H.prototype[l]=Y.prototype[l]}}function H(O){if(!(this instanceof H))return new H(O);if(Z.call(this,O),Y.call(this,O),O){if(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(O.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}h(H.prototype,{writable:{__proto__:null,...U(Y.prototype,"writable")},writableHighWaterMark:{__proto__:null,...U(Y.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...U(Y.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...U(Y.prototype,"writableBuffer")},writableLength:{__proto__:null,...U(Y.prototype,"writableLength")},writableFinished:{__proto__:null,...U(Y.prototype,"writableFinished")},writableCorked:{__proto__:null,...U(Y.prototype,"writableCorked")},writableEnded:{__proto__:null,...U(Y.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...U(Y.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(O){if(this._readableState&&this._writableState)this._readableState.destroyed=O,this._writableState.destroyed=O}}});var K;function N(){if(K===void 0)K={};return K}H.fromWeb=function(O,x){return N().newStreamDuplexFromReadableWritablePair(O,x)},H.toWeb=function(O){return N().newReadableWritablePairFromDuplex(O)};var G;H.from=function(O){if(!G)G=g8();return G(O,"body")}}),H6=z0((w,B)=>{var{ObjectSetPrototypeOf:h,Symbol:U}=N0();B.exports=H;var{ERR_METHOD_NOT_IMPLEMENTED:I}=L0().codes,X=d0(),{getHighWaterMark:Z}=T2();h(H.prototype,X.prototype),h(H,X);var Y=U("kCallback");function H(G){if(!(this instanceof H))return new H(G);let O=G?Z(this,G,"readableHighWaterMark",!0):null;if(O===0)G={...G,highWaterMark:null,readableHighWaterMark:O,writableHighWaterMark:G.writableHighWaterMark||0};if(X.call(this,G),this._readableState.sync=!1,this[Y]=null,G){if(typeof G.transform==="function")this._transform=G.transform;if(typeof G.flush==="function")this._flush=G.flush}this.on("prefinish",N)}function K(G){if(typeof this._flush==="function"&&!this.destroyed)this._flush((O,x)=>{if(O){if(G)G(O);else this.destroy(O);return}if(x!=null)this.push(x);if(this.push(null),G)G()});else if(this.push(null),G)G()}function N(){if(this._final!==K)K.call(this)}H.prototype._final=K,H.prototype._transform=function(G,O,x){throw new I("_transform()")},H.prototype._write=function(G,O,x){let l=this._readableState,t=this._writableState,v=l.length;this._transform(G,O,(V,J)=>{if(V){x(V);return}if(J!=null)this.push(J);if(t.ended||v===l.length||l.length<l.highWaterMark)x();else this[Y]=x})},H.prototype._read=function(){if(this[Y]){let G=this[Y];this[Y]=null,G()}}}),z6=z0((w,B)=>{var{ObjectSetPrototypeOf:h}=N0();B.exports=I;var U=H6();h(I.prototype,U.prototype),h(I,U);function I(X){if(!(this instanceof I))return new I(X);U.call(this,X)}I.prototype._transform=function(X,Z,Y){Y(null,X)}}),h1=z0((w,B)=>{var h=X2(),{ArrayIsArray:U,Promise:I,SymbolAsyncIterator:X,SymbolDispose:Z}=N0(),Y=a0(),{once:H}=D0(),K=q2(),N=d0(),{aggregateTwoErrors:G,codes:{ERR_INVALID_ARG_TYPE:O,ERR_INVALID_RETURN_VALUE:x,ERR_MISSING_ARGS:l,ERR_STREAM_DESTROYED:t,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:V}=L0(),{validateFunction:J,validateAbortSignal:C}=V2(),{isIterable:j,isReadable:T,isReadableNodeStream:a,isNodeStream:h0,isTransformStream:H0,isWebStream:s,isReadableStream:D,isReadableFinished:u}=l0(),A=globalThis.AbortController||E2().AbortController,E,L,M;function p(R,U0,Q0){let q0=!1;R.on("close",()=>{q0=!0});let K0=Y(R,{readable:U0,writable:Q0},(k)=>{q0=!k});return{destroy:(k)=>{if(q0)return;q0=!0,K.destroyer(R,k||new t("pipe"))},cleanup:K0}}function e(R){return J(R[R.length-1],"streams[stream.length - 1]"),R.pop()}function I0(R){if(j(R))return R;else if(a(R))return Y0(R);throw new O("val",["Readable","Iterable","AsyncIterable"],R)}async function*Y0(R){if(!L)L=_2();yield*L.prototype[X].call(R)}async function S(R,U0,Q0,{end:q0}){let K0,k=null,y=(F0)=>{if(F0)K0=F0;if(k){let z=k;k=null,z()}},o=()=>new I((F0,z)=>{if(K0)z(K0);else k=()=>{if(K0)z(K0);else F0()}});U0.on("drain",y);let J0=Y(U0,{readable:!1},y);try{if(U0.writableNeedDrain)await o();for await(let F0 of R)if(!U0.write(F0))await o();if(q0)U0.end(),await o();Q0()}catch(F0){Q0(K0!==F0?G(K0,F0):F0)}finally{J0(),U0.off("drain",y)}}async function X0(R,U0,Q0,{end:q0}){if(H0(U0))U0=U0.writable;let K0=U0.getWriter();try{for await(let k of R)await K0.ready,K0.write(k).catch(()=>{});if(await K0.ready,q0)await K0.close();Q0()}catch(k){try{await K0.abort(k),Q0(k)}catch(y){Q0(y)}}}function q(...R){return c(R,H(e(R)))}function c(R,U0,Q0){if(R.length===1&&U(R[0]))R=R[0];if(R.length<2)throw new l("streams");let q0=new A,K0=q0.signal,k=Q0===null||Q0===void 0?void 0:Q0.signal,y=[];C(k,"options.signal");function o(){m(new V)}M=M||D0().addAbortListener;let J0;if(k)J0=M(k,o);let F0,z,W=[],P=0;function i(g){m(g,--P===0)}function m(g,Z0){var P0;if(g&&(!F0||F0.code==="ERR_STREAM_PREMATURE_CLOSE"))F0=g;if(!F0&&!Z0)return;while(W.length)W.shift()(F0);if((P0=J0)===null||P0===void 0||P0[Z](),q0.abort(),Z0){if(!F0)y.forEach((C0)=>C0());h.nextTick(U0,F0,z)}}let b;for(let g=0;g<R.length;g++){let Z0=R[g],P0=g<R.length-1,C0=g>0,M0=P0||(Q0===null||Q0===void 0?void 0:Q0.end)!==!1,t0=g===R.length-1;if(h0(Z0)){let V0=function(O0){if(O0&&O0.name!=="AbortError"&&O0.code!=="ERR_STREAM_PREMATURE_CLOSE")i(O0)};var $=V0;if(M0){let{destroy:O0,cleanup:Q2}=p(Z0,P0,C0);if(W.push(O0),T(Z0)&&t0)y.push(Q2)}if(Z0.on("error",V0),T(Z0)&&t0)y.push(()=>{Z0.removeListener("error",V0)})}if(g===0)if(typeof Z0==="function"){if(b=Z0({signal:K0}),!j(b))throw new x("Iterable, AsyncIterable or Stream","source",b)}else if(j(Z0)||a(Z0)||H0(Z0))b=Z0;else b=N.from(Z0);else if(typeof Z0==="function"){if(H0(b)){var f;b=I0((f=b)===null||f===void 0?void 0:f.readable)}else b=I0(b);if(b=Z0(b,{signal:K0}),P0){if(!j(b,!0))throw new x("AsyncIterable",`transform[${g-1}]`,b)}else{var r;if(!E)E=z6();let V0=new E({objectMode:!0}),O0=(r=b)===null||r===void 0?void 0:r.then;if(typeof O0==="function")P++,O0.call(b,(S0)=>{if(z=S0,S0!=null)V0.write(S0);if(M0)V0.end();h.nextTick(i)},(S0)=>{V0.destroy(S0),h.nextTick(i,S0)});else if(j(b,!0))P++,S(b,V0,i,{end:M0});else if(D(b)||H0(b)){let S0=b.readable||b;P++,S(S0,V0,i,{end:M0})}else throw new x("AsyncIterable or Promise","destination",b);b=V0;let{destroy:Q2,cleanup:F2}=p(b,!1,!0);if(W.push(Q2),t0)y.push(F2)}}else if(h0(Z0)){if(a(b)){P+=2;let V0=B0(b,Z0,i,{end:M0});if(T(Z0)&&t0)y.push(V0)}else if(H0(b)||D(b)){let V0=b.readable||b;P++,S(V0,Z0,i,{end:M0})}else if(j(b))P++,S(b,Z0,i,{end:M0});else throw new O("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=Z0}else if(s(Z0)){if(a(b))P++,X0(I0(b),Z0,i,{end:M0});else if(D(b)||j(b))P++,X0(b,Z0,i,{end:M0});else if(H0(b))P++,X0(b.readable,Z0,i,{end:M0});else throw new O("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=Z0}else b=N.from(Z0)}if(K0!==null&&K0!==void 0&&K0.aborted||k!==null&&k!==void 0&&k.aborted)h.nextTick(o);return b}function B0(R,U0,Q0,{end:q0}){let K0=!1;if(U0.on("close",()=>{if(!K0)Q0(new v)}),R.pipe(U0,{end:!1}),q0){let y=function(){K0=!0,U0.end()};var k=y;if(u(R))h.nextTick(y);else R.once("end",y)}else Q0();return Y(R,{readable:!0,writable:!1},(y)=>{let o=R._readableState;if(y&&y.code==="ERR_STREAM_PREMATURE_CLOSE"&&o&&o.ended&&!o.errored&&!o.errorEmitted)R.once("end",Q0).once("error",Q0);else Q0(y)}),Y(U0,{readable:!1,writable:!0},Q0)}B.exports={pipelineImpl:c,pipeline:q}}),$6=z0((w,B)=>{var{pipeline:h}=h1(),U=d0(),{destroyer:I}=q2(),{isNodeStream:X,isReadable:Z,isWritable:Y,isWebStream:H,isTransformStream:K,isWritableStream:N,isReadableStream:G}=l0(),{AbortError:O,codes:{ERR_INVALID_ARG_VALUE:x,ERR_MISSING_ARGS:l}}=L0(),t=a0();B.exports=function(...V){if(V.length===0)throw new l("streams");if(V.length===1)return U.from(V[0]);let J=[...V];if(typeof V[0]==="function")V[0]=U.from(V[0]);if(typeof V[V.length-1]==="function"){let E=V.length-1;V[E]=U.from(V[E])}for(let E=0;E<V.length;++E){if(!X(V[E])&&!H(V[E]))continue;if(E<V.length-1&&!(Z(V[E])||G(V[E])||K(V[E])))throw new x(`streams[${E}]`,J[E],"must be readable");if(E>0&&!(Y(V[E])||N(V[E])||K(V[E])))throw new x(`streams[${E}]`,J[E],"must be writable")}let C,j,T,a,h0;function H0(E){let L=a;if(a=null,L)L(E);else if(E)h0.destroy(E);else if(!A&&!u)h0.destroy()}let s=V[0],D=h(V,H0),u=!!(Y(s)||N(s)||K(s)),A=!!(Z(D)||G(D)||K(D));if(h0=new U({writableObjectMode:!!(s!==null&&s!==void 0&&s.writableObjectMode),readableObjectMode:!!(D!==null&&D!==void 0&&D.readableObjectMode),writable:u,readable:A}),u){if(X(s))h0._write=function(L,M,p){if(s.write(L,M))p();else C=p},h0._final=function(L){s.end(),j=L},s.on("drain",function(){if(C){let L=C;C=null,L()}});else if(H(s)){let L=(K(s)?s.writable:s).getWriter();h0._write=async function(M,p,e){try{await L.ready,L.write(M).catch(()=>{}),e()}catch(I0){e(I0)}},h0._final=async function(M){try{await L.ready,L.close().catch(()=>{}),j=M}catch(p){M(p)}}}let E=K(D)?D.readable:D;t(E,()=>{if(j){let L=j;j=null,L()}})}if(A){if(X(D))D.on("readable",function(){if(T){let E=T;T=null,E()}}),D.on("end",function(){h0.push(null)}),h0._read=function(){while(!0){let E=D.read();if(E===null){T=h0._read;return}if(!h0.push(E))return}};else if(H(D)){let E=(K(D)?D.readable:D).getReader();h0._read=async function(){while(!0)try{let{value:L,done:M}=await E.read();if(!h0.push(L))return;if(M){h0.push(null);return}}catch{return}}}}return h0._destroy=function(E,L){if(!E&&a!==null)E=new O;if(T=null,C=null,j=null,a===null)L(E);else if(a=L,X(D))I(D,E)},h0}}),p8=z0((w,B)=>{var h=globalThis.AbortController||E2().AbortController,{codes:{ERR_INVALID_ARG_VALUE:U,ERR_INVALID_ARG_TYPE:I,ERR_MISSING_ARGS:X,ERR_OUT_OF_RANGE:Z},AbortError:Y}=L0(),{validateAbortSignal:H,validateInteger:K,validateObject:N}=V2(),G=N0().Symbol("kWeak"),O=N0().Symbol("kResistStopPropagation"),{finished:x}=a0(),l=$6(),{addAbortSignalNoValidate:t}=P2(),{isWritable:v,isNodeStream:V}=l0(),{deprecate:J}=D0(),{ArrayPrototypePush:C,Boolean:j,MathFloor:T,Number:a,NumberIsNaN:h0,Promise:H0,PromiseReject:s,PromiseResolve:D,PromisePrototypeThen:u,Symbol:A}=N0(),E=A("kEmpty"),L=A("kEof");function M(k,y){if(y!=null)N(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)H(y.signal,"options.signal");if(V(k)&&!v(k))throw new U("stream",k,"must be writable");let o=l(this,k);if(y!==null&&y!==void 0&&y.signal)t(y.signal,o);return o}function p(k,y){if(typeof k!=="function")throw new I("fn",["Function","AsyncFunction"],k);if(y!=null)N(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)H(y.signal,"options.signal");let o=1;if((y===null||y===void 0?void 0:y.concurrency)!=null)o=T(y.concurrency);let J0=o-1;if((y===null||y===void 0?void 0:y.highWaterMark)!=null)J0=T(y.highWaterMark);return K(o,"options.concurrency",1),K(J0,"options.highWaterMark",0),J0+=o,async function*(){let z=D0().AbortSignalAny([y===null||y===void 0?void 0:y.signal].filter(j)),W=this,P=[],i={signal:z},m,b,$=!1,f=0;function r(){$=!0,g()}function g(){f-=1,Z0()}function Z0(){if(b&&!$&&f<o&&P.length<J0)b(),b=null}async function P0(){try{for await(let C0 of W){if($)return;if(z.aborted)throw new Y;try{if(C0=k(C0,i),C0===E)continue;C0=D(C0)}catch(M0){C0=s(M0)}if(f+=1,u(C0,g,r),P.push(C0),m)m(),m=null;if(!$&&(P.length>=J0||f>=o))await new H0((M0)=>{b=M0})}P.push(L)}catch(C0){let M0=s(C0);u(M0,g,r),P.push(M0)}finally{if($=!0,m)m(),m=null}}P0();try{while(!0){while(P.length>0){let C0=await P[0];if(C0===L)return;if(z.aborted)throw new Y;if(C0!==E)yield C0;P.shift(),Z0()}await new H0((C0)=>{m=C0})}}finally{if($=!0,b)b(),b=null}}.call(this)}function e(k=void 0){if(k!=null)N(k,"options");if((k===null||k===void 0?void 0:k.signal)!=null)H(k.signal,"options.signal");return async function*(){let o=0;for await(let F0 of this){var J0;if(k!==null&&k!==void 0&&(J0=k.signal)!==null&&J0!==void 0&&J0.aborted)throw new Y({cause:k.signal.reason});yield[o++,F0]}}.call(this)}async function I0(k,y=void 0){for await(let o of q.call(this,k,y))return!0;return!1}async function Y0(k,y=void 0){if(typeof k!=="function")throw new I("fn",["Function","AsyncFunction"],k);return!await I0.call(this,async(...o)=>{return!await k(...o)},y)}async function S(k,y){for await(let o of q.call(this,k,y))return o;return}async function X0(k,y){if(typeof k!=="function")throw new I("fn",["Function","AsyncFunction"],k);async function o(J0,F0){return await k(J0,F0),E}for await(let J0 of p.call(this,o,y));}function q(k,y){if(typeof k!=="function")throw new I("fn",["Function","AsyncFunction"],k);async function o(J0,F0){if(await k(J0,F0))return J0;return E}return p.call(this,o,y)}class c extends X{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function B0(k,y,o){var J0;if(typeof k!=="function")throw new I("reducer",["Function","AsyncFunction"],k);if(o!=null)N(o,"options");if((o===null||o===void 0?void 0:o.signal)!=null)H(o.signal,"options.signal");let F0=arguments.length>1;if(o!==null&&o!==void 0&&(J0=o.signal)!==null&&J0!==void 0&&J0.aborted){let m=new Y(void 0,{cause:o.signal.reason});throw this.once("error",()=>{}),await x(this.destroy(m)),m}let z=new h,W=z.signal;if(o!==null&&o!==void 0&&o.signal){let m={once:!0,[G]:this,[O]:!0};o.signal.addEventListener("abort",()=>z.abort(),m)}let P=!1;try{for await(let m of this){var i;if(P=!0,o!==null&&o!==void 0&&(i=o.signal)!==null&&i!==void 0&&i.aborted)throw new Y;if(!F0)y=m,F0=!0;else y=await k(y,m,{signal:W})}if(!P&&!F0)throw new c}finally{z.abort()}return y}async function R(k){if(k!=null)N(k,"options");if((k===null||k===void 0?void 0:k.signal)!=null)H(k.signal,"options.signal");let y=[];for await(let J0 of this){var o;if(k!==null&&k!==void 0&&(o=k.signal)!==null&&o!==void 0&&o.aborted)throw new Y(void 0,{cause:k.signal.reason});C(y,J0)}return y}function U0(k,y){let o=p.call(this,k,y);return async function*(){for await(let F0 of o)yield*F0}.call(this)}function Q0(k){if(k=a(k),h0(k))return 0;if(k<0)throw new Z("number",">= 0",k);return k}function q0(k,y=void 0){if(y!=null)N(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)H(y.signal,"options.signal");return k=Q0(k),async function*(){var J0;if(y!==null&&y!==void 0&&(J0=y.signal)!==null&&J0!==void 0&&J0.aborted)throw new Y;for await(let z of this){var F0;if(y!==null&&y!==void 0&&(F0=y.signal)!==null&&F0!==void 0&&F0.aborted)throw new Y;if(k--<=0)yield z}}.call(this)}function K0(k,y=void 0){if(y!=null)N(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)H(y.signal,"options.signal");return k=Q0(k),async function*(){var J0;if(y!==null&&y!==void 0&&(J0=y.signal)!==null&&J0!==void 0&&J0.aborted)throw new Y;for await(let z of this){var F0;if(y!==null&&y!==void 0&&(F0=y.signal)!==null&&F0!==void 0&&F0.aborted)throw new Y;if(k-- >0)yield z;if(k<=0)return}}.call(this)}B.exports.streamReturningOperators={asIndexedPairs:J(e,"readable.asIndexedPairs will be removed in a future version."),drop:q0,filter:q,flatMap:U0,map:p,take:K0,compose:M},B.exports.promiseReturningOperators={every:Y0,forEach:X0,reduce:B0,toArray:R,some:I0,find:S}}),G6=z0((w,B)=>{var{ArrayPrototypePop:h,Promise:U}=N0(),{isIterable:I,isNodeStream:X,isWebStream:Z}=l0(),{pipelineImpl:Y}=h1(),{finished:H}=a0();N6();function K(...N){return new U((G,O)=>{let x,l,t=N[N.length-1];if(t&&typeof t==="object"&&!X(t)&&!I(t)&&!Z(t)){let v=h(N);x=v.signal,l=v.end}Y(N,(v,V)=>{if(v)O(v);else G(V)},{signal:x,end:l})})}B.exports={finished:H,pipeline:K}}),N6=z0((w,B)=>{var{Buffer:h}=(i0(),_0(b0)),{ObjectDefineProperty:U,ObjectKeys:I,ReflectApply:X}=N0(),{promisify:{custom:Z}}=D0(),{streamReturningOperators:Y,promiseReturningOperators:H}=p8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:K}}=L0(),N=$6(),{setDefaultHighWaterMark:G,getDefaultHighWaterMark:O}=T2(),{pipeline:x}=h1(),{destroyer:l}=q2(),t=a0(),v=G6(),V=l0(),J=B.exports=e2().Stream;J.isDestroyed=V.isDestroyed,J.isDisturbed=V.isDisturbed,J.isErrored=V.isErrored,J.isReadable=V.isReadable,J.isWritable=V.isWritable,J.Readable=_2();for(let j of I(Y)){let T=function(...h0){if(new.target)throw K();return J.Readable.from(X(a,this,h0))},a=Y[j];U(T,"name",{__proto__:null,value:a.name}),U(T,"length",{__proto__:null,value:a.length}),U(J.Readable.prototype,j,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}for(let j of I(H)){let T=function(...h0){if(new.target)throw K();return X(a,this,h0)},a=H[j];U(T,"name",{__proto__:null,value:a.name}),U(T,"length",{__proto__:null,value:a.length}),U(J.Readable.prototype,j,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}J.Writable=B1(),J.Duplex=d0(),J.Transform=H6(),J.PassThrough=z6(),J.pipeline=x;var{addAbortSignal:C}=P2();J.addAbortSignal=C,J.finished=t,J.destroy=l,J.compose=N,J.setDefaultHighWaterMark=G,J.getDefaultHighWaterMark=O,U(J,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return v}}),U(x,Z,{__proto__:null,enumerable:!0,get(){return v.pipeline}}),U(t,Z,{__proto__:null,enumerable:!0,get(){return v.finished}}),J.Stream=J,J._isUint8Array=function(T){return T instanceof Uint8Array},J._uint8ArrayToBuffer=function(T){return h.from(T.buffer,T.byteOffset,T.byteLength)}}),b8=z0((w,B)=>{var h=w1();{let U=N6(),I=G6(),X=U.Readable.destroy;B.exports=U.Readable,B.exports._uint8ArrayToBuffer=U._uint8ArrayToBuffer,B.exports._isUint8Array=U._isUint8Array,B.exports.isDisturbed=U.isDisturbed,B.exports.isErrored=U.isErrored,B.exports.isReadable=U.isReadable,B.exports.Readable=U.Readable,B.exports.Writable=U.Writable,B.exports.Duplex=U.Duplex,B.exports.Transform=U.Transform,B.exports.PassThrough=U.PassThrough,B.exports.addAbortSignal=U.addAbortSignal,B.exports.finished=U.finished,B.exports.destroy=U.destroy,B.exports.destroy=X,B.exports.pipeline=U.pipeline,B.exports.compose=U.compose,Object.defineProperty(U,"promises",{configurable:!0,enumerable:!0,get(){return I}}),B.exports.Stream=U.Stream}B.exports.default=B.exports});C6.exports=b8()});import{logger as W0,ModelType as A0}from"@elizaos/core";import{logger as y0}from"@elizaos/core";import{logger as J2}from"@elizaos/core";function G0(w,B,h){return w.getSetting(B)??process.env[B]??h}function m0(){return typeof globalThis<"u"&&typeof globalThis.document<"u"}function j1(w){return m0()&&!!G0(w,"ELIZAOS_CLOUD_BROWSER_BASE_URL")}function v0(w,B=!1){if(m0())return{};let h=B?u6(w):n0(w);return h?{Authorization:`Bearer ${h}`}:{}}function R0(w){let B=G0(w,"ELIZAOS_CLOUD_BROWSER_BASE_URL"),h=m0()&&B?B:G0(w,"ELIZAOS_CLOUD_BASE_URL","https://www.elizacloud.ai/api/v1");return J2.debug(`[ELIZAOS_CLOUD] Default base URL: ${h}`),h}function A1(w){let B=m0()?G0(w,"ELIZAOS_CLOUD_BROWSER_EMBEDDING_URL")||G0(w,"ELIZAOS_CLOUD_BROWSER_BASE_URL"):G0(w,"ELIZAOS_CLOUD_EMBEDDING_URL");if(B)return J2.debug(`[ELIZAOS_CLOUD] Using specific embedding base URL: ${B}`),B;return J2.debug("[ELIZAOS_CLOUD] Falling back to general base URL for embeddings."),R0(w)}function n0(w){return G0(w,"ELIZAOS_CLOUD_API_KEY")}function u6(w){let B=G0(w,"ELIZAOS_CLOUD_EMBEDDING_API_KEY");if(B)return J2.debug("[ELIZAOS_CLOUD] Using specific embedding API key (present)"),B;return J2.debug("[ELIZAOS_CLOUD] Falling back to general API key for embeddings."),n0(w)}function j2(w){return G0(w,"ELIZAOS_CLOUD_SMALL_MODEL")??G0(w,"SMALL_MODEL","gpt-4o-mini")}function A2(w){return G0(w,"ELIZAOS_CLOUD_LARGE_MODEL")??G0(w,"LARGE_MODEL","gpt-4o")}function L1(w){return G0(w,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL","gpt-4o-mini")??"gpt-4o-mini"}function u2(w){let B=G0(w,"ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY","false"),h=String(B).toLowerCase(),U=h==="true";return J2.debug(`[ELIZAOS_CLOUD] Experimental telemetry in function: "${B}" (type: ${typeof B}, normalized: "${h}", result: ${U})`),U}function O1(w,B){new Promise(async(h)=>{h();try{if(!n0(B)&&!m0()){y0.warn("ELIZAOS_CLOUD_API_KEY is not set in environment - ElizaOS Cloud functionality will be limited"),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");return}try{let U=R0(B),I=await fetch(`${U}/models`,{headers:{...v0(B)}});if(!I.ok)y0.warn(`ElizaOS Cloud API key validation failed: ${I.statusText}`),y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided"),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");else y0.log("ElizaOS Cloud API key validated successfully")}catch(U){let I=U instanceof Error?U.message:String(U);y0.warn(`Error validating ElizaOS Cloud API key: ${I}`),y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided")}}catch(U){let I=U?.errors?.map((X)=>X.message).join(", ")||(U instanceof Error?U.message:String(U));y0.warn(`ElizaOS Cloud plugin configuration issue: ${I} - You need to configure the ELIZAOS_CLOUD_API_KEY in your environment variables`),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys")}})}import{logger as L2,ModelType as x1}from"@elizaos/core";import{generateText as D1}from"ai";import{createOpenAI as v6}from"@ai-sdk/openai";function $2(w){let B=R0(w),h=n0(w)??(j1(w)?"eliza-proxy":void 0);return v6({apiKey:h??"",baseURL:B})}import{EventType as g6}from"@elizaos/core";function g0(w,B,h,U){w.emitEvent(g6.MODEL_USED,{provider:"openai",type:B,prompt:h,tokens:{prompt:U.inputTokens,completion:U.outputTokens,total:U.totalTokens}})}async function v2(w,{prompt:B,stopSequences:h=[],maxTokens:U=8192,temperature:I=0.7,frequencyPenalty:X=0.7,presencePenalty:Z=0.7}){let Y=$2(w),H=j2(w),K=u2(w);L2.log(`[ELIZAOS_CLOUD] Using TEXT_SMALL model: ${H}`),L2.log(B);let{text:N,usage:G}=await D1({model:Y.languageModel(H),prompt:B,system:w.character.system??void 0,temperature:I,maxOutputTokens:U,frequencyPenalty:X,presencePenalty:Z,stopSequences:h,experimental_telemetry:{isEnabled:K}});if(G)g0(w,x1.TEXT_SMALL,B,G);return N}async function g2(w,{prompt:B,stopSequences:h=[],maxTokens:U=8192,temperature:I=0.7,frequencyPenalty:X=0.7,presencePenalty:Z=0.7}){let Y=$2(w),H=A2(w),K=u2(w);L2.log(`[ELIZAOS_CLOUD] Using TEXT_LARGE model: ${H}`),L2.log(B);let{text:N,usage:G}=await D1({model:Y.languageModel(H),prompt:B,system:w.character.system??void 0,temperature:I,maxOutputTokens:U,frequencyPenalty:X,presencePenalty:Z,stopSequences:h,experimental_telemetry:{isEnabled:K}});if(G)g0(w,x1.TEXT_LARGE,B,G);return N}import{logger as Z2,ModelType as V6}from"@elizaos/core";import{generateObject as d8,JSONParseError as l8}from"ai";import{logger as W6}from"@elizaos/core";import{JSONParseError as i8}from"ai";function U1(){return async({text:w,error:B})=>{try{if(B instanceof i8){let h=w.replace(/```json\n|\n```|```/g,"");return JSON.parse(h),h}return null}catch(h){let U=h instanceof Error?h.message:String(h);return W6.warn(`Failed to repair JSON text: ${U}`),null}}}async function M6(w){try{let{Readable:B}=await Promise.resolve().then(() => f6(w1(),1)),h=w.getReader();return new B({async read(){try{let{done:U,value:I}=await h.read();if(U)this.push(null);else this.push(I)}catch(U){this.destroy(U)}},destroy(U,I){h.cancel().finally(()=>I(U))}})}catch(B){let h=B instanceof Error?B.message:String(B);throw W6.error(`Failed to load node:stream module: ${h}`),Error("Cannot convert stream: node:stream module unavailable. This feature requires a Node.js environment.")}}function E6(w){let h=w.match(/title[:\s]+(.+?)(?:\n|$)/i)?.[1]?.trim()||"Image Analysis",U=w.replace(/title[:\s]+(.+?)(?:\n|$)/i,"").trim();return{title:h,description:U}}async function j6(w,B,h,U){let I=$2(w),X=U(w);Z2.log(`[ELIZAOS_CLOUD] Using ${h} model: ${X}`);let Z=B.temperature??0;if(!!B.schema)Z2.info(`Using ${h} without schema validation (schema provided but output=no-schema)`);try{let{object:H,usage:K}=await d8({model:I.languageModel(X),output:"no-schema",prompt:B.prompt,temperature:Z,experimental_repairText:U1()});if(K)g0(w,h,B.prompt,K);return H}catch(H){if(H instanceof l8){Z2.error(`[generateObject] Failed to parse JSON: ${H.message}`);let N=await U1()({text:H.text,error:H});if(N)try{let G=JSON.parse(N);return Z2.info("[generateObject] Successfully repaired JSON."),G}catch(G){let O=G instanceof Error?G.message:String(G);throw Z2.error(`[generateObject] Failed to parse repaired JSON: ${O}`),G}else throw Z2.error("[generateObject] JSON repair failed."),H}else{let K=H instanceof Error?H.message:String(H);throw Z2.error(`[generateObject] Unknown error: ${K}`),H}}}async function I1(w,B){return j6(w,B,V6.OBJECT_SMALL,j2)}async function X1(w,B){return j6(w,B,V6.OBJECT_LARGE,A2)}import{logger as s0,ModelType as m8,VECTOR_DIMS as A6}from"@elizaos/core";async function Z1(w,B){let h=G0(w,"ELIZAOS_CLOUD_EMBEDDING_MODEL","text-embedding-3-small"),U=Number.parseInt(G0(w,"ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS","1536")||"1536",10);if(!Object.values(A6).includes(U)){let Z=`Invalid embedding dimension: ${U}. Must be one of: ${Object.values(A6).join(", ")}`;throw s0.error(Z),Error(Z)}if(B===null){s0.debug("Creating test embedding for initialization");let Z=Array(U).fill(0);return Z[0]=0.1,Z}let I;if(typeof B==="string")I=B;else if(typeof B==="object"&&B.text)I=B.text;else{s0.warn("Invalid input format for embedding");let Z=Array(U).fill(0);return Z[0]=0.2,Z}if(!I.trim()){s0.warn("Empty text for embedding");let Z=Array(U).fill(0);return Z[0]=0.3,Z}let X=A1(w);try{let Z=await fetch(`${X}/embeddings`,{method:"POST",headers:{...v0(w,!0),"Content-Type":"application/json"},body:JSON.stringify({model:h,input:I})});if(!Z.ok){s0.error(`ElizaOS Cloud API error: ${Z.status} - ${Z.statusText}`);let K=Array(U).fill(0);return K[0]=0.4,K}let Y=await Z.json();if(!Y?.data?.[0]?.embedding){s0.error("API returned invalid structure");let K=Array(U).fill(0);return K[0]=0.5,K}let H=Y.data[0].embedding;if(Y.usage){let K={inputTokens:Y.usage.prompt_tokens,outputTokens:0,totalTokens:Y.usage.total_tokens};g0(w,m8.TEXT_EMBEDDING,I,K)}return s0.log(`Got valid embedding with length ${H.length}`),H}catch(Z){let Y=Z instanceof Error?Z.message:String(Z);s0.error(`Error generating embedding: ${Y}`);let H=Array(U).fill(0);return H[0]=0.6,H}}import{logger as R2,ModelType as n8}from"@elizaos/core";async function Q1(w,B){let h=B.n||1,U=B.size||"1024x1024",I=B.prompt,X="google/gemini-2.5-flash-image-preview";R2.log("[ELIZAOS_CLOUD] Using IMAGE model: google/gemini-2.5-flash-image-preview");let Z=R0(w),H={"1024x1024":"1:1","1792x1024":"16:9","1024x1792":"9:16"}[U]||"1:1";try{let K=await fetch(`${Z}/generate-image`,{method:"POST",headers:{...v0(w),"Content-Type":"application/json"},body:JSON.stringify({prompt:I,numImages:h,aspectRatio:H})});if(!K.ok){let O=await K.text();throw Error(`Failed to generate image: ${K.status} ${O}`)}return(await K.json()).images.map((O)=>({url:O.url||O.image}))}catch(K){let N=K instanceof Error?K.message:String(K);throw R2.error(`[ELIZAOS_CLOUD] Image generation error: ${N}`),K}}async function F1(w,B){let h,U,I=L1(w);R2.log(`[ELIZAOS_CLOUD] Using IMAGE_DESCRIPTION model: ${I}`);let X=Number.parseInt(G0(w,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS","8192")||"8192",10);if(typeof B==="string")h=B,U="Please analyze this image and provide a title and detailed description.";else h=B.imageUrl,U=B.prompt||"Please analyze this image and provide a title and detailed description.";let Z=[{role:"user",content:[{type:"text",text:U},{type:"image_url",image_url:{url:h}}]}],Y=R0(w);try{let H={model:I,messages:Z,max_tokens:X},K=await fetch(`${Y}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",...v0(w)},body:JSON.stringify(H)});if(!K.ok)throw Error(`ElizaOS Cloud API error: ${K.status}`);let G=await K.json(),O=G.choices?.[0]?.message?.content;if(G.usage)g0(w,n8.IMAGE_DESCRIPTION,typeof B==="string"?B:B.prompt||"",{inputTokens:G.usage.prompt_tokens,outputTokens:G.usage.completion_tokens,totalTokens:G.usage.total_tokens});if(!O)return{title:"Failed to analyze image",description:"No response from API"};if(typeof B==="object"&&B.prompt&&B.prompt!=="Please analyze this image and provide a title and detailed description.")return O;return E6(O)}catch(H){let K=H instanceof Error?H.message:String(H);return R2.error(`Error analyzing image: ${K}`),{title:"Failed to analyze image",description:`Error: ${K}`}}}import{logger as S4}from"@elizaos/core";async function J1(w,B){let h=G0(w,"ELIZAOS_CLOUD_TTS_MODEL","gpt-4o-mini-tts"),U=G0(w,"ELIZAOS_CLOUD_TTS_VOICE","nova"),I=G0(w,"ELIZAOS_CLOUD_TTS_INSTRUCTIONS",""),X=R0(w),Z=B.model||h,Y=B.voice||U,H=B.instructions??I,K=B.format||"mp3";try{let N=await fetch(`${X}/audio/speech`,{method:"POST",headers:{...v0(w),"Content-Type":"application/json",...K==="mp3"?{Accept:"audio/mpeg"}:{}},body:JSON.stringify({model:Z,voice:Y,input:B.text,format:K,...H&&{instructions:H}})});if(!N.ok){let G=await N.text();throw Error(`ElizaOS Cloud TTS error ${N.status}: ${G}`)}if(!N.body)throw Error("ElizaOS Cloud TTS response body is null");if(!m0())return await M6(N.body);return N.body}catch(N){let G=N instanceof Error?N.message:String(N);throw Error(`Failed to fetch speech from ElizaOS Cloud TTS: ${G}`)}}var o8={name:"elizaOSCloud",description:"ElizaOS Cloud plugin - Multi-model AI generation with text, image, and video support",config:{ELIZAOS_CLOUD_API_KEY:process.env.ELIZAOS_CLOUD_API_KEY,ELIZAOS_CLOUD_BASE_URL:process.env.ELIZAOS_CLOUD_BASE_URL,ELIZAOS_CLOUD_SMALL_MODEL:process.env.ELIZAOS_CLOUD_SMALL_MODEL,ELIZAOS_CLOUD_LARGE_MODEL:process.env.ELIZAOS_CLOUD_LARGE_MODEL,SMALL_MODEL:process.env.SMALL_MODEL,LARGE_MODEL:process.env.LARGE_MODEL,ELIZAOS_CLOUD_EMBEDDING_MODEL:process.env.ELIZAOS_CLOUD_EMBEDDING_MODEL,ELIZAOS_CLOUD_EMBEDDING_API_KEY:process.env.ELIZAOS_CLOUD_EMBEDDING_API_KEY,ELIZAOS_CLOUD_EMBEDDING_URL:process.env.ELIZAOS_CLOUD_EMBEDDING_URL,ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS:process.env.ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS,ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY:process.env.ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY},async init(w,B){O1(w,B)},models:{[A0.TEXT_EMBEDDING]:Z1,[A0.TEXT_SMALL]:v2,[A0.TEXT_LARGE]:g2,[A0.IMAGE]:Q1,[A0.IMAGE_DESCRIPTION]:F1,[A0.OBJECT_SMALL]:I1,[A0.OBJECT_LARGE]:X1},tests:[{name:"ELIZAOS_CLOUD_plugin_tests",tests:[{name:"ELIZAOS_CLOUD_test_url_and_api_key_validation",fn:async(w)=>{let B=R0(w),h=await fetch(`${B}/models`,{headers:{Authorization:`Bearer ${n0(w)}`}}),U=await h.json();if(W0.log({data:U?.data?.length??"N/A"},"Models Available"),!h.ok)throw Error(`Failed to validate OpenAI API key: ${h.statusText}`)}},{name:"ELIZAOS_CLOUD_test_text_embedding",fn:async(w)=>{try{let B=await w.useModel(A0.TEXT_EMBEDDING,{text:"Hello, world!"});W0.log({embedding:B},"embedding")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_embedding: ${h}`),B}}},{name:"ELIZAOS_CLOUD_test_text_large",fn:async(w)=>{try{let B=await w.useModel(A0.TEXT_LARGE,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");W0.log({text:B},"generated with test_text_large")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_large: ${h}`),B}}},{name:"ELIZAOS_CLOUD_test_text_small",fn:async(w)=>{try{let B=await w.useModel(A0.TEXT_SMALL,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");W0.log({text:B},"generated with test_text_small")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_small: ${h}`),B}}},{name:"ELIZAOS_CLOUD_test_image_generation",fn:async(w)=>{W0.log("ELIZAOS_CLOUD_test_image_generation");try{let B=await w.useModel(A0.IMAGE,{prompt:"A beautiful sunset over a calm ocean",n:1,size:"1024x1024"});W0.log({image:B},"generated with test_image_generation")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_image_generation: ${h}`),B}}},{name:"image-description",fn:async(w)=>{try{W0.log("ELIZAOS_CLOUD_test_image_description");try{let B=await w.useModel(A0.IMAGE_DESCRIPTION,"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg/537px-Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg");if(B&&typeof B==="object"&&"title"in B&&"description"in B)W0.log({result:B},"Image description");else W0.error("Invalid image description result format:",B)}catch(B){let h=B instanceof Error?B.message:String(B);W0.error(`Error in image description test: ${h}`)}}catch(B){let h=B instanceof Error?B.message:String(B);W0.error(`Error in ELIZAOS_CLOUD_test_image_description: ${h}`)}}},{name:"ELIZAOS_CLOUD_test_transcription",fn:async(w)=>{W0.log("ELIZAOS_CLOUD_test_transcription");try{let h=await(await fetch("https://upload.wikimedia.org/wikipedia/en/4/40/Chris_Benoit_Voice_Message.ogg")).arrayBuffer(),U=await w.useModel(A0.TRANSCRIPTION,Buffer.from(new Uint8Array(h)));W0.log({transcription:U},"generated with test_transcription")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_transcription: ${h}`),B}}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_encode",fn:async(w)=>{let h=await w.useModel(A0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer encode!"});if(!Array.isArray(h)||h.length===0)throw Error("Failed to tokenize text: expected non-empty array of tokens");W0.log({tokens:h},"Tokenized output")}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_decode",fn:async(w)=>{let h=await w.useModel(A0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer decode!"}),U=await w.useModel(A0.TEXT_TOKENIZER_DECODE,{tokens:h});if(U!=="Hello tokenizer decode!")throw Error(`Decoded text does not match original. Expected "Hello tokenizer decode!", got "${U}"`);W0.log({decodedText:U},"Decoded text")}},{name:"ELIZAOS_CLOUD_test_text_to_speech",fn:async(w)=>{try{if(!await J1(w,{text:"Hello, this is a test for text-to-speech."}))throw Error("Failed to generate speech");W0.log("Generated speech successfully")}catch(B){let h=B instanceof Error?B.message:String(B);throw W0.error(`Error in ELIZAOS_CLOUD_test_text_to_speech: ${h}`),B}}}]}]},r8=o8;export{o8 as elizaOSCloudPlugin,r8 as default};
1
+ var S6=Object.create;var{getPrototypeOf:y6,defineProperty:H2,getOwnPropertyNames:W1,getOwnPropertyDescriptor:f6}=Object,M1=Object.prototype.hasOwnProperty;var c6=(h,B,w)=>{w=h!=null?S6(y6(h)):{};let U=B||!h||!h.__esModule?H2(w,"default",{value:h,enumerable:!0}):w;for(let X of W1(h))if(!M1.call(U,X))H2(U,X,{get:()=>h[X],enumerable:!0});return U},C1=new WeakMap,_0=(h)=>{var B=C1.get(h),w;if(B)return B;if(B=H2({},"__esModule",{value:!0}),h&&typeof h==="object"||typeof h==="function")W1(h).map((U)=>!M1.call(B,U)&&H2(B,U,{get:()=>h[U],enumerable:!(w=f6(h,U))||w.enumerable}));return C1.set(h,B),B},u6=(h,B)=>()=>(B||h((B={exports:{}}).exports,B),B.exports);var V1=(h,B)=>{for(var w in B)H2(h,w,{get:B[w],enumerable:!0,configurable:!0,set:(U)=>B[w]=()=>U})};var j1=(h,B)=>()=>(h&&(B=h(h=0)),B);var b0={};V1(b0,{transcode:()=>L8,resolveObjectURL:()=>A8,kStringMaxLength:()=>u1,kMaxLength:()=>G2,isUtf8:()=>O8,isAscii:()=>x8,default:()=>E8,constants:()=>s6,btoa:()=>n6,atob:()=>o6,INSPECT_MAX_BYTES:()=>c1,File:()=>r6,Buffer:()=>P,Blob:()=>a6});function b6(h){var B=h.length;if(B%4>0)throw Error("Invalid string. Length must be a multiple of 4");var w=h.indexOf("=");if(w===-1)w=B;var U=w===B?0:4-w%4;return[w,U]}function i6(h,B){return(h+B)*3/4-B}function d6(h){var B,w=b6(h),U=w[0],X=w[1],Z=new Uint8Array(i6(U,X)),J=0,q=X>0?U-4:U,K;for(K=0;K<q;K+=4)B=k0[h.charCodeAt(K)]<<18|k0[h.charCodeAt(K+1)]<<12|k0[h.charCodeAt(K+2)]<<6|k0[h.charCodeAt(K+3)],Z[J++]=B>>16&255,Z[J++]=B>>8&255,Z[J++]=B&255;if(X===2)B=k0[h.charCodeAt(K)]<<2|k0[h.charCodeAt(K+1)]>>4,Z[J++]=B&255;if(X===1)B=k0[h.charCodeAt(K)]<<10|k0[h.charCodeAt(K+1)]<<4|k0[h.charCodeAt(K+2)]>>2,Z[J++]=B>>8&255,Z[J++]=B&255;return Z}function l6(h){return f0[h>>18&63]+f0[h>>12&63]+f0[h>>6&63]+f0[h&63]}function m6(h,B,w){var U,X=[];for(var Z=B;Z<w;Z+=3)U=(h[Z]<<16&16711680)+(h[Z+1]<<8&65280)+(h[Z+2]&255),X.push(l6(U));return X.join("")}function _1(h){var B,w=h.length,U=w%3,X=[],Z=16383;for(var J=0,q=w-U;J<q;J+=Z)X.push(m6(h,J,J+Z>q?q:J+Z));if(U===1)B=h[w-1],X.push(f0[B>>2]+f0[B<<4&63]+"==");else if(U===2)B=(h[w-2]<<8)+h[w-1],X.push(f0[B>>10]+f0[B>>4&63]+f0[B<<2&63]+"=");return X.join("")}function L2(h,B,w,U,X){var Z,J,q=X*8-U-1,K=(1<<q)-1,H=K>>1,G=-7,M=w?X-1:0,x=w?-1:1,L=h[B+M];M+=x,Z=L&(1<<-G)-1,L>>=-G,G+=q;for(;G>0;Z=Z*256+h[B+M],M+=x,G-=8);J=Z&(1<<-G)-1,Z>>=-G,G+=U;for(;G>0;J=J*256+h[B+M],M+=x,G-=8);if(Z===0)Z=1-H;else if(Z===K)return J?NaN:(L?-1:1)*(1/0);else J=J+Math.pow(2,U),Z=Z-H;return(L?-1:1)*J*Math.pow(2,Z-U)}function f1(h,B,w,U,X,Z){var J,q,K,H=Z*8-X-1,G=(1<<H)-1,M=G>>1,x=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=U?0:Z-1,h0=U?1:-1,s=B<0||B===0&&1/B<0?1:0;if(B=Math.abs(B),isNaN(B)||B===1/0)q=isNaN(B)?1:0,J=G;else{if(J=Math.floor(Math.log(B)/Math.LN2),B*(K=Math.pow(2,-J))<1)J--,K*=2;if(J+M>=1)B+=x/K;else B+=x*Math.pow(2,1-M);if(B*K>=2)J++,K/=2;if(J+M>=G)q=0,J=G;else if(J+M>=1)q=(B*K-1)*Math.pow(2,X),J=J+M;else q=B*Math.pow(2,M-1)*Math.pow(2,X),J=0}for(;X>=8;h[w+L]=q&255,L+=h0,q/=256,X-=8);J=J<<X|q,H+=X;for(;H>0;h[w+L]=J&255,L+=h0,J/=256,H-=8);h[w+L-h0]|=s*128}function p0(h){if(h>G2)throw RangeError('The value "'+h+'" is invalid for option "size"');let B=new Uint8Array(h);return Object.setPrototypeOf(B,P.prototype),B}function m2(h,B,w){return class extends w{constructor(){super();Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${h}]`,this.stack,delete this.name}get code(){return h}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${h}]: ${this.message}`}}}function P(h,B,w){if(typeof h==="number"){if(typeof B==="string")throw TypeError('The "string" argument must be of type string. Received type number');return n2(h)}return v1(h,B,w)}function v1(h,B,w){if(typeof h==="string")return B8(h,B);if(ArrayBuffer.isView(h))return w8(h);if(h==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(c0(h,ArrayBuffer)||h&&c0(h.buffer,ArrayBuffer))return d2(h,B,w);if(typeof SharedArrayBuffer<"u"&&(c0(h,SharedArrayBuffer)||h&&c0(h.buffer,SharedArrayBuffer)))return d2(h,B,w);if(typeof h==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let U=h.valueOf&&h.valueOf();if(U!=null&&U!==h)return P.from(U,B,w);let X=U8(h);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]==="function")return P.from(h[Symbol.toPrimitive]("string"),B,w);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}function g1(h){if(typeof h!=="number")throw TypeError('"size" argument must be of type number');else if(h<0)throw RangeError('The value "'+h+'" is invalid for option "size"')}function h8(h,B,w){if(g1(h),h<=0)return p0(h);if(B!==void 0)return typeof w==="string"?p0(h).fill(B,w):p0(h).fill(B);return p0(h)}function n2(h){return g1(h),p0(h<0?0:o2(h)|0)}function B8(h,B){if(typeof B!=="string"||B==="")B="utf8";if(!P.isEncoding(B))throw TypeError("Unknown encoding: "+B);let w=p1(h,B)|0,U=p0(w),X=U.write(h,B);if(X!==w)U=U.slice(0,X);return U}function i2(h){let B=h.length<0?0:o2(h.length)|0,w=p0(B);for(let U=0;U<B;U+=1)w[U]=h[U]&255;return w}function w8(h){if(c0(h,Uint8Array)){let B=new Uint8Array(h);return d2(B.buffer,B.byteOffset,B.byteLength)}return i2(h)}function d2(h,B,w){if(B<0||h.byteLength<B)throw RangeError('"offset" is outside of buffer bounds');if(h.byteLength<B+(w||0))throw RangeError('"length" is outside of buffer bounds');let U;if(B===void 0&&w===void 0)U=new Uint8Array(h);else if(w===void 0)U=new Uint8Array(h,B);else U=new Uint8Array(h,B,w);return Object.setPrototypeOf(U,P.prototype),U}function U8(h){if(P.isBuffer(h)){let B=o2(h.length)|0,w=p0(B);if(w.length===0)return w;return h.copy(w,0,0,B),w}if(h.length!==void 0){if(typeof h.length!=="number"||Number.isNaN(h.length))return p0(0);return i2(h)}if(h.type==="Buffer"&&Array.isArray(h.data))return i2(h.data)}function o2(h){if(h>=G2)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G2.toString(16)+" bytes");return h|0}function p1(h,B){if(P.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||c0(h,ArrayBuffer))return h.byteLength;if(typeof h!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);let w=h.length,U=arguments.length>2&&arguments[2]===!0;if(!U&&w===0)return 0;let X=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return l2(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return a1(h).length;default:if(X)return U?-1:l2(h).length;B=(""+B).toLowerCase(),X=!0}}function X8(h,B,w){let U=!1;if(B===void 0||B<0)B=0;if(B>this.length)return"";if(w===void 0||w>this.length)w=this.length;if(w<=0)return"";if(w>>>=0,B>>>=0,w<=B)return"";if(!h)h="utf8";while(!0)switch(h){case"hex":return z8(this,B,w);case"utf8":case"utf-8":return i1(this,B,w);case"ascii":return q8(this,B,w);case"latin1":case"binary":return H8(this,B,w);case"base64":return K8(this,B,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $8(this,B,w);default:if(U)throw TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),U=!0}}function w2(h,B,w){let U=h[B];h[B]=h[w],h[w]=U}function b1(h,B,w,U,X){if(h.length===0)return-1;if(typeof w==="string")U=w,w=0;else if(w>2147483647)w=2147483647;else if(w<-2147483648)w=-2147483648;if(w=+w,Number.isNaN(w))w=X?0:h.length-1;if(w<0)w=h.length+w;if(w>=h.length)if(X)return-1;else w=h.length-1;else if(w<0)if(X)w=0;else return-1;if(typeof B==="string")B=P.from(B,U);if(P.isBuffer(B)){if(B.length===0)return-1;return k1(h,B,w,U,X)}else if(typeof B==="number"){if(B=B&255,typeof Uint8Array.prototype.indexOf==="function")if(X)return Uint8Array.prototype.indexOf.call(h,B,w);else return Uint8Array.prototype.lastIndexOf.call(h,B,w);return k1(h,[B],w,U,X)}throw TypeError("val must be string, number or Buffer")}function k1(h,B,w,U,X){let Z=1,J=h.length,q=B.length;if(U!==void 0){if(U=String(U).toLowerCase(),U==="ucs2"||U==="ucs-2"||U==="utf16le"||U==="utf-16le"){if(h.length<2||B.length<2)return-1;Z=2,J/=2,q/=2,w/=2}}function K(G,M){if(Z===1)return G[M];else return G.readUInt16BE(M*Z)}let H;if(X){let G=-1;for(H=w;H<J;H++)if(K(h,H)===K(B,G===-1?0:H-G)){if(G===-1)G=H;if(H-G+1===q)return G*Z}else{if(G!==-1)H-=H-G;G=-1}}else{if(w+q>J)w=J-q;for(H=w;H>=0;H--){let G=!0;for(let M=0;M<q;M++)if(K(h,H+M)!==K(B,M)){G=!1;break}if(G)return H}}return-1}function Z8(h,B,w,U){w=Number(w)||0;let X=h.length-w;if(!U)U=X;else if(U=Number(U),U>X)U=X;let Z=B.length;if(U>Z/2)U=Z/2;let J;for(J=0;J<U;++J){let q=parseInt(B.substr(J*2,2),16);if(Number.isNaN(q))return J;h[w+J]=q}return J}function Q8(h,B,w,U){return E2(l2(B,h.length-w),h,w,U)}function J8(h,B,w,U){return E2(W8(B),h,w,U)}function I8(h,B,w,U){return E2(a1(B),h,w,U)}function F8(h,B,w,U){return E2(M8(B,h.length-w),h,w,U)}function K8(h,B,w){if(B===0&&w===h.length)return _1(h);else return _1(h.slice(B,w))}function i1(h,B,w){w=Math.min(h.length,w);let U=[],X=B;while(X<w){let Z=h[X],J=null,q=Z>239?4:Z>223?3:Z>191?2:1;if(X+q<=w){let K,H,G,M;switch(q){case 1:if(Z<128)J=Z;break;case 2:if(K=h[X+1],(K&192)===128){if(M=(Z&31)<<6|K&63,M>127)J=M}break;case 3:if(K=h[X+1],H=h[X+2],(K&192)===128&&(H&192)===128){if(M=(Z&15)<<12|(K&63)<<6|H&63,M>2047&&(M<55296||M>57343))J=M}break;case 4:if(K=h[X+1],H=h[X+2],G=h[X+3],(K&192)===128&&(H&192)===128&&(G&192)===128){if(M=(Z&15)<<18|(K&63)<<12|(H&63)<<6|G&63,M>65535&&M<1114112)J=M}}}if(J===null)J=65533,q=1;else if(J>65535)J-=65536,U.push(J>>>10&1023|55296),J=56320|J&1023;U.push(J),X+=q}return Y8(U)}function Y8(h){let B=h.length;if(B<=S1)return String.fromCharCode.apply(String,h);let w="",U=0;while(U<B)w+=String.fromCharCode.apply(String,h.slice(U,U+=S1));return w}function q8(h,B,w){let U="";w=Math.min(h.length,w);for(let X=B;X<w;++X)U+=String.fromCharCode(h[X]&127);return U}function H8(h,B,w){let U="";w=Math.min(h.length,w);for(let X=B;X<w;++X)U+=String.fromCharCode(h[X]);return U}function z8(h,B,w){let U=h.length;if(!B||B<0)B=0;if(!w||w<0||w>U)w=U;let X="";for(let Z=B;Z<w;++Z)X+=V8[h[Z]];return X}function $8(h,B,w){let U=h.slice(B,w),X="";for(let Z=0;Z<U.length-1;Z+=2)X+=String.fromCharCode(U[Z]+U[Z+1]*256);return X}function M0(h,B,w){if(h%1!==0||h<0)throw RangeError("offset is not uint");if(h+B>w)throw RangeError("Trying to access beyond buffer length")}function L0(h,B,w,U,X,Z){if(!P.isBuffer(h))throw TypeError('"buffer" argument must be a Buffer instance');if(B>X||B<Z)throw RangeError('"value" argument is out of bounds');if(w+U>h.length)throw RangeError("Index out of range")}function d1(h,B,w,U,X){r1(B,U,X,h,w,7);let Z=Number(B&BigInt(4294967295));h[w++]=Z,Z=Z>>8,h[w++]=Z,Z=Z>>8,h[w++]=Z,Z=Z>>8,h[w++]=Z;let J=Number(B>>BigInt(32)&BigInt(4294967295));return h[w++]=J,J=J>>8,h[w++]=J,J=J>>8,h[w++]=J,J=J>>8,h[w++]=J,w}function l1(h,B,w,U,X){r1(B,U,X,h,w,7);let Z=Number(B&BigInt(4294967295));h[w+7]=Z,Z=Z>>8,h[w+6]=Z,Z=Z>>8,h[w+5]=Z,Z=Z>>8,h[w+4]=Z;let J=Number(B>>BigInt(32)&BigInt(4294967295));return h[w+3]=J,J=J>>8,h[w+2]=J,J=J>>8,h[w+1]=J,J=J>>8,h[w]=J,w+8}function m1(h,B,w,U,X,Z){if(w+U>h.length)throw RangeError("Index out of range");if(w<0)throw RangeError("Index out of range")}function n1(h,B,w,U,X){if(B=+B,w=w>>>0,!X)m1(h,B,w,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return f1(h,B,w,U,23,4),w+4}function o1(h,B,w,U,X){if(B=+B,w=w>>>0,!X)m1(h,B,w,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return f1(h,B,w,U,52,8),w+8}function y1(h){let B="",w=h.length,U=h[0]==="-"?1:0;for(;w>=U+4;w-=3)B=`_${h.slice(w-3,w)}${B}`;return`${h.slice(0,w)}${B}`}function G8(h,B,w){if(F2(B,"offset"),h[B]===void 0||h[B+w]===void 0)N2(B,h.length-(w+1))}function r1(h,B,w,U,X,Z){if(h>w||h<B){let J=typeof B==="bigint"?"n":"",q;if(Z>3)if(B===0||B===BigInt(0))q=`>= 0${J} and < 2${J} ** ${(Z+1)*8}${J}`;else q=`>= -(2${J} ** ${(Z+1)*8-1}${J}) and < 2 ** ${(Z+1)*8-1}${J}`;else q=`>= ${B}${J} and <= ${w}${J}`;throw new b2("value",q,h)}G8(U,X,Z)}function F2(h,B){if(typeof h!=="number")throw new e6(B,"number",h)}function N2(h,B,w){if(Math.floor(h)!==h)throw F2(h,w),new b2(w||"offset","an integer",h);if(B<0)throw new t6;throw new b2(w||"offset",`>= ${w?1:0} and <= ${B}`,h)}function C8(h){if(h=h.split("=")[0],h=h.trim().replace(N8,""),h.length<2)return"";while(h.length%4!==0)h=h+"=";return h}function l2(h,B){B=B||1/0;let w,U=h.length,X=null,Z=[];for(let J=0;J<U;++J){if(w=h.charCodeAt(J),w>55295&&w<57344){if(!X){if(w>56319){if((B-=3)>-1)Z.push(239,191,189);continue}else if(J+1===U){if((B-=3)>-1)Z.push(239,191,189);continue}X=w;continue}if(w<56320){if((B-=3)>-1)Z.push(239,191,189);X=w;continue}w=(X-55296<<10|w-56320)+65536}else if(X){if((B-=3)>-1)Z.push(239,191,189)}if(X=null,w<128){if((B-=1)<0)break;Z.push(w)}else if(w<2048){if((B-=2)<0)break;Z.push(w>>6|192,w&63|128)}else if(w<65536){if((B-=3)<0)break;Z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((B-=4)<0)break;Z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw Error("Invalid code point")}return Z}function W8(h){let B=[];for(let w=0;w<h.length;++w)B.push(h.charCodeAt(w)&255);return B}function M8(h,B){let w,U,X,Z=[];for(let J=0;J<h.length;++J){if((B-=2)<0)break;w=h.charCodeAt(J),U=w>>8,X=w%256,Z.push(X),Z.push(U)}return Z}function a1(h){return d6(C8(h))}function E2(h,B,w,U){let X;for(X=0;X<U;++X){if(X+w>=B.length||X>=h.length)break;B[X+w]=h[X]}return X}function c0(h,B){return h instanceof B||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===B.name}function o0(h){return typeof BigInt>"u"?j8:h}function j8(){throw Error("BigInt not supported")}function r2(h){return()=>{throw Error(h+" is not implemented for node:buffer browser polyfill")}}var f0,k0,p2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B2,T1,R1,c1=50,G2=2147483647,u1=536870888,n6,o6,r6,a6,s6,t6,e6,b2,S1=4096,N8,V8,A8,O8,x8=(h)=>{for(let B of h)if(B.charCodeAt(0)>127)return!1;return!0},L8,E8;var i0=j1(()=>{f0=[],k0=[];for(B2=0,T1=p2.length;B2<T1;++B2)f0[B2]=p2[B2],k0[p2.charCodeAt(B2)]=B2;k0[45]=62;k0[95]=63;R1=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,n6=globalThis.btoa,o6=globalThis.atob,r6=globalThis.File,a6=globalThis.Blob,s6={MAX_LENGTH:G2,MAX_STRING_LENGTH:u1};t6=m2("ERR_BUFFER_OUT_OF_BOUNDS",function(h){if(h)return`${h} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),e6=m2("ERR_INVALID_ARG_TYPE",function(h,B){return`The "${h}" argument must be of type number. Received type ${typeof B}`},TypeError),b2=m2("ERR_OUT_OF_RANGE",function(h,B,w){let U=`The value of "${h}" is out of range.`,X=w;if(Number.isInteger(w)&&Math.abs(w)>4294967296)X=y1(String(w));else if(typeof w==="bigint"){if(X=String(w),w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))X=y1(X);X+="n"}return U+=` It must be ${B}. Received ${X}`,U},RangeError);Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(!P.isBuffer(this))return;return this.buffer}});Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(!P.isBuffer(this))return;return this.byteOffset}});P.poolSize=8192;P.from=function(h,B,w){return v1(h,B,w)};Object.setPrototypeOf(P.prototype,Uint8Array.prototype);Object.setPrototypeOf(P,Uint8Array);P.alloc=function(h,B,w){return h8(h,B,w)};P.allocUnsafe=function(h){return n2(h)};P.allocUnsafeSlow=function(h){return n2(h)};P.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==P.prototype};P.compare=function(h,B){if(c0(h,Uint8Array))h=P.from(h,h.offset,h.byteLength);if(c0(B,Uint8Array))B=P.from(B,B.offset,B.byteLength);if(!P.isBuffer(h)||!P.isBuffer(B))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===B)return 0;let w=h.length,U=B.length;for(let X=0,Z=Math.min(w,U);X<Z;++X)if(h[X]!==B[X]){w=h[X],U=B[X];break}if(w<U)return-1;if(U<w)return 1;return 0};P.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};P.concat=function(h,B){if(!Array.isArray(h))throw TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return P.alloc(0);let w;if(B===void 0){B=0;for(w=0;w<h.length;++w)B+=h[w].length}let U=P.allocUnsafe(B),X=0;for(w=0;w<h.length;++w){let Z=h[w];if(c0(Z,Uint8Array))if(X+Z.length>U.length){if(!P.isBuffer(Z))Z=P.from(Z);Z.copy(U,X)}else Uint8Array.prototype.set.call(U,Z,X);else if(!P.isBuffer(Z))throw TypeError('"list" argument must be an Array of Buffers');else Z.copy(U,X);X+=Z.length}return U};P.byteLength=p1;P.prototype._isBuffer=!0;P.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;B<h;B+=2)w2(this,B,B+1);return this};P.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let B=0;B<h;B+=4)w2(this,B,B+3),w2(this,B+1,B+2);return this};P.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let B=0;B<h;B+=8)w2(this,B,B+7),w2(this,B+1,B+6),w2(this,B+2,B+5),w2(this,B+3,B+4);return this};P.prototype.toString=function(){let h=this.length;if(h===0)return"";if(arguments.length===0)return i1(this,0,h);return X8.apply(this,arguments)};P.prototype.toLocaleString=P.prototype.toString;P.prototype.equals=function(h){if(!P.isBuffer(h))throw TypeError("Argument must be a Buffer");if(this===h)return!0;return P.compare(this,h)===0};P.prototype.inspect=function(){let h="",B=c1;if(h=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B)h+=" ... ";return"<Buffer "+h+">"};if(R1)P.prototype[R1]=P.prototype.inspect;P.prototype.compare=function(h,B,w,U,X){if(c0(h,Uint8Array))h=P.from(h,h.offset,h.byteLength);if(!P.isBuffer(h))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(B===void 0)B=0;if(w===void 0)w=h?h.length:0;if(U===void 0)U=0;if(X===void 0)X=this.length;if(B<0||w>h.length||U<0||X>this.length)throw RangeError("out of range index");if(U>=X&&B>=w)return 0;if(U>=X)return-1;if(B>=w)return 1;if(B>>>=0,w>>>=0,U>>>=0,X>>>=0,this===h)return 0;let Z=X-U,J=w-B,q=Math.min(Z,J),K=this.slice(U,X),H=h.slice(B,w);for(let G=0;G<q;++G)if(K[G]!==H[G]){Z=K[G],J=H[G];break}if(Z<J)return-1;if(J<Z)return 1;return 0};P.prototype.includes=function(h,B,w){return this.indexOf(h,B,w)!==-1};P.prototype.indexOf=function(h,B,w){return b1(this,h,B,w,!0)};P.prototype.lastIndexOf=function(h,B,w){return b1(this,h,B,w,!1)};P.prototype.write=function(h,B,w,U){if(B===void 0)U="utf8",w=this.length,B=0;else if(w===void 0&&typeof B==="string")U=B,w=this.length,B=0;else if(isFinite(B))if(B=B>>>0,isFinite(w)){if(w=w>>>0,U===void 0)U="utf8"}else U=w,w=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-B;if(w===void 0||w>X)w=X;if(h.length>0&&(w<0||B<0)||B>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!U)U="utf8";let Z=!1;for(;;)switch(U){case"hex":return Z8(this,h,B,w);case"utf8":case"utf-8":return Q8(this,h,B,w);case"ascii":case"latin1":case"binary":return J8(this,h,B,w);case"base64":return I8(this,h,B,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F8(this,h,B,w);default:if(Z)throw TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),Z=!0}};P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};P.prototype.slice=function(h,B){let w=this.length;if(h=~~h,B=B===void 0?w:~~B,h<0){if(h+=w,h<0)h=0}else if(h>w)h=w;if(B<0){if(B+=w,B<0)B=0}else if(B>w)B=w;if(B<h)B=h;let U=this.subarray(h,B);return Object.setPrototypeOf(U,P.prototype),U};P.prototype.readUintLE=P.prototype.readUIntLE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)M0(h,B,this.length);let U=this[h],X=1,Z=0;while(++Z<B&&(X*=256))U+=this[h+Z]*X;return U};P.prototype.readUintBE=P.prototype.readUIntBE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)M0(h,B,this.length);let U=this[h+--B],X=1;while(B>0&&(X*=256))U+=this[h+--B]*X;return U};P.prototype.readUint8=P.prototype.readUInt8=function(h,B){if(h=h>>>0,!B)M0(h,1,this.length);return this[h]};P.prototype.readUint16LE=P.prototype.readUInt16LE=function(h,B){if(h=h>>>0,!B)M0(h,2,this.length);return this[h]|this[h+1]<<8};P.prototype.readUint16BE=P.prototype.readUInt16BE=function(h,B){if(h=h>>>0,!B)M0(h,2,this.length);return this[h]<<8|this[h+1]};P.prototype.readUint32LE=P.prototype.readUInt32LE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216};P.prototype.readUint32BE=P.prototype.readUInt32BE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])};P.prototype.readBigUInt64LE=o0(function(h){h=h>>>0,F2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=B+this[++h]*256+this[++h]*65536+this[++h]*16777216,X=this[++h]+this[++h]*256+this[++h]*65536+w*16777216;return BigInt(U)+(BigInt(X)<<BigInt(32))});P.prototype.readBigUInt64BE=o0(function(h){h=h>>>0,F2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=B*16777216+this[++h]*65536+this[++h]*256+this[++h],X=this[++h]*16777216+this[++h]*65536+this[++h]*256+w;return(BigInt(U)<<BigInt(32))+BigInt(X)});P.prototype.readIntLE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)M0(h,B,this.length);let U=this[h],X=1,Z=0;while(++Z<B&&(X*=256))U+=this[h+Z]*X;if(X*=128,U>=X)U-=Math.pow(2,8*B);return U};P.prototype.readIntBE=function(h,B,w){if(h=h>>>0,B=B>>>0,!w)M0(h,B,this.length);let U=B,X=1,Z=this[h+--U];while(U>0&&(X*=256))Z+=this[h+--U]*X;if(X*=128,Z>=X)Z-=Math.pow(2,8*B);return Z};P.prototype.readInt8=function(h,B){if(h=h>>>0,!B)M0(h,1,this.length);if(!(this[h]&128))return this[h];return(255-this[h]+1)*-1};P.prototype.readInt16LE=function(h,B){if(h=h>>>0,!B)M0(h,2,this.length);let w=this[h]|this[h+1]<<8;return w&32768?w|4294901760:w};P.prototype.readInt16BE=function(h,B){if(h=h>>>0,!B)M0(h,2,this.length);let w=this[h+1]|this[h]<<8;return w&32768?w|4294901760:w};P.prototype.readInt32LE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24};P.prototype.readInt32BE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]};P.prototype.readBigInt64LE=o0(function(h){h=h>>>0,F2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=this[h+4]+this[h+5]*256+this[h+6]*65536+(w<<24);return(BigInt(U)<<BigInt(32))+BigInt(B+this[++h]*256+this[++h]*65536+this[++h]*16777216)});P.prototype.readBigInt64BE=o0(function(h){h=h>>>0,F2(h,"offset");let B=this[h],w=this[h+7];if(B===void 0||w===void 0)N2(h,this.length-8);let U=(B<<24)+this[++h]*65536+this[++h]*256+this[++h];return(BigInt(U)<<BigInt(32))+BigInt(this[++h]*16777216+this[++h]*65536+this[++h]*256+w)});P.prototype.readFloatLE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return L2(this,h,!0,23,4)};P.prototype.readFloatBE=function(h,B){if(h=h>>>0,!B)M0(h,4,this.length);return L2(this,h,!1,23,4)};P.prototype.readDoubleLE=function(h,B){if(h=h>>>0,!B)M0(h,8,this.length);return L2(this,h,!0,52,8)};P.prototype.readDoubleBE=function(h,B){if(h=h>>>0,!B)M0(h,8,this.length);return L2(this,h,!1,52,8)};P.prototype.writeUintLE=P.prototype.writeUIntLE=function(h,B,w,U){if(h=+h,B=B>>>0,w=w>>>0,!U){let J=Math.pow(2,8*w)-1;L0(this,h,B,w,J,0)}let X=1,Z=0;this[B]=h&255;while(++Z<w&&(X*=256))this[B+Z]=h/X&255;return B+w};P.prototype.writeUintBE=P.prototype.writeUIntBE=function(h,B,w,U){if(h=+h,B=B>>>0,w=w>>>0,!U){let J=Math.pow(2,8*w)-1;L0(this,h,B,w,J,0)}let X=w-1,Z=1;this[B+X]=h&255;while(--X>=0&&(Z*=256))this[B+X]=h/Z&255;return B+w};P.prototype.writeUint8=P.prototype.writeUInt8=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,1,255,0);return this[B]=h&255,B+1};P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,2,65535,0);return this[B]=h&255,this[B+1]=h>>>8,B+2};P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,2,65535,0);return this[B]=h>>>8,this[B+1]=h&255,B+2};P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,4,4294967295,0);return this[B+3]=h>>>24,this[B+2]=h>>>16,this[B+1]=h>>>8,this[B]=h&255,B+4};P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,4,4294967295,0);return this[B]=h>>>24,this[B+1]=h>>>16,this[B+2]=h>>>8,this[B+3]=h&255,B+4};P.prototype.writeBigUInt64LE=o0(function(h,B=0){return d1(this,h,B,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeBigUInt64BE=o0(function(h,B=0){return l1(this,h,B,BigInt(0),BigInt("0xffffffffffffffff"))});P.prototype.writeIntLE=function(h,B,w,U){if(h=+h,B=B>>>0,!U){let q=Math.pow(2,8*w-1);L0(this,h,B,w,q-1,-q)}let X=0,Z=1,J=0;this[B]=h&255;while(++X<w&&(Z*=256)){if(h<0&&J===0&&this[B+X-1]!==0)J=1;this[B+X]=(h/Z>>0)-J&255}return B+w};P.prototype.writeIntBE=function(h,B,w,U){if(h=+h,B=B>>>0,!U){let q=Math.pow(2,8*w-1);L0(this,h,B,w,q-1,-q)}let X=w-1,Z=1,J=0;this[B+X]=h&255;while(--X>=0&&(Z*=256)){if(h<0&&J===0&&this[B+X+1]!==0)J=1;this[B+X]=(h/Z>>0)-J&255}return B+w};P.prototype.writeInt8=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,1,127,-128);if(h<0)h=255+h+1;return this[B]=h&255,B+1};P.prototype.writeInt16LE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,2,32767,-32768);return this[B]=h&255,this[B+1]=h>>>8,B+2};P.prototype.writeInt16BE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,2,32767,-32768);return this[B]=h>>>8,this[B+1]=h&255,B+2};P.prototype.writeInt32LE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,4,2147483647,-2147483648);return this[B]=h&255,this[B+1]=h>>>8,this[B+2]=h>>>16,this[B+3]=h>>>24,B+4};P.prototype.writeInt32BE=function(h,B,w){if(h=+h,B=B>>>0,!w)L0(this,h,B,4,2147483647,-2147483648);if(h<0)h=4294967295+h+1;return this[B]=h>>>24,this[B+1]=h>>>16,this[B+2]=h>>>8,this[B+3]=h&255,B+4};P.prototype.writeBigInt64LE=o0(function(h,B=0){return d1(this,h,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeBigInt64BE=o0(function(h,B=0){return l1(this,h,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});P.prototype.writeFloatLE=function(h,B,w){return n1(this,h,B,!0,w)};P.prototype.writeFloatBE=function(h,B,w){return n1(this,h,B,!1,w)};P.prototype.writeDoubleLE=function(h,B,w){return o1(this,h,B,!0,w)};P.prototype.writeDoubleBE=function(h,B,w){return o1(this,h,B,!1,w)};P.prototype.copy=function(h,B,w,U){if(!P.isBuffer(h))throw TypeError("argument should be a Buffer");if(!w)w=0;if(!U&&U!==0)U=this.length;if(B>=h.length)B=h.length;if(!B)B=0;if(U>0&&U<w)U=w;if(U===w)return 0;if(h.length===0||this.length===0)return 0;if(B<0)throw RangeError("targetStart out of bounds");if(w<0||w>=this.length)throw RangeError("Index out of range");if(U<0)throw RangeError("sourceEnd out of bounds");if(U>this.length)U=this.length;if(h.length-B<U-w)U=h.length-B+w;let X=U-w;if(this===h&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(B,w,U);else Uint8Array.prototype.set.call(h,this.subarray(w,U),B);return X};P.prototype.fill=function(h,B,w,U){if(typeof h==="string"){if(typeof B==="string")U=B,B=0,w=this.length;else if(typeof w==="string")U=w,w=this.length;if(U!==void 0&&typeof U!=="string")throw TypeError("encoding must be a string");if(typeof U==="string"&&!P.isEncoding(U))throw TypeError("Unknown encoding: "+U);if(h.length===1){let Z=h.charCodeAt(0);if(U==="utf8"&&Z<128||U==="latin1")h=Z}}else if(typeof h==="number")h=h&255;else if(typeof h==="boolean")h=Number(h);if(B<0||this.length<B||this.length<w)throw RangeError("Out of range index");if(w<=B)return this;if(B=B>>>0,w=w===void 0?this.length:w>>>0,!h)h=0;let X;if(typeof h==="number")for(X=B;X<w;++X)this[X]=h;else{let Z=P.isBuffer(h)?h:P.from(h,U),J=Z.length;if(J===0)throw TypeError('The value "'+h+'" is invalid for argument "value"');for(X=0;X<w-B;++X)this[X+B]=Z[X%J]}return this};N8=/[^+/0-9A-Za-z-_]/g;V8=function(){let h=Array(256);for(let B=0;B<16;++B){let w=B*16;for(let U=0;U<16;++U)h[w+U]="0123456789abcdef"[B]+"0123456789abcdef"[U]}return h}();A8=r2("resolveObjectURL"),O8=r2("isUtf8"),L8=r2("transcode"),E8=P});var W2={};V1(W2,{setMaxListeners:()=>J6,once:()=>Z6,listenerCount:()=>I6,init:()=>r0,getMaxListeners:()=>K6,getEventListeners:()=>Q6,default:()=>f8,captureRejectionSymbol:()=>B6,addAbortListener:()=>Y6,EventEmitter:()=>r0});function w6(h,B){var{_events:w}=h;if(B[0]??=Error("Unhandled error."),!w)throw B[0];var U=w[h6];if(U)for(var X of t1.call(U))X.apply(h,B);var Z=w.error;if(!Z)throw B[0];for(var X of t1.call(Z))X.apply(h,B);return!0}function T8(h,B,w,U){B.then(void 0,function(X){queueMicrotask(()=>_8(h,X,w,U))})}function _8(h,B,w,U){if(typeof h[s1]==="function")h[s1](B,w,...U);else try{h[U2]=!1,h.emit("error",B)}finally{h[U2]=!0}}function U6(h,B,w){w.warned=!0;let U=Error(`Possible EventEmitter memory leak detected. ${w.length} ${String(B)} listeners added to [${h.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);U.name="MaxListenersExceededWarning",U.emitter=h,U.type=B,U.count=w.length,console.warn(U)}function X6(h,B,...w){this.removeListener(h,B),B.apply(this,w)}function Z6(h,B,w){var U=w?.signal;if(F6(U,"options.signal"),U?.aborted)throw new a2(void 0,{cause:U?.reason});let{resolve:X,reject:Z,promise:J}=$newPromiseCapability(Promise),q=(G)=>{if(h.removeListener(B,K),U!=null)D2(U,"abort",H);Z(G)},K=(...G)=>{if(typeof h.removeListener==="function")h.removeListener("error",q);if(U!=null)D2(U,"abort",H);X(G)};if(e1(h,B,K,{once:!0}),B!=="error"&&typeof h.once==="function")h.once("error",q);function H(){D2(h,B,K),D2(h,"error",q),Z(new a2(void 0,{cause:U?.reason}))}if(U!=null)e1(U,"abort",H,{once:!0});return J}function Q6(h,B){return h.listeners(B)}function J6(h,...B){t2(h,"setMaxListeners",0);var w;if(B&&(w=B.length))for(let U=0;U<w;U++)B[U].setMaxListeners(h);else X2=h}function I6(h,B){return h.listenerCount(B)}function D2(h,B,w,U){if(typeof h.removeListener==="function")h.removeListener(B,w);else h.removeEventListener(B,w,U)}function e1(h,B,w,U){if(typeof h.on==="function")if(U.once)h.once(B,w);else h.on(B,w);else h.addEventListener(B,w,U)}function K2(h,B,w){let U=TypeError(`The "${h}" argument must be of type ${B}. Received ${w}`);return U.code="ERR_INVALID_ARG_TYPE",U}function S8(h,B,w){let U=RangeError(`The "${h}" argument is out of range. It must be ${B}. Received ${w}`);return U.code="ERR_OUT_OF_RANGE",U}function F6(h,B){if(h!==void 0&&(h===null||typeof h!=="object"||!("aborted"in h)))throw K2(B,"AbortSignal",h)}function t2(h,B,w,U){if(typeof h!=="number")throw K2(B,"number",h);if(w!=null&&h<w||U!=null&&h>U||(w!=null||U!=null)&&Number.isNaN(h))throw S8(B,`${w!=null?`>= ${w}`:""}${w!=null&&U!=null?" && ":""}${U!=null?`<= ${U}`:""}`,h)}function C2(h){if(typeof h!=="function")throw TypeError("The listener must be a function")}function y8(h,B){if(typeof h!=="boolean")throw K2(B,"boolean",h)}function K6(h){return h?._maxListeners??X2}function Y6(h,B){if(h===void 0)throw K2("signal","AbortSignal",h);if(F6(h,"signal"),typeof B!=="function")throw K2("listener","function",B);let w;if(h.aborted)queueMicrotask(()=>B());else h.addEventListener("abort",B,{__proto__:null,once:!0}),w=()=>{h.removeEventListener("abort",B)};return{__proto__:null,[Symbol.dispose](){w?.()}}}var s2,U2,h6,D8,P8,s1,B6,t1,X2=10,r0=function(h){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[U2]=h?.captureRejections?Boolean(h?.captureRejections):G0[U2])this.emit=k8},G0,R8=function(h,...B){if(h==="error")return w6(this,B);var{_events:w}=this;if(w===void 0)return!1;var U=w[h];if(U===void 0)return!1;let X=U.length>1?U.slice():U;for(let Z=0,{length:J}=X;Z<J;Z++){let q=X[Z];switch(B.length){case 0:q.call(this);break;case 1:q.call(this,B[0]);break;case 2:q.call(this,B[0],B[1]);break;case 3:q.call(this,B[0],B[1],B[2]);break;default:q.apply(this,B);break}}return!0},k8=function(h,...B){if(h==="error")return w6(this,B);var{_events:w}=this;if(w===void 0)return!1;var U=w[h];if(U===void 0)return!1;let X=U.length>1?U.slice():U;for(let Z=0,{length:J}=X;Z<J;Z++){let q=X[Z],K;switch(B.length){case 0:K=q.call(this);break;case 1:K=q.call(this,B[0]);break;case 2:K=q.call(this,B[0],B[1]);break;case 3:K=q.call(this,B[0],B[1],B[2]);break;default:K=q.apply(this,B);break}if(K!==void 0&&typeof K?.then==="function"&&K.then===Promise.prototype.then)T8(this,K,h,B)}return!0},a2,f8;var M2=j1(()=>{s2=Symbol.for,U2=Symbol("kCapture"),h6=s2("events.errorMonitor"),D8=Symbol("events.maxEventTargetListeners"),P8=Symbol("events.maxEventTargetListenersWarned"),s1=s2("nodejs.rejection"),B6=s2("nodejs.rejection"),t1=Array.prototype.slice,G0=r0.prototype={};G0._events=void 0;G0._eventsCount=0;G0._maxListeners=void 0;G0.setMaxListeners=function(h){return t2(h,"setMaxListeners",0),this._maxListeners=h,this};G0.constructor=r0;G0.getMaxListeners=function(){return this?._maxListeners??X2};G0.emit=R8;G0.addListener=function(h,B){C2(B);var w=this._events;if(!w)w=this._events={__proto__:null},this._eventsCount=0;else if(w.newListener)this.emit("newListener",h,B.listener??B);var U=w[h];if(!U)w[h]=[B],this._eventsCount++;else{U.push(B);var X=this._maxListeners??X2;if(X>0&&U.length>X&&!U.warned)U6(this,h,U)}return this};G0.on=G0.addListener;G0.prependListener=function(h,B){C2(B);var w=this._events;if(!w)w=this._events={__proto__:null},this._eventsCount=0;else if(w.newListener)this.emit("newListener",h,B.listener??B);var U=w[h];if(!U)w[h]=[B],this._eventsCount++;else{U.unshift(B);var X=this._maxListeners??X2;if(X>0&&U.length>X&&!U.warned)U6(this,h,U)}return this};G0.once=function(h,B){C2(B);let w=X6.bind(this,h,B);return w.listener=B,this.addListener(h,w),this};G0.prependOnceListener=function(h,B){C2(B);let w=X6.bind(this,h,B);return w.listener=B,this.prependListener(h,w),this};G0.removeListener=function(h,B){C2(B);var{_events:w}=this;if(!w)return this;var U=w[h];if(!U)return this;var X=U.length;let Z=-1;for(let J=X-1;J>=0;J--)if(U[J]===B||U[J].listener===B){Z=J;break}if(Z<0)return this;if(Z===0)U.shift();else U.splice(Z,1);if(U.length===0)delete w[h],this._eventsCount--;return this};G0.off=G0.removeListener;G0.removeAllListeners=function(h){var{_events:B}=this;if(h&&B){if(B[h])delete B[h],this._eventsCount--}else this._events={__proto__:null};return this};G0.listeners=function(h){var{_events:B}=this;if(!B)return[];var w=B[h];if(!w)return[];return w.map((U)=>U.listener??U)};G0.rawListeners=function(h){var{_events:B}=this;if(!B)return[];var w=B[h];if(!w)return[];return w.slice()};G0.listenerCount=function(h){var{_events:B}=this;if(!B)return 0;return B[h]?.length??0};G0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};G0[U2]=!1;a2=class a2 extends Error{constructor(h="The operation was aborted",B=void 0){if(B!==void 0&&typeof B!=="object")throw K2("options","Object",B);super(h,B);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(r0,{captureRejections:{get(){return G0[U2]},set(h){y8(h,"EventEmitter.captureRejections"),G0[U2]=h},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return X2},set:(h)=>{t2(h,"defaultMaxListeners",0),X2=h}},kMaxEventTargetListeners:{value:D8,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:P8,enumerable:!1,configurable:!1,writable:!1}});Object.assign(r0,{once:Z6,getEventListeners:Q6,getMaxListeners:K6,setMaxListeners:J6,EventEmitter:r0,usingDomains:!1,captureRejectionSymbol:B6,errorMonitor:h6,addAbortListener:Y6,init:r0,listenerCount:I6});f8=r0});var w1=u6(($4,W6)=>{var z0=(h,B)=>()=>(B||h((B={exports:{}}).exports,B),B.exports),C0=z0((h,B)=>{class w extends Error{constructor(U){if(!Array.isArray(U))throw TypeError(`Expected input to be an Array, got ${typeof U}`);let X="";for(let Z=0;Z<U.length;Z++)X+=` ${U[Z].stack}
2
+ `;super(X);this.name="AggregateError",this.errors=U}}B.exports={AggregateError:w,ArrayIsArray(U){return Array.isArray(U)},ArrayPrototypeIncludes(U,X){return U.includes(X)},ArrayPrototypeIndexOf(U,X){return U.indexOf(X)},ArrayPrototypeJoin(U,X){return U.join(X)},ArrayPrototypeMap(U,X){return U.map(X)},ArrayPrototypePop(U,X){return U.pop(X)},ArrayPrototypePush(U,X){return U.push(X)},ArrayPrototypeSlice(U,X,Z){return U.slice(X,Z)},Error,FunctionPrototypeCall(U,X,...Z){return U.call(X,...Z)},FunctionPrototypeSymbolHasInstance(U,X){return Function.prototype[Symbol.hasInstance].call(U,X)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(U,X){return Object.defineProperties(U,X)},ObjectDefineProperty(U,X,Z){return Object.defineProperty(U,X,Z)},ObjectGetOwnPropertyDescriptor(U,X){return Object.getOwnPropertyDescriptor(U,X)},ObjectKeys(U){return Object.keys(U)},ObjectSetPrototypeOf(U,X){return Object.setPrototypeOf(U,X)},Promise,PromisePrototypeCatch(U,X){return U.catch(X)},PromisePrototypeThen(U,X,Z){return U.then(X,Z)},PromiseReject(U){return Promise.reject(U)},PromiseResolve(U){return Promise.resolve(U)},ReflectApply:Reflect.apply,RegExpPrototypeTest(U,X){return U.test(X)},SafeSet:Set,String,StringPrototypeSlice(U,X,Z){return U.slice(X,Z)},StringPrototypeToLowerCase(U){return U.toLowerCase()},StringPrototypeToUpperCase(U){return U.toUpperCase()},StringPrototypeTrim(U){return U.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(U,X,Z){return U.set(X,Z)},Boolean,Uint8Array}}),q6=z0((h,B)=>{B.exports={format(w,...U){return w.replace(/%([sdifj])/g,function(...[X,Z]){let J=U.shift();if(Z==="f")return J.toFixed(6);else if(Z==="j")return JSON.stringify(J);else if(Z==="s"&&typeof J==="object")return`${J.constructor!==Object?J.constructor.name:""} {}`.trim();else return J.toString()})},inspect(w){switch(typeof w){case"string":if(w.includes("'")){if(!w.includes('"'))return`"${w}"`;else if(!w.includes("`")&&!w.includes("${"))return`\`${w}\``}return`'${w}'`;case"number":if(isNaN(w))return"NaN";else if(Object.is(w,-0))return String(w);return w;case"bigint":return`${String(w)}n`;case"boolean":case"undefined":return String(w);case"object":return"{}"}}}}),O0=z0((h,B)=>{var{format:w,inspect:U}=q6(),{AggregateError:X}=C0(),Z=globalThis.AggregateError||X,J=Symbol("kIsNodeError"),q=["string","function","number","object","Function","Object","boolean","bigint","symbol"],K=/^([A-Z][a-z0-9]*)+$/,H={};function G(E,F){if(!E)throw new H.ERR_INTERNAL_ASSERTION(F)}function M(E){let F="",C=E.length,j=E[0]==="-"?1:0;for(;C>=j+4;C-=3)F=`_${E.slice(C-3,C)}${F}`;return`${E.slice(0,C)}${F}`}function x(E,F,C){if(typeof F==="function")return G(F.length<=C.length,`Code: ${E}; The provided arguments length (${C.length}) does not match the required ones (${F.length}).`),F(...C);let j=(F.match(/%[dfijoOs]/g)||[]).length;if(G(j===C.length,`Code: ${E}; The provided arguments length (${C.length}) does not match the required ones (${j}).`),C.length===0)return F;return w(F,...C)}function L(E,F,C){if(!C)C=Error;class j extends C{constructor(..._){super(x(E,F,_))}toString(){return`${this.name} [${E}]: ${this.message}`}}Object.defineProperties(j.prototype,{name:{value:C.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${E}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),j.prototype.code=E,j.prototype[J]=!0,H[E]=j}function h0(E){let F="__node_internal_"+E.name;return Object.defineProperty(E,"name",{value:F}),E}function s(E,F){if(E&&F&&E!==F){if(Array.isArray(F.errors))return F.errors.push(E),F;let C=new Z([F,E],F.message);return C.code=F.code,C}return E||F}class O extends Error{constructor(E="The operation was aborted",F=void 0){if(F!==void 0&&typeof F!=="object")throw new H.ERR_INVALID_ARG_TYPE("options","Object",F);super(E,F);this.code="ABORT_ERR",this.name="AbortError"}}L("ERR_ASSERTION","%s",Error),L("ERR_INVALID_ARG_TYPE",(E,F,C)=>{if(G(typeof E==="string","'name' must be a string"),!Array.isArray(F))F=[F];let j="The ";if(E.endsWith(" argument"))j+=`${E} `;else j+=`"${E}" ${E.includes(".")?"property":"argument"} `;j+="must be ";let _=[],i=[],Q0=[];for(let o of F)if(G(typeof o==="string","All expected entries have to be of type string"),q.includes(o))_.push(o.toLowerCase());else if(K.test(o))i.push(o);else G(o!=="object",'The value "object" should be written as "Object"'),Q0.push(o);if(i.length>0){let o=_.indexOf("object");if(o!==-1)_.splice(_,o,1),i.push("Object")}if(_.length>0){switch(_.length){case 1:j+=`of type ${_[0]}`;break;case 2:j+=`one of type ${_[0]} or ${_[1]}`;break;default:{let o=_.pop();j+=`one of type ${_.join(", ")}, or ${o}`}}if(i.length>0||Q0.length>0)j+=" or "}if(i.length>0){switch(i.length){case 1:j+=`an instance of ${i[0]}`;break;case 2:j+=`an instance of ${i[0]} or ${i[1]}`;break;default:{let o=i.pop();j+=`an instance of ${i.join(", ")}, or ${o}`}}if(Q0.length>0)j+=" or "}switch(Q0.length){case 0:break;case 1:if(Q0[0].toLowerCase()!==Q0[0])j+="an ";j+=`${Q0[0]}`;break;case 2:j+=`one of ${Q0[0]} or ${Q0[1]}`;break;default:{let o=Q0.pop();j+=`one of ${Q0.join(", ")}, or ${o}`}}if(C==null)j+=`. Received ${C}`;else if(typeof C==="function"&&C.name)j+=`. Received function ${C.name}`;else if(typeof C==="object"){var F0;if((F0=C.constructor)!==null&&F0!==void 0&&F0.name)j+=`. Received an instance of ${C.constructor.name}`;else{let o=U(C,{depth:-1});j+=`. Received ${o}`}}else{let o=U(C,{colors:!1});if(o.length>25)o=`${o.slice(0,25)}...`;j+=`. Received type ${typeof C} (${o})`}return j},TypeError),L("ERR_INVALID_ARG_VALUE",(E,F,C="is invalid")=>{let j=U(F);if(j.length>128)j=j.slice(0,128)+"...";return`The ${E.includes(".")?"property":"argument"} '${E}' ${C}. Received ${j}`},TypeError),L("ERR_INVALID_RETURN_VALUE",(E,F,C)=>{var j;let _=C!==null&&C!==void 0&&(j=C.constructor)!==null&&j!==void 0&&j.name?`instance of ${C.constructor.name}`:`type ${typeof C}`;return`Expected ${E} to be returned from the "${F}" function but got ${_}.`},TypeError),L("ERR_MISSING_ARGS",(...E)=>{G(E.length>0,"At least one arg needs to be specified");let F,C=E.length;switch(E=(Array.isArray(E)?E:[E]).map((j)=>`"${j}"`).join(" or "),C){case 1:F+=`The ${E[0]} argument`;break;case 2:F+=`The ${E[0]} and ${E[1]} arguments`;break;default:{let j=E.pop();F+=`The ${E.join(", ")}, and ${j} arguments`}break}return`${F} must be specified`},TypeError),L("ERR_OUT_OF_RANGE",(E,F,C)=>{G(F,'Missing "range" argument');let j;if(Number.isInteger(C)&&Math.abs(C)>4294967296)j=M(String(C));else if(typeof C==="bigint"){j=String(C);let _=BigInt(2)**BigInt(32);if(C>_||C<-_)j=M(j);j+="n"}else j=U(C);return`The value of "${E}" is out of range. It must be ${F}. Received ${j}`},RangeError),L("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),L("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),L("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),L("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),L("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),L("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),L("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),L("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),L("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),L("ERR_STREAM_WRITE_AFTER_END","write after end",Error),L("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),B.exports={AbortError:O,aggregateTwoErrors:h0(s),hideStackFrames:h0,codes:H}}),c8=z0((h,B)=>{Object.defineProperty(h,"__esModule",{value:!0});var w=new WeakMap,U=new WeakMap;function X(k){let v=w.get(k);return console.assert(v!=null,"'this' is expected an Event object, but got",k),v}function Z(k){if(k.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",k.passiveListener);return}if(!k.event.cancelable)return;if(k.canceled=!0,typeof k.event.preventDefault==="function")k.event.preventDefault()}function J(k,v){w.set(this,{eventTarget:k,event:v,eventPhase:2,currentTarget:k,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:v.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let N=Object.keys(v);for(let A=0;A<N.length;++A){let D=N[A];if(!(D in this))Object.defineProperty(this,D,q(D))}}if(J.prototype={get type(){return X(this).event.type},get target(){return X(this).eventTarget},get currentTarget(){return X(this).currentTarget},composedPath(){let k=X(this).currentTarget;if(k==null)return[];return[k]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return X(this).eventPhase},stopPropagation(){let k=X(this);if(k.stopped=!0,typeof k.event.stopPropagation==="function")k.event.stopPropagation()},stopImmediatePropagation(){let k=X(this);if(k.stopped=!0,k.immediateStopped=!0,typeof k.event.stopImmediatePropagation==="function")k.event.stopImmediatePropagation()},get bubbles(){return Boolean(X(this).event.bubbles)},get cancelable(){return Boolean(X(this).event.cancelable)},preventDefault(){Z(X(this))},get defaultPrevented(){return X(this).canceled},get composed(){return Boolean(X(this).event.composed)},get timeStamp(){return X(this).timeStamp},get srcElement(){return X(this).eventTarget},get cancelBubble(){return X(this).stopped},set cancelBubble(k){if(!k)return;let v=X(this);if(v.stopped=!0,typeof v.event.cancelBubble==="boolean")v.event.cancelBubble=!0},get returnValue(){return!X(this).canceled},set returnValue(k){if(!k)Z(X(this))},initEvent(){}},Object.defineProperty(J.prototype,"constructor",{value:J,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(J.prototype,window.Event.prototype),U.set(window.Event.prototype,J);function q(k){return{get(){return X(this).event[k]},set(v){X(this).event[k]=v},configurable:!0,enumerable:!0}}function K(k){return{value(){let v=X(this).event;return v[k].apply(v,arguments)},configurable:!0,enumerable:!0}}function H(k,v){let N=Object.keys(v);if(N.length===0)return k;function A(D,V){k.call(this,D,V)}A.prototype=Object.create(k.prototype,{constructor:{value:A,configurable:!0,writable:!0}});for(let D=0;D<N.length;++D){let V=N[D];if(!(V in k.prototype)){let m=typeof Object.getOwnPropertyDescriptor(v,V).value==="function";Object.defineProperty(A.prototype,V,m?K(V):q(V))}}return A}function G(k){if(k==null||k===Object.prototype)return J;let v=U.get(k);if(v==null)v=H(G(Object.getPrototypeOf(k)),k),U.set(k,v);return v}function M(k,v){return new(G(Object.getPrototypeOf(v)))(k,v)}function x(k){return X(k).immediateStopped}function L(k,v){X(k).eventPhase=v}function h0(k,v){X(k).currentTarget=v}function s(k,v){X(k).passiveListener=v}var O=new WeakMap,E=1,F=2,C=3;function j(k){return k!==null&&typeof k==="object"}function _(k){let v=O.get(k);if(v==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return v}function i(k){return{get(){let v=_(this).get(k);while(v!=null){if(v.listenerType===C)return v.listener;v=v.next}return null},set(v){if(typeof v!=="function"&&!j(v))v=null;let N=_(this),A=null,D=N.get(k);while(D!=null){if(D.listenerType===C)if(A!==null)A.next=D.next;else if(D.next!==null)N.set(k,D.next);else N.delete(k);else A=D;D=D.next}if(v!==null){let V={listener:v,listenerType:C,passive:!1,once:!1,next:null};if(A===null)N.set(k,V);else A.next=V}},configurable:!0,enumerable:!0}}function Q0(k,v){Object.defineProperty(k,`on${v}`,i(v))}function F0(k){function v(){o.call(this)}v.prototype=Object.create(o.prototype,{constructor:{value:v,configurable:!0,writable:!0}});for(let N=0;N<k.length;++N)Q0(v.prototype,k[N]);return v}function o(){if(this instanceof o){O.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return F0(arguments[0]);if(arguments.length>0){let k=Array(arguments.length);for(let v=0;v<arguments.length;++v)k[v]=arguments[v];return F0(k)}throw TypeError("Cannot call a class as a function")}if(o.prototype={addEventListener(k,v,N){if(v==null)return;if(typeof v!=="function"&&!j(v))throw TypeError("'listener' should be a function or an object.");let A=_(this),D=j(N),V=(D?Boolean(N.capture):Boolean(N))?E:F,m={listener:v,listenerType:V,passive:D&&Boolean(N.passive),once:D&&Boolean(N.once),next:null},e=A.get(k);if(e===void 0){A.set(k,m);return}let U0=null;while(e!=null){if(e.listener===v&&e.listenerType===V)return;U0=e,e=e.next}U0.next=m},removeEventListener(k,v,N){if(v==null)return;let A=_(this),D=(j(N)?Boolean(N.capture):Boolean(N))?E:F,V=null,m=A.get(k);while(m!=null){if(m.listener===v&&m.listenerType===D){if(V!==null)V.next=m.next;else if(m.next!==null)A.set(k,m.next);else A.delete(k);return}V=m,m=m.next}},dispatchEvent(k){if(k==null||typeof k.type!=="string")throw TypeError('"event.type" should be a string.');let v=_(this),N=k.type,A=v.get(N);if(A==null)return!0;let D=M(this,k),V=null;while(A!=null){if(A.once)if(V!==null)V.next=A.next;else if(A.next!==null)v.set(N,A.next);else v.delete(N);else V=A;if(s(D,A.passive?A.listener:null),typeof A.listener==="function")try{A.listener.call(this,D)}catch(m){if(typeof console<"u"&&typeof console.error==="function")console.error(m)}else if(A.listenerType!==C&&typeof A.listener.handleEvent==="function")A.listener.handleEvent(D);if(x(D))break;A=A.next}return s(D,null),L(D,0),h0(D,null),!D.defaultPrevented}},Object.defineProperty(o.prototype,"constructor",{value:o,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(o.prototype,window.EventTarget.prototype);h.defineEventAttribute=Q0,h.EventTarget=o,h.default=o,B.exports=o,B.exports.EventTarget=B.exports.default=o,B.exports.defineEventAttribute=Q0}),V2=z0((h,B)=>{Object.defineProperty(h,"__esModule",{value:!0});var w=c8();class U extends w.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let G=J.get(this);if(typeof G!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return G}}w.defineEventAttribute(U.prototype,"abort");function X(){let G=Object.create(U.prototype);return w.EventTarget.call(G),J.set(G,!1),G}function Z(G){if(J.get(G)!==!1)return;J.set(G,!0),G.dispatchEvent({type:"abort"})}var J=new WeakMap;if(Object.defineProperties(U.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(U.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class q{constructor(){K.set(this,X())}get signal(){return H(this)}abort(){Z(H(this))}}var K=new WeakMap;function H(G){let M=K.get(G);if(M==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${G===null?"null":typeof G}`);return M}if(Object.defineProperties(q.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(q.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});h.AbortController=q,h.AbortSignal=U,h.default=q,B.exports=q,B.exports.AbortController=B.exports.default=q,B.exports.AbortSignal=U}),E0=z0((h,B)=>{var w=(i0(),_0(b0)),{format:U,inspect:X}=q6(),{codes:{ERR_INVALID_ARG_TYPE:Z}}=O0(),{kResistStopPropagation:J,AggregateError:q,SymbolDispose:K}=C0(),H=globalThis.AbortSignal||V2().AbortSignal,G=globalThis.AbortController||V2().AbortController,M=Object.getPrototypeOf(async function(){}).constructor,x=globalThis.Blob||w.Blob,L=typeof x<"u"?function(O){return O instanceof x}:function(O){return!1},h0=(O,E)=>{if(O!==void 0&&(O===null||typeof O!=="object"||!("aborted"in O)))throw new Z(E,"AbortSignal",O)},s=(O,E)=>{if(typeof O!=="function")throw new Z(E,"Function",O)};B.exports={AggregateError:q,kEmptyObject:Object.freeze({}),once(O){let E=!1;return function(...F){if(E)return;E=!0,O.apply(this,F)}},createDeferredPromise:function(){let O,E;return{promise:new Promise((F,C)=>{O=F,E=C}),resolve:O,reject:E}},promisify(O){return new Promise((E,F)=>{O((C,...j)=>{if(C)return F(C);return E(...j)})})},debuglog(){return function(){}},format:U,inspect:X,types:{isAsyncFunction(O){return O instanceof M},isArrayBufferView(O){return ArrayBuffer.isView(O)}},isBlob:L,deprecate(O,E){return O},addAbortListener:(M2(),_0(W2)).addAbortListener||function(O,E){if(O===void 0)throw new Z("signal","AbortSignal",O);h0(O,"signal"),s(E,"listener");let F;if(O.aborted)queueMicrotask(()=>E());else O.addEventListener("abort",E,{__proto__:null,once:!0,[J]:!0}),F=()=>{O.removeEventListener("abort",E)};return{__proto__:null,[K](){var C;(C=F)===null||C===void 0||C()}}},AbortSignalAny:H.any||function(O){if(O.length===1)return O[0];let E=new G,F=()=>E.abort();return O.forEach((C)=>{h0(C,"signals"),C.addEventListener("abort",F,{once:!0})}),E.signal.addEventListener("abort",()=>{O.forEach((C)=>C.removeEventListener("abort",F))},{once:!0}),E.signal}},B.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),j2=z0((h,B)=>{var{ArrayIsArray:w,ArrayPrototypeIncludes:U,ArrayPrototypeJoin:X,ArrayPrototypeMap:Z,NumberIsInteger:J,NumberIsNaN:q,NumberMAX_SAFE_INTEGER:K,NumberMIN_SAFE_INTEGER:H,NumberParseInt:G,ObjectPrototypeHasOwnProperty:M,RegExpPrototypeExec:x,String:L,StringPrototypeToUpperCase:h0,StringPrototypeTrim:s}=C0(),{hideStackFrames:O,codes:{ERR_SOCKET_BAD_PORT:E,ERR_INVALID_ARG_TYPE:F,ERR_INVALID_ARG_VALUE:C,ERR_OUT_OF_RANGE:j,ERR_UNKNOWN_SIGNAL:_}}=O0(),{normalizeEncoding:i}=E0(),{isAsyncFunction:Q0,isArrayBufferView:F0}=E0().types,o={};function k($){return $===($|0)}function v($){return $===$>>>0}var N=/^[0-7]+$/,A="must be a 32-bit unsigned integer or an octal string";function D($,u,r){if(typeof $>"u")$=r;if(typeof $==="string"){if(x(N,$)===null)throw new C(u,$,A);$=G($,8)}return e($,u),$}var V=O(($,u,r=H,g=K)=>{if(typeof $!=="number")throw new F(u,"number",$);if(!J($))throw new j(u,"an integer",$);if($<r||$>g)throw new j(u,`>= ${r} && <= ${g}`,$)}),m=O(($,u,r=-2147483648,g=2147483647)=>{if(typeof $!=="number")throw new F(u,"number",$);if(!J($))throw new j(u,"an integer",$);if($<r||$>g)throw new j(u,`>= ${r} && <= ${g}`,$)}),e=O(($,u,r=!1)=>{if(typeof $!=="number")throw new F(u,"number",$);if(!J($))throw new j(u,"an integer",$);let g=r?1:0,Z0=4294967295;if($<g||$>Z0)throw new j(u,`>= ${g} && <= ${Z0}`,$)});function U0($,u){if(typeof $!=="string")throw new F(u,"string",$)}function q0($,u,r=void 0,g){if(typeof $!=="number")throw new F(u,"number",$);if(r!=null&&$<r||g!=null&&$>g||(r!=null||g!=null)&&q($))throw new j(u,`${r!=null?`>= ${r}`:""}${r!=null&&g!=null?" && ":""}${g!=null?`<= ${g}`:""}`,$)}var f=O(($,u,r)=>{if(!U(r,$)){let g="must be one of: "+X(Z(r,(Z0)=>typeof Z0==="string"?`'${Z0}'`:L(Z0)),", ");throw new C(u,$,g)}});function X0($,u){if(typeof $!=="boolean")throw new F(u,"boolean",$)}function Y($,u,r){return $==null||!M($,u)?r:$[u]}var c=O(($,u,r=null)=>{let g=Y(r,"allowArray",!1),Z0=Y(r,"allowFunction",!1);if(!Y(r,"nullable",!1)&&$===null||!g&&w($)||typeof $!=="object"&&(!Z0||typeof $!=="function"))throw new F(u,"Object",$)}),t=O(($,u)=>{if($!=null&&typeof $!=="object"&&typeof $!=="function")throw new F(u,"a dictionary",$)}),R=O(($,u,r=0)=>{if(!w($))throw new F(u,"Array",$);if($.length<r){let g=`must be longer than ${r}`;throw new C(u,$,g)}});function w0($,u){R($,u);for(let r=0;r<$.length;r++)U0($[r],`${u}[${r}]`)}function J0($,u){R($,u);for(let r=0;r<$.length;r++)X0($[r],`${u}[${r}]`)}function H0($,u){R($,u);for(let r=0;r<$.length;r++){let g=$[r],Z0=`${u}[${r}]`;if(g==null)throw new F(Z0,"AbortSignal",g);I0(g,Z0)}}function Y0($,u="signal"){if(U0($,u),o[$]===void 0){if(o[h0($)]!==void 0)throw new _($+" (signals must use all capital letters)");throw new _($)}}var S=O(($,u="buffer")=>{if(!F0($))throw new F(u,["Buffer","TypedArray","DataView"],$)});function y($,u){let r=i(u),g=$.length;if(r==="hex"&&g%2!==0)throw new C("encoding",u,`is invalid for data of length ${g}`)}function d($,u="Port",r=!0){if(typeof $!=="number"&&typeof $!=="string"||typeof $==="string"&&s($).length===0||+$!==+$>>>0||$>65535||$===0&&!r)throw new E(u,$,r);return $|0}var I0=O(($,u)=>{if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw new F(u,"AbortSignal",$)}),K0=O(($,u)=>{if(typeof $!=="function")throw new F(u,"Function",$)}),z=O(($,u)=>{if(typeof $!=="function"||Q0($))throw new F(u,"Function",$)}),W=O(($,u)=>{if($!==void 0)throw new F(u,"undefined",$)});function T($,u,r){if(!U(r,$))throw new F(u,`('${X(r,"|")}')`,$)}var b=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function n($,u){if(typeof $>"u"||!x(b,$))throw new C(u,$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function l($){if(typeof $==="string")return n($,"hints"),$;else if(w($)){let u=$.length,r="";if(u===0)return r;for(let g=0;g<u;g++){let Z0=$[g];if(n(Z0,"hints"),r+=Z0,g!==u-1)r+=", "}return r}throw new C("hints",$,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}B.exports={isInt32:k,isUint32:v,parseFileMode:D,validateArray:R,validateStringArray:w0,validateBooleanArray:J0,validateAbortSignalArray:H0,validateBoolean:X0,validateBuffer:S,validateDictionary:t,validateEncoding:y,validateFunction:K0,validateInt32:m,validateInteger:V,validateNumber:q0,validateObject:c,validateOneOf:f,validatePlainFunction:z,validatePort:d,validateSignalName:Y0,validateString:U0,validateUint32:e,validateUndefined:W,validateUnion:T,validateAbortSignal:I0,validateLinkHeaderValue:l}}),Z2=z0((h,B)=>{B.exports=globalThis.process}),l0=z0((h,B)=>{var{SymbolAsyncIterator:w,SymbolIterator:U,SymbolFor:X}=C0(),Z=X("nodejs.stream.destroyed"),J=X("nodejs.stream.errored"),q=X("nodejs.stream.readable"),K=X("nodejs.stream.writable"),H=X("nodejs.stream.disturbed"),G=X("nodejs.webstream.isClosedPromise"),M=X("nodejs.webstream.controllerErrorFunction");function x(Y,c=!1){var t;return!!(Y&&typeof Y.pipe==="function"&&typeof Y.on==="function"&&(!c||typeof Y.pause==="function"&&typeof Y.resume==="function")&&(!Y._writableState||((t=Y._readableState)===null||t===void 0?void 0:t.readable)!==!1)&&(!Y._writableState||Y._readableState))}function L(Y){var c;return!!(Y&&typeof Y.write==="function"&&typeof Y.on==="function"&&(!Y._readableState||((c=Y._writableState)===null||c===void 0?void 0:c.writable)!==!1))}function h0(Y){return!!(Y&&typeof Y.pipe==="function"&&Y._readableState&&typeof Y.on==="function"&&typeof Y.write==="function")}function s(Y){return Y&&(Y._readableState||Y._writableState||typeof Y.write==="function"&&typeof Y.on==="function"||typeof Y.pipe==="function"&&typeof Y.on==="function")}function O(Y){return!!(Y&&!s(Y)&&typeof Y.pipeThrough==="function"&&typeof Y.getReader==="function"&&typeof Y.cancel==="function")}function E(Y){return!!(Y&&!s(Y)&&typeof Y.getWriter==="function"&&typeof Y.abort==="function")}function F(Y){return!!(Y&&!s(Y)&&typeof Y.readable==="object"&&typeof Y.writable==="object")}function C(Y){return O(Y)||E(Y)||F(Y)}function j(Y,c){if(Y==null)return!1;if(c===!0)return typeof Y[w]==="function";if(c===!1)return typeof Y[U]==="function";return typeof Y[w]==="function"||typeof Y[U]==="function"}function _(Y){if(!s(Y))return null;let{_writableState:c,_readableState:t}=Y,R=c||t;return!!(Y.destroyed||Y[Z]||R!==null&&R!==void 0&&R.destroyed)}function i(Y){if(!L(Y))return null;if(Y.writableEnded===!0)return!0;let c=Y._writableState;if(c!==null&&c!==void 0&&c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function Q0(Y,c){if(!L(Y))return null;if(Y.writableFinished===!0)return!0;let t=Y._writableState;if(t!==null&&t!==void 0&&t.errored)return!1;if(typeof(t===null||t===void 0?void 0:t.finished)!=="boolean")return null;return!!(t.finished||c===!1&&t.ended===!0&&t.length===0)}function F0(Y){if(!x(Y))return null;if(Y.readableEnded===!0)return!0;let c=Y._readableState;if(!c||c.errored)return!1;if(typeof(c===null||c===void 0?void 0:c.ended)!=="boolean")return null;return c.ended}function o(Y,c){if(!x(Y))return null;let t=Y._readableState;if(t!==null&&t!==void 0&&t.errored)return!1;if(typeof(t===null||t===void 0?void 0:t.endEmitted)!=="boolean")return null;return!!(t.endEmitted||c===!1&&t.ended===!0&&t.length===0)}function k(Y){if(Y&&Y[q]!=null)return Y[q];if(typeof(Y===null||Y===void 0?void 0:Y.readable)!=="boolean")return null;if(_(Y))return!1;return x(Y)&&Y.readable&&!o(Y)}function v(Y){if(Y&&Y[K]!=null)return Y[K];if(typeof(Y===null||Y===void 0?void 0:Y.writable)!=="boolean")return null;if(_(Y))return!1;return L(Y)&&Y.writable&&!i(Y)}function N(Y,c){if(!s(Y))return null;if(_(Y))return!0;if((c===null||c===void 0?void 0:c.readable)!==!1&&k(Y))return!1;if((c===null||c===void 0?void 0:c.writable)!==!1&&v(Y))return!1;return!0}function A(Y){var c,t;if(!s(Y))return null;if(Y.writableErrored)return Y.writableErrored;return(c=(t=Y._writableState)===null||t===void 0?void 0:t.errored)!==null&&c!==void 0?c:null}function D(Y){var c,t;if(!s(Y))return null;if(Y.readableErrored)return Y.readableErrored;return(c=(t=Y._readableState)===null||t===void 0?void 0:t.errored)!==null&&c!==void 0?c:null}function V(Y){if(!s(Y))return null;if(typeof Y.closed==="boolean")return Y.closed;let{_writableState:c,_readableState:t}=Y;if(typeof(c===null||c===void 0?void 0:c.closed)==="boolean"||typeof(t===null||t===void 0?void 0:t.closed)==="boolean")return(c===null||c===void 0?void 0:c.closed)||(t===null||t===void 0?void 0:t.closed);if(typeof Y._closed==="boolean"&&m(Y))return Y._closed;return null}function m(Y){return typeof Y._closed==="boolean"&&typeof Y._defaultKeepAlive==="boolean"&&typeof Y._removedConnection==="boolean"&&typeof Y._removedContLen==="boolean"}function e(Y){return typeof Y._sent100==="boolean"&&m(Y)}function U0(Y){var c;return typeof Y._consuming==="boolean"&&typeof Y._dumped==="boolean"&&((c=Y.req)===null||c===void 0?void 0:c.upgradeOrConnect)===void 0}function q0(Y){if(!s(Y))return null;let{_writableState:c,_readableState:t}=Y,R=c||t;return!R&&e(Y)||!!(R&&R.autoDestroy&&R.emitClose&&R.closed===!1)}function f(Y){var c;return!!(Y&&((c=Y[H])!==null&&c!==void 0?c:Y.readableDidRead||Y.readableAborted))}function X0(Y){var c,t,R,w0,J0,H0,Y0,S,y,d;return!!(Y&&((c=(t=(R=(w0=(J0=(H0=Y[J])!==null&&H0!==void 0?H0:Y.readableErrored)!==null&&J0!==void 0?J0:Y.writableErrored)!==null&&w0!==void 0?w0:(Y0=Y._readableState)===null||Y0===void 0?void 0:Y0.errorEmitted)!==null&&R!==void 0?R:(S=Y._writableState)===null||S===void 0?void 0:S.errorEmitted)!==null&&t!==void 0?t:(y=Y._readableState)===null||y===void 0?void 0:y.errored)!==null&&c!==void 0?c:(d=Y._writableState)===null||d===void 0?void 0:d.errored))}B.exports={isDestroyed:_,kIsDestroyed:Z,isDisturbed:f,kIsDisturbed:H,isErrored:X0,kIsErrored:J,isReadable:k,kIsReadable:q,kIsClosedPromise:G,kControllerErrorFunction:M,kIsWritable:K,isClosed:V,isDuplexNodeStream:h0,isFinished:N,isIterable:j,isReadableNodeStream:x,isReadableStream:O,isReadableEnded:F0,isReadableFinished:o,isReadableErrored:D,isNodeStream:s,isWebStream:C,isWritable:v,isWritableNodeStream:L,isWritableStream:E,isWritableEnded:i,isWritableFinished:Q0,isWritableErrored:A,isServerRequest:U0,isServerResponse:e,willEmitClose:q0,isTransformStream:F}}),a0=z0((h,B)=>{var w=Z2(),{AbortError:U,codes:X}=O0(),{ERR_INVALID_ARG_TYPE:Z,ERR_STREAM_PREMATURE_CLOSE:J}=X,{kEmptyObject:q,once:K}=E0(),{validateAbortSignal:H,validateFunction:G,validateObject:M,validateBoolean:x}=j2(),{Promise:L,PromisePrototypeThen:h0,SymbolDispose:s}=C0(),{isClosed:O,isReadable:E,isReadableNodeStream:F,isReadableStream:C,isReadableFinished:j,isReadableErrored:_,isWritable:i,isWritableNodeStream:Q0,isWritableStream:F0,isWritableFinished:o,isWritableErrored:k,isNodeStream:v,willEmitClose:N,kIsClosedPromise:A}=l0(),D;function V(f){return f.setHeader&&typeof f.abort==="function"}var m=()=>{};function e(f,X0,Y){var c,t;if(arguments.length===2)Y=X0,X0=q;else if(X0==null)X0=q;else M(X0,"options");if(G(Y,"callback"),H(X0.signal,"options.signal"),Y=K(Y),C(f)||F0(f))return U0(f,X0,Y);if(!v(f))throw new Z("stream",["ReadableStream","WritableStream","Stream"],f);let R=(c=X0.readable)!==null&&c!==void 0?c:F(f),w0=(t=X0.writable)!==null&&t!==void 0?t:Q0(f),J0=f._writableState,H0=f._readableState,Y0=()=>{if(!f.writable)d()},S=N(f)&&F(f)===R&&Q0(f)===w0,y=o(f,!1),d=()=>{if(y=!0,f.destroyed)S=!1;if(S&&(!f.readable||R))return;if(!R||I0)Y.call(f)},I0=j(f,!1),K0=()=>{if(I0=!0,f.destroyed)S=!1;if(S&&(!f.writable||w0))return;if(!w0||y)Y.call(f)},z=($)=>{Y.call(f,$)},W=O(f),T=()=>{W=!0;let $=k(f)||_(f);if($&&typeof $!=="boolean")return Y.call(f,$);if(R&&!I0&&F(f,!0)){if(!j(f,!1))return Y.call(f,new J)}if(w0&&!y){if(!o(f,!1))return Y.call(f,new J)}Y.call(f)},b=()=>{W=!0;let $=k(f)||_(f);if($&&typeof $!=="boolean")return Y.call(f,$);Y.call(f)},n=()=>{f.req.on("finish",d)};if(V(f)){if(f.on("complete",d),!S)f.on("abort",T);if(f.req)n();else f.on("request",n)}else if(w0&&!J0)f.on("end",Y0),f.on("close",Y0);if(!S&&typeof f.aborted==="boolean")f.on("aborted",T);if(f.on("end",K0),f.on("finish",d),X0.error!==!1)f.on("error",z);if(f.on("close",T),W)w.nextTick(T);else if(J0!==null&&J0!==void 0&&J0.errorEmitted||H0!==null&&H0!==void 0&&H0.errorEmitted){if(!S)w.nextTick(b)}else if(!R&&(!S||E(f))&&(y||i(f)===!1))w.nextTick(b);else if(!w0&&(!S||i(f))&&(I0||E(f)===!1))w.nextTick(b);else if(H0&&f.req&&f.aborted)w.nextTick(b);let l=()=>{if(Y=m,f.removeListener("aborted",T),f.removeListener("complete",d),f.removeListener("abort",T),f.removeListener("request",n),f.req)f.req.removeListener("finish",d);f.removeListener("end",Y0),f.removeListener("close",Y0),f.removeListener("finish",d),f.removeListener("end",K0),f.removeListener("error",z),f.removeListener("close",T)};if(X0.signal&&!W){let $=()=>{let u=Y;l(),u.call(f,new U(void 0,{cause:X0.signal.reason}))};if(X0.signal.aborted)w.nextTick($);else{D=D||E0().addAbortListener;let u=D(X0.signal,$),r=Y;Y=K((...g)=>{u[s](),r.apply(f,g)})}}return l}function U0(f,X0,Y){let c=!1,t=m;if(X0.signal)if(t=()=>{c=!0,Y.call(f,new U(void 0,{cause:X0.signal.reason}))},X0.signal.aborted)w.nextTick(t);else{D=D||E0().addAbortListener;let w0=D(X0.signal,t),J0=Y;Y=K((...H0)=>{w0[s](),J0.apply(f,H0)})}let R=(...w0)=>{if(!c)w.nextTick(()=>Y.apply(f,w0))};return h0(f[A].promise,R,R),m}function q0(f,X0){var Y;let c=!1;if(X0===null)X0=q;if((Y=X0)!==null&&Y!==void 0&&Y.cleanup)x(X0.cleanup,"cleanup"),c=X0.cleanup;return new L((t,R)=>{let w0=e(f,X0,(J0)=>{if(c)w0();if(J0)R(J0);else t()})})}B.exports=e,B.exports.finished=q0}),Y2=z0((h,B)=>{var w=Z2(),{aggregateTwoErrors:U,codes:{ERR_MULTIPLE_CALLBACK:X},AbortError:Z}=O0(),{Symbol:J}=C0(),{kIsDestroyed:q,isDestroyed:K,isFinished:H,isServerRequest:G}=l0(),M=J("kDestroy"),x=J("kConstruct");function L(N,A,D){if(N){if(N.stack,A&&!A.errored)A.errored=N;if(D&&!D.errored)D.errored=N}}function h0(N,A){let D=this._readableState,V=this._writableState,m=V||D;if(V!==null&&V!==void 0&&V.destroyed||D!==null&&D!==void 0&&D.destroyed){if(typeof A==="function")A();return this}if(L(N,V,D),V)V.destroyed=!0;if(D)D.destroyed=!0;if(!m.constructed)this.once(M,function(e){s(this,U(e,N),A)});else s(this,N,A);return this}function s(N,A,D){let V=!1;function m(e){if(V)return;V=!0;let{_readableState:U0,_writableState:q0}=N;if(L(e,q0,U0),q0)q0.closed=!0;if(U0)U0.closed=!0;if(typeof D==="function")D(e);if(e)w.nextTick(O,N,e);else w.nextTick(E,N)}try{N._destroy(A||null,m)}catch(e){m(e)}}function O(N,A){F(N,A),E(N)}function E(N){let{_readableState:A,_writableState:D}=N;if(D)D.closeEmitted=!0;if(A)A.closeEmitted=!0;if(D!==null&&D!==void 0&&D.emitClose||A!==null&&A!==void 0&&A.emitClose)N.emit("close")}function F(N,A){let{_readableState:D,_writableState:V}=N;if(V!==null&&V!==void 0&&V.errorEmitted||D!==null&&D!==void 0&&D.errorEmitted)return;if(V)V.errorEmitted=!0;if(D)D.errorEmitted=!0;N.emit("error",A)}function C(){let N=this._readableState,A=this._writableState;if(N)N.constructed=!0,N.closed=!1,N.closeEmitted=!1,N.destroyed=!1,N.errored=null,N.errorEmitted=!1,N.reading=!1,N.ended=N.readable===!1,N.endEmitted=N.readable===!1;if(A)A.constructed=!0,A.destroyed=!1,A.closed=!1,A.closeEmitted=!1,A.errored=null,A.errorEmitted=!1,A.finalCalled=!1,A.prefinished=!1,A.ended=A.writable===!1,A.ending=A.writable===!1,A.finished=A.writable===!1}function j(N,A,D){let{_readableState:V,_writableState:m}=N;if(m!==null&&m!==void 0&&m.destroyed||V!==null&&V!==void 0&&V.destroyed)return this;if(V!==null&&V!==void 0&&V.autoDestroy||m!==null&&m!==void 0&&m.autoDestroy)N.destroy(A);else if(A){if(A.stack,m&&!m.errored)m.errored=A;if(V&&!V.errored)V.errored=A;if(D)w.nextTick(F,N,A);else F(N,A)}}function _(N,A){if(typeof N._construct!=="function")return;let{_readableState:D,_writableState:V}=N;if(D)D.constructed=!1;if(V)V.constructed=!1;if(N.once(x,A),N.listenerCount(x)>1)return;w.nextTick(i,N)}function i(N){let A=!1;function D(V){if(A){j(N,V!==null&&V!==void 0?V:new X);return}A=!0;let{_readableState:m,_writableState:e}=N,U0=e||m;if(m)m.constructed=!0;if(e)e.constructed=!0;if(U0.destroyed)N.emit(M,V);else if(V)j(N,V,!0);else w.nextTick(Q0,N)}try{N._construct((V)=>{w.nextTick(D,V)})}catch(V){w.nextTick(D,V)}}function Q0(N){N.emit(x)}function F0(N){return(N===null||N===void 0?void 0:N.setHeader)&&typeof N.abort==="function"}function o(N){N.emit("close")}function k(N,A){N.emit("error",A),w.nextTick(o,N)}function v(N,A){if(!N||K(N))return;if(!A&&!H(N))A=new Z;if(G(N))N.socket=null,N.destroy(A);else if(F0(N))N.abort();else if(F0(N.req))N.req.abort();else if(typeof N.destroy==="function")N.destroy(A);else if(typeof N.close==="function")N.close();else if(A)w.nextTick(k,N,A);else w.nextTick(o,N);if(!N.destroyed)N[q]=!0}B.exports={construct:_,destroyer:v,destroy:h0,undestroy:C,errorOrDestroy:j}}),e2=z0((h,B)=>{var{ArrayIsArray:w,ObjectSetPrototypeOf:U}=C0(),{EventEmitter:X}=(M2(),_0(W2));function Z(q){X.call(this,q)}U(Z.prototype,X.prototype),U(Z,X),Z.prototype.pipe=function(q,K){let H=this;function G(E){if(q.writable&&q.write(E)===!1&&H.pause)H.pause()}H.on("data",G);function M(){if(H.readable&&H.resume)H.resume()}if(q.on("drain",M),!q._isStdio&&(!K||K.end!==!1))H.on("end",L),H.on("close",h0);let x=!1;function L(){if(x)return;x=!0,q.end()}function h0(){if(x)return;if(x=!0,typeof q.destroy==="function")q.destroy()}function s(E){if(O(),X.listenerCount(this,"error")===0)this.emit("error",E)}J(H,"error",s),J(q,"error",s);function O(){H.removeListener("data",G),q.removeListener("drain",M),H.removeListener("end",L),H.removeListener("close",h0),H.removeListener("error",s),q.removeListener("error",s),H.removeListener("end",O),H.removeListener("close",O),q.removeListener("close",O)}return H.on("end",O),H.on("close",O),q.on("close",O),q.emit("pipe",H),q};function J(q,K,H){if(typeof q.prependListener==="function")return q.prependListener(K,H);if(!q._events||!q._events[K])q.on(K,H);else if(w(q._events[K]))q._events[K].unshift(H);else q._events[K]=[H,q._events[K]]}B.exports={Stream:Z,prependListener:J}}),P2=z0((h,B)=>{var{SymbolDispose:w}=C0(),{AbortError:U,codes:X}=O0(),{isNodeStream:Z,isWebStream:J,kControllerErrorFunction:q}=l0(),K=a0(),{ERR_INVALID_ARG_TYPE:H}=X,G,M=(x,L)=>{if(typeof x!=="object"||!("aborted"in x))throw new H(L,"AbortSignal",x)};B.exports.addAbortSignal=function(x,L){if(M(x,"signal"),!Z(L)&&!J(L))throw new H("stream",["ReadableStream","WritableStream","Stream"],L);return B.exports.addAbortSignalNoValidate(x,L)},B.exports.addAbortSignalNoValidate=function(x,L){if(typeof x!=="object"||!("aborted"in x))return L;let h0=Z(L)?()=>{L.destroy(new U(void 0,{cause:x.reason}))}:()=>{L[q](new U(void 0,{cause:x.reason}))};if(x.aborted)h0();else{G=G||E0().addAbortListener;let s=G(x,h0);K(L,s[w])}return L}}),u8=z0((h,B)=>{var{StringPrototypeSlice:w,SymbolIterator:U,TypedArrayPrototypeSet:X,Uint8Array:Z}=C0(),{Buffer:J}=(i0(),_0(b0)),{inspect:q}=E0();B.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(K){let H={data:K,next:null};if(this.length>0)this.tail.next=H;else this.head=H;this.tail=H,++this.length}unshift(K){let H={data:K,next:this.head};if(this.length===0)this.tail=H;this.head=H,++this.length}shift(){if(this.length===0)return;let K=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,K}clear(){this.head=this.tail=null,this.length=0}join(K){if(this.length===0)return"";let H=this.head,G=""+H.data;while((H=H.next)!==null)G+=K+H.data;return G}concat(K){if(this.length===0)return J.alloc(0);let H=J.allocUnsafe(K>>>0),G=this.head,M=0;while(G)X(H,G.data,M),M+=G.data.length,G=G.next;return H}consume(K,H){let G=this.head.data;if(K<G.length){let M=G.slice(0,K);return this.head.data=G.slice(K),M}if(K===G.length)return this.shift();return H?this._getString(K):this._getBuffer(K)}first(){return this.head.data}*[U](){for(let K=this.head;K;K=K.next)yield K.data}_getString(K){let H="",G=this.head,M=0;do{let x=G.data;if(K>x.length)H+=x,K-=x.length;else{if(K===x.length)if(H+=x,++M,G.next)this.head=G.next;else this.head=this.tail=null;else H+=w(x,0,K),this.head=G,G.data=w(x,K);break}++M}while((G=G.next)!==null);return this.length-=M,H}_getBuffer(K){let H=J.allocUnsafe(K),G=K,M=this.head,x=0;do{let L=M.data;if(K>L.length)X(H,L,G-K),K-=L.length;else{if(K===L.length)if(X(H,L,G-K),++x,M.next)this.head=M.next;else this.head=this.tail=null;else X(H,new Z(L.buffer,L.byteOffset,K),G-K),this.head=M,M.data=L.slice(K);break}++x}while((M=M.next)!==null);return this.length-=x,H}[Symbol.for("nodejs.util.inspect.custom")](K,H){return q(this,{...H,depth:0,customInspect:!1})}}}),T2=z0((h,B)=>{var{MathFloor:w,NumberIsInteger:U}=C0(),{validateInteger:X}=j2(),{ERR_INVALID_ARG_VALUE:Z}=O0().codes,J=16384,q=16;function K(x,L,h0){return x.highWaterMark!=null?x.highWaterMark:L?x[h0]:null}function H(x){return x?q:J}function G(x,L){if(X(L,"value",0),x)q=L;else J=L}function M(x,L,h0,s){let O=K(L,s,h0);if(O!=null){if(!U(O)||O<0){let E=s?`options.${h0}`:"options.highWaterMark";throw new Z(E,O)}return w(O)}return H(x.objectMode)}B.exports={getHighWaterMark:M,getDefaultHighWaterMark:H,setDefaultHighWaterMark:G}}),v8=z0((h,B)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var w=(i0(),_0(b0)),U=w.Buffer;function X(J,q){for(var K in J)q[K]=J[K]}if(U.from&&U.alloc&&U.allocUnsafe&&U.allocUnsafeSlow)B.exports=w;else X(w,h),h.Buffer=Z;function Z(J,q,K){return U(J,q,K)}Z.prototype=Object.create(U.prototype),X(U,Z),Z.from=function(J,q,K){if(typeof J==="number")throw TypeError("Argument must not be a number");return U(J,q,K)},Z.alloc=function(J,q,K){if(typeof J!=="number")throw TypeError("Argument must be a number");var H=U(J);if(q!==void 0)if(typeof K==="string")H.fill(q,K);else H.fill(q);else H.fill(0);return H},Z.allocUnsafe=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return U(J)},Z.allocUnsafeSlow=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return w.SlowBuffer(J)}}),g8=z0((h)=>{var B=v8().Buffer,w=B.isEncoding||function(F){switch(F=""+F,F&&F.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function U(F){if(!F)return"utf8";var C;while(!0)switch(F){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return F;default:if(C)return;F=(""+F).toLowerCase(),C=!0}}function X(F){var C=U(F);if(typeof C!=="string"&&(B.isEncoding===w||!w(F)))throw Error("Unknown encoding: "+F);return C||F}h.StringDecoder=Z;function Z(F){this.encoding=X(F);var C;switch(this.encoding){case"utf16le":this.text=x,this.end=L,C=4;break;case"utf8":this.fillLast=H,C=4;break;case"base64":this.text=h0,this.end=s,C=3;break;default:this.write=O,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=B.allocUnsafe(C)}Z.prototype.write=function(F){if(F.length===0)return"";var C,j;if(this.lastNeed){if(C=this.fillLast(F),C===void 0)return"";j=this.lastNeed,this.lastNeed=0}else j=0;if(j<F.length)return C?C+this.text(F,j):this.text(F,j);return C||""},Z.prototype.end=M,Z.prototype.text=G,Z.prototype.fillLast=function(F){if(this.lastNeed<=F.length)return F.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);F.copy(this.lastChar,this.lastTotal-this.lastNeed,0,F.length),this.lastNeed-=F.length};function J(F){if(F<=127)return 0;else if(F>>5===6)return 2;else if(F>>4===14)return 3;else if(F>>3===30)return 4;return F>>6===2?-1:-2}function q(F,C,j){var _=C.length-1;if(_<j)return 0;var i=J(C[_]);if(i>=0){if(i>0)F.lastNeed=i-1;return i}if(--_<j||i===-2)return 0;if(i=J(C[_]),i>=0){if(i>0)F.lastNeed=i-2;return i}if(--_<j||i===-2)return 0;if(i=J(C[_]),i>=0){if(i>0)if(i===2)i=0;else F.lastNeed=i-3;return i}return 0}function K(F,C,j){if((C[0]&192)!==128)return F.lastNeed=0,"�";if(F.lastNeed>1&&C.length>1){if((C[1]&192)!==128)return F.lastNeed=1,"�";if(F.lastNeed>2&&C.length>2){if((C[2]&192)!==128)return F.lastNeed=2,"�"}}}function H(F){var C=this.lastTotal-this.lastNeed,j=K(this,F,C);if(j!==void 0)return j;if(this.lastNeed<=F.length)return F.copy(this.lastChar,C,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);F.copy(this.lastChar,C,0,F.length),this.lastNeed-=F.length}function G(F,C){var j=q(this,F,C);if(!this.lastNeed)return F.toString("utf8",C);this.lastTotal=j;var _=F.length-(j-this.lastNeed);return F.copy(this.lastChar,0,_),F.toString("utf8",C,_)}function M(F){var C=F&&F.length?this.write(F):"";if(this.lastNeed)return C+"�";return C}function x(F,C){if((F.length-C)%2===0){var j=F.toString("utf16le",C);if(j){var _=j.charCodeAt(j.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=F[F.length-2],this.lastChar[1]=F[F.length-1],j.slice(0,-1)}return j}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=F[F.length-1],F.toString("utf16le",C,F.length-1)}function L(F){var C=F&&F.length?this.write(F):"";if(this.lastNeed){var j=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,j)}return C}function h0(F,C){var j=(F.length-C)%3;if(j===0)return F.toString("base64",C);if(this.lastNeed=3-j,this.lastTotal=3,j===1)this.lastChar[0]=F[F.length-1];else this.lastChar[0]=F[F.length-2],this.lastChar[1]=F[F.length-1];return F.toString("base64",C,F.length-j)}function s(F){var C=F&&F.length?this.write(F):"";if(this.lastNeed)return C+this.lastChar.toString("base64",0,3-this.lastNeed);return C}function O(F){return F.toString(this.encoding)}function E(F){return F&&F.length?this.write(F):""}}),H6=z0((h,B)=>{var w=Z2(),{PromisePrototypeThen:U,SymbolAsyncIterator:X,SymbolIterator:Z}=C0(),{Buffer:J}=(i0(),_0(b0)),{ERR_INVALID_ARG_TYPE:q,ERR_STREAM_NULL_VALUES:K}=O0().codes;function H(G,M,x){let L;if(typeof M==="string"||M instanceof J)return new G({objectMode:!0,...x,read(){this.push(M),this.push(null)}});let h0;if(M&&M[X])h0=!0,L=M[X]();else if(M&&M[Z])h0=!1,L=M[Z]();else throw new q("iterable",["Iterable"],M);let s=new G({objectMode:!0,highWaterMark:1,...x}),O=!1;s._read=function(){if(!O)O=!0,F()},s._destroy=function(C,j){U(E(C),()=>w.nextTick(j,C),(_)=>w.nextTick(j,_||C))};async function E(C){let j=C!==void 0&&C!==null,_=typeof L.throw==="function";if(j&&_){let{value:i,done:Q0}=await L.throw(C);if(await i,Q0)return}if(typeof L.return==="function"){let{value:i}=await L.return();await i}}async function F(){for(;;){try{let{value:C,done:j}=h0?await L.next():L.next();if(j)s.push(null);else{let _=C&&typeof C.then==="function"?await C:C;if(_===null)throw O=!1,new K;else if(s.push(_))continue;else O=!1}}catch(C){s.destroy(C)}break}}return s}B.exports=H}),_2=z0((h,B)=>{var w=Z2(),{ArrayPrototypeIndexOf:U,NumberIsInteger:X,NumberIsNaN:Z,NumberParseInt:J,ObjectDefineProperties:q,ObjectKeys:K,ObjectSetPrototypeOf:H,Promise:G,SafeSet:M,SymbolAsyncDispose:x,SymbolAsyncIterator:L,Symbol:h0}=C0();B.exports=g,g.ReadableState=r;var{EventEmitter:s}=(M2(),_0(W2)),{Stream:O,prependListener:E}=e2(),{Buffer:F}=(i0(),_0(b0)),{addAbortSignal:C}=P2(),j=a0(),_=E0().debuglog("stream",(Q)=>{_=Q}),i=u8(),Q0=Y2(),{getHighWaterMark:F0,getDefaultHighWaterMark:o}=T2(),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:A,ERR_STREAM_PUSH_AFTER_EOF:D,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:V},AbortError:m}=O0(),{validateObject:e}=j2(),U0=h0("kPaused"),{StringDecoder:q0}=g8(),f=H6();H(g.prototype,O.prototype),H(g,O);var X0=()=>{},{errorOrDestroy:Y}=Q0,c=1,t=2,R=4,w0=8,J0=16,H0=32,Y0=64,S=128,y=256,d=512,I0=1024,K0=2048,z=4096,W=8192,T=16384,b=32768,n=65536,l=131072,$=262144;function u(Q){return{enumerable:!1,get(){return(this.state&Q)!==0},set(I){if(I)this.state|=Q;else this.state&=~Q}}}q(r.prototype,{objectMode:u(c),ended:u(t),endEmitted:u(R),reading:u(w0),constructed:u(J0),sync:u(H0),needReadable:u(Y0),emittedReadable:u(S),readableListening:u(y),resumeScheduled:u(d),errorEmitted:u(I0),emitClose:u(K0),autoDestroy:u(z),destroyed:u(W),closed:u(T),closeEmitted:u(b),multiAwaitDrain:u(n),readingMore:u(l),dataEmitted:u($)});function r(Q,I,p){if(typeof p!=="boolean")p=I instanceof d0();if(this.state=K0|z|J0|H0,Q&&Q.objectMode)this.state|=c;if(p&&Q&&Q.readableObjectMode)this.state|=c;if(this.highWaterMark=Q?F0(this,Q,"readableHighWaterMark",p):o(!1),this.buffer=new i,this.length=0,this.pipes=[],this.flowing=null,this[U0]=null,Q&&Q.emitClose===!1)this.state&=~K0;if(Q&&Q.autoDestroy===!1)this.state&=~z;if(this.errored=null,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,Q&&Q.encoding)this.decoder=new q0(Q.encoding),this.encoding=Q.encoding}function g(Q){if(!(this instanceof g))return new g(Q);let I=this instanceof d0();if(this._readableState=new r(Q,this,I),Q){if(typeof Q.read==="function")this._read=Q.read;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal&&!I)C(Q.signal,this)}O.call(this,Q),Q0.construct(this,()=>{if(this._readableState.needReadable)I2(this,this._readableState)})}g.prototype.destroy=Q0.destroy,g.prototype._undestroy=Q0.undestroy,g.prototype._destroy=function(Q,I){I(Q)},g.prototype[s.captureRejectionSymbol]=function(Q){this.destroy(Q)},g.prototype[x]=function(){let Q;if(!this.destroyed)Q=this.readableEnded?null:new m,this.destroy(Q);return new G((I,p)=>j(this,(a)=>a&&a!==Q?p(a):I(null)))},g.prototype.push=function(Q,I){return Z0(this,Q,I,!1)},g.prototype.unshift=function(Q,I){return Z0(this,Q,I,!0)};function Z0(Q,I,p,a){_("readableAddChunk",I);let B0=Q._readableState,j0;if((B0.state&c)===0){if(typeof I==="string"){if(p=p||B0.defaultEncoding,B0.encoding!==p)if(a&&B0.encoding)I=F.from(I,p).toString(B0.encoding);else I=F.from(I,p),p=""}else if(I instanceof F)p="";else if(O._isUint8Array(I))I=O._uint8ArrayToBuffer(I),p="";else if(I!=null)j0=new v("chunk",["string","Buffer","Uint8Array"],I)}if(j0)Y(Q,j0);else if(I===null)B0.state&=~w0,V0(Q,B0);else if((B0.state&c)!==0||I&&I.length>0)if(a)if((B0.state&R)!==0)Y(Q,new V);else if(B0.destroyed||B0.errored)return!1;else $0(Q,B0,I,!0);else if(B0.ended)Y(Q,new D);else if(B0.destroyed||B0.errored)return!1;else if(B0.state&=~w0,B0.decoder&&!p)if(I=B0.decoder.write(I),B0.objectMode||I.length!==0)$0(Q,B0,I,!1);else I2(Q,B0);else $0(Q,B0,I,!1);else if(!a)B0.state&=~w0,I2(Q,B0);return!B0.ended&&(B0.length<B0.highWaterMark||B0.length===0)}function $0(Q,I,p,a){if(I.flowing&&I.length===0&&!I.sync&&Q.listenerCount("data")>0){if((I.state&n)!==0)I.awaitDrainWriters.clear();else I.awaitDrainWriters=null;I.dataEmitted=!0,Q.emit("data",p)}else{if(I.length+=I.objectMode?1:p.length,a)I.buffer.unshift(p);else I.buffer.push(p);if((I.state&Y0)!==0)x0(Q)}I2(Q,I)}g.prototype.isPaused=function(){let Q=this._readableState;return Q[U0]===!0||Q.flowing===!1},g.prototype.setEncoding=function(Q){let I=new q0(Q);this._readableState.decoder=I,this._readableState.encoding=this._readableState.decoder.encoding;let p=this._readableState.buffer,a="";for(let B0 of p)a+=I.write(B0);if(p.clear(),a!=="")p.push(a);return this._readableState.length=a.length,this};var D0=1073741824;function P0(Q){if(Q>D0)throw new A("size","<= 1GiB",Q);else Q--,Q|=Q>>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++;return Q}function t0(Q,I){if(Q<=0||I.length===0&&I.ended)return 0;if((I.state&c)!==0)return 1;if(Z(Q)){if(I.flowing&&I.length)return I.buffer.first().length;return I.length}if(Q<=I.length)return Q;return I.ended?I.length:0}g.prototype.read=function(Q){if(_("read",Q),Q===void 0)Q=NaN;else if(!X(Q))Q=J(Q,10);let I=this._readableState,p=Q;if(Q>I.highWaterMark)I.highWaterMark=P0(Q);if(Q!==0)I.state&=~S;if(Q===0&&I.needReadable&&((I.highWaterMark!==0?I.length>=I.highWaterMark:I.length>0)||I.ended)){if(_("read: emitReadable",I.length,I.ended),I.length===0&&I.ended)k2(this);else x0(this);return null}if(Q=t0(Q,I),Q===0&&I.ended){if(I.length===0)k2(this);return null}let a=(I.state&Y0)!==0;if(_("need readable",a),I.length===0||I.length-Q<I.highWaterMark)a=!0,_("length less than watermark",a);if(I.ended||I.reading||I.destroyed||I.errored||!I.constructed)a=!1,_("reading, ended or constructing",a);else if(a){if(_("do read"),I.state|=w0|H0,I.length===0)I.state|=Y0;try{this._read(I.highWaterMark)}catch(j0){Y(this,j0)}if(I.state&=~H0,!I.reading)Q=t0(p,I)}let B0;if(Q>0)B0=H1(Q,I);else B0=null;if(B0===null)I.needReadable=I.length<=I.highWaterMark,Q=0;else if(I.length-=Q,I.multiAwaitDrain)I.awaitDrainWriters.clear();else I.awaitDrainWriters=null;if(I.length===0){if(!I.ended)I.needReadable=!0;if(p!==Q&&I.ended)k2(this)}if(B0!==null&&!I.errorEmitted&&!I.closeEmitted)I.dataEmitted=!0,this.emit("data",B0);return B0};function V0(Q,I){if(_("onEofChunk"),I.ended)return;if(I.decoder){let p=I.decoder.end();if(p&&p.length)I.buffer.push(p),I.length+=I.objectMode?1:p.length}if(I.ended=!0,I.sync)x0(Q);else I.needReadable=!1,I.emittedReadable=!0,J2(Q)}function x0(Q){let I=Q._readableState;if(_("emitReadable",I.needReadable,I.emittedReadable),I.needReadable=!1,!I.emittedReadable)_("emitReadable",I.flowing),I.emittedReadable=!0,w.nextTick(J2,Q)}function J2(Q){let I=Q._readableState;if(_("emitReadable_",I.destroyed,I.length,I.ended),!I.destroyed&&!I.errored&&(I.length||I.ended))Q.emit("readable"),I.emittedReadable=!1;I.needReadable=!I.flowing&&!I.ended&&I.length<=I.highWaterMark,Y1(Q)}function I2(Q,I){if(!I.readingMore&&I.constructed)I.readingMore=!0,w.nextTick(S0,Q,I)}function S0(Q,I){while(!I.reading&&!I.ended&&(I.length<I.highWaterMark||I.flowing&&I.length===0)){let p=I.length;if(_("maybeReadMore read 0"),Q.read(0),p===I.length)break}I.readingMore=!1}g.prototype._read=function(Q){throw new N("_read()")},g.prototype.pipe=function(Q,I){let p=this,a=this._readableState;if(a.pipes.length===1){if(!a.multiAwaitDrain)a.multiAwaitDrain=!0,a.awaitDrainWriters=new M(a.awaitDrainWriters?[a.awaitDrainWriters]:[])}a.pipes.push(Q),_("pipe count=%d opts=%j",a.pipes.length,I);let B0=(!I||I.end!==!1)&&Q!==w.stdout&&Q!==w.stderr?T0:q2;if(a.endEmitted)w.nextTick(B0);else p.once("end",B0);Q.on("unpipe",j0);function j0(h2,u0){if(_("onunpipe"),h2===p){if(u0&&u0.hasUnpiped===!1)u0.hasUnpiped=!0,k6()}}function T0(){_("onend"),Q.end()}let e0,$1=!1;function k6(){if(_("cleanup"),Q.removeListener("close",f2),Q.removeListener("finish",c2),e0)Q.removeListener("drain",e0);if(Q.removeListener("error",y2),Q.removeListener("unpipe",j0),p.removeListener("end",T0),p.removeListener("end",q2),p.removeListener("data",N1),$1=!0,e0&&a.awaitDrainWriters&&(!Q._writableState||Q._writableState.needDrain))e0()}function G1(){if(!$1){if(a.pipes.length===1&&a.pipes[0]===Q)_("false write response, pause",0),a.awaitDrainWriters=Q,a.multiAwaitDrain=!1;else if(a.pipes.length>1&&a.pipes.includes(Q))_("false write response, pause",a.awaitDrainWriters.size),a.awaitDrainWriters.add(Q);p.pause()}if(!e0)e0=L6(p,Q),Q.on("drain",e0)}p.on("data",N1);function N1(h2){_("ondata");let u0=Q.write(h2);if(_("dest.write",u0),u0===!1)G1()}function y2(h2){if(_("onerror",h2),q2(),Q.removeListener("error",y2),Q.listenerCount("error")===0){let u0=Q._writableState||Q._readableState;if(u0&&!u0.errorEmitted)Y(Q,h2);else Q.emit("error",h2)}}E(Q,"error",y2);function f2(){Q.removeListener("finish",c2),q2()}Q.once("close",f2);function c2(){_("onfinish"),Q.removeListener("close",f2),q2()}Q.once("finish",c2);function q2(){_("unpipe"),p.unpipe(Q)}if(Q.emit("pipe",p),Q.writableNeedDrain===!0)G1();else if(!a.flowing)_("pipe resume"),p.resume();return Q};function L6(Q,I){return function(){let p=Q._readableState;if(p.awaitDrainWriters===I)_("pipeOnDrain",1),p.awaitDrainWriters=null;else if(p.multiAwaitDrain)_("pipeOnDrain",p.awaitDrainWriters.size),p.awaitDrainWriters.delete(I);if((!p.awaitDrainWriters||p.awaitDrainWriters.size===0)&&Q.listenerCount("data"))Q.resume()}}g.prototype.unpipe=function(Q){let I=this._readableState,p={hasUnpiped:!1};if(I.pipes.length===0)return this;if(!Q){let B0=I.pipes;I.pipes=[],this.pause();for(let j0=0;j0<B0.length;j0++)B0[j0].emit("unpipe",this,{hasUnpiped:!1});return this}let a=U(I.pipes,Q);if(a===-1)return this;if(I.pipes.splice(a,1),I.pipes.length===0)this.pause();return Q.emit("unpipe",this,p),this},g.prototype.on=function(Q,I){let p=O.prototype.on.call(this,Q,I),a=this._readableState;if(Q==="data"){if(a.readableListening=this.listenerCount("readable")>0,a.flowing!==!1)this.resume()}else if(Q==="readable"){if(!a.endEmitted&&!a.readableListening){if(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,_("on readable",a.length,a.reading),a.length)x0(this);else if(!a.reading)w.nextTick(E6,this)}}return p},g.prototype.addListener=g.prototype.on,g.prototype.removeListener=function(Q,I){let p=O.prototype.removeListener.call(this,Q,I);if(Q==="readable")w.nextTick(K1,this);return p},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(Q){let I=O.prototype.removeAllListeners.apply(this,arguments);if(Q==="readable"||Q===void 0)w.nextTick(K1,this);return I};function K1(Q){let I=Q._readableState;if(I.readableListening=Q.listenerCount("readable")>0,I.resumeScheduled&&I[U0]===!1)I.flowing=!0;else if(Q.listenerCount("data")>0)Q.resume();else if(!I.readableListening)I.flowing=null}function E6(Q){_("readable nexttick read 0"),Q.read(0)}g.prototype.resume=function(){let Q=this._readableState;if(!Q.flowing)_("resume"),Q.flowing=!Q.readableListening,D6(this,Q);return Q[U0]=!1,this};function D6(Q,I){if(!I.resumeScheduled)I.resumeScheduled=!0,w.nextTick(P6,Q,I)}function P6(Q,I){if(_("resume",I.reading),!I.reading)Q.read(0);if(I.resumeScheduled=!1,Q.emit("resume"),Y1(Q),I.flowing&&!I.reading)Q.read(0)}g.prototype.pause=function(){if(_("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)_("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[U0]=!0,this};function Y1(Q){let I=Q._readableState;_("flow",I.flowing);while(I.flowing&&Q.read()!==null);}g.prototype.wrap=function(Q){let I=!1;Q.on("data",(a)=>{if(!this.push(a)&&Q.pause)I=!0,Q.pause()}),Q.on("end",()=>{this.push(null)}),Q.on("error",(a)=>{Y(this,a)}),Q.on("close",()=>{this.destroy()}),Q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(I&&Q.resume)I=!1,Q.resume()};let p=K(Q);for(let a=1;a<p.length;a++){let B0=p[a];if(this[B0]===void 0&&typeof Q[B0]==="function")this[B0]=Q[B0].bind(Q)}return this},g.prototype[L]=function(){return q1(this)},g.prototype.iterator=function(Q){if(Q!==void 0)e(Q,"options");return q1(this,Q)};function q1(Q,I){if(typeof Q.read!=="function")Q=g.wrap(Q,{objectMode:!0});let p=T6(Q,I);return p.stream=Q,p}async function*T6(Q,I){let p=X0;function a(T0){if(this===Q)p(),p=X0;else p=T0}Q.on("readable",a);let B0,j0=j(Q,{writable:!1},(T0)=>{B0=T0?k(B0,T0):null,p(),p=X0});try{while(!0){let T0=Q.destroyed?null:Q.read();if(T0!==null)yield T0;else if(B0)throw B0;else if(B0===null)return;else await new G(a)}}catch(T0){throw B0=k(B0,T0),B0}finally{if((B0||(I===null||I===void 0?void 0:I.destroyOnReturn)!==!1)&&(B0===void 0||Q._readableState.autoDestroy))Q0.destroyer(Q,null);else Q.off("readable",a),j0()}}q(g.prototype,{readable:{__proto__:null,get(){let Q=this._readableState;return!!Q&&Q.readable!==!1&&!Q.destroyed&&!Q.errorEmitted&&!Q.endEmitted},set(Q){if(this._readableState)this._readableState.readable=!!Q}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(Q){if(this._readableState)this._readableState.flowing=Q}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(Q){if(!this._readableState)return;this._readableState.destroyed=Q}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),q(r.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U0]!==!1},set(Q){this[U0]=!!Q}}}),g._fromList=H1;function H1(Q,I){if(I.length===0)return null;let p;if(I.objectMode)p=I.buffer.shift();else if(!Q||Q>=I.length){if(I.decoder)p=I.buffer.join("");else if(I.buffer.length===1)p=I.buffer.first();else p=I.buffer.concat(I.length);I.buffer.clear()}else p=I.buffer.consume(Q,I.decoder);return p}function k2(Q){let I=Q._readableState;if(_("endReadable",I.endEmitted),!I.endEmitted)I.ended=!0,w.nextTick(_6,I,Q)}function _6(Q,I){if(_("endReadableNT",Q.endEmitted,Q.length),!Q.errored&&!Q.closeEmitted&&!Q.endEmitted&&Q.length===0){if(Q.endEmitted=!0,I.emit("end"),I.writable&&I.allowHalfOpen===!1)w.nextTick(R6,I);else if(Q.autoDestroy){let p=I._writableState;if(!p||p.autoDestroy&&(p.finished||p.writable===!1))I.destroy()}}}function R6(Q){if(Q.writable&&!Q.writableEnded&&!Q.destroyed)Q.end()}g.from=function(Q,I){return f(g,Q,I)};var S2;function z1(){if(S2===void 0)S2={};return S2}g.fromWeb=function(Q,I){return z1().newStreamReadableFromReadableStream(Q,I)},g.toWeb=function(Q,I){return z1().newReadableStreamFromStreamReadable(Q,I)},g.wrap=function(Q,I){var p,a;return new g({objectMode:(p=(a=Q.readableObjectMode)!==null&&a!==void 0?a:Q.objectMode)!==null&&p!==void 0?p:!0,...I,destroy(B0,j0){Q0.destroyer(Q,B0),j0(B0)}}).wrap(Q)}}),h1=z0((h,B)=>{var w=Z2(),{ArrayPrototypeSlice:U,Error:X,FunctionPrototypeSymbolHasInstance:Z,ObjectDefineProperty:J,ObjectDefineProperties:q,ObjectSetPrototypeOf:K,StringPrototypeToLowerCase:H,Symbol:G,SymbolHasInstance:M}=C0();B.exports=e,e.WritableState=V;var{EventEmitter:x}=(M2(),_0(W2)),L=e2().Stream,{Buffer:h0}=(i0(),_0(b0)),s=Y2(),{addAbortSignal:O}=P2(),{getHighWaterMark:E,getDefaultHighWaterMark:F}=T2(),{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:i,ERR_STREAM_DESTROYED:Q0,ERR_STREAM_ALREADY_FINISHED:F0,ERR_STREAM_NULL_VALUES:o,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:v}=O0().codes,{errorOrDestroy:N}=s;K(e.prototype,L.prototype),K(e,L);function A(){}var D=G("kOnFinished");function V(z,W,T){if(typeof T!=="boolean")T=W instanceof d0();if(this.objectMode=!!(z&&z.objectMode),T)this.objectMode=this.objectMode||!!(z&&z.writableObjectMode);this.highWaterMark=z?E(this,z,"writableHighWaterMark",T):F(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let b=!!(z&&z.decodeStrings===!1);this.decodeStrings=!b,this.defaultEncoding=z&&z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=Y.bind(void 0,W),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,m(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!z||z.emitClose!==!1,this.autoDestroy=!z||z.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function m(z){z.buffered=[],z.bufferedIndex=0,z.allBuffers=!0,z.allNoop=!0}V.prototype.getBuffer=function(){return U(this.buffered,this.bufferedIndex)},J(V.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function e(z){let W=this instanceof d0();if(!W&&!Z(e,this))return new e(z);if(this._writableState=new V(z,this,W),z){if(typeof z.write==="function")this._write=z.write;if(typeof z.writev==="function")this._writev=z.writev;if(typeof z.destroy==="function")this._destroy=z.destroy;if(typeof z.final==="function")this._final=z.final;if(typeof z.construct==="function")this._construct=z.construct;if(z.signal)O(z.signal,this)}L.call(this,z),s.construct(this,()=>{let T=this._writableState;if(!T.writing)w0(this,T);S(this,T)})}J(e,M,{__proto__:null,value:function(z){if(Z(this,z))return!0;if(this!==e)return!1;return z&&z._writableState instanceof V}}),e.prototype.pipe=function(){N(this,new i)};function U0(z,W,T,b){let n=z._writableState;if(typeof T==="function")b=T,T=n.defaultEncoding;else{if(!T)T=n.defaultEncoding;else if(T!=="buffer"&&!h0.isEncoding(T))throw new v(T);if(typeof b!=="function")b=A}if(W===null)throw new o;else if(!n.objectMode)if(typeof W==="string"){if(n.decodeStrings!==!1)W=h0.from(W,T),T="buffer"}else if(W instanceof h0)T="buffer";else if(L._isUint8Array(W))W=L._uint8ArrayToBuffer(W),T="buffer";else throw new C("chunk",["string","Buffer","Uint8Array"],W);let l;if(n.ending)l=new k;else if(n.destroyed)l=new Q0("write");if(l)return w.nextTick(b,l),N(z,l,!0),l;return n.pendingcb++,q0(z,n,W,T,b)}e.prototype.write=function(z,W,T){return U0(this,z,W,T)===!0},e.prototype.cork=function(){this._writableState.corked++},e.prototype.uncork=function(){let z=this._writableState;if(z.corked){if(z.corked--,!z.writing)w0(this,z)}},e.prototype.setDefaultEncoding=function(z){if(typeof z==="string")z=H(z);if(!h0.isEncoding(z))throw new v(z);return this._writableState.defaultEncoding=z,this};function q0(z,W,T,b,n){let l=W.objectMode?1:T.length;W.length+=l;let $=W.length<W.highWaterMark;if(!$)W.needDrain=!0;if(W.writing||W.corked||W.errored||!W.constructed){if(W.buffered.push({chunk:T,encoding:b,callback:n}),W.allBuffers&&b!=="buffer")W.allBuffers=!1;if(W.allNoop&&n!==A)W.allNoop=!1}else W.writelen=l,W.writecb=n,W.writing=!0,W.sync=!0,z._write(T,b,W.onwrite),W.sync=!1;return $&&!W.errored&&!W.destroyed}function f(z,W,T,b,n,l,$){if(W.writelen=b,W.writecb=$,W.writing=!0,W.sync=!0,W.destroyed)W.onwrite(new Q0("write"));else if(T)z._writev(n,W.onwrite);else z._write(n,l,W.onwrite);W.sync=!1}function X0(z,W,T,b){--W.pendingcb,b(T),R(W),N(z,T)}function Y(z,W){let T=z._writableState,b=T.sync,n=T.writecb;if(typeof n!=="function"){N(z,new _);return}if(T.writing=!1,T.writecb=null,T.length-=T.writelen,T.writelen=0,W){if(W.stack,!T.errored)T.errored=W;if(z._readableState&&!z._readableState.errored)z._readableState.errored=W;if(b)w.nextTick(X0,z,T,W,n);else X0(z,T,W,n)}else{if(T.buffered.length>T.bufferedIndex)w0(z,T);if(b)if(T.afterWriteTickInfo!==null&&T.afterWriteTickInfo.cb===n)T.afterWriteTickInfo.count++;else T.afterWriteTickInfo={count:1,cb:n,stream:z,state:T},w.nextTick(c,T.afterWriteTickInfo);else t(z,T,1,n)}}function c({stream:z,state:W,count:T,cb:b}){return W.afterWriteTickInfo=null,t(z,W,T,b)}function t(z,W,T,b){if(!W.ending&&!z.destroyed&&W.length===0&&W.needDrain)W.needDrain=!1,z.emit("drain");while(T-- >0)W.pendingcb--,b();if(W.destroyed)R(W);S(z,W)}function R(z){if(z.writing)return;for(let n=z.bufferedIndex;n<z.buffered.length;++n){var W;let{chunk:l,callback:$}=z.buffered[n],u=z.objectMode?1:l.length;z.length-=u,$((W=z.errored)!==null&&W!==void 0?W:new Q0("write"))}let T=z[D].splice(0);for(let n=0;n<T.length;n++){var b;T[n]((b=z.errored)!==null&&b!==void 0?b:new Q0("end"))}m(z)}function w0(z,W){if(W.corked||W.bufferProcessing||W.destroyed||!W.constructed)return;let{buffered:T,bufferedIndex:b,objectMode:n}=W,l=T.length-b;if(!l)return;let $=b;if(W.bufferProcessing=!0,l>1&&z._writev){W.pendingcb-=l-1;let u=W.allNoop?A:(g)=>{for(let Z0=$;Z0<T.length;++Z0)T[Z0].callback(g)},r=W.allNoop&&$===0?T:U(T,$);r.allBuffers=W.allBuffers,f(z,W,!0,W.length,r,"",u),m(W)}else{do{let{chunk:u,encoding:r,callback:g}=T[$];T[$++]=null;let Z0=n?1:u.length;f(z,W,!1,Z0,u,r,g)}while($<T.length&&!W.writing);if($===T.length)m(W);else if($>256)T.splice(0,$),W.bufferedIndex=0;else W.bufferedIndex=$}W.bufferProcessing=!1}e.prototype._write=function(z,W,T){if(this._writev)this._writev([{chunk:z,encoding:W}],T);else throw new j("_write()")},e.prototype._writev=null,e.prototype.end=function(z,W,T){let b=this._writableState;if(typeof z==="function")T=z,z=null,W=null;else if(typeof W==="function")T=W,W=null;let n;if(z!==null&&z!==void 0){let l=U0(this,z,W);if(l instanceof X)n=l}if(b.corked)b.corked=1,this.uncork();if(n);else if(!b.errored&&!b.ending)b.ending=!0,S(this,b,!0),b.ended=!0;else if(b.finished)n=new F0("end");else if(b.destroyed)n=new Q0("end");if(typeof T==="function")if(n||b.finished)w.nextTick(T,n);else b[D].push(T);return this};function J0(z){return z.ending&&!z.destroyed&&z.constructed&&z.length===0&&!z.errored&&z.buffered.length===0&&!z.finished&&!z.writing&&!z.errorEmitted&&!z.closeEmitted}function H0(z,W){let T=!1;function b(n){if(T){N(z,n!==null&&n!==void 0?n:_());return}if(T=!0,W.pendingcb--,n){let l=W[D].splice(0);for(let $=0;$<l.length;$++)l[$](n);N(z,n,W.sync)}else if(J0(W))W.prefinished=!0,z.emit("prefinish"),W.pendingcb++,w.nextTick(y,z,W)}W.sync=!0,W.pendingcb++;try{z._final(b)}catch(n){b(n)}W.sync=!1}function Y0(z,W){if(!W.prefinished&&!W.finalCalled)if(typeof z._final==="function"&&!W.destroyed)W.finalCalled=!0,H0(z,W);else W.prefinished=!0,z.emit("prefinish")}function S(z,W,T){if(J0(W)){if(Y0(z,W),W.pendingcb===0){if(T)W.pendingcb++,w.nextTick((b,n)=>{if(J0(n))y(b,n);else n.pendingcb--},z,W);else if(J0(W))W.pendingcb++,y(z,W)}}}function y(z,W){W.pendingcb--,W.finished=!0;let T=W[D].splice(0);for(let b=0;b<T.length;b++)T[b]();if(z.emit("finish"),W.autoDestroy){let b=z._readableState;if(!b||b.autoDestroy&&(b.endEmitted||b.readable===!1))z.destroy()}}q(e.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(z){if(this._writableState)this._writableState.destroyed=z}},writable:{__proto__:null,get(){let z=this._writableState;return!!z&&z.writable!==!1&&!z.destroyed&&!z.errored&&!z.ending&&!z.ended},set(z){if(this._writableState)this._writableState.writable=!!z}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let z=this._writableState;if(!z)return!1;return!z.destroyed&&!z.ending&&z.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var d=s.destroy;e.prototype.destroy=function(z,W){let T=this._writableState;if(!T.destroyed&&(T.bufferedIndex<T.buffered.length||T[D].length))w.nextTick(R,T);return d.call(this,z,W),this},e.prototype._undestroy=s.undestroy,e.prototype._destroy=function(z,W){W(z)},e.prototype[x.captureRejectionSymbol]=function(z){this.destroy(z)};var I0;function K0(){if(I0===void 0)I0={};return I0}e.fromWeb=function(z,W){return K0().newStreamWritableFromWritableStream(z,W)},e.toWeb=function(z){return K0().newWritableStreamFromStreamWritable(z)}}),p8=z0((h,B)=>{var w=Z2(),U=(i0(),_0(b0)),{isReadable:X,isWritable:Z,isIterable:J,isNodeStream:q,isReadableNodeStream:K,isWritableNodeStream:H,isDuplexNodeStream:G,isReadableStream:M,isWritableStream:x}=l0(),L=a0(),{AbortError:h0,codes:{ERR_INVALID_ARG_TYPE:s,ERR_INVALID_RETURN_VALUE:O}}=O0(),{destroyer:E}=Y2(),F=d0(),C=_2(),j=h1(),{createDeferredPromise:_}=E0(),i=H6(),Q0=globalThis.Blob||U.Blob,F0=typeof Q0<"u"?function(D){return D instanceof Q0}:function(D){return!1},o=globalThis.AbortController||V2().AbortController,{FunctionPrototypeCall:k}=C0();class v extends F{constructor(D){super(D);if((D===null||D===void 0?void 0:D.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((D===null||D===void 0?void 0:D.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}B.exports=function D(V,m){if(G(V))return V;if(K(V))return A({readable:V});if(H(V))return A({writable:V});if(q(V))return A({writable:!1,readable:!1});if(M(V))return A({readable:C.fromWeb(V)});if(x(V))return A({writable:j.fromWeb(V)});if(typeof V==="function"){let{value:U0,write:q0,final:f,destroy:X0}=N(V);if(J(U0))return i(v,U0,{objectMode:!0,write:q0,final:f,destroy:X0});let Y=U0===null||U0===void 0?void 0:U0.then;if(typeof Y==="function"){let c,t=k(Y,U0,(R)=>{if(R!=null)throw new O("nully","body",R)},(R)=>{E(c,R)});return c=new v({objectMode:!0,readable:!1,write:q0,final(R){f(async()=>{try{await t,w.nextTick(R,null)}catch(w0){w.nextTick(R,w0)}})},destroy:X0})}throw new O("Iterable, AsyncIterable or AsyncFunction",m,U0)}if(F0(V))return D(V.arrayBuffer());if(J(V))return i(v,V,{objectMode:!0,writable:!1});if(M(V===null||V===void 0?void 0:V.readable)&&x(V===null||V===void 0?void 0:V.writable))return v.fromWeb(V);if(typeof(V===null||V===void 0?void 0:V.writable)==="object"||typeof(V===null||V===void 0?void 0:V.readable)==="object"){let U0=V!==null&&V!==void 0&&V.readable?K(V===null||V===void 0?void 0:V.readable)?V===null||V===void 0?void 0:V.readable:D(V.readable):void 0,q0=V!==null&&V!==void 0&&V.writable?H(V===null||V===void 0?void 0:V.writable)?V===null||V===void 0?void 0:V.writable:D(V.writable):void 0;return A({readable:U0,writable:q0})}let e=V===null||V===void 0?void 0:V.then;if(typeof e==="function"){let U0;return k(e,V,(q0)=>{if(q0!=null)U0.push(q0);U0.push(null)},(q0)=>{E(U0,q0)}),U0=new v({objectMode:!0,writable:!1,read(){}})}throw new s(m,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],V)};function N(D){let{promise:V,resolve:m}=_(),e=new o,U0=e.signal;return{value:D(async function*(){while(!0){let q0=V;V=null;let{chunk:f,done:X0,cb:Y}=await q0;if(w.nextTick(Y),X0)return;if(U0.aborted)throw new h0(void 0,{cause:U0.reason});({promise:V,resolve:m}=_()),yield f}}(),{signal:U0}),write(q0,f,X0){let Y=m;m=null,Y({chunk:q0,done:!1,cb:X0})},final(q0){let f=m;m=null,f({done:!0,cb:q0})},destroy(q0,f){e.abort(),f(q0)}}}function A(D){let V=D.readable&&typeof D.readable.read!=="function"?C.wrap(D.readable):D.readable,m=D.writable,e=!!X(V),U0=!!Z(m),q0,f,X0,Y,c;function t(R){let w0=Y;if(Y=null,w0)w0(R);else if(R)c.destroy(R)}if(c=new v({readableObjectMode:!!(V!==null&&V!==void 0&&V.readableObjectMode),writableObjectMode:!!(m!==null&&m!==void 0&&m.writableObjectMode),readable:e,writable:U0}),U0)L(m,(R)=>{if(U0=!1,R)E(V,R);t(R)}),c._write=function(R,w0,J0){if(m.write(R,w0))J0();else q0=J0},c._final=function(R){m.end(),f=R},m.on("drain",function(){if(q0){let R=q0;q0=null,R()}}),m.on("finish",function(){if(f){let R=f;f=null,R()}});if(e)L(V,(R)=>{if(e=!1,R)E(V,R);t(R)}),V.on("readable",function(){if(X0){let R=X0;X0=null,R()}}),V.on("end",function(){c.push(null)}),c._read=function(){while(!0){let R=V.read();if(R===null){X0=c._read;return}if(!c.push(R))return}};return c._destroy=function(R,w0){if(!R&&Y!==null)R=new h0;if(X0=null,q0=null,f=null,Y===null)w0(R);else Y=w0,E(m,R),E(V,R)},c}}),d0=z0((h,B)=>{var{ObjectDefineProperties:w,ObjectGetOwnPropertyDescriptor:U,ObjectKeys:X,ObjectSetPrototypeOf:Z}=C0();B.exports=K;var J=_2(),q=h1();Z(K.prototype,J.prototype),Z(K,J);{let x=X(q.prototype);for(let L=0;L<x.length;L++){let h0=x[L];if(!K.prototype[h0])K.prototype[h0]=q.prototype[h0]}}function K(x){if(!(this instanceof K))return new K(x);if(J.call(this,x),q.call(this,x),x){if(this.allowHalfOpen=x.allowHalfOpen!==!1,x.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(x.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}w(K.prototype,{writable:{__proto__:null,...U(q.prototype,"writable")},writableHighWaterMark:{__proto__:null,...U(q.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...U(q.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...U(q.prototype,"writableBuffer")},writableLength:{__proto__:null,...U(q.prototype,"writableLength")},writableFinished:{__proto__:null,...U(q.prototype,"writableFinished")},writableCorked:{__proto__:null,...U(q.prototype,"writableCorked")},writableEnded:{__proto__:null,...U(q.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...U(q.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(x){if(this._readableState&&this._writableState)this._readableState.destroyed=x,this._writableState.destroyed=x}}});var H;function G(){if(H===void 0)H={};return H}K.fromWeb=function(x,L){return G().newStreamDuplexFromReadableWritablePair(x,L)},K.toWeb=function(x){return G().newReadableWritablePairFromDuplex(x)};var M;K.from=function(x){if(!M)M=p8();return M(x,"body")}}),z6=z0((h,B)=>{var{ObjectSetPrototypeOf:w,Symbol:U}=C0();B.exports=K;var{ERR_METHOD_NOT_IMPLEMENTED:X}=O0().codes,Z=d0(),{getHighWaterMark:J}=T2();w(K.prototype,Z.prototype),w(K,Z);var q=U("kCallback");function K(M){if(!(this instanceof K))return new K(M);let x=M?J(this,M,"readableHighWaterMark",!0):null;if(x===0)M={...M,highWaterMark:null,readableHighWaterMark:x,writableHighWaterMark:M.writableHighWaterMark||0};if(Z.call(this,M),this._readableState.sync=!1,this[q]=null,M){if(typeof M.transform==="function")this._transform=M.transform;if(typeof M.flush==="function")this._flush=M.flush}this.on("prefinish",G)}function H(M){if(typeof this._flush==="function"&&!this.destroyed)this._flush((x,L)=>{if(x){if(M)M(x);else this.destroy(x);return}if(L!=null)this.push(L);if(this.push(null),M)M()});else if(this.push(null),M)M()}function G(){if(this._final!==H)H.call(this)}K.prototype._final=H,K.prototype._transform=function(M,x,L){throw new X("_transform()")},K.prototype._write=function(M,x,L){let h0=this._readableState,s=this._writableState,O=h0.length;this._transform(M,x,(E,F)=>{if(E){L(E);return}if(F!=null)this.push(F);if(s.ended||O===h0.length||h0.length<h0.highWaterMark)L();else this[q]=L})},K.prototype._read=function(){if(this[q]){let M=this[q];this[q]=null,M()}}}),$6=z0((h,B)=>{var{ObjectSetPrototypeOf:w}=C0();B.exports=X;var U=z6();w(X.prototype,U.prototype),w(X,U);function X(Z){if(!(this instanceof X))return new X(Z);U.call(this,Z)}X.prototype._transform=function(Z,J,q){q(null,Z)}}),B1=z0((h,B)=>{var w=Z2(),{ArrayIsArray:U,Promise:X,SymbolAsyncIterator:Z,SymbolDispose:J}=C0(),q=a0(),{once:K}=E0(),H=Y2(),G=d0(),{aggregateTwoErrors:M,codes:{ERR_INVALID_ARG_TYPE:x,ERR_INVALID_RETURN_VALUE:L,ERR_MISSING_ARGS:h0,ERR_STREAM_DESTROYED:s,ERR_STREAM_PREMATURE_CLOSE:O},AbortError:E}=O0(),{validateFunction:F,validateAbortSignal:C}=j2(),{isIterable:j,isReadable:_,isReadableNodeStream:i,isNodeStream:Q0,isTransformStream:F0,isWebStream:o,isReadableStream:k,isReadableFinished:v}=l0(),N=globalThis.AbortController||V2().AbortController,A,D,V;function m(R,w0,J0){let H0=!1;R.on("close",()=>{H0=!0});let Y0=q(R,{readable:w0,writable:J0},(S)=>{H0=!S});return{destroy:(S)=>{if(H0)return;H0=!0,H.destroyer(R,S||new s("pipe"))},cleanup:Y0}}function e(R){return F(R[R.length-1],"streams[stream.length - 1]"),R.pop()}function U0(R){if(j(R))return R;else if(i(R))return q0(R);throw new x("val",["Readable","Iterable","AsyncIterable"],R)}async function*q0(R){if(!D)D=_2();yield*D.prototype[Z].call(R)}async function f(R,w0,J0,{end:H0}){let Y0,S=null,y=(K0)=>{if(K0)Y0=K0;if(S){let z=S;S=null,z()}},d=()=>new X((K0,z)=>{if(Y0)z(Y0);else S=()=>{if(Y0)z(Y0);else K0()}});w0.on("drain",y);let I0=q(w0,{readable:!1},y);try{if(w0.writableNeedDrain)await d();for await(let K0 of R)if(!w0.write(K0))await d();if(H0)w0.end(),await d();J0()}catch(K0){J0(Y0!==K0?M(Y0,K0):K0)}finally{I0(),w0.off("drain",y)}}async function X0(R,w0,J0,{end:H0}){if(F0(w0))w0=w0.writable;let Y0=w0.getWriter();try{for await(let S of R)await Y0.ready,Y0.write(S).catch(()=>{});if(await Y0.ready,H0)await Y0.close();J0()}catch(S){try{await Y0.abort(S),J0(S)}catch(y){J0(y)}}}function Y(...R){return c(R,K(e(R)))}function c(R,w0,J0){if(R.length===1&&U(R[0]))R=R[0];if(R.length<2)throw new h0("streams");let H0=new N,Y0=H0.signal,S=J0===null||J0===void 0?void 0:J0.signal,y=[];C(S,"options.signal");function d(){n(new E)}V=V||E0().addAbortListener;let I0;if(S)I0=V(S,d);let K0,z,W=[],T=0;function b(g){n(g,--T===0)}function n(g,Z0){var $0;if(g&&(!K0||K0.code==="ERR_STREAM_PREMATURE_CLOSE"))K0=g;if(!K0&&!Z0)return;while(W.length)W.shift()(K0);if(($0=I0)===null||$0===void 0||$0[J](),H0.abort(),Z0){if(!K0)y.forEach((D0)=>D0());w.nextTick(w0,K0,z)}}let l;for(let g=0;g<R.length;g++){let Z0=R[g],$0=g<R.length-1,D0=g>0,P0=$0||(J0===null||J0===void 0?void 0:J0.end)!==!1,t0=g===R.length-1;if(Q0(Z0)){let V0=function(x0){if(x0&&x0.name!=="AbortError"&&x0.code!=="ERR_STREAM_PREMATURE_CLOSE")b(x0)};var $=V0;if(P0){let{destroy:x0,cleanup:J2}=m(Z0,$0,D0);if(W.push(x0),_(Z0)&&t0)y.push(J2)}if(Z0.on("error",V0),_(Z0)&&t0)y.push(()=>{Z0.removeListener("error",V0)})}if(g===0)if(typeof Z0==="function"){if(l=Z0({signal:Y0}),!j(l))throw new L("Iterable, AsyncIterable or Stream","source",l)}else if(j(Z0)||i(Z0)||F0(Z0))l=Z0;else l=G.from(Z0);else if(typeof Z0==="function"){if(F0(l)){var u;l=U0((u=l)===null||u===void 0?void 0:u.readable)}else l=U0(l);if(l=Z0(l,{signal:Y0}),$0){if(!j(l,!0))throw new L("AsyncIterable",`transform[${g-1}]`,l)}else{var r;if(!A)A=$6();let V0=new A({objectMode:!0}),x0=(r=l)===null||r===void 0?void 0:r.then;if(typeof x0==="function")T++,x0.call(l,(S0)=>{if(z=S0,S0!=null)V0.write(S0);if(P0)V0.end();w.nextTick(b)},(S0)=>{V0.destroy(S0),w.nextTick(b,S0)});else if(j(l,!0))T++,f(l,V0,b,{end:P0});else if(k(l)||F0(l)){let S0=l.readable||l;T++,f(S0,V0,b,{end:P0})}else throw new L("AsyncIterable or Promise","destination",l);l=V0;let{destroy:J2,cleanup:I2}=m(l,!1,!0);if(W.push(J2),t0)y.push(I2)}}else if(Q0(Z0)){if(i(l)){T+=2;let V0=t(l,Z0,b,{end:P0});if(_(Z0)&&t0)y.push(V0)}else if(F0(l)||k(l)){let V0=l.readable||l;T++,f(V0,Z0,b,{end:P0})}else if(j(l))T++,f(l,Z0,b,{end:P0});else throw new x("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],l);l=Z0}else if(o(Z0)){if(i(l))T++,X0(U0(l),Z0,b,{end:P0});else if(k(l)||j(l))T++,X0(l,Z0,b,{end:P0});else if(F0(l))T++,X0(l.readable,Z0,b,{end:P0});else throw new x("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],l);l=Z0}else l=G.from(Z0)}if(Y0!==null&&Y0!==void 0&&Y0.aborted||S!==null&&S!==void 0&&S.aborted)w.nextTick(d);return l}function t(R,w0,J0,{end:H0}){let Y0=!1;if(w0.on("close",()=>{if(!Y0)J0(new O)}),R.pipe(w0,{end:!1}),H0){let y=function(){Y0=!0,w0.end()};var S=y;if(v(R))w.nextTick(y);else R.once("end",y)}else J0();return q(R,{readable:!0,writable:!1},(y)=>{let d=R._readableState;if(y&&y.code==="ERR_STREAM_PREMATURE_CLOSE"&&d&&d.ended&&!d.errored&&!d.errorEmitted)R.once("end",J0).once("error",J0);else J0(y)}),q(w0,{readable:!1,writable:!0},J0)}B.exports={pipelineImpl:c,pipeline:Y}}),G6=z0((h,B)=>{var{pipeline:w}=B1(),U=d0(),{destroyer:X}=Y2(),{isNodeStream:Z,isReadable:J,isWritable:q,isWebStream:K,isTransformStream:H,isWritableStream:G,isReadableStream:M}=l0(),{AbortError:x,codes:{ERR_INVALID_ARG_VALUE:L,ERR_MISSING_ARGS:h0}}=O0(),s=a0();B.exports=function(...O){if(O.length===0)throw new h0("streams");if(O.length===1)return U.from(O[0]);let E=[...O];if(typeof O[0]==="function")O[0]=U.from(O[0]);if(typeof O[O.length-1]==="function"){let N=O.length-1;O[N]=U.from(O[N])}for(let N=0;N<O.length;++N){if(!Z(O[N])&&!K(O[N]))continue;if(N<O.length-1&&!(J(O[N])||M(O[N])||H(O[N])))throw new L(`streams[${N}]`,E[N],"must be readable");if(N>0&&!(q(O[N])||G(O[N])||H(O[N])))throw new L(`streams[${N}]`,E[N],"must be writable")}let F,C,j,_,i;function Q0(N){let A=_;if(_=null,A)A(N);else if(N)i.destroy(N);else if(!v&&!k)i.destroy()}let F0=O[0],o=w(O,Q0),k=!!(q(F0)||G(F0)||H(F0)),v=!!(J(o)||M(o)||H(o));if(i=new U({writableObjectMode:!!(F0!==null&&F0!==void 0&&F0.writableObjectMode),readableObjectMode:!!(o!==null&&o!==void 0&&o.readableObjectMode),writable:k,readable:v}),k){if(Z(F0))i._write=function(A,D,V){if(F0.write(A,D))V();else F=V},i._final=function(A){F0.end(),C=A},F0.on("drain",function(){if(F){let A=F;F=null,A()}});else if(K(F0)){let A=(H(F0)?F0.writable:F0).getWriter();i._write=async function(D,V,m){try{await A.ready,A.write(D).catch(()=>{}),m()}catch(e){m(e)}},i._final=async function(D){try{await A.ready,A.close().catch(()=>{}),C=D}catch(V){D(V)}}}let N=H(o)?o.readable:o;s(N,()=>{if(C){let A=C;C=null,A()}})}if(v){if(Z(o))o.on("readable",function(){if(j){let N=j;j=null,N()}}),o.on("end",function(){i.push(null)}),i._read=function(){while(!0){let N=o.read();if(N===null){j=i._read;return}if(!i.push(N))return}};else if(K(o)){let N=(H(o)?o.readable:o).getReader();i._read=async function(){while(!0)try{let{value:A,done:D}=await N.read();if(!i.push(A))return;if(D){i.push(null);return}}catch{return}}}}return i._destroy=function(N,A){if(!N&&_!==null)N=new x;if(j=null,F=null,C=null,_===null)A(N);else if(_=A,Z(o))X(o,N)},i}}),b8=z0((h,B)=>{var w=globalThis.AbortController||V2().AbortController,{codes:{ERR_INVALID_ARG_VALUE:U,ERR_INVALID_ARG_TYPE:X,ERR_MISSING_ARGS:Z,ERR_OUT_OF_RANGE:J},AbortError:q}=O0(),{validateAbortSignal:K,validateInteger:H,validateObject:G}=j2(),M=C0().Symbol("kWeak"),x=C0().Symbol("kResistStopPropagation"),{finished:L}=a0(),h0=G6(),{addAbortSignalNoValidate:s}=P2(),{isWritable:O,isNodeStream:E}=l0(),{deprecate:F}=E0(),{ArrayPrototypePush:C,Boolean:j,MathFloor:_,Number:i,NumberIsNaN:Q0,Promise:F0,PromiseReject:o,PromiseResolve:k,PromisePrototypeThen:v,Symbol:N}=C0(),A=N("kEmpty"),D=N("kEof");function V(S,y){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");if(E(S)&&!O(S))throw new U("stream",S,"must be writable");let d=h0(this,S);if(y!==null&&y!==void 0&&y.signal)s(y.signal,d);return d}function m(S,y){if(typeof S!=="function")throw new X("fn",["Function","AsyncFunction"],S);if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");let d=1;if((y===null||y===void 0?void 0:y.concurrency)!=null)d=_(y.concurrency);let I0=d-1;if((y===null||y===void 0?void 0:y.highWaterMark)!=null)I0=_(y.highWaterMark);return H(d,"options.concurrency",1),H(I0,"options.highWaterMark",0),I0+=d,async function*(){let K0=E0().AbortSignalAny([y===null||y===void 0?void 0:y.signal].filter(j)),z=this,W=[],T={signal:K0},b,n,l=!1,$=0;function u(){l=!0,r()}function r(){$-=1,g()}function g(){if(n&&!l&&$<d&&W.length<I0)n(),n=null}async function Z0(){try{for await(let $0 of z){if(l)return;if(K0.aborted)throw new q;try{if($0=S($0,T),$0===A)continue;$0=k($0)}catch(D0){$0=o(D0)}if($+=1,v($0,r,u),W.push($0),b)b(),b=null;if(!l&&(W.length>=I0||$>=d))await new F0((D0)=>{n=D0})}W.push(D)}catch($0){let D0=o($0);v(D0,r,u),W.push(D0)}finally{if(l=!0,b)b(),b=null}}Z0();try{while(!0){while(W.length>0){let $0=await W[0];if($0===D)return;if(K0.aborted)throw new q;if($0!==A)yield $0;W.shift(),g()}await new F0(($0)=>{b=$0})}}finally{if(l=!0,n)n(),n=null}}.call(this)}function e(S=void 0){if(S!=null)G(S,"options");if((S===null||S===void 0?void 0:S.signal)!=null)K(S.signal,"options.signal");return async function*(){let y=0;for await(let I0 of this){var d;if(S!==null&&S!==void 0&&(d=S.signal)!==null&&d!==void 0&&d.aborted)throw new q({cause:S.signal.reason});yield[y++,I0]}}.call(this)}async function U0(S,y=void 0){for await(let d of Y.call(this,S,y))return!0;return!1}async function q0(S,y=void 0){if(typeof S!=="function")throw new X("fn",["Function","AsyncFunction"],S);return!await U0.call(this,async(...d)=>{return!await S(...d)},y)}async function f(S,y){for await(let d of Y.call(this,S,y))return d;return}async function X0(S,y){if(typeof S!=="function")throw new X("fn",["Function","AsyncFunction"],S);async function d(I0,K0){return await S(I0,K0),A}for await(let I0 of m.call(this,d,y));}function Y(S,y){if(typeof S!=="function")throw new X("fn",["Function","AsyncFunction"],S);async function d(I0,K0){if(await S(I0,K0))return I0;return A}return m.call(this,d,y)}class c extends Z{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function t(S,y,d){var I0;if(typeof S!=="function")throw new X("reducer",["Function","AsyncFunction"],S);if(d!=null)G(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)K(d.signal,"options.signal");let K0=arguments.length>1;if(d!==null&&d!==void 0&&(I0=d.signal)!==null&&I0!==void 0&&I0.aborted){let n=new q(void 0,{cause:d.signal.reason});throw this.once("error",()=>{}),await L(this.destroy(n)),n}let z=new w,W=z.signal;if(d!==null&&d!==void 0&&d.signal){let n={once:!0,[M]:this,[x]:!0};d.signal.addEventListener("abort",()=>z.abort(),n)}let T=!1;try{for await(let n of this){var b;if(T=!0,d!==null&&d!==void 0&&(b=d.signal)!==null&&b!==void 0&&b.aborted)throw new q;if(!K0)y=n,K0=!0;else y=await S(y,n,{signal:W})}if(!T&&!K0)throw new c}finally{z.abort()}return y}async function R(S){if(S!=null)G(S,"options");if((S===null||S===void 0?void 0:S.signal)!=null)K(S.signal,"options.signal");let y=[];for await(let I0 of this){var d;if(S!==null&&S!==void 0&&(d=S.signal)!==null&&d!==void 0&&d.aborted)throw new q(void 0,{cause:S.signal.reason});C(y,I0)}return y}function w0(S,y){let d=m.call(this,S,y);return async function*(){for await(let I0 of d)yield*I0}.call(this)}function J0(S){if(S=i(S),Q0(S))return 0;if(S<0)throw new J("number",">= 0",S);return S}function H0(S,y=void 0){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");return S=J0(S),async function*(){var d;if(y!==null&&y!==void 0&&(d=y.signal)!==null&&d!==void 0&&d.aborted)throw new q;for await(let K0 of this){var I0;if(y!==null&&y!==void 0&&(I0=y.signal)!==null&&I0!==void 0&&I0.aborted)throw new q;if(S--<=0)yield K0}}.call(this)}function Y0(S,y=void 0){if(y!=null)G(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)K(y.signal,"options.signal");return S=J0(S),async function*(){var d;if(y!==null&&y!==void 0&&(d=y.signal)!==null&&d!==void 0&&d.aborted)throw new q;for await(let K0 of this){var I0;if(y!==null&&y!==void 0&&(I0=y.signal)!==null&&I0!==void 0&&I0.aborted)throw new q;if(S-- >0)yield K0;if(S<=0)return}}.call(this)}B.exports.streamReturningOperators={asIndexedPairs:F(e,"readable.asIndexedPairs will be removed in a future version."),drop:H0,filter:Y,flatMap:w0,map:m,take:Y0,compose:V},B.exports.promiseReturningOperators={every:q0,forEach:X0,reduce:t,toArray:R,some:U0,find:f}}),N6=z0((h,B)=>{var{ArrayPrototypePop:w,Promise:U}=C0(),{isIterable:X,isNodeStream:Z,isWebStream:J}=l0(),{pipelineImpl:q}=B1(),{finished:K}=a0();C6();function H(...G){return new U((M,x)=>{let L,h0,s=G[G.length-1];if(s&&typeof s==="object"&&!Z(s)&&!X(s)&&!J(s)){let O=w(G);L=O.signal,h0=O.end}q(G,(O,E)=>{if(O)x(O);else M(E)},{signal:L,end:h0})})}B.exports={finished:K,pipeline:H}}),C6=z0((h,B)=>{var{Buffer:w}=(i0(),_0(b0)),{ObjectDefineProperty:U,ObjectKeys:X,ReflectApply:Z}=C0(),{promisify:{custom:J}}=E0(),{streamReturningOperators:q,promiseReturningOperators:K}=b8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:H}}=O0(),G=G6(),{setDefaultHighWaterMark:M,getDefaultHighWaterMark:x}=T2(),{pipeline:L}=B1(),{destroyer:h0}=Y2(),s=a0(),O=N6(),E=l0(),F=B.exports=e2().Stream;F.isDestroyed=E.isDestroyed,F.isDisturbed=E.isDisturbed,F.isErrored=E.isErrored,F.isReadable=E.isReadable,F.isWritable=E.isWritable,F.Readable=_2();for(let j of X(q)){let _=function(...Q0){if(new.target)throw H();return F.Readable.from(Z(i,this,Q0))},i=q[j];U(_,"name",{__proto__:null,value:i.name}),U(_,"length",{__proto__:null,value:i.length}),U(F.Readable.prototype,j,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(let j of X(K)){let _=function(...Q0){if(new.target)throw H();return Z(i,this,Q0)},i=K[j];U(_,"name",{__proto__:null,value:i.name}),U(_,"length",{__proto__:null,value:i.length}),U(F.Readable.prototype,j,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}F.Writable=h1(),F.Duplex=d0(),F.Transform=z6(),F.PassThrough=$6(),F.pipeline=L;var{addAbortSignal:C}=P2();F.addAbortSignal=C,F.finished=s,F.destroy=h0,F.compose=G,F.setDefaultHighWaterMark=M,F.getDefaultHighWaterMark=x,U(F,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return O}}),U(L,J,{__proto__:null,enumerable:!0,get(){return O.pipeline}}),U(s,J,{__proto__:null,enumerable:!0,get(){return O.finished}}),F.Stream=F,F._isUint8Array=function(j){return j instanceof Uint8Array},F._uint8ArrayToBuffer=function(j){return w.from(j.buffer,j.byteOffset,j.byteLength)}}),i8=z0((h,B)=>{var w=w1();{let U=C6(),X=N6(),Z=U.Readable.destroy;B.exports=U.Readable,B.exports._uint8ArrayToBuffer=U._uint8ArrayToBuffer,B.exports._isUint8Array=U._isUint8Array,B.exports.isDisturbed=U.isDisturbed,B.exports.isErrored=U.isErrored,B.exports.isReadable=U.isReadable,B.exports.Readable=U.Readable,B.exports.Writable=U.Writable,B.exports.Duplex=U.Duplex,B.exports.Transform=U.Transform,B.exports.PassThrough=U.PassThrough,B.exports.addAbortSignal=U.addAbortSignal,B.exports.finished=U.finished,B.exports.destroy=U.destroy,B.exports.destroy=Z,B.exports.pipeline=U.pipeline,B.exports.compose=U.compose,Object.defineProperty(U,"promises",{configurable:!0,enumerable:!0,get(){return X}}),B.exports.Stream=U.Stream}B.exports.default=B.exports});W6.exports=i8()});import{logger as W0,ModelType as A0}from"@elizaos/core";import{logger as y0}from"@elizaos/core";import{logger as z2}from"@elizaos/core";function N0(h,B,w){return h.getSetting(B)??process.env[B]??w}function m0(){return typeof globalThis<"u"&&typeof globalThis.document<"u"}function A1(h){return m0()&&!!N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL")}function v0(h,B=!1){if(m0())return{};let w=B?v6(h):n0(h);return w?{Authorization:`Bearer ${w}`}:{}}function R0(h){let B=N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL"),w=m0()&&B?B:N0(h,"ELIZAOS_CLOUD_BASE_URL","https://www.elizacloud.ai/api/v1");return console.log(`[ELIZAOS_CLOUD] Default base URL: ${w}`),w}function O1(h){let B=m0()?N0(h,"ELIZAOS_CLOUD_BROWSER_EMBEDDING_URL")||N0(h,"ELIZAOS_CLOUD_BROWSER_BASE_URL"):N0(h,"ELIZAOS_CLOUD_EMBEDDING_URL");if(B)return z2.debug(`[ELIZAOS_CLOUD] Using specific embedding base URL: ${B}`),B;return z2.debug("[ELIZAOS_CLOUD] Falling back to general base URL for embeddings."),R0(h)}function n0(h){return N0(h,"ELIZAOS_CLOUD_API_KEY")}function v6(h){let B=N0(h,"ELIZAOS_CLOUD_EMBEDDING_API_KEY");if(B)return z2.debug("[ELIZAOS_CLOUD] Using specific embedding API key (present)"),B;return z2.debug("[ELIZAOS_CLOUD] Falling back to general API key for embeddings."),n0(h)}function A2(h){return N0(h,"ELIZAOS_CLOUD_SMALL_MODEL")??N0(h,"SMALL_MODEL","gpt-4o-mini")}function O2(h){return N0(h,"ELIZAOS_CLOUD_LARGE_MODEL")??N0(h,"LARGE_MODEL","gpt-4o")}function x1(h){return N0(h,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL","gpt-4o-mini")??"gpt-4o-mini"}function L1(h){return N0(h,"ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL","openai/gpt-5-nano")??"openai/gpt-5-nano"}function u2(h){let B=N0(h,"ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY","false"),w=String(B).toLowerCase(),U=w==="true";return z2.debug(`[ELIZAOS_CLOUD] Experimental telemetry in function: "${B}" (type: ${typeof B}, normalized: "${w}", result: ${U})`),U}function E1(h,B){new Promise(async(w)=>{w();try{if(!n0(B)&&!m0()){y0.warn("ELIZAOS_CLOUD_API_KEY is not set in environment - ElizaOS Cloud functionality will be limited"),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");return}try{let U=R0(B),X=await fetch(`${U}/models`,{headers:{...v0(B)}});if(!X.ok)y0.warn(`ElizaOS Cloud API key validation failed: ${X.statusText}`),y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided"),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys");else y0.log("ElizaOS Cloud API key validated successfully")}catch(U){let X=U instanceof Error?U.message:String(U);y0.warn(`Error validating ElizaOS Cloud API key: ${X}`),y0.warn("ElizaOS Cloud functionality will be limited until a valid API key is provided")}}catch(U){let X=U?.errors?.map((Z)=>Z.message).join(", ")||(U instanceof Error?U.message:String(U));y0.warn(`ElizaOS Cloud plugin configuration issue: ${X} - You need to configure the ELIZAOS_CLOUD_API_KEY in your environment variables`),y0.info("Get your API key from https://www.elizacloud.ai/dashboard/api-keys")}})}import{logger as x2,ModelType as D1}from"@elizaos/core";import{generateText as P1}from"ai";import{createOpenAI as g6}from"@ai-sdk/openai";function $2(h){let B=R0(h),w=n0(h)??(A1(h)?"eliza-proxy":void 0);return g6({apiKey:w??"",baseURL:B})}import{EventType as p6}from"@elizaos/core";function g0(h,B,w,U){h.emitEvent(p6.MODEL_USED,{provider:"openai",type:B,prompt:w,tokens:{prompt:U.inputTokens,completion:U.outputTokens,total:U.totalTokens}})}async function v2(h,{prompt:B,stopSequences:w=[],maxTokens:U=8192,temperature:X=0.7,frequencyPenalty:Z=0.7,presencePenalty:J=0.7}){let q=$2(h),K=A2(h),H=u2(h);x2.log(`[ELIZAOS_CLOUD] Using TEXT_SMALL model: ${K}`),x2.log(B);let{text:G,usage:M}=await P1({model:q.languageModel(K),prompt:B,system:h.character.system??void 0,temperature:X,maxOutputTokens:U,frequencyPenalty:Z,presencePenalty:J,stopSequences:w,experimental_telemetry:{isEnabled:H}});if(M)g0(h,D1.TEXT_SMALL,B,M);return G}async function g2(h,{prompt:B,stopSequences:w=[],maxTokens:U=8192,temperature:X=0.7,frequencyPenalty:Z=0.7,presencePenalty:J=0.7}){let q=$2(h),K=O2(h),H=u2(h);x2.log(`[ELIZAOS_CLOUD] Using TEXT_LARGE model: ${K}`),x2.log(B);let{text:G,usage:M}=await P1({model:q.languageModel(K),prompt:B,system:h.character.system??void 0,temperature:X,maxOutputTokens:U,frequencyPenalty:Z,presencePenalty:J,stopSequences:w,experimental_telemetry:{isEnabled:H}});if(M)g0(h,D1.TEXT_LARGE,B,M);return G}import{logger as Q2,ModelType as A6}from"@elizaos/core";import{generateObject as l8,JSONParseError as m8}from"ai";import{logger as M6}from"@elizaos/core";import{JSONParseError as d8}from"ai";function U1(){return async({text:h,error:B})=>{try{if(B instanceof d8){let w=h.replace(/```json\n|\n```|```/g,"");return JSON.parse(w),w}return null}catch(w){let U=w instanceof Error?w.message:String(w);return M6.warn(`Failed to repair JSON text: ${U}`),null}}}async function V6(h){try{let{Readable:B}=await Promise.resolve().then(() => c6(w1(),1)),w=h.getReader();return new B({async read(){try{let{done:U,value:X}=await w.read();if(U)this.push(null);else this.push(X)}catch(U){this.destroy(U)}},destroy(U,X){w.cancel().finally(()=>X(U))}})}catch(B){let w=B instanceof Error?B.message:String(B);throw M6.error(`Failed to load node:stream module: ${w}`),Error("Cannot convert stream: node:stream module unavailable. This feature requires a Node.js environment.")}}function j6(h){let w=h.match(/title[:\s]+(.+?)(?:\n|$)/i)?.[1]?.trim()||"Image Analysis",U=h.replace(/title[:\s]+(.+?)(?:\n|$)/i,"").trim();return{title:w,description:U}}async function O6(h,B,w,U){let X=$2(h),Z=U(h);Q2.log(`[ELIZAOS_CLOUD] Using ${w} model: ${Z}`);let J=B.temperature??0;if(!!B.schema)Q2.info(`Using ${w} without schema validation (schema provided but output=no-schema)`);try{let{object:K,usage:H}=await l8({model:X.languageModel(Z),output:"no-schema",prompt:B.prompt,temperature:J,experimental_repairText:U1()});if(H)g0(h,w,B.prompt,H);return K}catch(K){if(K instanceof m8){Q2.error(`[generateObject] Failed to parse JSON: ${K.message}`);let G=await U1()({text:K.text,error:K});if(G)try{let M=JSON.parse(G);return Q2.info("[generateObject] Successfully repaired JSON."),M}catch(M){let x=M instanceof Error?M.message:String(M);throw Q2.error(`[generateObject] Failed to parse repaired JSON: ${x}`),M}else throw Q2.error("[generateObject] JSON repair failed."),K}else{let H=K instanceof Error?K.message:String(K);throw Q2.error(`[generateObject] Unknown error: ${H}`),K}}}async function X1(h,B){return O6(h,B,A6.OBJECT_SMALL,A2)}async function Z1(h,B){return O6(h,B,A6.OBJECT_LARGE,O2)}import{logger as s0,ModelType as n8,VECTOR_DIMS as x6}from"@elizaos/core";async function Q1(h,B){let w=N0(h,"ELIZAOS_CLOUD_EMBEDDING_MODEL","text-embedding-3-small"),U=Number.parseInt(N0(h,"ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS","1536")||"1536",10);if(!Object.values(x6).includes(U)){let J=`Invalid embedding dimension: ${U}. Must be one of: ${Object.values(x6).join(", ")}`;throw s0.error(J),Error(J)}if(B===null){s0.debug("Creating test embedding for initialization");let J=Array(U).fill(0);return J[0]=0.1,J}let X;if(typeof B==="string")X=B;else if(typeof B==="object"&&B.text)X=B.text;else{s0.warn("Invalid input format for embedding");let J=Array(U).fill(0);return J[0]=0.2,J}if(!X.trim()){s0.warn("Empty text for embedding");let J=Array(U).fill(0);return J[0]=0.3,J}let Z=O1(h);try{let J=await fetch(`${Z}/embeddings`,{method:"POST",headers:{...v0(h,!0),"Content-Type":"application/json"},body:JSON.stringify({model:w,input:X})});if(!J.ok){s0.error(`ElizaOS Cloud API error: ${J.status} - ${J.statusText}`);let H=Array(U).fill(0);return H[0]=0.4,H}let q=await J.json();if(!q?.data?.[0]?.embedding){s0.error("API returned invalid structure");let H=Array(U).fill(0);return H[0]=0.5,H}let K=q.data[0].embedding;if(q.usage){let H={inputTokens:q.usage.prompt_tokens,outputTokens:0,totalTokens:q.usage.total_tokens};g0(h,n8.TEXT_EMBEDDING,X,H)}return s0.log(`Got valid embedding with length ${K.length}`),K}catch(J){let q=J instanceof Error?J.message:String(J);s0.error(`Error generating embedding: ${q}`);let K=Array(U).fill(0);return K[0]=0.6,K}}import{logger as R2,ModelType as o8}from"@elizaos/core";async function J1(h,B){let w=B.n||1,U=B.size||"1024x1024",X=B.prompt,Z=L1(h);R2.log(`[ELIZAOS_CLOUD] Using IMAGE model: ${Z}`);let J=R0(h),K={"1024x1024":"1:1","1792x1024":"16:9","1024x1792":"9:16"}[U]||"1:1";try{let H=await fetch(`${J}/generate-image`,{method:"POST",headers:{...v0(h),"Content-Type":"application/json"},body:JSON.stringify({prompt:X,numImages:w,aspectRatio:K})});if(!H.ok){let x=await H.text();throw Error(`Failed to generate image: ${H.status} ${x}`)}return(await H.json()).images.map((x)=>({url:x.url||x.image}))}catch(H){let G=H instanceof Error?H.message:String(H);throw R2.error(`[ELIZAOS_CLOUD] Image generation error: ${G}`),H}}async function I1(h,B){let w,U,X=x1(h);R2.log(`[ELIZAOS_CLOUD] Using IMAGE_DESCRIPTION model: ${X}`);let Z=Number.parseInt(N0(h,"ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS","8192")||"8192",10);if(typeof B==="string")w=B,U="Please analyze this image and provide a title and detailed description.";else w=B.imageUrl,U=B.prompt||"Please analyze this image and provide a title and detailed description.";let J=[{role:"user",content:[{type:"text",text:U},{type:"image_url",image_url:{url:w}}]}],q=R0(h);try{let K={model:X,messages:J,max_tokens:Z},H=await fetch(`${q}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",...v0(h)},body:JSON.stringify(K)});if(!H.ok)throw Error(`ElizaOS Cloud API error: ${H.status}`);let M=await H.json(),x=M.choices?.[0]?.message?.content;if(M.usage)g0(h,o8.IMAGE_DESCRIPTION,typeof B==="string"?B:B.prompt||"",{inputTokens:M.usage.prompt_tokens,outputTokens:M.usage.completion_tokens,totalTokens:M.usage.total_tokens});if(!x)return{title:"Failed to analyze image",description:"No response from API"};if(typeof B==="object"&&B.prompt&&B.prompt!=="Please analyze this image and provide a title and detailed description.")return x;return j6(x)}catch(K){let H=K instanceof Error?K.message:String(K);return R2.error(`Error analyzing image: ${H}`),{title:"Failed to analyze image",description:`Error: ${H}`}}}import{logger as c4}from"@elizaos/core";async function F1(h,B){let w=N0(h,"ELIZAOS_CLOUD_TTS_MODEL","gpt-4o-mini-tts"),U=N0(h,"ELIZAOS_CLOUD_TTS_VOICE","nova"),X=N0(h,"ELIZAOS_CLOUD_TTS_INSTRUCTIONS",""),Z=R0(h),J=B.model||w,q=B.voice||U,K=B.instructions??X,H=B.format||"mp3";try{let G=await fetch(`${Z}/audio/speech`,{method:"POST",headers:{...v0(h),"Content-Type":"application/json",...H==="mp3"?{Accept:"audio/mpeg"}:{}},body:JSON.stringify({model:J,voice:q,input:B.text,format:H,...K&&{instructions:K}})});if(!G.ok){let M=await G.text();throw Error(`ElizaOS Cloud TTS error ${G.status}: ${M}`)}if(!G.body)throw Error("ElizaOS Cloud TTS response body is null");if(!m0())return await V6(G.body);return G.body}catch(G){let M=G instanceof Error?G.message:String(G);throw Error(`Failed to fetch speech from ElizaOS Cloud TTS: ${M}`)}}var r8={name:"elizaOSCloud",description:"ElizaOS Cloud plugin - Multi-model AI generation with text, image, and video support",config:{ELIZAOS_CLOUD_API_KEY:process.env.ELIZAOS_CLOUD_API_KEY,ELIZAOS_CLOUD_BASE_URL:process.env.ELIZAOS_CLOUD_BASE_URL,ELIZAOS_CLOUD_SMALL_MODEL:process.env.ELIZAOS_CLOUD_SMALL_MODEL,ELIZAOS_CLOUD_LARGE_MODEL:process.env.ELIZAOS_CLOUD_LARGE_MODEL,SMALL_MODEL:process.env.SMALL_MODEL,LARGE_MODEL:process.env.LARGE_MODEL,ELIZAOS_CLOUD_EMBEDDING_MODEL:process.env.ELIZAOS_CLOUD_EMBEDDING_MODEL,ELIZAOS_CLOUD_EMBEDDING_API_KEY:process.env.ELIZAOS_CLOUD_EMBEDDING_API_KEY,ELIZAOS_CLOUD_EMBEDDING_URL:process.env.ELIZAOS_CLOUD_EMBEDDING_URL,ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS:process.env.ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL,ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS:process.env.ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS,ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY:process.env.ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY,ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL:process.env.ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL},async init(h,B){E1(h,B)},models:{[A0.TEXT_EMBEDDING]:Q1,[A0.TEXT_SMALL]:v2,[A0.TEXT_LARGE]:g2,[A0.IMAGE]:J1,[A0.IMAGE_DESCRIPTION]:I1,[A0.OBJECT_SMALL]:X1,[A0.OBJECT_LARGE]:Z1},tests:[{name:"ELIZAOS_CLOUD_plugin_tests",tests:[{name:"ELIZAOS_CLOUD_test_url_and_api_key_validation",fn:async(h)=>{let B=R0(h),w=await fetch(`${B}/models`,{headers:{Authorization:`Bearer ${n0(h)}`}}),U=await w.json();if(W0.log({data:U?.data?.length??"N/A"},"Models Available"),!w.ok)throw Error(`Failed to validate OpenAI API key: ${w.statusText}`)}},{name:"ELIZAOS_CLOUD_test_text_embedding",fn:async(h)=>{try{let B=await h.useModel(A0.TEXT_EMBEDDING,{text:"Hello, world!"});W0.log({embedding:B},"embedding")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_embedding: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_large",fn:async(h)=>{try{let B=await h.useModel(A0.TEXT_LARGE,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");W0.log({text:B},"generated with test_text_large")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_large: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_small",fn:async(h)=>{try{let B=await h.useModel(A0.TEXT_SMALL,{prompt:"What is the nature of reality in 10 words?"});if(B.length===0)throw Error("Failed to generate text");W0.log({text:B},"generated with test_text_small")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_text_small: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_image_generation",fn:async(h)=>{W0.log("ELIZAOS_CLOUD_test_image_generation");try{let B=await h.useModel(A0.IMAGE,{prompt:"A beautiful sunset over a calm ocean",n:1,size:"1024x1024"});W0.log({image:B},"generated with test_image_generation")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_image_generation: ${w}`),B}}},{name:"image-description",fn:async(h)=>{try{W0.log("ELIZAOS_CLOUD_test_image_description");try{let B=await h.useModel(A0.IMAGE_DESCRIPTION,"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg/537px-Vitalik_Buterin_TechCrunch_London_2015_%28cropped%29.jpg");if(B&&typeof B==="object"&&"title"in B&&"description"in B)W0.log({result:B},"Image description");else W0.error("Invalid image description result format:",B)}catch(B){let w=B instanceof Error?B.message:String(B);W0.error(`Error in image description test: ${w}`)}}catch(B){let w=B instanceof Error?B.message:String(B);W0.error(`Error in ELIZAOS_CLOUD_test_image_description: ${w}`)}}},{name:"ELIZAOS_CLOUD_test_transcription",fn:async(h)=>{W0.log("ELIZAOS_CLOUD_test_transcription");try{let w=await(await fetch("https://upload.wikimedia.org/wikipedia/en/4/40/Chris_Benoit_Voice_Message.ogg")).arrayBuffer(),U=await h.useModel(A0.TRANSCRIPTION,Buffer.from(new Uint8Array(w)));W0.log({transcription:U},"generated with test_transcription")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in test_transcription: ${w}`),B}}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_encode",fn:async(h)=>{let w=await h.useModel(A0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer encode!"});if(!Array.isArray(w)||w.length===0)throw Error("Failed to tokenize text: expected non-empty array of tokens");W0.log({tokens:w},"Tokenized output")}},{name:"ELIZAOS_CLOUD_test_text_tokenizer_decode",fn:async(h)=>{let w=await h.useModel(A0.TEXT_TOKENIZER_ENCODE,{prompt:"Hello tokenizer decode!"}),U=await h.useModel(A0.TEXT_TOKENIZER_DECODE,{tokens:w});if(U!=="Hello tokenizer decode!")throw Error(`Decoded text does not match original. Expected "Hello tokenizer decode!", got "${U}"`);W0.log({decodedText:U},"Decoded text")}},{name:"ELIZAOS_CLOUD_test_text_to_speech",fn:async(h)=>{try{if(!await F1(h,{text:"Hello, this is a test for text-to-speech."}))throw Error("Failed to generate speech");W0.log("Generated speech successfully")}catch(B){let w=B instanceof Error?B.message:String(B);throw W0.error(`Error in ELIZAOS_CLOUD_test_text_to_speech: ${w}`),B}}}]}]},a8=r8;export{r8 as elizaOSCloudPlugin,a8 as default};
3
3
 
4
- //# debugId=ED0010634DF17C8864756E2164756E21
4
+ //# debugId=D84718A6C4C4D2DB64756E2164756E21