harsta
Version:
Harsta is a contract development tool based on Hardhat, designed to streamline the development, testing, and referencing of contracts, addresses, ABIs, and contract instances.
3 lines • 243 kB
JavaScript
import{a as Ke,c as Cf}from"../chunk-NPWPIETE.mjs";import{a as tt,c as Nr,d as Ye,e as Zt,f as xt,g as P,h as Pf,i as Bf}from"../chunk-TR4UKZXN.mjs";import{a as Ne,b as E,c as Dt,d as oi}from"../chunk-M6LJ4BNZ.mjs";var pa=E((h3,la)=>{"use strict";var di=process||{},Lf=di.argv||[],ci=di.env||{},S0=!(ci.NO_COLOR||Lf.includes("--no-color"))&&(!!ci.FORCE_COLOR||Lf.includes("--color")||di.platform==="win32"||(di.stdout||{}).isTTY&&ci.TERM!=="dumb"||!!ci.CI),M0=(e,t,r=e)=>n=>{let i=""+n,o=i.indexOf(t,e.length);return~o?e+A0(i,t,r,o)+t:e+i+t},A0=(e,t,r,n)=>{let i="",o=0;do i+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return i+e.substring(o)},Of=(e=S0)=>{let t=e?M0:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};la.exports=Of();la.exports.createColors=Of});var Df=E((m3,Uf)=>{"use strict";Uf.exports=Ne("crypto").randomBytes});var $f=E(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});var zf=Df();function P0(e){return new Promise(function(t,r){zf(e,function(n,i){if(n){r(n);return}t(i)})})}ui.getRandomBytes=P0;function B0(e){return zf(e)}ui.getRandomBytesSync=B0});var Gf=E(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});function j0(e){return function(t){var r=e();return r.update(t),Buffer.from(r.digest())}}ya.createHashFunction=j0});var ds=E((ov,cs)=>{"use strict";var Xf=Ne("fs"),$t=Ne("path"),Qf=Ne("os"),es=typeof __webpack_require__=="function"?__non_webpack_require__:Ne,W0=process.config&&process.config.variables||{},V0=!!process.env.PREBUILDS_ONLY,Jf=process.versions.modules,xa=Y0()?"electron":J0()?"node-webkit":"node",wa=process.env.npm_config_arch||Qf.arch(),_a=process.env.npm_config_platform||Qf.platform(),ts=process.env.LIBC||(Z0(_a)?"musl":"glibc"),Sa=process.env.ARM_VERSION||(wa==="arm64"?"8":W0.arm_version)||"",rs=(process.versions.uv||"").split(".")[0];cs.exports=_t;function _t(e){return es(_t.resolve(e))}_t.resolve=_t.path=function(e){e=$t.resolve(e||".");try{var t=es($t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch{}if(!V0){var r=Yf($t.join(e,"build/Release"),Zf);if(r)return r;var n=Yf($t.join(e,"build/Debug"),Zf);if(n)return n}var i=d(e);if(i)return i;var o=d($t.dirname(process.execPath));if(o)return o;var c=["platform="+_a,"arch="+wa,"runtime="+xa,"abi="+Jf,"uv="+rs,Sa?"armv="+Sa:"","libc="+ts,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__=="function"?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+c+`
loaded from: `+e+`
`);function d(v){var m=Ma($t.join(v,"prebuilds")).map(ns),y=m.filter(is(_a,wa)).sort(as)[0];if(y){var w=$t.join(v,"prebuilds",y.name),S=Ma(w).map(os),M=S.filter(fs(xa,Jf)),A=M.sort(ss(xa))[0];if(A)return $t.join(w,A.file)}}};function Ma(e){try{return Xf.readdirSync(e)}catch{return[]}}function Yf(e,t){var r=Ma(e).filter(t);return r[0]&&$t.join(e,r[0])}function Zf(e){return/\.node$/.test(e)}function ns(e){var t=e.split("-");if(t.length===2){var r=t[0],n=t[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:e,platform:r,architectures:n}}}function is(e,t){return function(r){return r==null||r.platform!==e?!1:r.architectures.includes(t)}}function as(e,t){return e.architectures.length-t.architectures.length}function os(e){var t=e.split("."),r=t.pop(),n={file:e,specificity:0};if(r==="node"){for(var i=0;i<t.length;i++){var o=t[i];if(o==="node"||o==="electron"||o==="node-webkit")n.runtime=o;else if(o==="napi")n.napi=!0;else if(o.slice(0,3)==="abi")n.abi=o.slice(3);else if(o.slice(0,2)==="uv")n.uv=o.slice(2);else if(o.slice(0,4)==="armv")n.armv=o.slice(4);else if(o==="glibc"||o==="musl")n.libc=o;else continue;n.specificity++}return n}}function fs(e,t){return function(r){return!(r==null||r.runtime&&r.runtime!==e&&!G0(r)||r.abi&&r.abi!==t&&!r.napi||r.uv&&r.uv!==rs||r.armv&&r.armv!==Sa||r.libc&&r.libc!==ts)}}function G0(e){return e.runtime==="node"&&e.napi}function ss(e){return function(t,r){return t.runtime!==r.runtime?t.runtime===e?-1:1:t.abi!==r.abi?t.abi?-1:1:t.specificity!==r.specificity?t.specificity>r.specificity?-1:1:0}}function J0(){return!!(process.versions&&process.versions.nw)}function Y0(){return process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE?!0:typeof window<"u"&&window.process&&window.process.type==="renderer"}function Z0(e){return e==="linux"&&Xf.existsSync("/etc/alpine-release")}_t.parseTags=os;_t.matchTags=fs;_t.compareTags=ss;_t.parseTuple=ns;_t.matchTuple=is;_t.compareTuples=as});var Ra=E((sv,Ea)=>{"use strict";var Aa=typeof __webpack_require__=="function"?__non_webpack_require__:Ne;typeof Aa.addon=="function"?Ea.exports=Aa.addon.bind(Aa):Ea.exports=ds()});var Ia=E((dv,us)=>{"use strict";us.exports=Ne("stream")});var ms=E((uv,vs)=>{"use strict";function hs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ls(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hs(Object(r),!0).forEach(function(n){X0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X0(e,t,r){return t=bs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ps(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bs(n.key),n)}}function eh(e,t,r){return t&&ps(e.prototype,t),r&&ps(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bs(e){var t=th(e,"string");return typeof t=="symbol"?t:String(t)}function th(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rh=Ne("buffer"),vi=rh.Buffer,nh=Ne("util"),Ta=nh.inspect,ih=Ta&&Ta.custom||"inspect";function ah(e,t,r){vi.prototype.copy.call(e,t,r)}vs.exports=function(){function e(){Q0(this,e),this.head=null,this.tail=null,this.length=0}return eh(e,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return vi.alloc(0);for(var n=vi.allocUnsafe(r>>>0),i=this.head,o=0;i;)ah(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var c=n.data,d=r>c.length?c.length:r;if(d===c.length?o+=c:o+=c.slice(0,r),r-=d,r===0){d===c.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=c.slice(d));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=vi.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var c=i.data,d=r>c.length?c.length:r;if(c.copy(n,n.length-r,0,d),r-=d,r===0){d===c.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=c.slice(d));break}++o}return this.length-=o,n}},{key:ih,value:function(r,n){return Ta(this,ls(ls({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var Ba=E((hv,ys)=>{"use strict";function oh(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Pa,this,e)):process.nextTick(Pa,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(mi,r):(r._writableState.errorEmitted=!0,process.nextTick(gs,r,o)):process.nextTick(gs,r,o):t?(process.nextTick(mi,r),t(o)):process.nextTick(mi,r)}),this)}function gs(e,t){Pa(e,t),mi(e)}function mi(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function fh(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Pa(e,t){e.emit("error",t)}function sh(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}ys.exports={destroy:oh,undestroy:fh,errorOrDestroy:sh}});var Xt=E((lv,_s)=>{"use strict";var ws={};function rt(e,t,r){r||(r=Error);function n(o,c,d){return typeof t=="string"?t:t(o,c,d)}class i extends r{constructor(c,d,v){super(n(c,d,v))}}i.prototype.name=r.name,i.prototype.code=e,ws[e]=i}function xs(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function ch(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function dh(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function uh(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}rt("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);rt("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&ch(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let i;if(dh(e," argument"))i=`The ${e} ${n} ${xs(t,"type")}`;else{let o=uh(e,".")?"property":"argument";i=`The "${e}" ${o} ${n} ${xs(t,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);rt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");rt("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});rt("ERR_STREAM_PREMATURE_CLOSE","Premature close");rt("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});rt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");rt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");rt("ERR_STREAM_WRITE_AFTER_END","write after end");rt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);rt("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);rt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");_s.exports.codes=ws});var Ca=E((pv,Ss)=>{"use strict";var hh=Xt().codes.ERR_INVALID_OPT_VALUE;function lh(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function ph(e,t,r,n){var i=lh(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new hh(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}Ss.exports={getHighWaterMark:ph}});var Ms=E((bv,Na)=>{"use strict";typeof Object.create=="function"?Na.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Na.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var St=E((vv,qa)=>{"use strict";try{if(ka=Ne("util"),typeof ka.inherits!="function")throw"";qa.exports=ka.inherits}catch{qa.exports=Ms()}var ka});var Es=E((mv,As)=>{"use strict";As.exports=Ne("util").deprecate});var Fa=E((gv,Cs)=>{"use strict";Cs.exports=ke;function Is(e){var t=this;this.next=null,this.entry=null,this.finish=function(){zh(t,e)}}var sn;ke.WritableState=$n;var bh={deprecate:Es()},Ts=Ia(),yi=Ne("buffer").Buffer,vh=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function mh(e){return yi.from(e)}function gh(e){return yi.isBuffer(e)||e instanceof vh}var Oa=Ba(),yh=Ca(),xh=yh.getHighWaterMark,Qt=Xt().codes,wh=Qt.ERR_INVALID_ARG_TYPE,_h=Qt.ERR_METHOD_NOT_IMPLEMENTED,Sh=Qt.ERR_MULTIPLE_CALLBACK,Mh=Qt.ERR_STREAM_CANNOT_PIPE,Ah=Qt.ERR_STREAM_DESTROYED,Eh=Qt.ERR_STREAM_NULL_VALUES,Rh=Qt.ERR_STREAM_WRITE_AFTER_END,Ih=Qt.ERR_UNKNOWN_ENCODING,cn=Oa.errorOrDestroy;St()(ke,Ts);function Th(){}function $n(e,t,r){sn=sn||qr(),e=e||{},typeof r!="boolean"&&(r=t instanceof sn),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=xh(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Lh(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Is(this)}$n.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty($n.prototype,"buffer",{get:bh.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var gi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(gi=Function.prototype[Symbol.hasInstance],Object.defineProperty(ke,Symbol.hasInstance,{value:function(t){return gi.call(this,t)?!0:this!==ke?!1:t&&t._writableState instanceof $n}})):gi=function(t){return t instanceof this};function ke(e){sn=sn||qr();var t=this instanceof sn;if(!t&&!gi.call(ke,this))return new ke(e);this._writableState=new $n(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ts.call(this)}ke.prototype.pipe=function(){cn(this,new Mh)};function Ph(e,t){var r=new Rh;cn(e,r),process.nextTick(t,r)}function Bh(e,t,r,n){var i;return r===null?i=new Eh:typeof r!="string"&&!t.objectMode&&(i=new wh("chunk",["string","Buffer"],r)),i?(cn(e,i),process.nextTick(n,i),!1):!0}ke.prototype.write=function(e,t,r){var n=this._writableState,i=!1,o=!n.objectMode&&gh(e);return o&&!yi.isBuffer(e)&&(e=mh(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=Th),n.ending?Ph(this,r):(o||Bh(this,n,e,r))&&(n.pendingcb++,i=Nh(this,n,o,e,t,r)),i};ke.prototype.cork=function(){this._writableState.corked++};ke.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ps(this,e))};ke.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Ih(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ke.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ch(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=yi.from(t,r)),t}Object.defineProperty(ke.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Nh(e,t,r,n,i,o){if(!r){var c=Ch(t,n,i);n!==c&&(r=!0,i="buffer",n=c)}var d=t.objectMode?1:n.length;t.length+=d;var v=t.length<t.highWaterMark;if(v||(t.needDrain=!0),t.writing||t.corked){var m=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},m?m.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else La(e,t,!1,d,n,i,o);return v}function La(e,t,r,n,i,o,c){t.writelen=n,t.writecb=c,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Ah("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function kh(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(zn,e,t),e._writableState.errorEmitted=!0,cn(e,n)):(i(n),e._writableState.errorEmitted=!0,cn(e,n),zn(e,t))}function qh(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Lh(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Sh;if(qh(r),t)kh(e,r,n,t,i);else{var o=Bs(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Ps(e,r),n?process.nextTick(Rs,e,r,o,i):Rs(e,r,o,i)}}function Rs(e,t,r,n){r||Oh(e,t),t.pendingcb--,n(),zn(e,t)}function Oh(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Ps(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var c=0,d=!0;r;)i[c]=r,r.isBuf||(d=!1),r=r.next,c+=1;i.allBuffers=d,La(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Is(t),t.bufferedRequestCount=0}else{for(;r;){var v=r.chunk,m=r.encoding,y=r.callback,w=t.objectMode?1:v.length;if(La(e,t,!1,w,v,m,y),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}ke.prototype._write=function(e,t,r){r(new _h("_write()"))};ke.prototype._writev=null;ke.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Dh(this,n,r),this};Object.defineProperty(ke.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Bs(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Fh(e,t){e._final(function(r){t.pendingcb--,r&&cn(e,r),t.prefinished=!0,e.emit("prefinish"),zn(e,t)})}function Uh(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Fh,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function zn(e,t){var r=Bs(t);if(r&&(Uh(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function Dh(e,t,r){t.ending=!0,zn(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function zh(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(ke.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});ke.prototype.destroy=Oa.destroy;ke.prototype._undestroy=Oa.undestroy;ke.prototype._destroy=function(e,t){t(e)}});var qr=E((yv,ks)=>{"use strict";var $h=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ks.exports=Mt;var Ns=za(),Da=Fa();St()(Mt,Ns);for(Ua=$h(Da.prototype),xi=0;xi<Ua.length;xi++)wi=Ua[xi],Mt.prototype[wi]||(Mt.prototype[wi]=Da.prototype[wi]);var Ua,wi,xi;function Mt(e){if(!(this instanceof Mt))return new Mt(e);Ns.call(this,e),Da.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Hh)))}Object.defineProperty(Mt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Mt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Mt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Hh(){this._writableState.ended||process.nextTick(Kh,this)}function Kh(e){e.end()}Object.defineProperty(Mt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var Os=E(($a,Ls)=>{"use strict";var _i=Ne("buffer"),At=_i.Buffer;function qs(e,t){for(var r in e)t[r]=e[r]}At.from&&At.alloc&&At.allocUnsafe&&At.allocUnsafeSlow?Ls.exports=_i:(qs(_i,$a),$a.Buffer=Lr);function Lr(e,t,r){return At(e,t,r)}Lr.prototype=Object.create(At.prototype);qs(At,Lr);Lr.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return At(e,t,r)};Lr.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=At(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Lr.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return At(e)};Lr.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _i.SlowBuffer(e)}});var ja=E(Us=>{"use strict";var Ka=Os().Buffer,Fs=Ka.isEncoding||function(e){switch(e=""+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 jh(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}}function Wh(e){var t=jh(e);if(typeof t!="string"&&(Ka.isEncoding===Fs||!Fs(e)))throw new Error("Unknown encoding: "+e);return t||e}Us.StringDecoder=Hn;function Hn(e){this.encoding=Wh(e);var t;switch(this.encoding){case"utf16le":this.text=Xh,this.end=Qh,t=4;break;case"utf8":this.fillLast=Jh,t=4;break;case"base64":this.text=el,this.end=tl,t=3;break;default:this.write=rl,this.end=nl;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ka.allocUnsafe(t)}Hn.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Hn.prototype.end=Zh;Hn.prototype.text=Yh;Hn.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};function Ha(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vh(e,t,r){var n=t.length-1;if(n<r)return 0;var i=Ha(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=Ha(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=Ha(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Gh(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Jh(e){var t=this.lastTotal-this.lastNeed,r=Gh(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Yh(e,t){var r=Vh(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)}function Zh(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Xh(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 Qh(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 el(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?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 tl(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function rl(e){return e.toString(this.encoding)}function nl(e){return e&&e.length?this.write(e):""}});var Si=E((wv,$s)=>{"use strict";var Ds=Xt().codes.ERR_STREAM_PREMATURE_CLOSE;function il(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function al(){}function ol(e){return e.setHeader&&typeof e.abort=="function"}function zs(e,t,r){if(typeof t=="function")return zs(e,null,t);t||(t={}),r=il(r||al);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||d()},c=e._writableState&&e._writableState.finished,d=function(){i=!1,c=!0,n||r.call(e)},v=e._readableState&&e._readableState.endEmitted,m=function(){n=!1,v=!0,i||r.call(e)},y=function(A){r.call(e,A)},w=function(){var A;if(n&&!v)return(!e._readableState||!e._readableState.ended)&&(A=new Ds),r.call(e,A);if(i&&!c)return(!e._writableState||!e._writableState.ended)&&(A=new Ds),r.call(e,A)},S=function(){e.req.on("finish",d)};return ol(e)?(e.on("complete",d),e.on("abort",w),e.req?S():e.on("request",S)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",m),e.on("finish",d),t.error!==!1&&e.on("error",y),e.on("close",w),function(){e.removeListener("complete",d),e.removeListener("abort",w),e.removeListener("request",S),e.req&&e.req.removeListener("finish",d),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",d),e.removeListener("end",m),e.removeListener("error",y),e.removeListener("close",w)}}$s.exports=zs});var Ks=E((_v,Hs)=>{"use strict";var Mi;function er(e,t,r){return t=fl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fl(e){var t=sl(e,"string");return typeof t=="symbol"?t:String(t)}function sl(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cl=Si(),tr=Symbol("lastResolve"),Or=Symbol("lastReject"),Kn=Symbol("error"),Ai=Symbol("ended"),Fr=Symbol("lastPromise"),Wa=Symbol("handlePromise"),Ur=Symbol("stream");function rr(e,t){return{value:e,done:t}}function dl(e){var t=e[tr];if(t!==null){var r=e[Ur].read();r!==null&&(e[Fr]=null,e[tr]=null,e[Or]=null,t(rr(r,!1)))}}function ul(e){process.nextTick(dl,e)}function hl(e,t){return function(r,n){e.then(function(){if(t[Ai]){r(rr(void 0,!0));return}t[Wa](r,n)},n)}}var ll=Object.getPrototypeOf(function(){}),pl=Object.setPrototypeOf((Mi={get stream(){return this[Ur]},next:function(){var t=this,r=this[Kn];if(r!==null)return Promise.reject(r);if(this[Ai])return Promise.resolve(rr(void 0,!0));if(this[Ur].destroyed)return new Promise(function(c,d){process.nextTick(function(){t[Kn]?d(t[Kn]):c(rr(void 0,!0))})});var n=this[Fr],i;if(n)i=new Promise(hl(n,this));else{var o=this[Ur].read();if(o!==null)return Promise.resolve(rr(o,!1));i=new Promise(this[Wa])}return this[Fr]=i,i}},er(Mi,Symbol.asyncIterator,function(){return this}),er(Mi,"return",function(){var t=this;return new Promise(function(r,n){t[Ur].destroy(null,function(i){if(i){n(i);return}r(rr(void 0,!0))})})}),Mi),ll),bl=function(t){var r,n=Object.create(pl,(r={},er(r,Ur,{value:t,writable:!0}),er(r,tr,{value:null,writable:!0}),er(r,Or,{value:null,writable:!0}),er(r,Kn,{value:null,writable:!0}),er(r,Ai,{value:t._readableState.endEmitted,writable:!0}),er(r,Wa,{value:function(o,c){var d=n[Ur].read();d?(n[Fr]=null,n[tr]=null,n[Or]=null,o(rr(d,!1))):(n[tr]=o,n[Or]=c)},writable:!0}),r));return n[Fr]=null,cl(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[Or];o!==null&&(n[Fr]=null,n[tr]=null,n[Or]=null,o(i)),n[Kn]=i;return}var c=n[tr];c!==null&&(n[Fr]=null,n[tr]=null,n[Or]=null,c(rr(void 0,!0))),n[Ai]=!0}),t.on("readable",ul.bind(null,n)),n};Hs.exports=bl});var Gs=E((Sv,Vs)=>{"use strict";function js(e,t,r,n,i,o,c){try{var d=e[o](c),v=d.value}catch(m){r(m);return}d.done?t(v):Promise.resolve(v).then(n,i)}function vl(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function c(v){js(o,n,i,c,d,"next",v)}function d(v){js(o,n,i,c,d,"throw",v)}c(void 0)})}}function Ws(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ws(Object(r),!0).forEach(function(n){gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ws(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gl(e,t,r){return t=yl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yl(e){var t=xl(e,"string");return typeof t=="symbol"?t:String(t)}function xl(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wl=Xt().codes.ERR_INVALID_ARG_TYPE;function _l(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new wl("iterable",["Iterable"],t);var i=new e(ml({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,c())};function c(){return d.apply(this,arguments)}function d(){return d=vl(function*(){try{var v=yield n.next(),m=v.value,y=v.done;y?i.push(null):i.push(yield m)?c():o=!1}catch(w){i.destroy(w)}}),d.apply(this,arguments)}return i}Vs.exports=_l});var za=E((Av,ic)=>{"use strict";ic.exports=z;var dn;z.ReadableState=Xs;var Mv=Ne("events").EventEmitter,Zs=function(t,r){return t.listeners(r).length},Wn=Ia(),Ei=Ne("buffer").Buffer,Sl=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ml(e){return Ei.from(e)}function Al(e){return Ei.isBuffer(e)||e instanceof Sl}var Va=Ne("util"),q;Va&&Va.debuglog?q=Va.debuglog("stream"):q=function(){};var El=ms(),eo=Ba(),Rl=Ca(),Il=Rl.getHighWaterMark,Ri=Xt().codes,Tl=Ri.ERR_INVALID_ARG_TYPE,Pl=Ri.ERR_STREAM_PUSH_AFTER_EOF,Bl=Ri.ERR_METHOD_NOT_IMPLEMENTED,Cl=Ri.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,un,Ga,Ja;St()(z,Wn);var jn=eo.errorOrDestroy,Ya=["error","close","destroy","pause","resume"];function Nl(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xs(e,t,r){dn=dn||qr(),e=e||{},typeof r!="boolean"&&(r=t instanceof dn),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Il(this,e,"readableHighWaterMark",r),this.buffer=new El,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(un||(un=ja().StringDecoder),this.decoder=new un(e.encoding),this.encoding=e.encoding)}function z(e){if(dn=dn||qr(),!(this instanceof z))return new z(e);var t=this instanceof dn;this._readableState=new Xs(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Wn.call(this)}Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});z.prototype.destroy=eo.destroy;z.prototype._undestroy=eo.undestroy;z.prototype._destroy=function(e,t){t(e)};z.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Ei.from(e,t),t=""),n=!0),Qs(this,e,t,!1,n)};z.prototype.unshift=function(e){return Qs(this,e,null,!0,!1)};function Qs(e,t,r,n,i){q("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Ll(e,o);else{var c;if(i||(c=kl(o,t)),c)jn(e,c);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Ei.prototype&&(t=Ml(t)),n)o.endEmitted?jn(e,new Cl):Za(e,o,t,!0);else if(o.ended)jn(e,new Pl);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Za(e,o,t,!1):Qa(e,o)):Za(e,o,t,!1)}else n||(o.reading=!1,Qa(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Za(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ii(e)),Qa(e,t)}function kl(e,t){var r;return!Al(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Tl("chunk",["string","Buffer","Uint8Array"],t)),r}z.prototype.isPaused=function(){return this._readableState.flowing===!1};z.prototype.setEncoding=function(e){un||(un=ja().StringDecoder);var t=new un(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Js=1073741824;function ql(e){return e>=Js?e=Js:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Ys(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ql(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}z.prototype.read=function(e){q("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return q("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Xa(this):Ii(this),null;if(e=Ys(e,t),e===0&&t.ended)return t.length===0&&Xa(this),null;var n=t.needReadable;q("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,q("length less than watermark",n)),t.ended||t.reading?(n=!1,q("reading or ended",n)):n&&(q("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Ys(r,t)));var i;return e>0?i=rc(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Xa(this)),i!==null&&this.emit("data",i),i};function Ll(e,t){if(q("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ii(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ec(e)))}}function Ii(e){var t=e._readableState;q("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(q("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ec,e))}function ec(e){var t=e._readableState;q("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,to(e)}function Qa(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Ol,e,t))}function Ol(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(q("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}z.prototype._read=function(e){jn(this,new Bl("_read()"))};z.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,q("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=i?d:I;n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",c);function c(k,C){q("onunpipe"),k===r&&C&&C.hasUnpiped===!1&&(C.hasUnpiped=!0,y())}function d(){q("onend"),e.end()}var v=Fl(r);e.on("drain",v);var m=!1;function y(){q("cleanup"),e.removeListener("close",M),e.removeListener("finish",A),e.removeListener("drain",v),e.removeListener("error",S),e.removeListener("unpipe",c),r.removeListener("end",d),r.removeListener("end",I),r.removeListener("data",w),m=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&v()}r.on("data",w);function w(k){q("ondata");var C=e.write(k);q("dest.write",C),C===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&nc(n.pipes,e)!==-1)&&!m&&(q("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function S(k){q("onerror",k),I(),e.removeListener("error",S),Zs(e,"error")===0&&jn(e,k)}Nl(e,"error",S);function M(){e.removeListener("finish",A),I()}e.once("close",M);function A(){q("onfinish"),e.removeListener("close",M),I()}e.once("finish",A);function I(){q("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(q("pipe resume"),r.resume()),e};function Fl(e){return function(){var r=e._readableState;q("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Zs(e,"data")&&(r.flowing=!0,to(e))}}z.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var c=nc(t.pipes,e);return c===-1?this:(t.pipes.splice(c,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};z.prototype.on=function(e,t){var r=Wn.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,q("on readable",n.length,n.reading),n.length?Ii(this):n.reading||process.nextTick(Ul,this)),r};z.prototype.addListener=z.prototype.on;z.prototype.removeListener=function(e,t){var r=Wn.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(tc,this),r};z.prototype.removeAllListeners=function(e){var t=Wn.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(tc,this),t};function tc(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Ul(e){q("readable nexttick read 0"),e.read(0)}z.prototype.resume=function(){var e=this._readableState;return e.flowing||(q("resume"),e.flowing=!e.readableListening,Dl(this,e)),e.paused=!1,this};function Dl(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(zl,e,t))}function zl(e,t){q("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),to(e),t.flowing&&!t.reading&&e.read(0)}z.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function to(e){var t=e._readableState;for(q("flow",t.flowing);t.flowing&&e.read()!==null;);}z.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(q("wrapped end"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&t.push(c)}t.push(null)}),e.on("data",function(c){if(q("wrapped data"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var d=t.push(c);d||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(d){return function(){return e[d].apply(e,arguments)}}(i));for(var o=0;o<Ya.length;o++)e.on(Ya[o],this.emit.bind(this,Ya[o]));return this._read=function(c){q("wrapped _read",c),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(z.prototype[Symbol.asyncIterator]=function(){return Ga===void 0&&(Ga=Ks()),Ga(this)});Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(z.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(z.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});z._fromList=rc;Object.defineProperty(z.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function rc(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Xa(e){var t=e._readableState;q("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick($l,t,e))}function $l(e,t){if(q("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(z.from=function(e,t){return Ja===void 0&&(Ja=Gs()),Ja(z,e,t)});function nc(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var ro=E((Ev,oc)=>{"use strict";oc.exports=Ht;var Ti=Xt().codes,Hl=Ti.ERR_METHOD_NOT_IMPLEMENTED,Kl=Ti.ERR_MULTIPLE_CALLBACK,jl=Ti.ERR_TRANSFORM_ALREADY_TRANSFORMING,Wl=Ti.ERR_TRANSFORM_WITH_LENGTH_0,Pi=qr();St()(Ht,Pi);function Vl(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Kl);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ht(e){if(!(this instanceof Ht))return new Ht(e);Pi.call(this,e),this._transformState={afterTransform:Vl.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Gl)}function Gl(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ac(e,t,r)}):ac(this,null,null)}Ht.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pi.prototype.push.call(this,e,t)};Ht.prototype._transform=function(e,t,r){r(new Hl("_transform()"))};Ht.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ht.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Ht.prototype._destroy=function(e,t){Pi.prototype._destroy.call(this,e,function(r){t(r)})};function ac(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Wl;if(e._transformState.transforming)throw new jl;return e.push(null)}});var cc=E((Rv,sc)=>{"use strict";sc.exports=Vn;var fc=ro();St()(Vn,fc);function Vn(e){if(!(this instanceof Vn))return new Vn(e);fc.call(this,e)}Vn.prototype._transform=function(e,t,r){r(null,e)}});var pc=E((Iv,lc)=>{"use strict";var no;function Jl(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var hc=Xt().codes,Yl=hc.ERR_MISSING_ARGS,Zl=hc.ERR_STREAM_DESTROYED;function dc(e){if(e)throw e}function Xl(e){return e.setHeader&&typeof e.abort=="function"}function Ql(e,t,r,n){n=Jl(n);var i=!1;e.on("close",function(){i=!0}),no===void 0&&(no=Si()),no(e,{readable:t,writable:r},function(c){if(c)return n(c);i=!0,n()});var o=!1;return function(c){if(!i&&!o){if(o=!0,Xl(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(c||new Zl("pipe"))}}}function uc(e){e()}function e1(e,t){return e.pipe(t)}function t1(e){return!e.length||typeof e[e.length-1]!="function"?dc:e.pop()}function r1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t1(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Yl("streams");var i,o=t.map(function(c,d){var v=d<t.length-1,m=d>0;return Ql(c,v,m,function(y){i||(i=y),y&&o.forEach(uc),!v&&(o.forEach(uc),n(i))})});return t.reduce(e1)}lc.exports=r1});var io=E((nt,Jn)=>{"use strict";var Gn=Ne("stream");process.env.READABLE_STREAM==="disable"&&Gn?(Jn.exports=Gn.Readable,Object.assign(Jn.exports,Gn),Jn.exports.Stream=Gn):(nt=Jn.exports=za(),nt.Stream=Gn||nt,nt.Readable=nt,nt.Writable=Fa(),nt.Duplex=qr(),nt.Transform=ro(),nt.PassThrough=cc(),nt.finished=Si(),nt.pipeline=pc())});var mc=E((Tv,vc)=>{"use strict";var{Transform:n1}=io();vc.exports=e=>class bc extends n1{constructor(r,n,i,o,c){super(c),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=o,this._options=c,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let o=null;try{this.update(r,n)}catch(c){o=c}i(o)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new bc(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return