From c71b7b59d05358e62eba2d9852acfe5461f7cbfe Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Tue, 30 Jan 2024 15:46:05 -0700 Subject: [PATCH] Fix #187 --- .eslintrc.js | 1 + packages/cbor-web/dist/cbor.js | 2 +- packages/cbor/lib/utils.js | 6 ++++-- packages/cbor/test/cases.js | 5 ++++- packages/cbor/test/tagged.ava.js | 6 +++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f18219b6..55959dde 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,6 +11,7 @@ module.exports = { ], rules: { 'no-empty': ['error', {allowEmptyCatch: true}], + 'jsdoc/imports-as-dependencies': 'off', }, overrides: [ { diff --git a/packages/cbor-web/dist/cbor.js b/packages/cbor-web/dist/cbor.js index e55c262c..d01a2ea5 100644 --- a/packages/cbor-web/dist/cbor.js +++ b/packages/cbor-web/dist/cbor.js @@ -1,2 +1,2 @@ /*! For license information please see cbor.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cbor=t():e.cbor=t()}(this,(()=>(()=>{var e={8599:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,f=l>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;au?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function x(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Y(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}C("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),C("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),C("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2141:(e,t,r)=>{"use strict";const n=r(2020),i=r(4694),o=r(6774),s=r(4666),a=r(9032),l=r(4785),u=r(3070),c=r(8112);e.exports={Commented:n,Diagnose:i,Decoder:o,Encoder:s,Simple:a,Tagged:l,Map:u,SharedValueEncoder:c,comment:n.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:s.encode,encodeCanonical:s.encodeCanonical,encodeOne:s.encodeOne,encodeAsync:s.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:s.encode,buffer:!0,name:"cbor"},reset(){s.reset(),l.reset()}}},2020:(e,t,r)=>{"use strict";const n=r(2830),i=r(9873),o=r(6774),s=r(4202),{MT:a,NUMBYTES:l,SYMS:u}=r(9066),{Buffer:c}=r(8764);function f(e){return e>1?"s":""}class h extends n.Transform{constructor(e={}){const{depth:t=1,max_depth:r=10,no_summary:n=!1,tags:i={},preferWeb:a,encoding:l,...u}=e;super({...u,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=r,this.all=new s,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:r,preferWeb:a,encoding:l}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),n||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new h({depth:this.depth+1,no_summary:!0});t.on("data",(e=>this.push(e))),t.on("error",(e=>this.emit("error",e))),t.end(e)}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){return this.parser._flush(e)}static comment(e,t={},r=null){if(null==e)throw new Error("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const n=new s,{encoding:o="hex",...a}=t,l=new h(a);let u=null;return"function"==typeof r?(l.on("end",(()=>{r(null,n.toString("utf8"))})),l.on("error",r)):u=new Promise(((e,t)=>{l.on("end",(()=>{e(n.toString("utf8"))})),l.on("error",t)})),l.pipe(n),i.guessEncoding(e,o).pipe(l),u}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(t);let r=2*(this.max_depth-this.depth)-t.length;r<1&&(r=1),this.push(new Array(r+1).join(" ")),this.push("-- ")}_on_more(e,t,r,n){let i="";switch(this.depth++,e){case a.POS_INT:i="Positive number,";break;case a.NEG_INT:i="Negative number,";break;case a.ARRAY:i="Array, length";break;case a.MAP:i="Map, count";break;case a.BYTE_STRING:i="Bytes, length";break;case a.UTF8_STRING:i="String, length";break;case a.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${f(t)}\n`)}_on_start_string(e,t,r,n){let i="";switch(this.depth++,e){case a.BYTE_STRING:i=`Bytes, length: ${t}`;break;case a.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,r,n){switch(this.depth++,r){case a.ARRAY:this.push(`[${n}], `);break;case a.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}switch(e){case a.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case a.ARRAY:t===u.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${f(t)}`);break;case a.MAP:t===u.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${f(t)}`);break;case a.BYTE_STRING:this.push("Bytes (streaming)");break;case a.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,r,n){if(e!==u.BREAK)switch(t){case a.ARRAY:this.push(`[${r}], `);break;case a.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||c.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),n){case l.ONE:case l.TWO:case l.FOUR:case l.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=h},9066:(e,t)=>{"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},6774:(e,t,r)=>{"use strict";const n=r(71),i=r(4785),o=r(9032),s=r(9873),a=r(4202),l=(r(2830),r(9066)),{MT:u,NUMBYTES:c,SYMS:f,BI:h}=l,{Buffer:d}=r(8764),p=Symbol("count"),b=Symbol("major type"),y=Symbol("error"),g=Symbol("not found");function w(e,t,r){const n=[];return n[p]=r,n[f.PARENT]=e,n[b]=t,n}function _(e,t){const r=new a;return r[p]=-1,r[f.PARENT]=e,r[b]=t,r}class m extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function E(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class S extends n{constructor(e={}){const{tags:t={},max_depth:r=-1,preferWeb:n=!1,required:i=!1,encoding:o="hex",extendedResults:s=!1,preventDuplicateKeys:l=!1,...u}=e;super({defaultEncoding:o,...u}),this.running=!0,this.max_depth=r,this.tags=t,this.preferWeb=n,this.extendedResults=s,this.required=i,this.preventDuplicateKeys=l,s&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new a)}static nullcheck(e){switch(e){case f.NULL:return null;case f.UNDEFINED:return;case g:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=i._parse();let l=a.next();for(;!l.done;){const e=o.read(l.value);if(null==e||e.length!==l.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),l=a.next(e)}let u=null;if(i.extendedResults)u=l.value,u.unused=o.read();else if(u=S.nullcheck(l.value),o.length>0){const e=o.read(1);throw o.unshift(e),new m(e[0],u)}return u}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const r=o.read(t.value);if(null==r||r.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(r),t=e.next(r)}a.push(S.nullcheck(t.value))}return a}static decodeFirst(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",required:i=!1,...o}=t,a=new S(o);let l=g;const u=s.guessEncoding(e,n),c=new Promise(((e,t)=>{a.on("data",(e=>{l=S.nullcheck(e),a.close()})),a.once("error",(r=>a.extendedResults&&r instanceof m?(l.unused=a.bs.slice(),e(l)):(l!==g&&(r.value=l),l=y,a.close(),t(r)))),a.once("end",(()=>{switch(l){case g:return i?t(new Error("No CBOR found")):e(l);case y:return;default:return e(l)}}))}));return"function"==typeof r&&c.then((e=>r(null,e)),r),u.pipe(a),c}static decodeAll(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",...i}=t,o=new S(i),a=[];o.on("data",(e=>a.push(S.nullcheck(e))));const l=new Promise(((e,t)=>{o.on("error",t),o.on("end",(()=>e(a)))}));return"function"==typeof r&&l.then((e=>r(void 0,e)),(e=>r(e,void 0))),s.guessEncoding(e,n).pipe(o),l}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,r=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[n]=yield 1;if(!this.running)throw this.bs.unshift(d.from([n])),new m(n);const l=n>>5,y=31&n,g=null==e?void 0:e[b],E=null==e?void 0:e.length;switch(y){case c.ONE:this.emit("more-bytes",l,1,g,E),[r]=yield 1;break;case c.TWO:case c.FOUR:case c.EIGHT:{const e=1<{"use strict";const n=r(2830),i=r(6774),o=r(9873),s=r(4202),{MT:a,SYMS:l}=r(9066);class u extends n.Transform{constructor(e={}){const{separator:t="\n",stream_errors:r=!1,tags:n,max_depth:o,preferWeb:s,encoding:a,...l}=e;super({...l,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=r,this.parser=new i({tags:n,max_depth:o,preferWeb:s,encoding:a}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){this.parser._flush((t=>this.stream_errors?(t&&this._on_error(t),e()):e(t)))}static diagnose(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const{encoding:n="hex",...i}=t,a=new s,l=new u(i);let c=null;return"function"==typeof r?(l.on("end",(()=>r(null,a.toString("utf8")))),l.on("error",r)):c=new Promise(((e,t)=>{l.on("end",(()=>e(a.toString("utf8")))),l.on("error",t)})),l.pipe(a),o.guessEncoding(e,n).pipe(l),c}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,r,n){e===a.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case a.BYTE_STRING:case a.UTF8_STRING:case a.ARRAY:t>0&&this.push(", ");break;case a.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,r){if(e===l.BREAK)return;this._fore(t,r);const n=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,n))}_on_start(e,t,r,n){switch(this._fore(r,n),e){case a.TAG:this.push(`${t}(`);break;case a.ARRAY:this.push("[");break;case a.MAP:this.push("{");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push("(")}t===l.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case a.TAG:this.push(")");break;case a.ARRAY:this.push("]");break;case a.MAP:this.push("}");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=u},4666:(e,t,r)=>{"use strict";const n=r(2830),i=r(4202),o=r(9873),s=r(9066),{MT:a,NUMBYTES:l,SHIFT32:u,SIMPLE:c,SYMS:f,TAG:h,BI:d}=s,{Buffer:p}=r(8764),b=a.SIMPLE_FLOAT<<5|l.TWO,y=a.SIMPLE_FLOAT<<5|l.FOUR,g=a.SIMPLE_FLOAT<<5|l.EIGHT,w=a.SIMPLE_FLOAT<<5|c.TRUE,_=a.SIMPLE_FLOAT<<5|c.FALSE,m=a.SIMPLE_FLOAT<<5|c.UNDEFINED,E=a.SIMPLE_FLOAT<<5|c.NULL,S=p.from([255]),v=p.from("f97e00","hex"),A=p.from("f9fc00","hex"),I=p.from("f97c00","hex"),T=p.from("f98000","hex"),R={};let B={};class N extends n.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:r,disallowUndefinedKeys:n=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:s=!1,omitUndefinedProperties:a=!1,genTypes:l=[],...u}=e;if(super({...u,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=r,this.disallowUndefinedKeys=n,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof s)s&&(this.detectLoops=new WeakSet);else{if(!(s instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=s}if(this.omitUndefinedProperties=a,this.semanticTypes={...N.SEMANTIC_TYPES},Array.isArray(l))for(let e=0,t=l.length;e{const r=typeof e[t];return"function"!==r&&(!this.omitUndefinedProperties||"undefined"!==r)})),n={};if(this.canonical&&r.sort(((e,t)=>{const r=n[e]||(n[e]=N.encode(e)),i=n[t]||(n[t]=N.encode(t));return r.compare(i)})),t.indefinite){if(!this._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!this._pushInt(r.length,a.MAP))return!1;let i=null;for(let t=0,o=r.length;tvoid 0!==t))),r.indefinite){if(!e._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!e._pushInt(n.length,a.MAP))return!1;if(e.canonical){const t=new N({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),r=new i({highWaterMark:e.readableHighWaterMark});t.pipe(r),n.sort((([e],[n])=>{t.pushAny(e);const i=r.read();t.pushAny(n);const o=r.read();return i.compare(o)}));for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}}else for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}return!(r.indefinite&&!e.push(S))}static _pushTypedArray(e,t){let r=64,n=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(r|=16,n/=2):i.includes("U")||(r|=8),(i.includes("Clamped")||1!==n&&!o.isBigEndian())&&(r|=4),r|={1:0,2:1,4:2,8:3}[n],!!e._pushTag(r)&&N._pushBuffer(e,p.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return N._pushBuffer(e,p.from(t))}static encodeIndefinite(e,t,r={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:n=4096}=r;let i=!0;const s=typeof t;let u=null;if("string"===s){i=i&&e._pushUInt8(a.UTF8_STRING<<5|l.INDEFINITE);let r=0;for(;r{const i=[],o=new N(t);o.on("data",(e=>i.push(e))),o.on("error",n),o.on("finish",(()=>r(p.concat(i)))),o.pushAny(e),o.end()}))}static get SEMANTIC_TYPES(){return B}static set SEMANTIC_TYPES(e){B=e}static reset(){N.SEMANTIC_TYPES={...R}}}Object.assign(R,{Array:N.pushArray,Date:N._pushDate,Buffer:N._pushBuffer,[p.name]:N._pushBuffer,Map:N._pushMap,NoFilter:N._pushNoFilter,[i.name]:N._pushNoFilter,RegExp:N._pushRegexp,Set:N._pushSet,ArrayBuffer:N._pushArrayBuffer,Uint8ClampedArray:N._pushTypedArray,Uint8Array:N._pushTypedArray,Uint16Array:N._pushTypedArray,Uint32Array:N._pushTypedArray,Int8Array:N._pushTypedArray,Int16Array:N._pushTypedArray,Int32Array:N._pushTypedArray,Float32Array:N._pushTypedArray,Float64Array:N._pushTypedArray,URL:N._pushURL,Boolean:N._pushBoxed,Number:N._pushBoxed,String:N._pushBoxed}),"undefined"!=typeof BigUint64Array&&(R[BigUint64Array.name]=N._pushTypedArray),"undefined"!=typeof BigInt64Array&&(R[BigInt64Array.name]=N._pushTypedArray),N.reset(),e.exports=N},3070:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4666),o=r(6774),{MT:s}=r(9066);class a extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(a._encode(e))}set(e,t){return super.set(a._encode(e),t)}delete(e){return super.delete(a._encode(e))}has(e){return super.has(a._encode(e))}*keys(){for(const e of super.keys())yield a._decode(e)}*entries(){for(const e of super.entries())yield[a._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t){if("function"!=typeof e)throw new TypeError("Must be function");for(const t of super.entries())e.call(this,t[1],a._decode(t[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,s.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map((e=>[n.from(e[0],"base64"),e[1]]));t.sort(((e,t)=>e[0].compare(t[0])));for(const r of t)if(!e.push(r[0])||!e.pushAny(r[1]))return!1}else for(const t of super.entries())if(!e.push(n.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=a},1226:e=>{"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const r=this.map.get(e);if(r)return r.length>1?r[0]||this.recording?r[1]:(r[0]=!0,t.FIRST):this.recording?(r.push(this.count++),r[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},8112:(e,t,r)=>{"use strict";const n=r(4666),i=r(1226),{Buffer:o}=r(8764);class s extends n{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new s;t.on("data",(()=>{}));for(const r of e)t.pushAny(r);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const r=new s(t);return r.on("data",(()=>{})),r.pushAny(e),r.stopRecording(),r.removeAllListeners("data"),r._encodeAll([e])}static encodeAsync(e,t){return new Promise(((r,n)=>{const i=[],a=new s(t);a.on("data",(()=>{})),a.on("error",n),a.on("finish",(()=>r(o.concat(i)))),a.pushAny(e),a.stopRecording(),a.removeAllListeners("data"),a.on("data",(e=>i.push(e))),a.pushAny(e),a.end()}))}}e.exports=s},9032:(e,t,r)=>{"use strict";const{MT:n,SIMPLE:i,SYMS:o}=r(9066);class s{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,n.SIMPLE_FLOAT)}static isSimple(e){return e instanceof s}static decode(e,t=!0,r=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!r)throw new Error("Invalid BREAK");return o.BREAK;default:return new s(e)}}}e.exports=s},4785:(e,t,r)=>{"use strict";const n=r(9066),i=r(9873),o=Symbol("INTERNAL_JSON");function s(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const r of e)s(r,t);else if(e&&"object"==typeof e&&(!(e instanceof p)||e.tag<21||e.tag>23))for(const r of Object.values(e))s(r,t)}function a(){return i.base64(this)}function l(){return i.base64url(this)}function u(){return this.toString("hex")}const c={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>n.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=l:s(e,l),t),22:(e,t)=>(i.isBufferish(e)?t[o]=a:s(e,a),t),23:(e,t)=>(i.isBufferish(e)?t[o]=u:s(e,u),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const r=e.length%4;if(1===r)throw new Error("Invalid base64url length");if(2===r){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===r&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const r=e.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);if(!r)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===r.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===r.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},f={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function h(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:r}=t,n=f[r];if(!n)throw new Error(`Invalid typed array tag: ${r}`);const o=2**(((16&r)>>4)+(3&r));return!(4&r)!==i.isBigEndian()&&o>1&&function(e,t,r,n){const i=new DataView(e),[o,s]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],a=r+n;for(let e=r;e0?this.err=e.message:this.err=e,this}}static get TAGS(){return d}static set TAGS(e){d=e}static reset(){p.TAGS={...c}}}p.INTERNAL_JSON=o,p.reset(),e.exports=p},9873:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4202),o=r(2830),s=r(9066),{NUMBYTES:a,SHIFT32:l,BI:u,SYMS:c}=s,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>f.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(n.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return n.isBuffer(e)?e:ArrayBuffer.isView(e)?n.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?n.from(e):null},t.parseCBORint=function(e,t){switch(e){case a.ONE:return t.readUInt8(0);case a.TWO:return t.readUInt16BE(0);case a.FOUR:return t.readUInt32BE(0);case a.EIGHT:{const e=t.readUInt32BE(0),r=t.readUInt32BE(4);return e>2097151?BigInt(e)*u.SHIFT32+BigInt(r):e*l+r}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const r=n.allocUnsafe(4);r.writeFloatBE(t,0);const i=r.readUInt32BE(0);if(0!=(8191&i))return!1;let o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,r=(124&e[0])>>2,n=(3&e[0])<<8|e[1];return r?31===r?t*(n?NaN:1/0):t*2**(r-25)*(1024+n):5.960464477539063e-8*t*n},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return n.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,r=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;r<=e.length;)i.push(parseInt(e.slice(t,r),2)),t=r,r+=8;return n.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,r)=>e===t[r]))},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,r=-1){switch(typeof e){case"symbol":{switch(e){case c.NULL:return"null";case c.UNDEFINED:return"undefined";case c.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return r>0?`${t}_${r}`:t}case"object":{const n=t.bufferishToBuffer(e);if(n){const e=n.toString("hex");return r===-1/0?e:`h'${e}'`}return"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,r){if("string"==typeof e)return new i(e,null==r?"hex":r);const n=t.bufferishToBuffer(e);if(n)return new i(n);if((s=e)instanceof o.Readable||["read","on","pipe"].every((e=>"function"==typeof s[e])))return e;var s;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,(e=>h[e]))},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},4202:(e,t,r)=>{"use strict";const n=r(2830),{Buffer:i}=r(8764),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class s extends n.Transform{constructor(e,t,r={}){let n=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?n=e:e&&(r=e);break;case"string":n=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(r=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!r||"object"!=typeof r)throw new TypeError("Invalid options");null==n&&(n=r.input),null==o&&(o=r.inputEncoding),delete r.input,delete r.inputEncoding;const s=null==r.watchPipe||r.watchPipe;delete r.watchPipe;const a=Boolean(r.readError);delete r.readError,super(r),this.readError=a,s&&this.on("pipe",(e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t})),null!=n&&this.end(n,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce(((e,t)=>{if(!(t instanceof s))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length}),0));let r=!0,n=!0;const o=e.map((e=>{if(!(e instanceof s))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?n=!1:r=!1,t}));if(r)return i.concat(o,t);if(n)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,r){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),r()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},r=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},n=o,this.on("readable",t),this.on("error",n),this.on("finish",r))})).finally((()=>{t&&(this.removeListener("readable",t),this.removeListener("error",n),this.removeListener("finish",r))}))}promise(e){let t=!1;return new Promise(((r,n)=>{this.on("finish",(()=>{const n=this.read();null==e||t||(t=!0,e(null,n)),r(n)})),this.on("error",(r=>{null==e||t||(t=!0,e(r)),n(r)}))}))}compare(e){if(!(e instanceof s))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),r=e.slice();if(i.isBuffer(t)&&i.isBuffer(r))return t.compare(r);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const r=this._bufArray();switch(r.length){case 0:return i.alloc(0);case 1:return r[0].slice(e,t);default:return i.concat(r).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,r){const n=this.slice(t,r);return i.isBuffer(n)?e&&"utf8"!==e?n.toString(e):o.decode(n):JSON.stringify(n)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const r=this._bufArray().map((e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e))).join(", ");return`${this.constructor.name} [${r}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const r=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<{"use strict";const n=r(2830),i=r(4202);class o extends n.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,r){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return r(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return r()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*b}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],u=!1,c=-1;function f(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{"use strict";e.exports=r(5099).Duplex},2725:(e,t,r)=>{"use strict";e.exports=r(5099).PassThrough},9481:(e,t,r)=>{"use strict";e.exports=r(5099).Readable},4605:(e,t,r)=>{"use strict";e.exports=r(5099).Transform},4229:(e,t,r)=>{"use strict";e.exports=r(5099).Writable},196:(e,t,r)=>{"use strict";const{AbortError:n,codes:i}=r(4381),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:a}=r(5874),l=r(8610),{ERR_INVALID_ARG_TYPE:u}=i;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new u("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new u("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=o(t)?()=>{t.destroy(new n(void 0,{cause:e.reason}))}:()=>{t[a](new n(void 0,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),l(t,(()=>e.removeEventListener("abort",r)))),t}},7327:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(9061),{Buffer:a}=r(8764),{inspect:l}=r(6087);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},299:(e,t,r)=>{"use strict";const{pipeline:n}=r(9946),i=r(8672),{destroyer:o}=r(1195),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:h}=r(5874),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(4381),y=r(8610);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,g,w,_,m;const E=e[0],S=n(e,(function(e){const t=_;_=null,t?t(e):e?m.destroy(e):A||v||m.destroy()})),v=!!(l(E)||f(E)||c(E)),A=!!(a(S)||h(S)||c(S));if(m=new i({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==S||!S.writableObjectMode),writable:v,readable:A}),v){if(s(E))m._write=function(e,t,n){E.write(e,t)?n():r=n},m._final=function(e){E.end(),g=e},E.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(E)){const e=(c(E)?E.writable:E).getWriter();m._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},m._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(s(S))S.on("readable",(function(){if(w){const e=w;w=null,e()}})),S.on("end",(function(){m.push(null)})),m._read=function(){for(;;){const e=S.read();if(null===e)return void(w=m._read);if(!m.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();m._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!m.push(t))return;if(r)return void m.push(null)}catch{return}}}return m._destroy=function(e,t){e||null===_||(e=new d),w=null,r=null,g=null,null===_?t(e):(_=t,s(S)&&o(S,e))},m}},1195:(e,t,r)=>{"use strict";const n=r(4155),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(4381),{Symbol:a}=r(9061),{kDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(5874),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(g,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function y(e,t){w(e,t),g(e)}function g(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function w(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function _(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(w,e,t):w(e,t))}function m(e){let t=!1;function r(r){if(t)return void _(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?_(e,r,!0):n.nextTick(E,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function E(e){e.emit(d)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function v(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(v,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(m,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(v,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(h,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:_}},8672:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(9061);e.exports=u;const a=r(911),l=r(6304);s(u.prototype,a.prototype),s(u,a);{const e=o(l.prototype);for(let t=0;t{const n=r(4155),i=r(8764),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f}=r(5874),h=r(8610),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:b}}=r(4381),{destroyer:y}=r(1195),g=r(8672),w=r(911),{createDeferredPromise:_}=r(6087),m=r(6307),E=globalThis.Blob||i.Blob,S=void 0!==E?function(e){return e instanceof E}:function(e){return!1},v=globalThis.AbortController||r(8599).AbortController,{FunctionPrototypeCall:A}=r(9061);class I extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function T(e){const t=e.readable&&"function"!=typeof e.readable.read?w.wrap(e.readable):e.readable,r=e.writable;let n,i,a,l,u,c=!!o(t),f=!!s(r);function p(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new I({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(h(r,(e=>{f=!1,e&&y(t,e),p(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(h(t,(e=>{c=!1,e&&y(t,e),p(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new d),a=null,n=null,i=null,null===l?o(e):(l=o,y(r,e),y(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return T({readable:t});if(c(t))return T({writable:t});if(l(t))return T({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=_();const i=new v,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new d(void 0,{cause:o.reason});({promise:t,resolve:r}=_()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return m(I,e,{objectMode:!0,write:i,final:o,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=A(l,e,(e=>{if(null!=e)throw new b("nully","body",e)}),(e=>{y(t,e)}));return t=new I({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new b("Iterable, AsyncIterable or AsyncFunction",r,e)}if(S(t))return e(t.arrayBuffer());if(a(t))return m(I,t,{objectMode:!0,writable:!1});if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return T({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return A(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{y(e,t)})),e=new I({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},8610:(e,t,r)=>{const n=r(4155),{AbortError:i,codes:o}=r(4381),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(6087),{validateAbortSignal:c,validateFunction:f,validateObject:h,validateBoolean:d}=r(6547),{Promise:p,PromisePrototypeThen:b}=r(9061),{isClosed:y,isReadable:g,isReadableNodeStream:w,isReadableStream:_,isReadableFinished:m,isReadableErrored:E,isWritable:S,isWritableNodeStream:v,isWritableStream:A,isWritableFinished:I,isWritableErrored:T,isNodeStream:R,willEmitClose:B,kIsClosedPromise:N}=r(5874),L=()=>{};function U(e,t,r){var o,d;if(2===arguments.length?(r=t,t=l):null==t?t=l:h(t,"options"),f(r,"callback"),c(t.signal,"options.signal"),r=u(r),_(e)||A(e))return function(e,t,r){let o=!1,s=L;if(t.signal)if(s=()=>{o=!0,r.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",s),n.apply(e,r)})),t.signal.addEventListener("abort",s)}const a=(...t)=>{o||n.nextTick((()=>r.apply(e,t)))};return b(e[N].promise,a,a),L}(e,t,r);if(!R(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const p=null!==(o=t.readable)&&void 0!==o?o:w(e),U=null!==(d=t.writable)&&void 0!==d?d:v(e),O=e._writableState,M=e._readableState,x=()=>{e.writable||j()};let k=B(e)&&w(e)===p&&v(e)===U,P=I(e,!1);const j=()=>{P=!0,e.destroyed&&(k=!1),(!k||e.readable&&!p)&&(p&&!F||r.call(e))};let F=m(e,!1);const D=()=>{F=!0,e.destroyed&&(k=!1),(!k||e.writable&&!U)&&(U&&!P||r.call(e))},C=t=>{r.call(e,t)};let $=y(e);const W=()=>{$=!0;const t=T(e)||E(e);return t&&"boolean"!=typeof t?r.call(e,t):p&&!F&&w(e,!0)&&!m(e,!1)?r.call(e,new a):!U||P||I(e,!1)?void r.call(e):r.call(e,new a)},G=()=>{$=!0;const t=T(e)||E(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},Y=()=>{e.req.on("finish",j)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?U&&!O&&(e.on("end",x),e.on("close",x)):(e.on("complete",j),k||e.on("abort",W),e.req?Y():e.on("request",Y)),k||"boolean"!=typeof e.aborted||e.on("aborted",W),e.on("end",D),e.on("finish",j),!1!==t.error&&e.on("error",C),e.on("close",W),$?n.nextTick(W):null!=O&&O.errorEmitted||null!=M&&M.errorEmitted?k||n.nextTick(G):(p||k&&!g(e)||!P&&!1!==S(e))&&(U||k&&!S(e)||!F&&!1!==g(e))?M&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const H=()=>{r=L,e.removeListener("aborted",W),e.removeListener("complete",j),e.removeListener("abort",W),e.removeListener("request",Y),e.req&&e.req.removeListener("finish",j),e.removeListener("end",x),e.removeListener("close",x),e.removeListener("finish",j),e.removeListener("end",D),e.removeListener("error",C),e.removeListener("close",W)};if(t.signal&&!$){const o=()=>{const n=r;H(),n.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{const n=r;r=u(((...r)=>{t.signal.removeEventListener("abort",o),n.apply(e,r)})),t.signal.addEventListener("abort",o)}}return H}e.exports=U,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=U(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6307:(e,t,r)=>{"use strict";const n=r(4155),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(9061),{Buffer:a}=r(8764),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(4381).codes;e.exports=function(e,t,r){let c,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,c=t[o]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);f=!1,c=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new u;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4870:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(9061),{EventEmitter:o}=r(7187);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},4382:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(4381),{validateAbortSignal:u,validateInteger:c,validateObject:f}=r(6547),h=r(9061).Symbol("kWeak"),{finished:d}=r(8610),p=r(299),{addAbortSignalNoValidate:b}=r(196),{isWritable:y,isNodeStream:g}=r(5874),{ArrayPrototypePush:w,MathFloor:_,Number:m,NumberIsNaN:E,Promise:S,PromiseReject:v,PromisePrototypeThen:A,Symbol:I}=r(9061),T=I("kEmpty"),R=I("kEof");function B(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let r=1;return null!=(null==t?void 0:t.concurrency)&&(r=_(t.concurrency)),c(r,"concurrency",1),async function*(){var i,o;const s=new n,a=this,u=[],c=s.signal,f={signal:c},h=()=>s.abort();let d,p;null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted&&h(),null==t||null===(o=t.signal)||void 0===o||o.addEventListener("abort",h);let b=!1;function y(){b=!0}!async function(){try{for await(let t of a){var n;if(b)return;if(c.aborted)throw new l;try{t=e(t,f)}catch(e){t=v(e)}t!==T&&("function"==typeof(null===(n=t)||void 0===n?void 0:n.catch)&&t.catch(y),u.push(t),d&&(d(),d=null),!b&&u.length&&u.length>=r&&await new S((e=>{p=e})))}u.push(R)}catch(e){const t=v(e);A(t,void 0,y),u.push(t)}finally{var i;b=!0,d&&(d(),d=null),null==t||null===(i=t.signal)||void 0===i||i.removeEventListener("abort",h)}}();try{for(;;){for(;u.length>0;){const e=await u[0];if(e===R)return;if(c.aborted)throw new l;e!==T&&(yield e),u.shift(),p&&(p(),p=null)}await new S((e=>{d=e}))}}finally{s.abort(),b=!0,p&&(p(),p=null)}}.call(this)}async function N(e,t=void 0){for await(const r of L.call(this,e,t))return!0;return!1}function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return B.call(this,(async function(t,r){return await e(t,r)?t:T}),t)}class U extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function O(e){if(e=m(e),E(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=O(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:L,flatMap:function(e,t){const r=B.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:B,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=O(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),g(e)&&!y(e))throw new i("stream",e,"must be writable");const r=p(this,e);return null!=t&&t.signal&&b(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await N.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of B.call(this,(async function(t,r){return await e(t,r),T}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await d(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let p=!1;try{for await(const n of this){var b;if(p=!0,null!=r&&null!==(b=r.signal)&&void 0!==b&&b.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!p&&!s)throw new U}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:N,find:async function(e,t){for await(const r of L.call(this,e,t))return r}}},917:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(9061);e.exports=o;const i=r(1161);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},9946:(e,t,r)=>{const n=r(4155),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s}=r(9061),a=r(8610),{once:l}=r(6087),u=r(1195),c=r(8672),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:d,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:b,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:g}=r(4381),{validateFunction:w,validateAbortSignal:_}=r(6547),{isIterable:m,isReadable:E,isReadableNodeStream:S,isNodeStream:v,isTransformStream:A,isWebStream:I,isReadableStream:T,isReadableEnded:R}=r(5874),B=globalThis.AbortController||r(8599).AbortController;let N,L;function U(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,u.destroyer(e,t||new b("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function O(e){if(m(e))return e;if(S(e))return async function*(e){L||(L=r(911)),yield*L.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function M(e,t,r,{end:n}){let i,s=null;const l=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},u=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",l);const c=a(t,{readable:!1},l);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&t.end(),await u(),r()}catch(e){r(i!==e?f(i,e):e)}finally{c(),t.off("drain",l)}}async function x(e,t,r,{end:n}){A(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function k(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new p("streams");const s=new B,a=s.signal,l=null==o?void 0:o.signal,u=[];function f(){j(new g)}let b,y;_(l,"options.signal"),null==l||l.addEventListener("abort",f);const w=[];let R,L=0;function k(e){j(e,0==--L)}function j(e,r){if(!e||b&&"ERR_STREAM_PREMATURE_CLOSE"!==b.code||(b=e),b||r){for(;w.length;)w.shift()(b);null==l||l.removeEventListener("abort",f),s.abort(),r&&(b||u.forEach((e=>e())),n.nextTick(t,b,y))}}for(let $=0;$0,H=G||!1!==(null==o?void 0:o.end),V=$===e.length-1;if(v(W)){if(H){const{destroy:K,cleanup:q}=U(W,G,Y);w.push(K),E(W)&&V&&u.push(q)}function F(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&k(e)}W.on("error",F),E(W)&&V&&u.push((()=>{W.removeListener("error",F)}))}if(0===$)if("function"==typeof W){if(R=W({signal:a}),!m(R))throw new d("Iterable, AsyncIterable or Stream","source",R)}else R=m(W)||S(W)||A(W)?W:c.from(W);else if("function"==typeof W){var D;if(R=A(R)?O(null===(D=R)||void 0===D?void 0:D.readable):O(R),R=W(R,{signal:a}),G){if(!m(R,!0))throw new d("AsyncIterable",`transform[${$-1}]`,R)}else{var C;N||(N=r(917));const z=new N({objectMode:!0}),X=null===(C=R)||void 0===C?void 0:C.then;if("function"==typeof X)L++,X.call(R,(e=>{y=e,null!=e&&z.write(e),H&&z.end(),n.nextTick(k)}),(e=>{z.destroy(e),n.nextTick(k,e)}));else if(m(R,!0))L++,M(R,z,k,{end:H});else{if(!T(R)&&!A(R))throw new d("AsyncIterable or Promise","destination",R);{const Q=R.readable||R;L++,M(Q,z,k,{end:H})}}R=z;const{destroy:J,cleanup:Z}=U(R,!1,!0);w.push(J),V&&u.push(Z)}}else if(v(W)){if(S(R)){L+=2;const ee=P(R,W,k,{end:H});E(W)&&V&&u.push(ee)}else if(A(R)||T(R)){const te=R.readable||R;L++,M(te,W,k,{end:H})}else{if(!m(R))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);L++,M(R,W,k,{end:H})}R=W}else if(I(W)){if(S(R))L++,x(O(R),W,k,{end:H});else if(T(R)||m(R))L++,x(R,W,k,{end:H});else{if(!A(R))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);L++,x(R.readable,W,k,{end:H})}R=W}else R=c.from(W)}return(null!=a&&a.aborted||null!=l&&l.aborted)&&n.nextTick(f),R}function P(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new y)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}R(e)?n.nextTick(s):e.once("end",s)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:k,pipeline:function(...e){return k(e,l(function(e){return w(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},911:(e,t,r)=>{const n=r(4155),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:f,SafeSet:h,SymbolAsyncIterator:d,Symbol:p}=r(9061);e.exports=D,D.ReadableState=F;const{EventEmitter:b}=r(7187),{Stream:y,prependListener:g}=r(4870),{Buffer:w}=r(8764),{addAbortSignal:_}=r(196),m=r(8610);let E=r(6087).debuglog("stream",(e=>{E=e}));const S=r(7327),v=r(1195),{getHighWaterMark:A,getDefaultHighWaterMark:I}=r(2457),{aggregateTwoErrors:T,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:B,ERR_OUT_OF_RANGE:N,ERR_STREAM_PUSH_AFTER_EOF:L,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:U}}=r(4381),{validateObject:O}=r(6547),M=p("kPaused"),{StringDecoder:x}=r(2553),k=r(6307);c(D.prototype,y.prototype),c(D,y);const P=()=>{},{errorOrDestroy:j}=v;function F(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.readableObjectMode)),this.highWaterMark=e?A(this,e,"readableHighWaterMark",n):I(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[M]=null,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new x(e.encoding),this.encoding=e.encoding)}function D(e){if(!(this instanceof D))return new D(e);const t=this instanceof r(8672);this._readableState=new F(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),y.call(this,e),v.construct(this,(()=>{this._readableState.needReadable&&H(this,this._readableState)}))}function C(e,t,r,n){E("readableAddChunk",t);const i=e._readableState;let o;if(i.objectMode||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=w.from(t,r).toString(i.encoding):(t=w.from(t,r),r=""))):t instanceof w?r="":y._isUint8Array(t)?(t=y._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new R("chunk",["string","Buffer","Uint8Array"],t))),o)j(e,o);else if(null===t)i.reading=!1,function(e,t){if(E("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?G(e):(t.needReadable=!1,t.emittedReadable=!0,Y(e))}}(e,i);else if(i.objectMode||t&&t.length>0)if(n)if(i.endEmitted)j(e,new U);else{if(i.destroyed||i.errored)return!1;$(e,i,t,!0)}else if(i.ended)j(e,new L);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?$(e,i,t,!1):H(e,i)):$(e,i,t,!1)}else n||(i.reading=!1,H(e,i));return!i.ended&&(i.length0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&G(e)),H(e,t)}function W(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function G(e){const t=e._readableState;E("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(E("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(Y,e))}function Y(e){const t=e._readableState;E("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,X(e)}function H(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(V,e,t))}function V(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[M]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function q(e){E("readable nexttick read 0"),e.read(0)}function z(e,t){E("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),X(e),t.flowing&&!t.reading&&e.read(0)}function X(e){const t=e._readableState;for(E("flow",t.flowing);t.flowing&&null!==e.read(););}function J(e,t){"function"!=typeof e.read&&(e=D.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=P;function i(t){this===e?(n(),n=P):n=t}e.on("readable",i);const o=m(e,{writable:!1},(e=>{r=e?T(r,e):null,n(),n=P}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=T(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):v.destroyer(e,null)}}(e,t);return r.stream=e,r}function Z(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Q(e){const t=e._readableState;E("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(E("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return void 0===re&&(re={}),re}D.prototype.destroy=v.destroy,D.prototype._undestroy=v.undestroy,D.prototype._destroy=function(e,t){t(e)},D.prototype[b.captureRejectionSymbol]=function(e){this.destroy(e)},D.prototype.push=function(e,t){return C(this,e,t,!1)},D.prototype.unshift=function(e,t){return C(this,e,t,!0)},D.prototype.isPaused=function(){const e=this._readableState;return!0===e[M]||!1===e.flowing},D.prototype.setEncoding=function(e){const t=new x(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},D.prototype.read=function(e){E("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new N("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return E("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):G(this),null;if(0===(e=W(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,i=t.needReadable;if(E("need readable",i),(0===t.length||t.length-e0?Z(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},D.prototype._read=function(e){throw new B("_read()")},D.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),E("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){E("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){E("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,E("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",c),l=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===i.pipes.length&&i.pipes[0]===e?(E("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(E("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(E("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(E("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){E("ondata");const r=e.write(t);E("dest.write",r),!1===r&&u()}function f(t){if(E("onerror",t),b(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?j(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),b()}function p(){E("onfinish"),e.removeListener("close",d),b()}function b(){E("unpipe"),r.unpipe(e)}return r.on("data",c),g(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?i.flowing&&u():i.flowing||(E("pipe resume"),r.resume()),e},D.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,E("on readable",i.length,i.reading),i.length?G(this):i.reading||n.nextTick(q,this))),r},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(e,t){const r=y.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(K,this),r},D.prototype.off=D.prototype.removeListener,D.prototype.removeAllListeners=function(e){const t=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(K,this),t},D.prototype.resume=function(){const e=this._readableState;return e.flowing||(E("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(z,e,t))}(this,e)),e[M]=!1,this},D.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},D.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{j(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(9061),{ERR_INVALID_ARG_VALUE:o}=r(4381).codes;function s(e){return e?16:16384}e.exports={getHighWaterMark:function(e,t,r,a){const l=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=l){if(!i(l)||l<0)throw new o(a?`options.${r}`:"options.highWaterMark",l);return n(l)}return s(e.objectMode)},getDefaultHighWaterMark:s}},1161:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(9061);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(4381).codes,s=r(8672),{getHighWaterMark:a}=r(2457);n(u.prototype,s.prototype),n(u,s);const l=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{Symbol:n,SymbolAsyncIterator:i,SymbolIterator:o,SymbolFor:s}=r(9061),a=n("kDestroyed"),l=n("kIsErrored"),u=n("kIsReadable"),c=n("kIsDisturbed"),f=s("nodejs.webstream.isClosedPromise"),h=s("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function w(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function _(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function m(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!_(e)&&d(e)&&e.readable&&!E(e)}function v(e){return"boolean"!=typeof(null==e?void 0:e.writable)?null:!_(e)&&p(e)&&e.writable&&!m(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,a,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[l])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(a=e._readableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:l,isReadable:S,kIsReadable:u,kIsClosedPromise:f,kControllerErrorFunction:h,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDestroyed:_,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!_(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&v(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[i]:!1===t?"function"==typeof e[o]:"function"==typeof e[i]||"function"==typeof e[o])},isReadableNodeStream:d,isReadableStream:y,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return y(e)||g(e)||w(e)},isWritable:v,isWritableNodeStream:p,isWritableStream:g,isWritableEnded:m,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:w}},6304:(e,t,r)=>{const n=r(4155),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:h}=r(9061);e.exports=x,x.WritableState=O;const{EventEmitter:d}=r(7187),p=r(4870).Stream,{Buffer:b}=r(8764),y=r(1195),{addAbortSignal:g}=r(196),{getHighWaterMark:w,getDefaultHighWaterMark:_}=r(2457),{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:B}=r(4381).codes,{errorOrDestroy:N}=y;function L(){}u(x.prototype,p.prototype),u(x,p);const U=f("kOnFinished");function O(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?w(this,e,"writableHighWaterMark",n):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),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=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function M(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function x(e){const t=this instanceof r(8672);if(!t&&!s(x,this))return new x(e);this._writableState=new O(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||W(this,e),Y(this,e)}))}function k(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new B(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=L)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new m("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new A("write")),s?(n.nextTick(i,s),N(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&W(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(D,r.afterWriteTickInfo)):C(e,r,1,o))):N(e,new S)}function D({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,C(e,t,r,n)}function C(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&$(t),Y(e,t)}function $(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?L:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function G(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function Y(e,t,r){G(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)N(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[U].splice(0);for(let e=0;e{G(t)?H(e,t):t.pendingcb--}),e,t)):G(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[U].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:y}=r(9061),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:S}}=r(4381),{normalizeEncoding:v}=r(6087),{isAsyncFunction:A,isArrayBufferView:I}=r(6087).types,T={},R=/^[0-7]+$/,B=g(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),N=g(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),L=g(((e,t,r=!1)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new E(t,`>= ${n} && <= ${i}`,e)}));function U(e,t){if("string"!=typeof e)throw new _(t,"string",e)}const O=g(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new m(t,e,"must be one of: "+n)}}));function M(e,t){if("boolean"!=typeof e)throw new _(t,"boolean",e)}function x(e,t,r){return null!=e&&h(e,t)?e[t]:r}const k=g(((e,t,r=null)=>{const i=x(r,"allowArray",!1),o=x(r,"allowFunction",!1);if(!x(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new _(t,"Object",e)})),P=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new _(t,"a dictionary",e)})),j=g(((e,t,r=0)=>{if(!n(e))throw new _(t,"Array",e);if(e.length{if(!I(e))throw new _(t,["Buffer","TypedArray","DataView"],e)})),D=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new _(t,"AbortSignal",e)})),C=g(((e,t)=>{if("function"!=typeof e)throw new _(t,"Function",e)})),$=g(((e,t)=>{if("function"!=typeof e||A(e))throw new _(t,"Function",e)})),W=g(((e,t)=>{if(void 0!==e)throw new _(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Y(e,t){if(void 0===e||!d(G,e))throw new m(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(R,e))throw new m(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return L(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new E(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:k,validateOneOf:O,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new w(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(U(e,t),void 0===T[e]){if(void 0!==T[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:U,validateUint32:L,validateUndefined:W,validateUnion:function(e,t,r){if(!i(r,e))throw new _(t,`('${o(r,"|")}')`,e)},validateAbortSignal:D,validateLinkHeaderValue:function(e){if("string"==typeof e)return Y(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},4381:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(6087),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},9061:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),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:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array}},6087:(e,t,r)=>{"use strict";const n=r(8764),i=Object.getPrototypeOf((async function(){})).constructor,o=globalThis.Blob||n.Blob,s=void 0!==o?function(e){return e instanceof o}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof i,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:s},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(e,t,r)=>{const{Buffer:n}=r(8764),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(9061),{promisify:{custom:a}}=r(6087),{streamReturningOperators:l,promiseReturningOperators:u}=r(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(4381),f=r(299),{pipeline:h}=r(9946),{destroyer:d}=r(1195),p=r(8610),b=r(7854),y=r(5874),g=e.exports=r(4870).Stream;g.isDisturbed=y.isDisturbed,g.isErrored=y.isErrored,g.isReadable=y.isReadable,g.Readable=r(911);for(const m of o(l)){const E=l[m];function w(...e){if(new.target)throw c();return g.Readable.from(s(E,this,e))}i(w,"name",{__proto__:null,value:E.name}),i(w,"length",{__proto__:null,value:E.length}),i(g.Readable.prototype,m,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const S of o(u)){const v=u[S];function w(...e){if(new.target)throw c();return s(v,this,e)}i(w,"name",{__proto__:null,value:v.name}),i(w,"length",{__proto__:null,value:v.length}),i(g.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(6304),g.Duplex=r(8672),g.Transform=r(1161),g.PassThrough=r(917),g.pipeline=h;const{addAbortSignal:_}=r(196);g.addAbortSignal=_,g.finished=p,g.destroy=d,g.compose=f,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>b}),i(h,a,{__proto__:null,enumerable:!0,get:()=>b.pipeline}),i(p,a,{__proto__:null,enumerable:!0,get:()=>b.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},7854:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(9061),{isIterable:o,isNodeStream:s,isWebStream:a}=r(5874),{pipelineImpl:l}=r(9946),{finished:u}=r(8610);r(2830),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var e=r(2141),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);r.d(n,t)})(),n})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cbor=t():e.cbor=t()}(this,(()=>(()=>{var e={8599:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],l=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),c=0,f=l>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;au?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function x(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function k(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||P(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||Y(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||Y(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}C("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),C("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),C("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2141:(e,t,r)=>{"use strict";const n=r(2020),i=r(4694),o=r(6774),s=r(4666),a=r(9032),l=r(4785),u=r(3070),c=r(8112);e.exports={Commented:n,Diagnose:i,Decoder:o,Encoder:s,Simple:a,Tagged:l,Map:u,SharedValueEncoder:c,comment:n.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:s.encode,encodeCanonical:s.encodeCanonical,encodeOne:s.encodeOne,encodeAsync:s.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:s.encode,buffer:!0,name:"cbor"},reset(){s.reset(),l.reset()}}},2020:(e,t,r)=>{"use strict";const n=r(2830),i=r(9873),o=r(6774),s=r(4202),{MT:a,NUMBYTES:l,SYMS:u}=r(9066),{Buffer:c}=r(8764);function f(e){return e>1?"s":""}class h extends n.Transform{constructor(e={}){const{depth:t=1,max_depth:r=10,no_summary:n=!1,tags:i={},preferWeb:a,encoding:l,...u}=e;super({...u,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=r,this.all=new s,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:r,preferWeb:a,encoding:l}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),n||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new h({depth:this.depth+1,no_summary:!0});t.on("data",(e=>this.push(e))),t.on("error",(e=>this.emit("error",e))),t.end(e)}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){return this.parser._flush(e)}static comment(e,t={},r=null){if(null==e)throw new Error("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const n=new s,{encoding:o="hex",...a}=t,l=new h(a);let u=null;return"function"==typeof r?(l.on("end",(()=>{r(null,n.toString("utf8"))})),l.on("error",r)):u=new Promise(((e,t)=>{l.on("end",(()=>{e(n.toString("utf8"))})),l.on("error",t)})),l.pipe(n),i.guessEncoding(e,o).pipe(l),u}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(t);let r=2*(this.max_depth-this.depth)-t.length;r<1&&(r=1),this.push(new Array(r+1).join(" ")),this.push("-- ")}_on_more(e,t,r,n){let i="";switch(this.depth++,e){case a.POS_INT:i="Positive number,";break;case a.NEG_INT:i="Negative number,";break;case a.ARRAY:i="Array, length";break;case a.MAP:i="Map, count";break;case a.BYTE_STRING:i="Bytes, length";break;case a.UTF8_STRING:i="String, length";break;case a.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${f(t)}\n`)}_on_start_string(e,t,r,n){let i="";switch(this.depth++,e){case a.BYTE_STRING:i=`Bytes, length: ${t}`;break;case a.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,r,n){switch(this.depth++,r){case a.ARRAY:this.push(`[${n}], `);break;case a.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}switch(e){case a.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case a.ARRAY:t===u.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${f(t)}`);break;case a.MAP:t===u.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${f(t)}`);break;case a.BYTE_STRING:this.push("Bytes (streaming)");break;case a.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,r,n){if(e!==u.BREAK)switch(t){case a.ARRAY:this.push(`[${r}], `);break;case a.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||c.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),n){case l.ONE:case l.TWO:case l.FOUR:case l.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=h},9066:(e,t)=>{"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},6774:(e,t,r)=>{"use strict";const n=r(71),i=r(4785),o=r(9032),s=r(9873),a=r(4202),l=(r(2830),r(9066)),{MT:u,NUMBYTES:c,SYMS:f,BI:h}=l,{Buffer:d}=r(8764),p=Symbol("count"),b=Symbol("major type"),y=Symbol("error"),g=Symbol("not found");function w(e,t,r){const n=[];return n[p]=r,n[f.PARENT]=e,n[b]=t,n}function _(e,t){const r=new a;return r[p]=-1,r[f.PARENT]=e,r[b]=t,r}class m extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function E(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class S extends n{constructor(e={}){const{tags:t={},max_depth:r=-1,preferWeb:n=!1,required:i=!1,encoding:o="hex",extendedResults:s=!1,preventDuplicateKeys:l=!1,...u}=e;super({defaultEncoding:o,...u}),this.running=!0,this.max_depth=r,this.tags=t,this.preferWeb=n,this.extendedResults=s,this.required=i,this.preventDuplicateKeys=l,s&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new a)}static nullcheck(e){switch(e){case f.NULL:return null;case f.UNDEFINED:return;case g:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=i._parse();let l=a.next();for(;!l.done;){const e=o.read(l.value);if(null==e||e.length!==l.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),l=a.next(e)}let u=null;if(i.extendedResults)u=l.value,u.unused=o.read();else if(u=S.nullcheck(l.value),o.length>0){const e=o.read(1);throw o.unshift(e),new m(e[0],u)}return u}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=E(t));const{encoding:r="hex",...n}=t,i=new S(n),o=s.guessEncoding(e,r),a=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const r=o.read(t.value);if(null==r||r.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(r),t=e.next(r)}a.push(S.nullcheck(t.value))}return a}static decodeFirst(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",required:i=!1,...o}=t,a=new S(o);let l=g;const u=s.guessEncoding(e,n),c=new Promise(((e,t)=>{a.on("data",(e=>{l=S.nullcheck(e),a.close()})),a.once("error",(r=>a.extendedResults&&r instanceof m?(l.unused=a.bs.slice(),e(l)):(l!==g&&(r.value=l),l=y,a.close(),t(r)))),a.once("end",(()=>{switch(l){case g:return i?t(new Error("No CBOR found")):e(l);case y:return;default:return e(l)}}))}));return"function"==typeof r&&c.then((e=>r(null,e)),r),u.pipe(a),c}static decodeAll(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=E(t,r));const{encoding:n="hex",...i}=t,o=new S(i),a=[];o.on("data",(e=>a.push(S.nullcheck(e))));const l=new Promise(((e,t)=>{o.on("error",t),o.on("end",(()=>e(a)))}));return"function"==typeof r&&l.then((e=>r(void 0,e)),(e=>r(e,void 0))),s.guessEncoding(e,n).pipe(o),l}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,r=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[n]=yield 1;if(!this.running)throw this.bs.unshift(d.from([n])),new m(n);const l=n>>5,y=31&n,g=null==e?void 0:e[b],E=null==e?void 0:e.length;switch(y){case c.ONE:this.emit("more-bytes",l,1,g,E),[r]=yield 1;break;case c.TWO:case c.FOUR:case c.EIGHT:{const e=1<{"use strict";const n=r(2830),i=r(6774),o=r(9873),s=r(4202),{MT:a,SYMS:l}=r(9066);class u extends n.Transform{constructor(e={}){const{separator:t="\n",stream_errors:r=!1,tags:n,max_depth:o,preferWeb:s,encoding:a,...l}=e;super({...l,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=r,this.parser=new i({tags:n,max_depth:o,preferWeb:s,encoding:a}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){this.parser._flush((t=>this.stream_errors?(t&&this._on_error(t),e()):e(t)))}static diagnose(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const{encoding:n="hex",...i}=t,a=new s,l=new u(i);let c=null;return"function"==typeof r?(l.on("end",(()=>r(null,a.toString("utf8")))),l.on("error",r)):c=new Promise(((e,t)=>{l.on("end",(()=>e(a.toString("utf8")))),l.on("error",t)})),l.pipe(a),o.guessEncoding(e,n).pipe(l),c}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,r,n){e===a.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case a.BYTE_STRING:case a.UTF8_STRING:case a.ARRAY:t>0&&this.push(", ");break;case a.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,r){if(e===l.BREAK)return;this._fore(t,r);const n=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,n))}_on_start(e,t,r,n){switch(this._fore(r,n),e){case a.TAG:this.push(`${t}(`);break;case a.ARRAY:this.push("[");break;case a.MAP:this.push("{");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push("(")}t===l.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case a.TAG:this.push(")");break;case a.ARRAY:this.push("]");break;case a.MAP:this.push("}");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=u},4666:(e,t,r)=>{"use strict";const n=r(2830),i=r(4202),o=r(9873),s=r(9066),{MT:a,NUMBYTES:l,SHIFT32:u,SIMPLE:c,SYMS:f,TAG:h,BI:d}=s,{Buffer:p}=r(8764),b=a.SIMPLE_FLOAT<<5|l.TWO,y=a.SIMPLE_FLOAT<<5|l.FOUR,g=a.SIMPLE_FLOAT<<5|l.EIGHT,w=a.SIMPLE_FLOAT<<5|c.TRUE,_=a.SIMPLE_FLOAT<<5|c.FALSE,m=a.SIMPLE_FLOAT<<5|c.UNDEFINED,E=a.SIMPLE_FLOAT<<5|c.NULL,S=p.from([255]),v=p.from("f97e00","hex"),A=p.from("f9fc00","hex"),I=p.from("f97c00","hex"),T=p.from("f98000","hex"),R={};let B={};class N extends n.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:r,disallowUndefinedKeys:n=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:s=!1,omitUndefinedProperties:a=!1,genTypes:l=[],...u}=e;if(super({...u,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=r,this.disallowUndefinedKeys=n,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof s)s&&(this.detectLoops=new WeakSet);else{if(!(s instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=s}if(this.omitUndefinedProperties=a,this.semanticTypes={...N.SEMANTIC_TYPES},Array.isArray(l))for(let e=0,t=l.length;e{const r=typeof e[t];return"function"!==r&&(!this.omitUndefinedProperties||"undefined"!==r)})),n={};if(this.canonical&&r.sort(((e,t)=>{const r=n[e]||(n[e]=N.encode(e)),i=n[t]||(n[t]=N.encode(t));return r.compare(i)})),t.indefinite){if(!this._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!this._pushInt(r.length,a.MAP))return!1;let i=null;for(let t=0,o=r.length;tvoid 0!==t))),r.indefinite){if(!e._pushUInt8(a.MAP<<5|l.INDEFINITE))return!1}else if(!e._pushInt(n.length,a.MAP))return!1;if(e.canonical){const t=new N({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),r=new i({highWaterMark:e.readableHighWaterMark});t.pipe(r),n.sort((([e],[n])=>{t.pushAny(e);const i=r.read();t.pushAny(n);const o=r.read();return i.compare(o)}));for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}}else for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}return!(r.indefinite&&!e.push(S))}static _pushTypedArray(e,t){let r=64,n=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(r|=16,n/=2):i.includes("U")||(r|=8),(i.includes("Clamped")||1!==n&&!o.isBigEndian())&&(r|=4),r|={1:0,2:1,4:2,8:3}[n],!!e._pushTag(r)&&N._pushBuffer(e,p.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return N._pushBuffer(e,p.from(t))}static encodeIndefinite(e,t,r={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:n=4096}=r;let i=!0;const s=typeof t;let u=null;if("string"===s){i=i&&e._pushUInt8(a.UTF8_STRING<<5|l.INDEFINITE);let r=0;for(;r{const i=[],o=new N(t);o.on("data",(e=>i.push(e))),o.on("error",n),o.on("finish",(()=>r(p.concat(i)))),o.pushAny(e),o.end()}))}static get SEMANTIC_TYPES(){return B}static set SEMANTIC_TYPES(e){B=e}static reset(){N.SEMANTIC_TYPES={...R}}}Object.assign(R,{Array:N.pushArray,Date:N._pushDate,Buffer:N._pushBuffer,[p.name]:N._pushBuffer,Map:N._pushMap,NoFilter:N._pushNoFilter,[i.name]:N._pushNoFilter,RegExp:N._pushRegexp,Set:N._pushSet,ArrayBuffer:N._pushArrayBuffer,Uint8ClampedArray:N._pushTypedArray,Uint8Array:N._pushTypedArray,Uint16Array:N._pushTypedArray,Uint32Array:N._pushTypedArray,Int8Array:N._pushTypedArray,Int16Array:N._pushTypedArray,Int32Array:N._pushTypedArray,Float32Array:N._pushTypedArray,Float64Array:N._pushTypedArray,URL:N._pushURL,Boolean:N._pushBoxed,Number:N._pushBoxed,String:N._pushBoxed}),"undefined"!=typeof BigUint64Array&&(R[BigUint64Array.name]=N._pushTypedArray),"undefined"!=typeof BigInt64Array&&(R[BigInt64Array.name]=N._pushTypedArray),N.reset(),e.exports=N},3070:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4666),o=r(6774),{MT:s}=r(9066);class a extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(a._encode(e))}set(e,t){return super.set(a._encode(e),t)}delete(e){return super.delete(a._encode(e))}has(e){return super.has(a._encode(e))}*keys(){for(const e of super.keys())yield a._decode(e)}*entries(){for(const e of super.entries())yield[a._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t){if("function"!=typeof e)throw new TypeError("Must be function");for(const t of super.entries())e.call(this,t[1],a._decode(t[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,s.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map((e=>[n.from(e[0],"base64"),e[1]]));t.sort(((e,t)=>e[0].compare(t[0])));for(const r of t)if(!e.push(r[0])||!e.pushAny(r[1]))return!1}else for(const t of super.entries())if(!e.push(n.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=a},1226:e=>{"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const r=this.map.get(e);if(r)return r.length>1?r[0]||this.recording?r[1]:(r[0]=!0,t.FIRST):this.recording?(r.push(this.count++),r[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},8112:(e,t,r)=>{"use strict";const n=r(4666),i=r(1226),{Buffer:o}=r(8764);class s extends n{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new s;t.on("data",(()=>{}));for(const r of e)t.pushAny(r);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const r=new s(t);return r.on("data",(()=>{})),r.pushAny(e),r.stopRecording(),r.removeAllListeners("data"),r._encodeAll([e])}static encodeAsync(e,t){return new Promise(((r,n)=>{const i=[],a=new s(t);a.on("data",(()=>{})),a.on("error",n),a.on("finish",(()=>r(o.concat(i)))),a.pushAny(e),a.stopRecording(),a.removeAllListeners("data"),a.on("data",(e=>i.push(e))),a.pushAny(e),a.end()}))}}e.exports=s},9032:(e,t,r)=>{"use strict";const{MT:n,SIMPLE:i,SYMS:o}=r(9066);class s{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,n.SIMPLE_FLOAT)}static isSimple(e){return e instanceof s}static decode(e,t=!0,r=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!r)throw new Error("Invalid BREAK");return o.BREAK;default:return new s(e)}}}e.exports=s},4785:(e,t,r)=>{"use strict";const n=r(9066),i=r(9873),o=Symbol("INTERNAL_JSON");function s(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const r of e)s(r,t);else if(e&&"object"==typeof e&&(!(e instanceof p)||e.tag<21||e.tag>23))for(const r of Object.values(e))s(r,t)}function a(){return i.base64(this)}function l(){return i.base64url(this)}function u(){return this.toString("hex")}const c={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>n.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=l:s(e,l),t),22:(e,t)=>(i.isBufferish(e)?t[o]=a:s(e,a),t),23:(e,t)=>(i.isBufferish(e)?t[o]=u:s(e,u),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const r=e.length%4;if(1===r)throw new Error("Invalid base64url length");if(2===r){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===r&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const r=e.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);if(!r)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===r.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===r.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},f={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function h(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:r}=t,n=f[r];if(!n)throw new Error(`Invalid typed array tag: ${r}`);const o=2**(((16&r)>>4)+(3&r));return!(4&r)!==i.isBigEndian()&&o>1&&function(e,t,r,n){const i=new DataView(e),[o,s]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],a=r+n;for(let e=r;e0?this.err=e.message:this.err=e,this}}static get TAGS(){return d}static set TAGS(e){d=e}static reset(){p.TAGS={...c}}}p.INTERNAL_JSON=o,p.reset(),e.exports=p},9873:(e,t,r)=>{"use strict";const{Buffer:n}=r(8764),i=r(4202),o=r(2830),s=r(9066),{NUMBYTES:a,SHIFT32:l,BI:u,SYMS:c}=s,f=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>f.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(n.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return n.isBuffer(e)?e:ArrayBuffer.isView(e)?n.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?n.from(e):null},t.parseCBORint=function(e,t){switch(e){case a.ONE:return t.readUInt8(0);case a.TWO:return t.readUInt16BE(0);case a.FOUR:return t.readUInt32BE(0);case a.EIGHT:{const e=t.readUInt32BE(0),r=t.readUInt32BE(4);return e>2097151?BigInt(e)*u.SHIFT32+BigInt(r):e*l+r}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const r=n.allocUnsafe(4);r.writeFloatBE(t,0);const i=r.readUInt32BE(0);if(0!=(8191&i))return!1;let o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,r=(124&e[0])>>2,n=(3&e[0])<<8|e[1];return r?31===r?t*(n?NaN:1/0):t*2**(r-25)*(1024+n):5.960464477539063e-8*t*n},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return n.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,r=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;r<=e.length;)i.push(parseInt(e.slice(t,r),2)),t=r,r+=8;return n.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,r)=>e===t[r]))},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,r=-1){switch(typeof e){case"symbol":{switch(e){case c.NULL:return"null";case c.UNDEFINED:return"undefined";case c.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return r>0?`${t}_${r}`:t}case"object":{if(!e)return"null";const n=t.bufferishToBuffer(e);if(n){const e=n.toString("hex");return r===-1/0?e:`h'${e}'`}return e&&"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,r){if("string"==typeof e)return new i(e,null==r?"hex":r);const n=t.bufferishToBuffer(e);if(n)return new i(n);if((s=e)instanceof o.Readable||["read","on","pipe"].every((e=>"function"==typeof s[e])))return e;var s;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,(e=>h[e]))},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},4202:(e,t,r)=>{"use strict";const n=r(2830),{Buffer:i}=r(8764),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class s extends n.Transform{constructor(e,t,r={}){let n=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?n=e:e&&(r=e);break;case"string":n=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(r=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!r||"object"!=typeof r)throw new TypeError("Invalid options");null==n&&(n=r.input),null==o&&(o=r.inputEncoding),delete r.input,delete r.inputEncoding;const s=null==r.watchPipe||r.watchPipe;delete r.watchPipe;const a=Boolean(r.readError);delete r.readError,super(r),this.readError=a,s&&this.on("pipe",(e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t})),null!=n&&this.end(n,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce(((e,t)=>{if(!(t instanceof s))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length}),0));let r=!0,n=!0;const o=e.map((e=>{if(!(e instanceof s))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?n=!1:r=!1,t}));if(r)return i.concat(o,t);if(n)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,r){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),r()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},r=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},n=o,this.on("readable",t),this.on("error",n),this.on("finish",r))})).finally((()=>{t&&(this.removeListener("readable",t),this.removeListener("error",n),this.removeListener("finish",r))}))}promise(e){let t=!1;return new Promise(((r,n)=>{this.on("finish",(()=>{const n=this.read();null==e||t||(t=!0,e(null,n)),r(n)})),this.on("error",(r=>{null==e||t||(t=!0,e(r)),n(r)}))}))}compare(e){if(!(e instanceof s))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),r=e.slice();if(i.isBuffer(t)&&i.isBuffer(r))return t.compare(r);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const r=this._bufArray();switch(r.length){case 0:return i.alloc(0);case 1:return r[0].slice(e,t);default:return i.concat(r).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,r){const n=this.slice(t,r);return i.isBuffer(n)?e&&"utf8"!==e?n.toString(e):o.decode(n):JSON.stringify(n)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const r=this._bufArray().map((e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e))).join(", ");return`${this.constructor.name} [${r}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const r=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<{"use strict";const n=r(2830),i=r(4202);class o extends n.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,r){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return r(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return r()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*b}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,l=[],u=!1,c=-1;function f(){u&&a&&(u=!1,a.length?l=a.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=l.length;t;){for(a=l,l=[];++c1)for(var r=1;r{"use strict";e.exports=r(5099).Duplex},2725:(e,t,r)=>{"use strict";e.exports=r(5099).PassThrough},9481:(e,t,r)=>{"use strict";e.exports=r(5099).Readable},4605:(e,t,r)=>{"use strict";e.exports=r(5099).Transform},4229:(e,t,r)=>{"use strict";e.exports=r(5099).Writable},196:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(9061),{AbortError:i,codes:o}=r(4381),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:l}=r(5874),u=r(8610),{ERR_INVALID_ARG_TYPE:c}=o;let f;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{f=f||r(6087).addAbortListener;const i=f(e,o);u(t,i[n])}return t}},7327:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(9061),{Buffer:a}=r(8764),{inspect:l}=r(6087);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(eo.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},299:(e,t,r)=>{"use strict";const{pipeline:n}=r(9946),i=r(8672),{destroyer:o}=r(1195),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:h}=r(5874),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(4381),y=r(8610);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,g,w,_,m;const E=e[0],S=n(e,(function(e){const t=_;_=null,t?t(e):e?m.destroy(e):A||v||m.destroy()})),v=!!(l(E)||f(E)||c(E)),A=!!(a(S)||h(S)||c(S));if(m=new i({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:v,readable:A}),v){if(s(E))m._write=function(e,t,n){E.write(e,t)?n():r=n},m._final=function(e){E.end(),g=e},E.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(E)){const e=(c(E)?E.writable:E).getWriter();m._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},m._final=async function(t){try{await e.ready,e.close().catch((()=>{})),g=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;y(e,(()=>{if(g){const e=g;g=null,e()}}))}if(A)if(s(S))S.on("readable",(function(){if(w){const e=w;w=null,e()}})),S.on("end",(function(){m.push(null)})),m._read=function(){for(;;){const e=S.read();if(null===e)return void(w=m._read);if(!m.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();m._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!m.push(t))return;if(r)return void m.push(null)}catch{return}}}return m._destroy=function(e,t){e||null===_||(e=new d),w=null,r=null,g=null,null===_?t(e):(_=t,s(S)&&o(S,e))},m}},1195:(e,t,r)=>{"use strict";const n=r(4155),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(4381),{Symbol:a}=r(9061),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(5874),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(y,e,t):n.nextTick(g,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function y(e,t){w(e,t),g(e)}function g(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function w(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function _(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(w,e,t):w(e,t))}function m(e){let t=!1;function r(r){if(t)return void _(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?_(e,r,!0):n.nextTick(E,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function E(e){e.emit(d)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function v(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(v,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(m,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(v,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(h,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:_}},8672:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(9061);e.exports=u;const a=r(911),l=r(6304);s(u.prototype,a.prototype),s(u,a);{const e=o(l.prototype);for(let t=0;t{const n=r(4155),i=r(8764),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:h,isWritableStream:d}=r(5874),p=r(8610),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:g}}=r(4381),{destroyer:w}=r(1195),_=r(8672),m=r(911),E=r(6304),{createDeferredPromise:S}=r(6087),v=r(6307),A=globalThis.Blob||i.Blob,I=void 0!==A?function(e){return e instanceof A}:function(e){return!1},T=globalThis.AbortController||r(8599).AbortController,{FunctionPrototypeCall:R}=r(9061);class B extends _{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function N(e){const t=e.readable&&"function"!=typeof e.readable.read?m.wrap(e.readable):e.readable,r=e.writable;let n,i,a,l,u,c=!!o(t),f=!!s(r);function h(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new B({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&w(t,e),h(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&w(t,e),h(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(a=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new b),a=null,n=null,i=null,null===l?o(e):(l=o,w(r,e),w(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return N({readable:t});if(c(t))return N({writable:t});if(l(t))return N({writable:!1,readable:!1});if(h(t))return N({readable:m.fromWeb(t)});if(d(t))return N({writable:E.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=S();const i=new T,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return v(B,e,{objectMode:!0,write:i,final:o,destroy:s});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new g("nully","body",e)}),(e=>{w(t,e)}));return t=new B({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new g("Iterable, AsyncIterable or AsyncFunction",r,e)}if(I(t))return e(t.arrayBuffer());if(a(t))return v(B,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&d(null==t?void 0:t.writable))return B.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return N({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{w(e,t)})),e=new B({objectMode:!0,writable:!1,read(){}})}throw new y(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},8610:(e,t,r)=>{const n=r(4155),{AbortError:i,codes:o}=r(4381),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(6087),{validateAbortSignal:c,validateFunction:f,validateObject:h,validateBoolean:d}=r(6547),{Promise:p,PromisePrototypeThen:b,SymbolDispose:y}=r(9061),{isClosed:g,isReadable:w,isReadableNodeStream:_,isReadableStream:m,isReadableFinished:E,isReadableErrored:S,isWritable:v,isWritableNodeStream:A,isWritableStream:I,isWritableFinished:T,isWritableErrored:R,isNodeStream:B,willEmitClose:N,kIsClosedPromise:L}=r(5874);let U;const O=()=>{};function M(e,t,o){var d,p;if(2===arguments.length?(o=t,t=l):null==t?t=l:h(t,"options"),f(o,"callback"),c(t.signal,"options.signal"),o=u(o),m(e)||I(e))return function(e,t,o){let s=!1,a=O;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{U=U||r(6087).addAbortListener;const n=U(t.signal,a),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}const l=(...t)=>{s||n.nextTick((()=>o.apply(e,t)))};return b(e[L].promise,l,l),O}(e,t,o);if(!B(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const M=null!==(d=t.readable)&&void 0!==d?d:_(e),x=null!==(p=t.writable)&&void 0!==p?p:A(e),k=e._writableState,P=e._readableState,j=()=>{e.writable||C()};let D=N(e)&&_(e)===M&&A(e)===x,F=T(e,!1);const C=()=>{F=!0,e.destroyed&&(D=!1),(!D||e.readable&&!M)&&(M&&!$||o.call(e))};let $=E(e,!1);const W=()=>{$=!0,e.destroyed&&(D=!1),(!D||e.writable&&!x)&&(x&&!F||o.call(e))},G=t=>{o.call(e,t)};let Y=g(e);const H=()=>{Y=!0;const t=R(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):M&&!$&&_(e,!0)&&!E(e,!1)?o.call(e,new a):!x||F||T(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{Y=!0;const t=R(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},K=()=>{e.req.on("finish",C)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?x&&!k&&(e.on("end",j),e.on("close",j)):(e.on("complete",C),D||e.on("abort",H),e.req?K():e.on("request",K)),D||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",W),e.on("finish",C),!1!==t.error&&e.on("error",G),e.on("close",H),Y?n.nextTick(H):null!=k&&k.errorEmitted||null!=P&&P.errorEmitted?D||n.nextTick(V):(M||D&&!w(e)||!F&&!1!==v(e))&&(x||D&&!v(e)||!$&&!1!==w(e))?P&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const q=()=>{o=O,e.removeListener("aborted",H),e.removeListener("complete",C),e.removeListener("abort",H),e.removeListener("request",K),e.req&&e.req.removeListener("finish",C),e.removeListener("end",j),e.removeListener("close",j),e.removeListener("finish",C),e.removeListener("end",W),e.removeListener("error",G),e.removeListener("close",H)};if(t.signal&&!Y){const s=()=>{const r=o;q(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{U=U||r(6087).addAbortListener;const n=U(t.signal,s),i=o;o=u(((...t)=>{n[y](),i.apply(e,t)}))}}return q}e.exports=M,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=M(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6307:(e,t,r)=>{"use strict";const n=r(4155),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(9061),{Buffer:a}=r(8764),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=r(4381).codes;e.exports=function(e,t,r){let c,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,c=t[o]();else{if(!t||!t[s])throw new l("iterable",["Iterable"],t);f=!1,c=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new u;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4870:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(9061),{EventEmitter:o}=r(7187);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},4382:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(4381),{validateAbortSignal:u,validateInteger:c,validateObject:f}=r(6547),h=r(9061).Symbol("kWeak"),d=r(9061).Symbol("kResistStopPropagation"),{finished:p}=r(8610),b=r(299),{addAbortSignalNoValidate:y}=r(196),{isWritable:g,isNodeStream:w}=r(5874),{deprecate:_}=r(6087),{ArrayPrototypePush:m,Boolean:E,MathFloor:S,Number:v,NumberIsNaN:A,Promise:I,PromiseReject:T,PromiseResolve:R,PromisePrototypeThen:B,Symbol:N}=r(9061),L=N("kEmpty"),U=N("kEof");function O(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),c(n,"options.concurrency",1),c(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(6087).AbortSignalAny([null==t?void 0:t.signal].filter(E)),s=this,a=[],u={signal:o};let c,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,y()}function y(){f&&!h&&d=i||d>=n)&&await new I((e=>{f=e}))}a.push(U)}catch(e){const t=T(e);B(t,b,p),a.push(t)}finally{h=!0,c&&(c(),c=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===U)return;if(o.aborted)throw new l;e!==L&&(yield e),a.shift(),y()}await new I((e=>{c=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function M(e,t=void 0){for await(const r of x.call(this,e,t))return!0;return!1}function x(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return O.call(this,(async function(t,r){return await e(t,r)?t:L}),t)}class k extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function P(e){if(e=v(e),A(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:_((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:x,flatMap:function(e,t){const r=O.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:O,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=P(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),w(e)&&!g(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await M.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of O.call(this,(async function(t,r){return await e(t,r),L}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,c=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var y;if(b=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new l;s?t=await e(t,n,{signal:c}):(t=n,s=!0)}if(!b&&!s)throw new k}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});m(t,n)}return t},some:M,find:async function(e,t){for await(const r of x.call(this,e,t))return r}}},917:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(9061);e.exports=o;const i=r(1161);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},9946:(e,t,r)=>{const n=r(4155),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(9061),l=r(8610),{once:u}=r(6087),c=r(1195),f=r(8672),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:w}=r(4381),{validateFunction:_,validateAbortSignal:m}=r(6547),{isIterable:E,isReadable:S,isReadableNodeStream:v,isNodeStream:A,isTransformStream:I,isWebStream:T,isReadableStream:R,isReadableFinished:B}=r(5874),N=globalThis.AbortController||r(8599).AbortController;let L,U,O;function M(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function x(e){if(E(e))return e;if(v(e))return async function*(e){U||(U=r(911)),yield*U.prototype[s].call(e)}(e);throw new d("val",["Readable","Iterable","AsyncIterable"],e)}async function k(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},u=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",a);const c=l(t,{readable:!1},a);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?h(i,e):e)}finally{c(),t.off("drain",a)}}async function P(e,t,r,{end:n}){I(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new b("streams");const s=new N,l=s.signal,u=null==o?void 0:o.signal,c=[];function h(){C(new w)}let y,g,_;m(u,"options.signal"),O=O||r(6087).addAbortListener,u&&(y=O(u,h));const B=[];let U,j=0;function F(e){C(e,0==--j)}function C(e,r){var i;if(!e||g&&"ERR_STREAM_PREMATURE_CLOSE"!==g.code||(g=e),g||r){for(;B.length;)B.shift()(g);null===(i=y)||void 0===i||i[a](),s.abort(),r&&(g||c.forEach((e=>e())),n.nextTick(t,g,_))}}for(let Y=0;Y0,q=V||!1!==(null==o?void 0:o.end),z=Y===e.length-1;if(A(H)){if(q){const{destroy:X,cleanup:J}=M(H,V,K);B.push(X),S(H)&&z&&c.push(J)}function $(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&F(e)}H.on("error",$),S(H)&&z&&c.push((()=>{H.removeListener("error",$)}))}if(0===Y)if("function"==typeof H){if(U=H({signal:l}),!E(U))throw new p("Iterable, AsyncIterable or Stream","source",U)}else U=E(H)||v(H)||I(H)?H:f.from(H);else if("function"==typeof H){var W;if(U=I(U)?x(null===(W=U)||void 0===W?void 0:W.readable):x(U),U=H(U,{signal:l}),V){if(!E(U,!0))throw new p("AsyncIterable",`transform[${Y-1}]`,U)}else{var G;L||(L=r(917));const Z=new L({objectMode:!0}),Q=null===(G=U)||void 0===G?void 0:G.then;if("function"==typeof Q)j++,Q.call(U,(e=>{_=e,null!=e&&Z.write(e),q&&Z.end(),n.nextTick(F)}),(e=>{Z.destroy(e),n.nextTick(F,e)}));else if(E(U,!0))j++,k(U,Z,F,{end:q});else{if(!R(U)&&!I(U))throw new p("AsyncIterable or Promise","destination",U);{const re=U.readable||U;j++,k(re,Z,F,{end:q})}}U=Z;const{destroy:ee,cleanup:te}=M(U,!1,!0);B.push(ee),z&&c.push(te)}}else if(A(H)){if(v(U)){j+=2;const ne=D(U,H,F,{end:q});S(H)&&z&&c.push(ne)}else if(I(U)||R(U)){const ie=U.readable||U;j++,k(ie,H,F,{end:q})}else{if(!E(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,k(U,H,F,{end:q})}U=H}else if(T(H)){if(v(U))j++,P(x(U),H,F,{end:q});else if(R(U)||E(U))j++,P(U,H,F,{end:q});else{if(!I(U))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],U);j++,P(U.readable,H,F,{end:q})}U=H}else U=f.from(H)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&n.nextTick(h),U}function D(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new g)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}B(e)?n.nextTick(s):e.once("end",s)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,u(function(e){return _(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},911:(e,t,r)=>{const n=r(4155),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:c,Promise:f,SafeSet:h,SymbolAsyncDispose:d,SymbolAsyncIterator:p,Symbol:b}=r(9061);e.exports=z,z.ReadableState=q;const{EventEmitter:y}=r(7187),{Stream:g,prependListener:w}=r(4870),{Buffer:_}=r(8764),{addAbortSignal:m}=r(196),E=r(8610);let S=r(6087).debuglog("stream",(e=>{S=e}));const v=r(7327),A=r(1195),{getHighWaterMark:I,getDefaultHighWaterMark:T}=r(2457),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:B,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:L,ERR_STREAM_PUSH_AFTER_EOF:U,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:O},AbortError:M}=r(4381),{validateObject:x}=r(6547),k=b("kPaused"),{StringDecoder:P}=r(2553),j=r(6307);c(z.prototype,g.prototype),c(z,g);const D=()=>{},{errorOrDestroy:F}=A,C=1,$=16,W=32,G=64,Y=2048,H=4096,V=65536;function K(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function q(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.state=Y|H|$|W,e&&e.objectMode&&(this.state|=C),n&&e&&e.readableObjectMode&&(this.state|=C),this.highWaterMark=e?I(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[k]=null,e&&!1===e.emitClose&&(this.state&=~Y),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new P(e.encoding),this.encoding=e.encoding)}function z(e){if(!(this instanceof z))return new z(e);const t=this instanceof r(8672);this._readableState=new q(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&m(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function X(e,t,r,n){S("readableAddChunk",t);const i=e._readableState;let o;if(0==(i.state&C)&&("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=_.from(t,r).toString(i.encoding):(t=_.from(t,r),r=""))):t instanceof _?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new B("chunk",["string","Buffer","Uint8Array"],t))),o)F(e,o);else if(null===t)i.state&=-9,function(e,t){if(S("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(0!=(i.state&C)||t&&t.length>0)if(n)if(0!=(4&i.state))F(e,new O);else{if(i.destroyed||i.errored)return!1;J(e,i,t,!0)}else if(i.ended)F(e,new U);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?J(e,i,t,!1):te(e,i)):J(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!=(t.state&V)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(t.state&G)&&Q(e)),te(e,t)}function Z(e,t){return e<=0||0===t.length&&t.ended?0:0!=(t.state&C)?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;S("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(S("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;S("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[k]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){S("readable nexttick read 0"),e.read(0)}function oe(e,t){S("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(S("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=z.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=D;function i(t){this===e?(n(),n=D):n=t}e.on("readable",i);const o=E(e,{writable:!1},(e=>{r=e?R(r,e):null,n(),n=D}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=R(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;S("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(S("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(fe,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function fe(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function de(){return void 0===he&&(he={}),he}l(q.prototype,{objectMode:K(C),ended:K(2),endEmitted:K(4),reading:K(8),constructed:K($),sync:K(W),needReadable:K(G),emittedReadable:K(128),readableListening:K(256),resumeScheduled:K(512),errorEmitted:K(1024),emitClose:K(Y),autoDestroy:K(H),destroyed:K(8192),closed:K(16384),closeEmitted:K(32768),multiAwaitDrain:K(V),readingMore:K(1<<17),dataEmitted:K(1<<18)}),z.prototype.destroy=A.destroy,z.prototype._undestroy=A.undestroy,z.prototype._destroy=function(e,t){t(e)},z.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},z.prototype[d]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new M,this.destroy(e)),new f(((t,r)=>E(this,(n=>n&&n!==e?r(n):t(null)))))},z.prototype.push=function(e,t){return X(this,e,t,!1)},z.prototype.unshift=function(e,t){return X(this,e,t,!0)},z.prototype.isPaused=function(){const e=this._readableState;return!0===e[k]||!1===e.flowing},z.prototype.setEncoding=function(e){const t=new P(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},z.prototype.read=function(e){S("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new L("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return S("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Q(this),null;if(0===(e=Z(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=0!=(t.state&G);if(S("need readable",i),(0===t.length||t.length-e0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},z.prototype._read=function(e){throw new N("_read()")},z.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),S("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:s;function s(){S("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",c),l=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let l=!1;function u(){l||(1===i.pipes.length&&i.pipes[0]===e?(S("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function c(t){S("ondata");const r=e.write(t);S("dest.write",r),!1===r&&u()}function f(t){if(S("onerror",t),b(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),b()}function p(){S("onfinish"),e.removeListener("close",d),b()}function b(){S("unpipe"),r.unpipe(e)}return r.on("data",c),w(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(S("pipe resume"),r.resume()),e},z.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(ie,this))),r},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},z.prototype.off=z.prototype.removeListener,z.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},z.prototype.resume=function(){const e=this._readableState;return e.flowing||(S("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[k]=!1,this},z.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[k]=!0,this},z.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{F(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(9061),{validateInteger:o}=r(6547),{ERR_INVALID_ARG_VALUE:s}=r(4381).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:a=t}}},1161:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(9061);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(4381).codes,s=r(8672),{getHighWaterMark:a}=r(2457);n(u.prototype,s.prototype),n(u,s);const l=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==c&&c.call(this)}u.prototype._final=c,u.prototype._transform=function(e,t,r){throw new o("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(9061),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),f=o("nodejs.webstream.isClosedPromise"),h=o("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function y(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function g(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function w(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function _(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function m(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!_(e)&&d(e)&&e.readable&&!E(e)}function v(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!_(e)&&p(e)&&e.writable&&!m(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={isDestroyed:_,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:S,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!(!_(e)&&(!1!==(null==t?void 0:t.readable)&&S(e)||!1!==(null==t?void 0:t.writable)&&v(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:d,isReadableStream:y,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return y(e)||g(e)||w(e)},isWritable:v,isWritableNodeStream:p,isWritableStream:g,isWritableEnded:m,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:w}},6304:(e,t,r)=>{const n=r(4155),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:h}=r(9061);e.exports=x,x.WritableState=O;const{EventEmitter:d}=r(7187),p=r(4870).Stream,{Buffer:b}=r(8764),y=r(1195),{addAbortSignal:g}=r(196),{getHighWaterMark:w,getDefaultHighWaterMark:_}=r(2457),{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:B}=r(4381).codes,{errorOrDestroy:N}=y;function L(){}u(x.prototype,p.prototype),u(x,p);const U=f("kOnFinished");function O(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8672)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?w(this,e,"writableHighWaterMark",n):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=D.bind(void 0,t),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=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function M(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function x(e){const t=this instanceof r(8672);if(!t&&!s(x,this))return new x(e);this._writableState=new O(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&g(e.signal,this)),p.call(this,e),y.construct(this,(()=>{const e=this._writableState;e.writing||W(this,e),Y(this,e)}))}function k(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new B(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=L)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new m("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new A("write")),s?(n.nextTick(i,s),N(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&W(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(F,r.afterWriteTickInfo)):C(e,r,1,o))):N(e,new S)}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,C(e,t,r,n)}function C(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&$(t),Y(e,t)}function $(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?L:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function G(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function Y(e,t,r){G(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)N(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[U].splice(0);for(let e=0;e{G(t)?H(e,t):t.pendingcb--}),e,t)):G(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[U].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:y}=r(9061),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:S}}=r(4381),{normalizeEncoding:v}=r(6087),{isAsyncFunction:A,isArrayBufferView:I}=r(6087).types,T={},R=/^[0-7]+$/,B=g(((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),N=g(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(en)throw new E(t,`>= ${r} && <= ${n}`,e)})),L=g(((e,t,r=!1)=>{if("number"!=typeof e)throw new _(t,"number",e);if(!a(e))throw new E(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new E(t,`>= ${n} && <= ${i}`,e)}));function U(e,t){if("string"!=typeof e)throw new _(t,"string",e)}const O=g(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new m(t,e,"must be one of: "+n)}}));function M(e,t){if("boolean"!=typeof e)throw new _(t,"boolean",e)}function x(e,t,r){return null!=e&&h(e,t)?e[t]:r}const k=g(((e,t,r=null)=>{const i=x(r,"allowArray",!1),o=x(r,"allowFunction",!1);if(!x(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new _(t,"Object",e)})),P=g(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new _(t,"a dictionary",e)})),j=g(((e,t,r=0)=>{if(!n(e))throw new _(t,"Array",e);if(e.length{if(!I(e))throw new _(t,["Buffer","TypedArray","DataView"],e)})),F=g(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new _(t,"AbortSignal",e)})),C=g(((e,t)=>{if("function"!=typeof e)throw new _(t,"Function",e)})),$=g(((e,t)=>{if("function"!=typeof e||A(e))throw new _(t,"Function",e)})),W=g(((e,t)=>{if(void 0!==e)throw new _(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Y(e,t){if(void 0===e||!d(G,e))throw new m(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(R,e))throw new m(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return L(e,t),e},validateArray:j,validateStringArray:function(e,t){j(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new E(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:k,validateOneOf:O,validatePlainFunction:$,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===y(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new w(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(U(e,t),void 0===T[e]){if(void 0!==T[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:U,validateUint32:L,validateUndefined:W,validateUnion:function(e,t,r){if(!i(r,e))throw new _(t,`('${o(r,"|")}')`,e)},validateAbortSignal:F,validateLinkHeaderValue:function(e){if("string"==typeof e)return Y(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},4381:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(6087),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},9061:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),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:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.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:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},6087:(e,t,r)=>{"use strict";const n=r(8764),{kResistStopPropagation:i,SymbolDispose:o}=r(9061),s=globalThis.AbortSignal||r(8599).AbortSignal,a=globalThis.AbortController||r(8599).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(7187).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach((e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(e,t,r)=>{const{Buffer:n}=r(8764),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(9061),{promisify:{custom:a}}=r(6087),{streamReturningOperators:l,promiseReturningOperators:u}=r(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(4381),f=r(299),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:d}=r(2457),{pipeline:p}=r(9946),{destroyer:b}=r(1195),y=r(8610),g=r(7854),w=r(5874),_=e.exports=r(4870).Stream;_.isDestroyed=w.isDestroyed,_.isDisturbed=w.isDisturbed,_.isErrored=w.isErrored,_.isReadable=w.isReadable,_.isWritable=w.isWritable,_.Readable=r(911);for(const S of o(l)){const v=l[S];function m(...e){if(new.target)throw c();return _.Readable.from(s(v,this,e))}i(m,"name",{__proto__:null,value:v.name}),i(m,"length",{__proto__:null,value:v.length}),i(_.Readable.prototype,S,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const A of o(u)){const I=u[A];function m(...e){if(new.target)throw c();return s(I,this,e)}i(m,"name",{__proto__:null,value:I.name}),i(m,"length",{__proto__:null,value:I.length}),i(_.Readable.prototype,A,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}_.Writable=r(6304),_.Duplex=r(8672),_.Transform=r(1161),_.PassThrough=r(917),_.pipeline=p;const{addAbortSignal:E}=r(196);_.addAbortSignal=E,_.finished=y,_.destroy=b,_.compose=f,_.setDefaultHighWaterMark=h,_.getDefaultHighWaterMark=d,i(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>g}),i(p,a,{__proto__:null,enumerable:!0,get:()=>g.pipeline}),i(y,a,{__proto__:null,enumerable:!0,get:()=>g.finished}),_.Stream=_,_._isUint8Array=function(e){return e instanceof Uint8Array},_._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},7854:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(9061),{isIterable:o,isNodeStream:s,isWebStream:a}=r(5874),{pipelineImpl:l}=r(9946),{finished:u}=r(8610);r(5099),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var e=r(2141),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);r.d(n,t)})(),n})())); \ No newline at end of file diff --git a/packages/cbor/lib/utils.js b/packages/cbor/lib/utils.js index 5afdc4c0..70a2ed0a 100644 --- a/packages/cbor/lib/utils.js +++ b/packages/cbor/lib/utils.js @@ -237,13 +237,15 @@ exports.cborValueToString = function cborValueToString(val, float_bytes = -1) { return (float_bytes > 0) ? `${s}_${float_bytes}` : s } case 'object': { - // A null should be caught above + if (!val) { + return 'null' + } const buf = exports.bufferishToBuffer(val) if (buf) { const hex = buf.toString('hex') return (float_bytes === -Infinity) ? hex : `h'${hex}'` } - if (typeof val[Symbol.for('nodejs.util.inspect.custom')] === 'function') { + if (val && typeof val[Symbol.for('nodejs.util.inspect.custom')] === 'function') { return val[Symbol.for('nodejs.util.inspect.custom')]() } // Shouldn't get non-empty arrays here diff --git a/packages/cbor/test/cases.js b/packages/cbor/test/cases.js index 4d7a4498..99dabba8 100644 --- a/packages/cbor/test/cases.js +++ b/packages/cbor/test/cases.js @@ -679,7 +679,10 @@ exports.good = [ 18 -- Bytes, length: 24 000000000000000100000000000000020000000000000003 -- 000000000000000100000000000000020000000000000003 0xd8435818000000000000000100000000000000020000000000000003`]), - + [[null], '[null]', ` + 81 -- Array, 1 item + f6 -- [0], null +0x81f6`], ] exports.encodeGood = [ diff --git a/packages/cbor/test/tagged.ava.js b/packages/cbor/test/tagged.ava.js index 040e0b85..ce274aee 100644 --- a/packages/cbor/test/tagged.ava.js +++ b/packages/cbor/test/tagged.ava.js @@ -140,7 +140,7 @@ test('Typed Arrays', t => { }) test('null converter', t => { - const buf = Buffer.from('c100', 'hex'); - t.deepEqual(cbor.decode(buf), new Date(0)); - t.deepEqual(cbor.decode(buf, {tags: {1: null}}), new cbor.Tagged(1, 0)); + const buf = Buffer.from('c100', 'hex') + t.deepEqual(cbor.decode(buf), new Date(0)) + t.deepEqual(cbor.decode(buf, {tags: {1: null}}), new cbor.Tagged(1, 0)) })