@wormhole-foundation/wormhole-connect 2.0.0-beta.0-development → 2.0.0-beta.2-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{aptos-gRn0txr9.js → aptos-CvRULtpx.js} +61 -61
- package/dist/assets/aptos-D4y7Fo3S.js +3 -0
- package/dist/assets/{chunk-OR6GFWLG-Ci0TYwIQ.js → chunk-OR6GFWLG-BZrmB1_W.js} +1 -1
- package/dist/assets/evm-K2ASlzX-.js +2 -0
- package/dist/assets/{index-CTtLxavV.js → index-AaqmNOLf.js} +1 -1
- package/dist/assets/index-BLpnEfNA.js +1 -0
- package/dist/assets/{index-DtASoatx.js → index-BTnVHgr_.js} +1 -1
- package/dist/assets/{index-Cf10mHc-.js → index-BpWlJX3r.js} +1 -1
- package/dist/assets/{index-DTCth0iO.js → index-C1mpuWJz.js} +1 -1
- package/dist/assets/{index-cfzEp_CP.js → index-C1yBHw3e.js} +1 -1
- package/dist/assets/{index-Dwk61kXP.js → index-CEjbqPmT.js} +1 -1
- package/dist/assets/{index-BZKNZDak.js → index-CZHHMApS.js} +1 -1
- package/dist/assets/{index-Cm_KjDDY.js → index-QLnl5sO1.js} +1 -1
- package/dist/assets/{index-D7CrUmY0.js → index-_NuAK6zi.js} +1 -1
- package/dist/assets/index-rryJGGTI.js +1 -0
- package/dist/assets/{signer-BaParnK7.js → signer-dWGaM-mu.js} +1 -1
- package/dist/assets/{solana-5w7FFw9J.js → solana-D2tTKYdq.js} +1 -1
- package/dist/assets/solana-UIzLk1Ne.js +2 -0
- package/dist/assets/{sui-DaosOePU.js → sui-DVNvuW-l.js} +4 -4
- package/dist/assets/unsignedTransaction-DsxtoHjl.js +1 -0
- package/dist/main.js +100 -100
- package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
- package/dist/src/config/testnet/tokens.d.ts.map +1 -1
- package/dist/src/config/utils.d.ts.map +1 -1
- package/dist/src/hooks/useWalletCompatibility.d.ts +14 -0
- package/dist/src/hooks/useWalletCompatibility.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/wallet/aptos.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/index.d.ts.map +1 -1
- package/lib/{aptos-G95l4D5Y.mjs → aptos-B3TWiavl.mjs} +59 -57
- package/lib/aptos-DTHJQbIb.js +2 -0
- package/lib/{aptos-CAZnfR2B.js → aptos-Dbfuz96f.js} +9 -9
- package/lib/{aptos-VlcdOXIs.mjs → aptos-KMTKpvnn.mjs} +1229 -1228
- package/lib/{base64-DScLQWIJ.js → base64-Ci4lr2or.js} +1 -1
- package/lib/{base64-SRM73VOK.mjs → base64-D-sBGnCV.mjs} +1 -1
- package/lib/{ccip-CwCUSl64.js → ccip-CBfsTddJ.js} +1 -1
- package/lib/{ccip-ZQo50dYX.mjs → ccip-IV8wn7mX.mjs} +1 -1
- package/lib/{chunk-OR6GFWLG-oZZxBIBy.js → chunk-OR6GFWLG-CFPMvzOj.js} +5 -5
- package/lib/{chunk-OR6GFWLG-qW5dukvV.mjs → chunk-OR6GFWLG-m97dlZZV.mjs} +6 -3
- package/lib/{events-uBYsqfrl.js → events-CjPLRE-d.js} +1 -1
- package/lib/{events-Dgn4K9rN.mjs → events-Dtbo0st9.mjs} +1 -1
- package/lib/{evm-CgSzbeCb.js → evm-BFBdsLYZ.js} +3 -3
- package/lib/{evm-Cocl1Qx2.js → evm-DuCtpTHQ.js} +1 -1
- package/lib/{evm-D5LTDUcP.mjs → evm-JbOZ35C0.mjs} +5 -5
- package/lib/{evm-BM1jPLwl.mjs → evm-kkjU8AsQ.mjs} +6 -6
- package/lib/{index-DU3Jxks1.js → index-B0lJ-tdN.js} +1 -1
- package/lib/{index-CjYsC-nW.js → index-B1ELgSA6.js} +1 -1
- package/lib/{index-C9mu4l7o.mjs → index-B2h28IP4.mjs} +2 -2
- package/lib/{index-DXcVEr2U.mjs → index-B3CeIlMx.mjs} +25135 -25063
- package/lib/{index-xZ5vsuO7.js → index-B4_J2HAU.js} +1 -1
- package/lib/{index-i8-I-Kx6.mjs → index-BE5ihayy.mjs} +2 -2
- package/lib/{index-CXFBf2VR.mjs → index-BL5dRh07.mjs} +2 -2
- package/lib/{index-TdVwI_k_.js → index-BasVT8K7.js} +1 -1
- package/lib/{index-a-G25ciF.js → index-BdUX86K5.js} +1 -1
- package/lib/{index-BWgeRtvV.mjs → index-Bo9bOQTx.mjs} +1 -1
- package/lib/{index-C9_Xqcp_.mjs → index-BoYglZwX.mjs} +38 -38
- package/lib/{index-DgaACuCq.js → index-Br4OTc1S.js} +154 -154
- package/lib/{index-D8yrwfK5.mjs → index-CM5aJCsU.mjs} +3 -3
- package/lib/{index-BLwbqj4f.js → index-CS3m8qJT.js} +1 -1
- package/lib/{index-DZz_hUYe.mjs → index-CWSjFjhh.mjs} +48 -57
- package/lib/{index-tT8fg8Q5.mjs → index-CfVm24rf.mjs} +22 -22
- package/lib/{index-DaLPPso5.mjs → index-D2v_ZH9c.mjs} +2 -2
- package/lib/{index-BCi7GitD.mjs → index-D9NMKVsX.mjs} +2 -2
- package/lib/{index-DRZXoRVn.mjs → index-DCfPCVGM.mjs} +7 -7
- package/lib/{index-DuM5_evN.mjs → index-DFDFr1Hv.mjs} +8 -8
- package/lib/{index-B6JrPvDW.mjs → index-DL2KYGb2.mjs} +1 -1
- package/lib/{index-CZ8GDYHq.js → index-DLegUdzU.js} +1 -1
- package/lib/{index-Cu6RQt8e.js → index-DNNfs5Ot.js} +1 -1
- package/lib/{index-CCDkkZN6.js → index-DPlTznQs.js} +1 -1
- package/lib/index-DUrL3GHD.mjs +102 -0
- package/lib/{index-CoDv0EFX.mjs → index-DWTXe9yU.mjs} +4 -4
- package/lib/{index-CffsvCdp.js → index-DcKePNaA.js} +1 -1
- package/lib/{index-3VUjPBnj.js → index-DlMM2TKj.js} +1 -1
- package/lib/index-DmkA2z4q.js +1 -0
- package/lib/{index-JaS46BVB.js → index-DtJ3gwwu.js} +1 -1
- package/lib/{index-C_045fAm.js → index-Dy3WJQ-h.js} +1 -1
- package/lib/{index-DBJPUF0X.js → index-DzgnqJ7-.js} +1 -1
- package/lib/{index-aw5kQCwX.mjs → index-HF2DcpAR.mjs} +2 -2
- package/lib/{index-DPacNsBv.mjs → index-IbmfT3Tg.mjs} +5 -5
- package/lib/{index-DY59SYJT.mjs → index-MdL7XQBR.mjs} +1 -1
- package/lib/index-QzouONBY.js +1 -0
- package/lib/{index-BpHM17iv.js → index-SrHywpn-.js} +1 -1
- package/lib/{index-SzAoRhpC.js → index-gUz3Q8gE.js} +1 -1
- package/lib/{index-BERVkvac.js → index-pi5LLTZ3.js} +1 -1
- package/lib/{index-CusHYtsc.mjs → index-vlui53ey.mjs} +2 -2
- package/lib/{index.es-c-VQ7iU7.js → index.es-DFpbuPuY.js} +2 -2
- package/lib/{index.es-CfDkO3SA.mjs → index.es-SaEPft-i.mjs} +6 -6
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{signer-Uy7DwUiY.js → signer-CeSFiipD.js} +1 -1
- package/lib/{signer-CsSNNgXY.mjs → signer-RSvbDa7c.mjs} +19 -19
- package/lib/solana-Bwjjv4LB.js +1 -0
- package/lib/{solana-D8Z8oyUb.mjs → solana-ClVJj67l.mjs} +4 -4
- package/lib/solana-DmG1qAvz.mjs +16 -0
- package/lib/{solana-CnbQnU0Q.js → solana-DwgjV-W7.js} +1 -1
- package/lib/{solanaEmbed.esm-CnTsBpfN.mjs → solanaEmbed.esm-Cu2iyuQy.mjs} +959 -959
- package/lib/{solanaEmbed.esm-BMN20IzZ.js → solanaEmbed.esm-DY919Dj0.js} +1 -1
- package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
- package/lib/src/config/testnet/tokens.d.ts.map +1 -1
- package/lib/src/config/utils.d.ts.map +1 -1
- package/lib/src/hooks/useWalletCompatibility.d.ts +14 -0
- package/lib/src/hooks/useWalletCompatibility.d.ts.map +1 -0
- package/lib/src/utils/index.d.ts +1 -1
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/wallet/aptos.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/ChainList.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/index.d.ts.map +1 -1
- package/lib/{sui-CkzAXofi.js → sui-BzgBbOVR.js} +2 -2
- package/lib/{sui-a-MPtxai.js → sui-C0CqiXaB.js} +1 -1
- package/lib/{sui-0upbYB1a.mjs → sui-CIBoUTGj.mjs} +1 -1
- package/lib/{sui-Dl3Uvu88.mjs → sui-D1lxvss1.mjs} +5 -5
- package/lib/unsignedTransaction-BDOQhqcZ.mjs +16 -0
- package/lib/unsignedTransaction-C1YeEl4G.js +1 -0
- package/lib/{utf8-YN1IXfNg.mjs → utf8-BZ7GX1-B.mjs} +1 -1
- package/lib/{utf8-PS_55WKJ.js → utf8-CQNNfvVV.js} +1 -1
- package/package.json +18 -18
- package/dist/assets/aptos-Ycl2eNjD.js +0 -3
- package/dist/assets/evm-ETvgEF-D.js +0 -2
- package/dist/assets/index-_2IpGxfE.js +0 -1
- package/dist/assets/solana-u2eYUt3V.js +0 -2
- package/lib/aptos-Ck1Sf3c1.js +0 -2
- package/lib/index-BgSe6vZM.js +0 -1
- package/lib/solana-Doh_jgqw.mjs +0 -16
- package/lib/solana-M-G4laS9.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./index-DgaACuCq.js"),hA=require("./events-uBYsqfrl.js");var ep={exports:{}},p_=$.requireEvents().EventEmitter,Cl,tp;function gA(){if(tp)return Cl;tp=1;function e(L,P){var O=Object.keys(L);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(L);P&&(M=M.filter(function(B){return Object.getOwnPropertyDescriptor(L,B).enumerable})),O.push.apply(O,M)}return O}function t(L){for(var P=1;P<arguments.length;P++){var O=arguments[P]!=null?arguments[P]:{};P%2?e(Object(O),!0).forEach(function(M){r(L,M,O[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach(function(M){Object.defineProperty(L,M,Object.getOwnPropertyDescriptor(O,M))})}return L}function r(L,P,O){return P=f(P),P in L?Object.defineProperty(L,P,{value:O,enumerable:!0,configurable:!0,writable:!0}):L[P]=O,L}function o(L,P){if(!(L instanceof P))throw new TypeError("Cannot call a class as a function")}function s(L,P){for(var O=0;O<P.length;O++){var M=P[O];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,f(M.key),M)}}function u(L,P,O){return s(L.prototype,P),Object.defineProperty(L,"prototype",{writable:!1}),L}function f(L){var P=h(L,"string");return typeof P=="symbol"?P:String(P)}function h(L,P){if(typeof L!="object"||L===null)return L;var O=L[Symbol.toPrimitive];if(O!==void 0){var M=O.call(L,P);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}var l=$.bufferPolyfill,c=l.Buffer,b=$.require$$3,w=b.inspect,T=w&&w.custom||"inspect";function m(L,P,O){c.prototype.copy.call(L,P,O)}return Cl=function(){function L(){o(this,L),this.head=null,this.tail=null,this.length=0}return u(L,[{key:"push",value:function(O){var M={data:O,next:null};this.length>0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(O){var M={data:O,next:this.head};this.length===0&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(this.length!==0){var O=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,O}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(O){if(this.length===0)return"";for(var M=this.head,B=""+M.data;M=M.next;)B+=O+M.data;return B}},{key:"concat",value:function(O){if(this.length===0)return c.alloc(0);for(var M=c.allocUnsafe(O>>>0),B=this.head,S=0;B;)m(B.data,M,S),S+=B.data.length,B=B.next;return M}},{key:"consume",value:function(O,M){var B;return O<this.head.data.length?(B=this.head.data.slice(0,O),this.head.data=this.head.data.slice(O)):O===this.head.data.length?B=this.shift():B=M?this._getString(O):this._getBuffer(O),B}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(O){var M=this.head,B=1,S=M.data;for(O-=S.length;M=M.next;){var E=M.data,U=O>E.length?E.length:O;if(U===E.length?S+=E:S+=E.slice(0,O),O-=U,O===0){U===E.length?(++B,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=E.slice(U));break}++B}return this.length-=B,S}},{key:"_getBuffer",value:function(O){var M=c.allocUnsafe(O),B=this.head,S=1;for(B.data.copy(M),O-=B.data.length;B=B.next;){var E=B.data,U=O>E.length?E.length:O;if(E.copy(M,M.length-O,0,U),O-=U,O===0){U===E.length?(++S,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=E.slice(U));break}++S}return this.length-=S,M}},{key:T,value:function(O,M){return w(this,t(t({},M),{},{depth:0,customInspect:!1}))}}]),L}(),Cl}function pA(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,$.dist.process.nextTick(Sc,this,e)):$.dist.process.nextTick(Sc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?$.dist.process.nextTick(uu,r):(r._writableState.errorEmitted=!0,$.dist.process.nextTick(rp,r,u)):$.dist.process.nextTick(rp,r,u):t?($.dist.process.nextTick(uu,r),t(u)):$.dist.process.nextTick(uu,r)}),this)}function rp(e,t){Sc(e,t),uu(e)}function uu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function bA(){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 Sc(e,t){e.emit("error",t)}function _A(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var b_={destroy:pA,undestroy:bA,errorOrDestroy:_A},Ki={};function yA(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var __={};function qr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){yA(f,u);function f(h,l,c){return u.call(this,o(h,l,c))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,__[e]=s}function np(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function wA(e,t,r){return e.substr(0,t.length)===t}function mA(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function EA(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}qr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&wA(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(mA(e," argument"))s="The ".concat(e," ").concat(o," ").concat(np(t,"type"));else{var u=EA(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(np(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);qr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});qr("ERR_STREAM_PREMATURE_CLOSE","Premature close");qr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});qr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qr("ERR_STREAM_WRITE_AFTER_END","write after end");qr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);qr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ki.codes=__;var vA=Ki.codes.ERR_INVALID_OPT_VALUE;function SA(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function RA(e,t,r,o){var s=SA(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new vA(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var y_={getHighWaterMark:RA},Ll,ip;function w_(){if(ip)return Ll;ip=1,Ll=ue;function e(R){var I=this;this.next=null,this.entry=null,this.finish=function(){be(I,R)}}var t;ue.WritableState=Q;var r={deprecate:$.requireBrowser()},o=p_,s=$.bufferPolyfill.Buffer,u=(typeof $.commonjsGlobal<"u"?$.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=b_,c=y_,b=c.getHighWaterMark,w=Ki.codes,T=w.ERR_INVALID_ARG_TYPE,m=w.ERR_METHOD_NOT_IMPLEMENTED,L=w.ERR_MULTIPLE_CALLBACK,P=w.ERR_STREAM_CANNOT_PIPE,O=w.ERR_STREAM_DESTROYED,M=w.ERR_STREAM_NULL_VALUES,B=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;$.requireInherits_browser()(ue,o);function U(){}function Q(R,I,q){t=t||Co(),R=R||{},typeof q!="boolean"&&(q=I instanceof t),this.objectMode=!!R.objectMode,q&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(I,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var I=this.bufferedRequest,q=[];I;)q.push(I),I=I.next;return q},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(I){return ce.call(this,I)?!0:this!==ue?!1:I&&I._writableState instanceof Q}})):ce=function(I){return I instanceof this};function ue(R){t=t||Co();var I=this instanceof t;if(!I&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,I),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){E(this,new P)};function te(R,I){var q=new B;E(R,q),$.dist.process.nextTick(I,q)}function Se(R,I,q,oe){var ye;return q===null?ye=new M:typeof q!="string"&&!I.objectMode&&(ye=new T("chunk",["string","Buffer"],q)),ye?(E(R,ye),$.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,I,q){var oe=this._writableState,ye=!1,g=!oe.objectMode&&h(R);return g&&!s.isBuffer(R)&&(R=f(R)),typeof I=="function"&&(q=I,I=null),g?I="buffer":I||(I=oe.defaultEncoding),typeof q!="function"&&(q=U),oe.ending?te(this,q):(g||Se(this,oe,R,q))&&(oe.pendingcb++,ye=H(this,oe,g,R,I,q)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&W(this,R))},ue.prototype.setDefaultEncoding=function(I){if(typeof I=="string"&&(I=I.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((I+"").toLowerCase())>-1))throw new S(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,I,q){return!R.objectMode&&R.decodeStrings!==!1&&typeof I=="string"&&(I=s.from(I,q)),I}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(R,I,q,oe,ye,g){if(!q){var p=me(I,oe,ye);oe!==p&&(q=!0,ye="buffer",oe=p)}var _=I.objectMode?1:oe.length;I.length+=_;var v=I.length<I.highWaterMark;if(v||(I.needDrain=!0),I.writing||I.corked){var J=I.lastBufferedRequest;I.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:q,callback:g,next:null},J?J.next=I.lastBufferedRequest:I.bufferedRequest=I.lastBufferedRequest,I.bufferedRequestCount+=1}else k(R,I,!1,_,oe,ye,g);return v}function k(R,I,q,oe,ye,g,p){I.writelen=oe,I.writecb=p,I.writing=!0,I.sync=!0,I.destroyed?I.onwrite(new O("write")):q?R._writev(ye,I.onwrite):R._write(ye,g,I.onwrite),I.sync=!1}function x(R,I,q,oe,ye){--I.pendingcb,q?($.dist.process.nextTick(ye,oe),$.dist.process.nextTick(re,R,I),R._writableState.errorEmitted=!0,E(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,E(R,oe),re(R,I))}function G(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,I){var q=R._writableState,oe=q.sync,ye=q.writecb;if(typeof ye!="function")throw new L;if(G(q),I)x(R,q,oe,I,ye);else{var g=K(q)||R.destroyed;!g&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&W(R,q),oe?$.dist.process.nextTick(V,R,q,g,ye):V(R,q,g,ye)}}function V(R,I,q,oe){q||ne(R,I),I.pendingcb--,oe(),re(R,I)}function ne(R,I){I.length===0&&I.needDrain&&(I.needDrain=!1,R.emit("drain"))}function W(R,I){I.bufferProcessing=!0;var q=I.bufferedRequest;if(R._writev&&q&&q.next){var oe=I.bufferedRequestCount,ye=new Array(oe),g=I.corkedRequestsFree;g.entry=q;for(var p=0,_=!0;q;)ye[p]=q,q.isBuf||(_=!1),q=q.next,p+=1;ye.allBuffers=_,k(R,I,!0,I.length,ye,"",g.finish),I.pendingcb++,I.lastBufferedRequest=null,g.next?(I.corkedRequestsFree=g.next,g.next=null):I.corkedRequestsFree=new e(I),I.bufferedRequestCount=0}else{for(;q;){var v=q.chunk,J=q.encoding,ie=q.callback,se=I.objectMode?1:v.length;if(k(R,I,!1,se,v,J,ie),q=q.next,I.bufferedRequestCount--,I.writing)break}q===null&&(I.lastBufferedRequest=null)}I.bufferedRequest=q,I.bufferProcessing=!1}ue.prototype._write=function(R,I,q){q(new m("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,I,q){var oe=this._writableState;return typeof R=="function"?(q=R,R=null,I=null):typeof I=="function"&&(q=I,I=null),R!=null&&this.write(R,I),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,q),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,I){R._final(function(q){I.pendingcb--,q&&E(R,q),I.prefinished=!0,R.emit("prefinish"),re(R,I)})}function de(R,I){!I.prefinished&&!I.finalCalled&&(typeof R._final=="function"&&!I.destroyed?(I.pendingcb++,I.finalCalled=!0,$.dist.process.nextTick(ae,R,I)):(I.prefinished=!0,R.emit("prefinish")))}function re(R,I){var q=K(I);if(q&&(de(R,I),I.pendingcb===0&&(I.finished=!0,R.emit("finish"),I.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return q}function _e(R,I,q){I.ending=!0,re(R,I),q&&(I.finished?$.dist.process.nextTick(q):R.once("finish",q)),I.ended=!0,R.writable=!1}function be(R,I,q){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;I.pendingcb--,ye(q),oe=oe.next}I.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,I){I(R)},Ll}var $l,op;function Co(){if(op)return $l;op=1;var e=Object.keys||function(c){var b=[];for(var w in c)b.push(w);return b};$l=f;var t=E_(),r=w_();$.requireInherits_browser()(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(c){if(!(this instanceof f))return new f(c);t.call(this,c),r.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||$.dist.process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),$l}var sp=Ki.codes.ERR_STREAM_PREMATURE_CLOSE;function AA(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function TA(){}function IA(e){return e.setHeader&&typeof e.abort=="function"}function m_(e,t,r){if(typeof t=="function")return m_(e,null,t);t||(t={}),r=AA(r||TA);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,c=function(){o=!1,l=!0,s||r.call(e)},b=function(L){r.call(e,L)},w=function(){var L;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(L=new sp),r.call(e,L);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(L=new sp),r.call(e,L)},T=function(){e.req.on("finish",h)};return IA(e)?(e.on("complete",h),e.on("abort",w),e.req?T():e.on("request",T)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",c),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",T),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",c),e.removeListener("error",b),e.removeListener("close",w)}}var Qc=m_,Bl,ap;function OA(){if(ap)return Bl;ap=1;var e;function t(S,E,U){return E=r(E),E in S?Object.defineProperty(S,E,{value:U,enumerable:!0,configurable:!0,writable:!0}):S[E]=U,S}function r(S){var E=o(S,"string");return typeof E=="symbol"?E:String(E)}function o(S,E){if(typeof S!="object"||S===null)return S;var U=S[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(S,E||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(S)}var s=Qc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function T(S,E){return{value:S,done:E}}function m(S){var E=S[u];if(E!==null){var U=S[w].read();U!==null&&(S[c]=null,S[u]=null,S[f]=null,E(T(U,!1)))}}function L(S){$.dist.process.nextTick(m,S)}function P(S,E){return function(U,Q){S.then(function(){if(E[l]){U(T(void 0,!0));return}E[b](U,Q)},Q)}}var O=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var E=this,U=this[h];if(U!==null)return Promise.reject(U);if(this[l])return Promise.resolve(T(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){$.dist.process.nextTick(function(){E[h]?Se(E[h]):te(T(void 0,!0))})});var Q=this[c],ce;if(Q)ce=new Promise(P(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(T(ue,!1));ce=new Promise(this[b])}return this[c]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var E=this;return new Promise(function(U,Q){E[w].destroy(null,function(ce){if(ce){Q(ce);return}U(T(void 0,!0))})})}),e),O),B=function(E){var U,Q=Object.create(M,(U={},t(U,w,{value:E,writable:!0}),t(U,u,{value:null,writable:!0}),t(U,f,{value:null,writable:!0}),t(U,h,{value:null,writable:!0}),t(U,l,{value:E._readableState.endEmitted,writable:!0}),t(U,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[c]=null,Q[u]=null,Q[f]=null,ue(T(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),U));return Q[c]=null,s(E,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[c]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[c]=null,Q[u]=null,Q[f]=null,te(T(void 0,!0))),Q[l]=!0}),E.on("readable",L.bind(null,Q)),Q};return Bl=B,Bl}var Nl,up;function PA(){return up||(up=1,Nl=function(){throw new Error("Readable.from is not available in the browser")}),Nl}var Ml,fp;function E_(){if(fp)return Ml;fp=1,Ml=te;var e;te.ReadableState=ue,$.requireEvents().EventEmitter;var t=function(p,_){return p.listeners(_).length},r=p_,o=$.bufferPolyfill.Buffer,s=(typeof $.commonjsGlobal<"u"?$.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(g){return o.from(g)}function f(g){return o.isBuffer(g)||g instanceof s}var h=$.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var c=gA(),b=b_,w=y_,T=w.getHighWaterMark,m=Ki.codes,L=m.ERR_INVALID_ARG_TYPE,P=m.ERR_STREAM_PUSH_AFTER_EOF,O=m.ERR_METHOD_NOT_IMPLEMENTED,M=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,B,S,E;$.requireInherits_browser()(te,r);var U=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(g,p,_){if(typeof g.prependListener=="function")return g.prependListener(p,_);!g._events||!g._events[p]?g.on(p,_):Array.isArray(g._events[p])?g._events[p].unshift(_):g._events[p]=[_,g._events[p]]}function ue(g,p,_){e=e||Co(),g=g||{},typeof _!="boolean"&&(_=p instanceof e),this.objectMode=!!g.objectMode,_&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=T(this,g,"readableHighWaterMark",_),this.buffer=new c,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(B||(B=$.requireString_decoder().StringDecoder),this.decoder=new B(g.encoding),this.encoding=g.encoding)}function te(g){if(e=e||Co(),!(this instanceof te))return new te(g);var p=this instanceof e;this._readableState=new ue(g,this,p),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(g,p){p(g)},te.prototype.push=function(g,p){var _=this._readableState,v;return _.objectMode?v=!0:typeof g=="string"&&(p=p||_.defaultEncoding,p!==_.encoding&&(g=o.from(g,p),p=""),v=!0),Se(this,g,p,!1,v)},te.prototype.unshift=function(g){return Se(this,g,null,!0,!1)};function Se(g,p,_,v,J){l("readableAddChunk",p);var ie=g._readableState;if(p===null)ie.reading=!1,Y(g,ie);else{var se;if(J||(se=H(ie,p)),se)U(g,se);else if(ie.objectMode||p&&p.length>0)if(typeof p!="string"&&!ie.objectMode&&Object.getPrototypeOf(p)!==o.prototype&&(p=u(p)),v)ie.endEmitted?U(g,new M):me(g,ie,p,!0);else if(ie.ended)U(g,new P);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(p=ie.decoder.write(p),ie.objectMode||p.length!==0?me(g,ie,p,!1):W(g,ie)):me(g,ie,p,!1)}else v||(ie.reading=!1,W(g,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(g,p,_,v){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,g.emit("data",_)):(p.length+=p.objectMode?1:_.length,v?p.buffer.unshift(_):p.buffer.push(_),p.needReadable&&V(g)),W(g,p)}function H(g,p){var _;return!f(p)&&typeof p!="string"&&p!==void 0&&!g.objectMode&&(_=new L("chunk",["string","Buffer","Uint8Array"],p)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(g){B||(B=$.requireString_decoder().StringDecoder);var p=new B(g);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,v="";_!==null;)v+=p.write(_.data),_=_.next;return this._readableState.buffer.clear(),v!==""&&this._readableState.buffer.push(v),this._readableState.length=v.length,this};var k=1073741824;function x(g){return g>=k?g=k:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function G(g,p){return g<=0||p.length===0&&p.ended?0:p.objectMode?1:g!==g?p.flowing&&p.length?p.buffer.head.data.length:p.length:(g>p.highWaterMark&&(p.highWaterMark=x(g)),g<=p.length?g:p.ended?p.length:(p.needReadable=!0,0))}te.prototype.read=function(g){l("read",g),g=parseInt(g,10);var p=this._readableState,_=g;if(g!==0&&(p.emittedReadable=!1),g===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return l("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?q(this):V(this),null;if(g=G(g,p),g===0&&p.ended)return p.length===0&&q(this),null;var v=p.needReadable;l("need readable",v),(p.length===0||p.length-g<p.highWaterMark)&&(v=!0,l("length less than watermark",v)),p.ended||p.reading?(v=!1,l("reading or ended",v)):v&&(l("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(g=G(_,p)));var J;return g>0?J=I(g,p):J=null,J===null?(p.needReadable=p.length<=p.highWaterMark,g=0):(p.length-=g,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),_!==g&&p.ended&&q(this)),J!==null&&this.emit("data",J),J};function Y(g,p){if(l("onEofChunk"),!p.ended){if(p.decoder){var _=p.decoder.end();_&&_.length&&(p.buffer.push(_),p.length+=p.objectMode?1:_.length)}p.ended=!0,p.sync?V(g):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,ne(g)))}}function V(g){var p=g._readableState;l("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(l("emitReadable",p.flowing),p.emittedReadable=!0,$.dist.process.nextTick(ne,g))}function ne(g){var p=g._readableState;l("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(g.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,R(g)}function W(g,p){p.readingMore||(p.readingMore=!0,$.dist.process.nextTick(K,g,p))}function K(g,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var _=p.length;if(l("maybeReadMore read 0"),g.read(0),_===p.length)break}p.readingMore=!1}te.prototype._read=function(g){U(this,new O("_read()"))},te.prototype.pipe=function(g,p){var _=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=g;break;case 1:v.pipes=[v.pipes,g];break;default:v.pipes.push(g);break}v.pipesCount+=1,l("pipe count=%d opts=%j",v.pipesCount,p);var J=(!p||p.end!==!1)&&g!==$.dist.process.stdout&&g!==$.dist.process.stderr,ie=J?Ie:bt;v.endEmitted?$.dist.process.nextTick(ie):_.once("end",ie),g.on("unpipe",se);function se(Je,Ge){l("onunpipe"),Je===_&&Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,je())}function Ie(){l("onend"),g.end()}var $e=ae(_);g.on("drain",$e);var Pe=!1;function je(){l("cleanup"),g.removeListener("close",pt),g.removeListener("finish",Qe),g.removeListener("drain",$e),g.removeListener("error",Fe),g.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",bt),_.removeListener("data",Re),Pe=!0,v.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&$e()}_.on("data",Re);function Re(Je){l("ondata");var Ge=g.write(Je);l("dest.write",Ge),Ge===!1&&((v.pipesCount===1&&v.pipes===g||v.pipesCount>1&&ye(v.pipes,g)!==-1)&&!Pe&&(l("false write response, pause",v.awaitDrain),v.awaitDrain++),_.pause())}function Fe(Je){l("onerror",Je),bt(),g.removeListener("error",Fe),t(g,"error")===0&&U(g,Je)}ce(g,"error",Fe);function pt(){g.removeListener("finish",Qe),bt()}g.once("close",pt);function Qe(){l("onfinish"),g.removeListener("close",pt),bt()}g.once("finish",Qe);function bt(){l("unpipe"),_.unpipe(g)}return g.emit("pipe",_),v.flowing||(l("pipe resume"),_.resume()),g};function ae(g){return function(){var _=g._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(g,"data")&&(_.flowing=!0,R(g))}}te.prototype.unpipe=function(g){var p=this._readableState,_={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return g&&g!==p.pipes?this:(g||(g=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,g&&g.emit("unpipe",this,_),this);if(!g){var v=p.pipes,J=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ie=0;ie<J;ie++)v[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(p.pipes,g);return se===-1?this:(p.pipes.splice(se,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),g.emit("unpipe",this,_),this)},te.prototype.on=function(g,p){var _=r.prototype.on.call(this,g,p),v=this._readableState;return g==="data"?(v.readableListening=this.listenerCount("readable")>0,v.flowing!==!1&&this.resume()):g==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,l("on readable",v.length,v.reading),v.length?V(this):v.reading||$.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(g,p){var _=r.prototype.removeListener.call(this,g,p);return g==="readable"&&$.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(g){var p=r.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&$.dist.process.nextTick(de,this),p};function de(g){var p=g._readableState;p.readableListening=g.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:g.listenerCount("data")>0&&g.resume()}function re(g){l("readable nexttick read 0"),g.read(0)}te.prototype.resume=function(){var g=this._readableState;return g.flowing||(l("resume"),g.flowing=!g.readableListening,_e(this,g)),g.paused=!1,this};function _e(g,p){p.resumeScheduled||(p.resumeScheduled=!0,$.dist.process.nextTick(be,g,p))}function be(g,p){l("resume",p.reading),p.reading||g.read(0),p.resumeScheduled=!1,g.emit("resume"),R(g),p.flowing&&!p.reading&&g.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(g){var p=g._readableState;for(l("flow",p.flowing);p.flowing&&g.read()!==null;);}te.prototype.wrap=function(g){var p=this,_=this._readableState,v=!1;g.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&p.push(se)}p.push(null)}),g.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=p.push(se);Ie||(v=!0,g.pause())}});for(var J in g)this[J]===void 0&&typeof g[J]=="function"&&(this[J]=function(Ie){return function(){return g[Ie].apply(g,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)g.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),v&&(v=!1,g.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=OA()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),te._fromList=I,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function I(g,p){if(p.length===0)return null;var _;return p.objectMode?_=p.buffer.shift():!g||g>=p.length?(p.decoder?_=p.buffer.join(""):p.buffer.length===1?_=p.buffer.first():_=p.buffer.concat(p.length),p.buffer.clear()):_=p.buffer.consume(g,p.decoder),_}function q(g){var p=g._readableState;l("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,$.dist.process.nextTick(oe,p,g))}function oe(g,p){if(l("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,p.readable=!1,p.emit("end"),g.autoDestroy)){var _=p._writableState;(!_||_.autoDestroy&&_.finished)&&p.destroy()}}typeof Symbol=="function"&&(te.from=function(g,p){return E===void 0&&(E=PA()),E(te,g,p)});function ye(g,p){for(var _=0,v=g.length;_<v;_++)if(g[_]===p)return _;return-1}return Ml}var v_=Yn,Tu=Ki.codes,CA=Tu.ERR_METHOD_NOT_IMPLEMENTED,LA=Tu.ERR_MULTIPLE_CALLBACK,$A=Tu.ERR_TRANSFORM_ALREADY_TRANSFORMING,BA=Tu.ERR_TRANSFORM_WITH_LENGTH_0,Iu=Co();$.requireInherits_browser()(Yn,Iu);function NA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new LA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Yn(e){if(!(this instanceof Yn))return new Yn(e);Iu.call(this,e),this._transformState={afterTransform:NA.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",MA)}function MA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){lp(e,t,r)}):lp(this,null,null)}Yn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Iu.prototype.push.call(this,e,t)};Yn.prototype._transform=function(e,t,r){r(new CA("_transform()"))};Yn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Yn.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};Yn.prototype._destroy=function(e,t){Iu.prototype._destroy.call(this,e,function(r){t(r)})};function lp(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new BA;if(e._transformState.transforming)throw new $A;return e.push(null)}var xA=Is,S_=v_;$.requireInherits_browser()(Is,S_);function Is(e){if(!(this instanceof Is))return new Is(e);S_.call(this,e)}Is.prototype._transform=function(e,t,r){r(null,e)};var xl;function DA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var R_=Ki.codes,jA=R_.ERR_MISSING_ARGS,UA=R_.ERR_STREAM_DESTROYED;function cp(e){if(e)throw e}function kA(e){return e.setHeader&&typeof e.abort=="function"}function FA(e,t,r,o){o=DA(o);var s=!1;e.on("close",function(){s=!0}),xl===void 0&&(xl=Qc),xl(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,kA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new UA("pipe"))}}}function dp(e){e()}function HA(e,t){return e.pipe(t)}function WA(e){return!e.length||typeof e[e.length-1]!="function"?cp:e.pop()}function qA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=WA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new jA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,c=h>0;return FA(f,l,c,function(b){s||(s=b),b&&u.forEach(dp),!l&&(u.forEach(dp),o(s))})});return t.reduce(HA)}var GA=qA;(function(e,t){t=e.exports=E_(),t.Stream=t,t.Readable=t,t.Writable=w_(),t.Duplex=Co(),t.Transform=v_,t.PassThrough=xA,t.finished=Qc,t.pipeline=GA})(ep,ep.exports);var A_={};const hp=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];A_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let T=b^(s<<1|u>>>31),m=w^(u<<1|s>>>31);const L=e[0]^T,P=e[1]^m,O=e[10]^T,M=e[11]^m,B=e[20]^T,S=e[21]^m,E=e[30]^T,U=e[31]^m,Q=e[40]^T,ce=e[41]^m;T=r^(f<<1|h>>>31),m=o^(h<<1|f>>>31);const ue=e[2]^T,te=e[3]^m,Se=e[12]^T,me=e[13]^m,H=e[22]^T,k=e[23]^m,x=e[32]^T,G=e[33]^m,Y=e[42]^T,V=e[43]^m;T=s^(l<<1|c>>>31),m=u^(c<<1|l>>>31);const ne=e[4]^T,W=e[5]^m,K=e[14]^T,ae=e[15]^m,de=e[24]^T,re=e[25]^m,_e=e[34]^T,be=e[35]^m,R=e[44]^T,I=e[45]^m;T=f^(b<<1|w>>>31),m=h^(w<<1|b>>>31);const q=e[6]^T,oe=e[7]^m,ye=e[16]^T,g=e[17]^m,p=e[26]^T,_=e[27]^m,v=e[36]^T,J=e[37]^m,ie=e[46]^T,se=e[47]^m;T=l^(r<<1|o>>>31),m=c^(o<<1|r>>>31);const Ie=e[8]^T,$e=e[9]^m,Pe=e[18]^T,je=e[19]^m,Re=e[28]^T,Fe=e[29]^m,pt=e[38]^T,Qe=e[39]^m,bt=e[48]^T,Je=e[49]^m,Ge=L,xt=P,Pt=M<<4|O>>>28,st=O<<4|M>>>28,Lt=B<<3|S>>>29,lr=S<<3|B>>>29,er=U<<9|E>>>23,Ut=E<<9|U>>>23,cr=Q<<18|ce>>>14,zr=ce<<18|Q>>>14,Kr=ue<<1|te>>>31,an=te<<1|ue>>>31,un=me<<12|Se>>>20,tr=Se<<12|me>>>20,Pr=H<<10|k>>>22,rr=k<<10|H>>>22,Ln=G<<13|x>>>19,Jr=x<<13|G>>>19,fn=Y<<2|V>>>30,N=V<<2|Y>>>30,j=W<<30|ne>>>2,Ee=ne<<30|W>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,_t=re<<11|de>>>21,vt=de<<11|re>>>21,ln=_e<<15|be>>>17,Ct=be<<15|_e>>>17,cn=I<<29|R>>>3,$n=R<<29|I>>>3,dn=q<<28|oe>>>4,hn=oe<<28|q>>>4,Yr=g<<23|ye>>>9,qt=ye<<23|g>>>9,Cr=p<<25|_>>>7,wr=_<<25|p>>>7,nr=v<<21|J>>>11,kt=J<<21|v>>>11,Ii=se<<24|ie>>>8,Oi=ie<<24|se>>>8,Bn=Ie<<27|$e>>>5,gn=$e<<27|Ie>>>5,pn=Pe<<20|je>>>12,Lr=je<<20|Pe>>>12,Pi=Fe<<7|Re>>>25,bn=Re<<7|Fe>>>25,ri=pt<<8|Qe>>>24,ni=Qe<<8|pt>>>24,ii=bt<<14|Je>>>18,oi=Je<<14|bt>>>18;e[0]=Ge^~un&_t,e[1]=xt^~tr&vt,e[10]=dn^~pn&Lt,e[11]=hn^~Lr&lr,e[20]=Kr^~ve&Cr,e[21]=an^~Te&wr,e[30]=Bn^~Pt&Pr,e[31]=gn^~st&rr,e[40]=j^~Yr&Pi,e[41]=Ee^~qt&bn,e[2]=un^~_t&nr,e[3]=tr^~vt&kt,e[12]=pn^~Lt&Ln,e[13]=Lr^~lr&Jr,e[22]=ve^~Cr&ri,e[23]=Te^~wr&ni,e[32]=Pt^~Pr&ln,e[33]=st^~rr&Ct,e[42]=Yr^~Pi&er,e[43]=qt^~bn&Ut,e[4]=_t^~nr&ii,e[5]=vt^~kt&oi,e[14]=Lt^~Ln&cn,e[15]=lr^~Jr&$n,e[24]=Cr^~ri&cr,e[25]=wr^~ni&zr,e[34]=Pr^~ln&Ii,e[35]=rr^~Ct&Oi,e[44]=Pi^~er&fn,e[45]=bn^~Ut&N,e[6]=nr^~ii&Ge,e[7]=kt^~oi&xt,e[16]=Ln^~cn&dn,e[17]=Jr^~$n&hn,e[26]=ri^~cr&Kr,e[27]=ni^~zr&an,e[36]=ln^~Ii&Bn,e[37]=Ct^~Oi&gn,e[46]=er^~fn&j,e[47]=Ut^~N&Ee,e[8]=ii^~Ge&un,e[9]=oi^~xt&tr,e[18]=cn^~dn&pn,e[19]=$n^~hn&Lr,e[28]=cr^~Kr&ve,e[29]=zr^~an&Te,e[38]=Ii^~Bn&Pt,e[39]=Oi^~gn&st,e[48]=fn^~j&Yr,e[49]=N^~Ee&qt,e[0]^=hp[t*2],e[1]^=hp[t*2+1]}};const gu=A_;function Ms(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Ms.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Ms.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(gu.p1600(this.state),this.count=0)};Ms.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&gu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),gu.p1600(this.state),this.count=0,this.squeezing=!0};Ms.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=$.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(gu.p1600(this.state),this.count=0);return t};Ms.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var VA=zA;function zA(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const KA=$.getDefaultExportFromCjs(VA);var Rc={exports:{}},Dl,gp;function JA(){if(gp)return Dl;gp=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Dl=function(b,w){w=w||{};var T=typeof b;if(T==="string"&&b.length>0)return f(b);if(T==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var T=parseFloat(w[1]),m=(w[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return T*u;case"weeks":case"week":case"w":return T*s;case"days":case"day":case"d":return T*o;case"hours":case"hour":case"hrs":case"hr":case"h":return T*r;case"minutes":case"minute":case"mins":case"min":case"m":return T*t;case"seconds":case"second":case"secs":case"sec":case"s":return T*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return T;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?c(b,w,o,"day"):w>=r?c(b,w,r,"hour"):w>=t?c(b,w,t,"minute"):w>=e?c(b,w,e,"second"):b+" ms"}function c(b,w,T,m){var L=w>=T*1.5;return Math.round(b/T)+" "+m+(L?"s":"")}return Dl}function YA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=JA(),r.destroy=c,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let T=0;T<b.length;T++)w=(w<<5)-w+b.charCodeAt(T),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,T=null,m,L;function P(...O){if(!P.enabled)return;const M=P,B=Number(new Date),S=B-(w||B);M.diff=S,M.prev=w,M.curr=B,w=B,O[0]=r.coerce(O[0]),typeof O[0]!="string"&&O.unshift("%O");let E=0;O[0]=O[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";E++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=O[E];Q=ue.call(M,te),O.splice(E,1),E--}return Q}),r.formatArgs.call(M,O),(M.log||r.log).apply(M,O)}return P.namespace=b,P.useColors=r.useColors(),P.color=r.selectColor(b),P.extend=o,P.destroy=r.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>T!==null?T:(m!==r.namespaces&&(m=r.namespaces,L=r.enabled(b)),L),set:O=>{T=O}}),typeof r.init=="function"&&r.init(P),P}function o(b,w){const T=r(this.namespace+(typeof w>"u"?":":w)+b);return T.log=this.log,T}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const T of w)T[0]==="-"?r.skips.push(T.slice(1)):r.names.push(T)}function u(b,w){let T=0,m=0,L=-1,P=0;for(;T<b.length;)if(m<w.length&&(w[m]===b[T]||w[m]==="*"))w[m]==="*"?(L=m,P=T,m++):(T++,m++);else if(L!==-1)m=L+1,P++,T=P;else return!1;for(;m<w.length&&w[m]==="*";)m++;return m===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var XA=YA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,T=>{T!=="%%"&&(b++,T==="%c"&&(w=b))}),l.splice(w,0,c)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof $.dist.process<"u"&&"env"in $.dist.process&&(l=$.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=XA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Rc,Rc.exports);var ZA=Rc.exports,nn={},vi={},ed=Os;Os.default=Os;Os.stable=O_;Os.stableStringify=O_;var pu="[...]",T_="[Circular]",qi=[],Hi=[];function I_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Os(e,t,r,o){typeof o>"u"&&(o=I_()),Ac(e,"",0,[],void 0,0,o);var s;try{Hi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,P_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var u=qi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function To(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),qi.push([o,r,t,s])):Hi.push([t,r,e]):(o[r]=e,qi.push([o,r,t]))}function Ac(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){To(T_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){To(pu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){To(pu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)Ac(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var c=l[h];Ac(e[c],c,h,o,e,u,f)}}o.pop()}}function QA(e,t){return e<t?-1:e>t?1:0}function O_(e,t,r,o){typeof o>"u"&&(o=I_());var s=Tc(e,"",0,[],void 0,0,o)||e,u;try{Hi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,P_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var f=qi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function Tc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){To(T_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){To(pu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){To(pu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)Tc(e[h],h,h,o,e,u,f);else{var l={},c=Object.keys(e).sort(QA);for(h=0;h<c.length;h++){var b=c[h];Tc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")qi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function P_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Hi.length>0)for(var o=0;o<Hi.length;o++){var s=Hi[o];if(s[1]===t&&s[0]===r){r=s[2],Hi.splice(o,1);break}}return e.call(this,t,r)}}const eT=$.getDefaultExportFromCjs(ed);Object.defineProperty(vi,"__esModule",{value:!0});vi.EthereumProviderError=vi.EthereumRpcError=void 0;const tT=ed;class C_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return tT.default(this.serialize(),iT,2)}}vi.EthereumRpcError=C_;let rT=class extends C_{constructor(t,r,o){if(!nT(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};vi.EthereumProviderError=rT;function nT(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function iT(e,t){if(t!=="[Circular]")return t}var td={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.errorValues=Si.errorCodes=void 0;Si.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Si.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Si,r=vi,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(T,m=s){if(Number.isInteger(T)){const L=T.toString();if(w(t.errorValues,L))return t.errorValues[L].message;if(c(T))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return m}e.getMessageFromCode=f;function h(T){if(!Number.isInteger(T))return!1;const m=T.toString();return!!(t.errorValues[m]||c(T))}e.isValidCode=h;function l(T,{fallbackError:m=u,shouldIncludeStack:L=!1}={}){var P,O;if(!m||!Number.isInteger(m.code)||typeof m.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(T instanceof r.EthereumRpcError)return T.serialize();const M={};if(T&&typeof T=="object"&&!Array.isArray(T)&&w(T,"code")&&h(T.code)){const S=T;M.code=S.code,S.message&&typeof S.message=="string"?(M.message=S.message,w(S,"data")&&(M.data=S.data)):(M.message=f(M.code),M.data={originalError:b(T)})}else{M.code=m.code;const S=(P=T)===null||P===void 0?void 0:P.message;M.message=S&&typeof S=="string"?S:m.message,M.data={originalError:b(T)}}const B=(O=T)===null||O===void 0?void 0:O.stack;return L&&T&&B&&typeof B=="string"&&(M.stack=B),M}e.serializeError=l;function c(T){return T>=-32099&&T<=-32e3}function b(T){return T&&typeof T=="object"&&!Array.isArray(T)?Object.assign({},T):T}function w(T,m){return Object.prototype.hasOwnProperty.call(T,m)}})(td);var Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.ethErrors=void 0;const rd=vi,L_=td,Jt=Si;Ou.ethErrors={rpc:{parse:e=>Ur(Jt.errorCodes.rpc.parse,e),invalidRequest:e=>Ur(Jt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ur(Jt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ur(Jt.errorCodes.rpc.methodNotFound,e),internal:e=>Ur(Jt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ur(t,e)},invalidInput:e=>Ur(Jt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ur(Jt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ur(Jt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ur(Jt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ur(Jt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ur(Jt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>gs(Jt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>gs(Jt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>gs(Jt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>gs(Jt.errorCodes.provider.disconnected,e),chainDisconnected:e=>gs(Jt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new rd.EthereumProviderError(t,r,o)}}};function Ur(e,t){const[r,o]=$_(t);return new rd.EthereumRpcError(e,r||L_.getMessageFromCode(e),o)}function gs(e,t){const[r,o]=$_(t);return new rd.EthereumProviderError(e,r||L_.getMessageFromCode(e),o)}function $_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=vi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=td;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Ou;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=Si;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(nn);var oT={exports:{}},jl={exports:{}};let sT=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./index-Br4OTc1S.js"),hA=require("./events-CjPLRE-d.js");var ep={exports:{}},p_=$.requireEvents().EventEmitter,Cl,tp;function gA(){if(tp)return Cl;tp=1;function e(L,P){var O=Object.keys(L);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(L);P&&(M=M.filter(function(B){return Object.getOwnPropertyDescriptor(L,B).enumerable})),O.push.apply(O,M)}return O}function t(L){for(var P=1;P<arguments.length;P++){var O=arguments[P]!=null?arguments[P]:{};P%2?e(Object(O),!0).forEach(function(M){r(L,M,O[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach(function(M){Object.defineProperty(L,M,Object.getOwnPropertyDescriptor(O,M))})}return L}function r(L,P,O){return P=f(P),P in L?Object.defineProperty(L,P,{value:O,enumerable:!0,configurable:!0,writable:!0}):L[P]=O,L}function o(L,P){if(!(L instanceof P))throw new TypeError("Cannot call a class as a function")}function s(L,P){for(var O=0;O<P.length;O++){var M=P[O];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(L,f(M.key),M)}}function u(L,P,O){return s(L.prototype,P),Object.defineProperty(L,"prototype",{writable:!1}),L}function f(L){var P=h(L,"string");return typeof P=="symbol"?P:String(P)}function h(L,P){if(typeof L!="object"||L===null)return L;var O=L[Symbol.toPrimitive];if(O!==void 0){var M=O.call(L,P);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)}var l=$.bufferPolyfill,c=l.Buffer,b=$.require$$3,w=b.inspect,T=w&&w.custom||"inspect";function m(L,P,O){c.prototype.copy.call(L,P,O)}return Cl=function(){function L(){o(this,L),this.head=null,this.tail=null,this.length=0}return u(L,[{key:"push",value:function(O){var M={data:O,next:null};this.length>0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(O){var M={data:O,next:this.head};this.length===0&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(this.length!==0){var O=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,O}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(O){if(this.length===0)return"";for(var M=this.head,B=""+M.data;M=M.next;)B+=O+M.data;return B}},{key:"concat",value:function(O){if(this.length===0)return c.alloc(0);for(var M=c.allocUnsafe(O>>>0),B=this.head,S=0;B;)m(B.data,M,S),S+=B.data.length,B=B.next;return M}},{key:"consume",value:function(O,M){var B;return O<this.head.data.length?(B=this.head.data.slice(0,O),this.head.data=this.head.data.slice(O)):O===this.head.data.length?B=this.shift():B=M?this._getString(O):this._getBuffer(O),B}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(O){var M=this.head,B=1,S=M.data;for(O-=S.length;M=M.next;){var E=M.data,U=O>E.length?E.length:O;if(U===E.length?S+=E:S+=E.slice(0,O),O-=U,O===0){U===E.length?(++B,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=E.slice(U));break}++B}return this.length-=B,S}},{key:"_getBuffer",value:function(O){var M=c.allocUnsafe(O),B=this.head,S=1;for(B.data.copy(M),O-=B.data.length;B=B.next;){var E=B.data,U=O>E.length?E.length:O;if(E.copy(M,M.length-O,0,U),O-=U,O===0){U===E.length?(++S,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=E.slice(U));break}++S}return this.length-=S,M}},{key:T,value:function(O,M){return w(this,t(t({},M),{},{depth:0,customInspect:!1}))}}]),L}(),Cl}function pA(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,$.dist.process.nextTick(Sc,this,e)):$.dist.process.nextTick(Sc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?$.dist.process.nextTick(uu,r):(r._writableState.errorEmitted=!0,$.dist.process.nextTick(rp,r,u)):$.dist.process.nextTick(rp,r,u):t?($.dist.process.nextTick(uu,r),t(u)):$.dist.process.nextTick(uu,r)}),this)}function rp(e,t){Sc(e,t),uu(e)}function uu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function bA(){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 Sc(e,t){e.emit("error",t)}function _A(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var b_={destroy:pA,undestroy:bA,errorOrDestroy:_A},Ki={};function yA(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var __={};function qr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){yA(f,u);function f(h,l,c){return u.call(this,o(h,l,c))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,__[e]=s}function np(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function wA(e,t,r){return e.substr(0,t.length)===t}function mA(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function EA(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}qr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&wA(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(mA(e," argument"))s="The ".concat(e," ").concat(o," ").concat(np(t,"type"));else{var u=EA(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(np(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);qr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});qr("ERR_STREAM_PREMATURE_CLOSE","Premature close");qr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});qr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qr("ERR_STREAM_WRITE_AFTER_END","write after end");qr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);qr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ki.codes=__;var vA=Ki.codes.ERR_INVALID_OPT_VALUE;function SA(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function RA(e,t,r,o){var s=SA(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new vA(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var y_={getHighWaterMark:RA},Ll,ip;function w_(){if(ip)return Ll;ip=1,Ll=ue;function e(R){var I=this;this.next=null,this.entry=null,this.finish=function(){be(I,R)}}var t;ue.WritableState=Q;var r={deprecate:$.requireBrowser()},o=p_,s=$.bufferPolyfill.Buffer,u=(typeof $.commonjsGlobal<"u"?$.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=b_,c=y_,b=c.getHighWaterMark,w=Ki.codes,T=w.ERR_INVALID_ARG_TYPE,m=w.ERR_METHOD_NOT_IMPLEMENTED,L=w.ERR_MULTIPLE_CALLBACK,P=w.ERR_STREAM_CANNOT_PIPE,O=w.ERR_STREAM_DESTROYED,M=w.ERR_STREAM_NULL_VALUES,B=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;$.requireInherits_browser()(ue,o);function U(){}function Q(R,I,q){t=t||Co(),R=R||{},typeof q!="boolean"&&(q=I instanceof t),this.objectMode=!!R.objectMode,q&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(I,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var I=this.bufferedRequest,q=[];I;)q.push(I),I=I.next;return q},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(I){return ce.call(this,I)?!0:this!==ue?!1:I&&I._writableState instanceof Q}})):ce=function(I){return I instanceof this};function ue(R){t=t||Co();var I=this instanceof t;if(!I&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,I),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){E(this,new P)};function te(R,I){var q=new B;E(R,q),$.dist.process.nextTick(I,q)}function Se(R,I,q,oe){var ye;return q===null?ye=new M:typeof q!="string"&&!I.objectMode&&(ye=new T("chunk",["string","Buffer"],q)),ye?(E(R,ye),$.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,I,q){var oe=this._writableState,ye=!1,g=!oe.objectMode&&h(R);return g&&!s.isBuffer(R)&&(R=f(R)),typeof I=="function"&&(q=I,I=null),g?I="buffer":I||(I=oe.defaultEncoding),typeof q!="function"&&(q=U),oe.ending?te(this,q):(g||Se(this,oe,R,q))&&(oe.pendingcb++,ye=H(this,oe,g,R,I,q)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&W(this,R))},ue.prototype.setDefaultEncoding=function(I){if(typeof I=="string"&&(I=I.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((I+"").toLowerCase())>-1))throw new S(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,I,q){return!R.objectMode&&R.decodeStrings!==!1&&typeof I=="string"&&(I=s.from(I,q)),I}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(R,I,q,oe,ye,g){if(!q){var p=me(I,oe,ye);oe!==p&&(q=!0,ye="buffer",oe=p)}var _=I.objectMode?1:oe.length;I.length+=_;var v=I.length<I.highWaterMark;if(v||(I.needDrain=!0),I.writing||I.corked){var J=I.lastBufferedRequest;I.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:q,callback:g,next:null},J?J.next=I.lastBufferedRequest:I.bufferedRequest=I.lastBufferedRequest,I.bufferedRequestCount+=1}else k(R,I,!1,_,oe,ye,g);return v}function k(R,I,q,oe,ye,g,p){I.writelen=oe,I.writecb=p,I.writing=!0,I.sync=!0,I.destroyed?I.onwrite(new O("write")):q?R._writev(ye,I.onwrite):R._write(ye,g,I.onwrite),I.sync=!1}function x(R,I,q,oe,ye){--I.pendingcb,q?($.dist.process.nextTick(ye,oe),$.dist.process.nextTick(re,R,I),R._writableState.errorEmitted=!0,E(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,E(R,oe),re(R,I))}function G(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,I){var q=R._writableState,oe=q.sync,ye=q.writecb;if(typeof ye!="function")throw new L;if(G(q),I)x(R,q,oe,I,ye);else{var g=K(q)||R.destroyed;!g&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&W(R,q),oe?$.dist.process.nextTick(V,R,q,g,ye):V(R,q,g,ye)}}function V(R,I,q,oe){q||ne(R,I),I.pendingcb--,oe(),re(R,I)}function ne(R,I){I.length===0&&I.needDrain&&(I.needDrain=!1,R.emit("drain"))}function W(R,I){I.bufferProcessing=!0;var q=I.bufferedRequest;if(R._writev&&q&&q.next){var oe=I.bufferedRequestCount,ye=new Array(oe),g=I.corkedRequestsFree;g.entry=q;for(var p=0,_=!0;q;)ye[p]=q,q.isBuf||(_=!1),q=q.next,p+=1;ye.allBuffers=_,k(R,I,!0,I.length,ye,"",g.finish),I.pendingcb++,I.lastBufferedRequest=null,g.next?(I.corkedRequestsFree=g.next,g.next=null):I.corkedRequestsFree=new e(I),I.bufferedRequestCount=0}else{for(;q;){var v=q.chunk,J=q.encoding,ie=q.callback,se=I.objectMode?1:v.length;if(k(R,I,!1,se,v,J,ie),q=q.next,I.bufferedRequestCount--,I.writing)break}q===null&&(I.lastBufferedRequest=null)}I.bufferedRequest=q,I.bufferProcessing=!1}ue.prototype._write=function(R,I,q){q(new m("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,I,q){var oe=this._writableState;return typeof R=="function"?(q=R,R=null,I=null):typeof I=="function"&&(q=I,I=null),R!=null&&this.write(R,I),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,q),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,I){R._final(function(q){I.pendingcb--,q&&E(R,q),I.prefinished=!0,R.emit("prefinish"),re(R,I)})}function de(R,I){!I.prefinished&&!I.finalCalled&&(typeof R._final=="function"&&!I.destroyed?(I.pendingcb++,I.finalCalled=!0,$.dist.process.nextTick(ae,R,I)):(I.prefinished=!0,R.emit("prefinish")))}function re(R,I){var q=K(I);if(q&&(de(R,I),I.pendingcb===0&&(I.finished=!0,R.emit("finish"),I.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return q}function _e(R,I,q){I.ending=!0,re(R,I),q&&(I.finished?$.dist.process.nextTick(q):R.once("finish",q)),I.ended=!0,R.writable=!1}function be(R,I,q){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;I.pendingcb--,ye(q),oe=oe.next}I.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,I){I(R)},Ll}var $l,op;function Co(){if(op)return $l;op=1;var e=Object.keys||function(c){var b=[];for(var w in c)b.push(w);return b};$l=f;var t=E_(),r=w_();$.requireInherits_browser()(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(c){if(!(this instanceof f))return new f(c);t.call(this,c),r.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||$.dist.process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),$l}var sp=Ki.codes.ERR_STREAM_PREMATURE_CLOSE;function AA(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function TA(){}function IA(e){return e.setHeader&&typeof e.abort=="function"}function m_(e,t,r){if(typeof t=="function")return m_(e,null,t);t||(t={}),r=AA(r||TA);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,c=function(){o=!1,l=!0,s||r.call(e)},b=function(L){r.call(e,L)},w=function(){var L;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(L=new sp),r.call(e,L);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(L=new sp),r.call(e,L)},T=function(){e.req.on("finish",h)};return IA(e)?(e.on("complete",h),e.on("abort",w),e.req?T():e.on("request",T)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",c),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",T),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",c),e.removeListener("error",b),e.removeListener("close",w)}}var Qc=m_,Bl,ap;function OA(){if(ap)return Bl;ap=1;var e;function t(S,E,U){return E=r(E),E in S?Object.defineProperty(S,E,{value:U,enumerable:!0,configurable:!0,writable:!0}):S[E]=U,S}function r(S){var E=o(S,"string");return typeof E=="symbol"?E:String(E)}function o(S,E){if(typeof S!="object"||S===null)return S;var U=S[Symbol.toPrimitive];if(U!==void 0){var Q=U.call(S,E||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(S)}var s=Qc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function T(S,E){return{value:S,done:E}}function m(S){var E=S[u];if(E!==null){var U=S[w].read();U!==null&&(S[c]=null,S[u]=null,S[f]=null,E(T(U,!1)))}}function L(S){$.dist.process.nextTick(m,S)}function P(S,E){return function(U,Q){S.then(function(){if(E[l]){U(T(void 0,!0));return}E[b](U,Q)},Q)}}var O=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var E=this,U=this[h];if(U!==null)return Promise.reject(U);if(this[l])return Promise.resolve(T(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){$.dist.process.nextTick(function(){E[h]?Se(E[h]):te(T(void 0,!0))})});var Q=this[c],ce;if(Q)ce=new Promise(P(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(T(ue,!1));ce=new Promise(this[b])}return this[c]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var E=this;return new Promise(function(U,Q){E[w].destroy(null,function(ce){if(ce){Q(ce);return}U(T(void 0,!0))})})}),e),O),B=function(E){var U,Q=Object.create(M,(U={},t(U,w,{value:E,writable:!0}),t(U,u,{value:null,writable:!0}),t(U,f,{value:null,writable:!0}),t(U,h,{value:null,writable:!0}),t(U,l,{value:E._readableState.endEmitted,writable:!0}),t(U,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[c]=null,Q[u]=null,Q[f]=null,ue(T(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),U));return Q[c]=null,s(E,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[c]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[c]=null,Q[u]=null,Q[f]=null,te(T(void 0,!0))),Q[l]=!0}),E.on("readable",L.bind(null,Q)),Q};return Bl=B,Bl}var Nl,up;function PA(){return up||(up=1,Nl=function(){throw new Error("Readable.from is not available in the browser")}),Nl}var Ml,fp;function E_(){if(fp)return Ml;fp=1,Ml=te;var e;te.ReadableState=ue,$.requireEvents().EventEmitter;var t=function(p,_){return p.listeners(_).length},r=p_,o=$.bufferPolyfill.Buffer,s=(typeof $.commonjsGlobal<"u"?$.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(g){return o.from(g)}function f(g){return o.isBuffer(g)||g instanceof s}var h=$.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var c=gA(),b=b_,w=y_,T=w.getHighWaterMark,m=Ki.codes,L=m.ERR_INVALID_ARG_TYPE,P=m.ERR_STREAM_PUSH_AFTER_EOF,O=m.ERR_METHOD_NOT_IMPLEMENTED,M=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,B,S,E;$.requireInherits_browser()(te,r);var U=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(g,p,_){if(typeof g.prependListener=="function")return g.prependListener(p,_);!g._events||!g._events[p]?g.on(p,_):Array.isArray(g._events[p])?g._events[p].unshift(_):g._events[p]=[_,g._events[p]]}function ue(g,p,_){e=e||Co(),g=g||{},typeof _!="boolean"&&(_=p instanceof e),this.objectMode=!!g.objectMode,_&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=T(this,g,"readableHighWaterMark",_),this.buffer=new c,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(B||(B=$.requireString_decoder().StringDecoder),this.decoder=new B(g.encoding),this.encoding=g.encoding)}function te(g){if(e=e||Co(),!(this instanceof te))return new te(g);var p=this instanceof e;this._readableState=new ue(g,this,p),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(g,p){p(g)},te.prototype.push=function(g,p){var _=this._readableState,v;return _.objectMode?v=!0:typeof g=="string"&&(p=p||_.defaultEncoding,p!==_.encoding&&(g=o.from(g,p),p=""),v=!0),Se(this,g,p,!1,v)},te.prototype.unshift=function(g){return Se(this,g,null,!0,!1)};function Se(g,p,_,v,J){l("readableAddChunk",p);var ie=g._readableState;if(p===null)ie.reading=!1,Y(g,ie);else{var se;if(J||(se=H(ie,p)),se)U(g,se);else if(ie.objectMode||p&&p.length>0)if(typeof p!="string"&&!ie.objectMode&&Object.getPrototypeOf(p)!==o.prototype&&(p=u(p)),v)ie.endEmitted?U(g,new M):me(g,ie,p,!0);else if(ie.ended)U(g,new P);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(p=ie.decoder.write(p),ie.objectMode||p.length!==0?me(g,ie,p,!1):W(g,ie)):me(g,ie,p,!1)}else v||(ie.reading=!1,W(g,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(g,p,_,v){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,g.emit("data",_)):(p.length+=p.objectMode?1:_.length,v?p.buffer.unshift(_):p.buffer.push(_),p.needReadable&&V(g)),W(g,p)}function H(g,p){var _;return!f(p)&&typeof p!="string"&&p!==void 0&&!g.objectMode&&(_=new L("chunk",["string","Buffer","Uint8Array"],p)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(g){B||(B=$.requireString_decoder().StringDecoder);var p=new B(g);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,v="";_!==null;)v+=p.write(_.data),_=_.next;return this._readableState.buffer.clear(),v!==""&&this._readableState.buffer.push(v),this._readableState.length=v.length,this};var k=1073741824;function x(g){return g>=k?g=k:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function G(g,p){return g<=0||p.length===0&&p.ended?0:p.objectMode?1:g!==g?p.flowing&&p.length?p.buffer.head.data.length:p.length:(g>p.highWaterMark&&(p.highWaterMark=x(g)),g<=p.length?g:p.ended?p.length:(p.needReadable=!0,0))}te.prototype.read=function(g){l("read",g),g=parseInt(g,10);var p=this._readableState,_=g;if(g!==0&&(p.emittedReadable=!1),g===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return l("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?q(this):V(this),null;if(g=G(g,p),g===0&&p.ended)return p.length===0&&q(this),null;var v=p.needReadable;l("need readable",v),(p.length===0||p.length-g<p.highWaterMark)&&(v=!0,l("length less than watermark",v)),p.ended||p.reading?(v=!1,l("reading or ended",v)):v&&(l("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(g=G(_,p)));var J;return g>0?J=I(g,p):J=null,J===null?(p.needReadable=p.length<=p.highWaterMark,g=0):(p.length-=g,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),_!==g&&p.ended&&q(this)),J!==null&&this.emit("data",J),J};function Y(g,p){if(l("onEofChunk"),!p.ended){if(p.decoder){var _=p.decoder.end();_&&_.length&&(p.buffer.push(_),p.length+=p.objectMode?1:_.length)}p.ended=!0,p.sync?V(g):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,ne(g)))}}function V(g){var p=g._readableState;l("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(l("emitReadable",p.flowing),p.emittedReadable=!0,$.dist.process.nextTick(ne,g))}function ne(g){var p=g._readableState;l("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(g.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,R(g)}function W(g,p){p.readingMore||(p.readingMore=!0,$.dist.process.nextTick(K,g,p))}function K(g,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var _=p.length;if(l("maybeReadMore read 0"),g.read(0),_===p.length)break}p.readingMore=!1}te.prototype._read=function(g){U(this,new O("_read()"))},te.prototype.pipe=function(g,p){var _=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=g;break;case 1:v.pipes=[v.pipes,g];break;default:v.pipes.push(g);break}v.pipesCount+=1,l("pipe count=%d opts=%j",v.pipesCount,p);var J=(!p||p.end!==!1)&&g!==$.dist.process.stdout&&g!==$.dist.process.stderr,ie=J?Ie:bt;v.endEmitted?$.dist.process.nextTick(ie):_.once("end",ie),g.on("unpipe",se);function se(Je,Ge){l("onunpipe"),Je===_&&Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,je())}function Ie(){l("onend"),g.end()}var $e=ae(_);g.on("drain",$e);var Pe=!1;function je(){l("cleanup"),g.removeListener("close",pt),g.removeListener("finish",Qe),g.removeListener("drain",$e),g.removeListener("error",Fe),g.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",bt),_.removeListener("data",Re),Pe=!0,v.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&$e()}_.on("data",Re);function Re(Je){l("ondata");var Ge=g.write(Je);l("dest.write",Ge),Ge===!1&&((v.pipesCount===1&&v.pipes===g||v.pipesCount>1&&ye(v.pipes,g)!==-1)&&!Pe&&(l("false write response, pause",v.awaitDrain),v.awaitDrain++),_.pause())}function Fe(Je){l("onerror",Je),bt(),g.removeListener("error",Fe),t(g,"error")===0&&U(g,Je)}ce(g,"error",Fe);function pt(){g.removeListener("finish",Qe),bt()}g.once("close",pt);function Qe(){l("onfinish"),g.removeListener("close",pt),bt()}g.once("finish",Qe);function bt(){l("unpipe"),_.unpipe(g)}return g.emit("pipe",_),v.flowing||(l("pipe resume"),_.resume()),g};function ae(g){return function(){var _=g._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(g,"data")&&(_.flowing=!0,R(g))}}te.prototype.unpipe=function(g){var p=this._readableState,_={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return g&&g!==p.pipes?this:(g||(g=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,g&&g.emit("unpipe",this,_),this);if(!g){var v=p.pipes,J=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ie=0;ie<J;ie++)v[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(p.pipes,g);return se===-1?this:(p.pipes.splice(se,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),g.emit("unpipe",this,_),this)},te.prototype.on=function(g,p){var _=r.prototype.on.call(this,g,p),v=this._readableState;return g==="data"?(v.readableListening=this.listenerCount("readable")>0,v.flowing!==!1&&this.resume()):g==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,l("on readable",v.length,v.reading),v.length?V(this):v.reading||$.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(g,p){var _=r.prototype.removeListener.call(this,g,p);return g==="readable"&&$.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(g){var p=r.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&$.dist.process.nextTick(de,this),p};function de(g){var p=g._readableState;p.readableListening=g.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:g.listenerCount("data")>0&&g.resume()}function re(g){l("readable nexttick read 0"),g.read(0)}te.prototype.resume=function(){var g=this._readableState;return g.flowing||(l("resume"),g.flowing=!g.readableListening,_e(this,g)),g.paused=!1,this};function _e(g,p){p.resumeScheduled||(p.resumeScheduled=!0,$.dist.process.nextTick(be,g,p))}function be(g,p){l("resume",p.reading),p.reading||g.read(0),p.resumeScheduled=!1,g.emit("resume"),R(g),p.flowing&&!p.reading&&g.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(g){var p=g._readableState;for(l("flow",p.flowing);p.flowing&&g.read()!==null;);}te.prototype.wrap=function(g){var p=this,_=this._readableState,v=!1;g.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&p.push(se)}p.push(null)}),g.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=p.push(se);Ie||(v=!0,g.pause())}});for(var J in g)this[J]===void 0&&typeof g[J]=="function"&&(this[J]=function(Ie){return function(){return g[Ie].apply(g,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)g.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),v&&(v=!1,g.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=OA()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),te._fromList=I,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function I(g,p){if(p.length===0)return null;var _;return p.objectMode?_=p.buffer.shift():!g||g>=p.length?(p.decoder?_=p.buffer.join(""):p.buffer.length===1?_=p.buffer.first():_=p.buffer.concat(p.length),p.buffer.clear()):_=p.buffer.consume(g,p.decoder),_}function q(g){var p=g._readableState;l("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,$.dist.process.nextTick(oe,p,g))}function oe(g,p){if(l("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,p.readable=!1,p.emit("end"),g.autoDestroy)){var _=p._writableState;(!_||_.autoDestroy&&_.finished)&&p.destroy()}}typeof Symbol=="function"&&(te.from=function(g,p){return E===void 0&&(E=PA()),E(te,g,p)});function ye(g,p){for(var _=0,v=g.length;_<v;_++)if(g[_]===p)return _;return-1}return Ml}var v_=Yn,Tu=Ki.codes,CA=Tu.ERR_METHOD_NOT_IMPLEMENTED,LA=Tu.ERR_MULTIPLE_CALLBACK,$A=Tu.ERR_TRANSFORM_ALREADY_TRANSFORMING,BA=Tu.ERR_TRANSFORM_WITH_LENGTH_0,Iu=Co();$.requireInherits_browser()(Yn,Iu);function NA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new LA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Yn(e){if(!(this instanceof Yn))return new Yn(e);Iu.call(this,e),this._transformState={afterTransform:NA.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",MA)}function MA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){lp(e,t,r)}):lp(this,null,null)}Yn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Iu.prototype.push.call(this,e,t)};Yn.prototype._transform=function(e,t,r){r(new CA("_transform()"))};Yn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Yn.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};Yn.prototype._destroy=function(e,t){Iu.prototype._destroy.call(this,e,function(r){t(r)})};function lp(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new BA;if(e._transformState.transforming)throw new $A;return e.push(null)}var xA=Is,S_=v_;$.requireInherits_browser()(Is,S_);function Is(e){if(!(this instanceof Is))return new Is(e);S_.call(this,e)}Is.prototype._transform=function(e,t,r){r(null,e)};var xl;function DA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var R_=Ki.codes,jA=R_.ERR_MISSING_ARGS,UA=R_.ERR_STREAM_DESTROYED;function cp(e){if(e)throw e}function kA(e){return e.setHeader&&typeof e.abort=="function"}function FA(e,t,r,o){o=DA(o);var s=!1;e.on("close",function(){s=!0}),xl===void 0&&(xl=Qc),xl(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,kA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new UA("pipe"))}}}function dp(e){e()}function HA(e,t){return e.pipe(t)}function WA(e){return!e.length||typeof e[e.length-1]!="function"?cp:e.pop()}function qA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=WA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new jA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,c=h>0;return FA(f,l,c,function(b){s||(s=b),b&&u.forEach(dp),!l&&(u.forEach(dp),o(s))})});return t.reduce(HA)}var GA=qA;(function(e,t){t=e.exports=E_(),t.Stream=t,t.Readable=t,t.Writable=w_(),t.Duplex=Co(),t.Transform=v_,t.PassThrough=xA,t.finished=Qc,t.pipeline=GA})(ep,ep.exports);var A_={};const hp=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];A_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let T=b^(s<<1|u>>>31),m=w^(u<<1|s>>>31);const L=e[0]^T,P=e[1]^m,O=e[10]^T,M=e[11]^m,B=e[20]^T,S=e[21]^m,E=e[30]^T,U=e[31]^m,Q=e[40]^T,ce=e[41]^m;T=r^(f<<1|h>>>31),m=o^(h<<1|f>>>31);const ue=e[2]^T,te=e[3]^m,Se=e[12]^T,me=e[13]^m,H=e[22]^T,k=e[23]^m,x=e[32]^T,G=e[33]^m,Y=e[42]^T,V=e[43]^m;T=s^(l<<1|c>>>31),m=u^(c<<1|l>>>31);const ne=e[4]^T,W=e[5]^m,K=e[14]^T,ae=e[15]^m,de=e[24]^T,re=e[25]^m,_e=e[34]^T,be=e[35]^m,R=e[44]^T,I=e[45]^m;T=f^(b<<1|w>>>31),m=h^(w<<1|b>>>31);const q=e[6]^T,oe=e[7]^m,ye=e[16]^T,g=e[17]^m,p=e[26]^T,_=e[27]^m,v=e[36]^T,J=e[37]^m,ie=e[46]^T,se=e[47]^m;T=l^(r<<1|o>>>31),m=c^(o<<1|r>>>31);const Ie=e[8]^T,$e=e[9]^m,Pe=e[18]^T,je=e[19]^m,Re=e[28]^T,Fe=e[29]^m,pt=e[38]^T,Qe=e[39]^m,bt=e[48]^T,Je=e[49]^m,Ge=L,xt=P,Pt=M<<4|O>>>28,st=O<<4|M>>>28,Lt=B<<3|S>>>29,lr=S<<3|B>>>29,er=U<<9|E>>>23,Ut=E<<9|U>>>23,cr=Q<<18|ce>>>14,zr=ce<<18|Q>>>14,Kr=ue<<1|te>>>31,an=te<<1|ue>>>31,un=me<<12|Se>>>20,tr=Se<<12|me>>>20,Pr=H<<10|k>>>22,rr=k<<10|H>>>22,Ln=G<<13|x>>>19,Jr=x<<13|G>>>19,fn=Y<<2|V>>>30,N=V<<2|Y>>>30,j=W<<30|ne>>>2,Ee=ne<<30|W>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,_t=re<<11|de>>>21,vt=de<<11|re>>>21,ln=_e<<15|be>>>17,Ct=be<<15|_e>>>17,cn=I<<29|R>>>3,$n=R<<29|I>>>3,dn=q<<28|oe>>>4,hn=oe<<28|q>>>4,Yr=g<<23|ye>>>9,qt=ye<<23|g>>>9,Cr=p<<25|_>>>7,wr=_<<25|p>>>7,nr=v<<21|J>>>11,kt=J<<21|v>>>11,Ii=se<<24|ie>>>8,Oi=ie<<24|se>>>8,Bn=Ie<<27|$e>>>5,gn=$e<<27|Ie>>>5,pn=Pe<<20|je>>>12,Lr=je<<20|Pe>>>12,Pi=Fe<<7|Re>>>25,bn=Re<<7|Fe>>>25,ri=pt<<8|Qe>>>24,ni=Qe<<8|pt>>>24,ii=bt<<14|Je>>>18,oi=Je<<14|bt>>>18;e[0]=Ge^~un&_t,e[1]=xt^~tr&vt,e[10]=dn^~pn&Lt,e[11]=hn^~Lr&lr,e[20]=Kr^~ve&Cr,e[21]=an^~Te&wr,e[30]=Bn^~Pt&Pr,e[31]=gn^~st&rr,e[40]=j^~Yr&Pi,e[41]=Ee^~qt&bn,e[2]=un^~_t&nr,e[3]=tr^~vt&kt,e[12]=pn^~Lt&Ln,e[13]=Lr^~lr&Jr,e[22]=ve^~Cr&ri,e[23]=Te^~wr&ni,e[32]=Pt^~Pr&ln,e[33]=st^~rr&Ct,e[42]=Yr^~Pi&er,e[43]=qt^~bn&Ut,e[4]=_t^~nr&ii,e[5]=vt^~kt&oi,e[14]=Lt^~Ln&cn,e[15]=lr^~Jr&$n,e[24]=Cr^~ri&cr,e[25]=wr^~ni&zr,e[34]=Pr^~ln&Ii,e[35]=rr^~Ct&Oi,e[44]=Pi^~er&fn,e[45]=bn^~Ut&N,e[6]=nr^~ii&Ge,e[7]=kt^~oi&xt,e[16]=Ln^~cn&dn,e[17]=Jr^~$n&hn,e[26]=ri^~cr&Kr,e[27]=ni^~zr&an,e[36]=ln^~Ii&Bn,e[37]=Ct^~Oi&gn,e[46]=er^~fn&j,e[47]=Ut^~N&Ee,e[8]=ii^~Ge&un,e[9]=oi^~xt&tr,e[18]=cn^~dn&pn,e[19]=$n^~hn&Lr,e[28]=cr^~Kr&ve,e[29]=zr^~an&Te,e[38]=Ii^~Bn&Pt,e[39]=Oi^~gn&st,e[48]=fn^~j&Yr,e[49]=N^~Ee&qt,e[0]^=hp[t*2],e[1]^=hp[t*2+1]}};const gu=A_;function Ms(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Ms.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Ms.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(gu.p1600(this.state),this.count=0)};Ms.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&gu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),gu.p1600(this.state),this.count=0,this.squeezing=!0};Ms.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=$.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(gu.p1600(this.state),this.count=0);return t};Ms.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var VA=zA;function zA(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const KA=$.getDefaultExportFromCjs(VA);var Rc={exports:{}},Dl,gp;function JA(){if(gp)return Dl;gp=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Dl=function(b,w){w=w||{};var T=typeof b;if(T==="string"&&b.length>0)return f(b);if(T==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var T=parseFloat(w[1]),m=(w[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return T*u;case"weeks":case"week":case"w":return T*s;case"days":case"day":case"d":return T*o;case"hours":case"hour":case"hrs":case"hr":case"h":return T*r;case"minutes":case"minute":case"mins":case"min":case"m":return T*t;case"seconds":case"second":case"secs":case"sec":case"s":return T*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return T;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?c(b,w,o,"day"):w>=r?c(b,w,r,"hour"):w>=t?c(b,w,t,"minute"):w>=e?c(b,w,e,"second"):b+" ms"}function c(b,w,T,m){var L=w>=T*1.5;return Math.round(b/T)+" "+m+(L?"s":"")}return Dl}function YA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=JA(),r.destroy=c,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let T=0;T<b.length;T++)w=(w<<5)-w+b.charCodeAt(T),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,T=null,m,L;function P(...O){if(!P.enabled)return;const M=P,B=Number(new Date),S=B-(w||B);M.diff=S,M.prev=w,M.curr=B,w=B,O[0]=r.coerce(O[0]),typeof O[0]!="string"&&O.unshift("%O");let E=0;O[0]=O[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";E++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=O[E];Q=ue.call(M,te),O.splice(E,1),E--}return Q}),r.formatArgs.call(M,O),(M.log||r.log).apply(M,O)}return P.namespace=b,P.useColors=r.useColors(),P.color=r.selectColor(b),P.extend=o,P.destroy=r.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>T!==null?T:(m!==r.namespaces&&(m=r.namespaces,L=r.enabled(b)),L),set:O=>{T=O}}),typeof r.init=="function"&&r.init(P),P}function o(b,w){const T=r(this.namespace+(typeof w>"u"?":":w)+b);return T.log=this.log,T}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const T of w)T[0]==="-"?r.skips.push(T.slice(1)):r.names.push(T)}function u(b,w){let T=0,m=0,L=-1,P=0;for(;T<b.length;)if(m<w.length&&(w[m]===b[T]||w[m]==="*"))w[m]==="*"?(L=m,P=T,m++):(T++,m++);else if(L!==-1)m=L+1,P++,T=P;else return!1;for(;m<w.length&&w[m]==="*";)m++;return m===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var XA=YA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,T=>{T!=="%%"&&(b++,T==="%c"&&(w=b))}),l.splice(w,0,c)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof $.dist.process<"u"&&"env"in $.dist.process&&(l=$.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=XA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Rc,Rc.exports);var ZA=Rc.exports,nn={},vi={},ed=Os;Os.default=Os;Os.stable=O_;Os.stableStringify=O_;var pu="[...]",T_="[Circular]",qi=[],Hi=[];function I_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Os(e,t,r,o){typeof o>"u"&&(o=I_()),Ac(e,"",0,[],void 0,0,o);var s;try{Hi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,P_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var u=qi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function To(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),qi.push([o,r,t,s])):Hi.push([t,r,e]):(o[r]=e,qi.push([o,r,t]))}function Ac(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){To(T_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){To(pu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){To(pu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)Ac(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var c=l[h];Ac(e[c],c,h,o,e,u,f)}}o.pop()}}function QA(e,t){return e<t?-1:e>t?1:0}function O_(e,t,r,o){typeof o>"u"&&(o=I_());var s=Tc(e,"",0,[],void 0,0,o)||e,u;try{Hi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,P_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var f=qi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function Tc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){To(T_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){To(pu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){To(pu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)Tc(e[h],h,h,o,e,u,f);else{var l={},c=Object.keys(e).sort(QA);for(h=0;h<c.length;h++){var b=c[h];Tc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")qi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function P_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Hi.length>0)for(var o=0;o<Hi.length;o++){var s=Hi[o];if(s[1]===t&&s[0]===r){r=s[2],Hi.splice(o,1);break}}return e.call(this,t,r)}}const eT=$.getDefaultExportFromCjs(ed);Object.defineProperty(vi,"__esModule",{value:!0});vi.EthereumProviderError=vi.EthereumRpcError=void 0;const tT=ed;class C_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return tT.default(this.serialize(),iT,2)}}vi.EthereumRpcError=C_;let rT=class extends C_{constructor(t,r,o){if(!nT(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};vi.EthereumProviderError=rT;function nT(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function iT(e,t){if(t!=="[Circular]")return t}var td={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.errorValues=Si.errorCodes=void 0;Si.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Si.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Si,r=vi,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(T,m=s){if(Number.isInteger(T)){const L=T.toString();if(w(t.errorValues,L))return t.errorValues[L].message;if(c(T))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return m}e.getMessageFromCode=f;function h(T){if(!Number.isInteger(T))return!1;const m=T.toString();return!!(t.errorValues[m]||c(T))}e.isValidCode=h;function l(T,{fallbackError:m=u,shouldIncludeStack:L=!1}={}){var P,O;if(!m||!Number.isInteger(m.code)||typeof m.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(T instanceof r.EthereumRpcError)return T.serialize();const M={};if(T&&typeof T=="object"&&!Array.isArray(T)&&w(T,"code")&&h(T.code)){const S=T;M.code=S.code,S.message&&typeof S.message=="string"?(M.message=S.message,w(S,"data")&&(M.data=S.data)):(M.message=f(M.code),M.data={originalError:b(T)})}else{M.code=m.code;const S=(P=T)===null||P===void 0?void 0:P.message;M.message=S&&typeof S=="string"?S:m.message,M.data={originalError:b(T)}}const B=(O=T)===null||O===void 0?void 0:O.stack;return L&&T&&B&&typeof B=="string"&&(M.stack=B),M}e.serializeError=l;function c(T){return T>=-32099&&T<=-32e3}function b(T){return T&&typeof T=="object"&&!Array.isArray(T)?Object.assign({},T):T}function w(T,m){return Object.prototype.hasOwnProperty.call(T,m)}})(td);var Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.ethErrors=void 0;const rd=vi,L_=td,Jt=Si;Ou.ethErrors={rpc:{parse:e=>Ur(Jt.errorCodes.rpc.parse,e),invalidRequest:e=>Ur(Jt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ur(Jt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ur(Jt.errorCodes.rpc.methodNotFound,e),internal:e=>Ur(Jt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ur(t,e)},invalidInput:e=>Ur(Jt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ur(Jt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ur(Jt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ur(Jt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ur(Jt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ur(Jt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>gs(Jt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>gs(Jt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>gs(Jt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>gs(Jt.errorCodes.provider.disconnected,e),chainDisconnected:e=>gs(Jt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new rd.EthereumProviderError(t,r,o)}}};function Ur(e,t){const[r,o]=$_(t);return new rd.EthereumRpcError(e,r||L_.getMessageFromCode(e),o)}function gs(e,t){const[r,o]=$_(t);return new rd.EthereumProviderError(e,r||L_.getMessageFromCode(e),o)}function $_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=vi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=td;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Ou;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=Si;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(nn);var oT={exports:{}},jl={exports:{}};let sT=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
|
|
2
2
|
`;super(r),this.name="AggregateError",this.errors=t}};var Et={AggregateError:sT,ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,r){return e.slice(t,r)},Error,FunctionPrototypeCall(e,t,...r){return e.call(t,...r)},FunctionPrototypeSymbolHasInstance(e,t){return 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){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,r){return Object.defineProperty(e,t,r)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,r){return e.then(t,r)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,r){return e.slice(t,r)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return 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){return e.set(t,r)},Boolean,Uint8Array},B_={exports:{}},N_={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,o]){const s=t.shift();return o==="f"?s.toFixed(6):o==="j"?JSON.stringify(s):o==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else 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"{}"}}};const{format:aT,inspect:bu}=N_,{AggregateError:uT}=Et,fT=globalThis.AggregateError||uT,lT=Symbol("kIsNodeError"),cT=["string","function","number","object","Function","Object","boolean","bigint","symbol"],dT=/^([A-Z][a-z0-9]*)+$/,hT="__node_internal_",Pu={};function Wi(e,t){if(!e)throw new Pu.ERR_INTERNAL_ASSERTION(t)}function pp(e){let t="",r=e.length;const o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function gT(e,t,r){if(typeof t=="function")return Wi(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const o=(t.match(/%[dfijoOs]/g)||[]).length;return Wi(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),r.length===0?t:aT(t,...r)}function Wt(e,t,r){r||(r=Error);class o extends r{constructor(...u){super(gT(e,t,u))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.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}}),o.prototype.code=e,o.prototype[lT]=!0,Pu[e]=o}function bp(e){const t=hT+e.name;return Object.defineProperty(e,"name",{value:t}),e}function pT(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new fT([t,e],t.message);return r.code=t.code,r}return e||t}let bT=class extends Error{constructor(t="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Pu.ERR_INVALID_ARG_TYPE("options","Object",r);super(t,r),this.code="ABORT_ERR",this.name="AbortError"}};Wt("ERR_ASSERTION","%s",Error);Wt("ERR_INVALID_ARG_TYPE",(e,t,r)=>{Wi(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let o="The ";e.endsWith(" argument")?o+=`${e} `:o+=`"${e}" ${e.includes(".")?"property":"argument"} `,o+="must be ";const s=[],u=[],f=[];for(const l of t)Wi(typeof l=="string","All expected entries have to be of type string"),cT.includes(l)?s.push(l.toLowerCase()):dT.test(l)?u.push(l):(Wi(l!=="object",'The value "object" should be written as "Object"'),f.push(l));if(u.length>0){const l=s.indexOf("object");l!==-1&&(s.splice(s,l,1),u.push("Object"))}if(s.length>0){switch(s.length){case 1:o+=`of type ${s[0]}`;break;case 2:o+=`one of type ${s[0]} or ${s[1]}`;break;default:{const l=s.pop();o+=`one of type ${s.join(", ")}, or ${l}`}}(u.length>0||f.length>0)&&(o+=" or ")}if(u.length>0){switch(u.length){case 1:o+=`an instance of ${u[0]}`;break;case 2:o+=`an instance of ${u[0]} or ${u[1]}`;break;default:{const l=u.pop();o+=`an instance of ${u.join(", ")}, or ${l}`}}f.length>0&&(o+=" or ")}switch(f.length){case 0:break;case 1:f[0].toLowerCase()!==f[0]&&(o+="an "),o+=`${f[0]}`;break;case 2:o+=`one of ${f[0]} or ${f[1]}`;break;default:{const l=f.pop();o+=`one of ${f.join(", ")}, or ${l}`}}if(r==null)o+=`. Received ${r}`;else if(typeof r=="function"&&r.name)o+=`. Received function ${r.name}`;else if(typeof r=="object"){var h;if((h=r.constructor)!==null&&h!==void 0&&h.name)o+=`. Received an instance of ${r.constructor.name}`;else{const l=bu(r,{depth:-1});o+=`. Received ${l}`}}else{let l=bu(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),o+=`. Received type ${typeof r} (${l})`}return o},TypeError);Wt("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let o=bu(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${o}`},TypeError);Wt("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var o;const s=r!=null&&(o=r.constructor)!==null&&o!==void 0&&o.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${e} to be returned from the "${t}" function but got ${s}.`},TypeError);Wt("ERR_MISSING_ARGS",(...e)=>{Wi(e.length>0,"At least one arg needs to be specified");let t;const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(o=>`"${o}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const o=e.pop();t+=`The ${e.join(", ")}, and ${o} arguments`}break}return`${t} must be specified`},TypeError);Wt("ERR_OUT_OF_RANGE",(e,t,r)=>{Wi(t,'Missing "range" argument');let o;if(Number.isInteger(r)&&Math.abs(r)>2**32)o=pp(String(r));else if(typeof r=="bigint"){o=String(r);const s=BigInt(2)**BigInt(32);(r>s||r<-s)&&(o=pp(o)),o+="n"}else o=bu(r);return`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);Wt("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Wt("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Wt("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Wt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Wt("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Wt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Wt("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Wt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Wt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Wt("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Wt("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var ur={AbortError:bT,aggregateTwoErrors:bp(pT),hideStackFrames:bp,codes:Pu},ps={exports:{}},_p;function Ps(){if(_p)return ps.exports;_p=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return ps.exports=e,ps.exports.AbortSignal=t,ps.exports.default=e,ps.exports}(function(e){const t=$.bufferPolyfill,{format:r,inspect:o}=N_,{codes:{ERR_INVALID_ARG_TYPE:s}}=ur,{kResistStopPropagation:u,AggregateError:f,SymbolDispose:h}=Et,l=globalThis.AbortSignal||Ps().AbortSignal,c=globalThis.AbortController||Ps().AbortController,b=Object.getPrototypeOf(async function(){}).constructor,w=globalThis.Blob||t.Blob,T=typeof w<"u"?function(O){return O instanceof w}:function(O){return!1},m=(P,O)=>{if(P!==void 0&&(P===null||typeof P!="object"||!("aborted"in P)))throw new s(O,"AbortSignal",P)},L=(P,O)=>{if(typeof P!="function")throw new s(O,"Function",P)};e.exports={AggregateError:f,kEmptyObject:Object.freeze({}),once(P){let O=!1;return function(...M){O||(O=!0,P.apply(this,M))}},createDeferredPromise:function(){let P,O;return{promise:new Promise((B,S)=>{P=B,O=S}),resolve:P,reject:O}},promisify(P){return new Promise((O,M)=>{P((B,...S)=>B?M(B):O(...S))})},debuglog(){return function(){}},format:r,inspect:o,types:{isAsyncFunction(P){return P instanceof b},isArrayBufferView(P){return ArrayBuffer.isView(P)}},isBlob:T,deprecate(P,O){return P},addAbortListener:$.requireEvents().addAbortListener||function(O,M){if(O===void 0)throw new s("signal","AbortSignal",O);m(O,"signal"),L(M,"listener");let B;return O.aborted?queueMicrotask(()=>M()):(O.addEventListener("abort",M,{__proto__:null,once:!0,[u]:!0}),B=()=>{O.removeEventListener("abort",M)}),{__proto__:null,[h](){var S;(S=B)===null||S===void 0||S()}}},AbortSignalAny:l.any||function(O){if(O.length===1)return O[0];const M=new c,B=()=>M.abort();return O.forEach(S=>{m(S,"signals"),S.addEventListener("abort",B,{once:!0})}),M.signal.addEventListener("abort",()=>{O.forEach(S=>S.removeEventListener("abort",B))},{once:!0}),M.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(B_);var _r=B_.exports,nd={};const{ArrayIsArray:id,ArrayPrototypeIncludes:M_,ArrayPrototypeJoin:x_,ArrayPrototypeMap:_T,NumberIsInteger:od,NumberIsNaN:yT,NumberMAX_SAFE_INTEGER:wT,NumberMIN_SAFE_INTEGER:mT,NumberParseInt:ET,ObjectPrototypeHasOwnProperty:vT,RegExpPrototypeExec:D_,String:ST,StringPrototypeToUpperCase:RT,StringPrototypeTrim:AT}=Et,{hideStackFrames:Gr,codes:{ERR_SOCKET_BAD_PORT:TT,ERR_INVALID_ARG_TYPE:Qt,ERR_INVALID_ARG_VALUE:jo,ERR_OUT_OF_RANGE:Gi,ERR_UNKNOWN_SIGNAL:yp}}=ur,{normalizeEncoding:IT}=_r,{isAsyncFunction:OT,isArrayBufferView:PT}=_r.types,wp={};function CT(e){return e===(e|0)}function LT(e){return e===e>>>0}const $T=/^[0-7]+$/,BT="must be a 32-bit unsigned integer or an octal string";function NT(e,t,r){if(typeof e>"u"&&(e=r),typeof e=="string"){if(D_($T,e)===null)throw new jo(t,e,BT);e=ET(e,8)}return j_(e,t),e}const MT=Gr((e,t,r=mT,o=wT)=>{if(typeof e!="number")throw new Qt(t,"number",e);if(!od(e))throw new Gi(t,"an integer",e);if(e<r||e>o)throw new Gi(t,`>= ${r} && <= ${o}`,e)}),xT=Gr((e,t,r=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new Qt(t,"number",e);if(!od(e))throw new Gi(t,"an integer",e);if(e<r||e>o)throw new Gi(t,`>= ${r} && <= ${o}`,e)}),j_=Gr((e,t,r=!1)=>{if(typeof e!="number")throw new Qt(t,"number",e);if(!od(e))throw new Gi(t,"an integer",e);const o=r?1:0,s=4294967295;if(e<o||e>s)throw new Gi(t,`>= ${o} && <= ${s}`,e)});function sd(e,t){if(typeof e!="string")throw new Qt(t,"string",e)}function DT(e,t,r=void 0,o){if(typeof e!="number")throw new Qt(t,"number",e);if(r!=null&&e<r||o!=null&&e>o||(r!=null||o!=null)&&yT(e))throw new Gi(t,`${r!=null?`>= ${r}`:""}${r!=null&&o!=null?" && ":""}${o!=null?`<= ${o}`:""}`,e)}const jT=Gr((e,t,r)=>{if(!M_(r,e)){const s="must be one of: "+x_(_T(r,u=>typeof u=="string"?`'${u}'`:ST(u)),", ");throw new jo(t,e,s)}});function U_(e,t){if(typeof e!="boolean")throw new Qt(t,"boolean",e)}function Ul(e,t,r){return e==null||!vT(e,t)?r:e[t]}const UT=Gr((e,t,r=null)=>{const o=Ul(r,"allowArray",!1),s=Ul(r,"allowFunction",!1);if(!Ul(r,"nullable",!1)&&e===null||!o&&id(e)||typeof e!="object"&&(!s||typeof e!="function"))throw new Qt(t,"Object",e)}),kT=Gr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new Qt(t,"a dictionary",e)}),Cu=Gr((e,t,r=0)=>{if(!id(e))throw new Qt(t,"Array",e);if(e.length<r){const o=`must be longer than ${r}`;throw new jo(t,e,o)}});function FT(e,t){Cu(e,t);for(let r=0;r<e.length;r++)sd(e[r],`${t}[${r}]`)}function HT(e,t){Cu(e,t);for(let r=0;r<e.length;r++)U_(e[r],`${t}[${r}]`)}function WT(e,t){Cu(e,t);for(let r=0;r<e.length;r++){const o=e[r],s=`${t}[${r}]`;if(o==null)throw new Qt(s,"AbortSignal",o);k_(o,s)}}function qT(e,t="signal"){if(sd(e,t),wp[e]===void 0)throw wp[RT(e)]!==void 0?new yp(e+" (signals must use all capital letters)"):new yp(e)}const GT=Gr((e,t="buffer")=>{if(!PT(e))throw new Qt(t,["Buffer","TypedArray","DataView"],e)});function VT(e,t){const r=IT(t),o=e.length;if(r==="hex"&&o%2!==0)throw new jo("encoding",t,`is invalid for data of length ${o}`)}function zT(e,t="Port",r=!0){if(typeof e!="number"&&typeof e!="string"||typeof e=="string"&&AT(e).length===0||+e!==+e>>>0||e>65535||e===0&&!r)throw new TT(t,e,r);return e|0}const k_=Gr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new Qt(t,"AbortSignal",e)}),KT=Gr((e,t)=>{if(typeof e!="function")throw new Qt(t,"Function",e)}),JT=Gr((e,t)=>{if(typeof e!="function"||OT(e))throw new Qt(t,"Function",e)}),YT=Gr((e,t)=>{if(e!==void 0)throw new Qt(t,"undefined",e)});function XT(e,t,r){if(!M_(r,e))throw new Qt(t,`('${x_(r,"|")}')`,e)}const ZT=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function mp(e,t){if(typeof e>"u"||!D_(ZT,e))throw new jo(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function QT(e){if(typeof e=="string")return mp(e,"hints"),e;if(id(e)){const t=e.length;let r="";if(t===0)return r;for(let o=0;o<t;o++){const s=e[o];mp(s,"hints"),r+=s,o!==t-1&&(r+=", ")}return r}throw new jo("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}var xs={isInt32:CT,isUint32:LT,parseFileMode:NT,validateArray:Cu,validateStringArray:FT,validateBooleanArray:HT,validateAbortSignalArray:WT,validateBoolean:U_,validateBuffer:GT,validateDictionary:kT,validateEncoding:VT,validateFunction:KT,validateInt32:xT,validateInteger:MT,validateNumber:DT,validateObject:UT,validateOneOf:jT,validatePlainFunction:JT,validatePort:zT,validateSignalName:qT,validateString:sd,validateUint32:j_,validateUndefined:YT,validateUnion:XT,validateAbortSignal:k_,validateLinkHeaderValue:QT},ad={exports:{}};const{SymbolAsyncIterator:Ep,SymbolIterator:vp,SymbolFor:Ji}=Et,F_=Ji("nodejs.stream.destroyed"),H_=Ji("nodejs.stream.errored"),Ic=Ji("nodejs.stream.readable"),Oc=Ji("nodejs.stream.writable"),W_=Ji("nodejs.stream.disturbed"),eI=Ji("nodejs.webstream.isClosedPromise"),tI=Ji("nodejs.webstream.controllerErrorFunction");function Lu(e,t=!1){var r;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((r=e._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!e._writableState||e._readableState))}function $u(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function rI(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Cn(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function q_(e){return!!(e&&!Cn(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function G_(e){return!!(e&&!Cn(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function V_(e){return!!(e&&!Cn(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function nI(e){return q_(e)||G_(e)||V_(e)}function iI(e,t){return e==null?!1:t===!0?typeof e[Ep]=="function":t===!1?typeof e[vp]=="function":typeof e[Ep]=="function"||typeof e[vp]=="function"}function Bu(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!!(e.destroyed||e[F_]||o!=null&&o.destroyed)}function z_(e){if(!$u(e))return null;if(e.writableEnded===!0)return!0;const t=e._writableState;return t!=null&&t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function oI(e,t){if(!$u(e))return null;if(e.writableFinished===!0)return!0;const r=e._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||t===!1&&r.ended===!0&&r.length===0)}function sI(e){if(!Lu(e))return null;if(e.readableEnded===!0)return!0;const t=e._readableState;return!t||t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function K_(e,t){if(!Lu(e))return null;const r=e._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||t===!1&&r.ended===!0&&r.length===0)}function J_(e){return e&&e[Ic]!=null?e[Ic]:typeof(e==null?void 0:e.readable)!="boolean"?null:Bu(e)?!1:Lu(e)&&e.readable&&!K_(e)}function Y_(e){return e&&e[Oc]!=null?e[Oc]:typeof(e==null?void 0:e.writable)!="boolean"?null:Bu(e)?!1:$u(e)&&e.writable&&!z_(e)}function aI(e,t){return Cn(e)?Bu(e)?!0:!((t==null?void 0:t.readable)!==!1&&J_(e)||(t==null?void 0:t.writable)!==!1&&Y_(e)):null}function uI(e){var t,r;return Cn(e)?e.writableErrored?e.writableErrored:(t=(r=e._writableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function fI(e){var t,r;return Cn(e)?e.readableErrored?e.readableErrored:(t=(r=e._readableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function lI(e){if(!Cn(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,r=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(t==null?void 0:t.closed)||(r==null?void 0:r.closed):typeof e._closed=="boolean"&&X_(e)?e._closed:null}function X_(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function Z_(e){return typeof e._sent100=="boolean"&&X_(e)}function cI(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function dI(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!o&&Z_(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function hI(e){var t;return!!(e&&((t=e[W_])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function gI(e){var t,r,o,s,u,f,h,l,c,b;return!!(e&&((t=(r=(o=(s=(u=(f=e[H_])!==null&&f!==void 0?f:e.readableErrored)!==null&&u!==void 0?u:e.writableErrored)!==null&&s!==void 0?s:(h=e._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&o!==void 0?o:(l=e._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(c=e._readableState)===null||c===void 0?void 0:c.errored)!==null&&t!==void 0?t:!((b=e._writableState)===null||b===void 0)&&b.errored))}var ti={isDestroyed:Bu,kIsDestroyed:F_,isDisturbed:hI,kIsDisturbed:W_,isErrored:gI,kIsErrored:H_,isReadable:J_,kIsReadable:Ic,kIsClosedPromise:eI,kControllerErrorFunction:tI,kIsWritable:Oc,isClosed:lI,isDuplexNodeStream:rI,isFinished:aI,isIterable:iI,isReadableNodeStream:Lu,isReadableStream:q_,isReadableEnded:sI,isReadableFinished:K_,isReadableErrored:fI,isNodeStream:Cn,isWebStream:nI,isWritable:Y_,isWritableNodeStream:$u,isWritableStream:G_,isWritableEnded:z_,isWritableFinished:oI,isWritableErrored:uI,isServerRequest:cI,isServerResponse:Z_,willEmitClose:dI,isTransformStream:V_};const yi=$.browserExports,{AbortError:Q_,codes:pI}=ur,{ERR_INVALID_ARG_TYPE:bI,ERR_STREAM_PREMATURE_CLOSE:Sp}=pI,{kEmptyObject:Pc,once:Cc}=_r,{validateAbortSignal:_I,validateFunction:yI,validateObject:wI,validateBoolean:mI}=xs,{Promise:EI,PromisePrototypeThen:vI,SymbolDispose:ey}=Et,{isClosed:SI,isReadable:Rp,isReadableNodeStream:kl,isReadableStream:RI,isReadableFinished:Ap,isReadableErrored:Tp,isWritable:Ip,isWritableNodeStream:Op,isWritableStream:AI,isWritableFinished:Pp,isWritableErrored:Cp,isNodeStream:TI,willEmitClose:II,kIsClosedPromise:OI}=ti;let Io;function PI(e){return e.setHeader&&typeof e.abort=="function"}const Lc=()=>{};function ty(e,t,r){var o,s;if(arguments.length===2?(r=t,t=Pc):t==null?t=Pc:wI(t,"options"),yI(r,"callback"),_I(t.signal,"options.signal"),r=Cc(r),RI(e)||AI(e))return CI(e,t,r);if(!TI(e))throw new bI("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:kl(e),f=(s=t.writable)!==null&&s!==void 0?s:Op(e),h=e._writableState,l=e._readableState,c=()=>{e.writable||T()};let b=II(e)&&kl(e)===u&&Op(e)===f,w=Pp(e,!1);const T=()=>{w=!0,e.destroyed&&(b=!1),!(b&&(!e.readable||u))&&(!u||m)&&r.call(e)};let m=Ap(e,!1);const L=()=>{m=!0,e.destroyed&&(b=!1),!(b&&(!e.writable||f))&&(!f||w)&&r.call(e)},P=U=>{r.call(e,U)};let O=SI(e);const M=()=>{O=!0;const U=Cp(e)||Tp(e);if(U&&typeof U!="boolean")return r.call(e,U);if(u&&!m&&kl(e,!0)&&!Ap(e,!1))return r.call(e,new Sp);if(f&&!w&&!Pp(e,!1))return r.call(e,new Sp);r.call(e)},B=()=>{O=!0;const U=Cp(e)||Tp(e);if(U&&typeof U!="boolean")return r.call(e,U);r.call(e)},S=()=>{e.req.on("finish",T)};PI(e)?(e.on("complete",T),b||e.on("abort",M),e.req?S():e.on("request",S)):f&&!h&&(e.on("end",c),e.on("close",c)),!b&&typeof e.aborted=="boolean"&&e.on("aborted",M),e.on("end",L),e.on("finish",T),t.error!==!1&&e.on("error",P),e.on("close",M),O?yi.nextTick(M):h!=null&&h.errorEmitted||l!=null&&l.errorEmitted?b||yi.nextTick(B):(!u&&(!b||Rp(e))&&(w||Ip(e)===!1)||!f&&(!b||Ip(e))&&(m||Rp(e)===!1)||l&&e.req&&e.aborted)&&yi.nextTick(B);const E=()=>{r=Lc,e.removeListener("aborted",M),e.removeListener("complete",T),e.removeListener("abort",M),e.removeListener("request",S),e.req&&e.req.removeListener("finish",T),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",T),e.removeListener("end",L),e.removeListener("error",P),e.removeListener("close",M)};if(t.signal&&!O){const U=()=>{const Q=r;E(),Q.call(e,new Q_(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)yi.nextTick(U);else{Io=Io||_r.addAbortListener;const Q=Io(t.signal,U),ce=r;r=Cc((...ue)=>{Q[ey](),ce.apply(e,ue)})}}return E}function CI(e,t,r){let o=!1,s=Lc;if(t.signal)if(s=()=>{o=!0,r.call(e,new Q_(void 0,{cause:t.signal.reason}))},t.signal.aborted)yi.nextTick(s);else{Io=Io||_r.addAbortListener;const f=Io(t.signal,s),h=r;r=Cc((...l)=>{f[ey](),h.apply(e,l)})}const u=(...f)=>{o||yi.nextTick(()=>r.apply(e,f))};return vI(e[OI].promise,u,u),Lc}function LI(e,t){var r;let o=!1;return t===null&&(t=Pc),(r=t)!==null&&r!==void 0&&r.cleanup&&(mI(t.cleanup,"cleanup"),o=t.cleanup),new EI((s,u)=>{const f=ty(e,t,h=>{o&&f(),h?u(h):s()})})}ad.exports=ty;ad.exports.finished=LI;var Ai=ad.exports;const In=$.browserExports,{aggregateTwoErrors:$I,codes:{ERR_MULTIPLE_CALLBACK:BI},AbortError:NI}=ur,{Symbol:ry}=Et,{kIsDestroyed:MI,isDestroyed:xI,isFinished:DI,isServerRequest:jI}=ti,ny=ry("kDestroy"),$c=ry("kConstruct");function iy(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function UI(e,t){const r=this._readableState,o=this._writableState,s=o||r;return o!=null&&o.destroyed||r!=null&&r.destroyed?(typeof t=="function"&&t(),this):(iy(e,o,r),o&&(o.destroyed=!0),r&&(r.destroyed=!0),s.constructed?Lp(this,e,t):this.once(ny,function(u){Lp(this,$I(u,e),t)}),this)}function Lp(e,t,r){let o=!1;function s(u){if(o)return;o=!0;const f=e._readableState,h=e._writableState;iy(u,h,f),h&&(h.closed=!0),f&&(f.closed=!0),typeof r=="function"&&r(u),u?In.nextTick(kI,e,u):In.nextTick(oy,e)}try{e._destroy(t||null,s)}catch(u){s(u)}}function kI(e,t){Bc(e,t),oy(e)}function oy(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(r!=null&&r.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function Bc(e,t){const r=e._readableState,o=e._writableState;o!=null&&o.errorEmitted||r!=null&&r.errorEmitted||(o&&(o.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function FI(){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=e.readable===!1,e.endEmitted=e.readable===!1),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=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function Nc(e,t,r){const o=e._readableState,s=e._writableState;if(s!=null&&s.destroyed||o!=null&&o.destroyed)return this;o!=null&&o.autoDestroy||s!=null&&s.autoDestroy?e.destroy(t):t&&(t.stack,s&&!s.errored&&(s.errored=t),o&&!o.errored&&(o.errored=t),r?In.nextTick(Bc,e,t):Bc(e,t))}function HI(e,t){if(typeof e._construct!="function")return;const r=e._readableState,o=e._writableState;r&&(r.constructed=!1),o&&(o.constructed=!1),e.once($c,t),!(e.listenerCount($c)>1)&&In.nextTick(WI,e)}function WI(e){let t=!1;function r(o){if(t){Nc(e,o??new BI);return}t=!0;const s=e._readableState,u=e._writableState,f=u||s;s&&(s.constructed=!0),u&&(u.constructed=!0),f.destroyed?e.emit(ny,o):o?Nc(e,o,!0):In.nextTick(qI,e)}try{e._construct(o=>{In.nextTick(r,o)})}catch(o){In.nextTick(r,o)}}function qI(e){e.emit($c)}function $p(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function sy(e){e.emit("close")}function GI(e,t){e.emit("error",t),In.nextTick(sy,e)}function VI(e,t){!e||xI(e)||(!t&&!DI(e)&&(t=new NI),jI(e)?(e.socket=null,e.destroy(t)):$p(e)?e.abort():$p(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?In.nextTick(GI,e,t):In.nextTick(sy,e),e.destroyed||(e[MI]=!0))}var Uo={construct:HI,destroyer:VI,destroy:UI,undestroy:FI,errorOrDestroy:Nc};const{ArrayIsArray:zI,ObjectSetPrototypeOf:ay}=Et,{EventEmitter:Nu}=$.requireEvents();function Mu(e){Nu.call(this,e)}ay(Mu.prototype,Nu.prototype);ay(Mu,Nu);Mu.prototype.pipe=function(e,t){const r=this;function o(b){e.writable&&e.write(b)===!1&&r.pause&&r.pause()}r.on("data",o);function s(){r.readable&&r.resume&&r.resume()}e.on("drain",s),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",f),r.on("close",h));let u=!1;function f(){u||(u=!0,e.end())}function h(){u||(u=!0,typeof e.destroy=="function"&&e.destroy())}function l(b){c(),Nu.listenerCount(this,"error")===0&&this.emit("error",b)}Mc(r,"error",l),Mc(e,"error",l);function c(){r.removeListener("data",o),e.removeListener("drain",s),r.removeListener("end",f),r.removeListener("close",h),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e};function Mc(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):zI(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}var ud={Stream:Mu,prependListener:Mc},uy={exports:{}};(function(e){const{SymbolDispose:t}=Et,{AbortError:r,codes:o}=ur,{isNodeStream:s,isWebStream:u,kControllerErrorFunction:f}=ti,h=Ai,{ERR_INVALID_ARG_TYPE:l}=o;let c;const b=(w,T)=>{if(typeof w!="object"||!("aborted"in w))throw new l(T,"AbortSignal",w)};e.exports.addAbortSignal=function(T,m){if(b(T,"signal"),!s(m)&&!u(m))throw new l("stream",["ReadableStream","WritableStream","Stream"],m);return e.exports.addAbortSignalNoValidate(T,m)},e.exports.addAbortSignalNoValidate=function(w,T){if(typeof w!="object"||!("aborted"in w))return T;const m=s(T)?()=>{T.destroy(new r(void 0,{cause:w.reason}))}:()=>{T[f](new r(void 0,{cause:w.reason}))};if(w.aborted)m();else{c=c||_r.addAbortListener;const L=c(w,m);h(T,L[t])}return T}})(uy);var xu=uy.exports;const{StringPrototypeSlice:Bp,SymbolIterator:KI,TypedArrayPrototypeSet:Ja,Uint8Array:JI}=Et,{Buffer:Fl}=$.bufferPolyfill,{inspect:YI}=_r;var XI=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const r={data:t,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(t){const r={data:t,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let r=this.head,o=""+r.data;for(;(r=r.next)!==null;)o+=t+r.data;return o}concat(t){if(this.length===0)return Fl.alloc(0);const r=Fl.allocUnsafe(t>>>0);let o=this.head,s=0;for(;o;)Ja(r,o.data,s),s+=o.data.length,o=o.next;return r}consume(t,r){const o=this.head.data;if(t<o.length){const s=o.slice(0,t);return this.head.data=o.slice(t),s}return t===o.length?this.shift():r?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[KI](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let r="",o=this.head,s=0;do{const u=o.data;if(t>u.length)r+=u,t-=u.length;else{t===u.length?(r+=u,++s,o.next?this.head=o.next:this.head=this.tail=null):(r+=Bp(u,0,t),this.head=o,o.data=Bp(u,t));break}++s}while((o=o.next)!==null);return this.length-=s,r}_getBuffer(t){const r=Fl.allocUnsafe(t),o=t;let s=this.head,u=0;do{const f=s.data;if(t>f.length)Ja(r,f,o-t),t-=f.length;else{t===f.length?(Ja(r,f,o-t),++u,s.next?this.head=s.next:this.head=this.tail=null):(Ja(r,new JI(f.buffer,f.byteOffset,t),o-t),this.head=s,s.data=f.slice(t));break}++u}while((s=s.next)!==null);return this.length-=u,r}[Symbol.for("nodejs.util.inspect.custom")](t,r){return YI(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:ZI,NumberIsInteger:QI}=Et,{validateInteger:eO}=xs,{ERR_INVALID_ARG_VALUE:tO}=ur.codes;let fy=16*1024,ly=16;function rO(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function cy(e){return e?ly:fy}function nO(e,t){eO(t,"value",0),e?ly=t:fy=t}function iO(e,t,r,o){const s=rO(t,o,r);if(s!=null){if(!QI(s)||s<0){const u=o?`options.${r}`:"options.highWaterMark";throw new tO(u,s)}return ZI(s)}return cy(e.objectMode)}var Du={getHighWaterMark:iO,getDefaultHighWaterMark:cy,setDefaultHighWaterMark:nO};const Np=$.browserExports,{PromisePrototypeThen:oO,SymbolAsyncIterator:Mp,SymbolIterator:xp}=Et,{Buffer:sO}=$.bufferPolyfill,{ERR_INVALID_ARG_TYPE:aO,ERR_STREAM_NULL_VALUES:uO}=ur.codes;function fO(e,t,r){let o;if(typeof t=="string"||t instanceof sO)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});let s;if(t&&t[Mp])s=!0,o=t[Mp]();else if(t&&t[xp])s=!1,o=t[xp]();else throw new aO("iterable",["Iterable"],t);const u=new e({objectMode:!0,highWaterMark:1,...r});let f=!1;u._read=function(){f||(f=!0,l())},u._destroy=function(c,b){oO(h(c),()=>Np.nextTick(b,c),w=>Np.nextTick(b,w||c))};async function h(c){const b=c!=null,w=typeof o.throw=="function";if(b&&w){const{value:T,done:m}=await o.throw(c);if(await T,m)return}if(typeof o.return=="function"){const{value:T}=await o.return();await T}}async function l(){for(;;){try{const{value:c,done:b}=s?await o.next():o.next();if(b)u.push(null);else{const w=c&&typeof c.then=="function"?await c:c;if(w===null)throw f=!1,new uO;if(u.push(w))continue;f=!1}}catch(c){u.destroy(c)}break}}return u}var dy=fO,Hl,Dp;function ju(){if(Dp)return Hl;Dp=1;const e=$.browserExports,{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:u,ObjectKeys:f,ObjectSetPrototypeOf:h,Promise:l,SafeSet:c,SymbolAsyncDispose:b,SymbolAsyncIterator:w,Symbol:T}=Et;Hl=Re,Re.ReadableState=je;const{EventEmitter:m}=$.requireEvents(),{Stream:L,prependListener:P}=ud,{Buffer:O}=$.bufferPolyfill,{addAbortSignal:M}=xu,B=Ai;let S=_r.debuglog("stream",N=>{S=N});const E=XI,U=Uo,{getHighWaterMark:Q,getDefaultHighWaterMark:ce}=Du,{aggregateTwoErrors:ue,codes:{ERR_INVALID_ARG_TYPE:te,ERR_METHOD_NOT_IMPLEMENTED:Se,ERR_OUT_OF_RANGE:me,ERR_STREAM_PUSH_AFTER_EOF:H,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:k},AbortError:x}=ur,{validateObject:G}=xs,Y=T("kPaused"),{StringDecoder:V}=$.requireString_decoder(),ne=dy;h(Re.prototype,L.prototype),h(Re,L);const W=()=>{},{errorOrDestroy:K}=U,ae=1,de=2,re=4,_e=8,be=16,R=32,I=64,q=128,oe=256,ye=512,g=1024,p=2048,_=4096,v=8192,J=16384,ie=32768,se=65536,Ie=1<<17,$e=1<<18;function Pe(N){return{enumerable:!1,get(){return(this.state&N)!==0},set(j){j?this.state|=N:this.state&=~N}}}u(je.prototype,{objectMode:Pe(ae),ended:Pe(de),endEmitted:Pe(re),reading:Pe(_e),constructed:Pe(be),sync:Pe(R),needReadable:Pe(I),emittedReadable:Pe(q),readableListening:Pe(oe),resumeScheduled:Pe(ye),errorEmitted:Pe(g),emitClose:Pe(p),autoDestroy:Pe(_),destroyed:Pe(v),closed:Pe(J),closeEmitted:Pe(ie),multiAwaitDrain:Pe(se),readingMore:Pe(Ie),dataEmitted:Pe($e)});function je(N,j,Ee){typeof Ee!="boolean"&&(Ee=j instanceof Xn()),this.state=p|_|be|R,N&&N.objectMode&&(this.state|=ae),Ee&&N&&N.readableObjectMode&&(this.state|=ae),this.highWaterMark=N?Q(this,N,"readableHighWaterMark",Ee):ce(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[Y]=null,N&&N.emitClose===!1&&(this.state&=-2049),N&&N.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=N&&N.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,N&&N.encoding&&(this.decoder=new V(N.encoding),this.encoding=N.encoding)}function Re(N){if(!(this instanceof Re))return new Re(N);const j=this instanceof Xn();this._readableState=new je(N,this,j),N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.construct=="function"&&(this._construct=N.construct),N.signal&&!j&&M(N.signal,this)),L.call(this,N),U.construct(this,()=>{this._readableState.needReadable&&st(this,this._readableState)})}Re.prototype.destroy=U.destroy,Re.prototype._undestroy=U.undestroy,Re.prototype._destroy=function(N,j){j(N)},Re.prototype[m.captureRejectionSymbol]=function(N){this.destroy(N)},Re.prototype[b]=function(){let N;return this.destroyed||(N=this.readableEnded?null:new x,this.destroy(N)),new l((j,Ee)=>B(this,ve=>ve&&ve!==N?Ee(ve):j(null)))},Re.prototype.push=function(N,j){return Fe(this,N,j,!1)},Re.prototype.unshift=function(N,j){return Fe(this,N,j,!0)};function Fe(N,j,Ee,ve){S("readableAddChunk",j);const Te=N._readableState;let _t;if(Te.state&ae||(typeof j=="string"?(Ee=Ee||Te.defaultEncoding,Te.encoding!==Ee&&(ve&&Te.encoding?j=O.from(j,Ee).toString(Te.encoding):(j=O.from(j,Ee),Ee=""))):j instanceof O?Ee="":L._isUint8Array(j)?(j=L._uint8ArrayToBuffer(j),Ee=""):j!=null&&(_t=new te("chunk",["string","Buffer","Uint8Array"],j))),_t)K(N,_t);else if(j===null)Te.state&=-9,Ge(N,Te);else if(Te.state&ae||j&&j.length>0)if(ve)if(Te.state&re)K(N,new k);else{if(Te.destroyed||Te.errored)return!1;pt(N,Te,j,!0)}else if(Te.ended)K(N,new H);else{if(Te.destroyed||Te.errored)return!1;Te.state&=-9,Te.decoder&&!Ee?(j=Te.decoder.write(j),Te.objectMode||j.length!==0?pt(N,Te,j,!1):st(N,Te)):pt(N,Te,j,!1)}else ve||(Te.state&=-9,st(N,Te));return!Te.ended&&(Te.length<Te.highWaterMark||Te.length===0)}function pt(N,j,Ee,ve){j.flowing&&j.length===0&&!j.sync&&N.listenerCount("data")>0?(j.state&se?j.awaitDrainWriters.clear():j.awaitDrainWriters=null,j.dataEmitted=!0,N.emit("data",Ee)):(j.length+=j.objectMode?1:Ee.length,ve?j.buffer.unshift(Ee):j.buffer.push(Ee),j.state&I&&xt(N)),st(N,j)}Re.prototype.isPaused=function(){const N=this._readableState;return N[Y]===!0||N.flowing===!1},Re.prototype.setEncoding=function(N){const j=new V(N);this._readableState.decoder=j,this._readableState.encoding=this._readableState.decoder.encoding;const Ee=this._readableState.buffer;let ve="";for(const Te of Ee)ve+=j.write(Te);return Ee.clear(),ve!==""&&Ee.push(ve),this._readableState.length=ve.length,this};const Qe=1073741824;function bt(N){if(N>Qe)throw new me("size","<= 1GiB",N);return N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++,N}function Je(N,j){return N<=0||j.length===0&&j.ended?0:j.state&ae?1:o(N)?j.flowing&&j.length?j.buffer.first().length:j.length:N<=j.length?N:j.ended?j.length:0}Re.prototype.read=function(N){S("read",N),N===void 0?N=NaN:r(N)||(N=s(N,10));const j=this._readableState,Ee=N;if(N>j.highWaterMark&&(j.highWaterMark=bt(N)),N!==0&&(j.state&=-129),N===0&&j.needReadable&&((j.highWaterMark!==0?j.length>=j.highWaterMark:j.length>0)||j.ended))return S("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?Pr(this):xt(this),null;if(N=Je(N,j),N===0&&j.ended)return j.length===0&&Pr(this),null;let ve=(j.state&I)!==0;if(S("need readable",ve),(j.length===0||j.length-N<j.highWaterMark)&&(ve=!0,S("length less than watermark",ve)),j.ended||j.reading||j.destroyed||j.errored||!j.constructed)ve=!1,S("reading, ended or constructing",ve);else if(ve){S("do read"),j.state|=_e|R,j.length===0&&(j.state|=I);try{this._read(j.highWaterMark)}catch(_t){K(this,_t)}j.state&=-33,j.reading||(N=Je(Ee,j))}let Te;return N>0?Te=tr(N,j):Te=null,Te===null?(j.needReadable=j.length<=j.highWaterMark,N=0):(j.length-=N,j.multiAwaitDrain?j.awaitDrainWriters.clear():j.awaitDrainWriters=null),j.length===0&&(j.ended||(j.needReadable=!0),Ee!==N&&j.ended&&Pr(this)),Te!==null&&!j.errorEmitted&&!j.closeEmitted&&(j.dataEmitted=!0,this.emit("data",Te)),Te};function Ge(N,j){if(S("onEofChunk"),!j.ended){if(j.decoder){const Ee=j.decoder.end();Ee&&Ee.length&&(j.buffer.push(Ee),j.length+=j.objectMode?1:Ee.length)}j.ended=!0,j.sync?xt(N):(j.needReadable=!1,j.emittedReadable=!0,Pt(N))}}function xt(N){const j=N._readableState;S("emitReadable",j.needReadable,j.emittedReadable),j.needReadable=!1,j.emittedReadable||(S("emitReadable",j.flowing),j.emittedReadable=!0,e.nextTick(Pt,N))}function Pt(N){const j=N._readableState;S("emitReadable_",j.destroyed,j.length,j.ended),!j.destroyed&&!j.errored&&(j.length||j.ended)&&(N.emit("readable"),j.emittedReadable=!1),j.needReadable=!j.flowing&&!j.ended&&j.length<=j.highWaterMark,Kr(N)}function st(N,j){!j.readingMore&&j.constructed&&(j.readingMore=!0,e.nextTick(Lt,N,j))}function Lt(N,j){for(;!j.reading&&!j.ended&&(j.length<j.highWaterMark||j.flowing&&j.length===0);){const Ee=j.length;if(S("maybeReadMore read 0"),N.read(0),Ee===j.length)break}j.readingMore=!1}Re.prototype._read=function(N){throw new Se("_read()")},Re.prototype.pipe=function(N,j){const Ee=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new c(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(N),S("pipe count=%d opts=%j",ve.pipes.length,j);const _t=(!j||j.end!==!1)&&N!==e.stdout&&N!==e.stderr?ln:wr;ve.endEmitted?e.nextTick(_t):Ee.once("end",_t),N.on("unpipe",vt);function vt(nr,kt){S("onunpipe"),nr===Ee&&kt&&kt.hasUnpiped===!1&&(kt.hasUnpiped=!0,$n())}function ln(){S("onend"),N.end()}let Ct,cn=!1;function $n(){S("cleanup"),N.removeListener("close",qt),N.removeListener("finish",Cr),Ct&&N.removeListener("drain",Ct),N.removeListener("error",Yr),N.removeListener("unpipe",vt),Ee.removeListener("end",ln),Ee.removeListener("end",wr),Ee.removeListener("data",hn),cn=!0,Ct&&ve.awaitDrainWriters&&(!N._writableState||N._writableState.needDrain)&&Ct()}function dn(){cn||(ve.pipes.length===1&&ve.pipes[0]===N?(S("false write response, pause",0),ve.awaitDrainWriters=N,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(N)&&(S("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(N)),Ee.pause()),Ct||(Ct=lr(Ee,N),N.on("drain",Ct))}Ee.on("data",hn);function hn(nr){S("ondata");const kt=N.write(nr);S("dest.write",kt),kt===!1&&dn()}function Yr(nr){if(S("onerror",nr),wr(),N.removeListener("error",Yr),N.listenerCount("error")===0){const kt=N._writableState||N._readableState;kt&&!kt.errorEmitted?K(N,nr):N.emit("error",nr)}}P(N,"error",Yr);function qt(){N.removeListener("finish",Cr),wr()}N.once("close",qt);function Cr(){S("onfinish"),N.removeListener("close",qt),wr()}N.once("finish",Cr);function wr(){S("unpipe"),Ee.unpipe(N)}return N.emit("pipe",Ee),N.writableNeedDrain===!0?dn():ve.flowing||(S("pipe resume"),Ee.resume()),N};function lr(N,j){return function(){const ve=N._readableState;ve.awaitDrainWriters===j?(S("pipeOnDrain",1),ve.awaitDrainWriters=null):ve.multiAwaitDrain&&(S("pipeOnDrain",ve.awaitDrainWriters.size),ve.awaitDrainWriters.delete(j)),(!ve.awaitDrainWriters||ve.awaitDrainWriters.size===0)&&N.listenerCount("data")&&N.resume()}}Re.prototype.unpipe=function(N){const j=this._readableState,Ee={hasUnpiped:!1};if(j.pipes.length===0)return this;if(!N){const Te=j.pipes;j.pipes=[],this.pause();for(let _t=0;_t<Te.length;_t++)Te[_t].emit("unpipe",this,{hasUnpiped:!1});return this}const ve=t(j.pipes,N);return ve===-1?this:(j.pipes.splice(ve,1),j.pipes.length===0&&this.pause(),N.emit("unpipe",this,Ee),this)},Re.prototype.on=function(N,j){const Ee=L.prototype.on.call(this,N,j),ve=this._readableState;return N==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):N==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,S("on readable",ve.length,ve.reading),ve.length?xt(this):ve.reading||e.nextTick(Ut,this)),Ee},Re.prototype.addListener=Re.prototype.on,Re.prototype.removeListener=function(N,j){const Ee=L.prototype.removeListener.call(this,N,j);return N==="readable"&&e.nextTick(er,this),Ee},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(N){const j=L.prototype.removeAllListeners.apply(this,arguments);return(N==="readable"||N===void 0)&&e.nextTick(er,this),j};function er(N){const j=N._readableState;j.readableListening=N.listenerCount("readable")>0,j.resumeScheduled&&j[Y]===!1?j.flowing=!0:N.listenerCount("data")>0?N.resume():j.readableListening||(j.flowing=null)}function Ut(N){S("readable nexttick read 0"),N.read(0)}Re.prototype.resume=function(){const N=this._readableState;return N.flowing||(S("resume"),N.flowing=!N.readableListening,cr(this,N)),N[Y]=!1,this};function cr(N,j){j.resumeScheduled||(j.resumeScheduled=!0,e.nextTick(zr,N,j))}function zr(N,j){S("resume",j.reading),j.reading||N.read(0),j.resumeScheduled=!1,N.emit("resume"),Kr(N),j.flowing&&!j.reading&&N.read(0)}Re.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function Kr(N){const j=N._readableState;for(S("flow",j.flowing);j.flowing&&N.read()!==null;);}Re.prototype.wrap=function(N){let j=!1;N.on("data",ve=>{!this.push(ve)&&N.pause&&(j=!0,N.pause())}),N.on("end",()=>{this.push(null)}),N.on("error",ve=>{K(this,ve)}),N.on("close",()=>{this.destroy()}),N.on("destroy",()=>{this.destroy()}),this._read=()=>{j&&N.resume&&(j=!1,N.resume())};const Ee=f(N);for(let ve=1;ve<Ee.length;ve++){const Te=Ee[ve];this[Te]===void 0&&typeof N[Te]=="function"&&(this[Te]=N[Te].bind(N))}return this},Re.prototype[w]=function(){return an(this)},Re.prototype.iterator=function(N){return N!==void 0&&G(N,"options"),an(this,N)};function an(N,j){typeof N.read!="function"&&(N=Re.wrap(N,{objectMode:!0}));const Ee=un(N,j);return Ee.stream=N,Ee}async function*un(N,j){let Ee=W;function ve(vt){this===N?(Ee(),Ee=W):Ee=vt}N.on("readable",ve);let Te;const _t=B(N,{writable:!1},vt=>{Te=vt?ue(Te,vt):null,Ee(),Ee=W});try{for(;;){const vt=N.destroyed?null:N.read();if(vt!==null)yield vt;else{if(Te)throw Te;if(Te===null)return;await new l(ve)}}}catch(vt){throw Te=ue(Te,vt),Te}finally{(Te||(j==null?void 0:j.destroyOnReturn)!==!1)&&(Te===void 0||N._readableState.autoDestroy)?U.destroyer(N,null):(N.off("readable",ve),_t())}}u(Re.prototype,{readable:{__proto__:null,get(){const N=this._readableState;return!!N&&N.readable!==!1&&!N.destroyed&&!N.errorEmitted&&!N.endEmitted},set(N){this._readableState&&(this._readableState.readable=!!N)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(N){this._readableState&&(this._readableState.destroyed=N)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),u(je.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(N){this[Y]=!!N}}}),Re._fromList=tr;function tr(N,j){if(j.length===0)return null;let Ee;return j.objectMode?Ee=j.buffer.shift():!N||N>=j.length?(j.decoder?Ee=j.buffer.join(""):j.buffer.length===1?Ee=j.buffer.first():Ee=j.buffer.concat(j.length),j.buffer.clear()):Ee=j.buffer.consume(N,j.decoder),Ee}function Pr(N){const j=N._readableState;S("endReadable",j.endEmitted),j.endEmitted||(j.ended=!0,e.nextTick(rr,j,N))}function rr(N,j){if(S("endReadableNT",N.endEmitted,N.length),!N.errored&&!N.closeEmitted&&!N.endEmitted&&N.length===0){if(N.endEmitted=!0,j.emit("end"),j.writable&&j.allowHalfOpen===!1)e.nextTick(Ln,j);else if(N.autoDestroy){const Ee=j._writableState;(!Ee||Ee.autoDestroy&&(Ee.finished||Ee.writable===!1))&&j.destroy()}}}function Ln(N){N.writable&&!N.writableEnded&&!N.destroyed&&N.end()}Re.from=function(N,j){return ne(Re,N,j)};let Jr;function fn(){return Jr===void 0&&(Jr={}),Jr}return Re.fromWeb=function(N,j){return fn().newStreamReadableFromReadableStream(N,j)},Re.toWeb=function(N,j){return fn().newReadableStreamFromStreamReadable(N,j)},Re.wrap=function(N,j){var Ee,ve;return new Re({objectMode:(Ee=(ve=N.readableObjectMode)!==null&&ve!==void 0?ve:N.objectMode)!==null&&Ee!==void 0?Ee:!0,...j,destroy(Te,_t){U.destroyer(N,Te),_t(Te)}}).wrap(N)},Hl}var Wl,jp;function fd(){if(jp)return Wl;jp=1;const e=$.browserExports,{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:h,Symbol:l,SymbolHasInstance:c}=Et;Wl=G,G.WritableState=k;const{EventEmitter:b}=$.requireEvents(),w=ud.Stream,{Buffer:T}=$.bufferPolyfill,m=Uo,{addAbortSignal:L}=xu,{getHighWaterMark:P,getDefaultHighWaterMark:O}=Du,{ERR_INVALID_ARG_TYPE:M,ERR_METHOD_NOT_IMPLEMENTED:B,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:U,ERR_STREAM_ALREADY_FINISHED:Q,ERR_STREAM_NULL_VALUES:ce,ERR_STREAM_WRITE_AFTER_END:ue,ERR_UNKNOWN_ENCODING:te}=ur.codes,{errorOrDestroy:Se}=m;f(G.prototype,w.prototype),f(G,w);function me(){}const H=l("kOnFinished");function k(_,v,J){typeof J!="boolean"&&(J=v instanceof Xn()),this.objectMode=!!(_&&_.objectMode),J&&(this.objectMode=this.objectMode||!!(_&&_.writableObjectMode)),this.highWaterMark=_?P(this,_,"writableHighWaterMark",J):O(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ie=!!(_&&_.decodeStrings===!1);this.decodeStrings=!ie,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=K.bind(void 0,v),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,x(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!_||_.emitClose!==!1,this.autoDestroy=!_||_.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[H]=[]}function x(_){_.buffered=[],_.bufferedIndex=0,_.allBuffers=!0,_.allNoop=!0}k.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},s(k.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function G(_){const v=this instanceof Xn();if(!v&&!o(G,this))return new G(_);this._writableState=new k(_,this,v),_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final),typeof _.construct=="function"&&(this._construct=_.construct),_.signal&&L(_.signal,this)),w.call(this,_),m.construct(this,()=>{const J=this._writableState;J.writing||_e(this,J),q(this,J)})}s(G,c,{__proto__:null,value:function(_){return o(this,_)?!0:this!==G?!1:_&&_._writableState instanceof k}}),G.prototype.pipe=function(){Se(this,new E)};function Y(_,v,J,ie){const se=_._writableState;if(typeof J=="function")ie=J,J=se.defaultEncoding;else{if(!J)J=se.defaultEncoding;else if(J!=="buffer"&&!T.isEncoding(J))throw new te(J);typeof ie!="function"&&(ie=me)}if(v===null)throw new ce;if(!se.objectMode)if(typeof v=="string")se.decodeStrings!==!1&&(v=T.from(v,J),J="buffer");else if(v instanceof T)J="buffer";else if(w._isUint8Array(v))v=w._uint8ArrayToBuffer(v),J="buffer";else throw new M("chunk",["string","Buffer","Uint8Array"],v);let Ie;return se.ending?Ie=new ue:se.destroyed&&(Ie=new U("write")),Ie?(e.nextTick(ie,Ie),Se(_,Ie,!0),Ie):(se.pendingcb++,V(_,se,v,J,ie))}G.prototype.write=function(_,v,J){return Y(this,_,v,J)===!0},G.prototype.cork=function(){this._writableState.corked++},G.prototype.uncork=function(){const _=this._writableState;_.corked&&(_.corked--,_.writing||_e(this,_))},G.prototype.setDefaultEncoding=function(v){if(typeof v=="string"&&(v=h(v)),!T.isEncoding(v))throw new te(v);return this._writableState.defaultEncoding=v,this};function V(_,v,J,ie,se){const Ie=v.objectMode?1:J.length;v.length+=Ie;const $e=v.length<v.highWaterMark;return $e||(v.needDrain=!0),v.writing||v.corked||v.errored||!v.constructed?(v.buffered.push({chunk:J,encoding:ie,callback:se}),v.allBuffers&&ie!=="buffer"&&(v.allBuffers=!1),v.allNoop&&se!==me&&(v.allNoop=!1)):(v.writelen=Ie,v.writecb=se,v.writing=!0,v.sync=!0,_._write(J,ie,v.onwrite),v.sync=!1),$e&&!v.errored&&!v.destroyed}function ne(_,v,J,ie,se,Ie,$e){v.writelen=ie,v.writecb=$e,v.writing=!0,v.sync=!0,v.destroyed?v.onwrite(new U("write")):J?_._writev(se,v.onwrite):_._write(se,Ie,v.onwrite),v.sync=!1}function W(_,v,J,ie){--v.pendingcb,ie(J),re(v),Se(_,J)}function K(_,v){const J=_._writableState,ie=J.sync,se=J.writecb;if(typeof se!="function"){Se(_,new S);return}J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0,v?(v.stack,J.errored||(J.errored=v),_._readableState&&!_._readableState.errored&&(_._readableState.errored=v),ie?e.nextTick(W,_,J,v,se):W(_,J,v,se)):(J.buffered.length>J.bufferedIndex&&_e(_,J),ie?J.afterWriteTickInfo!==null&&J.afterWriteTickInfo.cb===se?J.afterWriteTickInfo.count++:(J.afterWriteTickInfo={count:1,cb:se,stream:_,state:J},e.nextTick(ae,J.afterWriteTickInfo)):de(_,J,1,se))}function ae({stream:_,state:v,count:J,cb:ie}){return v.afterWriteTickInfo=null,de(_,v,J,ie)}function de(_,v,J,ie){for(!v.ending&&!_.destroyed&&v.length===0&&v.needDrain&&(v.needDrain=!1,_.emit("drain"));J-- >0;)v.pendingcb--,ie();v.destroyed&&re(v),q(_,v)}function re(_){if(_.writing)return;for(let se=_.bufferedIndex;se<_.buffered.length;++se){var v;const{chunk:Ie,callback:$e}=_.buffered[se],Pe=_.objectMode?1:Ie.length;_.length-=Pe,$e((v=_.errored)!==null&&v!==void 0?v:new U("write"))}const J=_[H].splice(0);for(let se=0;se<J.length;se++){var ie;J[se]((ie=_.errored)!==null&&ie!==void 0?ie:new U("end"))}x(_)}function _e(_,v){if(v.corked||v.bufferProcessing||v.destroyed||!v.constructed)return;const{buffered:J,bufferedIndex:ie,objectMode:se}=v,Ie=J.length-ie;if(!Ie)return;let $e=ie;if(v.bufferProcessing=!0,Ie>1&&_._writev){v.pendingcb-=Ie-1;const Pe=v.allNoop?me:Re=>{for(let Fe=$e;Fe<J.length;++Fe)J[Fe].callback(Re)},je=v.allNoop&&$e===0?J:t(J,$e);je.allBuffers=v.allBuffers,ne(_,v,!0,v.length,je,"",Pe),x(v)}else{do{const{chunk:Pe,encoding:je,callback:Re}=J[$e];J[$e++]=null;const Fe=se?1:Pe.length;ne(_,v,!1,Fe,Pe,je,Re)}while($e<J.length&&!v.writing);$e===J.length?x(v):$e>256?(J.splice(0,$e),v.bufferedIndex=0):v.bufferedIndex=$e}v.bufferProcessing=!1}G.prototype._write=function(_,v,J){if(this._writev)this._writev([{chunk:_,encoding:v}],J);else throw new B("_write()")},G.prototype._writev=null,G.prototype.end=function(_,v,J){const ie=this._writableState;typeof _=="function"?(J=_,_=null,v=null):typeof v=="function"&&(J=v,v=null);let se;if(_!=null){const Ie=Y(this,_,v);Ie instanceof r&&(se=Ie)}return ie.corked&&(ie.corked=1,this.uncork()),se||(!ie.errored&&!ie.ending?(ie.ending=!0,q(this,ie,!0),ie.ended=!0):ie.finished?se=new Q("end"):ie.destroyed&&(se=new U("end"))),typeof J=="function"&&(se||ie.finished?e.nextTick(J,se):ie[H].push(J)),this};function be(_){return _.ending&&!_.destroyed&&_.constructed&&_.length===0&&!_.errored&&_.buffered.length===0&&!_.finished&&!_.writing&&!_.errorEmitted&&!_.closeEmitted}function R(_,v){let J=!1;function ie(se){if(J){Se(_,se??S());return}if(J=!0,v.pendingcb--,se){const Ie=v[H].splice(0);for(let $e=0;$e<Ie.length;$e++)Ie[$e](se);Se(_,se,v.sync)}else be(v)&&(v.prefinished=!0,_.emit("prefinish"),v.pendingcb++,e.nextTick(oe,_,v))}v.sync=!0,v.pendingcb++;try{_._final(ie)}catch(se){ie(se)}v.sync=!1}function I(_,v){!v.prefinished&&!v.finalCalled&&(typeof _._final=="function"&&!v.destroyed?(v.finalCalled=!0,R(_,v)):(v.prefinished=!0,_.emit("prefinish")))}function q(_,v,J){be(v)&&(I(_,v),v.pendingcb===0&&(J?(v.pendingcb++,e.nextTick((ie,se)=>{be(se)?oe(ie,se):se.pendingcb--},_,v)):be(v)&&(v.pendingcb++,oe(_,v))))}function oe(_,v){v.pendingcb--,v.finished=!0;const J=v[H].splice(0);for(let ie=0;ie<J.length;ie++)J[ie]();if(_.emit("finish"),v.autoDestroy){const ie=_._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||ie.readable===!1))&&_.destroy()}}u(G.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(_){this._writableState&&(this._writableState.destroyed=_)}},writable:{__proto__:null,get(){const _=this._writableState;return!!_&&_.writable!==!1&&!_.destroyed&&!_.errored&&!_.ending&&!_.ended},set(_){this._writableState&&(this._writableState.writable=!!_)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const _=this._writableState;return _?!_.destroyed&&!_.ending&&_.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const ye=m.destroy;G.prototype.destroy=function(_,v){const J=this._writableState;return!J.destroyed&&(J.bufferedIndex<J.buffered.length||J[H].length)&&e.nextTick(re,J),ye.call(this,_,v),this},G.prototype._undestroy=m.undestroy,G.prototype._destroy=function(_,v){v(_)},G.prototype[b.captureRejectionSymbol]=function(_){this.destroy(_)};let g;function p(){return g===void 0&&(g={}),g}return G.fromWeb=function(_,v){return p().newStreamWritableFromWritableStream(_,v)},G.toWeb=function(_){return p().newWritableStreamFromStreamWritable(_)},Wl}var ql,Up;function lO(){if(Up)return ql;Up=1;const e=$.browserExports,t=$.bufferPolyfill,{isReadable:r,isWritable:o,isIterable:s,isNodeStream:u,isReadableNodeStream:f,isWritableNodeStream:h,isDuplexNodeStream:l,isReadableStream:c,isWritableStream:b}=ti,w=Ai,{AbortError:T,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:L}}=ur,{destroyer:P}=Uo,O=Xn(),M=ju(),B=fd(),{createDeferredPromise:S}=_r,E=dy,U=globalThis.Blob||t.Blob,Q=typeof U<"u"?function(k){return k instanceof U}:function(k){return!1},ce=globalThis.AbortController||Ps().AbortController,{FunctionPrototypeCall:ue}=Et;class te extends O{constructor(k){super(k),(k==null?void 0:k.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(k==null?void 0:k.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}ql=function H(k,x){if(l(k))return k;if(f(k))return me({readable:k});if(h(k))return me({writable:k});if(u(k))return me({writable:!1,readable:!1});if(c(k))return me({readable:M.fromWeb(k)});if(b(k))return me({writable:B.fromWeb(k)});if(typeof k=="function"){const{value:Y,write:V,final:ne,destroy:W}=Se(k);if(s(Y))return E(te,Y,{objectMode:!0,write:V,final:ne,destroy:W});const K=Y==null?void 0:Y.then;if(typeof K=="function"){let ae;const de=ue(K,Y,re=>{if(re!=null)throw new L("nully","body",re)},re=>{P(ae,re)});return ae=new te({objectMode:!0,readable:!1,write:V,final(re){ne(async()=>{try{await de,e.nextTick(re,null)}catch(_e){e.nextTick(re,_e)}})},destroy:W})}throw new L("Iterable, AsyncIterable or AsyncFunction",x,Y)}if(Q(k))return H(k.arrayBuffer());if(s(k))return E(te,k,{objectMode:!0,writable:!1});if(c(k==null?void 0:k.readable)&&b(k==null?void 0:k.writable))return te.fromWeb(k);if(typeof(k==null?void 0:k.writable)=="object"||typeof(k==null?void 0:k.readable)=="object"){const Y=k!=null&&k.readable?f(k==null?void 0:k.readable)?k==null?void 0:k.readable:H(k.readable):void 0,V=k!=null&&k.writable?h(k==null?void 0:k.writable)?k==null?void 0:k.writable:H(k.writable):void 0;return me({readable:Y,writable:V})}const G=k==null?void 0:k.then;if(typeof G=="function"){let Y;return ue(G,k,V=>{V!=null&&Y.push(V),Y.push(null)},V=>{P(Y,V)}),Y=new te({objectMode:!0,writable:!1,read(){}})}throw new m(x,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],k)};function Se(H){let{promise:k,resolve:x}=S();const G=new ce,Y=G.signal;return{value:H(async function*(){for(;;){const ne=k;k=null;const{chunk:W,done:K,cb:ae}=await ne;if(e.nextTick(ae),K)return;if(Y.aborted)throw new T(void 0,{cause:Y.reason});({promise:k,resolve:x}=S()),yield W}}(),{signal:Y}),write(ne,W,K){const ae=x;x=null,ae({chunk:ne,done:!1,cb:K})},final(ne){const W=x;x=null,W({done:!0,cb:ne})},destroy(ne,W){G.abort(),W(ne)}}}function me(H){const k=H.readable&&typeof H.readable.read!="function"?M.wrap(H.readable):H.readable,x=H.writable;let G=!!r(k),Y=!!o(x),V,ne,W,K,ae;function de(re){const _e=K;K=null,_e?_e(re):re&&ae.destroy(re)}return ae=new te({readableObjectMode:!!(k!=null&&k.readableObjectMode),writableObjectMode:!!(x!=null&&x.writableObjectMode),readable:G,writable:Y}),Y&&(w(x,re=>{Y=!1,re&&P(k,re),de(re)}),ae._write=function(re,_e,be){x.write(re,_e)?be():V=be},ae._final=function(re){x.end(),ne=re},x.on("drain",function(){if(V){const re=V;V=null,re()}}),x.on("finish",function(){if(ne){const re=ne;ne=null,re()}})),G&&(w(k,re=>{G=!1,re&&P(k,re),de(re)}),k.on("readable",function(){if(W){const re=W;W=null,re()}}),k.on("end",function(){ae.push(null)}),ae._read=function(){for(;;){const re=k.read();if(re===null){W=ae._read;return}if(!ae.push(re))return}}),ae._destroy=function(re,_e){!re&&K!==null&&(re=new T),W=null,V=null,ne=null,K===null?_e(re):(K=_e,P(x,re),P(k,re))},ae}return ql}var Gl,kp;function Xn(){if(kp)return Gl;kp=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:o}=Et;Gl=f;const s=ju(),u=fd();o(f.prototype,s.prototype),o(f,s);{const b=r(u.prototype);for(let w=0;w<b.length;w++){const T=b[w];f.prototype[T]||(f.prototype[T]=u.prototype[T])}}function f(b){if(!(this instanceof f))return new f(b);s.call(this,b),u.call(this,b),b?(this.allowHalfOpen=b.allowHalfOpen!==!1,b.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),b.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(f.prototype,{writable:{__proto__:null,...t(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(u.prototype,"writableLength")},writableFinished:{__proto__:null,...t(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(b){this._readableState&&this._writableState&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}});let h;function l(){return h===void 0&&(h={}),h}f.fromWeb=function(b,w){return l().newStreamDuplexFromReadableWritablePair(b,w)},f.toWeb=function(b){return l().newReadableWritablePairFromDuplex(b)};let c;return f.from=function(b){return c||(c=lO()),c(b,"body")},Gl}const{ObjectSetPrototypeOf:hy,Symbol:cO}=Et;var gy=Zn;const{ERR_METHOD_NOT_IMPLEMENTED:dO}=ur.codes,ld=Xn(),{getHighWaterMark:hO}=Du;hy(Zn.prototype,ld.prototype);hy(Zn,ld);const Rs=cO("kCallback");function Zn(e){if(!(this instanceof Zn))return new Zn(e);const t=e?hO(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),ld.call(this,e),this._readableState.sync=!1,this[Rs]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",gO)}function xc(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,r)=>{if(t){e?e(t):this.destroy(t);return}r!=null&&this.push(r),this.push(null),e&&e()}):(this.push(null),e&&e())}function gO(){this._final!==xc&&xc.call(this)}Zn.prototype._final=xc;Zn.prototype._transform=function(e,t,r){throw new dO("_transform()")};Zn.prototype._write=function(e,t,r){const o=this._readableState,s=this._writableState,u=o.length;this._transform(e,t,(f,h)=>{if(f){r(f);return}h!=null&&this.push(h),s.ended||u===o.length||o.length<o.highWaterMark?r():this[Rs]=r})};Zn.prototype._read=function(){if(this[Rs]){const e=this[Rs];this[Rs]=null,e()}};const{ObjectSetPrototypeOf:py}=Et;var by=Lo;const cd=gy;py(Lo.prototype,cd.prototype);py(Lo,cd);function Lo(e){if(!(this instanceof Lo))return new Lo(e);cd.call(this,e)}Lo.prototype._transform=function(e,t,r){r(null,e)};const Ss=$.browserExports,{ArrayIsArray:pO,Promise:bO,SymbolAsyncIterator:_O,SymbolDispose:yO}=Et,_u=Ai,{once:wO}=_r,mO=Uo,Fp=Xn(),{aggregateTwoErrors:EO,codes:{ERR_INVALID_ARG_TYPE:Dc,ERR_INVALID_RETURN_VALUE:Vl,ERR_MISSING_ARGS:vO,ERR_STREAM_DESTROYED:SO,ERR_STREAM_PREMATURE_CLOSE:RO},AbortError:AO}=ur,{validateFunction:TO,validateAbortSignal:IO}=xs,{isIterable:Fi,isReadable:zl,isReadableNodeStream:fu,isNodeStream:Hp,isTransformStream:Ro,isWebStream:OO,isReadableStream:Kl,isReadableFinished:PO}=ti,CO=globalThis.AbortController||Ps().AbortController;let Jl,Yl,Xl;function Wp(e,t,r){let o=!1;e.on("close",()=>{o=!0});const s=_u(e,{readable:t,writable:r},u=>{o=!u});return{destroy:u=>{o||(o=!0,mO.destroyer(e,u||new SO("pipe")))},cleanup:s}}function LO(e){return TO(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Zl(e){if(Fi(e))return e;if(fu(e))return $O(e);throw new Dc("val",["Readable","Iterable","AsyncIterable"],e)}async function*$O(e){Yl||(Yl=ju()),yield*Yl.prototype[_O].call(e)}async function Ya(e,t,r,{end:o}){let s,u=null;const f=c=>{if(c&&(s=c),u){const b=u;u=null,b()}},h=()=>new bO((c,b)=>{s?b(s):u=()=>{s?b(s):c()}});t.on("drain",f);const l=_u(t,{readable:!1},f);try{t.writableNeedDrain&&await h();for await(const c of e)t.write(c)||await h();o&&(t.end(),await h()),r()}catch(c){r(s!==c?EO(s,c):c)}finally{l(),t.off("drain",f)}}async function Ql(e,t,r,{end:o}){Ro(t)&&(t=t.writable);const s=t.getWriter();try{for await(const u of e)await s.ready,s.write(u).catch(()=>{});await s.ready,o&&await s.close(),r()}catch(u){try{await s.abort(u),r(u)}catch(f){r(f)}}}function BO(...e){return _y(e,wO(LO(e)))}function _y(e,t,r){if(e.length===1&&pO(e[0])&&(e=e[0]),e.length<2)throw new vO("streams");const o=new CO,s=o.signal,u=r==null?void 0:r.signal,f=[];IO(u,"options.signal");function h(){L(new AO)}Xl=Xl||_r.addAbortListener;let l;u&&(l=Xl(u,h));let c,b;const w=[];let T=0;function m(B){L(B,--T===0)}function L(B,S){var E;if(B&&(!c||c.code==="ERR_STREAM_PREMATURE_CLOSE")&&(c=B),!(!c&&!S)){for(;w.length;)w.shift()(c);(E=l)===null||E===void 0||E[yO](),o.abort(),S&&(c||f.forEach(U=>U()),Ss.nextTick(t,c,b))}}let P;for(let B=0;B<e.length;B++){const S=e[B],E=B<e.length-1,U=B>0,Q=E||(r==null?void 0:r.end)!==!1,ce=B===e.length-1;if(Hp(S)){let ue=function(te){te&&te.name!=="AbortError"&&te.code!=="ERR_STREAM_PREMATURE_CLOSE"&&m(te)};if(Q){const{destroy:te,cleanup:Se}=Wp(S,E,U);w.push(te),zl(S)&&ce&&f.push(Se)}S.on("error",ue),zl(S)&&ce&&f.push(()=>{S.removeListener("error",ue)})}if(B===0)if(typeof S=="function"){if(P=S({signal:s}),!Fi(P))throw new Vl("Iterable, AsyncIterable or Stream","source",P)}else Fi(S)||fu(S)||Ro(S)?P=S:P=Fp.from(S);else if(typeof S=="function"){if(Ro(P)){var O;P=Zl((O=P)===null||O===void 0?void 0:O.readable)}else P=Zl(P);if(P=S(P,{signal:s}),E){if(!Fi(P,!0))throw new Vl("AsyncIterable",`transform[${B-1}]`,P)}else{var M;Jl||(Jl=by);const ue=new Jl({objectMode:!0}),te=(M=P)===null||M===void 0?void 0:M.then;if(typeof te=="function")T++,te.call(P,H=>{b=H,H!=null&&ue.write(H),Q&&ue.end(),Ss.nextTick(m)},H=>{ue.destroy(H),Ss.nextTick(m,H)});else if(Fi(P,!0))T++,Ya(P,ue,m,{end:Q});else if(Kl(P)||Ro(P)){const H=P.readable||P;T++,Ya(H,ue,m,{end:Q})}else throw new Vl("AsyncIterable or Promise","destination",P);P=ue;const{destroy:Se,cleanup:me}=Wp(P,!1,!0);w.push(Se),ce&&f.push(me)}}else if(Hp(S)){if(fu(P)){T+=2;const ue=NO(P,S,m,{end:Q});zl(S)&&ce&&f.push(ue)}else if(Ro(P)||Kl(P)){const ue=P.readable||P;T++,Ya(ue,S,m,{end:Q})}else if(Fi(P))T++,Ya(P,S,m,{end:Q});else throw new Dc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);P=S}else if(OO(S)){if(fu(P))T++,Ql(Zl(P),S,m,{end:Q});else if(Kl(P)||Fi(P))T++,Ql(P,S,m,{end:Q});else if(Ro(P))T++,Ql(P.readable,S,m,{end:Q});else throw new Dc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);P=S}else P=Fp.from(S)}return(s!=null&&s.aborted||u!=null&&u.aborted)&&Ss.nextTick(h),P}function NO(e,t,r,{end:o}){let s=!1;if(t.on("close",()=>{s||r(new RO)}),e.pipe(t,{end:!1}),o){let u=function(){s=!0,t.end()};PO(e)?Ss.nextTick(u):e.once("end",u)}else r();return _u(e,{readable:!0,writable:!1},u=>{const f=e._readableState;u&&u.code==="ERR_STREAM_PREMATURE_CLOSE"&&f&&f.ended&&!f.errored&&!f.errorEmitted?e.once("end",r).once("error",r):r(u)}),_u(t,{readable:!1,writable:!0},r)}var dd={pipelineImpl:_y,pipeline:BO};const{pipeline:MO}=dd,Xa=Xn(),{destroyer:xO}=Uo,{isNodeStream:Za,isReadable:qp,isWritable:Gp,isWebStream:ec,isTransformStream:ki,isWritableStream:Vp,isReadableStream:zp}=ti,{AbortError:DO,codes:{ERR_INVALID_ARG_VALUE:Kp,ERR_MISSING_ARGS:jO}}=ur,UO=Ai;var yy=function(...t){if(t.length===0)throw new jO("streams");if(t.length===1)return Xa.from(t[0]);const r=[...t];if(typeof t[0]=="function"&&(t[0]=Xa.from(t[0])),typeof t[t.length-1]=="function"){const m=t.length-1;t[m]=Xa.from(t[m])}for(let m=0;m<t.length;++m)if(!(!Za(t[m])&&!ec(t[m]))){if(m<t.length-1&&!(qp(t[m])||zp(t[m])||ki(t[m])))throw new Kp(`streams[${m}]`,r[m],"must be readable");if(m>0&&!(Gp(t[m])||Vp(t[m])||ki(t[m])))throw new Kp(`streams[${m}]`,r[m],"must be writable")}let o,s,u,f,h;function l(m){const L=f;f=null,L?L(m):m?h.destroy(m):!T&&!w&&h.destroy()}const c=t[0],b=MO(t,l),w=!!(Gp(c)||Vp(c)||ki(c)),T=!!(qp(b)||zp(b)||ki(b));if(h=new Xa({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(b!=null&&b.readableObjectMode),writable:w,readable:T}),w){if(Za(c))h._write=function(L,P,O){c.write(L,P)?O():o=O},h._final=function(L){c.end(),s=L},c.on("drain",function(){if(o){const L=o;o=null,L()}});else if(ec(c)){const P=(ki(c)?c.writable:c).getWriter();h._write=async function(O,M,B){try{await P.ready,P.write(O).catch(()=>{}),B()}catch(S){B(S)}},h._final=async function(O){try{await P.ready,P.close().catch(()=>{}),s=O}catch(M){O(M)}}}const m=ki(b)?b.readable:b;UO(m,()=>{if(s){const L=s;s=null,L()}})}if(T){if(Za(b))b.on("readable",function(){if(u){const m=u;u=null,m()}}),b.on("end",function(){h.push(null)}),h._read=function(){for(;;){const m=b.read();if(m===null){u=h._read;return}if(!h.push(m))return}};else if(ec(b)){const L=(ki(b)?b.readable:b).getReader();h._read=async function(){for(;;)try{const{value:P,done:O}=await L.read();if(!h.push(P))return;if(O){h.push(null);return}}catch{return}}}}return h._destroy=function(m,L){!m&&f!==null&&(m=new DO),u=null,o=null,s=null,f===null?L(m):(f=L,Za(b)&&xO(b,m))},h};const kO=globalThis.AbortController||Ps().AbortController,{codes:{ERR_INVALID_ARG_VALUE:FO,ERR_INVALID_ARG_TYPE:Ds,ERR_MISSING_ARGS:HO,ERR_OUT_OF_RANGE:WO},AbortError:Pn}=ur,{validateAbortSignal:Yi,validateInteger:Jp,validateObject:Xi}=xs,qO=Et.Symbol("kWeak"),GO=Et.Symbol("kResistStopPropagation"),{finished:VO}=Ai,zO=yy,{addAbortSignalNoValidate:KO}=xu,{isWritable:JO,isNodeStream:YO}=ti,{deprecate:XO}=_r,{ArrayPrototypePush:ZO,Boolean:QO,MathFloor:Yp,Number:e2,NumberIsNaN:t2,Promise:Xp,PromiseReject:Zp,PromiseResolve:r2,PromisePrototypeThen:Qp,Symbol:wy}=Et,yu=wy("kEmpty"),eb=wy("kEof");function n2(e,t){if(t!=null&&Xi(t,"options"),(t==null?void 0:t.signal)!=null&&Yi(t.signal,"options.signal"),YO(e)&&!JO(e))throw new FO("stream",e,"must be writable");const r=zO(this,e);return t!=null&&t.signal&&KO(t.signal,r),r}function Uu(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);t!=null&&Xi(t,"options"),(t==null?void 0:t.signal)!=null&&Yi(t.signal,"options.signal");let r=1;(t==null?void 0:t.concurrency)!=null&&(r=Yp(t.concurrency));let o=r-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=Yp(t.highWaterMark)),Jp(r,"options.concurrency",1),Jp(o,"options.highWaterMark",0),o+=r,(async function*(){const u=_r.AbortSignalAny([t==null?void 0:t.signal].filter(QO)),f=this,h=[],l={signal:u};let c,b,w=!1,T=0;function m(){w=!0,L()}function L(){T-=1,P()}function P(){b&&!w&&T<r&&h.length<o&&(b(),b=null)}async function O(){try{for await(let M of f){if(w)return;if(u.aborted)throw new Pn;try{if(M=e(M,l),M===yu)continue;M=r2(M)}catch(B){M=Zp(B)}T+=1,Qp(M,L,m),h.push(M),c&&(c(),c=null),!w&&(h.length>=o||T>=r)&&await new Xp(B=>{b=B})}h.push(eb)}catch(M){const B=Zp(M);Qp(B,L,m),h.push(B)}finally{w=!0,c&&(c(),c=null)}}O();try{for(;;){for(;h.length>0;){const M=await h[0];if(M===eb)return;if(u.aborted)throw new Pn;M!==yu&&(yield M),h.shift(),P()}await new Xp(M=>{c=M})}}finally{w=!0,b&&(b(),b=null)}}).call(this)}function i2(e=void 0){return e!=null&&Xi(e,"options"),(e==null?void 0:e.signal)!=null&&Yi(e.signal,"options.signal"),(async function*(){let r=0;for await(const s of this){var o;if(e!=null&&(o=e.signal)!==null&&o!==void 0&&o.aborted)throw new Pn({cause:e.signal.reason});yield[r++,s]}}).call(this)}async function my(e,t=void 0){for await(const r of hd.call(this,e,t))return!0;return!1}async function o2(e,t=void 0){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);return!await my.call(this,async(...r)=>!await e(...r),t)}async function s2(e,t){for await(const r of hd.call(this,e,t))return r}async function a2(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s),yu}for await(const o of Uu.call(this,r,t));}function hd(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s)?o:yu}return Uu.call(this,r,t)}class u2 extends HO{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function f2(e,t,r){var o;if(typeof e!="function")throw new Ds("reducer",["Function","AsyncFunction"],e);r!=null&&Xi(r,"options"),(r==null?void 0:r.signal)!=null&&Yi(r.signal,"options.signal");let s=arguments.length>1;if(r!=null&&(o=r.signal)!==null&&o!==void 0&&o.aborted){const c=new Pn(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await VO(this.destroy(c)),c}const u=new kO,f=u.signal;if(r!=null&&r.signal){const c={once:!0,[qO]:this,[GO]:!0};r.signal.addEventListener("abort",()=>u.abort(),c)}let h=!1;try{for await(const c of this){var l;if(h=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new Pn;s?t=await e(t,c,{signal:f}):(t=c,s=!0)}if(!h&&!s)throw new u2}finally{u.abort()}return t}async function l2(e){e!=null&&Xi(e,"options"),(e==null?void 0:e.signal)!=null&&Yi(e.signal,"options.signal");const t=[];for await(const o of this){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Pn(void 0,{cause:e.signal.reason});ZO(t,o)}return t}function c2(e,t){const r=Uu.call(this,e,t);return(async function*(){for await(const s of r)yield*s}).call(this)}function Ey(e){if(e=e2(e),t2(e))return 0;if(e<0)throw new WO("number",">= 0",e);return e}function d2(e,t=void 0){return t!=null&&Xi(t,"options"),(t==null?void 0:t.signal)!=null&&Yi(t.signal,"options.signal"),e=Ey(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Pn;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Pn;e--<=0&&(yield u)}}).call(this)}function h2(e,t=void 0){return t!=null&&Xi(t,"options"),(t==null?void 0:t.signal)!=null&&Yi(t.signal,"options.signal"),e=Ey(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Pn;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Pn;if(e-- >0&&(yield u),e<=0)return}}).call(this)}nd.streamReturningOperators={asIndexedPairs:XO(i2,"readable.asIndexedPairs will be removed in a future version."),drop:d2,filter:hd,flatMap:c2,map:Uu,take:h2,compose:n2};nd.promiseReturningOperators={every:o2,forEach:a2,reduce:f2,toArray:l2,some:my,find:s2};var tc,tb;function vy(){if(tb)return tc;tb=1;const{ArrayPrototypePop:e,Promise:t}=Et,{isIterable:r,isNodeStream:o,isWebStream:s}=ti,{pipelineImpl:u}=dd,{finished:f}=Ai;Sy();function h(...l){return new t((c,b)=>{let w,T;const m=l[l.length-1];if(m&&typeof m=="object"&&!o(m)&&!r(m)&&!s(m)){const L=e(l);w=L.signal,T=L.end}u(l,(L,P)=>{L?b(L):c(P)},{signal:w,end:T})})}return tc={finished:f,pipeline:h},tc}var rb;function Sy(){if(rb)return jl.exports;rb=1;const{Buffer:e}=$.bufferPolyfill,{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:o}=Et,{promisify:{custom:s}}=_r,{streamReturningOperators:u,promiseReturningOperators:f}=nd,{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=ur,l=yy,{setDefaultHighWaterMark:c,getDefaultHighWaterMark:b}=Du,{pipeline:w}=dd,{destroyer:T}=Uo,m=Ai,L=vy(),P=ti,O=jl.exports=ud.Stream;O.isDestroyed=P.isDestroyed,O.isDisturbed=P.isDisturbed,O.isErrored=P.isErrored,O.isReadable=P.isReadable,O.isWritable=P.isWritable,O.Readable=ju();for(const B of r(u)){let E=function(...U){if(new.target)throw h();return O.Readable.from(o(S,this,U))};const S=u[B];t(E,"name",{__proto__:null,value:S.name}),t(E,"length",{__proto__:null,value:S.length}),t(O.Readable.prototype,B,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const B of r(f)){let E=function(...U){if(new.target)throw h();return o(S,this,U)};const S=f[B];t(E,"name",{__proto__:null,value:S.name}),t(E,"length",{__proto__:null,value:S.length}),t(O.Readable.prototype,B,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}O.Writable=fd(),O.Duplex=Xn(),O.Transform=gy,O.PassThrough=by,O.pipeline=w;const{addAbortSignal:M}=xu;return O.addAbortSignal=M,O.finished=m,O.destroy=T,O.compose=l,O.setDefaultHighWaterMark=c,O.getDefaultHighWaterMark=b,t(O,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return L}}),t(w,s,{__proto__:null,enumerable:!0,get(){return L.pipeline}}),t(m,s,{__proto__:null,enumerable:!0,get(){return L.finished}}),O.Stream=O,O._isUint8Array=function(S){return S instanceof Uint8Array},O._uint8ArrayToBuffer=function(S){return e.from(S.buffer,S.byteOffset,S.byteLength)},jl.exports}(function(e){const t=Sy(),r=vy(),o=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=o,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(oT);var g2={},Vi={},gd={},Ht={};class Ry extends TypeError{constructor(t,r){let o;const{message:s,explanation:u,...f}=t,{path:h}=t,l=h.length===0?s:`At path: ${h.join(".")} -- ${s}`;super(u??l),u!=null&&(this.cause=l),Object.assign(this,f),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()])}}function p2(e){return Wr(e)&&typeof e[Symbol.iterator]=="function"}function Wr(e){return typeof e=="object"&&e!=null}function nb(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Mt(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function b2(e){const{done:t,value:r}=e.next();return t?void 0:r}function _2(e,t,r,o){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:s,branch:u}=t,{type:f}=r,{refinement:h,message:l=`Expected a value of type \`${f}\`${h?` with refinement \`${h}\``:""}, but received: \`${Mt(o)}\``}=e;return{value:o,type:f,refinement:h,key:s[s.length-1],path:s,branch:u,...e,message:l}}function*jc(e,t,r,o){p2(e)||(e=[e]);for(const s of e){const u=_2(s,t,r,o);u&&(yield u)}}function*pd(e,t,r={}){const{path:o=[],branch:s=[e],coerce:u=!1,mask:f=!1}=r,h={path:o,branch:s};if(u&&(e=t.coercer(e,h),f&&t.type!=="type"&&Wr(t.schema)&&Wr(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,h))c.explanation=r.message,l="not_valid",yield[c,void 0];for(let[c,b,w]of t.entries(e,h)){const T=pd(b,w,{path:c===void 0?o:[...o,c],branch:c===void 0?s:[...s,b],coerce:u,mask:f,message:r.message});for(const m of T)m[0]?(l=m[0].refinement!=null?"not_refined":"not_valid",yield[m[0],void 0]):u&&(b=m[1],c===void 0?e=b:e instanceof Map?e.set(c,b):e instanceof Set?e.add(b):Wr(e)&&(b!==void 0||c in e)&&(e[c]=b))}if(l!=="not_valid")for(const c of t.refiner(e,h))c.explanation=r.message,l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class Ot{constructor(t){const{type:r,schema:o,validator:s,refiner:u,coercer:f=l=>l,entries:h=function*(){}}=t;this.type=r,this.schema=o,this.entries=h,this.coercer=f,s?this.validator=(l,c)=>{const b=s(l,c);return jc(b,c,this,l)}:this.validator=()=>[],u?this.refiner=(l,c)=>{const b=u(l,c);return jc(b,c,this,l)}:this.refiner=()=>[]}assert(t,r){return Ay(t,this,r)}create(t,r){return Ty(t,this,r)}is(t){return bd(t,this)}mask(t,r){return Iy(t,this,r)}validate(t,r={}){return ko(t,this,r)}}function Ay(e,t,r){const o=ko(e,t,{message:r});if(o[0])throw o[0]}function Ty(e,t,r){const o=ko(e,t,{coerce:!0,message:r});if(o[0])throw o[0];return o[1]}function Iy(e,t,r){const o=ko(e,t,{coerce:!0,mask:!0,message:r});if(o[0])throw o[0];return o[1]}function bd(e,t){return!ko(e,t)[0]}function ko(e,t,r={}){const o=pd(e,t,r),s=b2(o);return s[0]?[new Ry(s[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,s[1]]}function y2(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),o=Object.assign({},...r);return t?Us(o):js(o)}function yr(e,t){return new Ot({type:e,schema:null,validator:t})}function w2(e,t){return new Ot({...e,refiner:(r,o)=>r===void 0||e.refiner(r,o),validator(r,o){return r===void 0?!0:(t(r,o),e.validator(r,o))}})}function m2(e){return new Ot({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function E2(e){let t;return new Ot({type:"lazy",schema:null,*entries(r,o){t??(t=e()),yield*t.entries(r,o)},validator(r,o){return t??(t=e()),t.validator(r,o)},coercer(r,o){return t??(t=e()),t.coercer(r,o)},refiner(r,o){return t??(t=e()),t.refiner(r,o)}})}function v2(e,t){const{schema:r}=e,o={...r};for(const s of t)delete o[s];switch(e.type){case"type":return Us(o);default:return js(o)}}function S2(e){const t=e instanceof Ot,r=t?{...e.schema}:{...e};for(const o in r)r[o]=Oy(r[o]);return t&&e.type==="type"?Us(r):js(r)}function R2(e,t){const{schema:r}=e,o={};for(const s of t)o[s]=r[s];switch(e.type){case"type":return Us(o);default:return js(o)}}function A2(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),yr(e,t)}function T2(){return yr("any",()=>!0)}function I2(e){return new Ot({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,o]of t.entries())yield[r,o,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Mt(t)}`}})}function O2(){return yr("bigint",e=>typeof e=="bigint")}function P2(){return yr("boolean",e=>typeof e=="boolean")}function C2(){return yr("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${Mt(e)}`)}function L2(e){const t={},r=e.map(o=>Mt(o)).join();for(const o of e)t[o]=o;return new Ot({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${r}\`, but received: ${Mt(o)}`}})}function $2(){return yr("func",e=>typeof e=="function"||`Expected a function, but received: ${Mt(e)}`)}function B2(e){return yr("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Mt(t)}`)}function N2(){return yr("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${Mt(e)}`)}function M2(e){return new Ot({type:"intersection",schema:null,*entries(t,r){for(const o of e)yield*o.entries(t,r)},*validator(t,r){for(const o of e)yield*o.validator(t,r)},*refiner(t,r){for(const o of e)yield*o.refiner(t,r)}})}function x2(e){const t=Mt(e),r=typeof e;return new Ot({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${Mt(o)}`}})}function D2(e,t){return new Ot({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[o,s]of r.entries())yield[o,o,e],yield[o,s,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${Mt(r)}`}})}function _d(){return yr("never",()=>!1)}function j2(e){return new Ot({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U2(){return yr("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Mt(e)}`)}function js(e){const t=e?Object.keys(e):[],r=_d();return new Ot({type:"object",schema:e||null,*entries(o){if(e&&Wr(o)){const s=new Set(Object.keys(o));for(const u of t)s.delete(u),yield[u,o[u],e[u]];for(const u of s)yield[u,o[u],r]}},validator(o){return Wr(o)||`Expected an object, but received: ${Mt(o)}`},coercer(o){return Wr(o)?{...o}:o}})}function Oy(e){return new Ot({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function k2(e,t){return new Ot({type:"record",schema:null,*entries(r){if(Wr(r))for(const o in r){const s=r[o];yield[o,o,e],yield[o,s,t]}},validator(r){return Wr(r)||`Expected an object, but received: ${Mt(r)}`}})}function F2(){return yr("regexp",e=>e instanceof RegExp)}function H2(e){return new Ot({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${Mt(t)}`}})}function Py(){return yr("string",e=>typeof e=="string"||`Expected a string, but received: ${Mt(e)}`)}function W2(e){const t=_d();return new Ot({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const o=Math.max(e.length,r.length);for(let s=0;s<o;s++)yield[s,r[s],e[s]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Mt(r)}`}})}function Us(e){const t=Object.keys(e);return new Ot({type:"type",schema:e,*entries(r){if(Wr(r))for(const o of t)yield[o,r[o],e[o]]},validator(r){return Wr(r)||`Expected an object, but received: ${Mt(r)}`},coercer(r){return Wr(r)?{...r}:r}})}function q2(e){const t=e.map(r=>r.type).join(" | ");return new Ot({type:"union",schema:null,coercer(r){for(const o of e){const[s,u]=o.validate(r,{coerce:!0});if(!s)return u}return r},validator(r,o){const s=[];for(const u of e){const[...f]=pd(r,u,o),[h]=f;if(h[0])for(const[l]of f)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Mt(r)}`,...s]}})}function Cy(){return yr("unknown",()=>!0)}function yd(e,t,r){return new Ot({...e,coercer:(o,s)=>bd(o,t)?e.coercer(r(o,s),s):e.coercer(o,s)})}function G2(e,t,r={}){return yd(e,Cy(),o=>{const s=typeof t=="function"?t():t;if(o===void 0)return s;if(!r.strict&&nb(o)&&nb(s)){const u={...o};let f=!1;for(const h in s)u[h]===void 0&&(u[h]=s[h],f=!0);if(f)return u}return o})}function V2(e){return yd(e,Py(),t=>t.trim())}function z2(e){return Zi(e,"empty",t=>{const r=Ly(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function Ly(e){return e instanceof Map||e instanceof Set?e.size:e.length}function K2(e,t,r={}){const{exclusive:o}=r;return Zi(e,"max",s=>o?s<t:s<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${s}\``)}function J2(e,t,r={}){const{exclusive:o}=r;return Zi(e,"min",s=>o?s>t:s>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${s}\``)}function Y2(e){return Zi(e,"nonempty",t=>Ly(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function X2(e,t){return Zi(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function Z2(e,t,r=t){const o=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Zi(e,"size",u=>{if(typeof u=="number"||u instanceof Date)return t<=u&&u<=r||`${o} ${s} but received \`${u}\``;if(u instanceof Map||u instanceof Set){const{size:f}=u;return t<=f&&f<=r||`${o} with a size ${s} but received one with a size of \`${f}\``}else{const{length:f}=u;return t<=f&&f<=r||`${o} with a length ${s} but received one with a length of \`${f}\``}})}function Zi(e,t,r){return new Ot({...e,*refiner(o,s){yield*e.refiner(o,s);const u=r(o,s),f=jc(u,s,e,o);for(const h of f)yield{...h,refinement:t}}})}const Q2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Ot,StructError:Ry,any:T2,array:I2,assert:Ay,assign:y2,bigint:O2,boolean:P2,coerce:yd,create:Ty,date:C2,defaulted:G2,define:yr,deprecated:w2,dynamic:m2,empty:z2,enums:L2,func:$2,instance:B2,integer:N2,intersection:M2,is:bd,lazy:E2,literal:x2,map:D2,mask:Iy,max:K2,min:J2,never:_d,nonempty:Y2,nullable:j2,number:U2,object:js,omit:v2,optional:Oy,partial:S2,pattern:X2,pick:R2,record:k2,refine:Zi,regexp:F2,set:H2,size:Z2,string:Py,struct:A2,trimmed:V2,tuple:W2,type:Us,union:q2,unknown:Cy,validate:ko},Symbol.toStringTag,{value:"Module"})),Qi=$.getAugmentedNamespace(Q2);Object.defineProperty(Ht,"__esModule",{value:!0});Ht.assertExhaustive=Ht.assertStruct=Ht.assert=Ht.AssertionError=void 0;const eP=Qi;function tP(e){return typeof e=="object"&&e!==null&&"message"in e}function rP(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function nP(e){const t=tP(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function $y(e,t){return rP(e)?new e({message:t}):e({message:t})}class wd extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}Ht.AssertionError=wd;function iP(e,t="Assertion failed.",r=wd){if(!e)throw t instanceof Error?t:$y(r,t)}Ht.assert=iP;function oP(e,t,r="Assertion failed",o=wd){try{(0,eP.assert)(e,t)}catch(s){throw $y(o,`${r}: ${nP(s)}.`)}}Ht.assertStruct=oP;function sP(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}Ht.assertExhaustive=sP;var ks={};Object.defineProperty(ks,"__esModule",{value:!0});ks.base64=void 0;const aP=Qi,uP=Ht,fP=(e,t={})=>{var r,o;const s=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,u=(o=t.characterSet)!==null&&o!==void 0?o:"base64";let f;u==="base64"?f=String.raw`[A-Za-z0-9+\/]`:((0,uP.assert)(u==="base64url"),f=String.raw`[-_A-Za-z0-9]`);let h;return s?h=new RegExp(`^(?:${f}{4})*(?:${f}{3}=|${f}{2}==)?$`,"u"):h=new RegExp(`^(?:${f}{4})*(?:${f}{2,3}|${f}{3}=|${f}{2}==)?$`,"u"),(0,aP.pattern)(e,h)};ks.base64=fP;var Xe={},Fs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Qi,r=Ht;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function o(c){return(0,t.is)(c,e.HexStruct)}e.isHexString=o;function s(c){return(0,t.is)(c,e.StrictHexStruct)}e.isStrictHexString=s;function u(c){(0,r.assert)(o(c),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function f(c){(0,r.assert)(s(c),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=f;function h(c){return c.startsWith("0x")?c:c.startsWith("0X")?`0x${c.substring(2)}`:`0x${c}`}e.add0x=h;function l(c){return c.startsWith("0x")||c.startsWith("0X")?c.substring(2):c}e.remove0x=l})(Fs);Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createDataView=Xe.concatBytes=Xe.valueToBytes=Xe.stringToBytes=Xe.numberToBytes=Xe.signedBigIntToBytes=Xe.bigIntToBytes=Xe.hexToBytes=Xe.bytesToString=Xe.bytesToNumber=Xe.bytesToSignedBigInt=Xe.bytesToBigInt=Xe.bytesToHex=Xe.assertIsBytes=Xe.isBytes=void 0;const Or=Ht,Uc=Fs,ib=48,ob=58,sb=87;function lP(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const cP=lP();function md(e){return e instanceof Uint8Array}Xe.isBytes=md;function Fo(e){(0,Or.assert)(md(e),"Value must be a Uint8Array.")}Xe.assertIsBytes=Fo;function By(e){if(Fo(e),e.length===0)return"0x";const t=cP(),r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t[e[o]];return(0,Uc.add0x)(r.join(""))}Xe.bytesToHex=By;function Ny(e){Fo(e);const t=By(e);return BigInt(t)}Xe.bytesToBigInt=Ny;function dP(e){Fo(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}Xe.bytesToSignedBigInt=dP;function hP(e){Fo(e);const t=Ny(e);return(0,Or.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}Xe.bytesToNumber=hP;function gP(e){return Fo(e),new TextDecoder().decode(e)}Xe.bytesToString=gP;function ku(e){var t;if(((t=e==null?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e))==="0x")return new Uint8Array;(0,Uc.assertIsHexString)(e);const r=(0,Uc.remove0x)(e).toLowerCase(),o=r.length%2===0?r:`0${r}`,s=new Uint8Array(o.length/2);for(let u=0;u<s.length;u++){const f=o.charCodeAt(u*2),h=o.charCodeAt(u*2+1),l=f-(f<ob?ib:sb),c=h-(h<ob?ib:sb);s[u]=l*16+c}return s}Xe.hexToBytes=ku;function My(e){(0,Or.assert)(typeof e=="bigint","Value must be a bigint."),(0,Or.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return ku(t)}Xe.bigIntToBytes=My;function pP(e,t){(0,Or.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function bP(e,t){(0,Or.assert)(typeof e=="bigint","Value must be a bigint."),(0,Or.assert)(typeof t=="number","Byte length must be a number."),(0,Or.assert)(t>0,"Byte length must be greater than 0."),(0,Or.assert)(pP(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let s=0;s<o.length;s++)o[s]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return o.reverse()}Xe.signedBigIntToBytes=bP;function xy(e){(0,Or.assert)(typeof e=="number","Value must be a number."),(0,Or.assert)(e>=0,"Value must be a non-negative number."),(0,Or.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return ku(t)}Xe.numberToBytes=xy;function Dy(e){return(0,Or.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}Xe.stringToBytes=Dy;function jy(e){if(typeof e=="bigint")return My(e);if(typeof e=="number")return xy(e);if(typeof e=="string")return e.startsWith("0x")?ku(e):Dy(e);if(md(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}Xe.valueToBytes=jy;function _P(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const u=jy(e[s]);t[s]=u,r+=u.length}const o=new Uint8Array(r);for(let s=0,u=0;s<t.length;s++)o.set(t[s],u),u+=t[s].length;return o}Xe.concatBytes=_P;function yP(e){if(typeof $.dist.Buffer<"u"&&e instanceof $.dist.Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}Xe.createDataView=yP;var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});Fu.ChecksumStruct=void 0;const ab=Qi,wP=ks;Fu.ChecksumStruct=(0,ab.size)((0,wP.base64)((0,ab.string)(),{paddingRequired:!0}),44,44);var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.createHex=Sn.createBytes=Sn.createBigInt=Sn.createNumber=void 0;const mt=Qi,mP=Ht,Uy=Xe,Hu=Fs,ky=(0,mt.union)([(0,mt.number)(),(0,mt.bigint)(),(0,mt.string)(),Hu.StrictHexStruct]),EP=(0,mt.coerce)((0,mt.number)(),ky,Number),vP=(0,mt.coerce)((0,mt.bigint)(),ky,BigInt);(0,mt.union)([Hu.StrictHexStruct,(0,mt.instance)(Uint8Array)]);const SP=(0,mt.coerce)((0,mt.instance)(Uint8Array),(0,mt.union)([Hu.StrictHexStruct]),Uy.hexToBytes),RP=(0,mt.coerce)(Hu.StrictHexStruct,(0,mt.instance)(Uint8Array),Uy.bytesToHex);function AP(e){try{const t=(0,mt.create)(e,EP);return(0,mP.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof mt.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}Sn.createNumber=AP;function TP(e){try{return(0,mt.create)(e,vP)}catch(t){throw t instanceof mt.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}Sn.createBigInt=TP;function IP(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,mt.create)(e,SP)}catch(t){throw t instanceof mt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sn.createBytes=IP;function OP(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,mt.create)(e,RP)}catch(t){throw t instanceof mt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sn.createHex=OP;var $o={},Fy=$.commonjsGlobal&&$.commonjsGlobal.__classPrivateFieldSet||function(e,t,r,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},ar=$.commonjsGlobal&&$.commonjsGlobal.__classPrivateFieldGet||function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},tn,mn;Object.defineProperty($o,"__esModule",{value:!0});$o.FrozenSet=$o.FrozenMap=void 0;class Ed{constructor(t){tn.set(this,void 0),Fy(this,tn,new Map(t),"f"),Object.freeze(this)}get size(){return ar(this,tn,"f").size}[(tn=new WeakMap,Symbol.iterator)](){return ar(this,tn,"f")[Symbol.iterator]()}entries(){return ar(this,tn,"f").entries()}forEach(t,r){return ar(this,tn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}get(t){return ar(this,tn,"f").get(t)}has(t){return ar(this,tn,"f").has(t)}keys(){return ar(this,tn,"f").keys()}values(){return ar(this,tn,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}$o.FrozenMap=Ed;class vd{constructor(t){mn.set(this,void 0),Fy(this,mn,new Set(t),"f"),Object.freeze(this)}get size(){return ar(this,mn,"f").size}[(mn=new WeakMap,Symbol.iterator)](){return ar(this,mn,"f")[Symbol.iterator]()}entries(){return ar(this,mn,"f").entries()}forEach(t,r){return ar(this,mn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}has(t){return ar(this,mn,"f").has(t)}keys(){return ar(this,mn,"f").keys()}values(){return ar(this,mn,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}$o.FrozenSet=vd;Object.freeze(Ed);Object.freeze(Ed.prototype);Object.freeze(vd);Object.freeze(vd.prototype);var Hy={};Object.defineProperty(Hy,"__esModule",{value:!0});var Wy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Qi,r=Ht,o=()=>(0,t.define)("finite number",U=>(0,t.is)(U,(0,t.number)())&&Number.isFinite(U));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),o(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(U,Q)=>{function ce(ue,te){const me=[...te.validator(ue,Q)];return me.length>0?me:!0}try{const ue=ce(U,e.UnsafeJsonStruct);return ue!==!0?ue:ce(JSON.parse(JSON.stringify(U)),e.UnsafeJsonStruct)}catch(ue){return ue instanceof RangeError?"Circular reference detected":!1}});function s(U){return(0,t.is)(U,e.JsonStruct)}e.isValidJson=s;function u(U){(0,r.assertStruct)(U,e.JsonStruct,"Invalid JSON value");const Q=JSON.stringify(U);return new TextEncoder().encode(Q).byteLength}e.getJsonSize=u,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function f(U){return(0,t.is)(U,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=f;function h(U,Q){(0,r.assertStruct)(U,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",Q)}e.assertIsJsonRpcNotification=h;function l(U){return(0,t.is)(U,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=l;function c(U,Q){(0,r.assertStruct)(U,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",Q)}e.assertIsJsonRpcRequest=c,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function b(U){return(0,t.is)(U,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=b;function w(U,Q){(0,r.assertStruct)(U,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",Q)}e.assertIsPendingJsonRpcResponse=w;function T(U){return(0,t.is)(U,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=T;function m(U,Q){(0,r.assertStruct)(U,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",Q)}e.assertIsJsonRpcResponse=m;function L(U){return(0,t.is)(U,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=L;function P(U,Q){(0,r.assertStruct)(U,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",Q)}e.assertIsJsonRpcSuccess=P;function O(U){return(0,t.is)(U,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=O;function M(U,Q){(0,r.assertStruct)(U,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",Q)}e.assertIsJsonRpcFailure=M;function B(U){return(0,t.is)(U,e.JsonRpcErrorStruct)}e.isJsonRpcError=B;function S(U,Q){(0,r.assertStruct)(U,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",Q)}e.assertIsJsonRpcError=S;function E(U){const{permitEmptyString:Q,permitFractions:ce,permitNull:ue}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},U);return Se=>!!(typeof Se=="number"&&(ce||Number.isInteger(Se))||typeof Se=="string"&&(Q||Se.length>0)||ue&&Se===null)}e.getJsonRpcIdValidator=E})(Wy);var qy={};Object.defineProperty(qy,"__esModule",{value:!0});var Bo={},PP=$.commonjsGlobal&&$.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.createModuleLogger=Bo.createProjectLogger=void 0;const CP=PP(ZA),LP=(0,CP.default)("metamask");function $P(e){return LP.extend(e)}Bo.createProjectLogger=$P;function BP(e,t){return e.extend(t)}Bo.createModuleLogger=BP;var Gy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(c){return Array.isArray(c)&&c.length>0}e.isNonEmptyArray=t;function r(c){return c==null}e.isNullOrUndefined=r;function o(c){return!!c&&typeof c=="object"&&!Array.isArray(c)}e.isObject=o;const s=(c,b)=>Object.hasOwnProperty.call(c,b);e.hasProperty=s,function(c){c[c.Null=4]="Null",c[c.Comma=1]="Comma",c[c.Wrapper=1]="Wrapper",c[c.True=4]="True",c[c.False=5]="False",c[c.Quote=1]="Quote",c[c.Colon=1]="Colon",c[c.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(c){if(typeof c!="object"||c===null)return!1;try{let b=c;for(;Object.getPrototypeOf(b)!==null;)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(c)===b}catch{return!1}}e.isPlainObject=u;function f(c){return c.charCodeAt(0)<=127}e.isASCII=f;function h(c){var b;return c.split("").reduce((T,m)=>f(m)?T+1:T+2,0)+((b=c.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&b!==void 0?b:[]).length}e.calculateStringSize=h;function l(c){return c.toString().length}e.calculateNumberSize=l})(Gy);var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.hexToBigInt=Rn.hexToNumber=Rn.bigIntToHex=Rn.numberToHex=void 0;const Oo=Ht,Cs=Fs,NP=e=>((0,Oo.assert)(typeof e=="number","Value must be a number."),(0,Oo.assert)(e>=0,"Value must be a non-negative number."),(0,Oo.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Cs.add0x)(e.toString(16)));Rn.numberToHex=NP;const MP=e=>((0,Oo.assert)(typeof e=="bigint","Value must be a bigint."),(0,Oo.assert)(e>=0,"Value must be a non-negative bigint."),(0,Cs.add0x)(e.toString(16)));Rn.bigIntToHex=MP;const xP=e=>{(0,Cs.assertIsHexString)(e);const t=parseInt(e,16);return(0,Oo.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Rn.hexToNumber=xP;const DP=e=>((0,Cs.assertIsHexString)(e),BigInt((0,Cs.add0x)(e)));Rn.hexToBigInt=DP;var Vy={};Object.defineProperty(Vy,"__esModule",{value:!0});var zy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,r=(u,f)=>{if(!t(u))throw new Error(`"${f}" must be a non-negative integer. Received: "${u}".`)};function o(u,f){return r(u,"count"),u*f}e.inMilliseconds=o;function s(u){return r(u,"timestamp"),Date.now()-u}e.timeSince=s})(zy);var Ky={};Object.defineProperty(Ky,"__esModule",{value:!0});var Jy={},kc={exports:{}};const jP="2.0.0",Yy=256,UP=Number.MAX_SAFE_INTEGER||9007199254740991,kP=16,FP=Yy-6,HP=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Wu={MAX_LENGTH:Yy,MAX_SAFE_COMPONENT_LENGTH:kP,MAX_SAFE_BUILD_LENGTH:FP,MAX_SAFE_INTEGER:UP,RELEASE_TYPES:HP,SEMVER_SPEC_VERSION:jP,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const WP=typeof $.dist.process=="object"&&$.dist.process.env&&$.dist.process.env.NODE_DEBUG&&/\bsemver\b/i.test($.dist.process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var qu=WP;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=Wu,u=qu;t=e.exports={};const f=t.re=[],h=t.safeRe=[],l=t.src=[],c=t.t={};let b=0;const w="[a-zA-Z0-9-]",T=[["\\s",1],["\\d",s],[w,o]],m=P=>{for(const[O,M]of T)P=P.split(`${O}*`).join(`${O}{0,${M}}`).split(`${O}+`).join(`${O}{1,${M}}`);return P},L=(P,O,M)=>{const B=m(O),S=b++;u(P,S,O),c[P]=S,l[S]=O,f[S]=new RegExp(O,M?"g":void 0),h[S]=new RegExp(B,M?"g":void 0)};L("NUMERICIDENTIFIER","0|[1-9]\\d*"),L("NUMERICIDENTIFIERLOOSE","\\d+"),L("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${w}*`),L("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),L("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),L("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),L("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),L("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),L("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),L("BUILDIDENTIFIER",`${w}+`),L("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),L("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),L("FULL",`^${l[c.FULLPLAIN]}$`),L("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),L("LOOSE",`^${l[c.LOOSEPLAIN]}$`),L("GTLT","((?:<|>)?=?)"),L("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),L("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),L("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),L("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),L("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),L("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),L("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),L("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),L("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),L("COERCERTL",l[c.COERCE],!0),L("COERCERTLFULL",l[c.COERCEFULL],!0),L("LONETILDE","(?:~>?)"),L("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",L("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),L("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),L("LONECARET","(?:\\^)"),L("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",L("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),L("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),L("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),L("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),L("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",L("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),L("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),L("STAR","(<|>)?=?\\s*\\*"),L("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),L("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(kc,kc.exports);var Hs=kc.exports;const qP=Object.freeze({loose:!0}),GP=Object.freeze({}),VP=e=>e?typeof e!="object"?qP:e:GP;var Sd=VP;const ub=/^[0-9]+$/,Xy=(e,t)=>{const r=ub.test(e),o=ub.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},zP=(e,t)=>Xy(t,e);var Zy={compareIdentifiers:Xy,rcompareIdentifiers:zP};const Qa=qu,{MAX_LENGTH:fb,MAX_SAFE_INTEGER:eu}=Wu,{safeRe:lb,t:cb}=Hs,KP=Sd,{compareIdentifiers:Eo}=Zy;let JP=class En{constructor(t,r){if(r=KP(r),t instanceof En){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>fb)throw new TypeError(`version is longer than ${fb} characters`);Qa("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?lb[cb.LOOSE]:lb[cb.FULL]);if(!o)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>eu||this.major<0)throw new TypeError("Invalid major version");if(this.minor>eu||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>eu||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const u=+s;if(u>=0&&u<eu)return u}return s}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Qa("SemVer.compare",this.version,this.options,t),!(t instanceof En)){if(typeof t=="string"&&t===this.version)return 0;t=new En(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof En||(t=new En(t,this.options)),Eo(this.major,t.major)||Eo(this.minor,t.minor)||Eo(this.patch,t.patch)}comparePre(t){if(t instanceof En||(t=new En(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const o=this.prerelease[r],s=t.prerelease[r];if(Qa("prerelease compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return Eo(o,s)}while(++r)}compareBuild(t){t instanceof En||(t=new En(t,this.options));let r=0;do{const o=this.build[r],s=t.build[r];if(Qa("build compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return Eo(o,s)}while(++r)}inc(t,r,o){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(o)?1:0;if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let u=[r,s];o===!1&&(u=[r]),Eo(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var fr=JP;const db=fr,YP=(e,t,r=!1)=>{if(e instanceof db)return e;try{return new db(e,t)}catch(o){if(!r)return null;throw o}};var Ho=YP;const XP=Ho,ZP=(e,t)=>{const r=XP(e,t);return r?r.version:null};var QP=ZP;const eC=Ho,tC=(e,t)=>{const r=eC(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var rC=tC;const hb=fr,nC=(e,t,r,o,s)=>{typeof r=="string"&&(s=o,o=r,r=void 0);try{return new hb(e instanceof hb?e.version:e,r).inc(t,o,s).version}catch{return null}};var iC=nC;const gb=Ho,oC=(e,t)=>{const r=gb(e,null,!0),o=gb(t,null,!0),s=r.compare(o);if(s===0)return null;const u=s>0,f=u?r:o,h=u?o:r,l=!!f.prerelease.length;if(!!h.prerelease.length&&!l)return!h.patch&&!h.minor?"major":f.patch?"patch":f.minor?"minor":"major";const b=l?"pre":"";return r.major!==o.major?b+"major":r.minor!==o.minor?b+"minor":r.patch!==o.patch?b+"patch":"prerelease"};var sC=oC;const aC=fr,uC=(e,t)=>new aC(e,t).major;var fC=uC;const lC=fr,cC=(e,t)=>new lC(e,t).minor;var dC=cC;const hC=fr,gC=(e,t)=>new hC(e,t).patch;var pC=gC;const bC=Ho,_C=(e,t)=>{const r=bC(e,t);return r&&r.prerelease.length?r.prerelease:null};var yC=_C;const pb=fr,wC=(e,t,r)=>new pb(e,r).compare(new pb(t,r));var on=wC;const mC=on,EC=(e,t,r)=>mC(t,e,r);var vC=EC;const SC=on,RC=(e,t)=>SC(e,t,!0);var AC=RC;const bb=fr,TC=(e,t,r)=>{const o=new bb(e,r),s=new bb(t,r);return o.compare(s)||o.compareBuild(s)};var Rd=TC;const IC=Rd,OC=(e,t)=>e.sort((r,o)=>IC(r,o,t));var PC=OC;const CC=Rd,LC=(e,t)=>e.sort((r,o)=>CC(o,r,t));var $C=LC;const BC=on,NC=(e,t,r)=>BC(e,t,r)>0;var Gu=NC;const MC=on,xC=(e,t,r)=>MC(e,t,r)<0;var Ad=xC;const DC=on,jC=(e,t,r)=>DC(e,t,r)===0;var Qy=jC;const UC=on,kC=(e,t,r)=>UC(e,t,r)!==0;var e0=kC;const FC=on,HC=(e,t,r)=>FC(e,t,r)>=0;var Td=HC;const WC=on,qC=(e,t,r)=>WC(e,t,r)<=0;var Id=qC;const GC=Qy,VC=e0,zC=Gu,KC=Td,JC=Ad,YC=Id,XC=(e,t,r,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return GC(e,r,o);case"!=":return VC(e,r,o);case">":return zC(e,r,o);case">=":return KC(e,r,o);case"<":return JC(e,r,o);case"<=":return YC(e,r,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var t0=XC;const ZC=fr,QC=Ho,{safeRe:tu,t:ru}=Hs,eL=(e,t)=>{if(e instanceof ZC)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?tu[ru.COERCEFULL]:tu[ru.COERCE]);else{const l=t.includePrerelease?tu[ru.COERCERTLFULL]:tu[ru.COERCERTL];let c;for(;(c=l.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||c.index+c[0].length!==r.index+r[0].length)&&(r=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(r===null)return null;const o=r[2],s=r[3]||"0",u=r[4]||"0",f=t.includePrerelease&&r[5]?`-${r[5]}`:"",h=t.includePrerelease&&r[6]?`+${r[6]}`:"";return QC(`${o}.${s}.${u}${f}${h}`,t)};var tL=eL;class rL{constructor(){this.max=1e3,this.map=new Map}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}}var nL=rL,rc,_b;function sn(){if(_b)return rc;_b=1;const e=/\s+/g;class t{constructor(G,Y){if(Y=s(Y),G instanceof t)return G.loose===!!Y.loose&&G.includePrerelease===!!Y.includePrerelease?G:new t(G.raw,Y);if(G instanceof u)return this.raw=G.value,this.set=[[G]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,this.includePrerelease=!!Y.includePrerelease,this.raw=G.trim().replace(e," "),this.set=this.raw.split("||").map(V=>this.parseRange(V.trim())).filter(V=>V.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const V=this.set[0];if(this.set=this.set.filter(ne=>!P(ne[0])),this.set.length===0)this.set=[V];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&O(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let G=0;G<this.set.length;G++){G>0&&(this.formatted+="||");const Y=this.set[G];for(let V=0;V<Y.length;V++)V>0&&(this.formatted+=" "),this.formatted+=Y[V].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(G){const V=((this.options.includePrerelease&&m)|(this.options.loose&&L))+":"+G,ne=o.get(V);if(ne)return ne;const W=this.options.loose,K=W?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];G=G.replace(K,H(this.options.includePrerelease)),f("hyphen replace",G),G=G.replace(l[c.COMPARATORTRIM],b),f("comparator trim",G),G=G.replace(l[c.TILDETRIM],w),f("tilde trim",G),G=G.replace(l[c.CARETTRIM],T),f("caret trim",G);let ae=G.split(" ").map(be=>B(be,this.options)).join(" ").split(/\s+/).map(be=>me(be,this.options));W&&(ae=ae.filter(be=>(f("loose invalid filter",be,this.options),!!be.match(l[c.COMPARATORLOOSE])))),f("range list",ae);const de=new Map,re=ae.map(be=>new u(be,this.options));for(const be of re){if(P(be))return[be];de.set(be.value,be)}de.size>1&&de.has("")&&de.delete("");const _e=[...de.values()];return o.set(V,_e),_e}intersects(G,Y){if(!(G instanceof t))throw new TypeError("a Range is required");return this.set.some(V=>M(V,Y)&&G.set.some(ne=>M(ne,Y)&&V.every(W=>ne.every(K=>W.intersects(K,Y)))))}test(G){if(!G)return!1;if(typeof G=="string")try{G=new h(G,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(k(this.set[Y],G,this.options))return!0;return!1}}rc=t;const r=nL,o=new r,s=Sd,u=Vu(),f=qu,h=fr,{safeRe:l,t:c,comparatorTrimReplace:b,tildeTrimReplace:w,caretTrimReplace:T}=Hs,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:L}=Wu,P=x=>x.value==="<0.0.0-0",O=x=>x.value==="",M=(x,G)=>{let Y=!0;const V=x.slice();let ne=V.pop();for(;Y&&V.length;)Y=V.every(W=>ne.intersects(W,G)),ne=V.pop();return Y},B=(x,G)=>(f("comp",x,G),x=Q(x,G),f("caret",x),x=E(x,G),f("tildes",x),x=ue(x,G),f("xrange",x),x=Se(x,G),f("stars",x),x),S=x=>!x||x.toLowerCase()==="x"||x==="*",E=(x,G)=>x.trim().split(/\s+/).map(Y=>U(Y,G)).join(" "),U=(x,G)=>{const Y=G.loose?l[c.TILDELOOSE]:l[c.TILDE];return x.replace(Y,(V,ne,W,K,ae)=>{f("tilde",x,V,ne,W,K,ae);let de;return S(ne)?de="":S(W)?de=`>=${ne}.0.0 <${+ne+1}.0.0-0`:S(K)?de=`>=${ne}.${W}.0 <${ne}.${+W+1}.0-0`:ae?(f("replaceTilde pr",ae),de=`>=${ne}.${W}.${K}-${ae} <${ne}.${+W+1}.0-0`):de=`>=${ne}.${W}.${K} <${ne}.${+W+1}.0-0`,f("tilde return",de),de})},Q=(x,G)=>x.trim().split(/\s+/).map(Y=>ce(Y,G)).join(" "),ce=(x,G)=>{f("caret",x,G);const Y=G.loose?l[c.CARETLOOSE]:l[c.CARET],V=G.includePrerelease?"-0":"";return x.replace(Y,(ne,W,K,ae,de)=>{f("caret",x,ne,W,K,ae,de);let re;return S(W)?re="":S(K)?re=`>=${W}.0.0${V} <${+W+1}.0.0-0`:S(ae)?W==="0"?re=`>=${W}.${K}.0${V} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.0${V} <${+W+1}.0.0-0`:de?(f("replaceCaret pr",de),W==="0"?K==="0"?re=`>=${W}.${K}.${ae}-${de} <${W}.${K}.${+ae+1}-0`:re=`>=${W}.${K}.${ae}-${de} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.${ae}-${de} <${+W+1}.0.0-0`):(f("no pr"),W==="0"?K==="0"?re=`>=${W}.${K}.${ae}${V} <${W}.${K}.${+ae+1}-0`:re=`>=${W}.${K}.${ae}${V} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.${ae} <${+W+1}.0.0-0`),f("caret return",re),re})},ue=(x,G)=>(f("replaceXRanges",x,G),x.split(/\s+/).map(Y=>te(Y,G)).join(" ")),te=(x,G)=>{x=x.trim();const Y=G.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return x.replace(Y,(V,ne,W,K,ae,de)=>{f("xRange",x,V,ne,W,K,ae,de);const re=S(W),_e=re||S(K),be=_e||S(ae),R=be;return ne==="="&&R&&(ne=""),de=G.includePrerelease?"-0":"",re?ne===">"||ne==="<"?V="<0.0.0-0":V="*":ne&&R?(_e&&(K=0),ae=0,ne===">"?(ne=">=",_e?(W=+W+1,K=0,ae=0):(K=+K+1,ae=0)):ne==="<="&&(ne="<",_e?W=+W+1:K=+K+1),ne==="<"&&(de="-0"),V=`${ne+W}.${K}.${ae}${de}`):_e?V=`>=${W}.0.0${de} <${+W+1}.0.0-0`:be&&(V=`>=${W}.${K}.0${de} <${W}.${+K+1}.0-0`),f("xRange return",V),V})},Se=(x,G)=>(f("replaceStars",x,G),x.trim().replace(l[c.STAR],"")),me=(x,G)=>(f("replaceGTE0",x,G),x.trim().replace(l[G.includePrerelease?c.GTE0PRE:c.GTE0],"")),H=x=>(G,Y,V,ne,W,K,ae,de,re,_e,be,R)=>(S(V)?Y="":S(ne)?Y=`>=${V}.0.0${x?"-0":""}`:S(W)?Y=`>=${V}.${ne}.0${x?"-0":""}`:K?Y=`>=${Y}`:Y=`>=${Y}${x?"-0":""}`,S(re)?de="":S(_e)?de=`<${+re+1}.0.0-0`:S(be)?de=`<${re}.${+_e+1}.0-0`:R?de=`<=${re}.${_e}.${be}-${R}`:x?de=`<${re}.${_e}.${+be+1}-0`:de=`<=${de}`,`${Y} ${de}`.trim()),k=(x,G,Y)=>{for(let V=0;V<x.length;V++)if(!x[V].test(G))return!1;if(G.prerelease.length&&!Y.includePrerelease){for(let V=0;V<x.length;V++)if(f(x[V].semver),x[V].semver!==u.ANY&&x[V].semver.prerelease.length>0){const ne=x[V].semver;if(ne.major===G.major&&ne.minor===G.minor&&ne.patch===G.patch)return!0}return!1}return!0};return rc}var nc,yb;function Vu(){if(yb)return nc;yb=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(b,w){if(w=r(w),b instanceof t){if(b.loose===!!w.loose)return b;b=b.value}b=b.trim().split(/\s+/).join(" "),f("comparator",b,w),this.options=w,this.loose=!!w.loose,this.parse(b),this.semver===e?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(b){const w=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],T=b.match(w);if(!T)throw new TypeError(`Invalid comparator: ${b}`);this.operator=T[1]!==void 0?T[1]:"",this.operator==="="&&(this.operator=""),T[2]?this.semver=new h(T[2],this.options.loose):this.semver=e}toString(){return this.value}test(b){if(f("Comparator.test",b,this.options.loose),this.semver===e||b===e)return!0;if(typeof b=="string")try{b=new h(b,this.options)}catch{return!1}return u(b,this.operator,this.semver,this.options)}intersects(b,w){if(!(b instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(b.value,w).test(this.value):b.operator===""?b.value===""?!0:new l(this.value,w).test(b.semver):(w=r(w),w.includePrerelease&&(this.value==="<0.0.0-0"||b.value==="<0.0.0-0")||!w.includePrerelease&&(this.value.startsWith("<0.0.0")||b.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&b.operator.startsWith(">")||this.operator.startsWith("<")&&b.operator.startsWith("<")||this.semver.version===b.semver.version&&this.operator.includes("=")&&b.operator.includes("=")||u(this.semver,"<",b.semver,w)&&this.operator.startsWith(">")&&b.operator.startsWith("<")||u(this.semver,">",b.semver,w)&&this.operator.startsWith("<")&&b.operator.startsWith(">")))}}nc=t;const r=Sd,{safeRe:o,t:s}=Hs,u=t0,f=qu,h=fr,l=sn();return nc}const iL=sn(),oL=(e,t,r)=>{try{t=new iL(t,r)}catch{return!1}return t.test(e)};var zu=oL;const sL=sn(),aL=(e,t)=>new sL(e,t).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));var uL=aL;const fL=fr,lL=sn(),cL=(e,t,r)=>{let o=null,s=null,u=null;try{u=new lL(t,r)}catch{return null}return e.forEach(f=>{u.test(f)&&(!o||s.compare(f)===-1)&&(o=f,s=new fL(o,r))}),o};var dL=cL;const hL=fr,gL=sn(),pL=(e,t,r)=>{let o=null,s=null,u=null;try{u=new gL(t,r)}catch{return null}return e.forEach(f=>{u.test(f)&&(!o||s.compare(f)===1)&&(o=f,s=new hL(o,r))}),o};var bL=pL;const ic=fr,_L=sn(),wb=Gu,yL=(e,t)=>{e=new _L(e,t);let r=new ic("0.0.0");if(e.test(r)||(r=new ic("0.0.0-0"),e.test(r)))return r;r=null;for(let o=0;o<e.set.length;++o){const s=e.set[o];let u=null;s.forEach(f=>{const h=new ic(f.semver.version);switch(f.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!u||wb(h,u))&&(u=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),u&&(!r||wb(r,u))&&(r=u)}return r&&e.test(r)?r:null};var wL=yL;const mL=sn(),EL=(e,t)=>{try{return new mL(e,t).range||"*"}catch{return null}};var vL=EL;const SL=fr,r0=Vu(),{ANY:RL}=r0,AL=sn(),TL=zu,mb=Gu,Eb=Ad,IL=Id,OL=Td,PL=(e,t,r,o)=>{e=new SL(e,o),t=new AL(t,o);let s,u,f,h,l;switch(r){case">":s=mb,u=IL,f=Eb,h=">",l=">=";break;case"<":s=Eb,u=OL,f=mb,h="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(TL(e,t,o))return!1;for(let c=0;c<t.set.length;++c){const b=t.set[c];let w=null,T=null;if(b.forEach(m=>{m.semver===RL&&(m=new r0(">=0.0.0")),w=w||m,T=T||m,s(m.semver,w.semver,o)?w=m:f(m.semver,T.semver,o)&&(T=m)}),w.operator===h||w.operator===l||(!T.operator||T.operator===h)&&u(e,T.semver))return!1;if(T.operator===l&&f(e,T.semver))return!1}return!0};var Od=PL;const CL=Od,LL=(e,t,r)=>CL(e,t,">",r);var $L=LL;const BL=Od,NL=(e,t,r)=>BL(e,t,"<",r);var ML=NL;const vb=sn(),xL=(e,t,r)=>(e=new vb(e,r),t=new vb(t,r),e.intersects(t,r));var DL=xL;const jL=zu,UL=on;var kL=(e,t,r)=>{const o=[];let s=null,u=null;const f=e.sort((b,w)=>UL(b,w,r));for(const b of f)jL(b,t,r)?(u=b,s||(s=b)):(u&&o.push([s,u]),u=null,s=null);s&&o.push([s,null]);const h=[];for(const[b,w]of o)b===w?h.push(b):!w&&b===f[0]?h.push("*"):w?b===f[0]?h.push(`<=${w}`):h.push(`${b} - ${w}`):h.push(`>=${b}`);const l=h.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t};const Sb=sn(),Pd=Vu(),{ANY:oc}=Pd,bs=zu,Cd=on,FL=(e,t,r={})=>{if(e===t)return!0;e=new Sb(e,r),t=new Sb(t,r);let o=!1;e:for(const s of e.set){for(const u of t.set){const f=WL(s,u,r);if(o=o||f!==null,f)continue e}if(o)return!1}return!0},HL=[new Pd(">=0.0.0-0")],Rb=[new Pd(">=0.0.0")],WL=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===oc){if(t.length===1&&t[0].semver===oc)return!0;r.includePrerelease?e=HL:e=Rb}if(t.length===1&&t[0].semver===oc){if(r.includePrerelease)return!0;t=Rb}const o=new Set;let s,u;for(const m of e)m.operator===">"||m.operator===">="?s=Ab(s,m,r):m.operator==="<"||m.operator==="<="?u=Tb(u,m,r):o.add(m.semver);if(o.size>1)return null;let f;if(s&&u){if(f=Cd(s.semver,u.semver,r),f>0)return null;if(f===0&&(s.operator!==">="||u.operator!=="<="))return null}for(const m of o){if(s&&!bs(m,String(s),r)||u&&!bs(m,String(u),r))return null;for(const L of t)if(!bs(m,String(L),r))return!1;return!0}let h,l,c,b,w=u&&!r.includePrerelease&&u.semver.prerelease.length?u.semver:!1,T=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;w&&w.prerelease.length===1&&u.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const m of t){if(b=b||m.operator===">"||m.operator===">=",c=c||m.operator==="<"||m.operator==="<=",s){if(T&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===T.major&&m.semver.minor===T.minor&&m.semver.patch===T.patch&&(T=!1),m.operator===">"||m.operator===">="){if(h=Ab(s,m,r),h===m&&h!==s)return!1}else if(s.operator===">="&&!bs(s.semver,String(m),r))return!1}if(u){if(w&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===w.major&&m.semver.minor===w.minor&&m.semver.patch===w.patch&&(w=!1),m.operator==="<"||m.operator==="<="){if(l=Tb(u,m,r),l===m&&l!==u)return!1}else if(u.operator==="<="&&!bs(u.semver,String(m),r))return!1}if(!m.operator&&(u||s)&&f!==0)return!1}return!(s&&c&&!u&&f!==0||u&&b&&!s&&f!==0||T||w)},Ab=(e,t,r)=>{if(!e)return t;const o=Cd(e.semver,t.semver,r);return o>0?e:o<0||t.operator===">"&&e.operator===">="?t:e},Tb=(e,t,r)=>{if(!e)return t;const o=Cd(e.semver,t.semver,r);return o<0?e:o>0||t.operator==="<"&&e.operator==="<="?t:e};var qL=FL;const sc=Hs,Ib=Wu,GL=fr,Ob=Zy,VL=Ho,zL=QP,KL=rC,JL=iC,YL=sC,XL=fC,ZL=dC,QL=pC,e$=yC,t$=on,r$=vC,n$=AC,i$=Rd,o$=PC,s$=$C,a$=Gu,u$=Ad,f$=Qy,l$=e0,c$=Td,d$=Id,h$=t0,g$=tL,p$=Vu(),b$=sn(),_$=zu,y$=uL,w$=dL,m$=bL,E$=wL,v$=vL,S$=Od,R$=$L,A$=ML,T$=DL,I$=kL,O$=qL;var P$={parse:VL,valid:zL,clean:KL,inc:JL,diff:YL,major:XL,minor:ZL,patch:QL,prerelease:e$,compare:t$,rcompare:r$,compareLoose:n$,compareBuild:i$,sort:o$,rsort:s$,gt:a$,lt:u$,eq:f$,neq:l$,gte:c$,lte:d$,cmp:h$,coerce:g$,Comparator:p$,Range:b$,satisfies:_$,toComparators:y$,maxSatisfying:w$,minSatisfying:m$,minVersion:E$,validRange:v$,outside:S$,gtr:R$,ltr:A$,intersects:T$,simplifyRange:I$,subset:O$,SemVer:GL,re:sc.re,src:sc.src,tokens:sc.t,SEMVER_SPEC_VERSION:Ib.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ib.RELEASE_TYPES,compareIdentifiers:Ob.compareIdentifiers,rcompareIdentifiers:Ob.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=P$,r=Qi,o=Ht;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",w=>(0,t.valid)(w)===null?`Expected SemVer version, got "${w}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",w=>(0,t.validRange)(w)===null?`Expected SemVer range, got "${w}"`:!0);function s(w){return(0,r.is)(w,e.VersionStruct)}e.isValidSemVerVersion=s;function u(w){return(0,r.is)(w,e.VersionRangeStruct)}e.isValidSemVerRange=u;function f(w){(0,o.assertStruct)(w,e.VersionStruct)}e.assertIsSemVerVersion=f;function h(w){(0,o.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=h;function l(w,T){return(0,t.gt)(w,T)}e.gtVersion=l;function c(w,T){return(0,t.gtr)(w,T)}e.gtRange=c;function b(w,T){return(0,t.satisfies)(w,T,{includePrerelease:!0})}e.satisfiesVersionRange=b})(Jy);(function(e){var t=$.commonjsGlobal&&$.commonjsGlobal.__createBinding||(Object.create?function(o,s,u,f){f===void 0&&(f=u);var h=Object.getOwnPropertyDescriptor(s,u);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,f,h)}:function(o,s,u,f){f===void 0&&(f=u),o[f]=s[u]}),r=$.commonjsGlobal&&$.commonjsGlobal.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&t(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ht,e),r(ks,e),r(Xe,e),r(Fu,e),r(Sn,e),r($o,e),r(Hy,e),r(Fs,e),r(Wy,e),r(qy,e),r(Bo,e),r(Gy,e),r(Rn,e),r(Vy,e),r(zy,e),r(Ky,e),r(Jy,e)})(gd);var Ku={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.errorValues=Ri.errorCodes=void 0;Ri.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Ri.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeCause=e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=gd,r=Ri,o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(m,L=s){if(h(m)){const P=m.toString();if((0,t.hasProperty)(r.errorValues,P))return r.errorValues[P].message;if(b(m))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return L}e.getMessageFromCode=f;function h(m){return Number.isInteger(m)}e.isValidCode=h;function l(m,{fallbackError:L=u,shouldIncludeStack:P=!0}={}){if(!(0,t.isJsonRpcError)(L))throw new Error("Must provide fallback error with integer number code and string message.");const O=c(m,L);return P||delete O.stack,O}e.serializeError=l;function c(m,L){if(m&&typeof m=="object"&&"serialize"in m&&typeof m.serialize=="function")return m.serialize();if((0,t.isJsonRpcError)(m))return m;const P=w(m);return{...L,data:{cause:P}}}function b(m){return m>=-32099&&m<=-32e3}function w(m){return Array.isArray(m)?m.map(L=>(0,t.isValidJson)(L)?L:(0,t.isObject)(L)?T(L):null):(0,t.isObject)(m)?T(m):(0,t.isValidJson)(m)?m:null}e.serializeCause=w;function T(m){return Object.getOwnPropertyNames(m).reduce((L,P)=>{const O=m[P];return(0,t.isValidJson)(O)&&(L[P]=O),L},{})}})(Ku);var C$=$.commonjsGlobal&&$.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.EthereumProviderError=Vi.JsonRpcError=void 0;const L$=gd,$$=C$(ed),B$=Ku;class n0 extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a non-empty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data,(0,L$.isPlainObject)(this.data)&&(t.data.cause=(0,B$.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,$$.default)(this.serialize(),x$,2)}}Vi.JsonRpcError=n0;class N$ extends n0{constructor(t,r,o){if(!M$(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}}Vi.EthereumProviderError=N$;function M$(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function x$(e,t){if(t!=="[Circular]")return t}var No={};Object.defineProperty(No,"__esModule",{value:!0});No.providerErrors=No.rpcErrors=void 0;const Ld=Vi,Yt=Ri,i0=Ku;No.rpcErrors={parse:e=>kr(Yt.errorCodes.rpc.parse,e),invalidRequest:e=>kr(Yt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>kr(Yt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>kr(Yt.errorCodes.rpc.methodNotFound,e),internal:e=>kr(Yt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return kr(t,e)},invalidInput:e=>kr(Yt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>kr(Yt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>kr(Yt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>kr(Yt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>kr(Yt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>kr(Yt.errorCodes.rpc.limitExceeded,e)};No.providerErrors={userRejectedRequest:e=>_s(Yt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>_s(Yt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>_s(Yt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>_s(Yt.errorCodes.provider.disconnected,e),chainDisconnected:e=>_s(Yt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Ld.EthereumProviderError(t,r,o)}};function kr(e,t){const[r,o]=o0(t);return new Ld.JsonRpcError(e,r??(0,i0.getMessageFromCode)(e),o)}function _s(e,t){const[r,o]=o0(t);return new Ld.EthereumProviderError(e,r??(0,i0.getMessageFromCode)(e),o)}function o0(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorCodes=e.providerErrors=e.rpcErrors=e.getMessageFromCode=e.serializeError=e.serializeCause=e.EthereumProviderError=e.JsonRpcError=void 0;var t=Vi;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var r=Ku;Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return r.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});var o=No;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var s=Ri;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(g2);var $d={exports:{}},D$=s0;function s0(e,t){if(e&&t)return s0(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){r[o]=e[o]}),r;function r(){for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];var u=e.apply(this,o),f=o[o.length-1];return typeof u=="function"&&u!==f&&Object.keys(f).forEach(function(h){u[h]=f[h]}),u}}var a0=D$;$d.exports=a0(lu);$d.exports.strict=a0(u0);lu.proto=lu(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return lu(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u0(this)},configurable:!0})});function lu(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function u0(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}var Bd=$d.exports;const j$=$.getDefaultExportFromCjs(Bd);var U$=Bd,k$=function(){},F$=function(e){return e.setHeader&&typeof e.abort=="function"},H$=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},f0=function(e,t,r){if(typeof t=="function")return f0(e,null,t);t||(t={}),r=U$(r||k$);var o=e._writableState,s=e._readableState,u=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,h=!1,l=function(){e.writable||c()},c=function(){f=!1,u||r.call(e)},b=function(){u=!1,f||r.call(e)},w=function(O){r.call(e,O?new Error("exited with error code: "+O):null)},T=function(O){r.call(e,O)},m=function(){$.dist.process.nextTick(L)},L=function(){if(!h){if(u&&!(s&&s.ended&&!s.destroyed))return r.call(e,new Error("premature close"));if(f&&!(o&&o.ended&&!o.destroyed))return r.call(e,new Error("premature close"))}},P=function(){e.req.on("finish",c)};return F$(e)?(e.on("complete",c),e.on("abort",m),e.req?P():e.on("request",P)):f&&!o&&(e.on("end",l),e.on("close",l)),H$(e)&&e.on("exit",w),e.on("end",b),e.on("finish",c),t.error!==!1&&e.on("error",T),e.on("close",m),function(){h=!0,e.removeListener("complete",c),e.removeListener("abort",m),e.removeListener("request",P),e.req&&e.req.removeListener("finish",c),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("exit",w),e.removeListener("end",b),e.removeListener("error",T),e.removeListener("close",m)}},l0=f0;const Pb=$.getDefaultExportFromCjs(l0);var W$=Bd,q$=l0,cu;try{cu=$.require$$3}catch{}var Ls=function(){},G$=/^v?\.0/.test($.dist.process.version),Ju=function(e){return typeof e=="function"},V$=function(e){return!G$||!cu?!1:(e instanceof(cu.ReadStream||Ls)||e instanceof(cu.WriteStream||Ls))&&Ju(e.close)},z$=function(e){return e.setHeader&&Ju(e.abort)},K$=function(e,t,r,o){o=W$(o);var s=!1;e.on("close",function(){s=!0}),q$(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,V$(e))return e.close(Ls);if(z$(e))return e.abort();if(Ju(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},Cb=function(e){e()},J$=function(e,t){return e.pipe(t)},Y$=function(){var e=Array.prototype.slice.call(arguments),t=Ju(e[e.length-1]||Ls)&&e.pop()||Ls;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(s,u){var f=u<e.length-1,h=u>0;return K$(s,f,h,function(l){r||(r=l),l&&o.forEach(Cb),!f&&(o.forEach(Cb),t(r))})});return e.reduce(J$)},X$=Y$;const Lb=$.getDefaultExportFromCjs(X$);var Z$={},Yu={},Xu={},c0={},Mo={},Ei={},It={};Object.defineProperty(It,"__esModule",{value:!0});It.output=It.exists=It.hash=It.bytes=It.bool=It.number=It.isBytes=void 0;function wu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}It.number=wu;function d0(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}It.bool=d0;function h0(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}It.isBytes=h0;function Nd(e,...t){if(!h0(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}It.bytes=Nd;function g0(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");wu(e.outputLen),wu(e.blockLen)}It.hash=g0;function p0(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}It.exists=p0;function b0(e,t){Nd(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}It.output=b0;const Q$={number:wu,bool:d0,bytes:Nd,hash:g0,exists:p0,output:b0};It.default=Q$;var Qn={},Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.crypto=void 0;Zu.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=Zu,r=It;function o(H){return H instanceof Uint8Array||H!=null&&typeof H=="object"&&H.constructor.name==="Uint8Array"}e.isBytes=o;const s=H=>new Uint8Array(H.buffer,H.byteOffset,H.byteLength);e.u8=s;const u=H=>new Uint32Array(H.buffer,H.byteOffset,Math.floor(H.byteLength/4));e.u32=u;const f=H=>new DataView(H.buffer,H.byteOffset,H.byteLength);e.createView=f;const h=(H,k)=>H<<32-k|H>>>k;e.rotr=h;const l=(H,k)=>H<<k|H>>>32-k>>>0;e.rotl=l,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const c=H=>H<<24&4278190080|H<<8&16711680|H>>>8&65280|H>>>24&255;e.byteSwap=c,e.byteSwapIfBE=e.isLE?H=>H:H=>(0,e.byteSwap)(H);function b(H){for(let k=0;k<H.length;k++)H[k]=(0,e.byteSwap)(H[k])}e.byteSwap32=b;const w=Array.from({length:256},(H,k)=>k.toString(16).padStart(2,"0"));function T(H){(0,r.bytes)(H);let k="";for(let x=0;x<H.length;x++)k+=w[H[x]];return k}e.bytesToHex=T;const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function L(H){if(H>=m._0&&H<=m._9)return H-m._0;if(H>=m._A&&H<=m._F)return H-(m._A-10);if(H>=m._a&&H<=m._f)return H-(m._a-10)}function P(H){if(typeof H!="string")throw new Error("hex string expected, got "+typeof H);const k=H.length,x=k/2;if(k%2)throw new Error("padded hex string expected, got unpadded hex of length "+k);const G=new Uint8Array(x);for(let Y=0,V=0;Y<x;Y++,V+=2){const ne=L(H.charCodeAt(V)),W=L(H.charCodeAt(V+1));if(ne===void 0||W===void 0){const K=H[V]+H[V+1];throw new Error('hex string expected, got non-hex character "'+K+'" at index '+V)}G[Y]=ne*16+W}return G}e.hexToBytes=P;const O=async()=>{};e.nextTick=O;async function M(H,k,x){let G=Date.now();for(let Y=0;Y<H;Y++){x(Y);const V=Date.now()-G;V>=0&&V<k||(await(0,e.nextTick)(),G+=V)}}e.asyncLoop=M;function B(H){if(typeof H!="string")throw new Error(`utf8ToBytes expected string, got ${typeof H}`);return new Uint8Array(new TextEncoder().encode(H))}e.utf8ToBytes=B;function S(H){return typeof H=="string"&&(H=B(H)),(0,r.bytes)(H),H}e.toBytes=S;function E(...H){let k=0;for(let G=0;G<H.length;G++){const Y=H[G];(0,r.bytes)(Y),k+=Y.length}const x=new Uint8Array(k);for(let G=0,Y=0;G<H.length;G++){const V=H[G];x.set(V,Y),Y+=V.length}return x}e.concatBytes=E;class U{clone(){return this._cloneInto()}}e.Hash=U;const Q={}.toString;function ce(H,k){if(k!==void 0&&Q.call(k)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(H,k)}e.checkOpts=ce;function ue(H){const k=G=>H().update(S(G)).digest(),x=H();return k.outputLen=x.outputLen,k.blockLen=x.blockLen,k.create=()=>H(),k}e.wrapConstructor=ue;function te(H){const k=(G,Y)=>H(Y).update(S(G)).digest(),x=H({});return k.outputLen=x.outputLen,k.blockLen=x.blockLen,k.create=G=>H(G),k}e.wrapConstructorWithOpts=te;function Se(H){const k=(G,Y)=>H(Y).update(S(G)).digest(),x=H({});return k.outputLen=x.outputLen,k.blockLen=x.blockLen,k.create=G=>H(G),k}e.wrapXOFConstructorWithOpts=Se;function me(H=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(H));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=me})(Qn);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.HashMD=Ei.Maj=Ei.Chi=void 0;const ac=It,ys=Qn;function eB(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);const s=BigInt(32),u=BigInt(4294967295),f=Number(r>>s&u),h=Number(r&u),l=o?4:0,c=o?0:4;e.setUint32(t+l,f,o),e.setUint32(t+c,h,o)}const tB=(e,t,r)=>e&t^~e&r;Ei.Chi=tB;const rB=(e,t,r)=>e&t^e&r^t&r;Ei.Maj=rB;class nB extends ys.Hash{constructor(t,r,o,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,ys.createView)(this.buffer)}update(t){(0,ac.exists)(this);const{view:r,buffer:o,blockLen:s}=this;t=(0,ys.toBytes)(t);const u=t.length;for(let f=0;f<u;){const h=Math.min(s-this.pos,u-f);if(h===s){const l=(0,ys.createView)(t);for(;s<=u-f;f+=s)this.process(l,f);continue}o.set(t.subarray(f,f+h),this.pos),this.pos+=h,f+=h,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,ac.exists)(this),(0,ac.output)(t,this),this.finished=!0;const{buffer:r,view:o,blockLen:s,isLE:u}=this;let{pos:f}=this;r[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>s-f&&(this.process(o,0),f=0);for(let w=f;w<s;w++)r[w]=0;eB(o,s-8,BigInt(this.length*8),u),this.process(o,0);const h=(0,ys.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=l/4,b=this.get();if(c>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<c;w++)h.setUint32(4*w,b[w],u)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:o,length:s,finished:u,destroyed:f,pos:h}=this;return t.length=s,t.pos=h,t.finished=u,t.destroyed=f,s%r&&t.buffer.set(o),t}}Ei.HashMD=nB;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.sha224=Mo.sha256=void 0;const uc=Ei,Fr=Qn,iB=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),bi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_i=new Uint32Array(64);class _0 extends uc.HashMD{constructor(){super(64,32,8,!1),this.A=bi[0]|0,this.B=bi[1]|0,this.C=bi[2]|0,this.D=bi[3]|0,this.E=bi[4]|0,this.F=bi[5]|0,this.G=bi[6]|0,this.H=bi[7]|0}get(){const{A:t,B:r,C:o,D:s,E:u,F:f,G:h,H:l}=this;return[t,r,o,s,u,f,h,l]}set(t,r,o,s,u,f,h,l){this.A=t|0,this.B=r|0,this.C=o|0,this.D=s|0,this.E=u|0,this.F=f|0,this.G=h|0,this.H=l|0}process(t,r){for(let w=0;w<16;w++,r+=4)_i[w]=t.getUint32(r,!1);for(let w=16;w<64;w++){const T=_i[w-15],m=_i[w-2],L=(0,Fr.rotr)(T,7)^(0,Fr.rotr)(T,18)^T>>>3,P=(0,Fr.rotr)(m,17)^(0,Fr.rotr)(m,19)^m>>>10;_i[w]=P+_i[w-7]+L+_i[w-16]|0}let{A:o,B:s,C:u,D:f,E:h,F:l,G:c,H:b}=this;for(let w=0;w<64;w++){const T=(0,Fr.rotr)(h,6)^(0,Fr.rotr)(h,11)^(0,Fr.rotr)(h,25),m=b+T+(0,uc.Chi)(h,l,c)+iB[w]+_i[w]|0,P=((0,Fr.rotr)(o,2)^(0,Fr.rotr)(o,13)^(0,Fr.rotr)(o,22))+(0,uc.Maj)(o,s,u)|0;b=c,c=l,l=h,h=f+m|0,f=u,u=s,s=o,o=m+P|0}o=o+this.A|0,s=s+this.B|0,u=u+this.C|0,f=f+this.D|0,h=h+this.E|0,l=l+this.F|0,c=c+this.G|0,b=b+this.H|0,this.set(o,s,u,f,h,l,c,b)}roundClean(){_i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class oB extends _0{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Mo.sha256=(0,Fr.wrapConstructor)(()=>new _0);Mo.sha224=(0,Fr.wrapConstructor)(()=>new oB);var Qu={},y0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=It,r=Qn;class o extends r.Hash{constructor(f,h){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(f);const l=(0,r.toBytes)(h);if(this.iHash=f.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const c=this.blockLen,b=new Uint8Array(c);b.set(l.length>c?f.create().update(l).digest():l);for(let w=0;w<b.length;w++)b[w]^=54;this.iHash.update(b),this.oHash=f.create();for(let w=0;w<b.length;w++)b[w]^=106;this.oHash.update(b),b.fill(0)}update(f){return(0,t.exists)(this),this.iHash.update(f),this}digestInto(f){(0,t.exists)(this),(0,t.bytes)(f,this.outputLen),this.finished=!0,this.iHash.digestInto(f),this.oHash.update(f),this.oHash.digestInto(f),this.destroy()}digest(){const f=new Uint8Array(this.oHash.outputLen);return this.digestInto(f),f}_cloneInto(f){f||(f=Object.create(Object.getPrototypeOf(this),{}));const{oHash:h,iHash:l,finished:c,destroyed:b,blockLen:w,outputLen:T}=this;return f=f,f.finished=c,f.destroyed=b,f.blockLen=w,f.outputLen=T,f.oHash=h._cloneInto(f.oHash),f.iHash=l._cloneInto(f.iHash),f}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;const s=(u,f,h)=>new o(u,f).update(h).digest();e.hmac=s,e.hmac.create=(u,f)=>new o(u,f)})(y0);var Md={},ef={},gt={},it={};Object.defineProperty(it,"__esModule",{value:!0});it.bitMask=void 0;it.isBytes=rf;it.abytes=nf;it.bytesToHex=xd;it.numberToHexUnpadded=m0;it.hexToNumber=Dd;it.hexToBytes=of;it.bytesToNumberBE=uB;it.bytesToNumberLE=fB;it.numberToBytesBE=E0;it.numberToBytesLE=lB;it.numberToVarBytesBE=cB;it.ensureBytes=dB;it.concatBytes=v0;it.equalBytes=hB;it.utf8ToBytes=gB;it.bitLen=pB;it.bitGet=bB;it.bitSet=_B;it.createHmacDrbg=wB;it.validateObject=EB;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const w0=BigInt(0),tf=BigInt(1),sB=BigInt(2);function rf(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function nf(e){if(!rf(e))throw new Error("Uint8Array expected")}const aB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xd(e){nf(e);let t="";for(let r=0;r<e.length;r++)t+=aB[e[r]];return t}function m0(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Dd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const Vn={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function $b(e){if(e>=Vn._0&&e<=Vn._9)return e-Vn._0;if(e>=Vn._A&&e<=Vn._F)return e-(Vn._A-10);if(e>=Vn._a&&e<=Vn._f)return e-(Vn._a-10)}function of(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(r);for(let s=0,u=0;s<r;s++,u+=2){const f=$b(e.charCodeAt(u)),h=$b(e.charCodeAt(u+1));if(f===void 0||h===void 0){const l=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+u)}o[s]=f*16+h}return o}function uB(e){return Dd(xd(e))}function fB(e){return nf(e),Dd(xd(Uint8Array.from(e).reverse()))}function E0(e,t){return of(e.toString(16).padStart(t*2,"0"))}function lB(e,t){return E0(e,t).reverse()}function cB(e){return of(m0(e))}function dB(e,t,r){let o;if(typeof t=="string")try{o=of(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(rf(t))o=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const s=o.length;if(typeof r=="number"&&s!==r)throw new Error(`${e} expected ${r} bytes, got ${s}`);return o}function v0(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];nf(s),t+=s.length}const r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function hB(e,t){if(e.length!==t.length)return!1;let r=0;for(let o=0;o<e.length;o++)r|=e[o]^t[o];return r===0}function gB(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pB(e){let t;for(t=0;e>w0;e>>=tf,t+=1);return t}function bB(e,t){return e>>BigInt(t)&tf}function _B(e,t,r){return e|(r?tf:w0)<<BigInt(t)}const yB=e=>(sB<<BigInt(e-1))-tf;it.bitMask=yB;const fc=e=>new Uint8Array(e),Bb=e=>Uint8Array.from(e);function wB(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=fc(e),s=fc(e),u=0;const f=()=>{o.fill(1),s.fill(0),u=0},h=(...w)=>r(s,o,...w),l=(w=fc())=>{s=h(Bb([0]),w),o=h(),w.length!==0&&(s=h(Bb([1]),w),o=h())},c=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const T=[];for(;w<t;){o=h();const m=o.slice();T.push(m),w+=o.length}return v0(...T)};return(w,T)=>{f(),l(w);let m;for(;!(m=T(c()));)l();return f(),m}}const mB={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||rf(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function EB(e,t,r={}){const o=(s,u,f)=>{const h=mB[u];if(typeof h!="function")throw new Error(`Invalid validator "${u}", expected function`);const l=e[s];if(!(f&&l===void 0)&&!h(l,e))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${u}`)};for(const[s,u]of Object.entries(t))o(s,u,!1);for(const[s,u]of Object.entries(r))o(s,u,!0);return e}Object.defineProperty(gt,"__esModule",{value:!0});gt.isNegativeLE=void 0;gt.mod=Tr;gt.pow=S0;gt.pow2=SB;gt.invert=mu;gt.tonelliShanks=R0;gt.FpSqrt=A0;gt.validateField=TB;gt.FpPow=T0;gt.FpInvertBatch=I0;gt.FpDiv=IB;gt.FpIsSquare=OB;gt.nLength=jd;gt.Field=PB;gt.FpSqrtOdd=CB;gt.FpSqrtEven=LB;gt.hashToPrivateScalar=$B;gt.getFieldBytesLength=Ud;gt.getMinHashLength=O0;gt.mapHashToField=BB;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ir=it,jt=BigInt(0),ht=BigInt(1),mi=BigInt(2),vB=BigInt(3),Fc=BigInt(4),Nb=BigInt(5),Mb=BigInt(8);BigInt(9);BigInt(16);function Tr(e,t){const r=e%t;return r>=jt?r:t+r}function S0(e,t,r){if(r<=jt||t<jt)throw new Error("Expected power/modulo > 0");if(r===ht)return jt;let o=ht;for(;t>jt;)t&ht&&(o=o*e%r),e=e*e%r,t>>=ht;return o}function SB(e,t,r){let o=e;for(;t-- >jt;)o*=o,o%=r;return o}function mu(e,t){if(e===jt||t<=jt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Tr(e,t),o=t,s=jt,u=ht;for(;r!==jt;){const h=o/r,l=o%r,c=s-u*h;o=r,r=l,s=u,u=c}if(o!==ht)throw new Error("invert: does not exist");return Tr(s,t)}function R0(e){const t=(e-ht)/mi;let r,o,s;for(r=e-ht,o=0;r%mi===jt;r/=mi,o++);for(s=mi;s<e&&S0(s,t,e)!==e-ht;s++);if(o===1){const f=(e+ht)/Fc;return function(l,c){const b=l.pow(c,f);if(!l.eql(l.sqr(b),c))throw new Error("Cannot find square root");return b}}const u=(r+ht)/mi;return function(h,l){if(h.pow(l,t)===h.neg(h.ONE))throw new Error("Cannot find square root");let c=o,b=h.pow(h.mul(h.ONE,s),r),w=h.pow(l,u),T=h.pow(l,r);for(;!h.eql(T,h.ONE);){if(h.eql(T,h.ZERO))return h.ZERO;let m=1;for(let P=h.sqr(T);m<c&&!h.eql(P,h.ONE);m++)P=h.sqr(P);const L=h.pow(b,ht<<BigInt(c-m-1));b=h.sqr(L),w=h.mul(w,L),T=h.mul(T,b),c=m}return w}}function A0(e){if(e%Fc===vB){const t=(e+ht)/Fc;return function(o,s){const u=o.pow(s,t);if(!o.eql(o.sqr(u),s))throw new Error("Cannot find square root");return u}}if(e%Mb===Nb){const t=(e-Nb)/Mb;return function(o,s){const u=o.mul(s,mi),f=o.pow(u,t),h=o.mul(s,f),l=o.mul(o.mul(h,mi),f),c=o.mul(h,o.sub(l,o.ONE));if(!o.eql(o.sqr(c),s))throw new Error("Cannot find square root");return c}}return R0(e)}const RB=(e,t)=>(Tr(e,t)&ht)===ht;gt.isNegativeLE=RB;const AB=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function TB(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=AB.reduce((o,s)=>(o[s]="function",o),t);return(0,Ir.validateObject)(e,r)}function T0(e,t,r){if(r<jt)throw new Error("Expected power > 0");if(r===jt)return e.ONE;if(r===ht)return t;let o=e.ONE,s=t;for(;r>jt;)r&ht&&(o=e.mul(o,s)),s=e.sqr(s),r>>=ht;return o}function I0(e,t){const r=new Array(t.length),o=t.reduce((u,f,h)=>e.is0(f)?u:(r[h]=u,e.mul(u,f)),e.ONE),s=e.inv(o);return t.reduceRight((u,f,h)=>e.is0(f)?u:(r[h]=e.mul(u,r[h]),e.mul(u,f)),s),r}function IB(e,t,r){return e.mul(t,typeof r=="bigint"?mu(r,e.ORDER):e.inv(r))}function OB(e){const t=(e.ORDER-ht)/mi;return r=>{const o=e.pow(r,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function jd(e,t){const r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function PB(e,t,r=!1,o={}){if(e<=jt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=jd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=A0(e),h=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,Ir.bitMask)(s),ZERO:jt,ONE:ht,create:l=>Tr(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return jt<=l&&l<e},is0:l=>l===jt,isOdd:l=>(l&ht)===ht,neg:l=>Tr(-l,e),eql:(l,c)=>l===c,sqr:l=>Tr(l*l,e),add:(l,c)=>Tr(l+c,e),sub:(l,c)=>Tr(l-c,e),mul:(l,c)=>Tr(l*c,e),pow:(l,c)=>T0(h,l,c),div:(l,c)=>Tr(l*mu(c,e),e),sqrN:l=>l*l,addN:(l,c)=>l+c,subN:(l,c)=>l-c,mulN:(l,c)=>l*c,inv:l=>mu(l,e),sqrt:o.sqrt||(l=>f(h,l)),invertBatch:l=>I0(h,l),cmov:(l,c,b)=>b?c:l,toBytes:l=>r?(0,Ir.numberToBytesLE)(l,u):(0,Ir.numberToBytesBE)(l,u),fromBytes:l=>{if(l.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${l.length}`);return r?(0,Ir.bytesToNumberLE)(l):(0,Ir.bytesToNumberBE)(l)}});return Object.freeze(h)}function CB(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)}function LB(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r}function $B(e,t,r=!1){e=(0,Ir.ensureBytes)("privateHash",e);const o=e.length,s=jd(t).nByteLength+8;if(s<24||o<s||o>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);const u=r?(0,Ir.bytesToNumberLE)(e):(0,Ir.bytesToNumberBE)(e);return Tr(u,t-ht)+ht}function Ud(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function O0(e){const t=Ud(e);return t+Math.ceil(t/2)}function BB(e,t,r=!1){const o=e.length,s=Ud(t),u=O0(t);if(o<16||o<u||o>1024)throw new Error(`expected ${u}-1024 bytes of input, got ${o}`);const f=r?(0,Ir.bytesToNumberBE)(e):(0,Ir.bytesToNumberLE)(e),h=Tr(f,t-ht)+ht;return r?(0,Ir.numberToBytesLE)(h,s):(0,Ir.numberToBytesBE)(h,s)}Object.defineProperty(ef,"__esModule",{value:!0});ef.wNAF=xB;ef.validateBasic=DB;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xb=gt,NB=it,MB=BigInt(0),lc=BigInt(1);function xB(e,t){const r=(s,u)=>{const f=u.negate();return s?f:u},o=s=>{const u=Math.ceil(t/s)+1,f=2**(s-1);return{windows:u,windowSize:f}};return{constTimeNegate:r,unsafeLadder(s,u){let f=e.ZERO,h=s;for(;u>MB;)u&lc&&(f=f.add(h)),h=h.double(),u>>=lc;return f},precomputeWindow(s,u){const{windows:f,windowSize:h}=o(u),l=[];let c=s,b=c;for(let w=0;w<f;w++){b=c,l.push(b);for(let T=1;T<h;T++)b=b.add(c),l.push(b);c=b.double()}return l},wNAF(s,u,f){const{windows:h,windowSize:l}=o(s);let c=e.ZERO,b=e.BASE;const w=BigInt(2**s-1),T=2**s,m=BigInt(s);for(let L=0;L<h;L++){const P=L*l;let O=Number(f&w);f>>=m,O>l&&(O-=T,f+=lc);const M=P,B=P+Math.abs(O)-1,S=L%2!==0,E=O<0;O===0?b=b.add(r(S,u[M])):c=c.add(r(E,u[B]))}return{p:c,f:b}},wNAFCached(s,u,f,h){const l=s._WINDOW_SIZE||1;let c=u.get(s);return c||(c=this.precomputeWindow(s,l),l!==1&&u.set(s,h(c))),this.wNAF(l,c,f)}}}function DB(e){return(0,xb.validateField)(e.Fp),(0,NB.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,xb.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=m,e.weierstrass=P,e.SWUFpSqrtRatio=O,e.mapToCurveSimpleSWU=M;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=ef,r=gt,o=it,s=it;function u(B){const S=(0,t.validateBasic)(B);o.validateObject(S,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:E,Fp:U,a:Q}=S;if(E){if(!U.eql(Q,U.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof E!="object"||typeof E.beta!="bigint"||typeof E.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...S})}const{bytesToNumberBE:f,hexToBytes:h}=o;e.DER={Err:class extends Error{constructor(S=""){super(S)}},_parseInt(B){const{Err:S}=e.DER;if(B.length<2||B[0]!==2)throw new S("Invalid signature integer tag");const E=B[1],U=B.subarray(2,E+2);if(!E||U.length!==E)throw new S("Invalid signature integer: wrong length");if(U[0]&128)throw new S("Invalid signature integer: negative");if(U[0]===0&&!(U[1]&128))throw new S("Invalid signature integer: unnecessary leading zero");return{d:f(U),l:B.subarray(E+2)}},toSig(B){const{Err:S}=e.DER,E=typeof B=="string"?h(B):B;o.abytes(E);let U=E.length;if(U<2||E[0]!=48)throw new S("Invalid signature tag");if(E[1]!==U-2)throw new S("Invalid signature: incorrect length");const{d:Q,l:ce}=e.DER._parseInt(E.subarray(2)),{d:ue,l:te}=e.DER._parseInt(ce);if(te.length)throw new S("Invalid signature: left bytes after parsing");return{r:Q,s:ue}},hexFromSig(B){const S=me=>Number.parseInt(me[0],16)&8?"00"+me:me,E=me=>{const H=me.toString(16);return H.length&1?`0${H}`:H},U=S(E(B.s)),Q=S(E(B.r)),ce=U.length/2,ue=Q.length/2,te=E(ce),Se=E(ue);return`30${E(ue+ce+4)}02${Se}${Q}02${te}${U}`}};const l=BigInt(0),c=BigInt(1),b=BigInt(2),w=BigInt(3),T=BigInt(4);function m(B){const S=u(B),{Fp:E}=S,U=S.toBytes||((Y,V,ne)=>{const W=V.toAffine();return o.concatBytes(Uint8Array.from([4]),E.toBytes(W.x),E.toBytes(W.y))}),Q=S.fromBytes||(Y=>{const V=Y.subarray(1),ne=E.fromBytes(V.subarray(0,E.BYTES)),W=E.fromBytes(V.subarray(E.BYTES,2*E.BYTES));return{x:ne,y:W}});function ce(Y){const{a:V,b:ne}=S,W=E.sqr(Y),K=E.mul(W,Y);return E.add(E.add(K,E.mul(Y,V)),ne)}if(!E.eql(E.sqr(S.Gy),ce(S.Gx)))throw new Error("bad generator point: equation left != right");function ue(Y){return typeof Y=="bigint"&&l<Y&&Y<S.n}function te(Y){if(!ue(Y))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Se(Y){const{allowedPrivateKeyLengths:V,nByteLength:ne,wrapPrivateKey:W,n:K}=S;if(V&&typeof Y!="bigint"){if(o.isBytes(Y)&&(Y=o.bytesToHex(Y)),typeof Y!="string"||!V.includes(Y.length))throw new Error("Invalid key");Y=Y.padStart(ne*2,"0")}let ae;try{ae=typeof Y=="bigint"?Y:o.bytesToNumberBE((0,s.ensureBytes)("private key",Y,ne))}catch{throw new Error(`private key must be ${ne} bytes, hex or bigint, not ${typeof Y}`)}return W&&(ae=r.mod(ae,K)),te(ae),ae}const me=new Map;function H(Y){if(!(Y instanceof k))throw new Error("ProjectivePoint expected")}class k{constructor(V,ne,W){if(this.px=V,this.py=ne,this.pz=W,V==null||!E.isValid(V))throw new Error("x required");if(ne==null||!E.isValid(ne))throw new Error("y required");if(W==null||!E.isValid(W))throw new Error("z required")}static fromAffine(V){const{x:ne,y:W}=V||{};if(!V||!E.isValid(ne)||!E.isValid(W))throw new Error("invalid affine point");if(V instanceof k)throw new Error("projective point not allowed");const K=ae=>E.eql(ae,E.ZERO);return K(ne)&&K(W)?k.ZERO:new k(ne,W,E.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(V){const ne=E.invertBatch(V.map(W=>W.pz));return V.map((W,K)=>W.toAffine(ne[K])).map(k.fromAffine)}static fromHex(V){const ne=k.fromAffine(Q((0,s.ensureBytes)("pointHex",V)));return ne.assertValidity(),ne}static fromPrivateKey(V){return k.BASE.multiply(Se(V))}_setWindowSize(V){this._WINDOW_SIZE=V,me.delete(this)}assertValidity(){if(this.is0()){if(S.allowInfinityPoint&&!E.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:V,y:ne}=this.toAffine();if(!E.isValid(V)||!E.isValid(ne))throw new Error("bad point: x or y not FE");const W=E.sqr(ne),K=ce(V);if(!E.eql(W,K))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:V}=this.toAffine();if(E.isOdd)return!E.isOdd(V);throw new Error("Field doesn't support isOdd")}equals(V){H(V);const{px:ne,py:W,pz:K}=this,{px:ae,py:de,pz:re}=V,_e=E.eql(E.mul(ne,re),E.mul(ae,K)),be=E.eql(E.mul(W,re),E.mul(de,K));return _e&&be}negate(){return new k(this.px,E.neg(this.py),this.pz)}double(){const{a:V,b:ne}=S,W=E.mul(ne,w),{px:K,py:ae,pz:de}=this;let re=E.ZERO,_e=E.ZERO,be=E.ZERO,R=E.mul(K,K),I=E.mul(ae,ae),q=E.mul(de,de),oe=E.mul(K,ae);return oe=E.add(oe,oe),be=E.mul(K,de),be=E.add(be,be),re=E.mul(V,be),_e=E.mul(W,q),_e=E.add(re,_e),re=E.sub(I,_e),_e=E.add(I,_e),_e=E.mul(re,_e),re=E.mul(oe,re),be=E.mul(W,be),q=E.mul(V,q),oe=E.sub(R,q),oe=E.mul(V,oe),oe=E.add(oe,be),be=E.add(R,R),R=E.add(be,R),R=E.add(R,q),R=E.mul(R,oe),_e=E.add(_e,R),q=E.mul(ae,de),q=E.add(q,q),R=E.mul(q,oe),re=E.sub(re,R),be=E.mul(q,I),be=E.add(be,be),be=E.add(be,be),new k(re,_e,be)}add(V){H(V);const{px:ne,py:W,pz:K}=this,{px:ae,py:de,pz:re}=V;let _e=E.ZERO,be=E.ZERO,R=E.ZERO;const I=S.a,q=E.mul(S.b,w);let oe=E.mul(ne,ae),ye=E.mul(W,de),g=E.mul(K,re),p=E.add(ne,W),_=E.add(ae,de);p=E.mul(p,_),_=E.add(oe,ye),p=E.sub(p,_),_=E.add(ne,K);let v=E.add(ae,re);return _=E.mul(_,v),v=E.add(oe,g),_=E.sub(_,v),v=E.add(W,K),_e=E.add(de,re),v=E.mul(v,_e),_e=E.add(ye,g),v=E.sub(v,_e),R=E.mul(I,_),_e=E.mul(q,g),R=E.add(_e,R),_e=E.sub(ye,R),R=E.add(ye,R),be=E.mul(_e,R),ye=E.add(oe,oe),ye=E.add(ye,oe),g=E.mul(I,g),_=E.mul(q,_),ye=E.add(ye,g),g=E.sub(oe,g),g=E.mul(I,g),_=E.add(_,g),oe=E.mul(ye,_),be=E.add(be,oe),oe=E.mul(v,_),_e=E.mul(p,_e),_e=E.sub(_e,oe),oe=E.mul(p,ye),R=E.mul(v,R),R=E.add(R,oe),new k(_e,be,R)}subtract(V){return this.add(V.negate())}is0(){return this.equals(k.ZERO)}wNAF(V){return G.wNAFCached(this,me,V,ne=>{const W=E.invertBatch(ne.map(K=>K.pz));return ne.map((K,ae)=>K.toAffine(W[ae])).map(k.fromAffine)})}multiplyUnsafe(V){const ne=k.ZERO;if(V===l)return ne;if(te(V),V===c)return this;const{endo:W}=S;if(!W)return G.unsafeLadder(this,V);let{k1neg:K,k1:ae,k2neg:de,k2:re}=W.splitScalar(V),_e=ne,be=ne,R=this;for(;ae>l||re>l;)ae&c&&(_e=_e.add(R)),re&c&&(be=be.add(R)),R=R.double(),ae>>=c,re>>=c;return K&&(_e=_e.negate()),de&&(be=be.negate()),be=new k(E.mul(be.px,W.beta),be.py,be.pz),_e.add(be)}multiply(V){te(V);let ne=V,W,K;const{endo:ae}=S;if(ae){const{k1neg:de,k1:re,k2neg:_e,k2:be}=ae.splitScalar(ne);let{p:R,f:I}=this.wNAF(re),{p:q,f:oe}=this.wNAF(be);R=G.constTimeNegate(de,R),q=G.constTimeNegate(_e,q),q=new k(E.mul(q.px,ae.beta),q.py,q.pz),W=R.add(q),K=I.add(oe)}else{const{p:de,f:re}=this.wNAF(ne);W=de,K=re}return k.normalizeZ([W,K])[0]}multiplyAndAddUnsafe(V,ne,W){const K=k.BASE,ae=(re,_e)=>_e===l||_e===c||!re.equals(K)?re.multiplyUnsafe(_e):re.multiply(_e),de=ae(this,ne).add(ae(V,W));return de.is0()?void 0:de}toAffine(V){const{px:ne,py:W,pz:K}=this,ae=this.is0();V==null&&(V=ae?E.ONE:E.inv(K));const de=E.mul(ne,V),re=E.mul(W,V),_e=E.mul(K,V);if(ae)return{x:E.ZERO,y:E.ZERO};if(!E.eql(_e,E.ONE))throw new Error("invZ was invalid");return{x:de,y:re}}isTorsionFree(){const{h:V,isTorsionFree:ne}=S;if(V===c)return!0;if(ne)return ne(k,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:V,clearCofactor:ne}=S;return V===c?this:ne?ne(k,this):this.multiplyUnsafe(S.h)}toRawBytes(V=!0){return this.assertValidity(),U(k,this,V)}toHex(V=!0){return o.bytesToHex(this.toRawBytes(V))}}k.BASE=new k(S.Gx,S.Gy,E.ONE),k.ZERO=new k(E.ZERO,E.ONE,E.ZERO);const x=S.nBitLength,G=(0,t.wNAF)(k,S.endo?Math.ceil(x/2):x);return{CURVE:S,ProjectivePoint:k,normPrivateKeyToScalar:Se,weierstrassEquation:ce,isWithinCurveOrder:ue}}function L(B){const S=(0,t.validateBasic)(B);return o.validateObject(S,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...S})}function P(B){const S=L(B),{Fp:E,n:U}=S,Q=E.BYTES+1,ce=2*E.BYTES+1;function ue(_){return l<_&&_<E.ORDER}function te(_){return r.mod(_,U)}function Se(_){return r.invert(_,U)}const{ProjectivePoint:me,normPrivateKeyToScalar:H,weierstrassEquation:k,isWithinCurveOrder:x}=m({...S,toBytes(_,v,J){const ie=v.toAffine(),se=E.toBytes(ie.x),Ie=o.concatBytes;return J?Ie(Uint8Array.from([v.hasEvenY()?2:3]),se):Ie(Uint8Array.from([4]),se,E.toBytes(ie.y))},fromBytes(_){const v=_.length,J=_[0],ie=_.subarray(1);if(v===Q&&(J===2||J===3)){const se=o.bytesToNumberBE(ie);if(!ue(se))throw new Error("Point is not on curve");const Ie=k(se);let $e;try{$e=E.sqrt(Ie)}catch(Re){const Fe=Re instanceof Error?": "+Re.message:"";throw new Error("Point is not on curve"+Fe)}const Pe=($e&c)===c;return(J&1)===1!==Pe&&($e=E.neg($e)),{x:se,y:$e}}else if(v===ce&&J===4){const se=E.fromBytes(ie.subarray(0,E.BYTES)),Ie=E.fromBytes(ie.subarray(E.BYTES,2*E.BYTES));return{x:se,y:Ie}}else throw new Error(`Point of length ${v} was invalid. Expected ${Q} compressed bytes or ${ce} uncompressed bytes`)}}),G=_=>o.bytesToHex(o.numberToBytesBE(_,S.nByteLength));function Y(_){const v=U>>c;return _>v}function V(_){return Y(_)?te(-_):_}const ne=(_,v,J)=>o.bytesToNumberBE(_.slice(v,J));class W{constructor(v,J,ie){this.r=v,this.s=J,this.recovery=ie,this.assertValidity()}static fromCompact(v){const J=S.nByteLength;return v=(0,s.ensureBytes)("compactSignature",v,J*2),new W(ne(v,0,J),ne(v,J,2*J))}static fromDER(v){const{r:J,s:ie}=e.DER.toSig((0,s.ensureBytes)("DER",v));return new W(J,ie)}assertValidity(){if(!x(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!x(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(v){return new W(this.r,this.s,v)}recoverPublicKey(v){const{r:J,s:ie,recovery:se}=this,Ie=be((0,s.ensureBytes)("msgHash",v));if(se==null||![0,1,2,3].includes(se))throw new Error("recovery id invalid");const $e=se===2||se===3?J+S.n:J;if($e>=E.ORDER)throw new Error("recovery id 2 or 3 invalid");const Pe=se&1?"03":"02",je=me.fromHex(Pe+G($e)),Re=Se($e),Fe=te(-Ie*Re),pt=te(ie*Re),Qe=me.BASE.multiplyAndAddUnsafe(je,Fe,pt);if(!Qe)throw new Error("point at infinify");return Qe.assertValidity(),Qe}hasHighS(){return Y(this.s)}normalizeS(){return this.hasHighS()?new W(this.r,te(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return G(this.r)+G(this.s)}}const K={isValidPrivateKey(_){try{return H(_),!0}catch{return!1}},normPrivateKeyToScalar:H,randomPrivateKey:()=>{const _=r.getMinHashLength(S.n);return r.mapHashToField(S.randomBytes(_),S.n)},precompute(_=8,v=me.BASE){return v._setWindowSize(_),v.multiply(BigInt(3)),v}};function ae(_,v=!0){return me.fromPrivateKey(_).toRawBytes(v)}function de(_){const v=o.isBytes(_),J=typeof _=="string",ie=(v||J)&&_.length;return v?ie===Q||ie===ce:J?ie===2*Q||ie===2*ce:_ instanceof me}function re(_,v,J=!0){if(de(_))throw new Error("first arg must be private key");if(!de(v))throw new Error("second arg must be public key");return me.fromHex(v).multiply(H(_)).toRawBytes(J)}const _e=S.bits2int||function(_){const v=o.bytesToNumberBE(_),J=_.length*8-S.nBitLength;return J>0?v>>BigInt(J):v},be=S.bits2int_modN||function(_){return te(_e(_))},R=o.bitMask(S.nBitLength);function I(_){if(typeof _!="bigint")throw new Error("bigint expected");if(!(l<=_&&_<R))throw new Error(`bigint expected < 2^${S.nBitLength}`);return o.numberToBytesBE(_,S.nByteLength)}function q(_,v,J=oe){if(["recovered","canonical"].some(Je=>Je in J))throw new Error("sign() legacy options not supported");const{hash:ie,randomBytes:se}=S;let{lowS:Ie,prehash:$e,extraEntropy:Pe}=J;Ie==null&&(Ie=!0),_=(0,s.ensureBytes)("msgHash",_),$e&&(_=(0,s.ensureBytes)("prehashed msgHash",ie(_)));const je=be(_),Re=H(v),Fe=[I(Re),I(je)];if(Pe!=null&&Pe!==!1){const Je=Pe===!0?se(E.BYTES):Pe;Fe.push((0,s.ensureBytes)("extraEntropy",Je))}const pt=o.concatBytes(...Fe),Qe=je;function bt(Je){const Ge=_e(Je);if(!x(Ge))return;const xt=Se(Ge),Pt=me.BASE.multiply(Ge).toAffine(),st=te(Pt.x);if(st===l)return;const Lt=te(xt*te(Qe+st*Re));if(Lt===l)return;let lr=(Pt.x===st?0:2)|Number(Pt.y&c),er=Lt;return Ie&&Y(Lt)&&(er=V(Lt),lr^=1),new W(st,er,lr)}return{seed:pt,k2sig:bt}}const oe={lowS:S.lowS,prehash:!1},ye={lowS:S.lowS,prehash:!1};function g(_,v,J=oe){const{seed:ie,k2sig:se}=q(_,v,J),Ie=S;return o.createHmacDrbg(Ie.hash.outputLen,Ie.nByteLength,Ie.hmac)(ie,se)}me.BASE._setWindowSize(8);function p(_,v,J,ie=ye){var Pt;const se=_;if(v=(0,s.ensureBytes)("msgHash",v),J=(0,s.ensureBytes)("publicKey",J),"strict"in ie)throw new Error("options.strict was renamed to lowS");const{lowS:Ie,prehash:$e}=ie;let Pe,je;try{if(typeof se=="string"||o.isBytes(se))try{Pe=W.fromDER(se)}catch(st){if(!(st instanceof e.DER.Err))throw st;Pe=W.fromCompact(se)}else if(typeof se=="object"&&typeof se.r=="bigint"&&typeof se.s=="bigint"){const{r:st,s:Lt}=se;Pe=new W(st,Lt)}else throw new Error("PARSE");je=me.fromHex(J)}catch(st){if(st.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Ie&&Pe.hasHighS())return!1;$e&&(v=S.hash(v));const{r:Re,s:Fe}=Pe,pt=be(v),Qe=Se(Fe),bt=te(pt*Qe),Je=te(Re*Qe),Ge=(Pt=me.BASE.multiplyAndAddUnsafe(je,bt,Je))==null?void 0:Pt.toAffine();return Ge?te(Ge.x)===Re:!1}return{CURVE:S,getPublicKey:ae,getSharedSecret:re,sign:g,verify:p,ProjectivePoint:me,Signature:W,utils:K}}function O(B,S){const E=B.ORDER;let U=l;for(let Y=E-c;Y%b===l;Y/=b)U+=c;const Q=U,ce=b<<Q-c-c,ue=ce*b,te=(E-c)/ue,Se=(te-c)/b,me=ue-c,H=ce,k=B.pow(S,te),x=B.pow(S,(te+c)/b);let G=(Y,V)=>{let ne=k,W=B.pow(V,me),K=B.sqr(W);K=B.mul(K,V);let ae=B.mul(Y,K);ae=B.pow(ae,Se),ae=B.mul(ae,W),W=B.mul(ae,V),K=B.mul(ae,Y);let de=B.mul(K,W);ae=B.pow(de,H);let re=B.eql(ae,B.ONE);W=B.mul(K,x),ae=B.mul(de,ne),K=B.cmov(W,K,re),de=B.cmov(ae,de,re);for(let _e=Q;_e>c;_e--){let be=_e-b;be=b<<be-c;let R=B.pow(de,be);const I=B.eql(R,B.ONE);W=B.mul(K,ne),ne=B.mul(ne,ne),R=B.mul(de,ne),K=B.cmov(W,K,I),de=B.cmov(R,de,I)}return{isValid:re,value:K}};if(B.ORDER%T===w){const Y=(B.ORDER-w)/T,V=B.sqrt(B.neg(S));G=(ne,W)=>{let K=B.sqr(W);const ae=B.mul(ne,W);K=B.mul(K,ae);let de=B.pow(K,Y);de=B.mul(de,ae);const re=B.mul(de,V),_e=B.mul(B.sqr(de),W),be=B.eql(_e,ne);let R=B.cmov(re,de,be);return{isValid:be,value:R}}}return G}function M(B,S){if(r.validateField(B),!B.isValid(S.A)||!B.isValid(S.B)||!B.isValid(S.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const E=O(B,S.Z);if(!B.isOdd)throw new Error("Fp.isOdd is not implemented!");return U=>{let Q,ce,ue,te,Se,me,H,k;Q=B.sqr(U),Q=B.mul(Q,S.Z),ce=B.sqr(Q),ce=B.add(ce,Q),ue=B.add(ce,B.ONE),ue=B.mul(ue,S.B),te=B.cmov(S.Z,B.neg(ce),!B.eql(ce,B.ZERO)),te=B.mul(te,S.A),ce=B.sqr(ue),me=B.sqr(te),Se=B.mul(me,S.A),ce=B.add(ce,Se),ce=B.mul(ce,ue),me=B.mul(me,te),Se=B.mul(me,S.B),ce=B.add(ce,Se),H=B.mul(Q,ue);const{isValid:x,value:G}=E(ce,me);k=B.mul(Q,U),k=B.mul(k,G),H=B.cmov(H,ue,x),k=B.cmov(k,G,x);const Y=B.isOdd(U)===B.isOdd(k);return k=B.cmov(B.neg(k),k,Y),H=B.div(H,te),{x:H,y:k}}}})(Md);Object.defineProperty(Qu,"__esModule",{value:!0});Qu.getHash=P0;Qu.createCurve=kB;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const jB=y0,Db=Qn,UB=Md;function P0(e){return{hash:e,hmac:(t,...r)=>(0,jB.hmac)(e,t,(0,Db.concatBytes)(...r)),randomBytes:Db.randomBytes}}function kB(e,t){const r=o=>(0,UB.weierstrass)({...e,...P0(o)});return Object.freeze({...r(t),create:r})}var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.expand_message_xmd=C0;eo.expand_message_xof=L0;eo.hash_to_field=Hc;eo.isogenyMap=qB;eo.createHasher=GB;const FB=gt,Xt=it,HB=Xt.bytesToNumberBE;function wi(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function WB(e,t){const r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function kd(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function C0(e,t,r,o){(0,Xt.abytes)(e),(0,Xt.abytes)(t),kd(r),t.length>255&&(t=o((0,Xt.concatBytes)((0,Xt.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:u}=o,f=Math.ceil(r/s);if(f>255)throw new Error("Invalid xmd length");const h=(0,Xt.concatBytes)(t,wi(t.length,1)),l=wi(0,u),c=wi(r,2),b=new Array(f),w=o((0,Xt.concatBytes)(l,e,c,wi(0,1),h));b[0]=o((0,Xt.concatBytes)(w,wi(1,1),h));for(let m=1;m<=f;m++){const L=[WB(w,b[m-1]),wi(m+1,1),h];b[m]=o((0,Xt.concatBytes)(...L))}return(0,Xt.concatBytes)(...b).slice(0,r)}function L0(e,t,r,o,s){if((0,Xt.abytes)(e),(0,Xt.abytes)(t),kd(r),t.length>255){const u=Math.ceil(2*o/8);t=s.create({dkLen:u}).update((0,Xt.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:r}).update(e).update(wi(r,2)).update(t).update(wi(t.length,1)).digest()}function Hc(e,t,r){(0,Xt.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:s,m:u,hash:f,expand:h,DST:l}=r;(0,Xt.abytes)(e),kd(t);const c=typeof l=="string"?(0,Xt.utf8ToBytes)(l):l,b=o.toString(2).length,w=Math.ceil((b+s)/8),T=t*u*w;let m;if(h==="xmd")m=C0(e,c,T,f);else if(h==="xof")m=L0(e,c,T,s,f);else if(h==="_internal_pass")m=e;else throw new Error('expand must be "xmd" or "xof"');const L=new Array(t);for(let P=0;P<t;P++){const O=new Array(u);for(let M=0;M<u;M++){const B=w*(M+P*u),S=m.subarray(B,B+w);O[M]=(0,FB.mod)(HB(S),o)}L[P]=O}return L}function qB(e,t){const r=t.map(o=>Array.from(o).reverse());return(o,s)=>{const[u,f,h,l]=r.map(c=>c.reduce((b,w)=>e.add(e.mul(b,o),w)));return o=e.div(u,f),s=e.mul(s,e.div(h,l)),{x:o,y:s}}}function GB(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,s){const u=Hc(o,2,{...r,DST:r.DST,...s}),f=e.fromAffine(t(u[0])),h=e.fromAffine(t(u[1])),l=f.add(h).clearCofactor();return l.assertValidity(),l},encodeToCurve(o,s){const u=Hc(o,1,{...r,DST:r.encodeDST,...s}),f=e.fromAffine(t(u[0])).clearCofactor();return f.assertValidity(),f},mapToCurve(o){if(!Array.isArray(o))throw new Error("mapToCurve: expected array of bigints");for(const u of o)if(typeof u!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${u} in array`);const s=e.fromAffine(t(o)).clearCofactor();return s.assertValidity(),s}}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Mo,r=Qn,o=Qu,s=eo,u=gt,f=it,h=Md,l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),c=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),w=BigInt(2),T=(W,K)=>(W+K/w)/K;function m(W){const K=l,ae=BigInt(3),de=BigInt(6),re=BigInt(11),_e=BigInt(22),be=BigInt(23),R=BigInt(44),I=BigInt(88),q=W*W*W%K,oe=q*q*W%K,ye=(0,u.pow2)(oe,ae,K)*oe%K,g=(0,u.pow2)(ye,ae,K)*oe%K,p=(0,u.pow2)(g,w,K)*q%K,_=(0,u.pow2)(p,re,K)*p%K,v=(0,u.pow2)(_,_e,K)*_%K,J=(0,u.pow2)(v,R,K)*v%K,ie=(0,u.pow2)(J,I,K)*J%K,se=(0,u.pow2)(ie,R,K)*v%K,Ie=(0,u.pow2)(se,ae,K)*oe%K,$e=(0,u.pow2)(Ie,be,K)*_%K,Pe=(0,u.pow2)($e,de,K)*q%K,je=(0,u.pow2)(Pe,w,K);if(!L.eql(L.sqr(je),W))throw new Error("Cannot find square root");return je}const L=(0,u.Field)(l,void 0,void 0,{sqrt:m});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:L,n:c,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:W=>{const K=c,ae=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),de=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),re=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_e=ae,be=BigInt("0x100000000000000000000000000000000"),R=T(_e*W,K),I=T(-de*W,K);let q=(0,u.mod)(W-R*ae-I*re,K),oe=(0,u.mod)(-R*de-I*_e,K);const ye=q>be,g=oe>be;if(ye&&(q=K-q),g&&(oe=K-oe),q>be||oe>be)throw new Error("splitScalar: Endomorphism failed, k="+W);return{k1neg:ye,k1:q,k2neg:g,k2:oe}}}},t.sha256);const P=BigInt(0),O=W=>typeof W=="bigint"&&P<W&&W<l,M=W=>typeof W=="bigint"&&P<W&&W<c,B={};function S(W,...K){let ae=B[W];if(ae===void 0){const de=(0,t.sha256)(Uint8Array.from(W,re=>re.charCodeAt(0)));ae=(0,f.concatBytes)(de,de),B[W]=ae}return(0,t.sha256)((0,f.concatBytes)(ae,...K))}const E=W=>W.toRawBytes(!0).slice(1),U=W=>(0,f.numberToBytesBE)(W,32),Q=W=>(0,u.mod)(W,l),ce=W=>(0,u.mod)(W,c),ue=e.secp256k1.ProjectivePoint,te=(W,K,ae)=>ue.BASE.multiplyAndAddUnsafe(W,K,ae);function Se(W){let K=e.secp256k1.utils.normPrivateKeyToScalar(W),ae=ue.fromPrivateKey(K);return{scalar:ae.hasEvenY()?K:ce(-K),bytes:E(ae)}}function me(W){if(!O(W))throw new Error("bad x: need 0 < x < p");const K=Q(W*W),ae=Q(K*W+BigInt(7));let de=m(ae);de%w!==P&&(de=Q(-de));const re=new ue(W,de,b);return re.assertValidity(),re}function H(...W){return ce((0,f.bytesToNumberBE)(S("BIP0340/challenge",...W)))}function k(W){return Se(W).bytes}function x(W,K,ae=(0,r.randomBytes)(32)){const de=(0,f.ensureBytes)("message",W),{bytes:re,scalar:_e}=Se(K),be=(0,f.ensureBytes)("auxRand",ae,32),R=U(_e^(0,f.bytesToNumberBE)(S("BIP0340/aux",be))),I=S("BIP0340/nonce",R,re,de),q=ce((0,f.bytesToNumberBE)(I));if(q===P)throw new Error("sign failed: k is zero");const{bytes:oe,scalar:ye}=Se(q),g=H(oe,re,de),p=new Uint8Array(64);if(p.set(oe,0),p.set(U(ce(ye+g*_e)),32),!G(p,de,re))throw new Error("sign: Invalid signature produced");return p}function G(W,K,ae){const de=(0,f.ensureBytes)("signature",W,64),re=(0,f.ensureBytes)("message",K),_e=(0,f.ensureBytes)("publicKey",ae,32);try{const be=me((0,f.bytesToNumberBE)(_e)),R=(0,f.bytesToNumberBE)(de.subarray(0,32));if(!O(R))return!1;const I=(0,f.bytesToNumberBE)(de.subarray(32,64));if(!M(I))return!1;const q=H(U(R),E(be),re),oe=te(be,I,ce(-q));return!(!oe||!oe.hasEvenY()||oe.toAffine().x!==R)}catch{return!1}}e.schnorr={getPublicKey:k,sign:x,verify:G,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:me,pointToBytes:E,numberToBytesBE:f.numberToBytesBE,bytesToNumberBE:f.bytesToNumberBE,taggedHash:S,mod:u.mod}};const Y=(0,s.isogenyMap)(L,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(W=>W.map(K=>BigInt(K)))),V=(0,h.mapToCurveSimpleSWU)(L,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:L.create(BigInt("-11"))}),ne=(0,s.createHasher)(e.secp256k1.ProjectivePoint,W=>{const{x:K,y:ae}=V(L.create(W[0]));return Y(K,ae)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:L.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=ne.hashToCurve,e.encodeToCurve=ne.encodeToCurve})(c0);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=c0;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Xu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=$.bufferPolyfill,r=Xu;e.MAX_UINT64=BigInt("0xffffffffffffffff"),e.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),e.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),e.SECP256K1_ORDER=r.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex"),e.RLP_EMPTY_STRING=t.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16})(Yu);var sf={};Object.defineProperty(sf,"__esModule",{value:!0});sf.GWEI_TO_WEI=void 0;sf.GWEI_TO_WEI=BigInt(1e9);var Fd={},An={};Object.defineProperty(An,"__esModule",{value:!0});An.RLP=An.utils=An.decode=An.encode=void 0;function Hd(e){if(Array.isArray(e)){const r=[];let o=0;for(let s=0;s<e.length;s++){const u=Hd(e[s]);r.push(u),o+=u.length}return qc(Ub(o,192),...r)}const t=D0(e);return t.length===1&&t[0]<128?t:qc(Ub(t.length,128),t)}An.encode=Hd;function vo(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function jb(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return N0(B0(e))}function Ub(e,t){if(e<56)return Uint8Array.from([e+t]);const r=Gc(e),o=r.length/2,s=Gc(t+55+o);return Uint8Array.from(Eu(s+r))}function $0(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const r=D0(e),o=Wc(r);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}An.decode=$0;function Wc(e){let t,r,o,s,u;const f=[],h=e[0];if(h<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(h<=183){if(t=h-127,h===128?o=Uint8Array.from([]):o=vo(e,1,t),t===2&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}else if(h<=191){if(r=h-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=jb(vo(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=vo(e,r,t+r),{data:o,remainder:e.slice(t+r)}}else if(h<=247){for(t=h-191,s=vo(e,1,t);s.length;)u=Wc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(r=h-246,t=jb(vo(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const l=r+t;if(l>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=vo(e,r,l);s.length;)u=Wc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(l)}}}const VB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function B0(e){let t="";for(let r=0;r<e.length;r++)t+=VB[e[r]];return t}function N0(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function Eu(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const o=r*2;t[r]=N0(e.slice(o,o+2))}return t}function qc(...e){if(e.length===1)return e[0];const t=e.reduce((o,s)=>o+s.length,0),r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function M0(e){return new TextEncoder().encode(e)}function Gc(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function zB(e){return e.length%2?`0${e}`:e}function x0(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function KB(e){return typeof e!="string"?e:x0(e)?e.slice(2):e}function D0(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return x0(e)?Eu(zB(KB(e))):M0(e);if(typeof e=="number"||typeof e=="bigint")return e?Eu(Gc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}An.utils={bytesToHex:B0,concatBytes:qc,hexToBytes:Eu,utf8ToBytes:M0};An.RLP={encode:Hd,decode:$0};var rn={},ct={},De={};Object.defineProperty(De,"__esModule",{value:!0});De.add5L=De.add5H=De.add4H=De.add4L=De.add3H=De.add3L=De.add=De.rotlBL=De.rotlBH=De.rotlSL=De.rotlSH=De.rotr32L=De.rotr32H=De.rotrBL=De.rotrBH=De.rotrSL=De.rotrSH=De.shrSL=De.shrSH=De.toBig=De.split=De.fromBig=void 0;const nu=BigInt(2**32-1),Vc=BigInt(32);function Wd(e,t=!1){return t?{h:Number(e&nu),l:Number(e>>Vc&nu)}:{h:Number(e>>Vc&nu)|0,l:Number(e&nu)|0}}De.fromBig=Wd;function j0(e,t=!1){let r=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:u,l:f}=Wd(e[s],t);[r[s],o[s]]=[u,f]}return[r,o]}De.split=j0;const U0=(e,t)=>BigInt(e>>>0)<<Vc|BigInt(t>>>0);De.toBig=U0;const k0=(e,t,r)=>e>>>r;De.shrSH=k0;const F0=(e,t,r)=>e<<32-r|t>>>r;De.shrSL=F0;const H0=(e,t,r)=>e>>>r|t<<32-r;De.rotrSH=H0;const W0=(e,t,r)=>e<<32-r|t>>>r;De.rotrSL=W0;const q0=(e,t,r)=>e<<64-r|t>>>r-32;De.rotrBH=q0;const G0=(e,t,r)=>e>>>r-32|t<<64-r;De.rotrBL=G0;const V0=(e,t)=>t;De.rotr32H=V0;const z0=(e,t)=>e;De.rotr32L=z0;const K0=(e,t,r)=>e<<r|t>>>32-r;De.rotlSH=K0;const J0=(e,t,r)=>t<<r|e>>>32-r;De.rotlSL=J0;const Y0=(e,t,r)=>t<<r-32|e>>>64-r;De.rotlBH=Y0;const X0=(e,t,r)=>e<<r-32|t>>>64-r;De.rotlBL=X0;function Z0(e,t,r,o){const s=(t>>>0)+(o>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}De.add=Z0;const Q0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);De.add3L=Q0;const ew=(e,t,r,o)=>t+r+o+(e/2**32|0)|0;De.add3H=ew;const tw=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0);De.add4L=tw;const rw=(e,t,r,o,s)=>t+r+o+s+(e/2**32|0)|0;De.add4H=rw;const nw=(e,t,r,o,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(s>>>0);De.add5L=nw;const iw=(e,t,r,o,s,u)=>t+r+o+s+u+(e/2**32|0)|0;De.add5H=iw;const JB={fromBig:Wd,split:j0,toBig:U0,shrSH:k0,shrSL:F0,rotrSH:H0,rotrSL:W0,rotrBH:q0,rotrBL:G0,rotr32H:V0,rotr32L:z0,rotlSH:K0,rotlSL:J0,rotlBH:Y0,rotlBL:X0,add:Z0,add3L:Q0,add3H:ew,add4L:tw,add4H:rw,add5H:iw,add5L:nw};De.default=JB;Object.defineProperty(ct,"__esModule",{value:!0});ct.shake256=ct.shake128=ct.keccak_512=ct.keccak_384=ct.keccak_256=ct.keccak_224=ct.sha3_512=ct.sha3_384=ct.sha3_256=ct.sha3_224=ct.Keccak=ct.keccakP=void 0;const So=It,$s=De,zn=Qn,ow=[],sw=[],aw=[],YB=BigInt(0),ws=BigInt(1),XB=BigInt(2),ZB=BigInt(7),QB=BigInt(256),eN=BigInt(113);for(let e=0,t=ws,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],ow.push(2*(5*o+r)),sw.push((e+1)*(e+2)/2%64);let s=YB;for(let u=0;u<7;u++)t=(t<<ws^(t>>ZB)*eN)%QB,t&XB&&(s^=ws<<(ws<<BigInt(u))-ws);aw.push(s)}const[tN,rN]=(0,$s.split)(aw,!0),kb=(e,t,r)=>r>32?(0,$s.rotlBH)(e,t,r):(0,$s.rotlSH)(e,t,r),Fb=(e,t,r)=>r>32?(0,$s.rotlBL)(e,t,r):(0,$s.rotlSL)(e,t,r);function uw(e,t=24){const r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let f=0;f<10;f++)r[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){const h=(f+8)%10,l=(f+2)%10,c=r[l],b=r[l+1],w=kb(c,b,1)^r[h],T=Fb(c,b,1)^r[h+1];for(let m=0;m<50;m+=10)e[f+m]^=w,e[f+m+1]^=T}let s=e[2],u=e[3];for(let f=0;f<24;f++){const h=sw[f],l=kb(s,u,h),c=Fb(s,u,h),b=ow[f];s=e[b],u=e[b+1],e[b]=l,e[b+1]=c}for(let f=0;f<50;f+=10){for(let h=0;h<10;h++)r[h]=e[f+h];for(let h=0;h<10;h++)e[f+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=tN[o],e[1]^=rN[o]}r.fill(0)}ct.keccakP=uw;class Ws extends zn.Hash{constructor(t,r,o,s=!1,u=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=s,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,So.number)(o),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,zn.u32)(this.state)}keccak(){zn.isLE||(0,zn.byteSwap32)(this.state32),uw(this.state32,this.rounds),zn.isLE||(0,zn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,So.exists)(this);const{blockLen:r,state:o}=this;t=(0,zn.toBytes)(t);const s=t.length;for(let u=0;u<s;){const f=Math.min(r-this.pos,s-u);for(let h=0;h<f;h++)o[this.pos++]^=t[u++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:o,blockLen:s}=this;t[o]^=r,r&128&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){(0,So.exists)(this,!1),(0,So.bytes)(t),this.finish();const r=this.state,{blockLen:o}=this;for(let s=0,u=t.length;s<u;){this.posOut>=o&&this.keccak();const f=Math.min(o-this.posOut,u-s);t.set(r.subarray(this.posOut,this.posOut+f),s),this.posOut+=f,s+=f}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,So.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,So.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:r,suffix:o,outputLen:s,rounds:u,enableXOF:f}=this;return t||(t=new Ws(r,o,s,f,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=o,t.outputLen=s,t.enableXOF=f,t.destroyed=this.destroyed,t}}ct.Keccak=Ws;const Ti=(e,t,r)=>(0,zn.wrapConstructor)(()=>new Ws(t,e,r));ct.sha3_224=Ti(6,144,224/8);ct.sha3_256=Ti(6,136,256/8);ct.sha3_384=Ti(6,104,384/8);ct.sha3_512=Ti(6,72,512/8);ct.keccak_224=Ti(1,144,224/8);ct.keccak_256=Ti(1,136,256/8);ct.keccak_384=Ti(1,104,384/8);ct.keccak_512=Ti(1,72,512/8);const fw=(e,t,r)=>(0,zn.wrapXOFConstructorWithOpts)((o={})=>new Ws(t,e,o.dkLen===void 0?r:o.dkLen,!0));ct.shake128=fw(31,168,128/8);ct.shake256=fw(31,136,256/8);var vu={exports:{}};vu.exports;(function(e,t){var r=$.commonjsGlobal&&$.commonjsGlobal.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0,t.bytesToUtf8=l,t.hexToBytes=c,t.equalsBytes=b,t.wrapHash=w;const o=r(It),s=Qn,u=o.default.bool;t.assertBool=u;const f=o.default.bytes;t.assertBytes=f;var h=Qn;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return h.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return h.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return h.utf8ToBytes}});function l(T){if(!(T instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof T}`);return new TextDecoder().decode(T)}function c(T){const m=T.startsWith("0x")?T.substring(2):T;return(0,s.hexToBytes)(m)}function b(T,m){if(T.length!==m.length)return!1;for(let L=0;L<T.length;L++)if(T[L]!==m[L])return!1;return!0}function w(T){return m=>(o.default.bytes(m),T(m))}t.crypto=(()=>{const T=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,m=typeof $.commonjsRequire=="function"&&$.commonjsRequire.bind(e);return{node:m&&!T?m("crypto"):void 0,web:T}})()})(vu,vu.exports);var lw=vu.exports;Object.defineProperty(rn,"__esModule",{value:!0});rn.keccak512=rn.keccak384=rn.keccak256=rn.keccak224=void 0;const Bs=ct,af=lw;rn.keccak224=(0,af.wrapHash)(Bs.keccak_224);rn.keccak256=(()=>{const e=(0,af.wrapHash)(Bs.keccak_256);return e.create=Bs.keccak_256.create,e})();rn.keccak384=(0,af.wrapHash)(Bs.keccak_384);rn.keccak512=(0,af.wrapHash)(Bs.keccak_512);var to={},Hr={},dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.isHexString=dt.getKeys=dt.fromAscii=dt.fromUtf8=dt.toAscii=dt.arrayContainsArray=dt.getBinarySize=dt.padToEven=dt.stripHexPrefix=dt.isHexPrefixed=void 0;function cw(e){if(typeof e!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return e[0]==="0"&&e[1]==="x"}dt.isHexPrefixed=cw;const nN=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return cw(e)?e.slice(2):e};dt.stripHexPrefix=nN;function dw(e){let t=e;if(typeof t!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}dt.padToEven=dw;function iN(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return $.dist.Buffer.byteLength(e,"utf8")}dt.getBinarySize=iN;function oN(e,t,r){if(Array.isArray(e)!==!0)throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(Array.isArray(t)!==!0)throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[r===!0?"some":"every"](o=>e.indexOf(o)>=0)}dt.arrayContainsArray=oN;function sN(e){let t="",r=0;const o=e.length;for(e.substring(0,2)==="0x"&&(r=2);r<o;r+=2){const s=parseInt(e.substr(r,2),16);t+=String.fromCharCode(s)}return t}dt.toAscii=sN;function aN(e){const t=$.dist.Buffer.from(e,"utf8");return`0x${dw(t.toString("hex")).replace(/^0+|0+$/g,"")}`}dt.fromUtf8=aN;function uN(e){let t="";for(let r=0;r<e.length;r++){const s=e.charCodeAt(r).toString(16);t+=s.length<2?`0${s}`:s}return`0x${t}`}dt.fromAscii=uN;function fN(e,t,r){if(!Array.isArray(e))throw new Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if(typeof t!="string")throw new Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);const o=[];for(let s=0;s<e.length;s++){let u=e[s][t];if(r===!0&&!u)u="";else if(typeof u!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof u}`);o.push(u)}return o}dt.getKeys=fN;function lN(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}dt.isHexString=lN;Object.defineProperty(Hr,"__esModule",{value:!0});Hr.assertIsString=Hr.assertIsArray=Hr.assertIsBuffer=Hr.assertIsHexString=void 0;const cN=dt,dN=function(e){if(!(0,cN.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Hr.assertIsHexString=dN;const hN=function(e){if(!$.dist.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Hr.assertIsBuffer=hN;const gN=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Hr.assertIsArray=gN;const pN=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Hr.assertIsString=pN;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=Hr,r=dt,o=function(x){if(!Number.isSafeInteger(x)||x<0)throw new Error(`Received an invalid integer type: ${x}`);return`0x${x.toString(16)}`};e.intToHex=o;const s=function(x){const G=(0,e.intToHex)(x);return $.dist.Buffer.from((0,r.padToEven)(G.slice(2)),"hex")};e.intToBuffer=s;const u=function(x){return $.dist.Buffer.allocUnsafe(x).fill(0)};e.zeros=u;const f=function(x,G,Y){const V=(0,e.zeros)(G);return Y?x.length<G?(x.copy(V),V):x.slice(0,G):x.length<G?(x.copy(V,G-x.length),V):x.slice(-G)},h=function(x,G){return(0,t.assertIsBuffer)(x),f(x,G,!1)};e.setLengthLeft=h;const l=function(x,G){return(0,t.assertIsBuffer)(x),f(x,G,!0)};e.setLengthRight=l;const c=function(x){let G=x[0];for(;x.length>0&&G.toString()==="0";)x=x.slice(1),G=x[0];return x},b=function(x){return(0,t.assertIsBuffer)(x),c(x)};e.unpadBuffer=b;const w=function(x){return(0,t.assertIsArray)(x),c(x)};e.unpadArray=w;const T=function(x){return(0,t.assertIsHexString)(x),x=(0,r.stripHexPrefix)(x),"0x"+c(x)};e.unpadHexString=T;const m=function(x){if(x==null)return $.dist.Buffer.allocUnsafe(0);if($.dist.Buffer.isBuffer(x)||Array.isArray(x)||x instanceof Uint8Array)return $.dist.Buffer.from(x);if(typeof x=="string"){if(!(0,r.isHexString)(x))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${x}`);return $.dist.Buffer.from((0,r.padToEven)((0,r.stripHexPrefix)(x)),"hex")}if(typeof x=="number")return(0,e.intToBuffer)(x);if(typeof x=="bigint"){if(x<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${x}`);let G=x.toString(16);return G.length%2&&(G="0"+G),$.dist.Buffer.from(G,"hex")}if(x.toArray)return $.dist.Buffer.from(x.toArray());if(x.toBuffer)return $.dist.Buffer.from(x.toBuffer());throw new Error("invalid type")};e.toBuffer=m;const L=function(x){return x=(0,e.toBuffer)(x),"0x"+x.toString("hex")};e.bufferToHex=L;function P(x){const G=(0,e.bufferToHex)(x);return BigInt(G==="0x"?0:G)}e.bufferToBigInt=P;function O(x){return(0,e.toBuffer)("0x"+x.toString(16))}e.bigIntToBuffer=O;const M=function(x){const G=Number(P(x));if(!Number.isSafeInteger(G))throw new Error("Number exceeds 53 bits");return G};e.bufferToInt=M;const B=function(x){return BigInt.asIntN(256,P(x))};e.fromSigned=B;const S=function(x){return O(BigInt.asUintN(256,x))};e.toUnsigned=S;const E=function(x){return typeof x!="string"||(0,r.isHexPrefixed)(x)?x:"0x"+x};e.addHexPrefix=E;function U(x,G=50){const Y=$.dist.Buffer.isBuffer(x)?x.toString("hex"):x;return Y.length<=G?Y:Y.slice(0,G)+"…"}e.short=U;const Q=function(x){const G=/^(00)+|(00)+$/g;if(x=(0,r.stripHexPrefix)(x),x.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return $.dist.Buffer.from(x.replace(G,""),"hex").toString("utf8")};e.toUtf8=Q;const ce=function(x){if($.dist.Buffer.isBuffer(x))return`0x${x.toString("hex")}`;if(x instanceof Array){const G=[];for(let Y=0;Y<x.length;Y++)G.push((0,e.baToJSON)(x[Y]));return G}};e.baToJSON=ce;const ue=function(x){for(const[G,Y]of Object.entries(x))if(Y!==void 0&&Y.length>0&&Y[0]===0)throw new Error(`${G} cannot have leading zeroes, received: ${Y.toString("hex")}`)};e.validateNoLeadingZeroes=ue;function te(x){return Array.isArray(x)?x.map(G=>te(G)):$.dist.Buffer.from(x)}e.arrToBufArr=te;function Se(x){return Array.isArray(x)?x.map(G=>Se(G)):Uint8Array.from(x??[])}e.bufArrToArr=Se;const me=x=>"0x"+x.toString(16);e.bigIntToHex=me;function H(x){return(0,e.unpadBuffer)(O(x))}e.bigIntToUnpaddedBuffer=H;function k(x){return(0,e.unpadBuffer)((0,e.intToBuffer)(x))}e.intToUnpaddedBuffer=k})(to);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const t=An,r=rn,o=Xu,s=lw,u=to,f=Yu,h=Hr,l=dt,c=BigInt(0);class b{constructor(k=c,x=c,G=f.KECCAK256_RLP,Y=f.KECCAK256_NULL){this.nonce=k,this.balance=x,this.storageRoot=G,this.codeHash=Y,this._validate()}static fromAccountData(k){const{nonce:x,balance:G,storageRoot:Y,codeHash:V}=k;return new b(x!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(x)):void 0,G!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(G)):void 0,Y!==void 0?(0,u.toBuffer)(Y):void 0,V!==void 0?(0,u.toBuffer)(V):void 0)}static fromRlpSerializedAccount(k){const x=(0,u.arrToBufArr)(t.RLP.decode(Uint8Array.from(k)));if(!Array.isArray(x))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(x)}static fromValuesArray(k){const[x,G,Y,V]=k;return new b((0,u.bufferToBigInt)(x),(0,u.bufferToBigInt)(G),Y,V)}_validate(){if(this.nonce<c)throw new Error("nonce must be greater than zero");if(this.balance<c)throw new Error("balance must be greater than zero");if(this.storageRoot.length!==32)throw new Error("storageRoot must have a length of 32");if(this.codeHash.length!==32)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return $.dist.Buffer.from(t.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(f.KECCAK256_NULL)}isEmpty(){return this.balance===c&&this.nonce===c&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=b;const w=function(H){try{(0,h.assertIsString)(H)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(H)};e.isValidAddress=w;const T=function(H,k){(0,h.assertIsHexString)(H);const x=(0,l.stripHexPrefix)(H).toLowerCase();let G="";k!==void 0&&(G=(0,u.bufferToBigInt)((0,u.toBuffer)(k)).toString()+"0x");const Y=$.dist.Buffer.from(G+x,"utf8"),V=(0,s.bytesToHex)((0,r.keccak256)(Y));let ne="0x";for(let W=0;W<x.length;W++)parseInt(V[W],16)>=8?ne+=x[W].toUpperCase():ne+=x[W];return ne};e.toChecksumAddress=T;const m=function(H,k){return(0,e.isValidAddress)(H)&&(0,e.toChecksumAddress)(H,k)===H};e.isValidChecksumAddress=m;const L=function(H,k){return(0,h.assertIsBuffer)(H),(0,h.assertIsBuffer)(k),(0,u.bufferToBigInt)(k)===BigInt(0)?$.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([H,null])))).slice(-20):$.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([H,k])))).slice(-20)};e.generateAddress=L;const P=function(H,k,x){if((0,h.assertIsBuffer)(H),(0,h.assertIsBuffer)(k),(0,h.assertIsBuffer)(x),H.length!==20)throw new Error("Expected from to be of length 20");if(k.length!==32)throw new Error("Expected salt to be of length 32");const G=(0,r.keccak256)($.dist.Buffer.concat([$.dist.Buffer.from("ff","hex"),H,k,(0,r.keccak256)(x)]));return(0,u.toBuffer)(G).slice(-20)};e.generateAddress2=P;const O=function(H){return o.secp256k1.utils.isValidPrivateKey(H)};e.isValidPrivate=O;const M=function(H,k=!1){if((0,h.assertIsBuffer)(H),H.length===64)try{return o.secp256k1.ProjectivePoint.fromHex($.dist.Buffer.concat([$.dist.Buffer.from([4]),H])),!0}catch{return!1}if(!k)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(H),!0}catch{return!1}};e.isValidPublic=M;const B=function(H,k=!1){if((0,h.assertIsBuffer)(H),k&&H.length!==64&&(H=$.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(H).toRawBytes(!1).slice(1))),H.length!==64)throw new Error("Expected pubKey to be of length 64");return $.dist.Buffer.from((0,r.keccak256)(H)).slice(-20)};e.pubToAddress=B,e.publicToAddress=e.pubToAddress;const S=function(H){return(0,h.assertIsBuffer)(H),$.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(H).toRawBytes(!1).slice(1))};e.privateToPublic=S;const E=function(H){return(0,e.publicToAddress)((0,e.privateToPublic)(H))};e.privateToAddress=E;const U=function(H){return(0,h.assertIsBuffer)(H),H.length!==64&&(H=$.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(H).toRawBytes(!1).slice(1))),H};e.importPublic=U;const Q=function(){const k=(0,u.zeros)(20);return(0,u.bufferToHex)(k)};e.zeroAddress=Q;const ce=function(H){try{(0,h.assertIsString)(H)}catch{return!1}return(0,e.zeroAddress)()===H};e.isZeroAddress=ce;function ue(H){const[k,x,G,Y]=H;return[k,x,(0,u.arrToBufArr)(G).length===0?f.KECCAK256_RLP:G,(0,u.arrToBufArr)(Y).length===0?f.KECCAK256_NULL:Y]}e.accountBodyFromSlim=ue;const te=new Uint8Array(0);function Se(H){const[k,x,G,Y]=H;return[k,x,(0,u.arrToBufArr)(G).equals(f.KECCAK256_RLP)?te:G,(0,u.arrToBufArr)(Y).equals(f.KECCAK256_NULL)?te:Y]}e.accountBodyToSlim=Se;function me(H,k=!0){const x=k?ue(H):H;return(0,u.arrToBufArr)(t.RLP.encode(x))}e.accountBodyToRLP=me})(Fd);var qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.Address=void 0;const ms=Fd,iu=to;class Kn{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new Kn((0,iu.zeros)(20))}static fromString(t){if(!(0,ms.isValidAddress)(t))throw new Error("Invalid address");return new Kn((0,iu.toBuffer)(t))}static fromPublicKey(t){if(!$.dist.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const r=(0,ms.pubToAddress)(t);return new Kn(r)}static fromPrivateKey(t){if(!$.dist.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const r=(0,ms.privateToAddress)(t);return new Kn(r)}static generate(t,r){if(typeof r!="bigint")throw new Error("Expected nonce to be a bigint");return new Kn((0,ms.generateAddress)(t.buf,(0,iu.bigIntToBuffer)(r)))}static generate2(t,r,o){if(!$.dist.Buffer.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!$.dist.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new Kn((0,ms.generateAddress2)(t.buf,r,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(Kn.zero())}isPrecompileOrSystemAddress(){const t=(0,iu.bufferToBigInt)(this.buf),r=BigInt(0),o=BigInt("0xffff");return t>=r&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return $.dist.Buffer.from(this.buf)}}qs.Address=Kn;var uf={},qd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=to,r=dt;var o;(function(u){u[u.Number=0]="Number",u[u.BigInt=1]="BigInt",u[u.Buffer=2]="Buffer",u[u.PrefixedHexString=3]="PrefixedHexString"})(o=e.TypeOutput||(e.TypeOutput={}));function s(u,f){if(u===null)return null;if(u===void 0)return;if(typeof u=="string"&&!(0,r.isHexString)(u))throw new Error(`A string must be provided with a 0x-prefix, given: ${u}`);if(typeof u=="number"&&!Number.isSafeInteger(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const h=(0,t.toBuffer)(u);switch(f){case o.Buffer:return h;case o.BigInt:return(0,t.bufferToBigInt)(h);case o.Number:{const l=(0,t.bufferToBigInt)(h);if(l>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(l)}case o.PrefixedHexString:return(0,t.bufferToHex)(h);default:throw new Error("unknown outputType")}}e.toType=s})(qd);Object.defineProperty(uf,"__esModule",{value:!0});uf.Withdrawal=void 0;const Hb=qs,cc=to,Rt=qd;class As{constructor(t,r,o,s){this.index=t,this.validatorIndex=r,this.address=o,this.amount=s}static fromWithdrawalData(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,Rt.toType)(r,Rt.TypeOutput.BigInt),h=(0,Rt.toType)(o,Rt.TypeOutput.BigInt),l=new Hb.Address((0,Rt.toType)(s,Rt.TypeOutput.Buffer)),c=(0,Rt.toType)(u,Rt.TypeOutput.BigInt);return new As(f,h,l,c)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[r,o,s,u]=t;return As.fromWithdrawalData({index:r,validatorIndex:o,address:s,amount:u})}static toBufferArray(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,Rt.toType)(r,Rt.TypeOutput.BigInt)===BigInt(0)?$.dist.Buffer.alloc(0):(0,Rt.toType)(r,Rt.TypeOutput.Buffer),h=(0,Rt.toType)(o,Rt.TypeOutput.BigInt)===BigInt(0)?$.dist.Buffer.alloc(0):(0,Rt.toType)(o,Rt.TypeOutput.Buffer);let l;s instanceof Hb.Address?l=s.buf:l=(0,Rt.toType)(s,Rt.TypeOutput.Buffer);const c=(0,Rt.toType)(u,Rt.TypeOutput.BigInt)===BigInt(0)?$.dist.Buffer.alloc(0):(0,Rt.toType)(u,Rt.TypeOutput.Buffer);return[f,h,l,c]}raw(){return As.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,cc.bigIntToHex)(this.index),validatorIndex:(0,cc.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,cc.bigIntToHex)(this.amount)}}}uf.Withdrawal=As;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.hashPersonalMessage=Zt.isValidSignature=Zt.fromRpcSig=Zt.toCompactSig=Zt.toRpcSig=Zt.ecrecover=Zt.ecsign=void 0;const bN=rn,hw=Xu,br=to,dc=Yu,_N=Hr;function yN(e,t,r){const o=hw.secp256k1.sign(e,t),s=o.toCompactRawBytes(),u=$.dist.Buffer.from(s.slice(0,32)),f=$.dist.Buffer.from(s.slice(32,64)),h=r===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(r)*BigInt(2);return{r:u,s:f,v:h}}Zt.ecsign=yN;function ff(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function lf(e){return e===BigInt(0)||e===BigInt(1)}const wN=function(e,t,r,o,s){const u=$.dist.Buffer.concat([(0,br.setLengthLeft)(r,32),(0,br.setLengthLeft)(o,32)],64),f=ff(t,s);if(!lf(f))throw new Error("Invalid signature v value");const l=hw.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return $.dist.Buffer.from(l.toRawBytes(!1).slice(1))};Zt.ecrecover=wN;const mN=function(e,t,r,o){const s=ff(e,o);if(!lf(s))throw new Error("Invalid signature v value");return(0,br.bufferToHex)($.dist.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(r,32),(0,br.toBuffer)(e)]))};Zt.toRpcSig=mN;const EN=function(e,t,r,o){const s=ff(e,o);if(!lf(s))throw new Error("Invalid signature v value");let u=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(u=$.dist.Buffer.from(r),u[0]|=128),(0,br.bufferToHex)($.dist.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(u,32)]))};Zt.toCompactSig=EN;const vN=function(e){const t=(0,br.toBuffer)(e);let r,o,s;if(t.length>=65)r=t.slice(0,32),o=t.slice(32,64),s=(0,br.bufferToBigInt)(t.slice(64));else if(t.length===64)r=t.slice(0,32),o=t.slice(32,64),s=BigInt((0,br.bufferToInt)(t.slice(32,33))>>7),o[0]&=127;else throw new Error("Invalid signature length");return s<27&&(s=s+BigInt(27)),{v:s,r,s:o}};Zt.fromRpcSig=vN;const SN=function(e,t,r,o=!0,s){if(t.length!==32||r.length!==32||!lf(ff(e,s)))return!1;const u=(0,br.bufferToBigInt)(t),f=(0,br.bufferToBigInt)(r);return!(u===BigInt(0)||u>=dc.SECP256K1_ORDER||f===BigInt(0)||f>=dc.SECP256K1_ORDER||o&&f>=dc.SECP256K1_ORDER_DIV_2)};Zt.isValidSignature=SN;const RN=function(e){(0,_N.assertIsBuffer)(e);const t=$.dist.Buffer.from(`Ethereum Signed Message:
|
|
3
3
|
${e.length}`,"utf-8");return $.dist.Buffer.from((0,bN.keccak256)($.dist.Buffer.concat([t,e])))};Zt.hashPersonalMessage=RN;var gw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;const t=f=>f.length>0&&f[f.length-1]===16;e.hasTerminator=t;const r=(f,h)=>{for(let l=0,c=0;c<f.length;l+=1,c+=2)h[l]=f[c]<<4|f[c+1]};e.nibblesToBytes=r;const o=f=>{let h=0;(0,e.hasTerminator)(f)&&(h=1,f=f.subarray(0,f.length-1));const l=new Uint8Array(f.length/2+1);return l[0]=h<<5,(f.length&1)===1&&(l[0]|=16,l[0]|=f[0],f=f.subarray(1)),(0,e.nibblesToBytes)(f,l.subarray(1)),l};e.nibblesToCompactBytes=o;const s=f=>{const h=f.length*2+1,l=new Uint8Array(h);for(let c=0;c<f.length;c++){const b=f[c];l[c*2]=b/16,l[c*2+1]=b%16}return l[h-1]=16,l};e.bytesToNibbles=s;const u=f=>{if(f.length===0)return f;let h=(0,e.bytesToNibbles)(f);h[0]<2&&(h=h.subarray(0,h.length-1));const l=2-(h[0]&1);return h.subarray(l)};e.compactBytesToNibbles=u})(gw);var cf={};Object.defineProperty(cf,"__esModule",{value:!0});cf.AsyncEventEmitter=void 0;const AN=$.requireEvents();async function TN(e,t,r){let o;for await(const s of t)try{s.length<2?s.call(e,r):await new Promise((u,f)=>{s.call(e,r,h=>{h?f(h):u()})})}catch(u){o=u}if(o)throw o}class IN extends AN.EventEmitter{emit(t,...r){let[o,s]=r;const u=this;let f=u._events[t]??[];return s===void 0&&typeof o=="function"&&(s=o,o=void 0),(t==="newListener"||t==="removeListener")&&(o={event:o,fn:s},s=void 0),f=Array.isArray(f)?f:[f],TN(u,f.slice(),o).then(s).catch(s),u.listenerCount(t)>0}once(t,r){const o=this;let s;if(typeof r!="function")throw new TypeError("listener must be a function");return r.length>=2?s=function(u,f){o.removeListener(t,s),r(u,f)}:s=function(u){o.removeListener(t,s),r(u,s)},o.on(t,s),o}first(t,r){let o=this._events[t]??[];if(typeof r!="function")throw new TypeError("listener must be a function");return Array.isArray(o)||(this._events[t]=o=[o]),o.unshift(r),this}before(t,r,o){return this.beforeOrAfter(t,r,o)}after(t,r,o){return this.beforeOrAfter(t,r,o,"after")}beforeOrAfter(t,r,o,s){let u=this._events[t]??[],f,h;const l=s==="after"?1:0;if(typeof o!="function")throw new TypeError("listener must be a function");if(typeof r!="function")throw new TypeError("target must be a function");for(Array.isArray(u)||(this._events[t]=u=[u]),h=u.length,f=u.length;f--;)if(u[f]===r){h=f+l;break}return u.splice(h,0,o),this}on(t,r){return super.on(t,r)}addListener(t,r){return super.addListener(t,r)}prependListener(t,r){return super.prependListener(t,r)}prependOnceListener(t,r){return super.prependOnceListener(t,r)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,r){return super.removeListener(t,r)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}cf.AsyncEventEmitter=IN;var df={};Object.defineProperty(df,"__esModule",{value:!0});df.Lock=void 0;class ON{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(t=>this.promiseResolverQueue.push(t))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(this.permits===1&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}df.Lock=ON;var xo={},zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.InvalidStatusCodeError=zi.InvalidCertError=void 0;const pw=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class zc extends Error{constructor(t,r){super(t),this.fingerprint256=r}}zi.InvalidCertError=zc;class Gd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}zi.InvalidStatusCodeError=Gd;function bw(e,t){if(!t||t==="text"||t==="json")try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return r;try{return JSON.parse(r)}catch(o){if(t==="json")throw o;return r}}catch(r){if(t==="text"||t==="json")throw r}return e}let Wb={};function Kc(e,t){var T;let r={...pw,...t};const o=$.streamHttp,s=$.httpsBrowserifyExports,u=$.lib,{promisify:f}=$.util,{resolve:h}=$.urlExports,l=!!/^https/.test(e);let c={method:r.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=m=>m.replace(/:| /g,"").toLowerCase();if(r.keepAlive){const m={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},L=[l,l&&((T=r.sslPinnedCertificates)==null?void 0:T.map(P=>b(P)).sort())].join();c.agent=Wb[L]||(Wb[L]=new(l?s:o).Agent(m))}r.type==="json"&&(c.headers["Content-Type"]="application/json"),r.data&&(r.method||(c.method="POST"),c.body=r.type==="json"?JSON.stringify(r.data):r.data),c.headers={...c.headers,...r.headers},r.sslAllowSelfSigned&&(c.rejectUnauthorized=!1);const w=async m=>{const L=m.statusCode;if(r.redirect&&300<=L&&L<400&&m.headers.location){if(r._redirectCount==10)throw new Error("Request failed. Too much redirects.");return r._redirectCount+=1,await Kc(h(e,m.headers.location),r)}if(r.expectStatusCode&&L!==r.expectStatusCode)throw m.resume(),new Gd(L);let P=[];for await(const S of m)P.push(S);let O=$.dist.Buffer.concat(P);const M=m.headers["content-encoding"];M==="br"&&(O=await f(u.brotliDecompress)(O)),(M==="gzip"||M==="deflate")&&(O=await f(u.unzip)(O));const B=bw(O,r.type);return r.full?{headers:m.headers,status:L,body:B}:B};return new Promise((m,L)=>{var S;const P=async E=>{if(E&&E.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await Kc(e,{...r,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(U){U&&U.fingerprint256&&(E=new zc(`Self-signed SSL certificate: ${U.fingerprint256}`,U.fingerprint256))}L(E)},O=(l?s:o).request(e,c,E=>{E.on("error",P),(async()=>{try{m(await w(E))}catch(U){L(U)}})()});O.on("error",P);const M=(S=r.sslPinnedCertificates)==null?void 0:S.map(E=>b(E)),B=E=>{var Q;const U=b(((Q=E.getPeerCertificate())==null?void 0:Q.fingerprint256)||"");if(!(!U&&E.isSessionReused())&&!M.includes(U))return O.emit("error",new zc(`Invalid SSL certificate: ${U} Expected: ${M}`,U)),O.abort()};r.sslPinnedCertificates&&O.on("socket",E=>{E.listeners("secureConnect").map(Q=>(Q.name||"").replace("bound ","")).includes("mfetchSecureConnect")||E.on("secureConnect",B.bind(null,E))}),r.keepAlive&&O.setNoDelay(!0),c.body&&O.write(c.body),O.end()})}const PN=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),CN=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map(e=>e.toLowerCase()));async function LN(e,t){let r={...pw,...t};const o=new Headers;r.type==="json"&&o.set("Content-Type","application/json");let s=new URL(e);if(s.username){const l=btoa(`${s.username}:${s.password}`);o.set("Authorization",`Basic ${l}`),s.username="",s.password=""}e=""+s;for(let l in r.headers){const c=l.toLowerCase();(PN.has(c)||r.cors&&!CN.has(c))&&o.set(l,r.headers[l])}let u={headers:o,redirect:r.redirect?"follow":"manual"};r.referrer||(u.referrerPolicy="no-referrer"),r.cors&&(u.mode="cors"),r.data&&(r.method||(u.method="POST"),u.body=r.type==="json"?JSON.stringify(r.data):r.data);const f=await fetch(e,u);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new Gd(f.status);const h=bw(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const $N=!!(typeof $.dist.process=="object"&&$.dist.process.versions&&$.dist.process.versions.node&&$.dist.process.versions.v8);function BN(e,t){return($N?Kc:LN)(e,t)}zi.default=BN;Object.defineProperty(xo,"__esModule",{value:!0});xo.getProvider=xo.fetchFromProvider=void 0;const NN=zi,MN=async(e,t)=>(await(0,NN.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;xo.fetchFromProvider=MN;const xN=e=>{var t;if(typeof e=="string")return e;if(((t=e==null?void 0:e.connection)==null?void 0:t.url)!==void 0)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")};xo.getProvider=xN;(function(e){var t=$.commonjsGlobal&&$.commonjsGlobal.__createBinding||(Object.create?function(s,u,f,h){h===void 0&&(h=f);var l=Object.getOwnPropertyDescriptor(u,f);(!l||("get"in l?!u.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(s,h,l)}:function(s,u,f,h){h===void 0&&(h=f),s[h]=u[f]}),r=$.commonjsGlobal&&$.commonjsGlobal.__exportStar||function(s,u){for(var f in s)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&t(u,s,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,r(Yu,e),r(sf,e),r(Fd,e),r(qs,e),r(uf,e),r(Zt,e),r(to,e),r(qd,e),r(gw,e),r(cf,e);var o=dt;Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),r(df,e),r(xo,e)})(Z$);var _w={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})($.commonjsGlobal,function(){var t=function(){},r="undefined",o=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],u={},f=null;function h(P,O){var M=P[O];if(typeof M.bind=="function")return M.bind(P);try{return Function.prototype.bind.call(M,P)}catch{return function(){return Function.prototype.apply.apply(M,[P,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(P){return P==="debug"&&(P="log"),typeof console===r?!1:P==="trace"&&o?l:console[P]!==void 0?h(console,P):console.log!==void 0?h(console,"log"):t}function b(){for(var P=this.getLevel(),O=0;O<s.length;O++){var M=s[O];this[M]=O<P?t:this.methodFactory(M,P,this.name)}if(this.log=this.debug,typeof console===r&&P<this.levels.SILENT)return"No console available for logging"}function w(P){return function(){typeof console!==r&&(b.call(this),this[P].apply(this,arguments))}}function T(P,O,M){return c(P)||w.apply(this,arguments)}function m(P,O){var M=this,B,S,E,U="loglevel";typeof P=="string"?U+=":"+P:typeof P=="symbol"&&(U=void 0);function Q(me){var H=(s[me]||"silent").toUpperCase();if(!(typeof window===r||!U)){try{window.localStorage[U]=H;return}catch{}try{window.document.cookie=encodeURIComponent(U)+"="+H+";"}catch{}}}function ce(){var me;if(!(typeof window===r||!U)){try{me=window.localStorage[U]}catch{}if(typeof me===r)try{var H=window.document.cookie,k=encodeURIComponent(U),x=H.indexOf(k+"=");x!==-1&&(me=/^([^;]+)/.exec(H.slice(x+k.length+1))[1])}catch{}return M.levels[me]===void 0&&(me=void 0),me}}function ue(){if(!(typeof window===r||!U)){try{window.localStorage.removeItem(U)}catch{}try{window.document.cookie=encodeURIComponent(U)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function te(me){var H=me;if(typeof H=="string"&&M.levels[H.toUpperCase()]!==void 0&&(H=M.levels[H.toUpperCase()]),typeof H=="number"&&H>=0&&H<=M.levels.SILENT)return H;throw new TypeError("log.setLevel() called with invalid level: "+me)}M.name=P,M.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},M.methodFactory=O||T,M.getLevel=function(){return E??S??B},M.setLevel=function(me,H){return E=te(me),H!==!1&&Q(E),b.call(M)},M.setDefaultLevel=function(me){S=te(me),ce()||M.setLevel(me,!1)},M.resetLevel=function(){E=null,ue(),b.call(M)},M.enableAll=function(me){M.setLevel(M.levels.TRACE,me)},M.disableAll=function(me){M.setLevel(M.levels.SILENT,me)},M.rebuild=function(){if(f!==M&&(B=te(f.getLevel())),b.call(M),f===M)for(var me in u)u[me].rebuild()},B=te(f?f.getLevel():"WARN");var Se=ce();Se!=null&&(E=te(Se)),b.call(M)}f=new m,f.getLogger=function(O){if(typeof O!="symbol"&&typeof O!="string"||O==="")throw new TypeError("You must supply a name when creating a logger.");var M=u[O];return M||(M=u[O]=new m(O,f.methodFactory)),M};var L=typeof window!==r?window.log:void 0;return f.noConflict=function(){return typeof window!==r&&window.log===f&&(window.log=L),f},f.getLoggers=function(){return u},f.default=f,f})})(_w);var yw=_w.exports;const Su=$.getDefaultExportFromCjs(yw);var Ru={exports:{}};Ru.exports;(function(e,t){var r=200,o="__lodash_hash_undefined__",s=800,u=16,f=9007199254740991,h="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",b="[object Boolean]",w="[object Date]",T="[object Error]",m="[object Function]",L="[object GeneratorFunction]",P="[object Map]",O="[object Number]",M="[object Null]",B="[object Object]",S="[object Proxy]",E="[object RegExp]",U="[object Set]",Q="[object String]",ce="[object Undefined]",ue="[object WeakMap]",te="[object ArrayBuffer]",Se="[object DataView]",me="[object Float32Array]",H="[object Float64Array]",k="[object Int8Array]",x="[object Int16Array]",G="[object Int32Array]",Y="[object Uint8Array]",V="[object Uint8ClampedArray]",ne="[object Uint16Array]",W="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,re={};re[me]=re[H]=re[k]=re[x]=re[G]=re[Y]=re[V]=re[ne]=re[W]=!0,re[h]=re[l]=re[te]=re[b]=re[Se]=re[w]=re[T]=re[m]=re[P]=re[O]=re[B]=re[E]=re[U]=re[Q]=re[ue]=!1;var _e=typeof $.commonjsGlobal=="object"&&$.commonjsGlobal&&$.commonjsGlobal.Object===Object&&$.commonjsGlobal,be=typeof self=="object"&&self&&self.Object===Object&&self,R=_e||be||Function("return this")(),I=t&&!t.nodeType&&t,q=I&&!0&&e&&!e.nodeType&&e,oe=q&&q.exports===I,ye=oe&&_e.process,g=function(){try{var D=q&&q.require&&q.require("util").types;return D||ye&&ye.binding&&ye.binding("util")}catch{}}(),p=g&&g.isTypedArray;function _(D,X,le){switch(le.length){case 0:return D.call(X);case 1:return D.call(X,le[0]);case 2:return D.call(X,le[0],le[1]);case 3:return D.call(X,le[0],le[1],le[2])}return D.apply(X,le)}function v(D,X){for(var le=-1,Ce=Array(D);++le<D;)Ce[le]=X(le);return Ce}function J(D){return function(X){return D(X)}}function ie(D,X){return D==null?void 0:D[X]}function se(D,X){return function(le){return D(X(le))}}var Ie=Array.prototype,$e=Function.prototype,Pe=Object.prototype,je=R["__core-js_shared__"],Re=$e.toString,Fe=Pe.hasOwnProperty,pt=function(){var D=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return D?"Symbol(src)_1."+D:""}(),Qe=Pe.toString,bt=Re.call(Object),Je=RegExp("^"+Re.call(Fe).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=oe?R.Buffer:void 0,xt=R.Symbol,Pt=R.Uint8Array;Ge&&Ge.allocUnsafe;var st=se(Object.getPrototypeOf,Object),Lt=Object.create,lr=Pe.propertyIsEnumerable,er=Ie.splice,Ut=xt?xt.toStringTag:void 0,cr=function(){try{var D=Go(Object,"defineProperty");return D({},"",{}),D}catch{}}(),zr=Ge?Ge.isBuffer:void 0,Kr=Math.max,an=Date.now,un=Go(R,"Map"),tr=Go(Object,"create"),Pr=function(){function D(){}return function(X){if(!Nn(X))return{};if(Lt)return Lt(X);D.prototype=X;var le=new D;return D.prototype=void 0,le}}();function rr(D){var X=-1,le=D==null?0:D.length;for(this.clear();++X<le;){var Ce=D[X];this.set(Ce[0],Ce[1])}}function Ln(){this.__data__=tr?tr(null):{},this.size=0}function Jr(D){var X=this.has(D)&&delete this.__data__[D];return this.size-=X?1:0,X}function fn(D){var X=this.__data__;if(tr){var le=X[D];return le===o?void 0:le}return Fe.call(X,D)?X[D]:void 0}function N(D){var X=this.__data__;return tr?X[D]!==void 0:Fe.call(X,D)}function j(D,X){var le=this.__data__;return this.size+=this.has(D)?0:1,le[D]=tr&&X===void 0?o:X,this}rr.prototype.clear=Ln,rr.prototype.delete=Jr,rr.prototype.get=fn,rr.prototype.has=N,rr.prototype.set=j;function Ee(D){var X=-1,le=D==null?0:D.length;for(this.clear();++X<le;){var Ce=D[X];this.set(Ce[0],Ce[1])}}function ve(){this.__data__=[],this.size=0}function Te(D){var X=this.__data__,le=pn(X,D);if(le<0)return!1;var Ce=X.length-1;return le==Ce?X.pop():er.call(X,le,1),--this.size,!0}function _t(D){var X=this.__data__,le=pn(X,D);return le<0?void 0:X[le][1]}function vt(D){return pn(this.__data__,D)>-1}function ln(D,X){var le=this.__data__,Ce=pn(le,D);return Ce<0?(++this.size,le.push([D,X])):le[Ce][1]=X,this}Ee.prototype.clear=ve,Ee.prototype.delete=Te,Ee.prototype.get=_t,Ee.prototype.has=vt,Ee.prototype.set=ln;function Ct(D){var X=-1,le=D==null?0:D.length;for(this.clear();++X<le;){var Ce=D[X];this.set(Ce[0],Ce[1])}}function cn(){this.size=0,this.__data__={hash:new rr,map:new(un||Ee),string:new rr}}function $n(D){var X=Ci(this,D).delete(D);return this.size-=X?1:0,X}function dn(D){return Ci(this,D).get(D)}function hn(D){return Ci(this,D).has(D)}function Yr(D,X){var le=Ci(this,D),Ce=le.size;return le.set(D,X),this.size+=le.size==Ce?0:1,this}Ct.prototype.clear=cn,Ct.prototype.delete=$n,Ct.prototype.get=dn,Ct.prototype.has=hn,Ct.prototype.set=Yr;function qt(D){var X=this.__data__=new Ee(D);this.size=X.size}function Cr(){this.__data__=new Ee,this.size=0}function wr(D){var X=this.__data__,le=X.delete(D);return this.size=X.size,le}function nr(D){return this.__data__.get(D)}function kt(D){return this.__data__.has(D)}function Ii(D,X){var le=this.__data__;if(le instanceof Ee){var Ce=le.__data__;if(!un||Ce.length<r-1)return Ce.push([D,X]),this.size=++le.size,this;le=this.__data__=new Ct(Ce)}return le.set(D,X),this.size=le.size,this}qt.prototype.clear=Cr,qt.prototype.delete=wr,qt.prototype.get=nr,qt.prototype.has=kt,qt.prototype.set=Ii;function Oi(D,X){var le=Jo(D),Ce=!le&&Ko(D),ze=!le&&!Ce&&sa(D),et=!le&&!Ce&&!ze&&ua(D),lt=le||Ce||ze||et,xe=lt?v(D.length,String):[],ot=xe.length;for(var $t in D)lt&&($t=="length"||ze&&($t=="offset"||$t=="parent")||et&&($t=="buffer"||$t=="byteLength"||$t=="byteOffset")||io($t,ot))||xe.push($t);return xe}function Bn(D,X,le){(le!==void 0&&!Li(D[X],le)||le===void 0&&!(X in D))&&Lr(D,X,le)}function gn(D,X,le){var Ce=D[X];(!(Fe.call(D,X)&&Li(Ce,le))||le===void 0&&!(X in D))&&Lr(D,X,le)}function pn(D,X){for(var le=D.length;le--;)if(Li(D[le][0],X))return le;return-1}function Lr(D,X,le){X=="__proto__"&&cr?cr(D,X,{configurable:!0,enumerable:!0,value:le,writable:!0}):D[X]=le}var Pi=no();function bn(D){return D==null?D===void 0?ce:M:Ut&&Ut in Object(D)?Xs(D):ea(D)}function ri(D){return Mn(D)&&bn(D)==h}function ni(D){if(!Nn(D)||Vo(D))return!1;var X=Xo(D)?Je:ae;return X.test(ia(D))}function ii(D){return Mn(D)&&aa(D.length)&&!!re[bn(D)]}function oi(D){if(!Nn(D))return si(D);var X=oo(D),le=[];for(var Ce in D)Ce=="constructor"&&(X||!Fe.call(D,Ce))||le.push(Ce);return le}function Vs(D,X,le,Ce,ze){D!==X&&Pi(X,function(et,lt){if(ze||(ze=new qt),Nn(et))yf(D,X,lt,le,Vs,Ce,ze);else{var xe=Ce?Ce(zo(D,lt),et,lt+"",D,X,ze):void 0;xe===void 0&&(xe=et),Bn(D,lt,xe)}},fa)}function yf(D,X,le,Ce,ze,et,lt){var xe=zo(D,le),ot=zo(X,le),$t=lt.get(ot);if($t){Bn(D,le,$t);return}var Gt=et?et(xe,ot,le+"",D,X,lt):void 0,xn=Gt===void 0;if(xn){var Vt=Jo(ot),so=!Vt&&sa(ot),Zo=!Vt&&!so&&ua(ot);Gt=ot,Vt||so||Zo?Jo(xe)?Gt=xe:oa(xe)?Gt=qo(xe):so?(xn=!1,Gt=zs(ot)):Zo?(xn=!1,Gt=Js(ot)):Gt=[]:Sf(ot)||Ko(ot)?(Gt=xe,Ko(xe)?Gt=Rf(xe):(!Nn(xe)||Xo(xe))&&(Gt=Zs(ot))):xn=!1}xn&&(lt.set(ot,Gt),ze(Gt,ot,Ce,et,lt),lt.delete(ot)),Bn(D,le,Gt)}function wf(D,X){return ra(ta(D,X,rt),D+"")}var mf=cr?function(D,X){return cr(D,"toString",{configurable:!0,enumerable:!1,value:at(X),writable:!0})}:rt;function zs(D,X){return D.slice()}function Ks(D){var X=new D.constructor(D.byteLength);return new Pt(X).set(new Pt(D)),X}function Js(D,X){var le=Ks(D.buffer);return new D.constructor(le,D.byteOffset,D.length)}function qo(D,X){var le=-1,Ce=D.length;for(X||(X=Array(Ce));++le<Ce;)X[le]=D[le];return X}function Ef(D,X,le,Ce){var ze=!le;le||(le={});for(var et=-1,lt=X.length;++et<lt;){var xe=X[et],ot=void 0;ot===void 0&&(ot=D[xe]),ze?Lr(le,xe,ot):gn(le,xe,ot)}return le}function Ys(D){return wf(function(X,le){var Ce=-1,ze=le.length,et=ze>1?le[ze-1]:void 0,lt=ze>2?le[2]:void 0;for(et=D.length>3&&typeof et=="function"?(ze--,et):void 0,lt&&vf(le[0],le[1],lt)&&(et=ze<3?void 0:et,ze=1),X=Object(X);++Ce<ze;){var xe=le[Ce];xe&&D(X,xe,Ce,et)}return X})}function no(D){return function(X,le,Ce){for(var ze=-1,et=Object(X),lt=Ce(X),xe=lt.length;xe--;){var ot=lt[++ze];if(le(et[ot],ot,et)===!1)break}return X}}function Ci(D,X){var le=D.__data__;return Qs(X)?le[typeof X=="string"?"string":"hash"]:le.map}function Go(D,X){var le=ie(D,X);return ni(le)?le:void 0}function Xs(D){var X=Fe.call(D,Ut),le=D[Ut];try{D[Ut]=void 0;var Ce=!0}catch{}var ze=Qe.call(D);return Ce&&(X?D[Ut]=le:delete D[Ut]),ze}function Zs(D){return typeof D.constructor=="function"&&!oo(D)?Pr(st(D)):{}}function io(D,X){var le=typeof D;return X=X??f,!!X&&(le=="number"||le!="symbol"&&de.test(D))&&D>-1&&D%1==0&&D<X}function vf(D,X,le){if(!Nn(le))return!1;var Ce=typeof X;return(Ce=="number"?Yo(le)&&io(X,le.length):Ce=="string"&&X in le)?Li(le[X],D):!1}function Qs(D){var X=typeof D;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?D!=="__proto__":D===null}function Vo(D){return!!pt&&pt in D}function oo(D){var X=D&&D.constructor,le=typeof X=="function"&&X.prototype||Pe;return D===le}function si(D){var X=[];if(D!=null)for(var le in Object(D))X.push(le);return X}function ea(D){return Qe.call(D)}function ta(D,X,le){return X=Kr(X===void 0?D.length-1:X,0),function(){for(var Ce=arguments,ze=-1,et=Kr(Ce.length-X,0),lt=Array(et);++ze<et;)lt[ze]=Ce[X+ze];ze=-1;for(var xe=Array(X+1);++ze<X;)xe[ze]=Ce[ze];return xe[X]=le(lt),_(D,this,xe)}}function zo(D,X){if(!(X==="constructor"&&typeof D[X]=="function")&&X!="__proto__")return D[X]}var ra=na(mf);function na(D){var X=0,le=0;return function(){var Ce=an(),ze=u-(Ce-le);if(le=Ce,ze>0){if(++X>=s)return arguments[0]}else X=0;return D.apply(void 0,arguments)}}function ia(D){if(D!=null){try{return Re.call(D)}catch{}try{return D+""}catch{}}return""}function Li(D,X){return D===X||D!==D&&X!==X}var Ko=ri(function(){return arguments}())?ri:function(D){return Mn(D)&&Fe.call(D,"callee")&&!lr.call(D,"callee")},Jo=Array.isArray;function Yo(D){return D!=null&&aa(D.length)&&!Xo(D)}function oa(D){return Mn(D)&&Yo(D)}var sa=zr||Tf;function Xo(D){if(!Nn(D))return!1;var X=bn(D);return X==m||X==L||X==c||X==S}function aa(D){return typeof D=="number"&&D>-1&&D%1==0&&D<=f}function Nn(D){var X=typeof D;return D!=null&&(X=="object"||X=="function")}function Mn(D){return D!=null&&typeof D=="object"}function Sf(D){if(!Mn(D)||bn(D)!=B)return!1;var X=st(D);if(X===null)return!0;var le=Fe.call(X,"constructor")&&X.constructor;return typeof le=="function"&&le instanceof le&&Re.call(le)==bt}var ua=p?J(p):ii;function Rf(D){return Ef(D,fa(D))}function fa(D){return Yo(D)?Oi(D):oi(D)}var Af=Ys(function(D,X,le){Vs(D,X,le)});function at(D){return function(){return D}}function rt(D){return D}function Tf(){return!1}e.exports=Af})(Ru,Ru.exports);Ru.exports;const DN=Su.getLogger("http-helpers");DN.setLevel(yw.levels.INFO);var Au={exports:{}};/**
|
|
4
4
|
* @license
|