@wormhole-foundation/wormhole-connect 1.1.4-beta.1-development → 1.1.4-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/{algorand-CL9E7qV4.js → algorand-CyJRjYjt.js} +2 -2
- package/dist/assets/{aptos-CYfJ6QKV.js → aptos-k14Q8oIC.js} +2 -2
- package/dist/assets/{ccip-Cfs6IR2H.js → ccip-BNTHR_fq.js} +1 -1
- package/dist/assets/{cosmwasm-B8f9g9-e.js → cosmwasm-Bb55TeV-.js} +3 -3
- package/dist/assets/{evm-BeHPA-N8.js → evm-BxXdWj24.js} +5 -5
- package/dist/assets/{evm-DsaBFKKm.js → evm-C-buBtRY.js} +2 -2
- package/dist/assets/{index-DzWKLl_i.js → index-BAmVCbB-.js} +1 -1
- package/dist/assets/{index-C0jKBHol.js → index-BEc0YFBn.js} +1 -1
- package/dist/assets/{index-DW2PHjzW.js → index-BLMTT3rM.js} +1 -1
- package/dist/assets/{index-CVz7Lfsa.js → index-BY0kgWx8.js} +1 -1
- package/dist/assets/{index-BtIDaBGl.js → index-BfDApobA.js} +1 -1
- package/dist/assets/{index-Cka3pqB6.js → index-BwBQHmYt.js} +1 -1
- package/dist/assets/{index-B1Zd6Tbj.js → index-C0psfra-.js} +1 -1
- package/dist/assets/{index-Dmt4H-sz.js → index-C2FPBPlV.js} +1 -1
- package/dist/assets/{index-DyOk_vKo.js → index-C3Sky6pw.js} +1 -1
- package/dist/assets/{index-DEXJQ6UW.js → index-C87qdc5P.js} +1 -1
- package/dist/assets/{index-QCp2fK6U.js → index-D2LZykJf.js} +2 -2
- package/dist/assets/{index-DSNr6Aeg.js → index-DoWu6bTw.js} +1 -1
- package/dist/assets/{index-DkQt9fOR.js → index-Dqm3REGN.js} +1 -1
- package/dist/assets/{index-BQIi8F3e.js → index-FQGd6qGV.js} +1 -1
- package/dist/assets/{index-QJ2zlRk3.js → index-IlqLhD3I.js} +1 -1
- package/dist/assets/{index-q0W2SHor.js → index-YIP9QK2L.js} +1 -1
- package/dist/assets/{index-TrUYBc0F.js → index-nosdUF9i.js} +1 -1
- package/dist/assets/{index-CFYbGyvs.js → index-xo-ROtuF.js} +1 -1
- package/dist/assets/{index-CZCNUCD6.js → index-yAX3aWkW.js} +1 -1
- package/dist/assets/{index.es-xWGpyzms.js → index.es--WISYjTj.js} +3 -3
- package/dist/assets/{keccak-Dh1-j093.js → keccak-DYzglTc3.js} +1 -1
- package/dist/assets/{solana-FuO6ds45.js → solana-BmGIyTEt.js} +2 -2
- package/dist/assets/{solana-HXT1gH4s.js → solana-D5RkygmT.js} +2 -2
- package/dist/assets/{solanaEmbed.esm-CmWxi_NO.js → solanaEmbed.esm-CFdxIRQj.js} +1 -1
- package/dist/assets/{sui-CQYR74Ws.js → sui-CW05lm4n.js} +2 -2
- package/dist/assets/{unsignedTransaction-YIv7ff3U.js → unsignedTransaction-DAYPmfUj.js} +1 -1
- package/dist/main.js +69 -69
- package/lib/{algorand-DMWnCGDD.js → algorand-B9Pcx34H.js} +1 -1
- package/lib/{algorand-CKeviXZg.mjs → algorand-BfdC8LMm.mjs} +3 -3
- package/lib/{aptos-LGyhejg2.mjs → aptos-CuQYjxz4.mjs} +1 -1
- package/lib/{aptos-DBFfVz6j.js → aptos-D8msRZYc.js} +1 -1
- package/lib/{aptos-DNei2Fw9.mjs → aptos-DISEuAM4.mjs} +3 -3
- package/lib/{aptos-CAJat9Bn.js → aptos-DlboPucS.js} +2 -2
- package/lib/{ccip-E64BZKbj.js → ccip-BqkngZ6V.js} +1 -1
- package/lib/{ccip-gtLK9yzS.mjs → ccip-DV1T5CQz.mjs} +1 -1
- package/lib/{cosmwasm-CnK43h4P.mjs → cosmwasm-BFPK6deV.mjs} +111 -7
- package/lib/{cosmwasm-CmkeZSLD.js → cosmwasm-D3ZKcsjq.js} +2 -2
- package/lib/{events-dBi7i6gd.mjs → events-CaIL5tL1.mjs} +1 -1
- package/lib/{events-D5Nem7a2.js → events-Cxw8aBUy.js} +1 -1
- package/lib/{evm-DyPy8X4q.mjs → evm-7idwo4la.mjs} +5 -5
- package/lib/{evm-Bsq-lyhx.mjs → evm-D11YbeC_.mjs} +7 -7
- package/lib/{evm-BEkpevR1.js → evm-D12EHZXD.js} +4 -4
- package/lib/{evm-JR5REYuq.js → evm-UrRoO3lT.js} +1 -1
- package/lib/{index-DWFG3ux-.js → index-B-m7_r9W.js} +1 -1
- package/lib/{index-BZTaoymt.mjs → index-BEfsEC8g.mjs} +3 -3
- package/lib/{index-Cc_mraT5.mjs → index-BKeG3u48.mjs} +2 -2
- package/lib/{index-FW1hHPsY.js → index-BMLK3kVY.js} +1 -1
- package/lib/{index-CrVV6hQ2.js → index-BMsGsrRe.js} +1 -1
- package/lib/{index-xr-_5YwS.mjs → index-BPD6tZ5I.mjs} +7575 -5146
- package/lib/{index-CL3ekJSh.js → index-BQI2oZiv.js} +1 -1
- package/lib/{index-CeksQZJ0.mjs → index-BUGIe9Q0.mjs} +4 -4
- package/lib/{index-CvX8wxOG.mjs → index-BkUc_QzZ.mjs} +2 -2
- package/lib/{index-DE7BjSqw.js → index-Br_1eyUd.js} +1 -1
- package/lib/{index-C8MkGmi-.mjs → index-C1KUJpQh.mjs} +1 -1
- package/lib/{index-B_wAMidq.js → index-C6ww0FoG.js} +1 -1
- package/lib/{index-YigUyjDr.mjs → index-CBnSdTOm.mjs} +1 -1
- package/lib/{index-DD4g5WJB.mjs → index-CDGkVXf1.mjs} +2 -2
- package/lib/{index-D5un17aL.mjs → index-CG2dc9k1.mjs} +13 -13
- package/lib/{index-CsYGJh8i.js → index-CGqBKzB5.js} +1 -1
- package/lib/{index-TidzojcT.js → index-CHGr1Xo0.js} +1 -1
- package/lib/{index-BHnHO_u8.js → index-CJ8hOjdz.js} +1 -1
- package/lib/{index-BlRWSvuT.js → index-COW9BRyV.js} +1 -1
- package/lib/{index-jnHYrj-0.mjs → index-CeK6G0Jr.mjs} +2 -2
- package/lib/{index-u9NHndtJ.mjs → index-Cfupv0rQ.mjs} +4 -4
- package/lib/{index-C-MpEmke.mjs → index-Cg19mcso.mjs} +1 -1
- package/lib/{index-DhJzyV8c.js → index-Cg6LDJti.js} +1 -1
- package/lib/{index-Cwf7_SpM.js → index-CkHXWtPG.js} +1 -1
- package/lib/{index-B9YINx-j.mjs → index-ClI_55nW.mjs} +7 -7
- package/lib/{index-BSXkcZeB.mjs → index-ClbyJuae.mjs} +2 -2
- package/lib/{index-DRTJX6NI.mjs → index-Cs8OaRdq.mjs} +2 -2
- package/lib/{index-B6Yxe_gd.mjs → index-D4FfgE9k.mjs} +2 -2
- package/lib/{index-PebPsVgf.js → index-D9Ezmk4f.js} +1 -1
- package/lib/{index-BIhEJqD8.js → index-DgKyQSTc.js} +1 -1
- package/lib/{index-BxaWYSOO.js → index-Dh6mkRtz.js} +74 -74
- package/lib/{index-w88sWpdI.js → index-DjZ438HP.js} +1 -1
- package/lib/{index-DSJ41rGf.mjs → index-DlXF_HRr.mjs} +2 -2
- package/lib/{index-DRDlsqLC.js → index-DsMw6BFg.js} +1 -1
- package/lib/{index-CtuM0Nhj.mjs → index-GKdJmpc9.mjs} +2 -2
- package/lib/{index-CAOx_2w0.mjs → index-IwSEAKjs.mjs} +3 -3
- package/lib/{index-CvLvO-ub.mjs → index-VO5jvtPN.mjs} +1 -1
- package/lib/{index-fpX08H1Q.js → index-Vouac_sN.js} +1 -1
- package/lib/{index-snvFYwLU.mjs → index-f6MztC_k.mjs} +2 -2
- package/lib/{index-BrZMeh8Y.js → index-hb33T1qT.js} +1 -1
- package/lib/{index-D9LNItFN.js → index-s_6sncui.js} +1 -1
- package/lib/{index-CN4S3GOd.mjs → index-vmVyLCAM.mjs} +3 -3
- package/lib/{index-CLImffCI.js → index-xTifobUX.js} +1 -1
- package/lib/{index-Brws-ttZ.js → index-yYbCizsj.js} +1 -1
- package/lib/{index.es-BgIY-CJP.mjs → index.es-Bld6bvmZ.mjs} +5 -5
- package/lib/{index.es-DA6xjT-p.js → index.es-DWCjm6mS.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{keccak-D3kXYcOs.mjs → keccak-BwFcIiaM.mjs} +1 -1
- package/lib/{keccak-xKB7Kino.js → keccak-C8mX3bFz.js} +1 -1
- package/lib/{pbkdf2-DCnqfxZR.js → pbkdf2-Bk-3RPXm.js} +1 -1
- package/lib/{pbkdf2-Dg0HWbq4.mjs → pbkdf2-CeHVjwwG.mjs} +1 -1
- package/lib/{signer-DIzVzPl8.mjs → signer-DXNU3KLz.mjs} +1 -1
- package/lib/{signer-CbcYYMJ7.js → signer-LadskxdY.js} +1 -1
- package/lib/solana-B15fGx9S.js +1 -0
- package/lib/{solana-BVgObkcE.mjs → solana-BasjNE9K.mjs} +4 -4
- package/lib/{solana-DmCHygOA.js → solana-C9iEiCkx.js} +1 -1
- package/lib/{solana-HKO9jNRD.mjs → solana-CfCGAR-_.mjs} +5 -5
- package/lib/{solanaEmbed.esm-DqNfqaxI.js → solanaEmbed.esm-CJdWWBYT.js} +1 -1
- package/lib/{solanaEmbed.esm-DEAHXGVn.mjs → solanaEmbed.esm-pwzJ8Zc0.mjs} +3 -3
- package/lib/{sui-DN8E0m68.mjs → sui-B9B-EQyp.mjs} +4 -4
- package/lib/{sui-BDoIBdRb.js → sui-BJBxQjSI.js} +2 -2
- package/lib/{sui-Bp2zLhA_.mjs → sui-HC466JTC.mjs} +1 -1
- package/lib/{sui-W_WW-YXK.js → sui-iJeaGeqF.js} +1 -1
- package/lib/{unsignedTransaction-Dkfjd5_o.js → unsignedTransaction-CmgkSLIX.js} +1 -1
- package/lib/unsignedTransaction-Di5zQIK0.mjs +35 -0
- package/package.json +3 -3
- package/lib/solana-BYXqKgjy.js +0 -1
- package/lib/unsignedTransaction-C32EJDkZ.mjs +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as wi,i as De,bD as Is,U as Lr,bE as Ui,bF as vR,O as ER,K as At,aV as SR,bG as kg,bH as RR,b6 as AR,bI as Ge,P as Fg}from"../main.js";import{e as IR}from"./events-C1UiYlrP.js";import{a as j_,b as W_,s as TR,h as OR,u as LR,r as pu}from"./keccak-Dh1-j093.js";var CR=PR;function PR(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,n=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return n=n%t,n++}}const NR=wi(CR);var dc={exports:{}},vl,Ug;function BR(){if(Ug)return vl;Ug=1;var e=1e3,t=e*60,n=t*60,o=n*24,a=o*7,u=o*365.25;vl=function(_,w){w=w||{};var E=typeof _;if(E==="string"&&_.length>0)return f(_);if(E==="number"&&isFinite(_))return w.long?h(_):g(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function f(_){if(_=String(_),!(_.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(_);if(w){var E=parseFloat(w[1]),y=(w[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return E*u;case"weeks":case"week":case"w":return E*a;case"days":case"day":case"d":return E*o;case"hours":case"hour":case"hrs":case"hr":case"h":return E*n;case"minutes":case"minute":case"mins":case"min":case"m":return E*t;case"seconds":case"second":case"secs":case"sec":case"s":return E*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function g(_){var w=Math.abs(_);return w>=o?Math.round(_/o)+"d":w>=n?Math.round(_/n)+"h":w>=t?Math.round(_/t)+"m":w>=e?Math.round(_/e)+"s":_+"ms"}function h(_){var w=Math.abs(_);return w>=o?d(_,w,o,"day"):w>=n?d(_,w,n,"hour"):w>=t?d(_,w,t,"minute"):w>=e?d(_,w,e,"second"):_+" ms"}function d(_,w,E,y){var N=w>=E*1.5;return Math.round(_/E)+" "+y+(N?"s":"")}return vl}function $R(e){n.debug=n,n.default=n,n.coerce=h,n.disable=u,n.enable=a,n.enabled=f,n.humanize=BR(),n.destroy=d,Object.keys(e).forEach(_=>{n[_]=e[_]}),n.names=[],n.skips=[],n.formatters={};function t(_){let w=0;for(let E=0;E<_.length;E++)w=(w<<5)-w+_.charCodeAt(E),w|=0;return n.colors[Math.abs(w)%n.colors.length]}n.selectColor=t;function n(_){let w,E=null,y,N;function k(...U){if(!k.enabled)return;const V=k,j=Number(new Date),P=j-(w||j);V.diff=P,V.prev=w,V.curr=j,w=j,U[0]=n.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let C=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(se,re)=>{if(se==="%%")return"%";C++;const ge=n.formatters[re];if(typeof ge=="function"){const le=U[C];se=ge.call(V,le),U.splice(C,1),C--}return se}),n.formatArgs.call(V,U),(V.log||n.log).apply(V,U)}return k.namespace=_,k.useColors=n.useColors(),k.color=n.selectColor(_),k.extend=o,k.destroy=n.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(y!==n.namespaces&&(y=n.namespaces,N=n.enabled(_)),N),set:U=>{E=U}}),typeof n.init=="function"&&n.init(k),k}function o(_,w){const E=n(this.namespace+(typeof w>"u"?":":w)+_);return E.log=this.log,E}function a(_){n.save(_),n.namespaces=_,n.names=[],n.skips=[];let w;const E=(typeof _=="string"?_:"").split(/[\s,]+/),y=E.length;for(w=0;w<y;w++)E[w]&&(_=E[w].replace(/\*/g,".*?"),_[0]==="-"?n.skips.push(new RegExp("^"+_.slice(1)+"$")):n.names.push(new RegExp("^"+_+"$")))}function u(){const _=[...n.names.map(g),...n.skips.map(g).map(w=>"-"+w)].join(",");return n.enable(""),_}function f(_){if(_[_.length-1]==="*")return!0;let w,E;for(w=0,E=n.skips.length;w<E;w++)if(n.skips[w].test(_))return!1;for(w=0,E=n.names.length;w<E;w++)if(n.names[w].test(_))return!0;return!1}function g(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function h(_){return _ instanceof Error?_.stack||_.message:_}function d(){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 n.enable(n.load()),n}var xR=$R;(function(e,t){var n={};t.formatArgs=a,t.save=u,t.load=f,t.useColors=o,t.storage=g(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!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 o(){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 d;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&&(d=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(d[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;d.splice(1,0,_,"color: inherit");let w=0,E=0;d[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(w++,y==="%c"&&(E=w))}),d.splice(E,0,_)}t.log=console.debug||console.log||(()=>{});function u(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function f(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof De.process<"u"&&"env"in De.process&&(d=n.DEBUG),d}function g(){try{return localStorage}catch{}}e.exports=xR(t);const{formatters:h}=e.exports;h.j=function(d){try{return JSON.stringify(d)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(dc,dc.exports);var DR=dc.exports,hr={},_i={},Fc=ms;ms.default=ms;ms.stable=V_;ms.stableStringify=V_;var ou="[...]",z_="[Circular]",Di=[],$i=[];function q_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ms(e,t,n,o){typeof o>"u"&&(o=q_()),hc(e,"",0,[],void 0,0,o);var a;try{$i.length===0?a=JSON.stringify(e,t,n):a=JSON.stringify(e,G_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Di.length!==0;){var u=Di.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function yo(e,t,n,o){var a=Object.getOwnPropertyDescriptor(o,n);a.get!==void 0?a.configurable?(Object.defineProperty(o,n,{value:e}),Di.push([o,n,t,a])):$i.push([t,n,e]):(o[n]=e,Di.push([o,n,t]))}function hc(e,t,n,o,a,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){yo(z_,e,t,a);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){yo(ou,e,t,a);return}if(typeof f.edgesLimit<"u"&&n+1>f.edgesLimit){yo(ou,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)hc(e[g],g,g,o,e,u,f);else{var h=Object.keys(e);for(g=0;g<h.length;g++){var d=h[g];hc(e[d],d,g,o,e,u,f)}}o.pop()}}function MR(e,t){return e<t?-1:e>t?1:0}function V_(e,t,n,o){typeof o>"u"&&(o=q_());var a=gc(e,"",0,[],void 0,0,o)||e,u;try{$i.length===0?u=JSON.stringify(a,t,n):u=JSON.stringify(a,G_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Di.length!==0;){var f=Di.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function gc(e,t,n,o,a,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){yo(z_,e,t,a);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){yo(ou,e,t,a);return}if(typeof f.edgesLimit<"u"&&n+1>f.edgesLimit){yo(ou,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)gc(e[g],g,g,o,e,u,f);else{var h={},d=Object.keys(e).sort(MR);for(g=0;g<d.length;g++){var _=d[g];gc(e[_],_,g,o,e,u,f),h[_]=e[_]}if(typeof a<"u")Di.push([a,t,e]),a[t]=h;else return h}o.pop()}}function G_(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if($i.length>0)for(var o=0;o<$i.length;o++){var a=$i[o];if(a[1]===t&&a[0]===n){n=a[2],$i.splice(o,1);break}}return e.call(this,t,n)}}const kR=wi(Fc);Object.defineProperty(_i,"__esModule",{value:!0});_i.EthereumProviderError=_i.EthereumRpcError=void 0;const FR=Fc;class Z_ extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),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 FR.default(this.serialize(),jR,2)}}_i.EthereumRpcError=Z_;let UR=class extends Z_{constructor(t,n,o){if(!HR(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}};_i.EthereumProviderError=UR;function HR(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function jR(e,t){if(t!=="[Circular]")return t}var Uc={},pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi.errorValues=pi.errorCodes=void 0;pi.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}};pi.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=pi,n=_i,o=t.errorCodes.rpc.internal,a="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(E,y=a){if(Number.isInteger(E)){const N=E.toString();if(w(t.errorValues,N))return t.errorValues[N].message;if(d(E))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return y}e.getMessageFromCode=f;function g(E){if(!Number.isInteger(E))return!1;const y=E.toString();return!!(t.errorValues[y]||d(E))}e.isValidCode=g;function h(E,{fallbackError:y=u,shouldIncludeStack:N=!1}={}){var k,U;if(!y||!Number.isInteger(y.code)||typeof y.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(E instanceof n.EthereumRpcError)return E.serialize();const V={};if(E&&typeof E=="object"&&!Array.isArray(E)&&w(E,"code")&&g(E.code)){const P=E;V.code=P.code,P.message&&typeof P.message=="string"?(V.message=P.message,w(P,"data")&&(V.data=P.data)):(V.message=f(V.code),V.data={originalError:_(E)})}else{V.code=y.code;const P=(k=E)===null||k===void 0?void 0:k.message;V.message=P&&typeof P=="string"?P:y.message,V.data={originalError:_(E)}}const j=(U=E)===null||U===void 0?void 0:U.stack;return N&&E&&j&&typeof j=="string"&&(V.stack=j),V}e.serializeError=h;function d(E){return E>=-32099&&E<=-32e3}function _(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function w(E,y){return Object.prototype.hasOwnProperty.call(E,y)}})(Uc);var bu={};Object.defineProperty(bu,"__esModule",{value:!0});bu.ethErrors=void 0;const Hc=_i,K_=Uc,_n=pi;bu.ethErrors={rpc:{parse:e=>Xn(_n.errorCodes.rpc.parse,e),invalidRequest:e=>Xn(_n.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Xn(_n.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Xn(_n.errorCodes.rpc.methodNotFound,e),internal:e=>Xn(_n.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 Xn(t,e)},invalidInput:e=>Xn(_n.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Xn(_n.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Xn(_n.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Xn(_n.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Xn(_n.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Xn(_n.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ss(_n.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ss(_n.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ss(_n.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ss(_n.errorCodes.provider.disconnected,e),chainDisconnected:e=>ss(_n.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new Hc.EthereumProviderError(t,n,o)}}};function Xn(e,t){const[n,o]=J_(t);return new Hc.EthereumRpcError(e,n||K_.getMessageFromCode(e),o)}function ss(e,t){const[n,o]=J_(t);return new Hc.EthereumProviderError(e,n||K_.getMessageFromCode(e),o)}function J_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,n]}}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=_i;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Uc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const o=bu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=pi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(hr);var WR={exports:{}},El={exports:{}},Gt={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,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},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,n){return Object.defineProperty(e,t,n)},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,n){return e.then(t,n)},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,n){return e.slice(t,n)},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,n){return e.set(t,n)},Boolean,Uint8Array},X_={exports:{}},as={exports:{}},Hg;function vs(){if(Hg)return as.exports;Hg=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return as.exports=e,as.exports.AbortSignal=t,as.exports.default=e,as.exports}(function(e){const t=Lr,{kResistStopPropagation:n,SymbolDispose:o}=Gt,a=globalThis.AbortSignal||vs().AbortSignal,u=globalThis.AbortController||vs().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,h=typeof g<"u"?function(y){return y instanceof g}:function(y){return!1},d=(E,y)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new ERR_INVALID_ARG_TYPE(y,"AbortSignal",E)},_=(E,y)=>{if(typeof E!="function")throw new ERR_INVALID_ARG_TYPE(y,"Function",E)};class w extends Error{constructor(y){if(!Array.isArray(y))throw new TypeError(`Expected input to be an Array, got ${typeof y}`);let N="";for(let k=0;k<y.length;k++)N+=` ${y[k].stack}
|
|
1
|
+
import{s as wi,i as De,bD as Is,U as Lr,bE as Ui,bF as vR,O as ER,K as At,aW as SR,bG as kg,bH as RR,b7 as AR,bI as Ge,P as Fg}from"../main.js";import{e as IR}from"./events-C1UiYlrP.js";import{a as j_,b as W_,s as TR,h as OR,u as LR,r as pu}from"./keccak-DYzglTc3.js";var CR=PR;function PR(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,n=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return n=n%t,n++}}const NR=wi(CR);var dc={exports:{}},vl,Ug;function BR(){if(Ug)return vl;Ug=1;var e=1e3,t=e*60,n=t*60,o=n*24,a=o*7,u=o*365.25;vl=function(_,w){w=w||{};var E=typeof _;if(E==="string"&&_.length>0)return f(_);if(E==="number"&&isFinite(_))return w.long?h(_):g(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function f(_){if(_=String(_),!(_.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(_);if(w){var E=parseFloat(w[1]),y=(w[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return E*u;case"weeks":case"week":case"w":return E*a;case"days":case"day":case"d":return E*o;case"hours":case"hour":case"hrs":case"hr":case"h":return E*n;case"minutes":case"minute":case"mins":case"min":case"m":return E*t;case"seconds":case"second":case"secs":case"sec":case"s":return E*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function g(_){var w=Math.abs(_);return w>=o?Math.round(_/o)+"d":w>=n?Math.round(_/n)+"h":w>=t?Math.round(_/t)+"m":w>=e?Math.round(_/e)+"s":_+"ms"}function h(_){var w=Math.abs(_);return w>=o?d(_,w,o,"day"):w>=n?d(_,w,n,"hour"):w>=t?d(_,w,t,"minute"):w>=e?d(_,w,e,"second"):_+" ms"}function d(_,w,E,y){var N=w>=E*1.5;return Math.round(_/E)+" "+y+(N?"s":"")}return vl}function $R(e){n.debug=n,n.default=n,n.coerce=h,n.disable=u,n.enable=a,n.enabled=f,n.humanize=BR(),n.destroy=d,Object.keys(e).forEach(_=>{n[_]=e[_]}),n.names=[],n.skips=[],n.formatters={};function t(_){let w=0;for(let E=0;E<_.length;E++)w=(w<<5)-w+_.charCodeAt(E),w|=0;return n.colors[Math.abs(w)%n.colors.length]}n.selectColor=t;function n(_){let w,E=null,y,N;function k(...U){if(!k.enabled)return;const V=k,j=Number(new Date),P=j-(w||j);V.diff=P,V.prev=w,V.curr=j,w=j,U[0]=n.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let C=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(se,re)=>{if(se==="%%")return"%";C++;const ge=n.formatters[re];if(typeof ge=="function"){const le=U[C];se=ge.call(V,le),U.splice(C,1),C--}return se}),n.formatArgs.call(V,U),(V.log||n.log).apply(V,U)}return k.namespace=_,k.useColors=n.useColors(),k.color=n.selectColor(_),k.extend=o,k.destroy=n.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(y!==n.namespaces&&(y=n.namespaces,N=n.enabled(_)),N),set:U=>{E=U}}),typeof n.init=="function"&&n.init(k),k}function o(_,w){const E=n(this.namespace+(typeof w>"u"?":":w)+_);return E.log=this.log,E}function a(_){n.save(_),n.namespaces=_,n.names=[],n.skips=[];let w;const E=(typeof _=="string"?_:"").split(/[\s,]+/),y=E.length;for(w=0;w<y;w++)E[w]&&(_=E[w].replace(/\*/g,".*?"),_[0]==="-"?n.skips.push(new RegExp("^"+_.slice(1)+"$")):n.names.push(new RegExp("^"+_+"$")))}function u(){const _=[...n.names.map(g),...n.skips.map(g).map(w=>"-"+w)].join(",");return n.enable(""),_}function f(_){if(_[_.length-1]==="*")return!0;let w,E;for(w=0,E=n.skips.length;w<E;w++)if(n.skips[w].test(_))return!1;for(w=0,E=n.names.length;w<E;w++)if(n.names[w].test(_))return!0;return!1}function g(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function h(_){return _ instanceof Error?_.stack||_.message:_}function d(){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 n.enable(n.load()),n}var xR=$R;(function(e,t){var n={};t.formatArgs=a,t.save=u,t.load=f,t.useColors=o,t.storage=g(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!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 o(){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 d;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&&(d=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(d[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;d.splice(1,0,_,"color: inherit");let w=0,E=0;d[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(w++,y==="%c"&&(E=w))}),d.splice(E,0,_)}t.log=console.debug||console.log||(()=>{});function u(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function f(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof De.process<"u"&&"env"in De.process&&(d=n.DEBUG),d}function g(){try{return localStorage}catch{}}e.exports=xR(t);const{formatters:h}=e.exports;h.j=function(d){try{return JSON.stringify(d)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(dc,dc.exports);var DR=dc.exports,hr={},_i={},Fc=ms;ms.default=ms;ms.stable=V_;ms.stableStringify=V_;var ou="[...]",z_="[Circular]",Di=[],$i=[];function q_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ms(e,t,n,o){typeof o>"u"&&(o=q_()),hc(e,"",0,[],void 0,0,o);var a;try{$i.length===0?a=JSON.stringify(e,t,n):a=JSON.stringify(e,G_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Di.length!==0;){var u=Di.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function yo(e,t,n,o){var a=Object.getOwnPropertyDescriptor(o,n);a.get!==void 0?a.configurable?(Object.defineProperty(o,n,{value:e}),Di.push([o,n,t,a])):$i.push([t,n,e]):(o[n]=e,Di.push([o,n,t]))}function hc(e,t,n,o,a,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){yo(z_,e,t,a);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){yo(ou,e,t,a);return}if(typeof f.edgesLimit<"u"&&n+1>f.edgesLimit){yo(ou,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)hc(e[g],g,g,o,e,u,f);else{var h=Object.keys(e);for(g=0;g<h.length;g++){var d=h[g];hc(e[d],d,g,o,e,u,f)}}o.pop()}}function MR(e,t){return e<t?-1:e>t?1:0}function V_(e,t,n,o){typeof o>"u"&&(o=q_());var a=gc(e,"",0,[],void 0,0,o)||e,u;try{$i.length===0?u=JSON.stringify(a,t,n):u=JSON.stringify(a,G_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Di.length!==0;){var f=Di.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function gc(e,t,n,o,a,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){yo(z_,e,t,a);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){yo(ou,e,t,a);return}if(typeof f.edgesLimit<"u"&&n+1>f.edgesLimit){yo(ou,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)gc(e[g],g,g,o,e,u,f);else{var h={},d=Object.keys(e).sort(MR);for(g=0;g<d.length;g++){var _=d[g];gc(e[_],_,g,o,e,u,f),h[_]=e[_]}if(typeof a<"u")Di.push([a,t,e]),a[t]=h;else return h}o.pop()}}function G_(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if($i.length>0)for(var o=0;o<$i.length;o++){var a=$i[o];if(a[1]===t&&a[0]===n){n=a[2],$i.splice(o,1);break}}return e.call(this,t,n)}}const kR=wi(Fc);Object.defineProperty(_i,"__esModule",{value:!0});_i.EthereumProviderError=_i.EthereumRpcError=void 0;const FR=Fc;class Z_ extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),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 FR.default(this.serialize(),jR,2)}}_i.EthereumRpcError=Z_;let UR=class extends Z_{constructor(t,n,o){if(!HR(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}};_i.EthereumProviderError=UR;function HR(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function jR(e,t){if(t!=="[Circular]")return t}var Uc={},pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi.errorValues=pi.errorCodes=void 0;pi.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}};pi.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=pi,n=_i,o=t.errorCodes.rpc.internal,a="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(E,y=a){if(Number.isInteger(E)){const N=E.toString();if(w(t.errorValues,N))return t.errorValues[N].message;if(d(E))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return y}e.getMessageFromCode=f;function g(E){if(!Number.isInteger(E))return!1;const y=E.toString();return!!(t.errorValues[y]||d(E))}e.isValidCode=g;function h(E,{fallbackError:y=u,shouldIncludeStack:N=!1}={}){var k,U;if(!y||!Number.isInteger(y.code)||typeof y.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(E instanceof n.EthereumRpcError)return E.serialize();const V={};if(E&&typeof E=="object"&&!Array.isArray(E)&&w(E,"code")&&g(E.code)){const P=E;V.code=P.code,P.message&&typeof P.message=="string"?(V.message=P.message,w(P,"data")&&(V.data=P.data)):(V.message=f(V.code),V.data={originalError:_(E)})}else{V.code=y.code;const P=(k=E)===null||k===void 0?void 0:k.message;V.message=P&&typeof P=="string"?P:y.message,V.data={originalError:_(E)}}const j=(U=E)===null||U===void 0?void 0:U.stack;return N&&E&&j&&typeof j=="string"&&(V.stack=j),V}e.serializeError=h;function d(E){return E>=-32099&&E<=-32e3}function _(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function w(E,y){return Object.prototype.hasOwnProperty.call(E,y)}})(Uc);var bu={};Object.defineProperty(bu,"__esModule",{value:!0});bu.ethErrors=void 0;const Hc=_i,K_=Uc,_n=pi;bu.ethErrors={rpc:{parse:e=>Xn(_n.errorCodes.rpc.parse,e),invalidRequest:e=>Xn(_n.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Xn(_n.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Xn(_n.errorCodes.rpc.methodNotFound,e),internal:e=>Xn(_n.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 Xn(t,e)},invalidInput:e=>Xn(_n.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Xn(_n.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Xn(_n.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Xn(_n.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Xn(_n.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Xn(_n.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ss(_n.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ss(_n.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ss(_n.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ss(_n.errorCodes.provider.disconnected,e),chainDisconnected:e=>ss(_n.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new Hc.EthereumProviderError(t,n,o)}}};function Xn(e,t){const[n,o]=J_(t);return new Hc.EthereumRpcError(e,n||K_.getMessageFromCode(e),o)}function ss(e,t){const[n,o]=J_(t);return new Hc.EthereumProviderError(e,n||K_.getMessageFromCode(e),o)}function J_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,n]}}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=_i;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Uc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const o=bu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=pi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(hr);var WR={exports:{}},El={exports:{}},Gt={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,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},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,n){return Object.defineProperty(e,t,n)},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,n){return e.then(t,n)},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,n){return e.slice(t,n)},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,n){return e.set(t,n)},Boolean,Uint8Array},X_={exports:{}},as={exports:{}},Hg;function vs(){if(Hg)return as.exports;Hg=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return as.exports=e,as.exports.AbortSignal=t,as.exports.default=e,as.exports}(function(e){const t=Lr,{kResistStopPropagation:n,SymbolDispose:o}=Gt,a=globalThis.AbortSignal||vs().AbortSignal,u=globalThis.AbortController||vs().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,h=typeof g<"u"?function(y){return y instanceof g}:function(y){return!1},d=(E,y)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new ERR_INVALID_ARG_TYPE(y,"AbortSignal",E)},_=(E,y)=>{if(typeof E!="function")throw new ERR_INVALID_ARG_TYPE(y,"Function",E)};class w extends Error{constructor(y){if(!Array.isArray(y))throw new TypeError(`Expected input to be an Array, got ${typeof y}`);let N="";for(let k=0;k<y.length;k++)N+=` ${y[k].stack}
|
|
2
2
|
`;super(N),this.name="AggregateError",this.errors=y}}e.exports={AggregateError:w,kEmptyObject:Object.freeze({}),once(E){let y=!1;return function(...N){y||(y=!0,E.apply(this,N))}},createDeferredPromise:function(){let E,y;return{promise:new Promise((k,U)=>{E=k,y=U}),resolve:E,reject:y}},promisify(E){return new Promise((y,N)=>{E((k,...U)=>k?N(k):y(...U))})},debuglog(){return function(){}},format(E,...y){return E.replace(/%([sdifj])/g,function(...[N,k]){const U=y.shift();return k==="f"?U.toFixed(6):k==="j"?JSON.stringify(U):k==="s"&&typeof U=="object"?`${U.constructor!==Object?U.constructor.name:""} {}`.trim():U.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"{}"}},types:{isAsyncFunction(E){return E instanceof f},isArrayBufferView(E){return ArrayBuffer.isView(E)}},isBlob:h,deprecate(E,y){return E},addAbortListener:Is().addAbortListener||function(y,N){if(y===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",y);d(y,"signal"),_(N,"listener");let k;return y.aborted?queueMicrotask(()=>N()):(y.addEventListener("abort",N,{__proto__:null,once:!0,[n]:!0}),k=()=>{y.removeEventListener("abort",N)}),{__proto__:null,[o](){var U;(U=k)===null||U===void 0||U()}}},AbortSignalAny:a.any||function(y){if(y.length===1)return y[0];const N=new u,k=()=>N.abort();return y.forEach(U=>{d(U,"signals"),U.addEventListener("abort",k,{once:!0})}),N.signal.addEventListener("abort",()=>{y.forEach(U=>U.removeEventListener("abort",k))},{once:!0}),N.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(X_);var Rn=X_.exports,jc={};const{format:zR,inspect:su,AggregateError:qR}=Rn,VR=globalThis.AggregateError||qR,GR=Symbol("kIsNodeError"),ZR=["string","function","number","object","Function","Object","boolean","bigint","symbol"],KR=/^([A-Z][a-z0-9]*)+$/,JR="__node_internal_",wu={};function xi(e,t){if(!e)throw new wu.ERR_INTERNAL_ASSERTION(t)}function jg(e){let t="",n=e.length;const o=e[0]==="-"?1:0;for(;n>=o+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function XR(e,t,n){if(typeof t=="function")return xi(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);const o=(t.match(/%[dfijoOs]/g)||[]).length;return xi(o===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${o}).`),n.length===0?t:zR(t,...n)}function fn(e,t,n){n||(n=Error);class o extends n{constructor(...u){super(XR(e,t,u))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:n.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[GR]=!0,wu[e]=o}function Wg(e){const t=JR+e.name;return Object.defineProperty(e,"name",{value:t}),e}function YR(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const n=new VR([t,e],t.message);return n.code=t.code,n}return e||t}let QR=class extends Error{constructor(t="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new wu.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};fn("ERR_ASSERTION","%s",Error);fn("ERR_INVALID_ARG_TYPE",(e,t,n)=>{xi(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 a=[],u=[],f=[];for(const h of t)xi(typeof h=="string","All expected entries have to be of type string"),ZR.includes(h)?a.push(h.toLowerCase()):KR.test(h)?u.push(h):(xi(h!=="object",'The value "object" should be written as "Object"'),f.push(h));if(u.length>0){const h=a.indexOf("object");h!==-1&&(a.splice(a,h,1),u.push("Object"))}if(a.length>0){switch(a.length){case 1:o+=`of type ${a[0]}`;break;case 2:o+=`one of type ${a[0]} or ${a[1]}`;break;default:{const h=a.pop();o+=`one of type ${a.join(", ")}, or ${h}`}}(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 h=u.pop();o+=`an instance of ${u.join(", ")}, or ${h}`}}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 h=f.pop();o+=`one of ${f.join(", ")}, or ${h}`}}if(n==null)o+=`. Received ${n}`;else if(typeof n=="function"&&n.name)o+=`. Received function ${n.name}`;else if(typeof n=="object"){var g;if((g=n.constructor)!==null&&g!==void 0&&g.name)o+=`. Received an instance of ${n.constructor.name}`;else{const h=su(n,{depth:-1});o+=`. Received ${h}`}}else{let h=su(n,{colors:!1});h.length>25&&(h=`${h.slice(0,25)}...`),o+=`. Received type ${typeof n} (${h})`}return o},TypeError);fn("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let o=su(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${o}`},TypeError);fn("ERR_INVALID_RETURN_VALUE",(e,t,n)=>{var o;const a=n!=null&&(o=n.constructor)!==null&&o!==void 0&&o.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${e} to be returned from the "${t}" function but got ${a}.`},TypeError);fn("ERR_MISSING_ARGS",(...e)=>{xi(e.length>0,"At least one arg needs to be specified");let t;const n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(o=>`"${o}"`).join(" or "),n){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);fn("ERR_OUT_OF_RANGE",(e,t,n)=>{xi(t,'Missing "range" argument');let o;return Number.isInteger(n)&&Math.abs(n)>2**32?o=jg(String(n)):typeof n=="bigint"?(o=String(n),(n>2n**32n||n<-(2n**32n))&&(o=jg(o)),o+="n"):o=su(n),`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);fn("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);fn("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);fn("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);fn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);fn("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);fn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);fn("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);fn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);fn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);fn("ERR_STREAM_WRITE_AFTER_END","write after end",Error);fn("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Pn={AbortError:QR,aggregateTwoErrors:Wg(YR),hideStackFrames:Wg,codes:wu};const{ArrayIsArray:Wc,ArrayPrototypeIncludes:Y_,ArrayPrototypeJoin:Q_,ArrayPrototypeMap:eA,NumberIsInteger:zc,NumberIsNaN:tA,NumberMAX_SAFE_INTEGER:nA,NumberMIN_SAFE_INTEGER:rA,NumberParseInt:iA,ObjectPrototypeHasOwnProperty:oA,RegExpPrototypeExec:ep,String:sA,StringPrototypeToUpperCase:aA,StringPrototypeTrim:uA}=Gt,{hideStackFrames:rr,codes:{ERR_SOCKET_BAD_PORT:fA,ERR_INVALID_ARG_TYPE:yn,ERR_INVALID_ARG_VALUE:Lo,ERR_OUT_OF_RANGE:Mi,ERR_UNKNOWN_SIGNAL:zg}}=Pn,{normalizeEncoding:lA}=Rn,{isAsyncFunction:cA,isArrayBufferView:dA}=Rn.types,qg={};function hA(e){return e===(e|0)}function gA(e){return e===e>>>0}const _A=/^[0-7]+$/,pA="must be a 32-bit unsigned integer or an octal string";function bA(e,t,n){if(typeof e>"u"&&(e=n),typeof e=="string"){if(ep(_A,e)===null)throw new Lo(t,e,pA);e=iA(e,8)}return tp(e,t),e}const wA=rr((e,t,n=rA,o=nA)=>{if(typeof e!="number")throw new yn(t,"number",e);if(!zc(e))throw new Mi(t,"an integer",e);if(e<n||e>o)throw new Mi(t,`>= ${n} && <= ${o}`,e)}),yA=rr((e,t,n=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new yn(t,"number",e);if(!zc(e))throw new Mi(t,"an integer",e);if(e<n||e>o)throw new Mi(t,`>= ${n} && <= ${o}`,e)}),tp=rr((e,t,n=!1)=>{if(typeof e!="number")throw new yn(t,"number",e);if(!zc(e))throw new Mi(t,"an integer",e);const o=n?1:0,a=4294967295;if(e<o||e>a)throw new Mi(t,`>= ${o} && <= ${a}`,e)});function qc(e,t){if(typeof e!="string")throw new yn(t,"string",e)}function mA(e,t,n=void 0,o){if(typeof e!="number")throw new yn(t,"number",e);if(n!=null&&e<n||o!=null&&e>o||(n!=null||o!=null)&&tA(e))throw new Mi(t,`${n!=null?`>= ${n}`:""}${n!=null&&o!=null?" && ":""}${o!=null?`<= ${o}`:""}`,e)}const vA=rr((e,t,n)=>{if(!Y_(n,e)){const a="must be one of: "+Q_(eA(n,u=>typeof u=="string"?`'${u}'`:sA(u)),", ");throw new Lo(t,e,a)}});function np(e,t){if(typeof e!="boolean")throw new yn(t,"boolean",e)}function Sl(e,t,n){return e==null||!oA(e,t)?n:e[t]}const EA=rr((e,t,n=null)=>{const o=Sl(n,"allowArray",!1),a=Sl(n,"allowFunction",!1);if(!Sl(n,"nullable",!1)&&e===null||!o&&Wc(e)||typeof e!="object"&&(!a||typeof e!="function"))throw new yn(t,"Object",e)}),SA=rr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new yn(t,"a dictionary",e)}),yu=rr((e,t,n=0)=>{if(!Wc(e))throw new yn(t,"Array",e);if(e.length<n){const o=`must be longer than ${n}`;throw new Lo(t,e,o)}});function RA(e,t){yu(e,t);for(let n=0;n<e.length;n++)qc(e[n],`${t}[${n}]`)}function AA(e,t){yu(e,t);for(let n=0;n<e.length;n++)np(e[n],`${t}[${n}]`)}function IA(e,t){yu(e,t);for(let n=0;n<e.length;n++){const o=e[n],a=`${t}[${n}]`;if(o==null)throw new yn(a,"AbortSignal",o);rp(o,a)}}function TA(e,t="signal"){if(qc(e,t),qg[e]===void 0)throw qg[aA(e)]!==void 0?new zg(e+" (signals must use all capital letters)"):new zg(e)}const OA=rr((e,t="buffer")=>{if(!dA(e))throw new yn(t,["Buffer","TypedArray","DataView"],e)});function LA(e,t){const n=lA(t),o=e.length;if(n==="hex"&&o%2!==0)throw new Lo("encoding",t,`is invalid for data of length ${o}`)}function CA(e,t="Port",n=!0){if(typeof e!="number"&&typeof e!="string"||typeof e=="string"&&uA(e).length===0||+e!==+e>>>0||e>65535||e===0&&!n)throw new fA(t,e,n);return e|0}const rp=rr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new yn(t,"AbortSignal",e)}),PA=rr((e,t)=>{if(typeof e!="function")throw new yn(t,"Function",e)}),NA=rr((e,t)=>{if(typeof e!="function"||cA(e))throw new yn(t,"Function",e)}),BA=rr((e,t)=>{if(e!==void 0)throw new yn(t,"undefined",e)});function $A(e,t,n){if(!Y_(n,e))throw new yn(t,`('${Q_(n,"|")}')`,e)}const xA=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Vg(e,t){if(typeof e>"u"||!ep(xA,e))throw new Lo(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function DA(e){if(typeof e=="string")return Vg(e,"hints"),e;if(Wc(e)){const t=e.length;let n="";if(t===0)return n;for(let o=0;o<t;o++){const a=e[o];Vg(a,"hints"),n+=a,o!==t-1&&(n+=", ")}return n}throw new Lo("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}var Ts={isInt32:hA,isUint32:gA,parseFileMode:bA,validateArray:yu,validateStringArray:RA,validateBooleanArray:AA,validateAbortSignalArray:IA,validateBoolean:np,validateBuffer:OA,validateDictionary:SA,validateEncoding:LA,validateFunction:PA,validateInt32:yA,validateInteger:wA,validateNumber:mA,validateObject:EA,validateOneOf:vA,validatePlainFunction:NA,validatePort:CA,validateSignalName:TA,validateString:qc,validateUint32:tp,validateUndefined:BA,validateUnion:$A,validateAbortSignal:rp,validateLinkHeaderValue:DA},Vc={exports:{}};const{SymbolAsyncIterator:Gg,SymbolIterator:Zg,SymbolFor:Hi}=Gt,ip=Hi("nodejs.stream.destroyed"),op=Hi("nodejs.stream.errored"),_c=Hi("nodejs.stream.readable"),pc=Hi("nodejs.stream.writable"),sp=Hi("nodejs.stream.disturbed"),MA=Hi("nodejs.webstream.isClosedPromise"),kA=Hi("nodejs.webstream.controllerErrorFunction");function mu(e,t=!1){var n;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((n=e._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!e._writableState||e._readableState))}function vu(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 FA(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Pr(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function ap(e){return!!(e&&!Pr(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function up(e){return!!(e&&!Pr(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function fp(e){return!!(e&&!Pr(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function UA(e){return ap(e)||up(e)||fp(e)}function HA(e,t){return e==null?!1:t===!0?typeof e[Gg]=="function":t===!1?typeof e[Zg]=="function":typeof e[Gg]=="function"||typeof e[Zg]=="function"}function Eu(e){if(!Pr(e))return null;const t=e._writableState,n=e._readableState,o=t||n;return!!(e.destroyed||e[ip]||o!=null&&o.destroyed)}function lp(e){if(!vu(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 jA(e,t){if(!vu(e))return null;if(e.writableFinished===!0)return!0;const n=e._writableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.finished)!="boolean"?null:!!(n.finished||t===!1&&n.ended===!0&&n.length===0)}function WA(e){if(!mu(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 cp(e,t){if(!mu(e))return null;const n=e._readableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.endEmitted)!="boolean"?null:!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0)}function dp(e){return e&&e[_c]!=null?e[_c]:typeof(e==null?void 0:e.readable)!="boolean"?null:Eu(e)?!1:mu(e)&&e.readable&&!cp(e)}function hp(e){return e&&e[pc]!=null?e[pc]:typeof(e==null?void 0:e.writable)!="boolean"?null:Eu(e)?!1:vu(e)&&e.writable&&!lp(e)}function zA(e,t){return Pr(e)?Eu(e)?!0:!((t==null?void 0:t.readable)!==!1&&dp(e)||(t==null?void 0:t.writable)!==!1&&hp(e)):null}function qA(e){var t,n;return Pr(e)?e.writableErrored?e.writableErrored:(t=(n=e._writableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function VA(e){var t,n;return Pr(e)?e.readableErrored?e.readableErrored:(t=(n=e._readableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function GA(e){if(!Pr(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,n=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(n==null?void 0:n.closed)=="boolean"?(t==null?void 0:t.closed)||(n==null?void 0:n.closed):typeof e._closed=="boolean"&&gp(e)?e._closed:null}function gp(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function _p(e){return typeof e._sent100=="boolean"&&gp(e)}function ZA(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 KA(e){if(!Pr(e))return null;const t=e._writableState,n=e._readableState,o=t||n;return!o&&_p(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function JA(e){var t;return!!(e&&((t=e[sp])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function XA(e){var t,n,o,a,u,f,g,h,d,_;return!!(e&&((t=(n=(o=(a=(u=(f=e[op])!==null&&f!==void 0?f:e.readableErrored)!==null&&u!==void 0?u:e.writableErrored)!==null&&a!==void 0?a:(g=e._readableState)===null||g===void 0?void 0:g.errorEmitted)!==null&&o!==void 0?o:(h=e._writableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&n!==void 0?n:(d=e._readableState)===null||d===void 0?void 0:d.errored)!==null&&t!==void 0?t:!((_=e._writableState)===null||_===void 0)&&_.errored))}var Xr={isDestroyed:Eu,kIsDestroyed:ip,isDisturbed:JA,kIsDisturbed:sp,isErrored:XA,kIsErrored:op,isReadable:dp,kIsReadable:_c,kIsClosedPromise:MA,kControllerErrorFunction:kA,kIsWritable:pc,isClosed:GA,isDuplexNodeStream:FA,isFinished:zA,isIterable:HA,isReadableNodeStream:mu,isReadableStream:ap,isReadableEnded:WA,isReadableFinished:cp,isReadableErrored:VA,isNodeStream:Pr,isWebStream:UA,isWritable:hp,isWritableNodeStream:vu,isWritableStream:up,isWritableEnded:lp,isWritableFinished:jA,isWritableErrored:qA,isServerRequest:ZA,isServerResponse:_p,willEmitClose:KA,isTransformStream:fp};const ci=Ui,{AbortError:pp,codes:YA}=Pn,{ERR_INVALID_ARG_TYPE:QA,ERR_STREAM_PREMATURE_CLOSE:Kg}=YA,{kEmptyObject:bc,once:wc}=Rn,{validateAbortSignal:eI,validateFunction:tI,validateObject:nI,validateBoolean:rI}=Ts,{Promise:iI,PromisePrototypeThen:oI,SymbolDispose:bp}=Gt,{isClosed:sI,isReadable:Jg,isReadableNodeStream:Rl,isReadableStream:aI,isReadableFinished:Xg,isReadableErrored:Yg,isWritable:Qg,isWritableNodeStream:e0,isWritableStream:uI,isWritableFinished:t0,isWritableErrored:n0,isNodeStream:fI,willEmitClose:lI,kIsClosedPromise:cI}=Xr;let mo;function dI(e){return e.setHeader&&typeof e.abort=="function"}const yc=()=>{};function wp(e,t,n){var o,a;if(arguments.length===2?(n=t,t=bc):t==null?t=bc:nI(t,"options"),tI(n,"callback"),eI(t.signal,"options.signal"),n=wc(n),aI(e)||uI(e))return hI(e,t,n);if(!fI(e))throw new QA("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:Rl(e),f=(a=t.writable)!==null&&a!==void 0?a:e0(e),g=e._writableState,h=e._readableState,d=()=>{e.writable||E()};let _=lI(e)&&Rl(e)===u&&e0(e)===f,w=t0(e,!1);const E=()=>{w=!0,e.destroyed&&(_=!1),!(_&&(!e.readable||u))&&(!u||y)&&n.call(e)};let y=Xg(e,!1);const N=()=>{y=!0,e.destroyed&&(_=!1),!(_&&(!e.writable||f))&&(!f||w)&&n.call(e)},k=K=>{n.call(e,K)};let U=sI(e);const V=()=>{U=!0;const K=n0(e)||Yg(e);if(K&&typeof K!="boolean")return n.call(e,K);if(u&&!y&&Rl(e,!0)&&!Xg(e,!1))return n.call(e,new Kg);if(f&&!w&&!t0(e,!1))return n.call(e,new Kg);n.call(e)},j=()=>{U=!0;const K=n0(e)||Yg(e);if(K&&typeof K!="boolean")return n.call(e,K);n.call(e)},P=()=>{e.req.on("finish",E)};dI(e)?(e.on("complete",E),_||e.on("abort",V),e.req?P():e.on("request",P)):f&&!g&&(e.on("end",d),e.on("close",d)),!_&&typeof e.aborted=="boolean"&&e.on("aborted",V),e.on("end",N),e.on("finish",E),t.error!==!1&&e.on("error",k),e.on("close",V),U?ci.nextTick(V):g!=null&&g.errorEmitted||h!=null&&h.errorEmitted?_||ci.nextTick(j):(!u&&(!_||Jg(e))&&(w||Qg(e)===!1)||!f&&(!_||Qg(e))&&(y||Jg(e)===!1)||h&&e.req&&e.aborted)&&ci.nextTick(j);const C=()=>{n=yc,e.removeListener("aborted",V),e.removeListener("complete",E),e.removeListener("abort",V),e.removeListener("request",P),e.req&&e.req.removeListener("finish",E),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",E),e.removeListener("end",N),e.removeListener("error",k),e.removeListener("close",V)};if(t.signal&&!U){const K=()=>{const se=n;C(),se.call(e,new pp(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)ci.nextTick(K);else{mo=mo||Rn.addAbortListener;const se=mo(t.signal,K),re=n;n=wc((...ge)=>{se[bp](),re.apply(e,ge)})}}return C}function hI(e,t,n){let o=!1,a=yc;if(t.signal)if(a=()=>{o=!0,n.call(e,new pp(void 0,{cause:t.signal.reason}))},t.signal.aborted)ci.nextTick(a);else{mo=mo||Rn.addAbortListener;const f=mo(t.signal,a),g=n;n=wc((...h)=>{f[bp](),g.apply(e,h)})}const u=(...f)=>{o||ci.nextTick(()=>n.apply(e,f))};return oI(e[cI].promise,u,u),yc}function gI(e,t){var n;let o=!1;return t===null&&(t=bc),(n=t)!==null&&n!==void 0&&n.cleanup&&(rI(t.cleanup,"cleanup"),o=t.cleanup),new iI((a,u)=>{const f=wp(e,t,g=>{o&&f(),g?u(g):a()})})}Vc.exports=wp;Vc.exports.finished=gI;var yi=Vc.exports;const Tr=Ui,{aggregateTwoErrors:_I,codes:{ERR_MULTIPLE_CALLBACK:pI},AbortError:bI}=Pn,{Symbol:yp}=Gt,{kIsDestroyed:wI,isDestroyed:yI,isFinished:mI,isServerRequest:vI}=Xr,mp=yp("kDestroy"),mc=yp("kConstruct");function vp(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function EI(e,t){const n=this._readableState,o=this._writableState,a=o||n;return o!=null&&o.destroyed||n!=null&&n.destroyed?(typeof t=="function"&&t(),this):(vp(e,o,n),o&&(o.destroyed=!0),n&&(n.destroyed=!0),a.constructed?r0(this,e,t):this.once(mp,function(u){r0(this,_I(u,e),t)}),this)}function r0(e,t,n){let o=!1;function a(u){if(o)return;o=!0;const f=e._readableState,g=e._writableState;vp(u,g,f),g&&(g.closed=!0),f&&(f.closed=!0),typeof n=="function"&&n(u),u?Tr.nextTick(SI,e,u):Tr.nextTick(Ep,e)}try{e._destroy(t||null,a)}catch(u){a(u)}}function SI(e,t){vc(e,t),Ep(e)}function Ep(e){const t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function vc(e,t){const n=e._readableState,o=e._writableState;o!=null&&o.errorEmitted||n!=null&&n.errorEmitted||(o&&(o.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function RI(){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 Ec(e,t,n){const o=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||o!=null&&o.destroyed)return this;o!=null&&o.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),o&&!o.errored&&(o.errored=t),n?Tr.nextTick(vc,e,t):vc(e,t))}function AI(e,t){if(typeof e._construct!="function")return;const n=e._readableState,o=e._writableState;n&&(n.constructed=!1),o&&(o.constructed=!1),e.once(mc,t),!(e.listenerCount(mc)>1)&&Tr.nextTick(II,e)}function II(e){let t=!1;function n(o){if(t){Ec(e,o??new pI);return}t=!0;const a=e._readableState,u=e._writableState,f=u||a;a&&(a.constructed=!0),u&&(u.constructed=!0),f.destroyed?e.emit(mp,o):o?Ec(e,o,!0):Tr.nextTick(TI,e)}try{e._construct(o=>{Tr.nextTick(n,o)})}catch(o){Tr.nextTick(n,o)}}function TI(e){e.emit(mc)}function i0(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function Sp(e){e.emit("close")}function OI(e,t){e.emit("error",t),Tr.nextTick(Sp,e)}function LI(e,t){!e||yI(e)||(!t&&!mI(e)&&(t=new bI),vI(e)?(e.socket=null,e.destroy(t)):i0(e)?e.abort():i0(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?Tr.nextTick(OI,e,t):Tr.nextTick(Sp,e),e.destroyed||(e[wI]=!0))}var Co={construct:AI,destroyer:LI,destroy:EI,undestroy:RI,errorOrDestroy:Ec};const{ArrayIsArray:CI,ObjectSetPrototypeOf:Rp}=Gt,{EventEmitter:Su}=Is();function Ru(e){Su.call(this,e)}Rp(Ru.prototype,Su.prototype);Rp(Ru,Su);Ru.prototype.pipe=function(e,t){const n=this;function o(_){e.writable&&e.write(_)===!1&&n.pause&&n.pause()}n.on("data",o);function a(){n.readable&&n.resume&&n.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",f),n.on("close",g));let u=!1;function f(){u||(u=!0,e.end())}function g(){u||(u=!0,typeof e.destroy=="function"&&e.destroy())}function h(_){d(),Su.listenerCount(this,"error")===0&&this.emit("error",_)}Sc(n,"error",h),Sc(e,"error",h);function d(){n.removeListener("data",o),e.removeListener("drain",a),n.removeListener("end",f),n.removeListener("close",g),n.removeListener("error",h),e.removeListener("error",h),n.removeListener("end",d),n.removeListener("close",d),e.removeListener("close",d)}return n.on("end",d),n.on("close",d),e.on("close",d),e.emit("pipe",n),e};function Sc(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):CI(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}var Gc={Stream:Ru,prependListener:Sc},Ap={exports:{}};(function(e){const{SymbolDispose:t}=Gt,{AbortError:n,codes:o}=Pn,{isNodeStream:a,isWebStream:u,kControllerErrorFunction:f}=Xr,g=yi,{ERR_INVALID_ARG_TYPE:h}=o;let d;const _=(w,E)=>{if(typeof w!="object"||!("aborted"in w))throw new h(E,"AbortSignal",w)};e.exports.addAbortSignal=function(E,y){if(_(E,"signal"),!a(y)&&!u(y))throw new h("stream",["ReadableStream","WritableStream","Stream"],y);return e.exports.addAbortSignalNoValidate(E,y)},e.exports.addAbortSignalNoValidate=function(w,E){if(typeof w!="object"||!("aborted"in w))return E;const y=a(E)?()=>{E.destroy(new n(void 0,{cause:w.reason}))}:()=>{E[f](new n(void 0,{cause:w.reason}))};if(w.aborted)y();else{d=d||Rn.addAbortListener;const N=d(w,y);g(E,N[t])}return E}})(Ap);var Au=Ap.exports;const{StringPrototypeSlice:o0,SymbolIterator:PI,TypedArrayPrototypeSet:Wa,Uint8Array:NI}=Gt,{Buffer:Al}=Lr,{inspect:BI}=Rn;var $I=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(t){const n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,o=""+n.data;for(;(n=n.next)!==null;)o+=t+n.data;return o}concat(t){if(this.length===0)return Al.alloc(0);const n=Al.allocUnsafe(t>>>0);let o=this.head,a=0;for(;o;)Wa(n,o.data,a),a+=o.data.length,o=o.next;return n}consume(t,n){const o=this.head.data;if(t<o.length){const a=o.slice(0,t);return this.head.data=o.slice(t),a}return t===o.length?this.shift():n?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[PI](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let n="",o=this.head,a=0;do{const u=o.data;if(t>u.length)n+=u,t-=u.length;else{t===u.length?(n+=u,++a,o.next?this.head=o.next:this.head=this.tail=null):(n+=o0(u,0,t),this.head=o,o.data=o0(u,t));break}++a}while((o=o.next)!==null);return this.length-=a,n}_getBuffer(t){const n=Al.allocUnsafe(t),o=t;let a=this.head,u=0;do{const f=a.data;if(t>f.length)Wa(n,f,o-t),t-=f.length;else{t===f.length?(Wa(n,f,o-t),++u,a.next?this.head=a.next:this.head=this.tail=null):(Wa(n,new NI(f.buffer,f.byteOffset,t),o-t),this.head=a,a.data=f.slice(t));break}++u}while((a=a.next)!==null);return this.length-=u,n}[Symbol.for("nodejs.util.inspect.custom")](t,n){return BI(this,{...n,depth:0,customInspect:!1})}};const{MathFloor:xI,NumberIsInteger:DI}=Gt,{validateInteger:MI}=Ts,{ERR_INVALID_ARG_VALUE:kI}=Pn.codes;let Ip=16*1024,Tp=16;function FI(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function Op(e){return e?Tp:Ip}function UI(e,t){MI(t,"value",0),e?Tp=t:Ip=t}function HI(e,t,n,o){const a=FI(t,o,n);if(a!=null){if(!DI(a)||a<0){const u=o?`options.${n}`:"options.highWaterMark";throw new kI(u,a)}return xI(a)}return Op(e.objectMode)}var Iu={getHighWaterMark:HI,getDefaultHighWaterMark:Op,setDefaultHighWaterMark:UI};const s0=Ui,{PromisePrototypeThen:jI,SymbolAsyncIterator:a0,SymbolIterator:u0}=Gt,{Buffer:WI}=Lr,{ERR_INVALID_ARG_TYPE:zI,ERR_STREAM_NULL_VALUES:qI}=Pn.codes;function VI(e,t,n){let o;if(typeof t=="string"||t instanceof WI)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let a;if(t&&t[a0])a=!0,o=t[a0]();else if(t&&t[u0])a=!1,o=t[u0]();else throw new zI("iterable",["Iterable"],t);const u=new e({objectMode:!0,highWaterMark:1,...n});let f=!1;u._read=function(){f||(f=!0,h())},u._destroy=function(d,_){jI(g(d),()=>s0.nextTick(_,d),w=>s0.nextTick(_,w||d))};async function g(d){const _=d!=null,w=typeof o.throw=="function";if(_&&w){const{value:E,done:y}=await o.throw(d);if(await E,y)return}if(typeof o.return=="function"){const{value:E}=await o.return();await E}}async function h(){for(;;){try{const{value:d,done:_}=a?await o.next():o.next();if(_)u.push(null);else{const w=d&&typeof d.then=="function"?await d:d;if(w===null)throw f=!1,new qI;if(u.push(w))continue;f=!1}}catch(d){u.destroy(d)}break}}return u}var Lp=VI,Il,f0;function Tu(){if(f0)return Il;f0=1;const e=Ui,{ArrayPrototypeIndexOf:t,NumberIsInteger:n,NumberIsNaN:o,NumberParseInt:a,ObjectDefineProperties:u,ObjectKeys:f,ObjectSetPrototypeOf:g,Promise:h,SafeSet:d,SymbolAsyncDispose:_,SymbolAsyncIterator:w,Symbol:E}=Gt;Il=$e,$e.ReadableState=nt;const{EventEmitter:y}=Is(),{Stream:N,prependListener:k}=Gc,{Buffer:U}=Lr,{addAbortSignal:V}=Au,j=yi;let P=Rn.debuglog("stream",S=>{P=S});const C=$I,K=Co,{getHighWaterMark:se,getDefaultHighWaterMark:re}=Iu,{aggregateTwoErrors:ge,codes:{ERR_INVALID_ARG_TYPE:le,ERR_METHOD_NOT_IMPLEMENTED:Ae,ERR_OUT_OF_RANGE:we,ERR_STREAM_PUSH_AFTER_EOF:p,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:v},AbortError:A}=Pn,{validateObject:B}=Ts,W=E("kPaused"),{StringDecoder:D}=vR(),J=Lp;g($e.prototype,N.prototype),g($e,N);const M=()=>{},{errorOrDestroy:q}=K,te=1,de=2,Q=4,ye=8,_e=16,Se=32,Fe=64,Ce=128,Be=256,et=512,Je=1024,We=2048,x=4096,H=8192,ne=16384,Ie=32768,be=65536,Pe=1<<17,qe=1<<18;function je(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(L){L?this.state|=S:this.state&=~S}}}u(nt.prototype,{objectMode:je(te),ended:je(de),endEmitted:je(Q),reading:je(ye),constructed:je(_e),sync:je(Se),needReadable:je(Fe),emittedReadable:je(Ce),readableListening:je(Be),resumeScheduled:je(et),errorEmitted:je(Je),emitClose:je(We),autoDestroy:je(x),destroyed:je(H),closed:je(ne),closeEmitted:je(Ie),multiAwaitDrain:je(be),readingMore:je(Pe),dataEmitted:je(qe)});function nt(S,L,he){typeof he!="boolean"&&(he=L instanceof Zr()),this.state=We|x|_e|Se,S&&S.objectMode&&(this.state|=te),he&&S&&S.readableObjectMode&&(this.state|=te),this.highWaterMark=S?se(this,S,"readableHighWaterMark",he):re(!1),this.buffer=new C,this.length=0,this.pipes=[],this.flowing=null,this[W]=null,S&&S.emitClose===!1&&(this.state&=~We),S&&S.autoDestroy===!1&&(this.state&=~x),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new D(S.encoding),this.encoding=S.encoding)}function $e(S){if(!(this instanceof $e))return new $e(S);const L=this instanceof Zr();this._readableState=new nt(S,this,L),S&&(typeof S.read=="function"&&(this._read=S.read),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&!L&&V(S.signal,this)),N.call(this,S),K.construct(this,()=>{this._readableState.needReadable&&T(this,this._readableState)})}$e.prototype.destroy=K.destroy,$e.prototype._undestroy=K.undestroy,$e.prototype._destroy=function(S,L){L(S)},$e.prototype[y.captureRejectionSymbol]=function(S){this.destroy(S)},$e.prototype[_]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new A,this.destroy(S)),new h((L,he)=>j(this,Le=>Le&&Le!==S?he(Le):L(null)))},$e.prototype.push=function(S,L){return ut(this,S,L,!1)},$e.prototype.unshift=function(S,L){return ut(this,S,L,!0)};function ut(S,L,he,Le){P("readableAddChunk",L);const Ne=S._readableState;let Ze;if(Ne.state&te||(typeof L=="string"?(he=he||Ne.defaultEncoding,Ne.encoding!==he&&(Le&&Ne.encoding?L=U.from(L,he).toString(Ne.encoding):(L=U.from(L,he),he=""))):L instanceof U?he="":N._isUint8Array(L)?(L=N._uint8ArrayToBuffer(L),he=""):L!=null&&(Ze=new le("chunk",["string","Buffer","Uint8Array"],L))),Ze)q(S,Ze);else if(L===null)Ne.state&=~ye,lt(S,Ne);else if(Ne.state&te||L&&L.length>0)if(Le)if(Ne.state&Q)q(S,new v);else{if(Ne.destroyed||Ne.errored)return!1;Ft(S,Ne,L,!0)}else if(Ne.ended)q(S,new p);else{if(Ne.destroyed||Ne.errored)return!1;Ne.state&=~ye,Ne.decoder&&!he?(L=Ne.decoder.write(L),Ne.objectMode||L.length!==0?Ft(S,Ne,L,!1):T(S,Ne)):Ft(S,Ne,L,!1)}else Le||(Ne.state&=~ye,T(S,Ne));return!Ne.ended&&(Ne.length<Ne.highWaterMark||Ne.length===0)}function Ft(S,L,he,Le){L.flowing&&L.length===0&&!L.sync&&S.listenerCount("data")>0?(L.state&be?L.awaitDrainWriters.clear():L.awaitDrainWriters=null,L.dataEmitted=!0,S.emit("data",he)):(L.length+=L.objectMode?1:he.length,Le?L.buffer.unshift(he):L.buffer.push(he),L.state&Fe&&Dt(S)),T(S,L)}$e.prototype.isPaused=function(){const S=this._readableState;return S[W]===!0||S.flowing===!1},$e.prototype.setEncoding=function(S){const L=new D(S);this._readableState.decoder=L,this._readableState.encoding=this._readableState.decoder.encoding;const he=this._readableState.buffer;let Le="";for(const Ne of he)Le+=L.write(Ne);return he.clear(),Le!==""&&he.push(Le),this._readableState.length=Le.length,this};const pt=1073741824;function ln(S){if(S>pt)throw new we("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function It(S,L){return S<=0||L.length===0&&L.ended?0:L.state&te?1:o(S)?L.flowing&&L.length?L.buffer.first().length:L.length:S<=L.length?S:L.ended?L.length:0}$e.prototype.read=function(S){P("read",S),S===void 0?S=NaN:n(S)||(S=a(S,10));const L=this._readableState,he=S;if(S>L.highWaterMark&&(L.highWaterMark=ln(S)),S!==0&&(L.state&=~Ce),S===0&&L.needReadable&&((L.highWaterMark!==0?L.length>=L.highWaterMark:L.length>0)||L.ended))return P("read: emitReadable",L.length,L.ended),L.length===0&&L.ended?ae(this):Dt(this),null;if(S=It(S,L),S===0&&L.ended)return L.length===0&&ae(this),null;let Le=(L.state&Fe)!==0;if(P("need readable",Le),(L.length===0||L.length-S<L.highWaterMark)&&(Le=!0,P("length less than watermark",Le)),L.ended||L.reading||L.destroyed||L.errored||!L.constructed)Le=!1,P("reading, ended or constructing",Le);else if(Le){P("do read"),L.state|=ye|Se,L.length===0&&(L.state|=Fe);try{this._read(L.highWaterMark)}catch(Ze){q(this,Ze)}L.state&=~Se,L.reading||(S=It(he,L))}let Ne;return S>0?Ne=oe(S,L):Ne=null,Ne===null?(L.needReadable=L.length<=L.highWaterMark,S=0):(L.length-=S,L.multiAwaitDrain?L.awaitDrainWriters.clear():L.awaitDrainWriters=null),L.length===0&&(L.ended||(L.needReadable=!0),he!==S&&L.ended&&ae(this)),Ne!==null&&!L.errorEmitted&&!L.closeEmitted&&(L.dataEmitted=!0,this.emit("data",Ne)),Ne};function lt(S,L){if(P("onEofChunk"),!L.ended){if(L.decoder){const he=L.decoder.end();he&&he.length&&(L.buffer.push(he),L.length+=L.objectMode?1:he.length)}L.ended=!0,L.sync?Dt(S):(L.needReadable=!1,L.emittedReadable=!0,Ut(S))}}function Dt(S){const L=S._readableState;P("emitReadable",L.needReadable,L.emittedReadable),L.needReadable=!1,L.emittedReadable||(P("emitReadable",L.flowing),L.emittedReadable=!0,e.nextTick(Ut,S))}function Ut(S){const L=S._readableState;P("emitReadable_",L.destroyed,L.length,L.ended),!L.destroyed&&!L.errored&&(L.length||L.ended)&&(S.emit("readable"),L.emittedReadable=!1),L.needReadable=!L.flowing&&!L.ended&&L.length<=L.highWaterMark,Re(S)}function T(S,L){!L.readingMore&&L.constructed&&(L.readingMore=!0,e.nextTick(me,S,L))}function me(S,L){for(;!L.reading&&!L.ended&&(L.length<L.highWaterMark||L.flowing&&L.length===0);){const he=L.length;if(P("maybeReadMore read 0"),S.read(0),he===L.length)break}L.readingMore=!1}$e.prototype._read=function(S){throw new Ae("_read()")},$e.prototype.pipe=function(S,L){const he=this,Le=this._readableState;Le.pipes.length===1&&(Le.multiAwaitDrain||(Le.multiAwaitDrain=!0,Le.awaitDrainWriters=new d(Le.awaitDrainWriters?[Le.awaitDrainWriters]:[]))),Le.pipes.push(S),P("pipe count=%d opts=%j",Le.pipes.length,L);const Ze=(!L||L.end!==!1)&&S!==e.stdout&&S!==e.stderr?Ht:Wn;Le.endEmitted?e.nextTick(Ze):he.once("end",Ze),S.on("unpipe",ft);function ft(or,Bn){P("onunpipe"),or===he&&Bn&&Bn.hasUnpiped===!1&&(Bn.hasUnpiped=!0,pr())}function Ht(){P("onend"),S.end()}let bt,ir=!1;function pr(){P("cleanup"),S.removeListener("close",zt),S.removeListener("finish",Qt),bt&&S.removeListener("drain",bt),S.removeListener("error",Mt),S.removeListener("unpipe",ft),he.removeListener("end",Ht),he.removeListener("end",Wn),he.removeListener("data",Yt),ir=!0,bt&&Le.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&bt()}function Tt(){ir||(Le.pipes.length===1&&Le.pipes[0]===S?(P("false write response, pause",0),Le.awaitDrainWriters=S,Le.multiAwaitDrain=!1):Le.pipes.length>1&&Le.pipes.includes(S)&&(P("false write response, pause",Le.awaitDrainWriters.size),Le.awaitDrainWriters.add(S)),he.pause()),bt||(bt=Oe(he,S),S.on("drain",bt))}he.on("data",Yt);function Yt(or){P("ondata");const Bn=S.write(or);P("dest.write",Bn),Bn===!1&&Tt()}function Mt(or){if(P("onerror",or),Wn(),S.removeListener("error",Mt),S.listenerCount("error")===0){const Bn=S._writableState||S._readableState;Bn&&!Bn.errorEmitted?q(S,or):S.emit("error",or)}}k(S,"error",Mt);function zt(){S.removeListener("finish",Qt),Wn()}S.once("close",zt);function Qt(){P("onfinish"),S.removeListener("close",zt),Wn()}S.once("finish",Qt);function Wn(){P("unpipe"),he.unpipe(S)}return S.emit("pipe",he),S.writableNeedDrain===!0?Tt():Le.flowing||(P("pipe resume"),he.resume()),S};function Oe(S,L){return function(){const Le=S._readableState;Le.awaitDrainWriters===L?(P("pipeOnDrain",1),Le.awaitDrainWriters=null):Le.multiAwaitDrain&&(P("pipeOnDrain",Le.awaitDrainWriters.size),Le.awaitDrainWriters.delete(L)),(!Le.awaitDrainWriters||Le.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}$e.prototype.unpipe=function(S){const L=this._readableState,he={hasUnpiped:!1};if(L.pipes.length===0)return this;if(!S){const Ne=L.pipes;L.pipes=[],this.pause();for(let Ze=0;Ze<Ne.length;Ze++)Ne[Ze].emit("unpipe",this,{hasUnpiped:!1});return this}const Le=t(L.pipes,S);return Le===-1?this:(L.pipes.splice(Le,1),L.pipes.length===0&&this.pause(),S.emit("unpipe",this,he),this)},$e.prototype.on=function(S,L){const he=N.prototype.on.call(this,S,L),Le=this._readableState;return S==="data"?(Le.readableListening=this.listenerCount("readable")>0,Le.flowing!==!1&&this.resume()):S==="readable"&&!Le.endEmitted&&!Le.readableListening&&(Le.readableListening=Le.needReadable=!0,Le.flowing=!1,Le.emittedReadable=!1,P("on readable",Le.length,Le.reading),Le.length?Dt(this):Le.reading||e.nextTick(Z,this)),he},$e.prototype.addListener=$e.prototype.on,$e.prototype.removeListener=function(S,L){const he=N.prototype.removeListener.call(this,S,L);return S==="readable"&&e.nextTick(xe,this),he},$e.prototype.off=$e.prototype.removeListener,$e.prototype.removeAllListeners=function(S){const L=N.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&e.nextTick(xe,this),L};function xe(S){const L=S._readableState;L.readableListening=S.listenerCount("readable")>0,L.resumeScheduled&&L[W]===!1?L.flowing=!0:S.listenerCount("data")>0?S.resume():L.readableListening||(L.flowing=null)}function Z(S){P("readable nexttick read 0"),S.read(0)}$e.prototype.resume=function(){const S=this._readableState;return S.flowing||(P("resume"),S.flowing=!S.readableListening,ce(this,S)),S[W]=!1,this};function ce(S,L){L.resumeScheduled||(L.resumeScheduled=!0,e.nextTick(m,S,L))}function m(S,L){P("resume",L.reading),L.reading||S.read(0),L.resumeScheduled=!1,S.emit("resume"),Re(S),L.flowing&&!L.reading&&S.read(0)}$e.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[W]=!0,this};function Re(S){const L=S._readableState;for(P("flow",L.flowing);L.flowing&&S.read()!==null;);}$e.prototype.wrap=function(S){let L=!1;S.on("data",Le=>{!this.push(Le)&&S.pause&&(L=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",Le=>{q(this,Le)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{L&&S.resume&&(L=!1,S.resume())};const he=f(S);for(let Le=1;Le<he.length;Le++){const Ne=he[Le];this[Ne]===void 0&&typeof S[Ne]=="function"&&(this[Ne]=S[Ne].bind(S))}return this},$e.prototype[w]=function(){return Ve(this)},$e.prototype.iterator=function(S){return S!==void 0&&B(S,"options"),Ve(this,S)};function Ve(S,L){typeof S.read!="function"&&(S=$e.wrap(S,{objectMode:!0}));const he=l(S,L);return he.stream=S,he}async function*l(S,L){let he=M;function Le(ft){this===S?(he(),he=M):he=ft}S.on("readable",Le);let Ne;const Ze=j(S,{writable:!1},ft=>{Ne=ft?ge(Ne,ft):null,he(),he=M});try{for(;;){const ft=S.destroyed?null:S.read();if(ft!==null)yield ft;else{if(Ne)throw Ne;if(Ne===null)return;await new h(Le)}}}catch(ft){throw Ne=ge(Ne,ft),Ne}finally{(Ne||(L==null?void 0:L.destroyOnReturn)!==!1)&&(Ne===void 0||S._readableState.autoDestroy)?K.destroyer(S,null):(S.off("readable",Le),Ze())}}u($e.prototype,{readable:{__proto__:null,get(){const S=this._readableState;return!!S&&S.readable!==!1&&!S.destroyed&&!S.errorEmitted&&!S.endEmitted},set(S){this._readableState&&(this._readableState.readable=!!S)}},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(S){this._readableState&&(this._readableState.flowing=S)}},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(S){this._readableState&&(this._readableState.destroyed=S)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),u(nt.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[W]!==!1},set(S){this[W]=!!S}}}),$e._fromList=oe;function oe(S,L){if(L.length===0)return null;let he;return L.objectMode?he=L.buffer.shift():!S||S>=L.length?(L.decoder?he=L.buffer.join(""):L.buffer.length===1?he=L.buffer.first():he=L.buffer.concat(L.length),L.buffer.clear()):he=L.buffer.consume(S,L.decoder),he}function ae(S){const L=S._readableState;P("endReadable",L.endEmitted),L.endEmitted||(L.ended=!0,e.nextTick(R,L,S))}function R(S,L){if(P("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,L.emit("end"),L.writable&&L.allowHalfOpen===!1)e.nextTick(z,L);else if(S.autoDestroy){const he=L._writableState;(!he||he.autoDestroy&&(he.finished||he.writable===!1))&&L.destroy()}}}function z(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}$e.from=function(S,L){return J($e,S,L)};let ie;function Ue(){return ie===void 0&&(ie={}),ie}return $e.fromWeb=function(S,L){return Ue().newStreamReadableFromReadableStream(S,L)},$e.toWeb=function(S,L){return Ue().newReadableStreamFromStreamReadable(S,L)},$e.wrap=function(S,L){var he,Le;return new $e({objectMode:(he=(Le=S.readableObjectMode)!==null&&Le!==void 0?Le:S.objectMode)!==null&&he!==void 0?he:!0,...L,destroy(Ne,Ze){K.destroyer(S,Ne),Ze(Ne)}}).wrap(S)},Il}var Tl,l0;function Zc(){if(l0)return Tl;l0=1;const e=Ui,{ArrayPrototypeSlice:t,Error:n,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:a,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:g,Symbol:h,SymbolHasInstance:d}=Gt;Tl=B,B.WritableState=v;const{EventEmitter:_}=Is(),w=Gc.Stream,{Buffer:E}=Lr,y=Co,{addAbortSignal:N}=Au,{getHighWaterMark:k,getDefaultHighWaterMark:U}=Iu,{ERR_INVALID_ARG_TYPE:V,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_MULTIPLE_CALLBACK:P,ERR_STREAM_CANNOT_PIPE:C,ERR_STREAM_DESTROYED:K,ERR_STREAM_ALREADY_FINISHED:se,ERR_STREAM_NULL_VALUES:re,ERR_STREAM_WRITE_AFTER_END:ge,ERR_UNKNOWN_ENCODING:le}=Pn.codes,{errorOrDestroy:Ae}=y;f(B.prototype,w.prototype),f(B,w);function we(){}const p=h("kOnFinished");function v(x,H,ne){typeof ne!="boolean"&&(ne=H instanceof Zr()),this.objectMode=!!(x&&x.objectMode),ne&&(this.objectMode=this.objectMode||!!(x&&x.writableObjectMode)),this.highWaterMark=x?k(this,x,"writableHighWaterMark",ne):U(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const Ie=!!(x&&x.decodeStrings===!1);this.decodeStrings=!Ie,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=q.bind(void 0,H),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,A(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!x||x.emitClose!==!1,this.autoDestroy=!x||x.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[p]=[]}function A(x){x.buffered=[],x.bufferedIndex=0,x.allBuffers=!0,x.allNoop=!0}v.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},a(v.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function B(x){const H=this instanceof Zr();if(!H&&!o(B,this))return new B(x);this._writableState=new v(x,this,H),x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final),typeof x.construct=="function"&&(this._construct=x.construct),x.signal&&N(x.signal,this)),w.call(this,x),y.construct(this,()=>{const ne=this._writableState;ne.writing||ye(this,ne),Ce(this,ne)})}a(B,d,{__proto__:null,value:function(x){return o(this,x)?!0:this!==B?!1:x&&x._writableState instanceof v}}),B.prototype.pipe=function(){Ae(this,new C)};function W(x,H,ne,Ie){const be=x._writableState;if(typeof ne=="function")Ie=ne,ne=be.defaultEncoding;else{if(!ne)ne=be.defaultEncoding;else if(ne!=="buffer"&&!E.isEncoding(ne))throw new le(ne);typeof Ie!="function"&&(Ie=we)}if(H===null)throw new re;if(!be.objectMode)if(typeof H=="string")be.decodeStrings!==!1&&(H=E.from(H,ne),ne="buffer");else if(H instanceof E)ne="buffer";else if(w._isUint8Array(H))H=w._uint8ArrayToBuffer(H),ne="buffer";else throw new V("chunk",["string","Buffer","Uint8Array"],H);let Pe;return be.ending?Pe=new ge:be.destroyed&&(Pe=new K("write")),Pe?(e.nextTick(Ie,Pe),Ae(x,Pe,!0),Pe):(be.pendingcb++,D(x,be,H,ne,Ie))}B.prototype.write=function(x,H,ne){return W(this,x,H,ne)===!0},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){const x=this._writableState;x.corked&&(x.corked--,x.writing||ye(this,x))},B.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=g(H)),!E.isEncoding(H))throw new le(H);return this._writableState.defaultEncoding=H,this};function D(x,H,ne,Ie,be){const Pe=H.objectMode?1:ne.length;H.length+=Pe;const qe=H.length<H.highWaterMark;return qe||(H.needDrain=!0),H.writing||H.corked||H.errored||!H.constructed?(H.buffered.push({chunk:ne,encoding:Ie,callback:be}),H.allBuffers&&Ie!=="buffer"&&(H.allBuffers=!1),H.allNoop&&be!==we&&(H.allNoop=!1)):(H.writelen=Pe,H.writecb=be,H.writing=!0,H.sync=!0,x._write(ne,Ie,H.onwrite),H.sync=!1),qe&&!H.errored&&!H.destroyed}function J(x,H,ne,Ie,be,Pe,qe){H.writelen=Ie,H.writecb=qe,H.writing=!0,H.sync=!0,H.destroyed?H.onwrite(new K("write")):ne?x._writev(be,H.onwrite):x._write(be,Pe,H.onwrite),H.sync=!1}function M(x,H,ne,Ie){--H.pendingcb,Ie(ne),Q(H),Ae(x,ne)}function q(x,H){const ne=x._writableState,Ie=ne.sync,be=ne.writecb;if(typeof be!="function"){Ae(x,new P);return}ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0,H?(H.stack,ne.errored||(ne.errored=H),x._readableState&&!x._readableState.errored&&(x._readableState.errored=H),Ie?e.nextTick(M,x,ne,H,be):M(x,ne,H,be)):(ne.buffered.length>ne.bufferedIndex&&ye(x,ne),Ie?ne.afterWriteTickInfo!==null&&ne.afterWriteTickInfo.cb===be?ne.afterWriteTickInfo.count++:(ne.afterWriteTickInfo={count:1,cb:be,stream:x,state:ne},e.nextTick(te,ne.afterWriteTickInfo)):de(x,ne,1,be))}function te({stream:x,state:H,count:ne,cb:Ie}){return H.afterWriteTickInfo=null,de(x,H,ne,Ie)}function de(x,H,ne,Ie){for(!H.ending&&!x.destroyed&&H.length===0&&H.needDrain&&(H.needDrain=!1,x.emit("drain"));ne-- >0;)H.pendingcb--,Ie();H.destroyed&&Q(H),Ce(x,H)}function Q(x){if(x.writing)return;for(let be=x.bufferedIndex;be<x.buffered.length;++be){var H;const{chunk:Pe,callback:qe}=x.buffered[be],je=x.objectMode?1:Pe.length;x.length-=je,qe((H=x.errored)!==null&&H!==void 0?H:new K("write"))}const ne=x[p].splice(0);for(let be=0;be<ne.length;be++){var Ie;ne[be]((Ie=x.errored)!==null&&Ie!==void 0?Ie:new K("end"))}A(x)}function ye(x,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:ne,bufferedIndex:Ie,objectMode:be}=H,Pe=ne.length-Ie;if(!Pe)return;let qe=Ie;if(H.bufferProcessing=!0,Pe>1&&x._writev){H.pendingcb-=Pe-1;const je=H.allNoop?we:$e=>{for(let ut=qe;ut<ne.length;++ut)ne[ut].callback($e)},nt=H.allNoop&&qe===0?ne:t(ne,qe);nt.allBuffers=H.allBuffers,J(x,H,!0,H.length,nt,"",je),A(H)}else{do{const{chunk:je,encoding:nt,callback:$e}=ne[qe];ne[qe++]=null;const ut=be?1:je.length;J(x,H,!1,ut,je,nt,$e)}while(qe<ne.length&&!H.writing);qe===ne.length?A(H):qe>256?(ne.splice(0,qe),H.bufferedIndex=0):H.bufferedIndex=qe}H.bufferProcessing=!1}B.prototype._write=function(x,H,ne){if(this._writev)this._writev([{chunk:x,encoding:H}],ne);else throw new j("_write()")},B.prototype._writev=null,B.prototype.end=function(x,H,ne){const Ie=this._writableState;typeof x=="function"?(ne=x,x=null,H=null):typeof H=="function"&&(ne=H,H=null);let be;if(x!=null){const Pe=W(this,x,H);Pe instanceof n&&(be=Pe)}return Ie.corked&&(Ie.corked=1,this.uncork()),be||(!Ie.errored&&!Ie.ending?(Ie.ending=!0,Ce(this,Ie,!0),Ie.ended=!0):Ie.finished?be=new se("end"):Ie.destroyed&&(be=new K("end"))),typeof ne=="function"&&(be||Ie.finished?e.nextTick(ne,be):Ie[p].push(ne)),this};function _e(x){return x.ending&&!x.destroyed&&x.constructed&&x.length===0&&!x.errored&&x.buffered.length===0&&!x.finished&&!x.writing&&!x.errorEmitted&&!x.closeEmitted}function Se(x,H){let ne=!1;function Ie(be){if(ne){Ae(x,be??P());return}if(ne=!0,H.pendingcb--,be){const Pe=H[p].splice(0);for(let qe=0;qe<Pe.length;qe++)Pe[qe](be);Ae(x,be,H.sync)}else _e(H)&&(H.prefinished=!0,x.emit("prefinish"),H.pendingcb++,e.nextTick(Be,x,H))}H.sync=!0,H.pendingcb++;try{x._final(Ie)}catch(be){Ie(be)}H.sync=!1}function Fe(x,H){!H.prefinished&&!H.finalCalled&&(typeof x._final=="function"&&!H.destroyed?(H.finalCalled=!0,Se(x,H)):(H.prefinished=!0,x.emit("prefinish")))}function Ce(x,H,ne){_e(H)&&(Fe(x,H),H.pendingcb===0&&(ne?(H.pendingcb++,e.nextTick((Ie,be)=>{_e(be)?Be(Ie,be):be.pendingcb--},x,H)):_e(H)&&(H.pendingcb++,Be(x,H))))}function Be(x,H){H.pendingcb--,H.finished=!0;const ne=H[p].splice(0);for(let Ie=0;Ie<ne.length;Ie++)ne[Ie]();if(x.emit("finish"),H.autoDestroy){const Ie=x._readableState;(!Ie||Ie.autoDestroy&&(Ie.endEmitted||Ie.readable===!1))&&x.destroy()}}u(B.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(x){this._writableState&&(this._writableState.destroyed=x)}},writable:{__proto__:null,get(){const x=this._writableState;return!!x&&x.writable!==!1&&!x.destroyed&&!x.errored&&!x.ending&&!x.ended},set(x){this._writableState&&(this._writableState.writable=!!x)}},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 x=this._writableState;return x?!x.destroyed&&!x.ending&&x.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 et=y.destroy;B.prototype.destroy=function(x,H){const ne=this._writableState;return!ne.destroyed&&(ne.bufferedIndex<ne.buffered.length||ne[p].length)&&e.nextTick(Q,ne),et.call(this,x,H),this},B.prototype._undestroy=y.undestroy,B.prototype._destroy=function(x,H){H(x)},B.prototype[_.captureRejectionSymbol]=function(x){this.destroy(x)};let Je;function We(){return Je===void 0&&(Je={}),Je}return B.fromWeb=function(x,H){return We().newStreamWritableFromWritableStream(x,H)},B.toWeb=function(x){return We().newWritableStreamFromStreamWritable(x)},Tl}var Ol,c0;function GI(){if(c0)return Ol;c0=1;const e=Ui,t=Lr,{isReadable:n,isWritable:o,isIterable:a,isNodeStream:u,isReadableNodeStream:f,isWritableNodeStream:g,isDuplexNodeStream:h,isReadableStream:d,isWritableStream:_}=Xr,w=yi,{AbortError:E,codes:{ERR_INVALID_ARG_TYPE:y,ERR_INVALID_RETURN_VALUE:N}}=Pn,{destroyer:k}=Co,U=Zr(),V=Tu(),j=Zc(),{createDeferredPromise:P}=Rn,C=Lp,K=globalThis.Blob||t.Blob,se=typeof K<"u"?function(v){return v instanceof K}:function(v){return!1},re=globalThis.AbortController||vs().AbortController,{FunctionPrototypeCall:ge}=Gt;class le extends U{constructor(v){super(v),(v==null?void 0:v.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(v==null?void 0:v.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Ol=function p(v,A){if(h(v))return v;if(f(v))return we({readable:v});if(g(v))return we({writable:v});if(u(v))return we({writable:!1,readable:!1});if(d(v))return we({readable:V.fromWeb(v)});if(_(v))return we({writable:j.fromWeb(v)});if(typeof v=="function"){const{value:W,write:D,final:J,destroy:M}=Ae(v);if(a(W))return C(le,W,{objectMode:!0,write:D,final:J,destroy:M});const q=W==null?void 0:W.then;if(typeof q=="function"){let te;const de=ge(q,W,Q=>{if(Q!=null)throw new N("nully","body",Q)},Q=>{k(te,Q)});return te=new le({objectMode:!0,readable:!1,write:D,final(Q){J(async()=>{try{await de,e.nextTick(Q,null)}catch(ye){e.nextTick(Q,ye)}})},destroy:M})}throw new N("Iterable, AsyncIterable or AsyncFunction",A,W)}if(se(v))return p(v.arrayBuffer());if(a(v))return C(le,v,{objectMode:!0,writable:!1});if(d(v==null?void 0:v.readable)&&_(v==null?void 0:v.writable))return le.fromWeb(v);if(typeof(v==null?void 0:v.writable)=="object"||typeof(v==null?void 0:v.readable)=="object"){const W=v!=null&&v.readable?f(v==null?void 0:v.readable)?v==null?void 0:v.readable:p(v.readable):void 0,D=v!=null&&v.writable?g(v==null?void 0:v.writable)?v==null?void 0:v.writable:p(v.writable):void 0;return we({readable:W,writable:D})}const B=v==null?void 0:v.then;if(typeof B=="function"){let W;return ge(B,v,D=>{D!=null&&W.push(D),W.push(null)},D=>{k(W,D)}),W=new le({objectMode:!0,writable:!1,read(){}})}throw new y(A,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],v)};function Ae(p){let{promise:v,resolve:A}=P();const B=new re,W=B.signal;return{value:p(async function*(){for(;;){const J=v;v=null;const{chunk:M,done:q,cb:te}=await J;if(e.nextTick(te),q)return;if(W.aborted)throw new E(void 0,{cause:W.reason});({promise:v,resolve:A}=P()),yield M}}(),{signal:W}),write(J,M,q){const te=A;A=null,te({chunk:J,done:!1,cb:q})},final(J){const M=A;A=null,M({done:!0,cb:J})},destroy(J,M){B.abort(),M(J)}}}function we(p){const v=p.readable&&typeof p.readable.read!="function"?V.wrap(p.readable):p.readable,A=p.writable;let B=!!n(v),W=!!o(A),D,J,M,q,te;function de(Q){const ye=q;q=null,ye?ye(Q):Q&&te.destroy(Q)}return te=new le({readableObjectMode:!!(v!=null&&v.readableObjectMode),writableObjectMode:!!(A!=null&&A.writableObjectMode),readable:B,writable:W}),W&&(w(A,Q=>{W=!1,Q&&k(v,Q),de(Q)}),te._write=function(Q,ye,_e){A.write(Q,ye)?_e():D=_e},te._final=function(Q){A.end(),J=Q},A.on("drain",function(){if(D){const Q=D;D=null,Q()}}),A.on("finish",function(){if(J){const Q=J;J=null,Q()}})),B&&(w(v,Q=>{B=!1,Q&&k(v,Q),de(Q)}),v.on("readable",function(){if(M){const Q=M;M=null,Q()}}),v.on("end",function(){te.push(null)}),te._read=function(){for(;;){const Q=v.read();if(Q===null){M=te._read;return}if(!te.push(Q))return}}),te._destroy=function(Q,ye){!Q&&q!==null&&(Q=new E),M=null,D=null,J=null,q===null?ye(Q):(q=ye,k(A,Q),k(v,Q))},te}return Ol}var Ll,d0;function Zr(){if(d0)return Ll;d0=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:n,ObjectSetPrototypeOf:o}=Gt;Ll=f;const a=Tu(),u=Zc();o(f.prototype,a.prototype),o(f,a);{const _=n(u.prototype);for(let w=0;w<_.length;w++){const E=_[w];f.prototype[E]||(f.prototype[E]=u.prototype[E])}}function f(_){if(!(this instanceof f))return new f(_);a.call(this,_),u.call(this,_),_?(this.allowHalfOpen=_.allowHalfOpen!==!1,_.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),_.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(_){this._readableState&&this._writableState&&(this._readableState.destroyed=_,this._writableState.destroyed=_)}}});let g;function h(){return g===void 0&&(g={}),g}f.fromWeb=function(_,w){return h().newStreamDuplexFromReadableWritablePair(_,w)},f.toWeb=function(_){return h().newReadableWritablePairFromDuplex(_)};let d;return f.from=function(_){return d||(d=GI()),d(_,"body")},Ll}const{ObjectSetPrototypeOf:Cp,Symbol:ZI}=Gt;var Pp=Kr;const{ERR_METHOD_NOT_IMPLEMENTED:KI}=Pn.codes,Kc=Zr(),{getHighWaterMark:JI}=Iu;Cp(Kr.prototype,Kc.prototype);Cp(Kr,Kc);const bs=ZI("kCallback");function Kr(e){if(!(this instanceof Kr))return new Kr(e);const t=e?JI(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),Kc.call(this,e),this._readableState.sync=!1,this[bs]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",XI)}function Rc(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function XI(){this._final!==Rc&&Rc.call(this)}Kr.prototype._final=Rc;Kr.prototype._transform=function(e,t,n){throw new KI("_transform()")};Kr.prototype._write=function(e,t,n){const o=this._readableState,a=this._writableState,u=o.length;this._transform(e,t,(f,g)=>{if(f){n(f);return}g!=null&&this.push(g),a.ended||u===o.length||o.length<o.highWaterMark?n():this[bs]=n})};Kr.prototype._read=function(){if(this[bs]){const e=this[bs];this[bs]=null,e()}};const{ObjectSetPrototypeOf:Np}=Gt;var Bp=So;const Jc=Pp;Np(So.prototype,Jc.prototype);Np(So,Jc);function So(e){if(!(this instanceof So))return new So(e);Jc.call(this,e)}So.prototype._transform=function(e,t,n){n(null,e)};const _s=Ui,{ArrayIsArray:YI,Promise:QI,SymbolAsyncIterator:eT,SymbolDispose:tT}=Gt,au=yi,{once:nT}=Rn,rT=Co,h0=Zr(),{aggregateTwoErrors:iT,codes:{ERR_INVALID_ARG_TYPE:Ac,ERR_INVALID_RETURN_VALUE:Cl,ERR_MISSING_ARGS:oT,ERR_STREAM_DESTROYED:sT,ERR_STREAM_PREMATURE_CLOSE:aT},AbortError:uT}=Pn,{validateFunction:fT,validateAbortSignal:lT}=Ts,{isIterable:Bi,isReadable:Pl,isReadableNodeStream:nu,isNodeStream:g0,isTransformStream:wo,isWebStream:cT,isReadableStream:Nl,isReadableFinished:dT}=Xr,hT=globalThis.AbortController||vs().AbortController;let Bl,$l,xl;function _0(e,t,n){let o=!1;e.on("close",()=>{o=!0});const a=au(e,{readable:t,writable:n},u=>{o=!u});return{destroy:u=>{o||(o=!0,rT.destroyer(e,u||new sT("pipe")))},cleanup:a}}function gT(e){return fT(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Dl(e){if(Bi(e))return e;if(nu(e))return _T(e);throw new Ac("val",["Readable","Iterable","AsyncIterable"],e)}async function*_T(e){$l||($l=Tu()),yield*$l.prototype[eT].call(e)}async function za(e,t,n,{end:o}){let a,u=null;const f=d=>{if(d&&(a=d),u){const _=u;u=null,_()}},g=()=>new QI((d,_)=>{a?_(a):u=()=>{a?_(a):d()}});t.on("drain",f);const h=au(t,{readable:!1},f);try{t.writableNeedDrain&&await g();for await(const d of e)t.write(d)||await g();o&&(t.end(),await g()),n()}catch(d){n(a!==d?iT(a,d):d)}finally{h(),t.off("drain",f)}}async function Ml(e,t,n,{end:o}){wo(t)&&(t=t.writable);const a=t.getWriter();try{for await(const u of e)await a.ready,a.write(u).catch(()=>{});await a.ready,o&&await a.close(),n()}catch(u){try{await a.abort(u),n(u)}catch(f){n(f)}}}function pT(...e){return $p(e,nT(gT(e)))}function $p(e,t,n){if(e.length===1&&YI(e[0])&&(e=e[0]),e.length<2)throw new oT("streams");const o=new hT,a=o.signal,u=n==null?void 0:n.signal,f=[];lT(u,"options.signal");function g(){N(new uT)}xl=xl||Rn.addAbortListener;let h;u&&(h=xl(u,g));let d,_;const w=[];let E=0;function y(j){N(j,--E===0)}function N(j,P){var C;if(j&&(!d||d.code==="ERR_STREAM_PREMATURE_CLOSE")&&(d=j),!(!d&&!P)){for(;w.length;)w.shift()(d);(C=h)===null||C===void 0||C[tT](),o.abort(),P&&(d||f.forEach(K=>K()),_s.nextTick(t,d,_))}}let k;for(let j=0;j<e.length;j++){const P=e[j],C=j<e.length-1,K=j>0,se=C||(n==null?void 0:n.end)!==!1,re=j===e.length-1;if(g0(P)){let ge=function(le){le&&le.name!=="AbortError"&&le.code!=="ERR_STREAM_PREMATURE_CLOSE"&&y(le)};if(se){const{destroy:le,cleanup:Ae}=_0(P,C,K);w.push(le),Pl(P)&&re&&f.push(Ae)}P.on("error",ge),Pl(P)&&re&&f.push(()=>{P.removeListener("error",ge)})}if(j===0)if(typeof P=="function"){if(k=P({signal:a}),!Bi(k))throw new Cl("Iterable, AsyncIterable or Stream","source",k)}else Bi(P)||nu(P)||wo(P)?k=P:k=h0.from(P);else if(typeof P=="function"){if(wo(k)){var U;k=Dl((U=k)===null||U===void 0?void 0:U.readable)}else k=Dl(k);if(k=P(k,{signal:a}),C){if(!Bi(k,!0))throw new Cl("AsyncIterable",`transform[${j-1}]`,k)}else{var V;Bl||(Bl=Bp);const ge=new Bl({objectMode:!0}),le=(V=k)===null||V===void 0?void 0:V.then;if(typeof le=="function")E++,le.call(k,p=>{_=p,p!=null&&ge.write(p),se&&ge.end(),_s.nextTick(y)},p=>{ge.destroy(p),_s.nextTick(y,p)});else if(Bi(k,!0))E++,za(k,ge,y,{end:se});else if(Nl(k)||wo(k)){const p=k.readable||k;E++,za(p,ge,y,{end:se})}else throw new Cl("AsyncIterable or Promise","destination",k);k=ge;const{destroy:Ae,cleanup:we}=_0(k,!1,!0);w.push(Ae),re&&f.push(we)}}else if(g0(P)){if(nu(k)){E+=2;const ge=bT(k,P,y,{end:se});Pl(P)&&re&&f.push(ge)}else if(wo(k)||Nl(k)){const ge=k.readable||k;E++,za(ge,P,y,{end:se})}else if(Bi(k))E++,za(k,P,y,{end:se});else throw new Ac("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);k=P}else if(cT(P)){if(nu(k))E++,Ml(Dl(k),P,y,{end:se});else if(Nl(k)||Bi(k))E++,Ml(k,P,y,{end:se});else if(wo(k))E++,Ml(k.readable,P,y,{end:se});else throw new Ac("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);k=P}else k=h0.from(P)}return(a!=null&&a.aborted||u!=null&&u.aborted)&&_s.nextTick(g),k}function bT(e,t,n,{end:o}){let a=!1;if(t.on("close",()=>{a||n(new aT)}),e.pipe(t,{end:!1}),o){let u=function(){a=!0,t.end()};dT(e)?_s.nextTick(u):e.once("end",u)}else n();return au(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",n).once("error",n):n(u)}),au(t,{readable:!1,writable:!0},n)}var Xc={pipelineImpl:$p,pipeline:pT};const{pipeline:wT}=Xc,qa=Zr(),{destroyer:yT}=Co,{isNodeStream:Va,isReadable:p0,isWritable:b0,isWebStream:kl,isTransformStream:Pi,isWritableStream:w0,isReadableStream:y0}=Xr,{AbortError:mT,codes:{ERR_INVALID_ARG_VALUE:m0,ERR_MISSING_ARGS:vT}}=Pn,ET=yi;var xp=function(...t){if(t.length===0)throw new vT("streams");if(t.length===1)return qa.from(t[0]);const n=[...t];if(typeof t[0]=="function"&&(t[0]=qa.from(t[0])),typeof t[t.length-1]=="function"){const y=t.length-1;t[y]=qa.from(t[y])}for(let y=0;y<t.length;++y)if(!(!Va(t[y])&&!kl(t[y]))){if(y<t.length-1&&!(p0(t[y])||y0(t[y])||Pi(t[y])))throw new m0(`streams[${y}]`,n[y],"must be readable");if(y>0&&!(b0(t[y])||w0(t[y])||Pi(t[y])))throw new m0(`streams[${y}]`,n[y],"must be writable")}let o,a,u,f,g;function h(y){const N=f;f=null,N?N(y):y?g.destroy(y):!E&&!w&&g.destroy()}const d=t[0],_=wT(t,h),w=!!(b0(d)||w0(d)||Pi(d)),E=!!(p0(_)||y0(_)||Pi(_));if(g=new qa({writableObjectMode:!!(d!=null&&d.writableObjectMode),readableObjectMode:!!(_!=null&&_.readableObjectMode),writable:w,readable:E}),w){if(Va(d))g._write=function(N,k,U){d.write(N,k)?U():o=U},g._final=function(N){d.end(),a=N},d.on("drain",function(){if(o){const N=o;o=null,N()}});else if(kl(d)){const k=(Pi(d)?d.writable:d).getWriter();g._write=async function(U,V,j){try{await k.ready,k.write(U).catch(()=>{}),j()}catch(P){j(P)}},g._final=async function(U){try{await k.ready,k.close().catch(()=>{}),a=U}catch(V){U(V)}}}const y=Pi(_)?_.readable:_;ET(y,()=>{if(a){const N=a;a=null,N()}})}if(E){if(Va(_))_.on("readable",function(){if(u){const y=u;u=null,y()}}),_.on("end",function(){g.push(null)}),g._read=function(){for(;;){const y=_.read();if(y===null){u=g._read;return}if(!g.push(y))return}};else if(kl(_)){const N=(Pi(_)?_.readable:_).getReader();g._read=async function(){for(;;)try{const{value:k,done:U}=await N.read();if(!g.push(k))return;if(U){g.push(null);return}}catch{return}}}}return g._destroy=function(y,N){!y&&f!==null&&(y=new mT),u=null,o=null,a=null,f===null?N(y):(f=N,Va(_)&&yT(_,y))},g};const ST=globalThis.AbortController||vs().AbortController,{codes:{ERR_INVALID_ARG_VALUE:RT,ERR_INVALID_ARG_TYPE:Os,ERR_MISSING_ARGS:AT,ERR_OUT_OF_RANGE:IT},AbortError:Cr}=Pn,{validateAbortSignal:ji,validateInteger:v0,validateObject:Wi}=Ts,TT=Gt.Symbol("kWeak"),OT=Gt.Symbol("kResistStopPropagation"),{finished:LT}=yi,CT=xp,{addAbortSignalNoValidate:PT}=Au,{isWritable:NT,isNodeStream:BT}=Xr,{deprecate:$T}=Rn,{ArrayPrototypePush:xT,Boolean:DT,MathFloor:E0,Number:MT,NumberIsNaN:kT,Promise:S0,PromiseReject:R0,PromiseResolve:FT,PromisePrototypeThen:A0,Symbol:Dp}=Gt,uu=Dp("kEmpty"),I0=Dp("kEof");function UT(e,t){if(t!=null&&Wi(t,"options"),(t==null?void 0:t.signal)!=null&&ji(t.signal,"options.signal"),BT(e)&&!NT(e))throw new RT("stream",e,"must be writable");const n=CT(this,e);return t!=null&&t.signal&&PT(t.signal,n),n}function Ou(e,t){if(typeof e!="function")throw new Os("fn",["Function","AsyncFunction"],e);t!=null&&Wi(t,"options"),(t==null?void 0:t.signal)!=null&&ji(t.signal,"options.signal");let n=1;(t==null?void 0:t.concurrency)!=null&&(n=E0(t.concurrency));let o=n-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=E0(t.highWaterMark)),v0(n,"options.concurrency",1),v0(o,"options.highWaterMark",0),o+=n,(async function*(){const u=Rn.AbortSignalAny([t==null?void 0:t.signal].filter(DT)),f=this,g=[],h={signal:u};let d,_,w=!1,E=0;function y(){w=!0,N()}function N(){E-=1,k()}function k(){_&&!w&&E<n&&g.length<o&&(_(),_=null)}async function U(){try{for await(let V of f){if(w)return;if(u.aborted)throw new Cr;try{if(V=e(V,h),V===uu)continue;V=FT(V)}catch(j){V=R0(j)}E+=1,A0(V,N,y),g.push(V),d&&(d(),d=null),!w&&(g.length>=o||E>=n)&&await new S0(j=>{_=j})}g.push(I0)}catch(V){const j=R0(V);A0(j,N,y),g.push(j)}finally{w=!0,d&&(d(),d=null)}}U();try{for(;;){for(;g.length>0;){const V=await g[0];if(V===I0)return;if(u.aborted)throw new Cr;V!==uu&&(yield V),g.shift(),k()}await new S0(V=>{d=V})}}finally{w=!0,_&&(_(),_=null)}}).call(this)}function HT(e=void 0){return e!=null&&Wi(e,"options"),(e==null?void 0:e.signal)!=null&&ji(e.signal,"options.signal"),(async function*(){let n=0;for await(const a of this){var o;if(e!=null&&(o=e.signal)!==null&&o!==void 0&&o.aborted)throw new Cr({cause:e.signal.reason});yield[n++,a]}}).call(this)}async function Mp(e,t=void 0){for await(const n of Yc.call(this,e,t))return!0;return!1}async function jT(e,t=void 0){if(typeof e!="function")throw new Os("fn",["Function","AsyncFunction"],e);return!await Mp.call(this,async(...n)=>!await e(...n),t)}async function WT(e,t){for await(const n of Yc.call(this,e,t))return n}async function zT(e,t){if(typeof e!="function")throw new Os("fn",["Function","AsyncFunction"],e);async function n(o,a){return await e(o,a),uu}for await(const o of Ou.call(this,n,t));}function Yc(e,t){if(typeof e!="function")throw new Os("fn",["Function","AsyncFunction"],e);async function n(o,a){return await e(o,a)?o:uu}return Ou.call(this,n,t)}class qT extends AT{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function VT(e,t,n){var o;if(typeof e!="function")throw new Os("reducer",["Function","AsyncFunction"],e);n!=null&&Wi(n,"options"),(n==null?void 0:n.signal)!=null&&ji(n.signal,"options.signal");let a=arguments.length>1;if(n!=null&&(o=n.signal)!==null&&o!==void 0&&o.aborted){const d=new Cr(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await LT(this.destroy(d)),d}const u=new ST,f=u.signal;if(n!=null&&n.signal){const d={once:!0,[TT]:this,[OT]:!0};n.signal.addEventListener("abort",()=>u.abort(),d)}let g=!1;try{for await(const d of this){var h;if(g=!0,n!=null&&(h=n.signal)!==null&&h!==void 0&&h.aborted)throw new Cr;a?t=await e(t,d,{signal:f}):(t=d,a=!0)}if(!g&&!a)throw new qT}finally{u.abort()}return t}async function GT(e){e!=null&&Wi(e,"options"),(e==null?void 0:e.signal)!=null&&ji(e.signal,"options.signal");const t=[];for await(const o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new Cr(void 0,{cause:e.signal.reason});xT(t,o)}return t}function ZT(e,t){const n=Ou.call(this,e,t);return(async function*(){for await(const a of n)yield*a}).call(this)}function kp(e){if(e=MT(e),kT(e))return 0;if(e<0)throw new IT("number",">= 0",e);return e}function KT(e,t=void 0){return t!=null&&Wi(t,"options"),(t==null?void 0:t.signal)!=null&&ji(t.signal,"options.signal"),e=kp(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Cr;for await(const u of this){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new Cr;e--<=0&&(yield u)}}).call(this)}function JT(e,t=void 0){return t!=null&&Wi(t,"options"),(t==null?void 0:t.signal)!=null&&ji(t.signal,"options.signal"),e=kp(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Cr;for await(const u of this){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new Cr;if(e-- >0&&(yield u),e<=0)return}}).call(this)}jc.streamReturningOperators={asIndexedPairs:$T(HT,"readable.asIndexedPairs will be removed in a future version."),drop:KT,filter:Yc,flatMap:ZT,map:Ou,take:JT,compose:UT};jc.promiseReturningOperators={every:jT,forEach:zT,reduce:VT,toArray:GT,some:Mp,find:WT};var Fl,T0;function Fp(){if(T0)return Fl;T0=1;const{ArrayPrototypePop:e,Promise:t}=Gt,{isIterable:n,isNodeStream:o,isWebStream:a}=Xr,{pipelineImpl:u}=Xc,{finished:f}=yi;Up();function g(...h){return new t((d,_)=>{let w,E;const y=h[h.length-1];if(y&&typeof y=="object"&&!o(y)&&!n(y)&&!a(y)){const N=e(h);w=N.signal,E=N.end}u(h,(N,k)=>{N?_(N):d(k)},{signal:w,end:E})})}return Fl={finished:f,pipeline:g},Fl}var O0;function Up(){if(O0)return El.exports;O0=1;const{Buffer:e}=Lr,{ObjectDefineProperty:t,ObjectKeys:n,ReflectApply:o}=Gt,{promisify:{custom:a}}=Rn,{streamReturningOperators:u,promiseReturningOperators:f}=jc,{codes:{ERR_ILLEGAL_CONSTRUCTOR:g}}=Pn,h=xp,{setDefaultHighWaterMark:d,getDefaultHighWaterMark:_}=Iu,{pipeline:w}=Xc,{destroyer:E}=Co,y=yi,N=Fp(),k=Xr,U=El.exports=Gc.Stream;U.isDestroyed=k.isDestroyed,U.isDisturbed=k.isDisturbed,U.isErrored=k.isErrored,U.isReadable=k.isReadable,U.isWritable=k.isWritable,U.Readable=Tu();for(const j of n(u)){let C=function(...K){if(new.target)throw g();return U.Readable.from(o(P,this,K))};const P=u[j];t(C,"name",{__proto__:null,value:P.name}),t(C,"length",{__proto__:null,value:P.length}),t(U.Readable.prototype,j,{__proto__:null,value:C,enumerable:!1,configurable:!0,writable:!0})}for(const j of n(f)){let C=function(...K){if(new.target)throw g();return o(P,this,K)};const P=f[j];t(C,"name",{__proto__:null,value:P.name}),t(C,"length",{__proto__:null,value:P.length}),t(U.Readable.prototype,j,{__proto__:null,value:C,enumerable:!1,configurable:!0,writable:!0})}U.Writable=Zc(),U.Duplex=Zr(),U.Transform=Pp,U.PassThrough=Bp,U.pipeline=w;const{addAbortSignal:V}=Au;return U.addAbortSignal=V,U.finished=y,U.destroy=E,U.compose=h,U.setDefaultHighWaterMark=d,U.getDefaultHighWaterMark=_,t(U,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return N}}),t(w,a,{__proto__:null,enumerable:!0,get(){return N.pipeline}}),t(y,a,{__proto__:null,enumerable:!0,get(){return N.finished}}),U.Stream=U,U._isUint8Array=function(P){return P instanceof Uint8Array},U._uint8ArrayToBuffer=function(P){return e.from(P.buffer,P.byteOffset,P.byteLength)},El.exports}(function(e){const t=Up(),n=Fp(),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 n}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(WR);var XT={},ki={},Qc={},un={};class Hp extends TypeError{constructor(t,n){let o;const{message:a,explanation:u,...f}=t,{path:g}=t,h=g.length===0?a:`At path: ${g.join(".")} -- ${a}`;super(u??h),u!=null&&(this.cause=h),Object.assign(this,f),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...n()])}}function YT(e){return nr(e)&&typeof e[Symbol.iterator]=="function"}function nr(e){return typeof e=="object"&&e!=null}function L0(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function rn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function QT(e){const{done:t,value:n}=e.next();return t?void 0:n}function e2(e,t,n,o){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:a,branch:u}=t,{type:f}=n,{refinement:g,message:h=`Expected a value of type \`${f}\`${g?` with refinement \`${g}\``:""}, but received: \`${rn(o)}\``}=e;return{value:o,type:f,refinement:g,key:a[a.length-1],path:a,branch:u,...e,message:h}}function*Ic(e,t,n,o){YT(e)||(e=[e]);for(const a of e){const u=e2(a,t,n,o);u&&(yield u)}}function*ed(e,t,n={}){const{path:o=[],branch:a=[e],coerce:u=!1,mask:f=!1}=n,g={path:o,branch:a};if(u&&(e=t.coercer(e,g),f&&t.type!=="type"&&nr(t.schema)&&nr(e)&&!Array.isArray(e)))for(const d in e)t.schema[d]===void 0&&delete e[d];let h="valid";for(const d of t.validator(e,g))d.explanation=n.message,h="not_valid",yield[d,void 0];for(let[d,_,w]of t.entries(e,g)){const E=ed(_,w,{path:d===void 0?o:[...o,d],branch:d===void 0?a:[...a,_],coerce:u,mask:f,message:n.message});for(const y of E)y[0]?(h=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):u&&(_=y[1],d===void 0?e=_:e instanceof Map?e.set(d,_):e instanceof Set?e.add(_):nr(e)&&(_!==void 0||d in e)&&(e[d]=_))}if(h!=="not_valid")for(const d of t.refiner(e,g))d.explanation=n.message,h="not_refined",yield[d,void 0];h==="valid"&&(yield[void 0,e])}class Xt{constructor(t){const{type:n,schema:o,validator:a,refiner:u,coercer:f=h=>h,entries:g=function*(){}}=t;this.type=n,this.schema=o,this.entries=g,this.coercer=f,a?this.validator=(h,d)=>{const _=a(h,d);return Ic(_,d,this,h)}:this.validator=()=>[],u?this.refiner=(h,d)=>{const _=u(h,d);return Ic(_,d,this,h)}:this.refiner=()=>[]}assert(t,n){return jp(t,this,n)}create(t,n){return Wp(t,this,n)}is(t){return td(t,this)}mask(t,n){return zp(t,this,n)}validate(t,n={}){return Po(t,this,n)}}function jp(e,t,n){const o=Po(e,t,{message:n});if(o[0])throw o[0]}function Wp(e,t,n){const o=Po(e,t,{coerce:!0,message:n});if(o[0])throw o[0];return o[1]}function zp(e,t,n){const o=Po(e,t,{coerce:!0,mask:!0,message:n});if(o[0])throw o[0];return o[1]}function td(e,t){return!Po(e,t)[0]}function Po(e,t,n={}){const o=ed(e,t,n),a=QT(o);return a[0]?[new Hp(a[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,a[1]]}function t2(...e){const t=e[0].type==="type",n=e.map(a=>a.schema),o=Object.assign({},...n);return t?Cs(o):Ls(o)}function Nn(e,t){return new Xt({type:e,schema:null,validator:t})}function n2(e,t){return new Xt({...e,refiner:(n,o)=>n===void 0||e.refiner(n,o),validator(n,o){return n===void 0?!0:(t(n,o),e.validator(n,o))}})}function r2(e){return new Xt({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function i2(e){let t;return new Xt({type:"lazy",schema:null,*entries(n,o){t??(t=e()),yield*t.entries(n,o)},validator(n,o){return t??(t=e()),t.validator(n,o)},coercer(n,o){return t??(t=e()),t.coercer(n,o)},refiner(n,o){return t??(t=e()),t.refiner(n,o)}})}function o2(e,t){const{schema:n}=e,o={...n};for(const a of t)delete o[a];switch(e.type){case"type":return Cs(o);default:return Ls(o)}}function s2(e){const t=e instanceof Xt,n=t?{...e.schema}:{...e};for(const o in n)n[o]=qp(n[o]);return t&&e.type==="type"?Cs(n):Ls(n)}function a2(e,t){const{schema:n}=e,o={};for(const a of t)o[a]=n[a];switch(e.type){case"type":return Cs(o);default:return Ls(o)}}function u2(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Nn(e,t)}function f2(){return Nn("any",()=>!0)}function l2(e){return new Xt({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,o]of t.entries())yield[n,o,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${rn(t)}`}})}function c2(){return Nn("bigint",e=>typeof e=="bigint")}function d2(){return Nn("boolean",e=>typeof e=="boolean")}function h2(){return Nn("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${rn(e)}`)}function g2(e){const t={},n=e.map(o=>rn(o)).join();for(const o of e)t[o]=o;return new Xt({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${n}\`, but received: ${rn(o)}`}})}function _2(){return Nn("func",e=>typeof e=="function"||`Expected a function, but received: ${rn(e)}`)}function p2(e){return Nn("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${rn(t)}`)}function b2(){return Nn("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${rn(e)}`)}function w2(e){return new Xt({type:"intersection",schema:null,*entries(t,n){for(const o of e)yield*o.entries(t,n)},*validator(t,n){for(const o of e)yield*o.validator(t,n)},*refiner(t,n){for(const o of e)yield*o.refiner(t,n)}})}function y2(e){const t=rn(e),n=typeof e;return new Xt({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${rn(o)}`}})}function m2(e,t){return new Xt({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[o,a]of n.entries())yield[o,o,e],yield[o,a,t]},coercer(n){return n instanceof Map?new Map(n):n},validator(n){return n instanceof Map||`Expected a \`Map\` object, but received: ${rn(n)}`}})}function nd(){return Nn("never",()=>!1)}function v2(e){return new Xt({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function E2(){return Nn("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${rn(e)}`)}function Ls(e){const t=e?Object.keys(e):[],n=nd();return new Xt({type:"object",schema:e||null,*entries(o){if(e&&nr(o)){const a=new Set(Object.keys(o));for(const u of t)a.delete(u),yield[u,o[u],e[u]];for(const u of a)yield[u,o[u],n]}},validator(o){return nr(o)||`Expected an object, but received: ${rn(o)}`},coercer(o){return nr(o)?{...o}:o}})}function qp(e){return new Xt({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function S2(e,t){return new Xt({type:"record",schema:null,*entries(n){if(nr(n))for(const o in n){const a=n[o];yield[o,o,e],yield[o,a,t]}},validator(n){return nr(n)||`Expected an object, but received: ${rn(n)}`}})}function R2(){return Nn("regexp",e=>e instanceof RegExp)}function A2(e){return new Xt({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${rn(t)}`}})}function Vp(){return Nn("string",e=>typeof e=="string"||`Expected a string, but received: ${rn(e)}`)}function I2(e){const t=nd();return new Xt({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const o=Math.max(e.length,n.length);for(let a=0;a<o;a++)yield[a,n[a],e[a]||t]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${rn(n)}`}})}function Cs(e){const t=Object.keys(e);return new Xt({type:"type",schema:e,*entries(n){if(nr(n))for(const o of t)yield[o,n[o],e[o]]},validator(n){return nr(n)||`Expected an object, but received: ${rn(n)}`},coercer(n){return nr(n)?{...n}:n}})}function T2(e){const t=e.map(n=>n.type).join(" | ");return new Xt({type:"union",schema:null,coercer(n){for(const o of e){const[a,u]=o.validate(n,{coerce:!0});if(!a)return u}return n},validator(n,o){const a=[];for(const u of e){const[...f]=ed(n,u,o),[g]=f;if(g[0])for(const[h]of f)h&&a.push(h);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${rn(n)}`,...a]}})}function Gp(){return Nn("unknown",()=>!0)}function rd(e,t,n){return new Xt({...e,coercer:(o,a)=>td(o,t)?e.coercer(n(o,a),a):e.coercer(o,a)})}function O2(e,t,n={}){return rd(e,Gp(),o=>{const a=typeof t=="function"?t():t;if(o===void 0)return a;if(!n.strict&&L0(o)&&L0(a)){const u={...o};let f=!1;for(const g in a)u[g]===void 0&&(u[g]=a[g],f=!0);if(f)return u}return o})}function L2(e){return rd(e,Vp(),t=>t.trim())}function C2(e){return zi(e,"empty",t=>{const n=Zp(t);return n===0||`Expected an empty ${e.type} but received one with a size of \`${n}\``})}function Zp(e){return e instanceof Map||e instanceof Set?e.size:e.length}function P2(e,t,n={}){const{exclusive:o}=n;return zi(e,"max",a=>o?a<t:a<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${a}\``)}function N2(e,t,n={}){const{exclusive:o}=n;return zi(e,"min",a=>o?a>t:a>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${a}\``)}function B2(e){return zi(e,"nonempty",t=>Zp(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function $2(e,t){return zi(e,"pattern",n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`)}function x2(e,t,n=t){const o=`Expected a ${e.type}`,a=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return zi(e,"size",u=>{if(typeof u=="number"||u instanceof Date)return t<=u&&u<=n||`${o} ${a} but received \`${u}\``;if(u instanceof Map||u instanceof Set){const{size:f}=u;return t<=f&&f<=n||`${o} with a size ${a} but received one with a size of \`${f}\``}else{const{length:f}=u;return t<=f&&f<=n||`${o} with a length ${a} but received one with a length of \`${f}\``}})}function zi(e,t,n){return new Xt({...e,*refiner(o,a){yield*e.refiner(o,a);const u=n(o,a),f=Ic(u,a,e,o);for(const g of f)yield{...g,refinement:t}}})}const D2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Xt,StructError:Hp,any:f2,array:l2,assert:jp,assign:t2,bigint:c2,boolean:d2,coerce:rd,create:Wp,date:h2,defaulted:O2,define:Nn,deprecated:n2,dynamic:r2,empty:C2,enums:g2,func:_2,instance:p2,integer:b2,intersection:w2,is:td,lazy:i2,literal:y2,map:m2,mask:zp,max:P2,min:N2,never:nd,nonempty:B2,nullable:v2,number:E2,object:Ls,omit:o2,optional:qp,partial:s2,pattern:$2,pick:a2,record:S2,refine:zi,regexp:R2,set:A2,size:x2,string:Vp,struct:u2,trimmed:L2,tuple:I2,type:Cs,union:T2,unknown:Gp,validate:Po},Symbol.toStringTag,{value:"Module"})),qi=ER(D2);Object.defineProperty(un,"__esModule",{value:!0});un.assertExhaustive=un.assertStruct=un.assert=un.AssertionError=void 0;const M2=qi;function k2(e){return typeof e=="object"&&e!==null&&"message"in e}function F2(e){var t,n;return typeof((n=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||n===void 0?void 0:n.name)=="string"}function U2(e){const t=k2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Kp(e,t){return F2(e)?new e({message:t}):e({message:t})}class id extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}un.AssertionError=id;function H2(e,t="Assertion failed.",n=id){if(!e)throw t instanceof Error?t:Kp(n,t)}un.assert=H2;function j2(e,t,n="Assertion failed",o=id){try{(0,M2.assert)(e,t)}catch(a){throw Kp(o,`${n}: ${U2(a)}.`)}}un.assertStruct=j2;function W2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}un.assertExhaustive=W2;var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.base64=void 0;const z2=qi,q2=un,V2=(e,t={})=>{var n,o;const a=(n=t.paddingRequired)!==null&&n!==void 0?n:!1,u=(o=t.characterSet)!==null&&o!==void 0?o:"base64";let f;u==="base64"?f=String.raw`[A-Za-z0-9+\/]`:((0,q2.assert)(u==="base64url"),f=String.raw`[-_A-Za-z0-9]`);let g;return a?g=new RegExp(`^(?:${f}{4})*(?:${f}{3}=|${f}{2}==)?$`,"u"):g=new RegExp(`^(?:${f}{4})*(?:${f}{2,3}|${f}{3}=|${f}{2}==)?$`,"u"),(0,z2.pattern)(e,g)};Ps.base64=V2;var _t={},Ns={};(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,n=un;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(d){return(0,t.is)(d,e.HexStruct)}e.isHexString=o;function a(d){return(0,t.is)(d,e.StrictHexStruct)}e.isStrictHexString=a;function u(d){(0,n.assert)(o(d),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function f(d){(0,n.assert)(a(d),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=f;function g(d){return d.startsWith("0x")?d:d.startsWith("0X")?`0x${d.substring(2)}`:`0x${d}`}e.add0x=g;function h(d){return d.startsWith("0x")||d.startsWith("0X")?d.substring(2):d}e.remove0x=h})(Ns);Object.defineProperty(_t,"__esModule",{value:!0});_t.createDataView=_t.concatBytes=_t.valueToBytes=_t.stringToBytes=_t.numberToBytes=_t.signedBigIntToBytes=_t.bigIntToBytes=_t.hexToBytes=_t.bytesToString=_t.bytesToNumber=_t.bytesToSignedBigInt=_t.bytesToBigInt=_t.bytesToHex=_t.assertIsBytes=_t.isBytes=void 0;const jn=un,Tc=Ns,C0=48,P0=58,N0=87;function G2(){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 Z2=G2();function od(e){return e instanceof Uint8Array}_t.isBytes=od;function No(e){(0,jn.assert)(od(e),"Value must be a Uint8Array.")}_t.assertIsBytes=No;function Jp(e){if(No(e),e.length===0)return"0x";const t=Z2(),n=new Array(e.length);for(let o=0;o<e.length;o++)n[o]=t[e[o]];return(0,Tc.add0x)(n.join(""))}_t.bytesToHex=Jp;function Xp(e){No(e);const t=Jp(e);return BigInt(t)}_t.bytesToBigInt=Xp;function K2(e){No(e);let t=BigInt(0);for(const n of e)t=(t<<BigInt(8))+BigInt(n);return BigInt.asIntN(e.length*8,t)}_t.bytesToSignedBigInt=K2;function J2(e){No(e);const t=Xp(e);return(0,jn.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}_t.bytesToNumber=J2;function X2(e){return No(e),new TextDecoder().decode(e)}_t.bytesToString=X2;function Lu(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,Tc.assertIsHexString)(e);const n=(0,Tc.remove0x)(e).toLowerCase(),o=n.length%2===0?n:`0${n}`,a=new Uint8Array(o.length/2);for(let u=0;u<a.length;u++){const f=o.charCodeAt(u*2),g=o.charCodeAt(u*2+1),h=f-(f<P0?C0:N0),d=g-(g<P0?C0:N0);a[u]=h*16+d}return a}_t.hexToBytes=Lu;function Yp(e){(0,jn.assert)(typeof e=="bigint","Value must be a bigint."),(0,jn.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return Lu(t)}_t.bigIntToBytes=Yp;function Y2(e,t){(0,jn.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(t*8+-1))}function Q2(e,t){(0,jn.assert)(typeof e=="bigint","Value must be a bigint."),(0,jn.assert)(typeof t=="number","Byte length must be a number."),(0,jn.assert)(t>0,"Byte length must be greater than 0."),(0,jn.assert)(Y2(e,t),"Byte length is too small to represent the given value.");let n=e;const o=new Uint8Array(t);for(let a=0;a<o.length;a++)o[a]=Number(BigInt.asUintN(8,n)),n>>=BigInt(8);return o.reverse()}_t.signedBigIntToBytes=Q2;function Qp(e){(0,jn.assert)(typeof e=="number","Value must be a number."),(0,jn.assert)(e>=0,"Value must be a non-negative number."),(0,jn.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return Lu(t)}_t.numberToBytes=Qp;function eb(e){return(0,jn.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}_t.stringToBytes=eb;function tb(e){if(typeof e=="bigint")return Yp(e);if(typeof e=="number")return Qp(e);if(typeof e=="string")return e.startsWith("0x")?Lu(e):eb(e);if(od(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}_t.valueToBytes=tb;function eO(e){const t=new Array(e.length);let n=0;for(let a=0;a<e.length;a++){const u=tb(e[a]);t[a]=u,n+=u.length}const o=new Uint8Array(n);for(let a=0,u=0;a<t.length;a++)o.set(t[a],u),u+=t[a].length;return o}_t.concatBytes=eO;function tO(e){if(typeof De.Buffer<"u"&&e instanceof De.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)}_t.createDataView=tO;var Cu={};Object.defineProperty(Cu,"__esModule",{value:!0});Cu.ChecksumStruct=void 0;const B0=qi,nO=Ps;Cu.ChecksumStruct=(0,B0.size)((0,nO.base64)((0,B0.string)(),{paddingRequired:!0}),44,44);var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.createHex=Sr.createBytes=Sr.createBigInt=Sr.createNumber=void 0;const Wt=qi,rO=un,nb=_t,Pu=Ns,rb=(0,Wt.union)([(0,Wt.number)(),(0,Wt.bigint)(),(0,Wt.string)(),Pu.StrictHexStruct]),iO=(0,Wt.coerce)((0,Wt.number)(),rb,Number),oO=(0,Wt.coerce)((0,Wt.bigint)(),rb,BigInt);(0,Wt.union)([Pu.StrictHexStruct,(0,Wt.instance)(Uint8Array)]);const sO=(0,Wt.coerce)((0,Wt.instance)(Uint8Array),(0,Wt.union)([Pu.StrictHexStruct]),nb.hexToBytes),aO=(0,Wt.coerce)(Pu.StrictHexStruct,(0,Wt.instance)(Uint8Array),nb.bytesToHex);function uO(e){try{const t=(0,Wt.create)(e,iO);return(0,rO.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof Wt.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}Sr.createNumber=uO;function fO(e){try{return(0,Wt.create)(e,oO)}catch(t){throw t instanceof Wt.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}Sr.createBigInt=fO;function lO(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,Wt.create)(e,sO)}catch(t){throw t instanceof Wt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sr.createBytes=lO;function cO(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,Wt.create)(e,aO)}catch(t){throw t instanceof Wt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sr.createHex=cO;var Ro={},ib=At&&At.__classPrivateFieldSet||function(e,t,n,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n},Sn=At&&At.__classPrivateFieldGet||function(e,t,n,o){if(n==="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 n==="m"?o:n==="a"?o.call(e):o?o.value:t.get(e)},lr,mr;Object.defineProperty(Ro,"__esModule",{value:!0});Ro.FrozenSet=Ro.FrozenMap=void 0;class sd{constructor(t){lr.set(this,void 0),ib(this,lr,new Map(t),"f"),Object.freeze(this)}get size(){return Sn(this,lr,"f").size}[(lr=new WeakMap,Symbol.iterator)](){return Sn(this,lr,"f")[Symbol.iterator]()}entries(){return Sn(this,lr,"f").entries()}forEach(t,n){return Sn(this,lr,"f").forEach((o,a,u)=>t.call(n,o,a,this))}get(t){return Sn(this,lr,"f").get(t)}has(t){return Sn(this,lr,"f").has(t)}keys(){return Sn(this,lr,"f").keys()}values(){return Sn(this,lr,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,n])=>`${String(t)} => ${String(n)}`).join(", ")} `:""}}`}}Ro.FrozenMap=sd;class ad{constructor(t){mr.set(this,void 0),ib(this,mr,new Set(t),"f"),Object.freeze(this)}get size(){return Sn(this,mr,"f").size}[(mr=new WeakMap,Symbol.iterator)](){return Sn(this,mr,"f")[Symbol.iterator]()}entries(){return Sn(this,mr,"f").entries()}forEach(t,n){return Sn(this,mr,"f").forEach((o,a,u)=>t.call(n,o,a,this))}has(t){return Sn(this,mr,"f").has(t)}keys(){return Sn(this,mr,"f").keys()}values(){return Sn(this,mr,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}Ro.FrozenSet=ad;Object.freeze(sd);Object.freeze(sd.prototype);Object.freeze(ad);Object.freeze(ad.prototype);var ob={};Object.defineProperty(ob,"__esModule",{value:!0});var sb={};(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,n=un,o=()=>(0,t.define)("finite number",K=>(0,t.is)(K,(0,t.number)())&&Number.isFinite(K));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",(K,se)=>{function re(ge,le){const we=[...le.validator(ge,se)];return we.length>0?we:!0}try{const ge=re(K,e.UnsafeJsonStruct);return ge!==!0?ge:re(JSON.parse(JSON.stringify(K)),e.UnsafeJsonStruct)}catch(ge){return ge instanceof RangeError?"Circular reference detected":!1}});function a(K){return(0,t.is)(K,e.JsonStruct)}e.isValidJson=a;function u(K){(0,n.assertStruct)(K,e.JsonStruct,"Invalid JSON value");const se=JSON.stringify(K);return new TextEncoder().encode(se).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(K){return(0,t.is)(K,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=f;function g(K,se){(0,n.assertStruct)(K,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",se)}e.assertIsJsonRpcNotification=g;function h(K){return(0,t.is)(K,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function d(K,se){(0,n.assertStruct)(K,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",se)}e.assertIsJsonRpcRequest=d,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 _(K){return(0,t.is)(K,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=_;function w(K,se){(0,n.assertStruct)(K,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",se)}e.assertIsPendingJsonRpcResponse=w;function E(K){return(0,t.is)(K,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=E;function y(K,se){(0,n.assertStruct)(K,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",se)}e.assertIsJsonRpcResponse=y;function N(K){return(0,t.is)(K,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=N;function k(K,se){(0,n.assertStruct)(K,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",se)}e.assertIsJsonRpcSuccess=k;function U(K){return(0,t.is)(K,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=U;function V(K,se){(0,n.assertStruct)(K,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",se)}e.assertIsJsonRpcFailure=V;function j(K){return(0,t.is)(K,e.JsonRpcErrorStruct)}e.isJsonRpcError=j;function P(K,se){(0,n.assertStruct)(K,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",se)}e.assertIsJsonRpcError=P;function C(K){const{permitEmptyString:se,permitFractions:re,permitNull:ge}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},K);return Ae=>!!(typeof Ae=="number"&&(re||Number.isInteger(Ae))||typeof Ae=="string"&&(se||Ae.length>0)||ge&&Ae===null)}e.getJsonRpcIdValidator=C})(sb);var ab={};Object.defineProperty(ab,"__esModule",{value:!0});var Ao={},dO=At&&At.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.createModuleLogger=Ao.createProjectLogger=void 0;const hO=dO(DR),gO=(0,hO.default)("metamask");function _O(e){return gO.extend(e)}Ao.createProjectLogger=_O;function pO(e,t){return e.extend(t)}Ao.createModuleLogger=pO;var ub={};(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(d){return Array.isArray(d)&&d.length>0}e.isNonEmptyArray=t;function n(d){return d==null}e.isNullOrUndefined=n;function o(d){return!!d&&typeof d=="object"&&!Array.isArray(d)}e.isObject=o;const a=(d,_)=>Object.hasOwnProperty.call(d,_);e.hasProperty=a,function(d){d[d.Null=4]="Null",d[d.Comma=1]="Comma",d[d.Wrapper=1]="Wrapper",d[d.True=4]="True",d[d.False=5]="False",d[d.Quote=1]="Quote",d[d.Colon=1]="Colon",d[d.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(d){if(typeof d!="object"||d===null)return!1;try{let _=d;for(;Object.getPrototypeOf(_)!==null;)_=Object.getPrototypeOf(_);return Object.getPrototypeOf(d)===_}catch{return!1}}e.isPlainObject=u;function f(d){return d.charCodeAt(0)<=127}e.isASCII=f;function g(d){var _;return d.split("").reduce((E,y)=>f(y)?E+1:E+2,0)+((_=d.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&_!==void 0?_:[]).length}e.calculateStringSize=g;function h(d){return d.toString().length}e.calculateNumberSize=h})(ub);var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.hexToBigInt=Rr.hexToNumber=Rr.bigIntToHex=Rr.numberToHex=void 0;const vo=un,Es=Ns,bO=e=>((0,vo.assert)(typeof e=="number","Value must be a number."),(0,vo.assert)(e>=0,"Value must be a non-negative number."),(0,vo.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Es.add0x)(e.toString(16)));Rr.numberToHex=bO;const wO=e=>((0,vo.assert)(typeof e=="bigint","Value must be a bigint."),(0,vo.assert)(e>=0,"Value must be a non-negative bigint."),(0,Es.add0x)(e.toString(16)));Rr.bigIntToHex=wO;const yO=e=>{(0,Es.assertIsHexString)(e);const t=parseInt(e,16);return(0,vo.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Rr.hexToNumber=yO;const mO=e=>((0,Es.assertIsHexString)(e),BigInt((0,Es.add0x)(e)));Rr.hexToBigInt=mO;var fb={};Object.defineProperty(fb,"__esModule",{value:!0});var lb={};(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,n=(u,f)=>{if(!t(u))throw new Error(`"${f}" must be a non-negative integer. Received: "${u}".`)};function o(u,f){return n(u,"count"),u*f}e.inMilliseconds=o;function a(u){return n(u,"timestamp"),Date.now()-u}e.timeSince=a})(lb);var cb={};Object.defineProperty(cb,"__esModule",{value:!0});var db={},Oc={exports:{}};const vO="2.0.0",hb=256,EO=Number.MAX_SAFE_INTEGER||9007199254740991,SO=16,RO=hb-6,AO=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Nu={MAX_LENGTH:hb,MAX_SAFE_COMPONENT_LENGTH:SO,MAX_SAFE_BUILD_LENGTH:RO,MAX_SAFE_INTEGER:EO,RELEASE_TYPES:AO,SEMVER_SPEC_VERSION:vO,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ul={};const IO=typeof De.process=="object"&&Ul&&Ul.NODE_DEBUG&&/\bsemver\b/i.test(Ul.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Bu=IO;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=Nu,u=Bu;t=e.exports={};const f=t.re=[],g=t.safeRe=[],h=t.src=[],d=t.t={};let _=0;const w="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",a],[w,o]],y=k=>{for(const[U,V]of E)k=k.split(`${U}*`).join(`${U}{0,${V}}`).split(`${U}+`).join(`${U}{1,${V}}`);return k},N=(k,U,V)=>{const j=y(U),P=_++;u(k,P,U),d[k]=P,h[P]=U,f[P]=new RegExp(U,V?"g":void 0),g[P]=new RegExp(j,V?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${w}*`),N("MAINVERSION",`(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${h[d.NUMERICIDENTIFIER]}|${h[d.NONNUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${h[d.NUMERICIDENTIFIERLOOSE]}|${h[d.NONNUMERICIDENTIFIER]})`),N("PRERELEASE",`(?:-(${h[d.PRERELEASEIDENTIFIER]}(?:\\.${h[d.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${h[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[d.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${w}+`),N("BUILD",`(?:\\+(${h[d.BUILDIDENTIFIER]}(?:\\.${h[d.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${h[d.MAINVERSION]}${h[d.PRERELEASE]}?${h[d.BUILD]}?`),N("FULL",`^${h[d.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${h[d.MAINVERSIONLOOSE]}${h[d.PRERELEASELOOSE]}?${h[d.BUILD]}?`),N("LOOSE",`^${h[d.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${h[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${h[d.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:${h[d.PRERELEASE]})?${h[d.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:${h[d.PRERELEASELOOSE]})?${h[d.BUILD]}?)?)?`),N("XRANGE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),N("COERCE",`${h[d.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",h[d.COERCEPLAIN]+`(?:${h[d.PRERELEASE]})?(?:${h[d.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",h[d.COERCE],!0),N("COERCERTLFULL",h[d.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${h[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",N("TILDE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${h[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",N("CARET",`^${h[d.LONECARET]}${h[d.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${h[d.LONECARET]}${h[d.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${h[d.GTLT]}\\s*(${h[d.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]}|${h[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${h[d.XRANGEPLAIN]})\\s+-\\s+(${h[d.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${h[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[d.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Oc,Oc.exports);var Bs=Oc.exports;const TO=Object.freeze({loose:!0}),OO=Object.freeze({}),LO=e=>e?typeof e!="object"?TO:e:OO;var ud=LO;const $0=/^[0-9]+$/,gb=(e,t)=>{const n=$0.test(e),o=$0.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:e<t?-1:1},CO=(e,t)=>gb(t,e);var _b={compareIdentifiers:gb,rcompareIdentifiers:CO};const Ga=Bu,{MAX_LENGTH:x0,MAX_SAFE_INTEGER:Za}=Nu,{safeRe:D0,t:M0}=Bs,PO=ud,{compareIdentifiers:_o}=_b;let NO=class vr{constructor(t,n){if(n=PO(n),t instanceof vr){if(t.loose===!!n.loose&&t.includePrerelease===!!n.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>x0)throw new TypeError(`version is longer than ${x0} characters`);Ga("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=t.trim().match(n.loose?D0[M0.LOOSE]:D0[M0.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>Za||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Za||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Za||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const u=+a;if(u>=0&&u<Za)return u}return a}):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(Ga("SemVer.compare",this.version,this.options,t),!(t instanceof vr)){if(typeof t=="string"&&t===this.version)return 0;t=new vr(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof vr||(t=new vr(t,this.options)),_o(this.major,t.major)||_o(this.minor,t.minor)||_o(this.patch,t.patch)}comparePre(t){if(t instanceof vr||(t=new vr(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 n=0;do{const o=this.prerelease[n],a=t.prerelease[n];if(Ga("prerelease compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return _o(o,a)}while(++n)}compareBuild(t){t instanceof vr||(t=new vr(t,this.options));let n=0;do{const o=this.build[n],a=t.build[n];if(Ga("build compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return _o(o,a)}while(++n)}inc(t,n,o){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,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 a=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let u=[n,a];o===!1&&(u=[n]),_o(this.prerelease[0],n)===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 An=NO;const k0=An,BO=(e,t,n=!1)=>{if(e instanceof k0)return e;try{return new k0(e,t)}catch(o){if(!n)return null;throw o}};var Bo=BO;const $O=Bo,xO=(e,t)=>{const n=$O(e,t);return n?n.version:null};var DO=xO;const MO=Bo,kO=(e,t)=>{const n=MO(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var FO=kO;const F0=An,UO=(e,t,n,o,a)=>{typeof n=="string"&&(a=o,o=n,n=void 0);try{return new F0(e instanceof F0?e.version:e,n).inc(t,o,a).version}catch{return null}};var HO=UO;const U0=Bo,jO=(e,t)=>{const n=U0(e,null,!0),o=U0(t,null,!0),a=n.compare(o);if(a===0)return null;const u=a>0,f=u?n:o,g=u?o:n,h=!!f.prerelease.length;if(!!g.prerelease.length&&!h)return!g.patch&&!g.minor?"major":f.patch?"patch":f.minor?"minor":"major";const _=h?"pre":"";return n.major!==o.major?_+"major":n.minor!==o.minor?_+"minor":n.patch!==o.patch?_+"patch":"prerelease"};var WO=jO;const zO=An,qO=(e,t)=>new zO(e,t).major;var VO=qO;const GO=An,ZO=(e,t)=>new GO(e,t).minor;var KO=ZO;const JO=An,XO=(e,t)=>new JO(e,t).patch;var YO=XO;const QO=Bo,eL=(e,t)=>{const n=QO(e,t);return n&&n.prerelease.length?n.prerelease:null};var tL=eL;const H0=An,nL=(e,t,n)=>new H0(e,n).compare(new H0(t,n));var gr=nL;const rL=gr,iL=(e,t,n)=>rL(t,e,n);var oL=iL;const sL=gr,aL=(e,t)=>sL(e,t,!0);var uL=aL;const j0=An,fL=(e,t,n)=>{const o=new j0(e,n),a=new j0(t,n);return o.compare(a)||o.compareBuild(a)};var fd=fL;const lL=fd,cL=(e,t)=>e.sort((n,o)=>lL(n,o,t));var dL=cL;const hL=fd,gL=(e,t)=>e.sort((n,o)=>hL(o,n,t));var _L=gL;const pL=gr,bL=(e,t,n)=>pL(e,t,n)>0;var $u=bL;const wL=gr,yL=(e,t,n)=>wL(e,t,n)<0;var ld=yL;const mL=gr,vL=(e,t,n)=>mL(e,t,n)===0;var pb=vL;const EL=gr,SL=(e,t,n)=>EL(e,t,n)!==0;var bb=SL;const RL=gr,AL=(e,t,n)=>RL(e,t,n)>=0;var cd=AL;const IL=gr,TL=(e,t,n)=>IL(e,t,n)<=0;var dd=TL;const OL=pb,LL=bb,CL=$u,PL=cd,NL=ld,BL=dd,$L=(e,t,n,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return OL(e,n,o);case"!=":return LL(e,n,o);case">":return CL(e,n,o);case">=":return PL(e,n,o);case"<":return NL(e,n,o);case"<=":return BL(e,n,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var wb=$L;const xL=An,DL=Bo,{safeRe:Ka,t:Ja}=Bs,ML=(e,t)=>{if(e instanceof xL)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?Ka[Ja.COERCEFULL]:Ka[Ja.COERCE]);else{const h=t.includePrerelease?Ka[Ja.COERCERTLFULL]:Ka[Ja.COERCERTL];let d;for(;(d=h.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||d.index+d[0].length!==n.index+n[0].length)&&(n=d),h.lastIndex=d.index+d[1].length+d[2].length;h.lastIndex=-1}if(n===null)return null;const o=n[2],a=n[3]||"0",u=n[4]||"0",f=t.includePrerelease&&n[5]?`-${n[5]}`:"",g=t.includePrerelease&&n[6]?`+${n[6]}`:"";return DL(`${o}.${a}.${u}${f}${g}`,t)};var kL=ML;class FL{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(t,n)}return this}}var UL=FL,Hl,W0;function _r(){if(W0)return Hl;W0=1;const e=/\s+/g;class t{constructor(B,W){if(W=a(W),B instanceof t)return B.loose===!!W.loose&&B.includePrerelease===!!W.includePrerelease?B:new t(B.raw,W);if(B instanceof u)return this.raw=B.value,this.set=[[B]],this.formatted=void 0,this;if(this.options=W,this.loose=!!W.loose,this.includePrerelease=!!W.includePrerelease,this.raw=B.trim().replace(e," "),this.set=this.raw.split("||").map(D=>this.parseRange(D.trim())).filter(D=>D.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const D=this.set[0];if(this.set=this.set.filter(J=>!k(J[0])),this.set.length===0)this.set=[D];else if(this.set.length>1){for(const J of this.set)if(J.length===1&&U(J[0])){this.set=[J];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let B=0;B<this.set.length;B++){B>0&&(this.formatted+="||");const W=this.set[B];for(let D=0;D<W.length;D++)D>0&&(this.formatted+=" "),this.formatted+=W[D].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(B){const D=((this.options.includePrerelease&&y)|(this.options.loose&&N))+":"+B,J=o.get(D);if(J)return J;const M=this.options.loose,q=M?h[d.HYPHENRANGELOOSE]:h[d.HYPHENRANGE];B=B.replace(q,p(this.options.includePrerelease)),f("hyphen replace",B),B=B.replace(h[d.COMPARATORTRIM],_),f("comparator trim",B),B=B.replace(h[d.TILDETRIM],w),f("tilde trim",B),B=B.replace(h[d.CARETTRIM],E),f("caret trim",B);let te=B.split(" ").map(_e=>j(_e,this.options)).join(" ").split(/\s+/).map(_e=>we(_e,this.options));M&&(te=te.filter(_e=>(f("loose invalid filter",_e,this.options),!!_e.match(h[d.COMPARATORLOOSE])))),f("range list",te);const de=new Map,Q=te.map(_e=>new u(_e,this.options));for(const _e of Q){if(k(_e))return[_e];de.set(_e.value,_e)}de.size>1&&de.has("")&&de.delete("");const ye=[...de.values()];return o.set(D,ye),ye}intersects(B,W){if(!(B instanceof t))throw new TypeError("a Range is required");return this.set.some(D=>V(D,W)&&B.set.some(J=>V(J,W)&&D.every(M=>J.every(q=>M.intersects(q,W)))))}test(B){if(!B)return!1;if(typeof B=="string")try{B=new g(B,this.options)}catch{return!1}for(let W=0;W<this.set.length;W++)if(v(this.set[W],B,this.options))return!0;return!1}}Hl=t;const n=UL,o=new n,a=ud,u=xu(),f=Bu,g=An,{safeRe:h,t:d,comparatorTrimReplace:_,tildeTrimReplace:w,caretTrimReplace:E}=Bs,{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:N}=Nu,k=A=>A.value==="<0.0.0-0",U=A=>A.value==="",V=(A,B)=>{let W=!0;const D=A.slice();let J=D.pop();for(;W&&D.length;)W=D.every(M=>J.intersects(M,B)),J=D.pop();return W},j=(A,B)=>(f("comp",A,B),A=se(A,B),f("caret",A),A=C(A,B),f("tildes",A),A=ge(A,B),f("xrange",A),A=Ae(A,B),f("stars",A),A),P=A=>!A||A.toLowerCase()==="x"||A==="*",C=(A,B)=>A.trim().split(/\s+/).map(W=>K(W,B)).join(" "),K=(A,B)=>{const W=B.loose?h[d.TILDELOOSE]:h[d.TILDE];return A.replace(W,(D,J,M,q,te)=>{f("tilde",A,D,J,M,q,te);let de;return P(J)?de="":P(M)?de=`>=${J}.0.0 <${+J+1}.0.0-0`:P(q)?de=`>=${J}.${M}.0 <${J}.${+M+1}.0-0`:te?(f("replaceTilde pr",te),de=`>=${J}.${M}.${q}-${te} <${J}.${+M+1}.0-0`):de=`>=${J}.${M}.${q} <${J}.${+M+1}.0-0`,f("tilde return",de),de})},se=(A,B)=>A.trim().split(/\s+/).map(W=>re(W,B)).join(" "),re=(A,B)=>{f("caret",A,B);const W=B.loose?h[d.CARETLOOSE]:h[d.CARET],D=B.includePrerelease?"-0":"";return A.replace(W,(J,M,q,te,de)=>{f("caret",A,J,M,q,te,de);let Q;return P(M)?Q="":P(q)?Q=`>=${M}.0.0${D} <${+M+1}.0.0-0`:P(te)?M==="0"?Q=`>=${M}.${q}.0${D} <${M}.${+q+1}.0-0`:Q=`>=${M}.${q}.0${D} <${+M+1}.0.0-0`:de?(f("replaceCaret pr",de),M==="0"?q==="0"?Q=`>=${M}.${q}.${te}-${de} <${M}.${q}.${+te+1}-0`:Q=`>=${M}.${q}.${te}-${de} <${M}.${+q+1}.0-0`:Q=`>=${M}.${q}.${te}-${de} <${+M+1}.0.0-0`):(f("no pr"),M==="0"?q==="0"?Q=`>=${M}.${q}.${te}${D} <${M}.${q}.${+te+1}-0`:Q=`>=${M}.${q}.${te}${D} <${M}.${+q+1}.0-0`:Q=`>=${M}.${q}.${te} <${+M+1}.0.0-0`),f("caret return",Q),Q})},ge=(A,B)=>(f("replaceXRanges",A,B),A.split(/\s+/).map(W=>le(W,B)).join(" ")),le=(A,B)=>{A=A.trim();const W=B.loose?h[d.XRANGELOOSE]:h[d.XRANGE];return A.replace(W,(D,J,M,q,te,de)=>{f("xRange",A,D,J,M,q,te,de);const Q=P(M),ye=Q||P(q),_e=ye||P(te),Se=_e;return J==="="&&Se&&(J=""),de=B.includePrerelease?"-0":"",Q?J===">"||J==="<"?D="<0.0.0-0":D="*":J&&Se?(ye&&(q=0),te=0,J===">"?(J=">=",ye?(M=+M+1,q=0,te=0):(q=+q+1,te=0)):J==="<="&&(J="<",ye?M=+M+1:q=+q+1),J==="<"&&(de="-0"),D=`${J+M}.${q}.${te}${de}`):ye?D=`>=${M}.0.0${de} <${+M+1}.0.0-0`:_e&&(D=`>=${M}.${q}.0${de} <${M}.${+q+1}.0-0`),f("xRange return",D),D})},Ae=(A,B)=>(f("replaceStars",A,B),A.trim().replace(h[d.STAR],"")),we=(A,B)=>(f("replaceGTE0",A,B),A.trim().replace(h[B.includePrerelease?d.GTE0PRE:d.GTE0],"")),p=A=>(B,W,D,J,M,q,te,de,Q,ye,_e,Se)=>(P(D)?W="":P(J)?W=`>=${D}.0.0${A?"-0":""}`:P(M)?W=`>=${D}.${J}.0${A?"-0":""}`:q?W=`>=${W}`:W=`>=${W}${A?"-0":""}`,P(Q)?de="":P(ye)?de=`<${+Q+1}.0.0-0`:P(_e)?de=`<${Q}.${+ye+1}.0-0`:Se?de=`<=${Q}.${ye}.${_e}-${Se}`:A?de=`<${Q}.${ye}.${+_e+1}-0`:de=`<=${de}`,`${W} ${de}`.trim()),v=(A,B,W)=>{for(let D=0;D<A.length;D++)if(!A[D].test(B))return!1;if(B.prerelease.length&&!W.includePrerelease){for(let D=0;D<A.length;D++)if(f(A[D].semver),A[D].semver!==u.ANY&&A[D].semver.prerelease.length>0){const J=A[D].semver;if(J.major===B.major&&J.minor===B.minor&&J.patch===B.patch)return!0}return!1}return!0};return Hl}var jl,z0;function xu(){if(z0)return jl;z0=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(_,w){if(w=n(w),_ instanceof t){if(_.loose===!!w.loose)return _;_=_.value}_=_.trim().split(/\s+/).join(" "),f("comparator",_,w),this.options=w,this.loose=!!w.loose,this.parse(_),this.semver===e?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(_){const w=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],E=_.match(w);if(!E)throw new TypeError(`Invalid comparator: ${_}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new g(E[2],this.options.loose):this.semver=e}toString(){return this.value}test(_){if(f("Comparator.test",_,this.options.loose),this.semver===e||_===e)return!0;if(typeof _=="string")try{_=new g(_,this.options)}catch{return!1}return u(_,this.operator,this.semver,this.options)}intersects(_,w){if(!(_ instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h(_.value,w).test(this.value):_.operator===""?_.value===""?!0:new h(this.value,w).test(_.semver):(w=n(w),w.includePrerelease&&(this.value==="<0.0.0-0"||_.value==="<0.0.0-0")||!w.includePrerelease&&(this.value.startsWith("<0.0.0")||_.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&_.operator.startsWith(">")||this.operator.startsWith("<")&&_.operator.startsWith("<")||this.semver.version===_.semver.version&&this.operator.includes("=")&&_.operator.includes("=")||u(this.semver,"<",_.semver,w)&&this.operator.startsWith(">")&&_.operator.startsWith("<")||u(this.semver,">",_.semver,w)&&this.operator.startsWith("<")&&_.operator.startsWith(">")))}}jl=t;const n=ud,{safeRe:o,t:a}=Bs,u=wb,f=Bu,g=An,h=_r();return jl}const HL=_r(),jL=(e,t,n)=>{try{t=new HL(t,n)}catch{return!1}return t.test(e)};var Du=jL;const WL=_r(),zL=(e,t)=>new WL(e,t).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));var qL=zL;const VL=An,GL=_r(),ZL=(e,t,n)=>{let o=null,a=null,u=null;try{u=new GL(t,n)}catch{return null}return e.forEach(f=>{u.test(f)&&(!o||a.compare(f)===-1)&&(o=f,a=new VL(o,n))}),o};var KL=ZL;const JL=An,XL=_r(),YL=(e,t,n)=>{let o=null,a=null,u=null;try{u=new XL(t,n)}catch{return null}return e.forEach(f=>{u.test(f)&&(!o||a.compare(f)===1)&&(o=f,a=new JL(o,n))}),o};var QL=YL;const Wl=An,eC=_r(),q0=$u,tC=(e,t)=>{e=new eC(e,t);let n=new Wl("0.0.0");if(e.test(n)||(n=new Wl("0.0.0-0"),e.test(n)))return n;n=null;for(let o=0;o<e.set.length;++o){const a=e.set[o];let u=null;a.forEach(f=>{const g=new Wl(f.semver.version);switch(f.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!u||q0(g,u))&&(u=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),u&&(!n||q0(n,u))&&(n=u)}return n&&e.test(n)?n:null};var nC=tC;const rC=_r(),iC=(e,t)=>{try{return new rC(e,t).range||"*"}catch{return null}};var oC=iC;const sC=An,yb=xu(),{ANY:aC}=yb,uC=_r(),fC=Du,V0=$u,G0=ld,lC=dd,cC=cd,dC=(e,t,n,o)=>{e=new sC(e,o),t=new uC(t,o);let a,u,f,g,h;switch(n){case">":a=V0,u=lC,f=G0,g=">",h=">=";break;case"<":a=G0,u=cC,f=V0,g="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fC(e,t,o))return!1;for(let d=0;d<t.set.length;++d){const _=t.set[d];let w=null,E=null;if(_.forEach(y=>{y.semver===aC&&(y=new yb(">=0.0.0")),w=w||y,E=E||y,a(y.semver,w.semver,o)?w=y:f(y.semver,E.semver,o)&&(E=y)}),w.operator===g||w.operator===h||(!E.operator||E.operator===g)&&u(e,E.semver))return!1;if(E.operator===h&&f(e,E.semver))return!1}return!0};var hd=dC;const hC=hd,gC=(e,t,n)=>hC(e,t,">",n);var _C=gC;const pC=hd,bC=(e,t,n)=>pC(e,t,"<",n);var wC=bC;const Z0=_r(),yC=(e,t,n)=>(e=new Z0(e,n),t=new Z0(t,n),e.intersects(t,n));var mC=yC;const vC=Du,EC=gr;var SC=(e,t,n)=>{const o=[];let a=null,u=null;const f=e.sort((_,w)=>EC(_,w,n));for(const _ of f)vC(_,t,n)?(u=_,a||(a=_)):(u&&o.push([a,u]),u=null,a=null);a&&o.push([a,null]);const g=[];for(const[_,w]of o)_===w?g.push(_):!w&&_===f[0]?g.push("*"):w?_===f[0]?g.push(`<=${w}`):g.push(`${_} - ${w}`):g.push(`>=${_}`);const h=g.join(" || "),d=typeof t.raw=="string"?t.raw:String(t);return h.length<d.length?h:t};const K0=_r(),gd=xu(),{ANY:zl}=gd,us=Du,_d=gr,RC=(e,t,n={})=>{if(e===t)return!0;e=new K0(e,n),t=new K0(t,n);let o=!1;e:for(const a of e.set){for(const u of t.set){const f=IC(a,u,n);if(o=o||f!==null,f)continue e}if(o)return!1}return!0},AC=[new gd(">=0.0.0-0")],J0=[new gd(">=0.0.0")],IC=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===zl){if(t.length===1&&t[0].semver===zl)return!0;n.includePrerelease?e=AC:e=J0}if(t.length===1&&t[0].semver===zl){if(n.includePrerelease)return!0;t=J0}const o=new Set;let a,u;for(const y of e)y.operator===">"||y.operator===">="?a=X0(a,y,n):y.operator==="<"||y.operator==="<="?u=Y0(u,y,n):o.add(y.semver);if(o.size>1)return null;let f;if(a&&u){if(f=_d(a.semver,u.semver,n),f>0)return null;if(f===0&&(a.operator!==">="||u.operator!=="<="))return null}for(const y of o){if(a&&!us(y,String(a),n)||u&&!us(y,String(u),n))return null;for(const N of t)if(!us(y,String(N),n))return!1;return!0}let g,h,d,_,w=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,E=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;w&&w.prerelease.length===1&&u.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const y of t){if(_=_||y.operator===">"||y.operator===">=",d=d||y.operator==="<"||y.operator==="<=",a){if(E&&y.semver.prerelease&&y.semver.prerelease.length&&y.semver.major===E.major&&y.semver.minor===E.minor&&y.semver.patch===E.patch&&(E=!1),y.operator===">"||y.operator===">="){if(g=X0(a,y,n),g===y&&g!==a)return!1}else if(a.operator===">="&&!us(a.semver,String(y),n))return!1}if(u){if(w&&y.semver.prerelease&&y.semver.prerelease.length&&y.semver.major===w.major&&y.semver.minor===w.minor&&y.semver.patch===w.patch&&(w=!1),y.operator==="<"||y.operator==="<="){if(h=Y0(u,y,n),h===y&&h!==u)return!1}else if(u.operator==="<="&&!us(u.semver,String(y),n))return!1}if(!y.operator&&(u||a)&&f!==0)return!1}return!(a&&d&&!u&&f!==0||u&&_&&!a&&f!==0||E||w)},X0=(e,t,n)=>{if(!e)return t;const o=_d(e.semver,t.semver,n);return o>0?e:o<0||t.operator===">"&&e.operator===">="?t:e},Y0=(e,t,n)=>{if(!e)return t;const o=_d(e.semver,t.semver,n);return o<0?e:o>0||t.operator==="<"&&e.operator==="<="?t:e};var TC=RC;const ql=Bs,Q0=Nu,OC=An,e_=_b,LC=Bo,CC=DO,PC=FO,NC=HO,BC=WO,$C=VO,xC=KO,DC=YO,MC=tL,kC=gr,FC=oL,UC=uL,HC=fd,jC=dL,WC=_L,zC=$u,qC=ld,VC=pb,GC=bb,ZC=cd,KC=dd,JC=wb,XC=kL,YC=xu(),QC=_r(),eP=Du,tP=qL,nP=KL,rP=QL,iP=nC,oP=oC,sP=hd,aP=_C,uP=wC,fP=mC,lP=SC,cP=TC;var dP={parse:LC,valid:CC,clean:PC,inc:NC,diff:BC,major:$C,minor:xC,patch:DC,prerelease:MC,compare:kC,rcompare:FC,compareLoose:UC,compareBuild:HC,sort:jC,rsort:WC,gt:zC,lt:qC,eq:VC,neq:GC,gte:ZC,lte:KC,cmp:JC,coerce:XC,Comparator:YC,Range:QC,satisfies:eP,toComparators:tP,maxSatisfying:nP,minSatisfying:rP,minVersion:iP,validRange:oP,outside:sP,gtr:aP,ltr:uP,intersects:fP,simplifyRange:lP,subset:cP,SemVer:OC,re:ql.re,src:ql.src,tokens:ql.t,SEMVER_SPEC_VERSION:Q0.SEMVER_SPEC_VERSION,RELEASE_TYPES:Q0.RELEASE_TYPES,compareIdentifiers:e_.compareIdentifiers,rcompareIdentifiers:e_.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=dP,n=qi,o=un;e.VersionStruct=(0,n.refine)((0,n.string)(),"Version",w=>(0,t.valid)(w)===null?`Expected SemVer version, got "${w}"`:!0),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",w=>(0,t.validRange)(w)===null?`Expected SemVer range, got "${w}"`:!0);function a(w){return(0,n.is)(w,e.VersionStruct)}e.isValidSemVerVersion=a;function u(w){return(0,n.is)(w,e.VersionRangeStruct)}e.isValidSemVerRange=u;function f(w){(0,o.assertStruct)(w,e.VersionStruct)}e.assertIsSemVerVersion=f;function g(w){(0,o.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=g;function h(w,E){return(0,t.gt)(w,E)}e.gtVersion=h;function d(w,E){return(0,t.gtr)(w,E)}e.gtRange=d;function _(w,E){return(0,t.satisfies)(w,E,{includePrerelease:!0})}e.satisfiesVersionRange=_})(db);(function(e){var t=At&&At.__createBinding||(Object.create?function(o,a,u,f){f===void 0&&(f=u);var g=Object.getOwnPropertyDescriptor(a,u);(!g||("get"in g?!a.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return a[u]}}),Object.defineProperty(o,f,g)}:function(o,a,u,f){f===void 0&&(f=u),o[f]=a[u]}),n=At&&At.__exportStar||function(o,a){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(a,u)&&t(a,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),n(un,e),n(Ps,e),n(_t,e),n(Cu,e),n(Sr,e),n(Ro,e),n(ob,e),n(Ns,e),n(sb,e),n(ab,e),n(Ao,e),n(ub,e),n(Rr,e),n(fb,e),n(lb,e),n(cb,e),n(db,e)})(Qc);var Mu={},bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.errorValues=bi.errorCodes=void 0;bi.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}};bi.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=Qc,n=bi,o=n.errorCodes.rpc.internal,a="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(y,N=a){if(g(y)){const k=y.toString();if((0,t.hasProperty)(n.errorValues,k))return n.errorValues[k].message;if(_(y))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return N}e.getMessageFromCode=f;function g(y){return Number.isInteger(y)}e.isValidCode=g;function h(y,{fallbackError:N=u,shouldIncludeStack:k=!0}={}){if(!(0,t.isJsonRpcError)(N))throw new Error("Must provide fallback error with integer number code and string message.");const U=d(y,N);return k||delete U.stack,U}e.serializeError=h;function d(y,N){if(y&&typeof y=="object"&&"serialize"in y&&typeof y.serialize=="function")return y.serialize();if((0,t.isJsonRpcError)(y))return y;const k=w(y);return{...N,data:{cause:k}}}function _(y){return y>=-32099&&y<=-32e3}function w(y){return Array.isArray(y)?y.map(N=>(0,t.isValidJson)(N)?N:(0,t.isObject)(N)?E(N):null):(0,t.isObject)(y)?E(y):(0,t.isValidJson)(y)?y:null}e.serializeCause=w;function E(y){return Object.getOwnPropertyNames(y).reduce((N,k)=>{const U=y[k];return(0,t.isValidJson)(U)&&(N[k]=U),N},{})}})(Mu);var hP=At&&At.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ki,"__esModule",{value:!0});ki.EthereumProviderError=ki.JsonRpcError=void 0;const gP=Qc,_P=hP(Fc),pP=Mu;class mb extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a non-empty string.');super(n),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,gP.isPlainObject)(this.data)&&(t.data.cause=(0,pP.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,_P.default)(this.serialize(),yP,2)}}ki.JsonRpcError=mb;class bP extends mb{constructor(t,n,o){if(!wP(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}}ki.EthereumProviderError=bP;function wP(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function yP(e,t){if(t!=="[Circular]")return t}var Io={};Object.defineProperty(Io,"__esModule",{value:!0});Io.providerErrors=Io.rpcErrors=void 0;const pd=ki,pn=bi,vb=Mu;Io.rpcErrors={parse:e=>Yn(pn.errorCodes.rpc.parse,e),invalidRequest:e=>Yn(pn.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Yn(pn.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Yn(pn.errorCodes.rpc.methodNotFound,e),internal:e=>Yn(pn.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 Yn(t,e)},invalidInput:e=>Yn(pn.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Yn(pn.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Yn(pn.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Yn(pn.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Yn(pn.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Yn(pn.errorCodes.rpc.limitExceeded,e)};Io.providerErrors={userRejectedRequest:e=>fs(pn.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>fs(pn.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>fs(pn.errorCodes.provider.unsupportedMethod,e),disconnected:e=>fs(pn.errorCodes.provider.disconnected,e),chainDisconnected:e=>fs(pn.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new pd.EthereumProviderError(t,n,o)}};function Yn(e,t){const[n,o]=Eb(t);return new pd.JsonRpcError(e,n??(0,vb.getMessageFromCode)(e),o)}function fs(e,t){const[n,o]=Eb(t);return new pd.EthereumProviderError(e,n??(0,vb.getMessageFromCode)(e),o)}function Eb(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,n]}}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=ki;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var n=Mu;Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return n.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});var o=Io;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var a=bi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(XT);var bd={exports:{}},mP=Sb;function Sb(e,t){if(e&&t)return Sb(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){n[o]=e[o]}),n;function n(){for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];var u=e.apply(this,o),f=o[o.length-1];return typeof u=="function"&&u!==f&&Object.keys(f).forEach(function(g){u[g]=f[g]}),u}}var Rb=mP;bd.exports=Rb(ru);bd.exports.strict=Rb(Ab);ru.proto=ru(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ru(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ab(this)},configurable:!0})});function ru(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Ab(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}var wd=bd.exports;const vP=wi(wd);var EP=wd,SP=function(){},RP=function(e){return e.setHeader&&typeof e.abort=="function"},AP=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Ib=function(e,t,n){if(typeof t=="function")return Ib(e,null,t);t||(t={}),n=EP(n||SP);var o=e._writableState,a=e._readableState,u=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,g=!1,h=function(){e.writable||d()},d=function(){f=!1,u||n.call(e)},_=function(){u=!1,f||n.call(e)},w=function(U){n.call(e,U?new Error("exited with error code: "+U):null)},E=function(U){n.call(e,U)},y=function(){De.process.nextTick(N)},N=function(){if(!g){if(u&&!(a&&a.ended&&!a.destroyed))return n.call(e,new Error("premature close"));if(f&&!(o&&o.ended&&!o.destroyed))return n.call(e,new Error("premature close"))}},k=function(){e.req.on("finish",d)};return RP(e)?(e.on("complete",d),e.on("abort",y),e.req?k():e.on("request",k)):f&&!o&&(e.on("end",h),e.on("close",h)),AP(e)&&e.on("exit",w),e.on("end",_),e.on("finish",d),t.error!==!1&&e.on("error",E),e.on("close",y),function(){g=!0,e.removeListener("complete",d),e.removeListener("abort",y),e.removeListener("request",k),e.req&&e.req.removeListener("finish",d),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("exit",w),e.removeListener("end",_),e.removeListener("error",E),e.removeListener("close",y)}},Tb=Ib;const t_=wi(Tb);var IP=wd,TP=Tb,iu;try{iu=SR}catch{}var Ss=function(){},OP=/^v?\.0/.test(De.process.version),ku=function(e){return typeof e=="function"},LP=function(e){return!OP||!iu?!1:(e instanceof(iu.ReadStream||Ss)||e instanceof(iu.WriteStream||Ss))&&ku(e.close)},CP=function(e){return e.setHeader&&ku(e.abort)},PP=function(e,t,n,o){o=IP(o);var a=!1;e.on("close",function(){a=!0}),TP(e,{readable:t,writable:n},function(f){if(f)return o(f);a=!0,o()});var u=!1;return function(f){if(!a&&!u){if(u=!0,LP(e))return e.close(Ss);if(CP(e))return e.abort();if(ku(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},n_=function(e){e()},NP=function(e,t){return e.pipe(t)},BP=function(){var e=Array.prototype.slice.call(arguments),t=ku(e[e.length-1]||Ss)&&e.pop()||Ss;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n,o=e.map(function(a,u){var f=u<e.length-1,g=u>0;return PP(a,f,g,function(h){n||(n=h),h&&o.forEach(n_),!f&&(o.forEach(n_),t(n))})});return e.reduce(NP)},$P=BP;const r_=wi($P);var xP={},Fu={},Uu={},Ob={},To={},gi={},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.output=Jt.exists=Jt.hash=Jt.bytes=Jt.bool=Jt.number=Jt.isBytes=void 0;function fu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Jt.number=fu;function Lb(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Jt.bool=Lb;function Cb(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Jt.isBytes=Cb;function yd(e,...t){if(!Cb(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}`)}Jt.bytes=yd;function Pb(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");fu(e.outputLen),fu(e.blockLen)}Jt.hash=Pb;function Nb(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")}Jt.exists=Nb;function Bb(e,t){yd(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Jt.output=Bb;const DP={number:fu,bool:Lb,bytes:yd,hash:Pb,exists:Nb,output:Bb};Jt.default=DP;var Jr={},Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.crypto=void 0;Hu.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=Hu,n=Jt;function o(p){return p instanceof Uint8Array||p!=null&&typeof p=="object"&&p.constructor.name==="Uint8Array"}e.isBytes=o;const a=p=>new Uint8Array(p.buffer,p.byteOffset,p.byteLength);e.u8=a;const u=p=>new Uint32Array(p.buffer,p.byteOffset,Math.floor(p.byteLength/4));e.u32=u;const f=p=>new DataView(p.buffer,p.byteOffset,p.byteLength);e.createView=f;const g=(p,v)=>p<<32-v|p>>>v;e.rotr=g;const h=(p,v)=>p<<v|p>>>32-v>>>0;e.rotl=h,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const d=p=>p<<24&4278190080|p<<8&16711680|p>>>8&65280|p>>>24&255;e.byteSwap=d,e.byteSwapIfBE=e.isLE?p=>p:p=>(0,e.byteSwap)(p);function _(p){for(let v=0;v<p.length;v++)p[v]=(0,e.byteSwap)(p[v])}e.byteSwap32=_;const w=Array.from({length:256},(p,v)=>v.toString(16).padStart(2,"0"));function E(p){(0,n.bytes)(p);let v="";for(let A=0;A<p.length;A++)v+=w[p[A]];return v}e.bytesToHex=E;const y={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function N(p){if(p>=y._0&&p<=y._9)return p-y._0;if(p>=y._A&&p<=y._F)return p-(y._A-10);if(p>=y._a&&p<=y._f)return p-(y._a-10)}function k(p){if(typeof p!="string")throw new Error("hex string expected, got "+typeof p);const v=p.length,A=v/2;if(v%2)throw new Error("padded hex string expected, got unpadded hex of length "+v);const B=new Uint8Array(A);for(let W=0,D=0;W<A;W++,D+=2){const J=N(p.charCodeAt(D)),M=N(p.charCodeAt(D+1));if(J===void 0||M===void 0){const q=p[D]+p[D+1];throw new Error('hex string expected, got non-hex character "'+q+'" at index '+D)}B[W]=J*16+M}return B}e.hexToBytes=k;const U=async()=>{};e.nextTick=U;async function V(p,v,A){let B=Date.now();for(let W=0;W<p;W++){A(W);const D=Date.now()-B;D>=0&&D<v||(await(0,e.nextTick)(),B+=D)}}e.asyncLoop=V;function j(p){if(typeof p!="string")throw new Error(`utf8ToBytes expected string, got ${typeof p}`);return new Uint8Array(new TextEncoder().encode(p))}e.utf8ToBytes=j;function P(p){return typeof p=="string"&&(p=j(p)),(0,n.bytes)(p),p}e.toBytes=P;function C(...p){let v=0;for(let B=0;B<p.length;B++){const W=p[B];(0,n.bytes)(W),v+=W.length}const A=new Uint8Array(v);for(let B=0,W=0;B<p.length;B++){const D=p[B];A.set(D,W),W+=D.length}return A}e.concatBytes=C;class K{clone(){return this._cloneInto()}}e.Hash=K;const se={}.toString;function re(p,v){if(v!==void 0&&se.call(v)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(p,v)}e.checkOpts=re;function ge(p){const v=B=>p().update(P(B)).digest(),A=p();return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=()=>p(),v}e.wrapConstructor=ge;function le(p){const v=(B,W)=>p(W).update(P(B)).digest(),A=p({});return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=B=>p(B),v}e.wrapConstructorWithOpts=le;function Ae(p){const v=(B,W)=>p(W).update(P(B)).digest(),A=p({});return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=B=>p(B),v}e.wrapXOFConstructorWithOpts=Ae;function we(p=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(p));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=we})(Jr);Object.defineProperty(gi,"__esModule",{value:!0});gi.HashMD=gi.Maj=gi.Chi=void 0;const Vl=Jt,ls=Jr;function MP(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const a=BigInt(32),u=BigInt(4294967295),f=Number(n>>a&u),g=Number(n&u),h=o?4:0,d=o?0:4;e.setUint32(t+h,f,o),e.setUint32(t+d,g,o)}const kP=(e,t,n)=>e&t^~e&n;gi.Chi=kP;const FP=(e,t,n)=>e&t^e&n^t&n;gi.Maj=FP;class UP extends ls.Hash{constructor(t,n,o,a){super(),this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=a,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,ls.createView)(this.buffer)}update(t){(0,Vl.exists)(this);const{view:n,buffer:o,blockLen:a}=this;t=(0,ls.toBytes)(t);const u=t.length;for(let f=0;f<u;){const g=Math.min(a-this.pos,u-f);if(g===a){const h=(0,ls.createView)(t);for(;a<=u-f;f+=a)this.process(h,f);continue}o.set(t.subarray(f,f+g),this.pos),this.pos+=g,f+=g,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,Vl.exists)(this),(0,Vl.output)(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:a,isLE:u}=this;let{pos:f}=this;n[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>a-f&&(this.process(o,0),f=0);for(let w=f;w<a;w++)n[w]=0;MP(o,a-8,BigInt(this.length*8),u),this.process(o,0);const g=(0,ls.createView)(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=h/4,_=this.get();if(d>_.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<d;w++)g.setUint32(4*w,_[w],u)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:a,finished:u,destroyed:f,pos:g}=this;return t.length=a,t.pos=g,t.finished=u,t.destroyed=f,a%n&&t.buffer.set(o),t}}gi.HashMD=UP;Object.defineProperty(To,"__esModule",{value:!0});To.sha224=To.sha256=void 0;const Gl=gi,er=Jr,HP=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]),fi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),li=new Uint32Array(64);class $b extends Gl.HashMD{constructor(){super(64,32,8,!1),this.A=fi[0]|0,this.B=fi[1]|0,this.C=fi[2]|0,this.D=fi[3]|0,this.E=fi[4]|0,this.F=fi[5]|0,this.G=fi[6]|0,this.H=fi[7]|0}get(){const{A:t,B:n,C:o,D:a,E:u,F:f,G:g,H:h}=this;return[t,n,o,a,u,f,g,h]}set(t,n,o,a,u,f,g,h){this.A=t|0,this.B=n|0,this.C=o|0,this.D=a|0,this.E=u|0,this.F=f|0,this.G=g|0,this.H=h|0}process(t,n){for(let w=0;w<16;w++,n+=4)li[w]=t.getUint32(n,!1);for(let w=16;w<64;w++){const E=li[w-15],y=li[w-2],N=(0,er.rotr)(E,7)^(0,er.rotr)(E,18)^E>>>3,k=(0,er.rotr)(y,17)^(0,er.rotr)(y,19)^y>>>10;li[w]=k+li[w-7]+N+li[w-16]|0}let{A:o,B:a,C:u,D:f,E:g,F:h,G:d,H:_}=this;for(let w=0;w<64;w++){const E=(0,er.rotr)(g,6)^(0,er.rotr)(g,11)^(0,er.rotr)(g,25),y=_+E+(0,Gl.Chi)(g,h,d)+HP[w]+li[w]|0,k=((0,er.rotr)(o,2)^(0,er.rotr)(o,13)^(0,er.rotr)(o,22))+(0,Gl.Maj)(o,a,u)|0;_=d,d=h,h=g,g=f+y|0,f=u,u=a,a=o,o=y+k|0}o=o+this.A|0,a=a+this.B|0,u=u+this.C|0,f=f+this.D|0,g=g+this.E|0,h=h+this.F|0,d=d+this.G|0,_=_+this.H|0,this.set(o,a,u,f,g,h,d,_)}roundClean(){li.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class jP extends $b{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}}To.sha256=(0,er.wrapConstructor)(()=>new $b);To.sha224=(0,er.wrapConstructor)(()=>new jP);var ju={},xb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Jt,n=Jr;class o extends n.Hash{constructor(f,g){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(f);const h=(0,n.toBytes)(g);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 d=this.blockLen,_=new Uint8Array(d);_.set(h.length>d?f.create().update(h).digest():h);for(let w=0;w<_.length;w++)_[w]^=54;this.iHash.update(_),this.oHash=f.create();for(let w=0;w<_.length;w++)_[w]^=106;this.oHash.update(_),_.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:g,iHash:h,finished:d,destroyed:_,blockLen:w,outputLen:E}=this;return f=f,f.finished=d,f.destroyed=_,f.blockLen=w,f.outputLen=E,f.oHash=g._cloneInto(f.oHash),f.iHash=h._cloneInto(f.iHash),f}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;const a=(u,f,g)=>new o(u,f).update(g).digest();e.hmac=a,e.hmac.create=(u,f)=>new o(u,f)})(xb);var md={},Wu={},xt={},St={};Object.defineProperty(St,"__esModule",{value:!0});St.bitMask=void 0;St.isBytes=qu;St.abytes=Vu;St.bytesToHex=vd;St.numberToHexUnpadded=Mb;St.hexToNumber=Ed;St.hexToBytes=Gu;St.bytesToNumberBE=qP;St.bytesToNumberLE=VP;St.numberToBytesBE=kb;St.numberToBytesLE=GP;St.numberToVarBytesBE=ZP;St.ensureBytes=KP;St.concatBytes=Fb;St.equalBytes=JP;St.utf8ToBytes=XP;St.bitLen=YP;St.bitGet=QP;St.bitSet=eN;St.createHmacDrbg=nN;St.validateObject=iN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Db=BigInt(0),zu=BigInt(1),WP=BigInt(2);function qu(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Vu(e){if(!qu(e))throw new Error("Uint8Array expected")}const zP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function vd(e){Vu(e);let t="";for(let n=0;n<e.length;n++)t+=zP[e[n]];return t}function Mb(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Ed(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const zr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function i_(e){if(e>=zr._0&&e<=zr._9)return e-zr._0;if(e>=zr._A&&e<=zr._F)return e-(zr._A-10);if(e>=zr._a&&e<=zr._f)return e-(zr._a-10)}function Gu(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(n);for(let a=0,u=0;a<n;a++,u+=2){const f=i_(e.charCodeAt(u)),g=i_(e.charCodeAt(u+1));if(f===void 0||g===void 0){const h=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+u)}o[a]=f*16+g}return o}function qP(e){return Ed(vd(e))}function VP(e){return Vu(e),Ed(vd(Uint8Array.from(e).reverse()))}function kb(e,t){return Gu(e.toString(16).padStart(t*2,"0"))}function GP(e,t){return kb(e,t).reverse()}function ZP(e){return Gu(Mb(e))}function KP(e,t,n){let o;if(typeof t=="string")try{o=Gu(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(qu(t))o=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const a=o.length;if(typeof n=="number"&&a!==n)throw new Error(`${e} expected ${n} bytes, got ${a}`);return o}function Fb(...e){let t=0;for(let o=0;o<e.length;o++){const a=e[o];Vu(a),t+=a.length}const n=new Uint8Array(t);for(let o=0,a=0;o<e.length;o++){const u=e[o];n.set(u,a),a+=u.length}return n}function JP(e,t){if(e.length!==t.length)return!1;let n=0;for(let o=0;o<e.length;o++)n|=e[o]^t[o];return n===0}function XP(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function YP(e){let t;for(t=0;e>Db;e>>=zu,t+=1);return t}function QP(e,t){return e>>BigInt(t)&zu}function eN(e,t,n){return e|(n?zu:Db)<<BigInt(t)}const tN=e=>(WP<<BigInt(e-1))-zu;St.bitMask=tN;const Zl=e=>new Uint8Array(e),o_=e=>Uint8Array.from(e);function nN(e,t,n){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 n!="function")throw new Error("hmacFn must be a function");let o=Zl(e),a=Zl(e),u=0;const f=()=>{o.fill(1),a.fill(0),u=0},g=(...w)=>n(a,o,...w),h=(w=Zl())=>{a=g(o_([0]),w),o=g(),w.length!==0&&(a=g(o_([1]),w),o=g())},d=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const E=[];for(;w<t;){o=g();const y=o.slice();E.push(y),w+=o.length}return Fb(...E)};return(w,E)=>{f(),h(w);let y;for(;!(y=E(d()));)h();return f(),y}}const rN={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"||qu(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 iN(e,t,n={}){const o=(a,u,f)=>{const g=rN[u];if(typeof g!="function")throw new Error(`Invalid validator "${u}", expected function`);const h=e[a];if(!(f&&h===void 0)&&!g(h,e))throw new Error(`Invalid param ${String(a)}=${h} (${typeof h}), expected ${u}`)};for(const[a,u]of Object.entries(t))o(a,u,!1);for(const[a,u]of Object.entries(n))o(a,u,!0);return e}Object.defineProperty(xt,"__esModule",{value:!0});xt.isNegativeLE=void 0;xt.mod=Un;xt.pow=Ub;xt.pow2=sN;xt.invert=lu;xt.tonelliShanks=Hb;xt.FpSqrt=jb;xt.validateField=fN;xt.FpPow=Wb;xt.FpInvertBatch=zb;xt.FpDiv=lN;xt.FpIsSquare=cN;xt.nLength=Sd;xt.Field=dN;xt.FpSqrtOdd=hN;xt.FpSqrtEven=gN;xt.hashToPrivateScalar=_N;xt.getFieldBytesLength=Rd;xt.getMinHashLength=qb;xt.mapHashToField=pN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hn=St,sn=BigInt(0),$t=BigInt(1),hi=BigInt(2),oN=BigInt(3),Lc=BigInt(4),s_=BigInt(5),a_=BigInt(8);BigInt(9);BigInt(16);function Un(e,t){const n=e%t;return n>=sn?n:t+n}function Ub(e,t,n){if(n<=sn||t<sn)throw new Error("Expected power/modulo > 0");if(n===$t)return sn;let o=$t;for(;t>sn;)t&$t&&(o=o*e%n),e=e*e%n,t>>=$t;return o}function sN(e,t,n){let o=e;for(;t-- >sn;)o*=o,o%=n;return o}function lu(e,t){if(e===sn||t<=sn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Un(e,t),o=t,a=sn,u=$t;for(;n!==sn;){const g=o/n,h=o%n,d=a-u*g;o=n,n=h,a=u,u=d}if(o!==$t)throw new Error("invert: does not exist");return Un(a,t)}function Hb(e){const t=(e-$t)/hi;let n,o,a;for(n=e-$t,o=0;n%hi===sn;n/=hi,o++);for(a=hi;a<e&&Ub(a,t,e)!==e-$t;a++);if(o===1){const f=(e+$t)/Lc;return function(h,d){const _=h.pow(d,f);if(!h.eql(h.sqr(_),d))throw new Error("Cannot find square root");return _}}const u=(n+$t)/hi;return function(g,h){if(g.pow(h,t)===g.neg(g.ONE))throw new Error("Cannot find square root");let d=o,_=g.pow(g.mul(g.ONE,a),n),w=g.pow(h,u),E=g.pow(h,n);for(;!g.eql(E,g.ONE);){if(g.eql(E,g.ZERO))return g.ZERO;let y=1;for(let k=g.sqr(E);y<d&&!g.eql(k,g.ONE);y++)k=g.sqr(k);const N=g.pow(_,$t<<BigInt(d-y-1));_=g.sqr(N),w=g.mul(w,N),E=g.mul(E,_),d=y}return w}}function jb(e){if(e%Lc===oN){const t=(e+$t)/Lc;return function(o,a){const u=o.pow(a,t);if(!o.eql(o.sqr(u),a))throw new Error("Cannot find square root");return u}}if(e%a_===s_){const t=(e-s_)/a_;return function(o,a){const u=o.mul(a,hi),f=o.pow(u,t),g=o.mul(a,f),h=o.mul(o.mul(g,hi),f),d=o.mul(g,o.sub(h,o.ONE));if(!o.eql(o.sqr(d),a))throw new Error("Cannot find square root");return d}}return Hb(e)}const aN=(e,t)=>(Un(e,t)&$t)===$t;xt.isNegativeLE=aN;const uN=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fN(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=uN.reduce((o,a)=>(o[a]="function",o),t);return(0,Hn.validateObject)(e,n)}function Wb(e,t,n){if(n<sn)throw new Error("Expected power > 0");if(n===sn)return e.ONE;if(n===$t)return t;let o=e.ONE,a=t;for(;n>sn;)n&$t&&(o=e.mul(o,a)),a=e.sqr(a),n>>=$t;return o}function zb(e,t){const n=new Array(t.length),o=t.reduce((u,f,g)=>e.is0(f)?u:(n[g]=u,e.mul(u,f)),e.ONE),a=e.inv(o);return t.reduceRight((u,f,g)=>e.is0(f)?u:(n[g]=e.mul(u,n[g]),e.mul(u,f)),a),n}function lN(e,t,n){return e.mul(t,typeof n=="bigint"?lu(n,e.ORDER):e.inv(n))}function cN(e){const t=(e.ORDER-$t)/hi;return n=>{const o=e.pow(n,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function Sd(e,t){const n=t!==void 0?t:e.toString(2).length,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}function dN(e,t,n=!1,o={}){if(e<=sn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=Sd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=jb(e),g=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,Hn.bitMask)(a),ZERO:sn,ONE:$t,create:h=>Un(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof h}`);return sn<=h&&h<e},is0:h=>h===sn,isOdd:h=>(h&$t)===$t,neg:h=>Un(-h,e),eql:(h,d)=>h===d,sqr:h=>Un(h*h,e),add:(h,d)=>Un(h+d,e),sub:(h,d)=>Un(h-d,e),mul:(h,d)=>Un(h*d,e),pow:(h,d)=>Wb(g,h,d),div:(h,d)=>Un(h*lu(d,e),e),sqrN:h=>h*h,addN:(h,d)=>h+d,subN:(h,d)=>h-d,mulN:(h,d)=>h*d,inv:h=>lu(h,e),sqrt:o.sqrt||(h=>f(g,h)),invertBatch:h=>zb(g,h),cmov:(h,d,_)=>_?d:h,toBytes:h=>n?(0,Hn.numberToBytesLE)(h,u):(0,Hn.numberToBytesBE)(h,u),fromBytes:h=>{if(h.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${h.length}`);return n?(0,Hn.bytesToNumberLE)(h):(0,Hn.bytesToNumberBE)(h)}});return Object.freeze(g)}function hN(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)}function gN(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n}function _N(e,t,n=!1){e=(0,Hn.ensureBytes)("privateHash",e);const o=e.length,a=Sd(t).nByteLength+8;if(a<24||o<a||o>1024)throw new Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${o}`);const u=n?(0,Hn.bytesToNumberLE)(e):(0,Hn.bytesToNumberBE)(e);return Un(u,t-$t)+$t}function Rd(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 qb(e){const t=Rd(e);return t+Math.ceil(t/2)}function pN(e,t,n=!1){const o=e.length,a=Rd(t),u=qb(t);if(o<16||o<u||o>1024)throw new Error(`expected ${u}-1024 bytes of input, got ${o}`);const f=n?(0,Hn.bytesToNumberBE)(e):(0,Hn.bytesToNumberLE)(e),g=Un(f,t-$t)+$t;return n?(0,Hn.numberToBytesLE)(g,a):(0,Hn.numberToBytesBE)(g,a)}Object.defineProperty(Wu,"__esModule",{value:!0});Wu.wNAF=yN;Wu.validateBasic=mN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u_=xt,bN=St,wN=BigInt(0),Kl=BigInt(1);function yN(e,t){const n=(a,u)=>{const f=u.negate();return a?f:u},o=a=>{const u=Math.ceil(t/a)+1,f=2**(a-1);return{windows:u,windowSize:f}};return{constTimeNegate:n,unsafeLadder(a,u){let f=e.ZERO,g=a;for(;u>wN;)u&Kl&&(f=f.add(g)),g=g.double(),u>>=Kl;return f},precomputeWindow(a,u){const{windows:f,windowSize:g}=o(u),h=[];let d=a,_=d;for(let w=0;w<f;w++){_=d,h.push(_);for(let E=1;E<g;E++)_=_.add(d),h.push(_);d=_.double()}return h},wNAF(a,u,f){const{windows:g,windowSize:h}=o(a);let d=e.ZERO,_=e.BASE;const w=BigInt(2**a-1),E=2**a,y=BigInt(a);for(let N=0;N<g;N++){const k=N*h;let U=Number(f&w);f>>=y,U>h&&(U-=E,f+=Kl);const V=k,j=k+Math.abs(U)-1,P=N%2!==0,C=U<0;U===0?_=_.add(n(P,u[V])):d=d.add(n(C,u[j]))}return{p:d,f:_}},wNAFCached(a,u,f,g){const h=a._WINDOW_SIZE||1;let d=u.get(a);return d||(d=this.precomputeWindow(a,h),h!==1&&u.set(a,g(d))),this.wNAF(h,d,f)}}}function mN(e){return(0,u_.validateField)(e.Fp),(0,bN.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,u_.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=y,e.weierstrass=k,e.SWUFpSqrtRatio=U,e.mapToCurveSimpleSWU=V;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Wu,n=xt,o=St,a=St;function u(j){const P=(0,t.validateBasic)(j);o.validateObject(P,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:C,Fp:K,a:se}=P;if(C){if(!K.eql(se,K.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof C!="object"||typeof C.beta!="bigint"||typeof C.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...P})}const{bytesToNumberBE:f,hexToBytes:g}=o;e.DER={Err:class extends Error{constructor(P=""){super(P)}},_parseInt(j){const{Err:P}=e.DER;if(j.length<2||j[0]!==2)throw new P("Invalid signature integer tag");const C=j[1],K=j.subarray(2,C+2);if(!C||K.length!==C)throw new P("Invalid signature integer: wrong length");if(K[0]&128)throw new P("Invalid signature integer: negative");if(K[0]===0&&!(K[1]&128))throw new P("Invalid signature integer: unnecessary leading zero");return{d:f(K),l:j.subarray(C+2)}},toSig(j){const{Err:P}=e.DER,C=typeof j=="string"?g(j):j;o.abytes(C);let K=C.length;if(K<2||C[0]!=48)throw new P("Invalid signature tag");if(C[1]!==K-2)throw new P("Invalid signature: incorrect length");const{d:se,l:re}=e.DER._parseInt(C.subarray(2)),{d:ge,l:le}=e.DER._parseInt(re);if(le.length)throw new P("Invalid signature: left bytes after parsing");return{r:se,s:ge}},hexFromSig(j){const P=we=>Number.parseInt(we[0],16)&8?"00"+we:we,C=we=>{const p=we.toString(16);return p.length&1?`0${p}`:p},K=P(C(j.s)),se=P(C(j.r)),re=K.length/2,ge=se.length/2,le=C(re),Ae=C(ge);return`30${C(ge+re+4)}02${Ae}${se}02${le}${K}`}};const h=BigInt(0),d=BigInt(1),_=BigInt(2),w=BigInt(3),E=BigInt(4);function y(j){const P=u(j),{Fp:C}=P,K=P.toBytes||((W,D,J)=>{const M=D.toAffine();return o.concatBytes(Uint8Array.from([4]),C.toBytes(M.x),C.toBytes(M.y))}),se=P.fromBytes||(W=>{const D=W.subarray(1),J=C.fromBytes(D.subarray(0,C.BYTES)),M=C.fromBytes(D.subarray(C.BYTES,2*C.BYTES));return{x:J,y:M}});function re(W){const{a:D,b:J}=P,M=C.sqr(W),q=C.mul(M,W);return C.add(C.add(q,C.mul(W,D)),J)}if(!C.eql(C.sqr(P.Gy),re(P.Gx)))throw new Error("bad generator point: equation left != right");function ge(W){return typeof W=="bigint"&&h<W&&W<P.n}function le(W){if(!ge(W))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Ae(W){const{allowedPrivateKeyLengths:D,nByteLength:J,wrapPrivateKey:M,n:q}=P;if(D&&typeof W!="bigint"){if(o.isBytes(W)&&(W=o.bytesToHex(W)),typeof W!="string"||!D.includes(W.length))throw new Error("Invalid key");W=W.padStart(J*2,"0")}let te;try{te=typeof W=="bigint"?W:o.bytesToNumberBE((0,a.ensureBytes)("private key",W,J))}catch{throw new Error(`private key must be ${J} bytes, hex or bigint, not ${typeof W}`)}return M&&(te=n.mod(te,q)),le(te),te}const we=new Map;function p(W){if(!(W instanceof v))throw new Error("ProjectivePoint expected")}class v{constructor(D,J,M){if(this.px=D,this.py=J,this.pz=M,D==null||!C.isValid(D))throw new Error("x required");if(J==null||!C.isValid(J))throw new Error("y required");if(M==null||!C.isValid(M))throw new Error("z required")}static fromAffine(D){const{x:J,y:M}=D||{};if(!D||!C.isValid(J)||!C.isValid(M))throw new Error("invalid affine point");if(D instanceof v)throw new Error("projective point not allowed");const q=te=>C.eql(te,C.ZERO);return q(J)&&q(M)?v.ZERO:new v(J,M,C.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(D){const J=C.invertBatch(D.map(M=>M.pz));return D.map((M,q)=>M.toAffine(J[q])).map(v.fromAffine)}static fromHex(D){const J=v.fromAffine(se((0,a.ensureBytes)("pointHex",D)));return J.assertValidity(),J}static fromPrivateKey(D){return v.BASE.multiply(Ae(D))}_setWindowSize(D){this._WINDOW_SIZE=D,we.delete(this)}assertValidity(){if(this.is0()){if(P.allowInfinityPoint&&!C.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:D,y:J}=this.toAffine();if(!C.isValid(D)||!C.isValid(J))throw new Error("bad point: x or y not FE");const M=C.sqr(J),q=re(D);if(!C.eql(M,q))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:D}=this.toAffine();if(C.isOdd)return!C.isOdd(D);throw new Error("Field doesn't support isOdd")}equals(D){p(D);const{px:J,py:M,pz:q}=this,{px:te,py:de,pz:Q}=D,ye=C.eql(C.mul(J,Q),C.mul(te,q)),_e=C.eql(C.mul(M,Q),C.mul(de,q));return ye&&_e}negate(){return new v(this.px,C.neg(this.py),this.pz)}double(){const{a:D,b:J}=P,M=C.mul(J,w),{px:q,py:te,pz:de}=this;let Q=C.ZERO,ye=C.ZERO,_e=C.ZERO,Se=C.mul(q,q),Fe=C.mul(te,te),Ce=C.mul(de,de),Be=C.mul(q,te);return Be=C.add(Be,Be),_e=C.mul(q,de),_e=C.add(_e,_e),Q=C.mul(D,_e),ye=C.mul(M,Ce),ye=C.add(Q,ye),Q=C.sub(Fe,ye),ye=C.add(Fe,ye),ye=C.mul(Q,ye),Q=C.mul(Be,Q),_e=C.mul(M,_e),Ce=C.mul(D,Ce),Be=C.sub(Se,Ce),Be=C.mul(D,Be),Be=C.add(Be,_e),_e=C.add(Se,Se),Se=C.add(_e,Se),Se=C.add(Se,Ce),Se=C.mul(Se,Be),ye=C.add(ye,Se),Ce=C.mul(te,de),Ce=C.add(Ce,Ce),Se=C.mul(Ce,Be),Q=C.sub(Q,Se),_e=C.mul(Ce,Fe),_e=C.add(_e,_e),_e=C.add(_e,_e),new v(Q,ye,_e)}add(D){p(D);const{px:J,py:M,pz:q}=this,{px:te,py:de,pz:Q}=D;let ye=C.ZERO,_e=C.ZERO,Se=C.ZERO;const Fe=P.a,Ce=C.mul(P.b,w);let Be=C.mul(J,te),et=C.mul(M,de),Je=C.mul(q,Q),We=C.add(J,M),x=C.add(te,de);We=C.mul(We,x),x=C.add(Be,et),We=C.sub(We,x),x=C.add(J,q);let H=C.add(te,Q);return x=C.mul(x,H),H=C.add(Be,Je),x=C.sub(x,H),H=C.add(M,q),ye=C.add(de,Q),H=C.mul(H,ye),ye=C.add(et,Je),H=C.sub(H,ye),Se=C.mul(Fe,x),ye=C.mul(Ce,Je),Se=C.add(ye,Se),ye=C.sub(et,Se),Se=C.add(et,Se),_e=C.mul(ye,Se),et=C.add(Be,Be),et=C.add(et,Be),Je=C.mul(Fe,Je),x=C.mul(Ce,x),et=C.add(et,Je),Je=C.sub(Be,Je),Je=C.mul(Fe,Je),x=C.add(x,Je),Be=C.mul(et,x),_e=C.add(_e,Be),Be=C.mul(H,x),ye=C.mul(We,ye),ye=C.sub(ye,Be),Be=C.mul(We,et),Se=C.mul(H,Se),Se=C.add(Se,Be),new v(ye,_e,Se)}subtract(D){return this.add(D.negate())}is0(){return this.equals(v.ZERO)}wNAF(D){return B.wNAFCached(this,we,D,J=>{const M=C.invertBatch(J.map(q=>q.pz));return J.map((q,te)=>q.toAffine(M[te])).map(v.fromAffine)})}multiplyUnsafe(D){const J=v.ZERO;if(D===h)return J;if(le(D),D===d)return this;const{endo:M}=P;if(!M)return B.unsafeLadder(this,D);let{k1neg:q,k1:te,k2neg:de,k2:Q}=M.splitScalar(D),ye=J,_e=J,Se=this;for(;te>h||Q>h;)te&d&&(ye=ye.add(Se)),Q&d&&(_e=_e.add(Se)),Se=Se.double(),te>>=d,Q>>=d;return q&&(ye=ye.negate()),de&&(_e=_e.negate()),_e=new v(C.mul(_e.px,M.beta),_e.py,_e.pz),ye.add(_e)}multiply(D){le(D);let J=D,M,q;const{endo:te}=P;if(te){const{k1neg:de,k1:Q,k2neg:ye,k2:_e}=te.splitScalar(J);let{p:Se,f:Fe}=this.wNAF(Q),{p:Ce,f:Be}=this.wNAF(_e);Se=B.constTimeNegate(de,Se),Ce=B.constTimeNegate(ye,Ce),Ce=new v(C.mul(Ce.px,te.beta),Ce.py,Ce.pz),M=Se.add(Ce),q=Fe.add(Be)}else{const{p:de,f:Q}=this.wNAF(J);M=de,q=Q}return v.normalizeZ([M,q])[0]}multiplyAndAddUnsafe(D,J,M){const q=v.BASE,te=(Q,ye)=>ye===h||ye===d||!Q.equals(q)?Q.multiplyUnsafe(ye):Q.multiply(ye),de=te(this,J).add(te(D,M));return de.is0()?void 0:de}toAffine(D){const{px:J,py:M,pz:q}=this,te=this.is0();D==null&&(D=te?C.ONE:C.inv(q));const de=C.mul(J,D),Q=C.mul(M,D),ye=C.mul(q,D);if(te)return{x:C.ZERO,y:C.ZERO};if(!C.eql(ye,C.ONE))throw new Error("invZ was invalid");return{x:de,y:Q}}isTorsionFree(){const{h:D,isTorsionFree:J}=P;if(D===d)return!0;if(J)return J(v,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:D,clearCofactor:J}=P;return D===d?this:J?J(v,this):this.multiplyUnsafe(P.h)}toRawBytes(D=!0){return this.assertValidity(),K(v,this,D)}toHex(D=!0){return o.bytesToHex(this.toRawBytes(D))}}v.BASE=new v(P.Gx,P.Gy,C.ONE),v.ZERO=new v(C.ZERO,C.ONE,C.ZERO);const A=P.nBitLength,B=(0,t.wNAF)(v,P.endo?Math.ceil(A/2):A);return{CURVE:P,ProjectivePoint:v,normPrivateKeyToScalar:Ae,weierstrassEquation:re,isWithinCurveOrder:ge}}function N(j){const P=(0,t.validateBasic)(j);return o.validateObject(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function k(j){const P=N(j),{Fp:C,n:K}=P,se=C.BYTES+1,re=2*C.BYTES+1;function ge(x){return h<x&&x<C.ORDER}function le(x){return n.mod(x,K)}function Ae(x){return n.invert(x,K)}const{ProjectivePoint:we,normPrivateKeyToScalar:p,weierstrassEquation:v,isWithinCurveOrder:A}=y({...P,toBytes(x,H,ne){const Ie=H.toAffine(),be=C.toBytes(Ie.x),Pe=o.concatBytes;return ne?Pe(Uint8Array.from([H.hasEvenY()?2:3]),be):Pe(Uint8Array.from([4]),be,C.toBytes(Ie.y))},fromBytes(x){const H=x.length,ne=x[0],Ie=x.subarray(1);if(H===se&&(ne===2||ne===3)){const be=o.bytesToNumberBE(Ie);if(!ge(be))throw new Error("Point is not on curve");const Pe=v(be);let qe;try{qe=C.sqrt(Pe)}catch($e){const ut=$e instanceof Error?": "+$e.message:"";throw new Error("Point is not on curve"+ut)}const je=(qe&d)===d;return(ne&1)===1!==je&&(qe=C.neg(qe)),{x:be,y:qe}}else if(H===re&&ne===4){const be=C.fromBytes(Ie.subarray(0,C.BYTES)),Pe=C.fromBytes(Ie.subarray(C.BYTES,2*C.BYTES));return{x:be,y:Pe}}else throw new Error(`Point of length ${H} was invalid. Expected ${se} compressed bytes or ${re} uncompressed bytes`)}}),B=x=>o.bytesToHex(o.numberToBytesBE(x,P.nByteLength));function W(x){const H=K>>d;return x>H}function D(x){return W(x)?le(-x):x}const J=(x,H,ne)=>o.bytesToNumberBE(x.slice(H,ne));class M{constructor(H,ne,Ie){this.r=H,this.s=ne,this.recovery=Ie,this.assertValidity()}static fromCompact(H){const ne=P.nByteLength;return H=(0,a.ensureBytes)("compactSignature",H,ne*2),new M(J(H,0,ne),J(H,ne,2*ne))}static fromDER(H){const{r:ne,s:Ie}=e.DER.toSig((0,a.ensureBytes)("DER",H));return new M(ne,Ie)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(H){return new M(this.r,this.s,H)}recoverPublicKey(H){const{r:ne,s:Ie,recovery:be}=this,Pe=_e((0,a.ensureBytes)("msgHash",H));if(be==null||![0,1,2,3].includes(be))throw new Error("recovery id invalid");const qe=be===2||be===3?ne+P.n:ne;if(qe>=C.ORDER)throw new Error("recovery id 2 or 3 invalid");const je=be&1?"03":"02",nt=we.fromHex(je+B(qe)),$e=Ae(qe),ut=le(-Pe*$e),Ft=le(Ie*$e),pt=we.BASE.multiplyAndAddUnsafe(nt,ut,Ft);if(!pt)throw new Error("point at infinify");return pt.assertValidity(),pt}hasHighS(){return W(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,le(-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 B(this.r)+B(this.s)}}const q={isValidPrivateKey(x){try{return p(x),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const x=n.getMinHashLength(P.n);return n.mapHashToField(P.randomBytes(x),P.n)},precompute(x=8,H=we.BASE){return H._setWindowSize(x),H.multiply(BigInt(3)),H}};function te(x,H=!0){return we.fromPrivateKey(x).toRawBytes(H)}function de(x){const H=o.isBytes(x),ne=typeof x=="string",Ie=(H||ne)&&x.length;return H?Ie===se||Ie===re:ne?Ie===2*se||Ie===2*re:x instanceof we}function Q(x,H,ne=!0){if(de(x))throw new Error("first arg must be private key");if(!de(H))throw new Error("second arg must be public key");return we.fromHex(H).multiply(p(x)).toRawBytes(ne)}const ye=P.bits2int||function(x){const H=o.bytesToNumberBE(x),ne=x.length*8-P.nBitLength;return ne>0?H>>BigInt(ne):H},_e=P.bits2int_modN||function(x){return le(ye(x))},Se=o.bitMask(P.nBitLength);function Fe(x){if(typeof x!="bigint")throw new Error("bigint expected");if(!(h<=x&&x<Se))throw new Error(`bigint expected < 2^${P.nBitLength}`);return o.numberToBytesBE(x,P.nByteLength)}function Ce(x,H,ne=Be){if(["recovered","canonical"].some(It=>It in ne))throw new Error("sign() legacy options not supported");const{hash:Ie,randomBytes:be}=P;let{lowS:Pe,prehash:qe,extraEntropy:je}=ne;Pe==null&&(Pe=!0),x=(0,a.ensureBytes)("msgHash",x),qe&&(x=(0,a.ensureBytes)("prehashed msgHash",Ie(x)));const nt=_e(x),$e=p(H),ut=[Fe($e),Fe(nt)];if(je!=null&&je!==!1){const It=je===!0?be(C.BYTES):je;ut.push((0,a.ensureBytes)("extraEntropy",It))}const Ft=o.concatBytes(...ut),pt=nt;function ln(It){const lt=ye(It);if(!A(lt))return;const Dt=Ae(lt),Ut=we.BASE.multiply(lt).toAffine(),T=le(Ut.x);if(T===h)return;const me=le(Dt*le(pt+T*$e));if(me===h)return;let Oe=(Ut.x===T?0:2)|Number(Ut.y&d),xe=me;return Pe&&W(me)&&(xe=D(me),Oe^=1),new M(T,xe,Oe)}return{seed:Ft,k2sig:ln}}const Be={lowS:P.lowS,prehash:!1},et={lowS:P.lowS,prehash:!1};function Je(x,H,ne=Be){const{seed:Ie,k2sig:be}=Ce(x,H,ne),Pe=P;return o.createHmacDrbg(Pe.hash.outputLen,Pe.nByteLength,Pe.hmac)(Ie,be)}we.BASE._setWindowSize(8);function We(x,H,ne,Ie=et){var Ut;const be=x;if(H=(0,a.ensureBytes)("msgHash",H),ne=(0,a.ensureBytes)("publicKey",ne),"strict"in Ie)throw new Error("options.strict was renamed to lowS");const{lowS:Pe,prehash:qe}=Ie;let je,nt;try{if(typeof be=="string"||o.isBytes(be))try{je=M.fromDER(be)}catch(T){if(!(T instanceof e.DER.Err))throw T;je=M.fromCompact(be)}else if(typeof be=="object"&&typeof be.r=="bigint"&&typeof be.s=="bigint"){const{r:T,s:me}=be;je=new M(T,me)}else throw new Error("PARSE");nt=we.fromHex(ne)}catch(T){if(T.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Pe&&je.hasHighS())return!1;qe&&(H=P.hash(H));const{r:$e,s:ut}=je,Ft=_e(H),pt=Ae(ut),ln=le(Ft*pt),It=le($e*pt),lt=(Ut=we.BASE.multiplyAndAddUnsafe(nt,ln,It))==null?void 0:Ut.toAffine();return lt?le(lt.x)===$e:!1}return{CURVE:P,getPublicKey:te,getSharedSecret:Q,sign:Je,verify:We,ProjectivePoint:we,Signature:M,utils:q}}function U(j,P){const C=j.ORDER;let K=h;for(let W=C-d;W%_===h;W/=_)K+=d;const se=K,re=_<<se-d-d,ge=re*_,le=(C-d)/ge,Ae=(le-d)/_,we=ge-d,p=re,v=j.pow(P,le),A=j.pow(P,(le+d)/_);let B=(W,D)=>{let J=v,M=j.pow(D,we),q=j.sqr(M);q=j.mul(q,D);let te=j.mul(W,q);te=j.pow(te,Ae),te=j.mul(te,M),M=j.mul(te,D),q=j.mul(te,W);let de=j.mul(q,M);te=j.pow(de,p);let Q=j.eql(te,j.ONE);M=j.mul(q,A),te=j.mul(de,J),q=j.cmov(M,q,Q),de=j.cmov(te,de,Q);for(let ye=se;ye>d;ye--){let _e=ye-_;_e=_<<_e-d;let Se=j.pow(de,_e);const Fe=j.eql(Se,j.ONE);M=j.mul(q,J),J=j.mul(J,J),Se=j.mul(de,J),q=j.cmov(M,q,Fe),de=j.cmov(Se,de,Fe)}return{isValid:Q,value:q}};if(j.ORDER%E===w){const W=(j.ORDER-w)/E,D=j.sqrt(j.neg(P));B=(J,M)=>{let q=j.sqr(M);const te=j.mul(J,M);q=j.mul(q,te);let de=j.pow(q,W);de=j.mul(de,te);const Q=j.mul(de,D),ye=j.mul(j.sqr(de),M),_e=j.eql(ye,J);let Se=j.cmov(Q,de,_e);return{isValid:_e,value:Se}}}return B}function V(j,P){if(n.validateField(j),!j.isValid(P.A)||!j.isValid(P.B)||!j.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const C=U(j,P.Z);if(!j.isOdd)throw new Error("Fp.isOdd is not implemented!");return K=>{let se,re,ge,le,Ae,we,p,v;se=j.sqr(K),se=j.mul(se,P.Z),re=j.sqr(se),re=j.add(re,se),ge=j.add(re,j.ONE),ge=j.mul(ge,P.B),le=j.cmov(P.Z,j.neg(re),!j.eql(re,j.ZERO)),le=j.mul(le,P.A),re=j.sqr(ge),we=j.sqr(le),Ae=j.mul(we,P.A),re=j.add(re,Ae),re=j.mul(re,ge),we=j.mul(we,le),Ae=j.mul(we,P.B),re=j.add(re,Ae),p=j.mul(se,ge);const{isValid:A,value:B}=C(re,we);v=j.mul(se,K),v=j.mul(v,B),p=j.cmov(p,ge,A),v=j.cmov(v,B,A);const W=j.isOdd(K)===j.isOdd(v);return v=j.cmov(j.neg(v),v,W),p=j.div(p,le),{x:p,y:v}}}})(md);Object.defineProperty(ju,"__esModule",{value:!0});ju.getHash=Vb;ju.createCurve=SN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vN=xb,f_=Jr,EN=md;function Vb(e){return{hash:e,hmac:(t,...n)=>(0,vN.hmac)(e,t,(0,f_.concatBytes)(...n)),randomBytes:f_.randomBytes}}function SN(e,t){const n=o=>(0,EN.weierstrass)({...e,...Vb(o)});return Object.freeze({...n(t),create:n})}var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.expand_message_xmd=Gb;Vi.expand_message_xof=Zb;Vi.hash_to_field=Cc;Vi.isogenyMap=TN;Vi.createHasher=ON;const RN=xt,bn=St,AN=bn.bytesToNumberBE;function di(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)n[o]=e&255,e>>>=8;return new Uint8Array(n)}function IN(e,t){const n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e[o]^t[o];return n}function Ad(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function Gb(e,t,n,o){(0,bn.abytes)(e),(0,bn.abytes)(t),Ad(n),t.length>255&&(t=o((0,bn.concatBytes)((0,bn.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:a,blockLen:u}=o,f=Math.ceil(n/a);if(f>255)throw new Error("Invalid xmd length");const g=(0,bn.concatBytes)(t,di(t.length,1)),h=di(0,u),d=di(n,2),_=new Array(f),w=o((0,bn.concatBytes)(h,e,d,di(0,1),g));_[0]=o((0,bn.concatBytes)(w,di(1,1),g));for(let y=1;y<=f;y++){const N=[IN(w,_[y-1]),di(y+1,1),g];_[y]=o((0,bn.concatBytes)(...N))}return(0,bn.concatBytes)(..._).slice(0,n)}function Zb(e,t,n,o,a){if((0,bn.abytes)(e),(0,bn.abytes)(t),Ad(n),t.length>255){const u=Math.ceil(2*o/8);t=a.create({dkLen:u}).update((0,bn.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:n}).update(e).update(di(n,2)).update(t).update(di(t.length,1)).digest()}function Cc(e,t,n){(0,bn.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:a,m:u,hash:f,expand:g,DST:h}=n;(0,bn.abytes)(e),Ad(t);const d=typeof h=="string"?(0,bn.utf8ToBytes)(h):h,_=o.toString(2).length,w=Math.ceil((_+a)/8),E=t*u*w;let y;if(g==="xmd")y=Gb(e,d,E,f);else if(g==="xof")y=Zb(e,d,E,a,f);else if(g==="_internal_pass")y=e;else throw new Error('expand must be "xmd" or "xof"');const N=new Array(t);for(let k=0;k<t;k++){const U=new Array(u);for(let V=0;V<u;V++){const j=w*(V+k*u),P=y.subarray(j,j+w);U[V]=(0,RN.mod)(AN(P),o)}N[k]=U}return N}function TN(e,t){const n=t.map(o=>Array.from(o).reverse());return(o,a)=>{const[u,f,g,h]=n.map(d=>d.reduce((_,w)=>e.add(e.mul(_,o),w)));return o=e.div(u,f),a=e.mul(a,e.div(g,h)),{x:o,y:a}}}function ON(e,t,n){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,a){const u=Cc(o,2,{...n,DST:n.DST,...a}),f=e.fromAffine(t(u[0])),g=e.fromAffine(t(u[1])),h=f.add(g).clearCofactor();return h.assertValidity(),h},encodeToCurve(o,a){const u=Cc(o,1,{...n,DST:n.encodeDST,...a}),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 a=e.fromAffine(t(o)).clearCofactor();return a.assertValidity(),a}}}(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=To,n=Jr,o=ju,a=Vi,u=xt,f=St,g=md,h=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_=BigInt(1),w=BigInt(2),E=(M,q)=>(M+q/w)/q;function y(M){const q=h,te=BigInt(3),de=BigInt(6),Q=BigInt(11),ye=BigInt(22),_e=BigInt(23),Se=BigInt(44),Fe=BigInt(88),Ce=M*M*M%q,Be=Ce*Ce*M%q,et=(0,u.pow2)(Be,te,q)*Be%q,Je=(0,u.pow2)(et,te,q)*Be%q,We=(0,u.pow2)(Je,w,q)*Ce%q,x=(0,u.pow2)(We,Q,q)*We%q,H=(0,u.pow2)(x,ye,q)*x%q,ne=(0,u.pow2)(H,Se,q)*H%q,Ie=(0,u.pow2)(ne,Fe,q)*ne%q,be=(0,u.pow2)(Ie,Se,q)*H%q,Pe=(0,u.pow2)(be,te,q)*Be%q,qe=(0,u.pow2)(Pe,_e,q)*x%q,je=(0,u.pow2)(qe,de,q)*Ce%q,nt=(0,u.pow2)(je,w,q);if(!N.eql(N.sqr(nt),M))throw new Error("Cannot find square root");return nt}const N=(0,u.Field)(h,void 0,void 0,{sqrt:y});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:N,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:M=>{const q=d,te=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),de=-_*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Q=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ye=te,_e=BigInt("0x100000000000000000000000000000000"),Se=E(ye*M,q),Fe=E(-de*M,q);let Ce=(0,u.mod)(M-Se*te-Fe*Q,q),Be=(0,u.mod)(-Se*de-Fe*ye,q);const et=Ce>_e,Je=Be>_e;if(et&&(Ce=q-Ce),Je&&(Be=q-Be),Ce>_e||Be>_e)throw new Error("splitScalar: Endomorphism failed, k="+M);return{k1neg:et,k1:Ce,k2neg:Je,k2:Be}}}},t.sha256);const k=BigInt(0),U=M=>typeof M=="bigint"&&k<M&&M<h,V=M=>typeof M=="bigint"&&k<M&&M<d,j={};function P(M,...q){let te=j[M];if(te===void 0){const de=(0,t.sha256)(Uint8Array.from(M,Q=>Q.charCodeAt(0)));te=(0,f.concatBytes)(de,de),j[M]=te}return(0,t.sha256)((0,f.concatBytes)(te,...q))}const C=M=>M.toRawBytes(!0).slice(1),K=M=>(0,f.numberToBytesBE)(M,32),se=M=>(0,u.mod)(M,h),re=M=>(0,u.mod)(M,d),ge=e.secp256k1.ProjectivePoint,le=(M,q,te)=>ge.BASE.multiplyAndAddUnsafe(M,q,te);function Ae(M){let q=e.secp256k1.utils.normPrivateKeyToScalar(M),te=ge.fromPrivateKey(q);return{scalar:te.hasEvenY()?q:re(-q),bytes:C(te)}}function we(M){if(!U(M))throw new Error("bad x: need 0 < x < p");const q=se(M*M),te=se(q*M+BigInt(7));let de=y(te);de%w!==k&&(de=se(-de));const Q=new ge(M,de,_);return Q.assertValidity(),Q}function p(...M){return re((0,f.bytesToNumberBE)(P("BIP0340/challenge",...M)))}function v(M){return Ae(M).bytes}function A(M,q,te=(0,n.randomBytes)(32)){const de=(0,f.ensureBytes)("message",M),{bytes:Q,scalar:ye}=Ae(q),_e=(0,f.ensureBytes)("auxRand",te,32),Se=K(ye^(0,f.bytesToNumberBE)(P("BIP0340/aux",_e))),Fe=P("BIP0340/nonce",Se,Q,de),Ce=re((0,f.bytesToNumberBE)(Fe));if(Ce===k)throw new Error("sign failed: k is zero");const{bytes:Be,scalar:et}=Ae(Ce),Je=p(Be,Q,de),We=new Uint8Array(64);if(We.set(Be,0),We.set(K(re(et+Je*ye)),32),!B(We,de,Q))throw new Error("sign: Invalid signature produced");return We}function B(M,q,te){const de=(0,f.ensureBytes)("signature",M,64),Q=(0,f.ensureBytes)("message",q),ye=(0,f.ensureBytes)("publicKey",te,32);try{const _e=we((0,f.bytesToNumberBE)(ye)),Se=(0,f.bytesToNumberBE)(de.subarray(0,32));if(!U(Se))return!1;const Fe=(0,f.bytesToNumberBE)(de.subarray(32,64));if(!V(Fe))return!1;const Ce=p(K(Se),C(_e),Q),Be=le(_e,Fe,re(-Ce));return!(!Be||!Be.hasEvenY()||Be.toAffine().x!==Se)}catch{return!1}}e.schnorr={getPublicKey:v,sign:A,verify:B,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:we,pointToBytes:C,numberToBytesBE:f.numberToBytesBE,bytesToNumberBE:f.bytesToNumberBE,taggedHash:P,mod:u.mod}};const W=(0,a.isogenyMap)(N,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(M=>M.map(q=>BigInt(q)))),D=(0,g.mapToCurveSimpleSWU)(N,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:N.create(BigInt("-11"))}),J=(0,a.createHasher)(e.secp256k1.ProjectivePoint,M=>{const{x:q,y:te}=D(N.create(M[0]));return W(q,te)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:N.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=J.hashToCurve,e.encodeToCurve=J.encodeToCurve})(Ob);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=Ob;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Uu);(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=Lr,n=Uu;e.MAX_UINT64=BigInt("0xffffffffffffffff"),e.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),e.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),e.SECP256K1_ORDER=n.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=n.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})(Fu);var Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.GWEI_TO_WEI=void 0;Zu.GWEI_TO_WEI=BigInt(1e9);var Id={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.RLP=Ar.utils=Ar.decode=Ar.encode=void 0;function Td(e){if(Array.isArray(e)){const n=[];let o=0;for(let a=0;a<e.length;a++){const u=Td(e[a]);n.push(u),o+=u.length}return Nc(c_(o,192),...n)}const t=ew(e);return t.length===1&&t[0]<128?t:Nc(c_(t.length,128),t)}Ar.encode=Td;function po(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function l_(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return Xb(Jb(e))}function c_(e,t){if(e<56)return Uint8Array.from([e+t]);const n=Bc(e),o=n.length/2,a=Bc(t+55+o);return Uint8Array.from(cu(a+n))}function Kb(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const n=ew(e),o=Pc(n);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}Ar.decode=Kb;function Pc(e){let t,n,o,a,u;const f=[],g=e[0];if(g<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(g<=183){if(t=g-127,g===128?o=Uint8Array.from([]):o=po(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(g<=191){if(n=g-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=l_(po(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=po(e,n,t+n),{data:o,remainder:e.slice(t+n)}}else if(g<=247){for(t=g-191,a=po(e,1,t);a.length;)u=Pc(a),f.push(u.data),a=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(n=g-246,t=l_(po(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const h=n+t;if(h>e.length)throw new Error("invalid RLP: total length is larger than the data");for(a=po(e,n,h);a.length;)u=Pc(a),f.push(u.data),a=u.remainder;return{data:f,remainder:e.slice(h)}}}const LN=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Jb(e){let t="";for(let n=0;n<e.length;n++)t+=LN[e[n]];return t}function Xb(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function cu(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 n=0;n<t.length;n++){const o=n*2;t[n]=Xb(e.slice(o,o+2))}return t}function Nc(...e){if(e.length===1)return e[0];const t=e.reduce((o,a)=>o+a.length,0),n=new Uint8Array(t);for(let o=0,a=0;o<e.length;o++){const u=e[o];n.set(u,a),a+=u.length}return n}function Yb(e){return new TextEncoder().encode(e)}function Bc(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 CN(e){return e.length%2?`0${e}`:e}function Qb(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function PN(e){return typeof e!="string"?e:Qb(e)?e.slice(2):e}function ew(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return Qb(e)?cu(CN(PN(e))):Yb(e);if(typeof e=="number"||typeof e=="bigint")return e?cu(Bc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}Ar.utils={bytesToHex:Jb,concatBytes:Nc,hexToBytes:cu,utf8ToBytes:Yb};Ar.RLP={encode:Td,decode:Kb};var dr={},Nt={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.add5L=tt.add5H=tt.add4H=tt.add4L=tt.add3H=tt.add3L=tt.add=tt.rotlBL=tt.rotlBH=tt.rotlSL=tt.rotlSH=tt.rotr32L=tt.rotr32H=tt.rotrBL=tt.rotrBH=tt.rotrSL=tt.rotrSH=tt.shrSL=tt.shrSH=tt.toBig=tt.split=tt.fromBig=void 0;const Xa=BigInt(2**32-1),$c=BigInt(32);function Od(e,t=!1){return t?{h:Number(e&Xa),l:Number(e>>$c&Xa)}:{h:Number(e>>$c&Xa)|0,l:Number(e&Xa)|0}}tt.fromBig=Od;function tw(e,t=!1){let n=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let a=0;a<e.length;a++){const{h:u,l:f}=Od(e[a],t);[n[a],o[a]]=[u,f]}return[n,o]}tt.split=tw;const nw=(e,t)=>BigInt(e>>>0)<<$c|BigInt(t>>>0);tt.toBig=nw;const rw=(e,t,n)=>e>>>n;tt.shrSH=rw;const iw=(e,t,n)=>e<<32-n|t>>>n;tt.shrSL=iw;const ow=(e,t,n)=>e>>>n|t<<32-n;tt.rotrSH=ow;const sw=(e,t,n)=>e<<32-n|t>>>n;tt.rotrSL=sw;const aw=(e,t,n)=>e<<64-n|t>>>n-32;tt.rotrBH=aw;const uw=(e,t,n)=>e>>>n-32|t<<64-n;tt.rotrBL=uw;const fw=(e,t)=>t;tt.rotr32H=fw;const lw=(e,t)=>e;tt.rotr32L=lw;const cw=(e,t,n)=>e<<n|t>>>32-n;tt.rotlSH=cw;const dw=(e,t,n)=>t<<n|e>>>32-n;tt.rotlSL=dw;const hw=(e,t,n)=>t<<n-32|e>>>64-n;tt.rotlBH=hw;const gw=(e,t,n)=>e<<n-32|t>>>64-n;tt.rotlBL=gw;function _w(e,t,n,o){const a=(t>>>0)+(o>>>0);return{h:e+n+(a/2**32|0)|0,l:a|0}}tt.add=_w;const pw=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);tt.add3L=pw;const bw=(e,t,n,o)=>t+n+o+(e/2**32|0)|0;tt.add3H=bw;const ww=(e,t,n,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0);tt.add4L=ww;const yw=(e,t,n,o,a)=>t+n+o+a+(e/2**32|0)|0;tt.add4H=yw;const mw=(e,t,n,o,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0)+(a>>>0);tt.add5L=mw;const vw=(e,t,n,o,a,u)=>t+n+o+a+u+(e/2**32|0)|0;tt.add5H=vw;const NN={fromBig:Od,split:tw,toBig:nw,shrSH:rw,shrSL:iw,rotrSH:ow,rotrSL:sw,rotrBH:aw,rotrBL:uw,rotr32H:fw,rotr32L:lw,rotlSH:cw,rotlSL:dw,rotlBH:hw,rotlBL:gw,add:_w,add3L:pw,add3H:bw,add4L:ww,add4H:yw,add5H:vw,add5L:mw};tt.default=NN;Object.defineProperty(Nt,"__esModule",{value:!0});Nt.shake256=Nt.shake128=Nt.keccak_512=Nt.keccak_384=Nt.keccak_256=Nt.keccak_224=Nt.sha3_512=Nt.sha3_384=Nt.sha3_256=Nt.sha3_224=Nt.Keccak=Nt.keccakP=void 0;const bo=Jt,Rs=tt,qr=Jr,Ew=[],Sw=[],Rw=[],BN=BigInt(0),cs=BigInt(1),$N=BigInt(2),xN=BigInt(7),DN=BigInt(256),MN=BigInt(113);for(let e=0,t=cs,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],Ew.push(2*(5*o+n)),Sw.push((e+1)*(e+2)/2%64);let a=BN;for(let u=0;u<7;u++)t=(t<<cs^(t>>xN)*MN)%DN,t&$N&&(a^=cs<<(cs<<BigInt(u))-cs);Rw.push(a)}const[kN,FN]=(0,Rs.split)(Rw,!0),d_=(e,t,n)=>n>32?(0,Rs.rotlBH)(e,t,n):(0,Rs.rotlSH)(e,t,n),h_=(e,t,n)=>n>32?(0,Rs.rotlBL)(e,t,n):(0,Rs.rotlSL)(e,t,n);function Aw(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let f=0;f<10;f++)n[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){const g=(f+8)%10,h=(f+2)%10,d=n[h],_=n[h+1],w=d_(d,_,1)^n[g],E=h_(d,_,1)^n[g+1];for(let y=0;y<50;y+=10)e[f+y]^=w,e[f+y+1]^=E}let a=e[2],u=e[3];for(let f=0;f<24;f++){const g=Sw[f],h=d_(a,u,g),d=h_(a,u,g),_=Ew[f];a=e[_],u=e[_+1],e[_]=h,e[_+1]=d}for(let f=0;f<50;f+=10){for(let g=0;g<10;g++)n[g]=e[f+g];for(let g=0;g<10;g++)e[f+g]^=~n[(g+2)%10]&n[(g+4)%10]}e[0]^=kN[o],e[1]^=FN[o]}n.fill(0)}Nt.keccakP=Aw;class $s extends qr.Hash{constructor(t,n,o,a=!1,u=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=a,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,bo.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,qr.u32)(this.state)}keccak(){qr.isLE||(0,qr.byteSwap32)(this.state32),Aw(this.state32,this.rounds),qr.isLE||(0,qr.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,bo.exists)(this);const{blockLen:n,state:o}=this;t=(0,qr.toBytes)(t);const a=t.length;for(let u=0;u<a;){const f=Math.min(n-this.pos,a-u);for(let g=0;g<f;g++)o[this.pos++]^=t[u++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:a}=this;t[o]^=n,n&128&&o===a-1&&this.keccak(),t[a-1]^=128,this.keccak()}writeInto(t){(0,bo.exists)(this,!1),(0,bo.bytes)(t),this.finish();const n=this.state,{blockLen:o}=this;for(let a=0,u=t.length;a<u;){this.posOut>=o&&this.keccak();const f=Math.min(o-this.posOut,u-a);t.set(n.subarray(this.posOut,this.posOut+f),a),this.posOut+=f,a+=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,bo.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,bo.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:n,suffix:o,outputLen:a,rounds:u,enableXOF:f}=this;return t||(t=new $s(n,o,a,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=a,t.enableXOF=f,t.destroyed=this.destroyed,t}}Nt.Keccak=$s;const mi=(e,t,n)=>(0,qr.wrapConstructor)(()=>new $s(t,e,n));Nt.sha3_224=mi(6,144,224/8);Nt.sha3_256=mi(6,136,256/8);Nt.sha3_384=mi(6,104,384/8);Nt.sha3_512=mi(6,72,512/8);Nt.keccak_224=mi(1,144,224/8);Nt.keccak_256=mi(1,136,256/8);Nt.keccak_384=mi(1,104,384/8);Nt.keccak_512=mi(1,72,512/8);const Iw=(e,t,n)=>(0,qr.wrapXOFConstructorWithOpts)((o={})=>new $s(t,e,o.dkLen===void 0?n:o.dkLen,!0));Nt.shake128=Iw(31,168,128/8);Nt.shake256=Iw(31,136,256/8);var du={exports:{}};du.exports;(function(e,t){var n=At&&At.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};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=h,t.hexToBytes=d,t.equalsBytes=_,t.wrapHash=w;const o=n(Jt),a=Jr,u=o.default.bool;t.assertBool=u;const f=o.default.bytes;t.assertBytes=f;var g=Jr;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return g.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return g.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return g.utf8ToBytes}});function h(E){if(!(E instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof E}`);return new TextDecoder().decode(E)}function d(E){const y=E.startsWith("0x")?E.substring(2):E;return(0,a.hexToBytes)(y)}function _(E,y){if(E.length!==y.length)return!1;for(let N=0;N<E.length;N++)if(E[N]!==y[N])return!1;return!0}function w(E){return y=>(o.default.bytes(y),E(y))}t.crypto=(()=>{const E=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,y=typeof kg=="function"&&kg.bind(e);return{node:y&&!E?y("crypto"):void 0,web:E}})()})(du,du.exports);var Tw=du.exports;Object.defineProperty(dr,"__esModule",{value:!0});dr.keccak512=dr.keccak384=dr.keccak256=dr.keccak224=void 0;const As=Nt,Ku=Tw;dr.keccak224=(0,Ku.wrapHash)(As.keccak_224);dr.keccak256=(()=>{const e=(0,Ku.wrapHash)(As.keccak_256);return e.create=As.keccak_256.create,e})();dr.keccak384=(0,Ku.wrapHash)(As.keccak_384);dr.keccak512=(0,Ku.wrapHash)(As.keccak_512);var Gi={},tr={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.isHexString=Bt.getKeys=Bt.fromAscii=Bt.fromUtf8=Bt.toAscii=Bt.arrayContainsArray=Bt.getBinarySize=Bt.padToEven=Bt.stripHexPrefix=Bt.isHexPrefixed=void 0;function Ow(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"}Bt.isHexPrefixed=Ow;const UN=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return Ow(e)?e.slice(2):e};Bt.stripHexPrefix=UN;function Lw(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}Bt.padToEven=Lw;function HN(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return De.Buffer.byteLength(e,"utf8")}Bt.getBinarySize=HN;function jN(e,t,n){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[n===!0?"some":"every"](o=>e.indexOf(o)>=0)}Bt.arrayContainsArray=jN;function WN(e){let t="",n=0;const o=e.length;for(e.substring(0,2)==="0x"&&(n=2);n<o;n+=2){const a=parseInt(e.substr(n,2),16);t+=String.fromCharCode(a)}return t}Bt.toAscii=WN;function zN(e){const t=De.Buffer.from(e,"utf8");return`0x${Lw(t.toString("hex")).replace(/^0+|0+$/g,"")}`}Bt.fromUtf8=zN;function qN(e){let t="";for(let n=0;n<e.length;n++){const a=e.charCodeAt(n).toString(16);t+=a.length<2?`0${a}`:a}return`0x${t}`}Bt.fromAscii=qN;function VN(e,t,n){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 a=0;a<e.length;a++){let u=e[a][t];if(n===!0&&!u)u="";else if(typeof u!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof u}`);o.push(u)}return o}Bt.getKeys=VN;function GN(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}Bt.isHexString=GN;Object.defineProperty(tr,"__esModule",{value:!0});tr.assertIsString=tr.assertIsArray=tr.assertIsBuffer=tr.assertIsHexString=void 0;const ZN=Bt,KN=function(e){if(!(0,ZN.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};tr.assertIsHexString=KN;const JN=function(e){if(!De.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};tr.assertIsBuffer=JN;const XN=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};tr.assertIsArray=XN;const YN=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};tr.assertIsString=YN;(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=tr,n=Bt,o=function(A){if(!Number.isSafeInteger(A)||A<0)throw new Error(`Received an invalid integer type: ${A}`);return`0x${A.toString(16)}`};e.intToHex=o;const a=function(A){const B=(0,e.intToHex)(A);return De.Buffer.from((0,n.padToEven)(B.slice(2)),"hex")};e.intToBuffer=a;const u=function(A){return De.Buffer.allocUnsafe(A).fill(0)};e.zeros=u;const f=function(A,B,W){const D=(0,e.zeros)(B);return W?A.length<B?(A.copy(D),D):A.slice(0,B):A.length<B?(A.copy(D,B-A.length),D):A.slice(-B)},g=function(A,B){return(0,t.assertIsBuffer)(A),f(A,B,!1)};e.setLengthLeft=g;const h=function(A,B){return(0,t.assertIsBuffer)(A),f(A,B,!0)};e.setLengthRight=h;const d=function(A){let B=A[0];for(;A.length>0&&B.toString()==="0";)A=A.slice(1),B=A[0];return A},_=function(A){return(0,t.assertIsBuffer)(A),d(A)};e.unpadBuffer=_;const w=function(A){return(0,t.assertIsArray)(A),d(A)};e.unpadArray=w;const E=function(A){return(0,t.assertIsHexString)(A),A=(0,n.stripHexPrefix)(A),"0x"+d(A)};e.unpadHexString=E;const y=function(A){if(A==null)return De.Buffer.allocUnsafe(0);if(De.Buffer.isBuffer(A))return De.Buffer.from(A);if(Array.isArray(A)||A instanceof Uint8Array)return De.Buffer.from(A);if(typeof A=="string"){if(!(0,n.isHexString)(A))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${A}`);return De.Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(A)),"hex")}if(typeof A=="number")return(0,e.intToBuffer)(A);if(typeof A=="bigint"){if(A<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${A}`);let B=A.toString(16);return B.length%2&&(B="0"+B),De.Buffer.from(B,"hex")}if(A.toArray)return De.Buffer.from(A.toArray());if(A.toBuffer)return De.Buffer.from(A.toBuffer());throw new Error("invalid type")};e.toBuffer=y;const N=function(A){return A=(0,e.toBuffer)(A),"0x"+A.toString("hex")};e.bufferToHex=N;function k(A){const B=(0,e.bufferToHex)(A);return BigInt(B==="0x"?0:B)}e.bufferToBigInt=k;function U(A){return(0,e.toBuffer)("0x"+A.toString(16))}e.bigIntToBuffer=U;const V=function(A){const B=Number(k(A));if(!Number.isSafeInteger(B))throw new Error("Number exceeds 53 bits");return B};e.bufferToInt=V;const j=function(A){return BigInt.asIntN(256,k(A))};e.fromSigned=j;const P=function(A){return U(BigInt.asUintN(256,A))};e.toUnsigned=P;const C=function(A){return typeof A!="string"||(0,n.isHexPrefixed)(A)?A:"0x"+A};e.addHexPrefix=C;function K(A,B=50){const W=De.Buffer.isBuffer(A)?A.toString("hex"):A;return W.length<=B?W:W.slice(0,B)+"…"}e.short=K;const se=function(A){const B=/^(00)+|(00)+$/g;if(A=(0,n.stripHexPrefix)(A),A.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return De.Buffer.from(A.replace(B,""),"hex").toString("utf8")};e.toUtf8=se;const re=function(A){if(De.Buffer.isBuffer(A))return`0x${A.toString("hex")}`;if(A instanceof Array){const B=[];for(let W=0;W<A.length;W++)B.push((0,e.baToJSON)(A[W]));return B}};e.baToJSON=re;const ge=function(A){for(const[B,W]of Object.entries(A))if(W!==void 0&&W.length>0&&W[0]===0)throw new Error(`${B} cannot have leading zeroes, received: ${W.toString("hex")}`)};e.validateNoLeadingZeroes=ge;function le(A){return Array.isArray(A)?A.map(B=>le(B)):De.Buffer.from(A)}e.arrToBufArr=le;function Ae(A){return Array.isArray(A)?A.map(B=>Ae(B)):Uint8Array.from(A??[])}e.bufArrToArr=Ae;const we=A=>"0x"+A.toString(16);e.bigIntToHex=we;function p(A){return(0,e.unpadBuffer)(U(A))}e.bigIntToUnpaddedBuffer=p;function v(A){return(0,e.unpadBuffer)((0,e.intToBuffer)(A))}e.intToUnpaddedBuffer=v})(Gi);(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=Ar,n=dr,o=Uu,a=Tw,u=Gi,f=Fu,g=tr,h=Bt,d=BigInt(0);class _{constructor(v=d,A=d,B=f.KECCAK256_RLP,W=f.KECCAK256_NULL){this.nonce=v,this.balance=A,this.storageRoot=B,this.codeHash=W,this._validate()}static fromAccountData(v){const{nonce:A,balance:B,storageRoot:W,codeHash:D}=v;return new _(A!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(A)):void 0,B!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(B)):void 0,W!==void 0?(0,u.toBuffer)(W):void 0,D!==void 0?(0,u.toBuffer)(D):void 0)}static fromRlpSerializedAccount(v){const A=(0,u.arrToBufArr)(t.RLP.decode(Uint8Array.from(v)));if(!Array.isArray(A))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(A)}static fromValuesArray(v){const[A,B,W,D]=v;return new _((0,u.bufferToBigInt)(A),(0,u.bufferToBigInt)(B),W,D)}_validate(){if(this.nonce<d)throw new Error("nonce must be greater than zero");if(this.balance<d)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 De.Buffer.from(t.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(f.KECCAK256_NULL)}isEmpty(){return this.balance===d&&this.nonce===d&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=_;const w=function(p){try{(0,g.assertIsString)(p)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(p)};e.isValidAddress=w;const E=function(p,v){(0,g.assertIsHexString)(p);const A=(0,h.stripHexPrefix)(p).toLowerCase();let B="";v!==void 0&&(B=(0,u.bufferToBigInt)((0,u.toBuffer)(v)).toString()+"0x");const W=De.Buffer.from(B+A,"utf8"),D=(0,a.bytesToHex)((0,n.keccak256)(W));let J="0x";for(let M=0;M<A.length;M++)parseInt(D[M],16)>=8?J+=A[M].toUpperCase():J+=A[M];return J};e.toChecksumAddress=E;const y=function(p,v){return(0,e.isValidAddress)(p)&&(0,e.toChecksumAddress)(p,v)===p};e.isValidChecksumAddress=y;const N=function(p,v){return(0,g.assertIsBuffer)(p),(0,g.assertIsBuffer)(v),(0,u.bufferToBigInt)(v)===BigInt(0)?De.Buffer.from((0,n.keccak256)(t.RLP.encode((0,u.bufArrToArr)([p,null])))).slice(-20):De.Buffer.from((0,n.keccak256)(t.RLP.encode((0,u.bufArrToArr)([p,v])))).slice(-20)};e.generateAddress=N;const k=function(p,v,A){if((0,g.assertIsBuffer)(p),(0,g.assertIsBuffer)(v),(0,g.assertIsBuffer)(A),p.length!==20)throw new Error("Expected from to be of length 20");if(v.length!==32)throw new Error("Expected salt to be of length 32");const B=(0,n.keccak256)(De.Buffer.concat([De.Buffer.from("ff","hex"),p,v,(0,n.keccak256)(A)]));return(0,u.toBuffer)(B).slice(-20)};e.generateAddress2=k;const U=function(p){return o.secp256k1.utils.isValidPrivateKey(p)};e.isValidPrivate=U;const V=function(p,v=!1){if((0,g.assertIsBuffer)(p),p.length===64)try{return o.secp256k1.ProjectivePoint.fromHex(De.Buffer.concat([De.Buffer.from([4]),p])),!0}catch{return!1}if(!v)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(p),!0}catch{return!1}};e.isValidPublic=V;const j=function(p,v=!1){if((0,g.assertIsBuffer)(p),v&&p.length!==64&&(p=De.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(p).toRawBytes(!1).slice(1))),p.length!==64)throw new Error("Expected pubKey to be of length 64");return De.Buffer.from((0,n.keccak256)(p)).slice(-20)};e.pubToAddress=j,e.publicToAddress=e.pubToAddress;const P=function(p){return(0,g.assertIsBuffer)(p),De.Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(p).toRawBytes(!1).slice(1))};e.privateToPublic=P;const C=function(p){return(0,e.publicToAddress)((0,e.privateToPublic)(p))};e.privateToAddress=C;const K=function(p){return(0,g.assertIsBuffer)(p),p.length!==64&&(p=De.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(p).toRawBytes(!1).slice(1))),p};e.importPublic=K;const se=function(){const v=(0,u.zeros)(20);return(0,u.bufferToHex)(v)};e.zeroAddress=se;const re=function(p){try{(0,g.assertIsString)(p)}catch{return!1}return(0,e.zeroAddress)()===p};e.isZeroAddress=re;function ge(p){const[v,A,B,W]=p;return[v,A,(0,u.arrToBufArr)(B).length===0?f.KECCAK256_RLP:B,(0,u.arrToBufArr)(W).length===0?f.KECCAK256_NULL:W]}e.accountBodyFromSlim=ge;const le=new Uint8Array(0);function Ae(p){const[v,A,B,W]=p;return[v,A,(0,u.arrToBufArr)(B).equals(f.KECCAK256_RLP)?le:B,(0,u.arrToBufArr)(W).equals(f.KECCAK256_NULL)?le:W]}e.accountBodyToSlim=Ae;function we(p,v=!0){const A=v?ge(p):p;return(0,u.arrToBufArr)(t.RLP.encode(A))}e.accountBodyToRLP=we})(Id);var xs={};Object.defineProperty(xs,"__esModule",{value:!0});xs.Address=void 0;const ds=Id,Ya=Gi;class Vr{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new Vr((0,Ya.zeros)(20))}static fromString(t){if(!(0,ds.isValidAddress)(t))throw new Error("Invalid address");return new Vr((0,Ya.toBuffer)(t))}static fromPublicKey(t){if(!De.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const n=(0,ds.pubToAddress)(t);return new Vr(n)}static fromPrivateKey(t){if(!De.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const n=(0,ds.privateToAddress)(t);return new Vr(n)}static generate(t,n){if(typeof n!="bigint")throw new Error("Expected nonce to be a bigint");return new Vr((0,ds.generateAddress)(t.buf,(0,Ya.bigIntToBuffer)(n)))}static generate2(t,n,o){if(!De.Buffer.isBuffer(n))throw new Error("Expected salt to be a Buffer");if(!De.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new Vr((0,ds.generateAddress2)(t.buf,n,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(Vr.zero())}isPrecompileOrSystemAddress(){const t=(0,Ya.bufferToBigInt)(this.buf),n=BigInt(0),o=BigInt("0xffff");return t>=n&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return De.Buffer.from(this.buf)}}xs.Address=Vr;var Ju={},Ld={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=Gi,n=Bt;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 a(u,f){if(u===null)return null;if(u===void 0)return;if(typeof u=="string"&&!(0,n.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 g=(0,t.toBuffer)(u);switch(f){case o.Buffer:return g;case o.BigInt:return(0,t.bufferToBigInt)(g);case o.Number:{const h=(0,t.bufferToBigInt)(g);if(h>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(h)}case o.PrefixedHexString:return(0,t.bufferToHex)(g);default:throw new Error("unknown outputType")}}e.toType=a})(Ld);Object.defineProperty(Ju,"__esModule",{value:!0});Ju.Withdrawal=void 0;const g_=xs,Jl=Gi,Vt=Ld;class ws{constructor(t,n,o,a){this.index=t,this.validatorIndex=n,this.address=o,this.amount=a}static fromWithdrawalData(t){const{index:n,validatorIndex:o,address:a,amount:u}=t,f=(0,Vt.toType)(n,Vt.TypeOutput.BigInt),g=(0,Vt.toType)(o,Vt.TypeOutput.BigInt),h=new g_.Address((0,Vt.toType)(a,Vt.TypeOutput.Buffer)),d=(0,Vt.toType)(u,Vt.TypeOutput.BigInt);return new ws(f,g,h,d)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[n,o,a,u]=t;return ws.fromWithdrawalData({index:n,validatorIndex:o,address:a,amount:u})}static toBufferArray(t){const{index:n,validatorIndex:o,address:a,amount:u}=t,f=(0,Vt.toType)(n,Vt.TypeOutput.BigInt)===BigInt(0)?De.Buffer.alloc(0):(0,Vt.toType)(n,Vt.TypeOutput.Buffer),g=(0,Vt.toType)(o,Vt.TypeOutput.BigInt)===BigInt(0)?De.Buffer.alloc(0):(0,Vt.toType)(o,Vt.TypeOutput.Buffer);let h;a instanceof g_.Address?h=a.buf:h=(0,Vt.toType)(a,Vt.TypeOutput.Buffer);const d=(0,Vt.toType)(u,Vt.TypeOutput.BigInt)===BigInt(0)?De.Buffer.alloc(0):(0,Vt.toType)(u,Vt.TypeOutput.Buffer);return[f,g,h,d]}raw(){return ws.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,Jl.bigIntToHex)(this.index),validatorIndex:(0,Jl.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,Jl.bigIntToHex)(this.amount)}}}Ju.Withdrawal=ws;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});wn.hashPersonalMessage=wn.isValidSignature=wn.fromRpcSig=wn.toCompactSig=wn.toRpcSig=wn.ecrecover=wn.ecsign=void 0;const QN=dr,Cw=Uu,Cn=Gi,Xl=Fu,eB=tr;function tB(e,t,n){const o=Cw.secp256k1.sign(e,t),a=o.toCompactRawBytes(),u=De.Buffer.from(a.slice(0,32)),f=De.Buffer.from(a.slice(32,64)),g=n===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(n)*BigInt(2);return{r:u,s:f,v:g}}wn.ecsign=tB;function Xu(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function Yu(e){return e===BigInt(0)||e===BigInt(1)}const nB=function(e,t,n,o,a){const u=De.Buffer.concat([(0,Cn.setLengthLeft)(n,32),(0,Cn.setLengthLeft)(o,32)],64),f=Xu(t,a);if(!Yu(f))throw new Error("Invalid signature v value");const h=Cw.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return De.Buffer.from(h.toRawBytes(!1).slice(1))};wn.ecrecover=nB;const rB=function(e,t,n,o){const a=Xu(e,o);if(!Yu(a))throw new Error("Invalid signature v value");return(0,Cn.bufferToHex)(De.Buffer.concat([(0,Cn.setLengthLeft)(t,32),(0,Cn.setLengthLeft)(n,32),(0,Cn.toBuffer)(e)]))};wn.toRpcSig=rB;const iB=function(e,t,n,o){const a=Xu(e,o);if(!Yu(a))throw new Error("Invalid signature v value");let u=n;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(u=De.Buffer.from(n),u[0]|=128),(0,Cn.bufferToHex)(De.Buffer.concat([(0,Cn.setLengthLeft)(t,32),(0,Cn.setLengthLeft)(u,32)]))};wn.toCompactSig=iB;const oB=function(e){const t=(0,Cn.toBuffer)(e);let n,o,a;if(t.length>=65)n=t.slice(0,32),o=t.slice(32,64),a=(0,Cn.bufferToBigInt)(t.slice(64));else if(t.length===64)n=t.slice(0,32),o=t.slice(32,64),a=BigInt((0,Cn.bufferToInt)(t.slice(32,33))>>7),o[0]&=127;else throw new Error("Invalid signature length");return a<27&&(a=a+BigInt(27)),{v:a,r:n,s:o}};wn.fromRpcSig=oB;const sB=function(e,t,n,o=!0,a){if(t.length!==32||n.length!==32||!Yu(Xu(e,a)))return!1;const u=(0,Cn.bufferToBigInt)(t),f=(0,Cn.bufferToBigInt)(n);return!(u===BigInt(0)||u>=Xl.SECP256K1_ORDER||f===BigInt(0)||f>=Xl.SECP256K1_ORDER||o&&f>=Xl.SECP256K1_ORDER_DIV_2)};wn.isValidSignature=sB;const aB=function(e){(0,eB.assertIsBuffer)(e);const t=De.Buffer.from(`Ethereum Signed Message:
|
|
3
3
|
${e.length}`,"utf-8");return De.Buffer.from((0,QN.keccak256)(De.Buffer.concat([t,e])))};wn.hashPersonalMessage=aB;var Pw={};(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 n=(f,g)=>{for(let h=0,d=0;d<f.length;h+=1,d+=2)g[h]=f[d]<<4|f[d+1]};e.nibblesToBytes=n;const o=f=>{let g=0;(0,e.hasTerminator)(f)&&(g=1,f=f.subarray(0,f.length-1));const h=new Uint8Array(f.length/2+1);return h[0]=g<<5,(f.length&1)===1&&(h[0]|=16,h[0]|=f[0],f=f.subarray(1)),(0,e.nibblesToBytes)(f,h.subarray(1)),h};e.nibblesToCompactBytes=o;const a=f=>{const g=f.length*2+1,h=new Uint8Array(g);for(let d=0;d<f.length;d++){const _=f[d];h[d*2]=_/16,h[d*2+1]=_%16}return h[g-1]=16,h};e.bytesToNibbles=a;const u=f=>{if(f.length===0)return f;let g=(0,e.bytesToNibbles)(f);g[0]<2&&(g=g.subarray(0,g.length-1));const h=2-(g[0]&1);return g.subarray(h)};e.compactBytesToNibbles=u})(Pw);var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0});Qu.AsyncEventEmitter=void 0;const uB=Is();async function fB(e,t,n){let o;for await(const a of t)try{a.length<2?a.call(e,n):await new Promise((u,f)=>{a.call(e,n,g=>{g?f(g):u()})})}catch(u){o=u}if(o)throw o}class lB extends uB.EventEmitter{emit(t,...n){let[o,a]=n;const u=this;let f=u._events[t]??[];return a===void 0&&typeof o=="function"&&(a=o,o=void 0),(t==="newListener"||t==="removeListener")&&(o={event:o,fn:a},a=void 0),f=Array.isArray(f)?f:[f],fB(u,f.slice(),o).then(a).catch(a),u.listenerCount(t)>0}once(t,n){const o=this;let a;if(typeof n!="function")throw new TypeError("listener must be a function");return n.length>=2?a=function(u,f){o.removeListener(t,a),n(u,f)}:a=function(u){o.removeListener(t,a),n(u,a)},o.on(t,a),o}first(t,n){let o=this._events[t]??[];if(typeof n!="function")throw new TypeError("listener must be a function");return Array.isArray(o)||(this._events[t]=o=[o]),o.unshift(n),this}before(t,n,o){return this.beforeOrAfter(t,n,o)}after(t,n,o){return this.beforeOrAfter(t,n,o,"after")}beforeOrAfter(t,n,o,a){let u=this._events[t]??[],f,g;const h=a==="after"?1:0;if(typeof o!="function")throw new TypeError("listener must be a function");if(typeof n!="function")throw new TypeError("target must be a function");for(Array.isArray(u)||(this._events[t]=u=[u]),g=u.length,f=u.length;f--;)if(u[f]===n){g=f+h;break}return u.splice(g,0,o),this}on(t,n){return super.on(t,n)}addListener(t,n){return super.addListener(t,n)}prependListener(t,n){return super.prependListener(t,n)}prependOnceListener(t,n){return super.prependOnceListener(t,n)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,n){return super.removeListener(t,n)}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)}}Qu.AsyncEventEmitter=lB;var ef={};Object.defineProperty(ef,"__esModule",{value:!0});ef.Lock=void 0;class cB{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)}}}ef.Lock=cB;var Oo={},Fi={},Yl={},Ql={},ec,__;function dB(){if(__)return ec;__=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return ec=e,ec}var cr={},tc={},p_;function tf(){return p_||(p_=1,function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(u,f){return Object.prototype.hasOwnProperty.call(u,f)}e.assign=function(u){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var g=f.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var h in g)n(g,h)&&(u[h]=g[h])}}return u},e.shrinkBuf=function(u,f){return u.length===f?u:u.subarray?u.subarray(0,f):(u.length=f,u)};var o={arraySet:function(u,f,g,h,d){if(f.subarray&&u.subarray){u.set(f.subarray(g,g+h),d);return}for(var _=0;_<h;_++)u[d+_]=f[g+_]},flattenChunks:function(u){var f,g,h,d,_,w;for(h=0,f=0,g=u.length;f<g;f++)h+=u[f].length;for(w=new Uint8Array(h),d=0,f=0,g=u.length;f<g;f++)_=u[f],w.set(_,d),d+=_.length;return w}},a={arraySet:function(u,f,g,h,d){for(var _=0;_<h;_++)u[d+_]=f[g+_]},flattenChunks:function(u){return[].concat.apply([],u)}};e.setTyped=function(u){u?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(t)}(tc)),tc}var Ni={},b_;function hB(){if(b_)return Ni;b_=1;var e=tf(),t=4,n=0,o=1,a=2;function u(T){for(var me=T.length;--me>=0;)T[me]=0}var f=0,g=1,h=2,d=3,_=258,w=29,E=256,y=E+1+w,N=30,k=19,U=2*y+1,V=15,j=16,P=7,C=256,K=16,se=17,re=18,ge=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],le=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],we=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=512,v=new Array((y+2)*2);u(v);var A=new Array(N*2);u(A);var B=new Array(p);u(B);var W=new Array(_-d+1);u(W);var D=new Array(w);u(D);var J=new Array(N);u(J);function M(T,me,Oe,xe,Z){this.static_tree=T,this.extra_bits=me,this.extra_base=Oe,this.elems=xe,this.max_length=Z,this.has_stree=T&&T.length}var q,te,de;function Q(T,me){this.dyn_tree=T,this.max_code=0,this.stat_desc=me}function ye(T){return T<256?B[T]:B[256+(T>>>7)]}function _e(T,me){T.pending_buf[T.pending++]=me&255,T.pending_buf[T.pending++]=me>>>8&255}function Se(T,me,Oe){T.bi_valid>j-Oe?(T.bi_buf|=me<<T.bi_valid&65535,_e(T,T.bi_buf),T.bi_buf=me>>j-T.bi_valid,T.bi_valid+=Oe-j):(T.bi_buf|=me<<T.bi_valid&65535,T.bi_valid+=Oe)}function Fe(T,me,Oe){Se(T,Oe[me*2],Oe[me*2+1])}function Ce(T,me){var Oe=0;do Oe|=T&1,T>>>=1,Oe<<=1;while(--me>0);return Oe>>>1}function Be(T){T.bi_valid===16?(_e(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):T.bi_valid>=8&&(T.pending_buf[T.pending++]=T.bi_buf&255,T.bi_buf>>=8,T.bi_valid-=8)}function et(T,me){var Oe=me.dyn_tree,xe=me.max_code,Z=me.stat_desc.static_tree,ce=me.stat_desc.has_stree,m=me.stat_desc.extra_bits,Re=me.stat_desc.extra_base,Ve=me.stat_desc.max_length,l,oe,ae,R,z,ie,Ue=0;for(R=0;R<=V;R++)T.bl_count[R]=0;for(Oe[T.heap[T.heap_max]*2+1]=0,l=T.heap_max+1;l<U;l++)oe=T.heap[l],R=Oe[Oe[oe*2+1]*2+1]+1,R>Ve&&(R=Ve,Ue++),Oe[oe*2+1]=R,!(oe>xe)&&(T.bl_count[R]++,z=0,oe>=Re&&(z=m[oe-Re]),ie=Oe[oe*2],T.opt_len+=ie*(R+z),ce&&(T.static_len+=ie*(Z[oe*2+1]+z)));if(Ue!==0){do{for(R=Ve-1;T.bl_count[R]===0;)R--;T.bl_count[R]--,T.bl_count[R+1]+=2,T.bl_count[Ve]--,Ue-=2}while(Ue>0);for(R=Ve;R!==0;R--)for(oe=T.bl_count[R];oe!==0;)ae=T.heap[--l],!(ae>xe)&&(Oe[ae*2+1]!==R&&(T.opt_len+=(R-Oe[ae*2+1])*Oe[ae*2],Oe[ae*2+1]=R),oe--)}}function Je(T,me,Oe){var xe=new Array(V+1),Z=0,ce,m;for(ce=1;ce<=V;ce++)xe[ce]=Z=Z+Oe[ce-1]<<1;for(m=0;m<=me;m++){var Re=T[m*2+1];Re!==0&&(T[m*2]=Ce(xe[Re]++,Re))}}function We(){var T,me,Oe,xe,Z,ce=new Array(V+1);for(Oe=0,xe=0;xe<w-1;xe++)for(D[xe]=Oe,T=0;T<1<<ge[xe];T++)W[Oe++]=xe;for(W[Oe-1]=xe,Z=0,xe=0;xe<16;xe++)for(J[xe]=Z,T=0;T<1<<le[xe];T++)B[Z++]=xe;for(Z>>=7;xe<N;xe++)for(J[xe]=Z<<7,T=0;T<1<<le[xe]-7;T++)B[256+Z++]=xe;for(me=0;me<=V;me++)ce[me]=0;for(T=0;T<=143;)v[T*2+1]=8,T++,ce[8]++;for(;T<=255;)v[T*2+1]=9,T++,ce[9]++;for(;T<=279;)v[T*2+1]=7,T++,ce[7]++;for(;T<=287;)v[T*2+1]=8,T++,ce[8]++;for(Je(v,y+1,ce),T=0;T<N;T++)A[T*2+1]=5,A[T*2]=Ce(T,5);q=new M(v,ge,E+1,y,V),te=new M(A,le,0,N,V),de=new M(new Array(0),Ae,0,k,P)}function x(T){var me;for(me=0;me<y;me++)T.dyn_ltree[me*2]=0;for(me=0;me<N;me++)T.dyn_dtree[me*2]=0;for(me=0;me<k;me++)T.bl_tree[me*2]=0;T.dyn_ltree[C*2]=1,T.opt_len=T.static_len=0,T.last_lit=T.matches=0}function H(T){T.bi_valid>8?_e(T,T.bi_buf):T.bi_valid>0&&(T.pending_buf[T.pending++]=T.bi_buf),T.bi_buf=0,T.bi_valid=0}function ne(T,me,Oe,xe){H(T),_e(T,Oe),_e(T,~Oe),e.arraySet(T.pending_buf,T.window,me,Oe,T.pending),T.pending+=Oe}function Ie(T,me,Oe,xe){var Z=me*2,ce=Oe*2;return T[Z]<T[ce]||T[Z]===T[ce]&&xe[me]<=xe[Oe]}function be(T,me,Oe){for(var xe=T.heap[Oe],Z=Oe<<1;Z<=T.heap_len&&(Z<T.heap_len&&Ie(me,T.heap[Z+1],T.heap[Z],T.depth)&&Z++,!Ie(me,xe,T.heap[Z],T.depth));)T.heap[Oe]=T.heap[Z],Oe=Z,Z<<=1;T.heap[Oe]=xe}function Pe(T,me,Oe){var xe,Z,ce=0,m,Re;if(T.last_lit!==0)do xe=T.pending_buf[T.d_buf+ce*2]<<8|T.pending_buf[T.d_buf+ce*2+1],Z=T.pending_buf[T.l_buf+ce],ce++,xe===0?Fe(T,Z,me):(m=W[Z],Fe(T,m+E+1,me),Re=ge[m],Re!==0&&(Z-=D[m],Se(T,Z,Re)),xe--,m=ye(xe),Fe(T,m,Oe),Re=le[m],Re!==0&&(xe-=J[m],Se(T,xe,Re)));while(ce<T.last_lit);Fe(T,C,me)}function qe(T,me){var Oe=me.dyn_tree,xe=me.stat_desc.static_tree,Z=me.stat_desc.has_stree,ce=me.stat_desc.elems,m,Re,Ve=-1,l;for(T.heap_len=0,T.heap_max=U,m=0;m<ce;m++)Oe[m*2]!==0?(T.heap[++T.heap_len]=Ve=m,T.depth[m]=0):Oe[m*2+1]=0;for(;T.heap_len<2;)l=T.heap[++T.heap_len]=Ve<2?++Ve:0,Oe[l*2]=1,T.depth[l]=0,T.opt_len--,Z&&(T.static_len-=xe[l*2+1]);for(me.max_code=Ve,m=T.heap_len>>1;m>=1;m--)be(T,Oe,m);l=ce;do m=T.heap[1],T.heap[1]=T.heap[T.heap_len--],be(T,Oe,1),Re=T.heap[1],T.heap[--T.heap_max]=m,T.heap[--T.heap_max]=Re,Oe[l*2]=Oe[m*2]+Oe[Re*2],T.depth[l]=(T.depth[m]>=T.depth[Re]?T.depth[m]:T.depth[Re])+1,Oe[m*2+1]=Oe[Re*2+1]=l,T.heap[1]=l++,be(T,Oe,1);while(T.heap_len>=2);T.heap[--T.heap_max]=T.heap[1],et(T,me),Je(Oe,Ve,T.bl_count)}function je(T,me,Oe){var xe,Z=-1,ce,m=me[0*2+1],Re=0,Ve=7,l=4;for(m===0&&(Ve=138,l=3),me[(Oe+1)*2+1]=65535,xe=0;xe<=Oe;xe++)ce=m,m=me[(xe+1)*2+1],!(++Re<Ve&&ce===m)&&(Re<l?T.bl_tree[ce*2]+=Re:ce!==0?(ce!==Z&&T.bl_tree[ce*2]++,T.bl_tree[K*2]++):Re<=10?T.bl_tree[se*2]++:T.bl_tree[re*2]++,Re=0,Z=ce,m===0?(Ve=138,l=3):ce===m?(Ve=6,l=3):(Ve=7,l=4))}function nt(T,me,Oe){var xe,Z=-1,ce,m=me[0*2+1],Re=0,Ve=7,l=4;for(m===0&&(Ve=138,l=3),xe=0;xe<=Oe;xe++)if(ce=m,m=me[(xe+1)*2+1],!(++Re<Ve&&ce===m)){if(Re<l)do Fe(T,ce,T.bl_tree);while(--Re!==0);else ce!==0?(ce!==Z&&(Fe(T,ce,T.bl_tree),Re--),Fe(T,K,T.bl_tree),Se(T,Re-3,2)):Re<=10?(Fe(T,se,T.bl_tree),Se(T,Re-3,3)):(Fe(T,re,T.bl_tree),Se(T,Re-11,7));Re=0,Z=ce,m===0?(Ve=138,l=3):ce===m?(Ve=6,l=3):(Ve=7,l=4)}}function $e(T){var me;for(je(T,T.dyn_ltree,T.l_desc.max_code),je(T,T.dyn_dtree,T.d_desc.max_code),qe(T,T.bl_desc),me=k-1;me>=3&&T.bl_tree[we[me]*2+1]===0;me--);return T.opt_len+=3*(me+1)+5+5+4,me}function ut(T,me,Oe,xe){var Z;for(Se(T,me-257,5),Se(T,Oe-1,5),Se(T,xe-4,4),Z=0;Z<xe;Z++)Se(T,T.bl_tree[we[Z]*2+1],3);nt(T,T.dyn_ltree,me-1),nt(T,T.dyn_dtree,Oe-1)}function Ft(T){var me=4093624447,Oe;for(Oe=0;Oe<=31;Oe++,me>>>=1)if(me&1&&T.dyn_ltree[Oe*2]!==0)return n;if(T.dyn_ltree[9*2]!==0||T.dyn_ltree[10*2]!==0||T.dyn_ltree[13*2]!==0)return o;for(Oe=32;Oe<E;Oe++)if(T.dyn_ltree[Oe*2]!==0)return o;return n}var pt=!1;function ln(T){pt||(We(),pt=!0),T.l_desc=new Q(T.dyn_ltree,q),T.d_desc=new Q(T.dyn_dtree,te),T.bl_desc=new Q(T.bl_tree,de),T.bi_buf=0,T.bi_valid=0,x(T)}function It(T,me,Oe,xe){Se(T,(f<<1)+(xe?1:0),3),ne(T,me,Oe)}function lt(T){Se(T,g<<1,3),Fe(T,C,v),Be(T)}function Dt(T,me,Oe,xe){var Z,ce,m=0;T.level>0?(T.strm.data_type===a&&(T.strm.data_type=Ft(T)),qe(T,T.l_desc),qe(T,T.d_desc),m=$e(T),Z=T.opt_len+3+7>>>3,ce=T.static_len+3+7>>>3,ce<=Z&&(Z=ce)):Z=ce=Oe+5,Oe+4<=Z&&me!==-1?It(T,me,Oe,xe):T.strategy===t||ce===Z?(Se(T,(g<<1)+(xe?1:0),3),Pe(T,v,A)):(Se(T,(h<<1)+(xe?1:0),3),ut(T,T.l_desc.max_code+1,T.d_desc.max_code+1,m+1),Pe(T,T.dyn_ltree,T.dyn_dtree)),x(T),xe&&H(T)}function Ut(T,me,Oe){return T.pending_buf[T.d_buf+T.last_lit*2]=me>>>8&255,T.pending_buf[T.d_buf+T.last_lit*2+1]=me&255,T.pending_buf[T.l_buf+T.last_lit]=Oe&255,T.last_lit++,me===0?T.dyn_ltree[Oe*2]++:(T.matches++,me--,T.dyn_ltree[(W[Oe]+E+1)*2]++,T.dyn_dtree[ye(me)*2]++),T.last_lit===T.lit_bufsize-1}return Ni._tr_init=ln,Ni._tr_stored_block=It,Ni._tr_flush_block=Dt,Ni._tr_tally=Ut,Ni._tr_align=lt,Ni}var nc,w_;function Nw(){if(w_)return nc;w_=1;function e(t,n,o,a){for(var u=t&65535|0,f=t>>>16&65535|0,g=0;o!==0;){g=o>2e3?2e3:o,o-=g;do u=u+n[a++]|0,f=f+u|0;while(--g);u%=65521,f%=65521}return u|f<<16|0}return nc=e,nc}var rc,y_;function Bw(){if(y_)return rc;y_=1;function e(){for(var o,a=[],u=0;u<256;u++){o=u;for(var f=0;f<8;f++)o=o&1?3988292384^o>>>1:o>>>1;a[u]=o}return a}var t=e();function n(o,a,u,f){var g=t,h=f+u;o^=-1;for(var d=f;d<h;d++)o=o>>>8^g[(o^a[d])&255];return o^-1}return rc=n,rc}var ic,m_;function gB(){return m_||(m_=1,ic={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),ic}var v_;function _B(){if(v_)return cr;v_=1;var e=tf(),t=hB(),n=Nw(),o=Bw(),a=gB(),u=0,f=1,g=3,h=4,d=5,_=0,w=1,E=-2,y=-3,N=-5,k=-1,U=1,V=2,j=3,P=4,C=0,K=2,se=8,re=9,ge=15,le=8,Ae=29,we=256,p=we+1+Ae,v=30,A=19,B=2*p+1,W=15,D=3,J=258,M=J+D+1,q=32,te=42,de=69,Q=73,ye=91,_e=103,Se=113,Fe=666,Ce=1,Be=2,et=3,Je=4,We=3;function x(l,oe){return l.msg=a[oe],oe}function H(l){return(l<<1)-(l>4?9:0)}function ne(l){for(var oe=l.length;--oe>=0;)l[oe]=0}function Ie(l){var oe=l.state,ae=oe.pending;ae>l.avail_out&&(ae=l.avail_out),ae!==0&&(e.arraySet(l.output,oe.pending_buf,oe.pending_out,ae,l.next_out),l.next_out+=ae,oe.pending_out+=ae,l.total_out+=ae,l.avail_out-=ae,oe.pending-=ae,oe.pending===0&&(oe.pending_out=0))}function be(l,oe){t._tr_flush_block(l,l.block_start>=0?l.block_start:-1,l.strstart-l.block_start,oe),l.block_start=l.strstart,Ie(l.strm)}function Pe(l,oe){l.pending_buf[l.pending++]=oe}function qe(l,oe){l.pending_buf[l.pending++]=oe>>>8&255,l.pending_buf[l.pending++]=oe&255}function je(l,oe,ae,R){var z=l.avail_in;return z>R&&(z=R),z===0?0:(l.avail_in-=z,e.arraySet(oe,l.input,l.next_in,z,ae),l.state.wrap===1?l.adler=n(l.adler,oe,z,ae):l.state.wrap===2&&(l.adler=o(l.adler,oe,z,ae)),l.next_in+=z,l.total_in+=z,z)}function nt(l,oe){var ae=l.max_chain_length,R=l.strstart,z,ie,Ue=l.prev_length,S=l.nice_match,L=l.strstart>l.w_size-M?l.strstart-(l.w_size-M):0,he=l.window,Le=l.w_mask,Ne=l.prev,Ze=l.strstart+J,ft=he[R+Ue-1],Ht=he[R+Ue];l.prev_length>=l.good_match&&(ae>>=2),S>l.lookahead&&(S=l.lookahead);do if(z=oe,!(he[z+Ue]!==Ht||he[z+Ue-1]!==ft||he[z]!==he[R]||he[++z]!==he[R+1])){R+=2,z++;do;while(he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&he[++R]===he[++z]&&R<Ze);if(ie=J-(Ze-R),R=Ze-J,ie>Ue){if(l.match_start=oe,Ue=ie,ie>=S)break;ft=he[R+Ue-1],Ht=he[R+Ue]}}while((oe=Ne[oe&Le])>L&&--ae!==0);return Ue<=l.lookahead?Ue:l.lookahead}function $e(l){var oe=l.w_size,ae,R,z,ie,Ue;do{if(ie=l.window_size-l.lookahead-l.strstart,l.strstart>=oe+(oe-M)){e.arraySet(l.window,l.window,oe,oe,0),l.match_start-=oe,l.strstart-=oe,l.block_start-=oe,R=l.hash_size,ae=R;do z=l.head[--ae],l.head[ae]=z>=oe?z-oe:0;while(--R);R=oe,ae=R;do z=l.prev[--ae],l.prev[ae]=z>=oe?z-oe:0;while(--R);ie+=oe}if(l.strm.avail_in===0)break;if(R=je(l.strm,l.window,l.strstart+l.lookahead,ie),l.lookahead+=R,l.lookahead+l.insert>=D)for(Ue=l.strstart-l.insert,l.ins_h=l.window[Ue],l.ins_h=(l.ins_h<<l.hash_shift^l.window[Ue+1])&l.hash_mask;l.insert&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[Ue+D-1])&l.hash_mask,l.prev[Ue&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=Ue,Ue++,l.insert--,!(l.lookahead+l.insert<D)););}while(l.lookahead<M&&l.strm.avail_in!==0)}function ut(l,oe){var ae=65535;for(ae>l.pending_buf_size-5&&(ae=l.pending_buf_size-5);;){if(l.lookahead<=1){if($e(l),l.lookahead===0&&oe===u)return Ce;if(l.lookahead===0)break}l.strstart+=l.lookahead,l.lookahead=0;var R=l.block_start+ae;if((l.strstart===0||l.strstart>=R)&&(l.lookahead=l.strstart-R,l.strstart=R,be(l,!1),l.strm.avail_out===0)||l.strstart-l.block_start>=l.w_size-M&&(be(l,!1),l.strm.avail_out===0))return Ce}return l.insert=0,oe===h?(be(l,!0),l.strm.avail_out===0?et:Je):(l.strstart>l.block_start&&(be(l,!1),l.strm.avail_out===0),Ce)}function Ft(l,oe){for(var ae,R;;){if(l.lookahead<M){if($e(l),l.lookahead<M&&oe===u)return Ce;if(l.lookahead===0)break}if(ae=0,l.lookahead>=D&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,ae=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),ae!==0&&l.strstart-ae<=l.w_size-M&&(l.match_length=nt(l,ae)),l.match_length>=D)if(R=t._tr_tally(l,l.strstart-l.match_start,l.match_length-D),l.lookahead-=l.match_length,l.match_length<=l.max_lazy_match&&l.lookahead>=D){l.match_length--;do l.strstart++,l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,ae=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart;while(--l.match_length!==0);l.strstart++}else l.strstart+=l.match_length,l.match_length=0,l.ins_h=l.window[l.strstart],l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+1])&l.hash_mask;else R=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++;if(R&&(be(l,!1),l.strm.avail_out===0))return Ce}return l.insert=l.strstart<D-1?l.strstart:D-1,oe===h?(be(l,!0),l.strm.avail_out===0?et:Je):l.last_lit&&(be(l,!1),l.strm.avail_out===0)?Ce:Be}function pt(l,oe){for(var ae,R,z;;){if(l.lookahead<M){if($e(l),l.lookahead<M&&oe===u)return Ce;if(l.lookahead===0)break}if(ae=0,l.lookahead>=D&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,ae=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),l.prev_length=l.match_length,l.prev_match=l.match_start,l.match_length=D-1,ae!==0&&l.prev_length<l.max_lazy_match&&l.strstart-ae<=l.w_size-M&&(l.match_length=nt(l,ae),l.match_length<=5&&(l.strategy===U||l.match_length===D&&l.strstart-l.match_start>4096)&&(l.match_length=D-1)),l.prev_length>=D&&l.match_length<=l.prev_length){z=l.strstart+l.lookahead-D,R=t._tr_tally(l,l.strstart-1-l.prev_match,l.prev_length-D),l.lookahead-=l.prev_length-1,l.prev_length-=2;do++l.strstart<=z&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,ae=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart);while(--l.prev_length!==0);if(l.match_available=0,l.match_length=D-1,l.strstart++,R&&(be(l,!1),l.strm.avail_out===0))return Ce}else if(l.match_available){if(R=t._tr_tally(l,0,l.window[l.strstart-1]),R&&be(l,!1),l.strstart++,l.lookahead--,l.strm.avail_out===0)return Ce}else l.match_available=1,l.strstart++,l.lookahead--}return l.match_available&&(R=t._tr_tally(l,0,l.window[l.strstart-1]),l.match_available=0),l.insert=l.strstart<D-1?l.strstart:D-1,oe===h?(be(l,!0),l.strm.avail_out===0?et:Je):l.last_lit&&(be(l,!1),l.strm.avail_out===0)?Ce:Be}function ln(l,oe){for(var ae,R,z,ie,Ue=l.window;;){if(l.lookahead<=J){if($e(l),l.lookahead<=J&&oe===u)return Ce;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=D&&l.strstart>0&&(z=l.strstart-1,R=Ue[z],R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z])){ie=l.strstart+J;do;while(R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&z<ie);l.match_length=J-(ie-z),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=D?(ae=t._tr_tally(l,1,l.match_length-D),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(ae=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),ae&&(be(l,!1),l.strm.avail_out===0))return Ce}return l.insert=0,oe===h?(be(l,!0),l.strm.avail_out===0?et:Je):l.last_lit&&(be(l,!1),l.strm.avail_out===0)?Ce:Be}function It(l,oe){for(var ae;;){if(l.lookahead===0&&($e(l),l.lookahead===0)){if(oe===u)return Ce;break}if(l.match_length=0,ae=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,ae&&(be(l,!1),l.strm.avail_out===0))return Ce}return l.insert=0,oe===h?(be(l,!0),l.strm.avail_out===0?et:Je):l.last_lit&&(be(l,!1),l.strm.avail_out===0)?Ce:Be}function lt(l,oe,ae,R,z){this.good_length=l,this.max_lazy=oe,this.nice_length=ae,this.max_chain=R,this.func=z}var Dt;Dt=[new lt(0,0,0,0,ut),new lt(4,4,8,4,Ft),new lt(4,5,16,8,Ft),new lt(4,6,32,32,Ft),new lt(4,4,16,16,pt),new lt(8,16,32,32,pt),new lt(8,16,128,128,pt),new lt(8,32,128,256,pt),new lt(32,128,258,1024,pt),new lt(32,258,258,4096,pt)];function Ut(l){l.window_size=2*l.w_size,ne(l.head),l.max_lazy_match=Dt[l.level].max_lazy,l.good_match=Dt[l.level].good_length,l.nice_match=Dt[l.level].nice_length,l.max_chain_length=Dt[l.level].max_chain,l.strstart=0,l.block_start=0,l.lookahead=0,l.insert=0,l.match_length=l.prev_length=D-1,l.match_available=0,l.ins_h=0}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=se,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(B*2),this.dyn_dtree=new e.Buf16((2*v+1)*2),this.bl_tree=new e.Buf16((2*A+1)*2),ne(this.dyn_ltree),ne(this.dyn_dtree),ne(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(W+1),this.heap=new e.Buf16(2*p+1),ne(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*p+1),ne(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(l){var oe;return!l||!l.state?x(l,E):(l.total_in=l.total_out=0,l.data_type=K,oe=l.state,oe.pending=0,oe.pending_out=0,oe.wrap<0&&(oe.wrap=-oe.wrap),oe.status=oe.wrap?te:Se,l.adler=oe.wrap===2?0:1,oe.last_flush=u,t._tr_init(oe),_)}function Oe(l){var oe=me(l);return oe===_&&Ut(l.state),oe}function xe(l,oe){return!l||!l.state||l.state.wrap!==2?E:(l.state.gzhead=oe,_)}function Z(l,oe,ae,R,z,ie){if(!l)return E;var Ue=1;if(oe===k&&(oe=6),R<0?(Ue=0,R=-R):R>15&&(Ue=2,R-=16),z<1||z>re||ae!==se||R<8||R>15||oe<0||oe>9||ie<0||ie>P)return x(l,E);R===8&&(R=9);var S=new T;return l.state=S,S.strm=l,S.wrap=Ue,S.gzhead=null,S.w_bits=R,S.w_size=1<<S.w_bits,S.w_mask=S.w_size-1,S.hash_bits=z+7,S.hash_size=1<<S.hash_bits,S.hash_mask=S.hash_size-1,S.hash_shift=~~((S.hash_bits+D-1)/D),S.window=new e.Buf8(S.w_size*2),S.head=new e.Buf16(S.hash_size),S.prev=new e.Buf16(S.w_size),S.lit_bufsize=1<<z+6,S.pending_buf_size=S.lit_bufsize*4,S.pending_buf=new e.Buf8(S.pending_buf_size),S.d_buf=1*S.lit_bufsize,S.l_buf=3*S.lit_bufsize,S.level=oe,S.strategy=ie,S.method=ae,Oe(l)}function ce(l,oe){return Z(l,oe,se,ge,le,C)}function m(l,oe){var ae,R,z,ie;if(!l||!l.state||oe>d||oe<0)return l?x(l,E):E;if(R=l.state,!l.output||!l.input&&l.avail_in!==0||R.status===Fe&&oe!==h)return x(l,l.avail_out===0?N:E);if(R.strm=l,ae=R.last_flush,R.last_flush=oe,R.status===te)if(R.wrap===2)l.adler=0,Pe(R,31),Pe(R,139),Pe(R,8),R.gzhead?(Pe(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),Pe(R,R.gzhead.time&255),Pe(R,R.gzhead.time>>8&255),Pe(R,R.gzhead.time>>16&255),Pe(R,R.gzhead.time>>24&255),Pe(R,R.level===9?2:R.strategy>=V||R.level<2?4:0),Pe(R,R.gzhead.os&255),R.gzhead.extra&&R.gzhead.extra.length&&(Pe(R,R.gzhead.extra.length&255),Pe(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(l.adler=o(l.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=de):(Pe(R,0),Pe(R,0),Pe(R,0),Pe(R,0),Pe(R,0),Pe(R,R.level===9?2:R.strategy>=V||R.level<2?4:0),Pe(R,We),R.status=Se);else{var Ue=se+(R.w_bits-8<<4)<<8,S=-1;R.strategy>=V||R.level<2?S=0:R.level<6?S=1:R.level===6?S=2:S=3,Ue|=S<<6,R.strstart!==0&&(Ue|=q),Ue+=31-Ue%31,R.status=Se,qe(R,Ue),R.strstart!==0&&(qe(R,l.adler>>>16),qe(R,l.adler&65535)),l.adler=1}if(R.status===de)if(R.gzhead.extra){for(z=R.pending;R.gzindex<(R.gzhead.extra.length&65535)&&!(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Ie(l),z=R.pending,R.pending===R.pending_buf_size));)Pe(R,R.gzhead.extra[R.gzindex]&255),R.gzindex++;R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=Q)}else R.status=Q;if(R.status===Q)if(R.gzhead.name){z=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Ie(l),z=R.pending,R.pending===R.pending_buf_size)){ie=1;break}R.gzindex<R.gzhead.name.length?ie=R.gzhead.name.charCodeAt(R.gzindex++)&255:ie=0,Pe(R,ie)}while(ie!==0);R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),ie===0&&(R.gzindex=0,R.status=ye)}else R.status=ye;if(R.status===ye)if(R.gzhead.comment){z=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Ie(l),z=R.pending,R.pending===R.pending_buf_size)){ie=1;break}R.gzindex<R.gzhead.comment.length?ie=R.gzhead.comment.charCodeAt(R.gzindex++)&255:ie=0,Pe(R,ie)}while(ie!==0);R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),ie===0&&(R.status=_e)}else R.status=_e;if(R.status===_e&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&Ie(l),R.pending+2<=R.pending_buf_size&&(Pe(R,l.adler&255),Pe(R,l.adler>>8&255),l.adler=0,R.status=Se)):R.status=Se),R.pending!==0){if(Ie(l),l.avail_out===0)return R.last_flush=-1,_}else if(l.avail_in===0&&H(oe)<=H(ae)&&oe!==h)return x(l,N);if(R.status===Fe&&l.avail_in!==0)return x(l,N);if(l.avail_in!==0||R.lookahead!==0||oe!==u&&R.status!==Fe){var L=R.strategy===V?It(R,oe):R.strategy===j?ln(R,oe):Dt[R.level].func(R,oe);if((L===et||L===Je)&&(R.status=Fe),L===Ce||L===et)return l.avail_out===0&&(R.last_flush=-1),_;if(L===Be&&(oe===f?t._tr_align(R):oe!==d&&(t._tr_stored_block(R,0,0,!1),oe===g&&(ne(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),Ie(l),l.avail_out===0))return R.last_flush=-1,_}return oe!==h?_:R.wrap<=0?w:(R.wrap===2?(Pe(R,l.adler&255),Pe(R,l.adler>>8&255),Pe(R,l.adler>>16&255),Pe(R,l.adler>>24&255),Pe(R,l.total_in&255),Pe(R,l.total_in>>8&255),Pe(R,l.total_in>>16&255),Pe(R,l.total_in>>24&255)):(qe(R,l.adler>>>16),qe(R,l.adler&65535)),Ie(l),R.wrap>0&&(R.wrap=-R.wrap),R.pending!==0?_:w)}function Re(l){var oe;return!l||!l.state?E:(oe=l.state.status,oe!==te&&oe!==de&&oe!==Q&&oe!==ye&&oe!==_e&&oe!==Se&&oe!==Fe?x(l,E):(l.state=null,oe===Se?x(l,y):_))}function Ve(l,oe){var ae=oe.length,R,z,ie,Ue,S,L,he,Le;if(!l||!l.state||(R=l.state,Ue=R.wrap,Ue===2||Ue===1&&R.status!==te||R.lookahead))return E;for(Ue===1&&(l.adler=n(l.adler,oe,ae,0)),R.wrap=0,ae>=R.w_size&&(Ue===0&&(ne(R.head),R.strstart=0,R.block_start=0,R.insert=0),Le=new e.Buf8(R.w_size),e.arraySet(Le,oe,ae-R.w_size,R.w_size,0),oe=Le,ae=R.w_size),S=l.avail_in,L=l.next_in,he=l.input,l.avail_in=ae,l.next_in=0,l.input=oe,$e(R);R.lookahead>=D;){z=R.strstart,ie=R.lookahead-(D-1);do R.ins_h=(R.ins_h<<R.hash_shift^R.window[z+D-1])&R.hash_mask,R.prev[z&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=z,z++;while(--ie);R.strstart=z,R.lookahead=D-1,$e(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=D-1,R.match_available=0,l.next_in=L,l.input=he,l.avail_in=S,R.wrap=Ue,_}return cr.deflateInit=ce,cr.deflateInit2=Z,cr.deflateReset=Oe,cr.deflateResetKeep=me,cr.deflateSetHeader=xe,cr.deflate=m,cr.deflateEnd=Re,cr.deflateSetDictionary=Ve,cr.deflateInfo="pako deflate (from Nodeca project)",cr}var Qn={},oc,E_;function pB(){if(E_)return oc;E_=1;var e=30,t=12;return oc=function(o,a){var u,f,g,h,d,_,w,E,y,N,k,U,V,j,P,C,K,se,re,ge,le,Ae,we,p,v;u=o.state,f=o.next_in,p=o.input,g=f+(o.avail_in-5),h=o.next_out,v=o.output,d=h-(a-o.avail_out),_=h+(o.avail_out-257),w=u.dmax,E=u.wsize,y=u.whave,N=u.wnext,k=u.window,U=u.hold,V=u.bits,j=u.lencode,P=u.distcode,C=(1<<u.lenbits)-1,K=(1<<u.distbits)-1;e:do{V<15&&(U+=p[f++]<<V,V+=8,U+=p[f++]<<V,V+=8),se=j[U&C];t:for(;;){if(re=se>>>24,U>>>=re,V-=re,re=se>>>16&255,re===0)v[h++]=se&65535;else if(re&16){ge=se&65535,re&=15,re&&(V<re&&(U+=p[f++]<<V,V+=8),ge+=U&(1<<re)-1,U>>>=re,V-=re),V<15&&(U+=p[f++]<<V,V+=8,U+=p[f++]<<V,V+=8),se=P[U&K];n:for(;;){if(re=se>>>24,U>>>=re,V-=re,re=se>>>16&255,re&16){if(le=se&65535,re&=15,V<re&&(U+=p[f++]<<V,V+=8,V<re&&(U+=p[f++]<<V,V+=8)),le+=U&(1<<re)-1,le>w){o.msg="invalid distance too far back",u.mode=e;break e}if(U>>>=re,V-=re,re=h-d,le>re){if(re=le-re,re>y&&u.sane){o.msg="invalid distance too far back",u.mode=e;break e}if(Ae=0,we=k,N===0){if(Ae+=E-re,re<ge){ge-=re;do v[h++]=k[Ae++];while(--re);Ae=h-le,we=v}}else if(N<re){if(Ae+=E+N-re,re-=N,re<ge){ge-=re;do v[h++]=k[Ae++];while(--re);if(Ae=0,N<ge){re=N,ge-=re;do v[h++]=k[Ae++];while(--re);Ae=h-le,we=v}}}else if(Ae+=N-re,re<ge){ge-=re;do v[h++]=k[Ae++];while(--re);Ae=h-le,we=v}for(;ge>2;)v[h++]=we[Ae++],v[h++]=we[Ae++],v[h++]=we[Ae++],ge-=3;ge&&(v[h++]=we[Ae++],ge>1&&(v[h++]=we[Ae++]))}else{Ae=h-le;do v[h++]=v[Ae++],v[h++]=v[Ae++],v[h++]=v[Ae++],ge-=3;while(ge>2);ge&&(v[h++]=v[Ae++],ge>1&&(v[h++]=v[Ae++]))}}else if(re&64){o.msg="invalid distance code",u.mode=e;break e}else{se=P[(se&65535)+(U&(1<<re)-1)];continue n}break}}else if(re&64)if(re&32){u.mode=t;break e}else{o.msg="invalid literal/length code",u.mode=e;break e}else{se=j[(se&65535)+(U&(1<<re)-1)];continue t}break}}while(f<g&&h<_);ge=V>>3,f-=ge,V-=ge<<3,U&=(1<<V)-1,o.next_in=f,o.next_out=h,o.avail_in=f<g?5+(g-f):5-(f-g),o.avail_out=h<_?257+(_-h):257-(h-_),u.hold=U,u.bits=V},oc}var sc,S_;function bB(){if(S_)return sc;S_=1;var e=tf(),t=15,n=852,o=592,a=0,u=1,f=2,g=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],_=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return sc=function(E,y,N,k,U,V,j,P){var C=P.bits,K=0,se=0,re=0,ge=0,le=0,Ae=0,we=0,p=0,v=0,A=0,B,W,D,J,M,q=null,te=0,de,Q=new e.Buf16(t+1),ye=new e.Buf16(t+1),_e=null,Se=0,Fe,Ce,Be;for(K=0;K<=t;K++)Q[K]=0;for(se=0;se<k;se++)Q[y[N+se]]++;for(le=C,ge=t;ge>=1&&Q[ge]===0;ge--);if(le>ge&&(le=ge),ge===0)return U[V++]=1<<24|64<<16|0,U[V++]=1<<24|64<<16|0,P.bits=1,0;for(re=1;re<ge&&Q[re]===0;re++);for(le<re&&(le=re),p=1,K=1;K<=t;K++)if(p<<=1,p-=Q[K],p<0)return-1;if(p>0&&(E===a||ge!==1))return-1;for(ye[1]=0,K=1;K<t;K++)ye[K+1]=ye[K]+Q[K];for(se=0;se<k;se++)y[N+se]!==0&&(j[ye[y[N+se]]++]=se);if(E===a?(q=_e=j,de=19):E===u?(q=g,te-=257,_e=h,Se-=257,de=256):(q=d,_e=_,de=-1),A=0,se=0,K=re,M=V,Ae=le,we=0,D=-1,v=1<<le,J=v-1,E===u&&v>n||E===f&&v>o)return 1;for(;;){Fe=K-we,j[se]<de?(Ce=0,Be=j[se]):j[se]>de?(Ce=_e[Se+j[se]],Be=q[te+j[se]]):(Ce=96,Be=0),B=1<<K-we,W=1<<Ae,re=W;do W-=B,U[M+(A>>we)+W]=Fe<<24|Ce<<16|Be|0;while(W!==0);for(B=1<<K-1;A&B;)B>>=1;if(B!==0?(A&=B-1,A+=B):A=0,se++,--Q[K]===0){if(K===ge)break;K=y[N+j[se]]}if(K>le&&(A&J)!==D){for(we===0&&(we=le),M+=re,Ae=K-we,p=1<<Ae;Ae+we<ge&&(p-=Q[Ae+we],!(p<=0));)Ae++,p<<=1;if(v+=1<<Ae,E===u&&v>n||E===f&&v>o)return 1;D=A&J,U[D]=le<<24|Ae<<16|M-V|0}}return A!==0&&(U[M+A]=K-we<<24|64<<16|0),P.bits=le,0},sc}var R_;function wB(){if(R_)return Qn;R_=1;var e=tf(),t=Nw(),n=Bw(),o=pB(),a=bB(),u=0,f=1,g=2,h=4,d=5,_=6,w=0,E=1,y=2,N=-2,k=-3,U=-4,V=-5,j=8,P=1,C=2,K=3,se=4,re=5,ge=6,le=7,Ae=8,we=9,p=10,v=11,A=12,B=13,W=14,D=15,J=16,M=17,q=18,te=19,de=20,Q=21,ye=22,_e=23,Se=24,Fe=25,Ce=26,Be=27,et=28,Je=29,We=30,x=31,H=32,ne=852,Ie=592,be=15,Pe=be;function qe(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function je(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function nt(Z){var ce;return!Z||!Z.state?N:(ce=Z.state,Z.total_in=Z.total_out=ce.total=0,Z.msg="",ce.wrap&&(Z.adler=ce.wrap&1),ce.mode=P,ce.last=0,ce.havedict=0,ce.dmax=32768,ce.head=null,ce.hold=0,ce.bits=0,ce.lencode=ce.lendyn=new e.Buf32(ne),ce.distcode=ce.distdyn=new e.Buf32(Ie),ce.sane=1,ce.back=-1,w)}function $e(Z){var ce;return!Z||!Z.state?N:(ce=Z.state,ce.wsize=0,ce.whave=0,ce.wnext=0,nt(Z))}function ut(Z,ce){var m,Re;return!Z||!Z.state||(Re=Z.state,ce<0?(m=0,ce=-ce):(m=(ce>>4)+1,ce<48&&(ce&=15)),ce&&(ce<8||ce>15))?N:(Re.window!==null&&Re.wbits!==ce&&(Re.window=null),Re.wrap=m,Re.wbits=ce,$e(Z))}function Ft(Z,ce){var m,Re;return Z?(Re=new je,Z.state=Re,Re.window=null,m=ut(Z,ce),m!==w&&(Z.state=null),m):N}function pt(Z){return Ft(Z,Pe)}var ln=!0,It,lt;function Dt(Z){if(ln){var ce;for(It=new e.Buf32(512),lt=new e.Buf32(32),ce=0;ce<144;)Z.lens[ce++]=8;for(;ce<256;)Z.lens[ce++]=9;for(;ce<280;)Z.lens[ce++]=7;for(;ce<288;)Z.lens[ce++]=8;for(a(f,Z.lens,0,288,It,0,Z.work,{bits:9}),ce=0;ce<32;)Z.lens[ce++]=5;a(g,Z.lens,0,32,lt,0,Z.work,{bits:5}),ln=!1}Z.lencode=It,Z.lenbits=9,Z.distcode=lt,Z.distbits=5}function Ut(Z,ce,m,Re){var Ve,l=Z.state;return l.window===null&&(l.wsize=1<<l.wbits,l.wnext=0,l.whave=0,l.window=new e.Buf8(l.wsize)),Re>=l.wsize?(e.arraySet(l.window,ce,m-l.wsize,l.wsize,0),l.wnext=0,l.whave=l.wsize):(Ve=l.wsize-l.wnext,Ve>Re&&(Ve=Re),e.arraySet(l.window,ce,m-Re,Ve,l.wnext),Re-=Ve,Re?(e.arraySet(l.window,ce,m-Re,Re,0),l.wnext=Re,l.whave=l.wsize):(l.wnext+=Ve,l.wnext===l.wsize&&(l.wnext=0),l.whave<l.wsize&&(l.whave+=Ve))),0}function T(Z,ce){var m,Re,Ve,l,oe,ae,R,z,ie,Ue,S,L,he,Le,Ne=0,Ze,ft,Ht,bt,ir,pr,Tt,Yt,Mt=new e.Buf8(4),zt,Qt,Wn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return N;m=Z.state,m.mode===A&&(m.mode=B),oe=Z.next_out,Ve=Z.output,R=Z.avail_out,l=Z.next_in,Re=Z.input,ae=Z.avail_in,z=m.hold,ie=m.bits,Ue=ae,S=R,Yt=w;e:for(;;)switch(m.mode){case P:if(m.wrap===0){m.mode=B;break}for(;ie<16;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(m.wrap&2&&z===35615){m.check=0,Mt[0]=z&255,Mt[1]=z>>>8&255,m.check=n(m.check,Mt,2,0),z=0,ie=0,m.mode=C;break}if(m.flags=0,m.head&&(m.head.done=!1),!(m.wrap&1)||(((z&255)<<8)+(z>>8))%31){Z.msg="incorrect header check",m.mode=We;break}if((z&15)!==j){Z.msg="unknown compression method",m.mode=We;break}if(z>>>=4,ie-=4,Tt=(z&15)+8,m.wbits===0)m.wbits=Tt;else if(Tt>m.wbits){Z.msg="invalid window size",m.mode=We;break}m.dmax=1<<Tt,Z.adler=m.check=1,m.mode=z&512?p:A,z=0,ie=0;break;case C:for(;ie<16;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(m.flags=z,(m.flags&255)!==j){Z.msg="unknown compression method",m.mode=We;break}if(m.flags&57344){Z.msg="unknown header flags set",m.mode=We;break}m.head&&(m.head.text=z>>8&1),m.flags&512&&(Mt[0]=z&255,Mt[1]=z>>>8&255,m.check=n(m.check,Mt,2,0)),z=0,ie=0,m.mode=K;case K:for(;ie<32;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.head&&(m.head.time=z),m.flags&512&&(Mt[0]=z&255,Mt[1]=z>>>8&255,Mt[2]=z>>>16&255,Mt[3]=z>>>24&255,m.check=n(m.check,Mt,4,0)),z=0,ie=0,m.mode=se;case se:for(;ie<16;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.head&&(m.head.xflags=z&255,m.head.os=z>>8),m.flags&512&&(Mt[0]=z&255,Mt[1]=z>>>8&255,m.check=n(m.check,Mt,2,0)),z=0,ie=0,m.mode=re;case re:if(m.flags&1024){for(;ie<16;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.length=z,m.head&&(m.head.extra_len=z),m.flags&512&&(Mt[0]=z&255,Mt[1]=z>>>8&255,m.check=n(m.check,Mt,2,0)),z=0,ie=0}else m.head&&(m.head.extra=null);m.mode=ge;case ge:if(m.flags&1024&&(L=m.length,L>ae&&(L=ae),L&&(m.head&&(Tt=m.head.extra_len-m.length,m.head.extra||(m.head.extra=new Array(m.head.extra_len)),e.arraySet(m.head.extra,Re,l,L,Tt)),m.flags&512&&(m.check=n(m.check,Re,L,l)),ae-=L,l+=L,m.length-=L),m.length))break e;m.length=0,m.mode=le;case le:if(m.flags&2048){if(ae===0)break e;L=0;do Tt=Re[l+L++],m.head&&Tt&&m.length<65536&&(m.head.name+=String.fromCharCode(Tt));while(Tt&&L<ae);if(m.flags&512&&(m.check=n(m.check,Re,L,l)),ae-=L,l+=L,Tt)break e}else m.head&&(m.head.name=null);m.length=0,m.mode=Ae;case Ae:if(m.flags&4096){if(ae===0)break e;L=0;do Tt=Re[l+L++],m.head&&Tt&&m.length<65536&&(m.head.comment+=String.fromCharCode(Tt));while(Tt&&L<ae);if(m.flags&512&&(m.check=n(m.check,Re,L,l)),ae-=L,l+=L,Tt)break e}else m.head&&(m.head.comment=null);m.mode=we;case we:if(m.flags&512){for(;ie<16;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(z!==(m.check&65535)){Z.msg="header crc mismatch",m.mode=We;break}z=0,ie=0}m.head&&(m.head.hcrc=m.flags>>9&1,m.head.done=!0),Z.adler=m.check=0,m.mode=A;break;case p:for(;ie<32;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}Z.adler=m.check=qe(z),z=0,ie=0,m.mode=v;case v:if(m.havedict===0)return Z.next_out=oe,Z.avail_out=R,Z.next_in=l,Z.avail_in=ae,m.hold=z,m.bits=ie,y;Z.adler=m.check=1,m.mode=A;case A:if(ce===d||ce===_)break e;case B:if(m.last){z>>>=ie&7,ie-=ie&7,m.mode=Be;break}for(;ie<3;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}switch(m.last=z&1,z>>>=1,ie-=1,z&3){case 0:m.mode=W;break;case 1:if(Dt(m),m.mode=de,ce===_){z>>>=2,ie-=2;break e}break;case 2:m.mode=M;break;case 3:Z.msg="invalid block type",m.mode=We}z>>>=2,ie-=2;break;case W:for(z>>>=ie&7,ie-=ie&7;ie<32;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if((z&65535)!==(z>>>16^65535)){Z.msg="invalid stored block lengths",m.mode=We;break}if(m.length=z&65535,z=0,ie=0,m.mode=D,ce===_)break e;case D:m.mode=J;case J:if(L=m.length,L){if(L>ae&&(L=ae),L>R&&(L=R),L===0)break e;e.arraySet(Ve,Re,l,L,oe),ae-=L,l+=L,R-=L,oe+=L,m.length-=L;break}m.mode=A;break;case M:for(;ie<14;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(m.nlen=(z&31)+257,z>>>=5,ie-=5,m.ndist=(z&31)+1,z>>>=5,ie-=5,m.ncode=(z&15)+4,z>>>=4,ie-=4,m.nlen>286||m.ndist>30){Z.msg="too many length or distance symbols",m.mode=We;break}m.have=0,m.mode=q;case q:for(;m.have<m.ncode;){for(;ie<3;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.lens[Wn[m.have++]]=z&7,z>>>=3,ie-=3}for(;m.have<19;)m.lens[Wn[m.have++]]=0;if(m.lencode=m.lendyn,m.lenbits=7,zt={bits:m.lenbits},Yt=a(u,m.lens,0,19,m.lencode,0,m.work,zt),m.lenbits=zt.bits,Yt){Z.msg="invalid code lengths set",m.mode=We;break}m.have=0,m.mode=te;case te:for(;m.have<m.nlen+m.ndist;){for(;Ne=m.lencode[z&(1<<m.lenbits)-1],Ze=Ne>>>24,ft=Ne>>>16&255,Ht=Ne&65535,!(Ze<=ie);){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(Ht<16)z>>>=Ze,ie-=Ze,m.lens[m.have++]=Ht;else{if(Ht===16){for(Qt=Ze+2;ie<Qt;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(z>>>=Ze,ie-=Ze,m.have===0){Z.msg="invalid bit length repeat",m.mode=We;break}Tt=m.lens[m.have-1],L=3+(z&3),z>>>=2,ie-=2}else if(Ht===17){for(Qt=Ze+3;ie<Qt;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}z>>>=Ze,ie-=Ze,Tt=0,L=3+(z&7),z>>>=3,ie-=3}else{for(Qt=Ze+7;ie<Qt;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}z>>>=Ze,ie-=Ze,Tt=0,L=11+(z&127),z>>>=7,ie-=7}if(m.have+L>m.nlen+m.ndist){Z.msg="invalid bit length repeat",m.mode=We;break}for(;L--;)m.lens[m.have++]=Tt}}if(m.mode===We)break;if(m.lens[256]===0){Z.msg="invalid code -- missing end-of-block",m.mode=We;break}if(m.lenbits=9,zt={bits:m.lenbits},Yt=a(f,m.lens,0,m.nlen,m.lencode,0,m.work,zt),m.lenbits=zt.bits,Yt){Z.msg="invalid literal/lengths set",m.mode=We;break}if(m.distbits=6,m.distcode=m.distdyn,zt={bits:m.distbits},Yt=a(g,m.lens,m.nlen,m.ndist,m.distcode,0,m.work,zt),m.distbits=zt.bits,Yt){Z.msg="invalid distances set",m.mode=We;break}if(m.mode=de,ce===_)break e;case de:m.mode=Q;case Q:if(ae>=6&&R>=258){Z.next_out=oe,Z.avail_out=R,Z.next_in=l,Z.avail_in=ae,m.hold=z,m.bits=ie,o(Z,S),oe=Z.next_out,Ve=Z.output,R=Z.avail_out,l=Z.next_in,Re=Z.input,ae=Z.avail_in,z=m.hold,ie=m.bits,m.mode===A&&(m.back=-1);break}for(m.back=0;Ne=m.lencode[z&(1<<m.lenbits)-1],Ze=Ne>>>24,ft=Ne>>>16&255,Ht=Ne&65535,!(Ze<=ie);){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(ft&&!(ft&240)){for(bt=Ze,ir=ft,pr=Ht;Ne=m.lencode[pr+((z&(1<<bt+ir)-1)>>bt)],Ze=Ne>>>24,ft=Ne>>>16&255,Ht=Ne&65535,!(bt+Ze<=ie);){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}z>>>=bt,ie-=bt,m.back+=bt}if(z>>>=Ze,ie-=Ze,m.back+=Ze,m.length=Ht,ft===0){m.mode=Ce;break}if(ft&32){m.back=-1,m.mode=A;break}if(ft&64){Z.msg="invalid literal/length code",m.mode=We;break}m.extra=ft&15,m.mode=ye;case ye:if(m.extra){for(Qt=m.extra;ie<Qt;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.length+=z&(1<<m.extra)-1,z>>>=m.extra,ie-=m.extra,m.back+=m.extra}m.was=m.length,m.mode=_e;case _e:for(;Ne=m.distcode[z&(1<<m.distbits)-1],Ze=Ne>>>24,ft=Ne>>>16&255,Ht=Ne&65535,!(Ze<=ie);){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(!(ft&240)){for(bt=Ze,ir=ft,pr=Ht;Ne=m.distcode[pr+((z&(1<<bt+ir)-1)>>bt)],Ze=Ne>>>24,ft=Ne>>>16&255,Ht=Ne&65535,!(bt+Ze<=ie);){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}z>>>=bt,ie-=bt,m.back+=bt}if(z>>>=Ze,ie-=Ze,m.back+=Ze,ft&64){Z.msg="invalid distance code",m.mode=We;break}m.offset=Ht,m.extra=ft&15,m.mode=Se;case Se:if(m.extra){for(Qt=m.extra;ie<Qt;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}m.offset+=z&(1<<m.extra)-1,z>>>=m.extra,ie-=m.extra,m.back+=m.extra}if(m.offset>m.dmax){Z.msg="invalid distance too far back",m.mode=We;break}m.mode=Fe;case Fe:if(R===0)break e;if(L=S-R,m.offset>L){if(L=m.offset-L,L>m.whave&&m.sane){Z.msg="invalid distance too far back",m.mode=We;break}L>m.wnext?(L-=m.wnext,he=m.wsize-L):he=m.wnext-L,L>m.length&&(L=m.length),Le=m.window}else Le=Ve,he=oe-m.offset,L=m.length;L>R&&(L=R),R-=L,m.length-=L;do Ve[oe++]=Le[he++];while(--L);m.length===0&&(m.mode=Q);break;case Ce:if(R===0)break e;Ve[oe++]=m.length,R--,m.mode=Q;break;case Be:if(m.wrap){for(;ie<32;){if(ae===0)break e;ae--,z|=Re[l++]<<ie,ie+=8}if(S-=R,Z.total_out+=S,m.total+=S,S&&(Z.adler=m.check=m.flags?n(m.check,Ve,S,oe-S):t(m.check,Ve,S,oe-S)),S=R,(m.flags?z:qe(z))!==m.check){Z.msg="incorrect data check",m.mode=We;break}z=0,ie=0}m.mode=et;case et:if(m.wrap&&m.flags){for(;ie<32;){if(ae===0)break e;ae--,z+=Re[l++]<<ie,ie+=8}if(z!==(m.total&4294967295)){Z.msg="incorrect length check",m.mode=We;break}z=0,ie=0}m.mode=Je;case Je:Yt=E;break e;case We:Yt=k;break e;case x:return U;case H:default:return N}return Z.next_out=oe,Z.avail_out=R,Z.next_in=l,Z.avail_in=ae,m.hold=z,m.bits=ie,(m.wsize||S!==Z.avail_out&&m.mode<We&&(m.mode<Be||ce!==h))&&Ut(Z,Z.output,Z.next_out,S-Z.avail_out),Ue-=Z.avail_in,S-=Z.avail_out,Z.total_in+=Ue,Z.total_out+=S,m.total+=S,m.wrap&&S&&(Z.adler=m.check=m.flags?n(m.check,Ve,S,Z.next_out-S):t(m.check,Ve,S,Z.next_out-S)),Z.data_type=m.bits+(m.last?64:0)+(m.mode===A?128:0)+(m.mode===de||m.mode===D?256:0),(Ue===0&&S===0||ce===h)&&Yt===w&&(Yt=V),Yt}function me(Z){if(!Z||!Z.state)return N;var ce=Z.state;return ce.window&&(ce.window=null),Z.state=null,w}function Oe(Z,ce){var m;return!Z||!Z.state||(m=Z.state,!(m.wrap&2))?N:(m.head=ce,ce.done=!1,w)}function xe(Z,ce){var m=ce.length,Re,Ve,l;return!Z||!Z.state||(Re=Z.state,Re.wrap!==0&&Re.mode!==v)?N:Re.mode===v&&(Ve=1,Ve=t(Ve,ce,m,0),Ve!==Re.check)?k:(l=Ut(Z,ce,m,m),l?(Re.mode=x,U):(Re.havedict=1,w))}return Qn.inflateReset=$e,Qn.inflateReset2=ut,Qn.inflateResetKeep=nt,Qn.inflateInit=pt,Qn.inflateInit2=Ft,Qn.inflate=T,Qn.inflateEnd=me,Qn.inflateGetHeader=Oe,Qn.inflateSetDictionary=xe,Qn.inflateInfo="pako inflate (from Nodeca project)",Qn}var ac,A_;function yB(){return A_||(A_=1,ac={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),ac}var I_;function mB(){return I_||(I_=1,function(e){var t=j_(),n=dB(),o=_B(),a=wB(),u=yB();for(var f in u)e[f]=u[f];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;var g=31,h=139;function d(_){if(typeof _!="number"||_<e.DEFLATE||_>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=_,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}d.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,t(this.init_done,"close before init"),t(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):(this.mode===e.INFLATE||this.mode===e.GUNZIP||this.mode===e.INFLATERAW||this.mode===e.UNZIP)&&a.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null},d.prototype.write=function(_,w,E,y,N,k,U){return this._write(!0,_,w,E,y,N,k,U)},d.prototype.writeSync=function(_,w,E,y,N,k,U){return this._write(!1,_,w,E,y,N,k,U)},d.prototype._write=function(_,w,E,y,N,k,U,V){if(t.equal(arguments.length,8),t(this.init_done,"write before init"),t(this.mode!==e.NONE,"already finalized"),t.equal(!1,this.write_in_progress,"write already in progress"),t.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,t.equal(!1,w===void 0,"must provide flush value"),this.write_in_progress=!0,w!==e.Z_NO_FLUSH&&w!==e.Z_PARTIAL_FLUSH&&w!==e.Z_SYNC_FLUSH&&w!==e.Z_FULL_FLUSH&&w!==e.Z_FINISH&&w!==e.Z_BLOCK)throw new Error("Invalid flush value");if(E==null&&(E=De.Buffer.alloc(0),N=0,y=0),this.strm.avail_in=N,this.strm.input=E,this.strm.next_in=y,this.strm.avail_out=V,this.strm.output=k,this.strm.next_out=U,this.flush=w,!_)return this._process(),this._checkError()?this._afterSync():void 0;var j=this;return De.process.nextTick(function(){j._process(),j._after()}),this},d.prototype._afterSync=function(){var _=this.strm.avail_out,w=this.strm.avail_in;return this.write_in_progress=!1,[w,_]},d.prototype._process=function(){var _=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(_=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(_===null)break;if(this.strm.input[_]===g){if(this.gzip_id_bytes_read=1,_++,this.strm.avail_in===1)break}else{this.mode=e.INFLATE;break}case 1:if(_===null)break;this.strm.input[_]===h?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},d.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},d.prototype._after=function(){if(this._checkError()){var _=this.strm.avail_out,w=this.strm.avail_in;this.write_in_progress=!1,this.callback(w,_),this.pending_close&&this.close()}},d.prototype._error=function(_){this.strm.msg&&(_=this.strm.msg),this.onerror(_,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},d.prototype.init=function(_,w,E,y,N){t(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),t(_>=8&&_<=15,"invalid windowBits"),t(w>=-1&&w<=9,"invalid compression level"),t(E>=1&&E<=9,"invalid memlevel"),t(y===e.Z_FILTERED||y===e.Z_HUFFMAN_ONLY||y===e.Z_RLE||y===e.Z_FIXED||y===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(w,_,E,y,N),this._setDictionary()},d.prototype.params=function(){throw new Error("deflateParams Not supported")},d.prototype.reset=function(){this._reset(),this._setDictionary()},d.prototype._init=function(_,w,E,y,N){switch(this.level=_,this.windowBits=w,this.memLevel=E,this.strategy=y,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,(this.mode===e.GZIP||this.mode===e.GUNZIP)&&(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),(this.mode===e.DEFLATERAW||this.mode===e.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new n,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=N,this.write_in_progress=!1,this.init_done=!0},d.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary);break}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},d.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=a.inflateReset(this.strm);break}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=d}(Ql)),Ql}var T_;function vB(){return T_||(T_=1,function(e){var t=Lr.Buffer,n=RR().Transform,o=mB(),a=W_,u=j_().ok,f=Lr.kMaxLength,g="Cannot create final Buffer. It would be larger than 0x"+f.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16*1024,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var h=Object.keys(o),d=0;d<h.length;d++){var _=h[d];_.match(/^Z/)&&Object.defineProperty(e,_,{enumerable:!0,value:o[_],writable:!1})}for(var w={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},E=Object.keys(w),y=0;y<E.length;y++){var N=E[y];w[w[N]]=N}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(w),writable:!1}),e.Deflate=V,e.Inflate=j,e.Gzip=P,e.Gunzip=C,e.DeflateRaw=K,e.InflateRaw=se,e.Unzip=re,e.createDeflate=function(p){return new V(p)},e.createInflate=function(p){return new j(p)},e.createDeflateRaw=function(p){return new K(p)},e.createInflateRaw=function(p){return new se(p)},e.createGzip=function(p){return new P(p)},e.createGunzip=function(p){return new C(p)},e.createUnzip=function(p){return new re(p)},e.deflate=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new V(v),p,A)},e.deflateSync=function(p,v){return U(new V(v),p)},e.gzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new P(v),p,A)},e.gzipSync=function(p,v){return U(new P(v),p)},e.deflateRaw=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new K(v),p,A)},e.deflateRawSync=function(p,v){return U(new K(v),p)},e.unzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new re(v),p,A)},e.unzipSync=function(p,v){return U(new re(v),p)},e.inflate=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new j(v),p,A)},e.inflateSync=function(p,v){return U(new j(v),p)},e.gunzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new C(v),p,A)},e.gunzipSync=function(p,v){return U(new C(v),p)},e.inflateRaw=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new se(v),p,A)},e.inflateRawSync=function(p,v){return U(new se(v),p)};function k(p,v,A){var B=[],W=0;p.on("error",J),p.on("end",M),p.end(v),D();function D(){for(var q;(q=p.read())!==null;)B.push(q),W+=q.length;p.once("readable",D)}function J(q){p.removeListener("end",M),p.removeListener("readable",D),A(q)}function M(){var q,te=null;W>=f?te=new RangeError(g):q=t.concat(B,W),B=[],p.close(),A(te,q)}}function U(p,v){if(typeof v=="string"&&(v=t.from(v)),!t.isBuffer(v))throw new TypeError("Not a string or buffer");var A=p._finishFlushFlag;return p._processChunk(v,A)}function V(p){if(!(this instanceof V))return new V(p);le.call(this,p,o.DEFLATE)}function j(p){if(!(this instanceof j))return new j(p);le.call(this,p,o.INFLATE)}function P(p){if(!(this instanceof P))return new P(p);le.call(this,p,o.GZIP)}function C(p){if(!(this instanceof C))return new C(p);le.call(this,p,o.GUNZIP)}function K(p){if(!(this instanceof K))return new K(p);le.call(this,p,o.DEFLATERAW)}function se(p){if(!(this instanceof se))return new se(p);le.call(this,p,o.INFLATERAW)}function re(p){if(!(this instanceof re))return new re(p);le.call(this,p,o.UNZIP)}function ge(p){return p===o.Z_NO_FLUSH||p===o.Z_PARTIAL_FLUSH||p===o.Z_SYNC_FLUSH||p===o.Z_FULL_FLUSH||p===o.Z_FINISH||p===o.Z_BLOCK}function le(p,v){var A=this;if(this._opts=p=p||{},this._chunkSize=p.chunkSize||e.Z_DEFAULT_CHUNK,n.call(this,p),p.flush&&!ge(p.flush))throw new Error("Invalid flush flag: "+p.flush);if(p.finishFlush&&!ge(p.finishFlush))throw new Error("Invalid flush flag: "+p.finishFlush);if(this._flushFlag=p.flush||o.Z_NO_FLUSH,this._finishFlushFlag=typeof p.finishFlush<"u"?p.finishFlush:o.Z_FINISH,p.chunkSize&&(p.chunkSize<e.Z_MIN_CHUNK||p.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+p.chunkSize);if(p.windowBits&&(p.windowBits<e.Z_MIN_WINDOWBITS||p.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+p.windowBits);if(p.level&&(p.level<e.Z_MIN_LEVEL||p.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+p.level);if(p.memLevel&&(p.memLevel<e.Z_MIN_MEMLEVEL||p.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+p.memLevel);if(p.strategy&&p.strategy!=e.Z_FILTERED&&p.strategy!=e.Z_HUFFMAN_ONLY&&p.strategy!=e.Z_RLE&&p.strategy!=e.Z_FIXED&&p.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+p.strategy);if(p.dictionary&&!t.isBuffer(p.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(v);var B=this;this._hadError=!1,this._handle.onerror=function(J,M){Ae(B),B._hadError=!0;var q=new Error(J);q.errno=M,q.code=e.codes[M],B.emit("error",q)};var W=e.Z_DEFAULT_COMPRESSION;typeof p.level=="number"&&(W=p.level);var D=e.Z_DEFAULT_STRATEGY;typeof p.strategy=="number"&&(D=p.strategy),this._handle.init(p.windowBits||e.Z_DEFAULT_WINDOWBITS,W,p.memLevel||e.Z_DEFAULT_MEMLEVEL,D,p.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=W,this._strategy=D,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!A._handle},configurable:!0,enumerable:!0})}a.inherits(le,n),le.prototype.params=function(p,v,A){if(p<e.Z_MIN_LEVEL||p>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+p);if(v!=e.Z_FILTERED&&v!=e.Z_HUFFMAN_ONLY&&v!=e.Z_RLE&&v!=e.Z_FIXED&&v!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+v);if(this._level!==p||this._strategy!==v){var B=this;this.flush(o.Z_SYNC_FLUSH,function(){u(B._handle,"zlib binding closed"),B._handle.params(p,v),B._hadError||(B._level=p,B._strategy=v,A&&A())})}else De.process.nextTick(A)},le.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},le.prototype._flush=function(p){this._transform(t.alloc(0),"",p)},le.prototype.flush=function(p,v){var A=this,B=this._writableState;(typeof p=="function"||p===void 0&&!v)&&(v=p,p=o.Z_FULL_FLUSH),B.ended?v&&De.process.nextTick(v):B.ending?v&&this.once("end",v):B.needDrain?v&&this.once("drain",function(){return A.flush(p,v)}):(this._flushFlag=p,this.write(t.alloc(0),"",v))},le.prototype.close=function(p){Ae(this,p),De.process.nextTick(we,this)};function Ae(p,v){v&&De.process.nextTick(v),p._handle&&(p._handle.close(),p._handle=null)}function we(p){p.emit("close")}le.prototype._transform=function(p,v,A){var B,W=this._writableState,D=W.ending||W.ended,J=D&&(!p||W.length===p.length);if(p!==null&&!t.isBuffer(p))return A(new Error("invalid input"));if(!this._handle)return A(new Error("zlib binding closed"));J?B=this._finishFlushFlag:(B=this._flushFlag,p.length>=W.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),this._processChunk(p,B,A)},le.prototype._processChunk=function(p,v,A){var B=p&&p.length,W=this._chunkSize-this._offset,D=0,J=this,M=typeof A=="function";if(!M){var q=[],te=0,de;this.on("error",function(Fe){de=Fe}),u(this._handle,"zlib binding closed");do var Q=this._handle.writeSync(v,p,D,B,this._buffer,this._offset,W);while(!this._hadError&&Se(Q[0],Q[1]));if(this._hadError)throw de;if(te>=f)throw Ae(this),new RangeError(g);var ye=t.concat(q,te);return Ae(this),ye}u(this._handle,"zlib binding closed");var _e=this._handle.write(v,p,D,B,this._buffer,this._offset,W);_e.buffer=p,_e.callback=Se;function Se(Fe,Ce){if(this&&(this.buffer=null,this.callback=null),!J._hadError){var Be=W-Ce;if(u(Be>=0,"have should not go down"),Be>0){var et=J._buffer.slice(J._offset,J._offset+Be);J._offset+=Be,M?J.push(et):(q.push(et),te+=et.length)}if((Ce===0||J._offset>=J._chunkSize)&&(W=J._chunkSize,J._offset=0,J._buffer=t.allocUnsafe(J._chunkSize)),Ce===0){if(D+=B-Fe,B=Fe,!M)return!0;var Je=J._handle.write(v,p,D,B,J._buffer,J._offset,J._chunkSize);Je.callback=Se,Je.buffer=p;return}if(!M)return!1;A()}}},a.inherits(V,le),a.inherits(j,le),a.inherits(P,le),a.inherits(C,le),a.inherits(K,le),a.inherits(se,le),a.inherits(re,le)}(Yl)),Yl}Object.defineProperty(Fi,"__esModule",{value:!0});Fi.InvalidStatusCodeError=Fi.InvalidCertError=void 0;const $w=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class xc extends Error{constructor(t,n){super(t),this.fingerprint256=n}}Fi.InvalidCertError=xc;class Cd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Fi.InvalidStatusCodeError=Cd;function xw(e,t){if(!t||t==="text"||t==="json")try{let n=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return n;try{return JSON.parse(n)}catch(o){if(t==="json")throw o;return n}}catch(n){if(t==="text"||t==="json")throw n}return e}let O_={};function Dc(e,t){var E;let n={...$w,...t};const o=TR,a=OR,u=vB(),{promisify:f}=W_,{resolve:g}=LR,h=!!/^https/.test(e);let d={method:n.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const _=y=>y.replace(/:| /g,"").toLowerCase();if(n.keepAlive){const y={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},N=[h,h&&((E=n.sslPinnedCertificates)==null?void 0:E.map(k=>_(k)).sort())].join();d.agent=O_[N]||(O_[N]=new(h?a:o).Agent(y))}n.type==="json"&&(d.headers["Content-Type"]="application/json"),n.data&&(n.method||(d.method="POST"),d.body=n.type==="json"?JSON.stringify(n.data):n.data),d.headers={...d.headers,...n.headers},n.sslAllowSelfSigned&&(d.rejectUnauthorized=!1);const w=async y=>{const N=y.statusCode;if(n.redirect&&300<=N&&N<400&&y.headers.location){if(n._redirectCount==10)throw new Error("Request failed. Too much redirects.");return n._redirectCount+=1,await Dc(g(e,y.headers.location),n)}if(n.expectStatusCode&&N!==n.expectStatusCode)throw y.resume(),new Cd(N);let k=[];for await(const P of y)k.push(P);let U=De.Buffer.concat(k);const V=y.headers["content-encoding"];V==="br"&&(U=await f(u.brotliDecompress)(U)),(V==="gzip"||V==="deflate")&&(U=await f(u.unzip)(U));const j=xw(U,n.type);return n.full?{headers:y.headers,status:N,body:j}:j};return new Promise((y,N)=>{var P;const k=async C=>{if(C&&C.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await Dc(e,{...n,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(K){K&&K.fingerprint256&&(C=new xc(`Self-signed SSL certificate: ${K.fingerprint256}`,K.fingerprint256))}N(C)},U=(h?a:o).request(e,d,C=>{C.on("error",k),(async()=>{try{y(await w(C))}catch(K){N(K)}})()});U.on("error",k);const V=(P=n.sslPinnedCertificates)==null?void 0:P.map(C=>_(C)),j=C=>{var se;const K=_(((se=C.getPeerCertificate())==null?void 0:se.fingerprint256)||"");if(!(!K&&C.isSessionReused())&&!V.includes(K))return U.emit("error",new xc(`Invalid SSL certificate: ${K} Expected: ${V}`,K)),U.abort()};n.sslPinnedCertificates&&U.on("socket",C=>{C.listeners("secureConnect").map(se=>(se.name||"").replace("bound ","")).includes("mfetchSecureConnect")||C.on("secureConnect",j.bind(null,C))}),n.keepAlive&&U.setNoDelay(!0),d.body&&U.write(d.body),U.end()})}const EB=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),SB=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 RB(e,t){let n={...$w,...t};const o=new Headers;n.type==="json"&&o.set("Content-Type","application/json");let a=new URL(e);if(a.username){const h=btoa(`${a.username}:${a.password}`);o.set("Authorization",`Basic ${h}`),a.username="",a.password=""}e=""+a;for(let h in n.headers){const d=h.toLowerCase();(EB.has(d)||n.cors&&!SB.has(d))&&o.set(h,n.headers[h])}let u={headers:o,redirect:n.redirect?"follow":"manual"};n.referrer||(u.referrerPolicy="no-referrer"),n.cors&&(u.mode="cors"),n.data&&(n.method||(u.method="POST"),u.body=n.type==="json"?JSON.stringify(n.data):n.data);const f=await fetch(e,u);if(n.expectStatusCode&&f.status!==n.expectStatusCode)throw new Cd(f.status);const g=xw(new Uint8Array(await f.arrayBuffer()),n.type);return n.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:g}:g}const AB=!!(typeof De.process=="object"&&De.process.versions&&De.process.versions.node&&De.process.versions.v8);function IB(e,t){return(AB?Dc:RB)(e,t)}Fi.default=IB;Object.defineProperty(Oo,"__esModule",{value:!0});Oo.getProvider=Oo.fetchFromProvider=void 0;const TB=Fi,OB=async(e,t)=>(await(0,TB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;Oo.fetchFromProvider=OB;const LB=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")};Oo.getProvider=LB;(function(e){var t=At&&At.__createBinding||(Object.create?function(a,u,f,g){g===void 0&&(g=f);var h=Object.getOwnPropertyDescriptor(u,f);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(a,g,h)}:function(a,u,f,g){g===void 0&&(g=f),a[g]=u[f]}),n=At&&At.__exportStar||function(a,u){for(var f in a)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&t(u,a,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,n(Fu,e),n(Zu,e),n(Id,e),n(xs,e),n(Ju,e),n(wn,e),n(Gi,e),n(Ld,e),n(Pw,e),n(Qu,e);var o=Bt;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}}),n(ef,e),n(Oo,e)})(xP);var Dw={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(At,function(){var t=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],u={},f=null;function g(k,U){var V=k[U];if(typeof V.bind=="function")return V.bind(k);try{return Function.prototype.bind.call(V,k)}catch{return function(){return Function.prototype.apply.apply(V,[k,arguments])}}}function h(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(k){return k==="debug"&&(k="log"),typeof console===n?!1:k==="trace"&&o?h:console[k]!==void 0?g(console,k):console.log!==void 0?g(console,"log"):t}function _(){for(var k=this.getLevel(),U=0;U<a.length;U++){var V=a[U];this[V]=U<k?t:this.methodFactory(V,k,this.name)}if(this.log=this.debug,typeof console===n&&k<this.levels.SILENT)return"No console available for logging"}function w(k){return function(){typeof console!==n&&(_.call(this),this[k].apply(this,arguments))}}function E(k,U,V){return d(k)||w.apply(this,arguments)}function y(k,U){var V=this,j,P,C,K="loglevel";typeof k=="string"?K+=":"+k:typeof k=="symbol"&&(K=void 0);function se(we){var p=(a[we]||"silent").toUpperCase();if(!(typeof window===n||!K)){try{window.localStorage[K]=p;return}catch{}try{window.document.cookie=encodeURIComponent(K)+"="+p+";"}catch{}}}function re(){var we;if(!(typeof window===n||!K)){try{we=window.localStorage[K]}catch{}if(typeof we===n)try{var p=window.document.cookie,v=encodeURIComponent(K),A=p.indexOf(v+"=");A!==-1&&(we=/^([^;]+)/.exec(p.slice(A+v.length+1))[1])}catch{}return V.levels[we]===void 0&&(we=void 0),we}}function ge(){if(!(typeof window===n||!K)){try{window.localStorage.removeItem(K)}catch{}try{window.document.cookie=encodeURIComponent(K)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function le(we){var p=we;if(typeof p=="string"&&V.levels[p.toUpperCase()]!==void 0&&(p=V.levels[p.toUpperCase()]),typeof p=="number"&&p>=0&&p<=V.levels.SILENT)return p;throw new TypeError("log.setLevel() called with invalid level: "+we)}V.name=k,V.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},V.methodFactory=U||E,V.getLevel=function(){return C??P??j},V.setLevel=function(we,p){return C=le(we),p!==!1&&se(C),_.call(V)},V.setDefaultLevel=function(we){P=le(we),re()||V.setLevel(we,!1)},V.resetLevel=function(){C=null,ge(),_.call(V)},V.enableAll=function(we){V.setLevel(V.levels.TRACE,we)},V.disableAll=function(we){V.setLevel(V.levels.SILENT,we)},V.rebuild=function(){if(f!==V&&(j=le(f.getLevel())),_.call(V),f===V)for(var we in u)u[we].rebuild()},j=le(f?f.getLevel():"WARN");var Ae=re();Ae!=null&&(C=le(Ae)),_.call(V)}f=new y,f.getLogger=function(U){if(typeof U!="symbol"&&typeof U!="string"||U==="")throw new TypeError("You must supply a name when creating a logger.");var V=u[U];return V||(V=u[U]=new y(U,f.methodFactory)),V};var N=typeof window!==n?window.log:void 0;return f.noConflict=function(){return typeof window!==n&&window.log===f&&(window.log=N),f},f.getLoggers=function(){return u},f.default=f,f})})(Dw);var Mw=Dw.exports;const hu=wi(Mw);var gu={exports:{}};gu.exports;(function(e,t){var n=200,o="__lodash_hash_undefined__",a=800,u=16,f=9007199254740991,g="[object Arguments]",h="[object Array]",d="[object AsyncFunction]",_="[object Boolean]",w="[object Date]",E="[object Error]",y="[object Function]",N="[object GeneratorFunction]",k="[object Map]",U="[object Number]",V="[object Null]",j="[object Object]",P="[object Proxy]",C="[object RegExp]",K="[object Set]",se="[object String]",re="[object Undefined]",ge="[object WeakMap]",le="[object ArrayBuffer]",Ae="[object DataView]",we="[object Float32Array]",p="[object Float64Array]",v="[object Int8Array]",A="[object Int16Array]",B="[object Int32Array]",W="[object Uint8Array]",D="[object Uint8ClampedArray]",J="[object Uint16Array]",M="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,Q={};Q[we]=Q[p]=Q[v]=Q[A]=Q[B]=Q[W]=Q[D]=Q[J]=Q[M]=!0,Q[g]=Q[h]=Q[le]=Q[_]=Q[Ae]=Q[w]=Q[E]=Q[y]=Q[k]=Q[U]=Q[j]=Q[C]=Q[K]=Q[se]=Q[ge]=!1;var ye=typeof At=="object"&&At&&At.Object===Object&&At,_e=typeof self=="object"&&self&&self.Object===Object&&self,Se=ye||_e||Function("return this")(),Fe=t&&!t.nodeType&&t,Ce=Fe&&!0&&e&&!e.nodeType&&e,Be=Ce&&Ce.exports===Fe,et=Be&&ye.process,Je=function(){try{var $=Ce&&Ce.require&&Ce.require("util").types;return $||et&&et.binding&&et.binding("util")}catch{}}(),We=Je&&Je.isTypedArray;function x($,X,fe){switch(fe.length){case 0:return $.call(X);case 1:return $.call(X,fe[0]);case 2:return $.call(X,fe[0],fe[1]);case 3:return $.call(X,fe[0],fe[1],fe[2])}return $.apply(X,fe)}function H($,X){for(var fe=-1,He=Array($);++fe<$;)He[fe]=X(fe);return He}function ne($){return function(X){return $(X)}}function Ie($,X){return $==null?void 0:$[X]}function be($,X){return function(fe){return $(X(fe))}}var Pe=Array.prototype,qe=Function.prototype,je=Object.prototype,nt=Se["__core-js_shared__"],$e=qe.toString,ut=je.hasOwnProperty,Ft=function(){var $=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),pt=je.toString,ln=$e.call(Object),It=RegExp("^"+$e.call(ut).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lt=Be?Se.Buffer:void 0,Dt=Se.Symbol,Ut=Se.Uint8Array;lt&<.allocUnsafe;var T=be(Object.getPrototypeOf,Object),me=Object.create,Oe=je.propertyIsEnumerable,xe=Pe.splice,Z=Dt?Dt.toStringTag:void 0,ce=function(){try{var $=Mo(Object,"defineProperty");return $({},"",{}),$}catch{}}(),m=lt?lt.isBuffer:void 0,Re=Math.max,Ve=Date.now,l=Mo(Se,"Map"),oe=Mo(Object,"create"),ae=function(){function $(){}return function(X){if(!Nr(X))return{};if(me)return me(X);$.prototype=X;var fe=new $;return $.prototype=void 0,fe}}();function R($){var X=-1,fe=$==null?0:$.length;for(this.clear();++X<fe;){var He=$[X];this.set(He[0],He[1])}}function z(){this.__data__=oe?oe(null):{},this.size=0}function ie($){var X=this.has($)&&delete this.__data__[$];return this.size-=X?1:0,X}function Ue($){var X=this.__data__;if(oe){var fe=X[$];return fe===o?void 0:fe}return ut.call(X,$)?X[$]:void 0}function S($){var X=this.__data__;return oe?X[$]!==void 0:ut.call(X,$)}function L($,X){var fe=this.__data__;return this.size+=this.has($)?0:1,fe[$]=oe&&X===void 0?o:X,this}R.prototype.clear=z,R.prototype.delete=ie,R.prototype.get=Ue,R.prototype.has=S,R.prototype.set=L;function he($){var X=-1,fe=$==null?0:$.length;for(this.clear();++X<fe;){var He=$[X];this.set(He[0],He[1])}}function Le(){this.__data__=[],this.size=0}function Ne($){var X=this.__data__,fe=Ki(X,$);if(fe<0)return!1;var He=X.length-1;return fe==He?X.pop():xe.call(X,fe,1),--this.size,!0}function Ze($){var X=this.__data__,fe=Ki(X,$);return fe<0?void 0:X[fe][1]}function ft($){return Ki(this.__data__,$)>-1}function Ht($,X){var fe=this.__data__,He=Ki(fe,$);return He<0?(++this.size,fe.push([$,X])):fe[He][1]=X,this}he.prototype.clear=Le,he.prototype.delete=Ne,he.prototype.get=Ze,he.prototype.has=ft,he.prototype.set=Ht;function bt($){var X=-1,fe=$==null?0:$.length;for(this.clear();++X<fe;){var He=$[X];this.set(He[0],He[1])}}function ir(){this.size=0,this.__data__={hash:new R,map:new(l||he),string:new R}}function pr($){var X=vi(this,$).delete($);return this.size-=X?1:0,X}function Tt($){return vi(this,$).get($)}function Yt($){return vi(this,$).has($)}function Mt($,X){var fe=vi(this,$),He=fe.size;return fe.set($,X),this.size+=fe.size==He?0:1,this}bt.prototype.clear=ir,bt.prototype.delete=pr,bt.prototype.get=Tt,bt.prototype.has=Yt,bt.prototype.set=Mt;function zt($){var X=this.__data__=new he($);this.size=X.size}function Qt(){this.__data__=new he,this.size=0}function Wn($){var X=this.__data__,fe=X.delete($);return this.size=X.size,fe}function or($){return this.__data__.get($)}function Bn($){return this.__data__.has($)}function sf($,X){var fe=this.__data__;if(fe instanceof he){var He=fe.__data__;if(!l||He.length<n-1)return He.push([$,X]),this.size=++fe.size,this;fe=this.__data__=new bt(He)}return fe.set($,X),this.size=fe.size,this}zt.prototype.clear=Qt,zt.prototype.delete=Wn,zt.prototype.get=or,zt.prototype.has=Bn,zt.prototype.set=sf;function af($,X){var fe=Ho($),He=!fe&&Uo($),dt=!fe&&!He&&ea($),yt=!fe&&!He&&!dt&&na($),Pt=fe||He||dt||yt,Qe=Pt?H($.length,String):[],Rt=Qe.length;for(var en in $)Pt&&(en=="length"||dt&&(en=="offset"||en=="parent")||yt&&(en=="buffer"||en=="byteLength"||en=="byteOffset")||Yi(en,Rt))||Qe.push(en);return Qe}function xo($,X,fe){(fe!==void 0&&!Ei($[X],fe)||fe===void 0&&!(X in $))&&Yr($,X,fe)}function Zi($,X,fe){var He=$[X];(!(ut.call($,X)&&Ei(He,fe))||fe===void 0&&!(X in $))&&Yr($,X,fe)}function Ki($,X){for(var fe=$.length;fe--;)if(Ei($[fe][0],X))return fe;return-1}function Yr($,X,fe){X=="__proto__"&&ce?ce($,X,{configurable:!0,enumerable:!0,value:fe,writable:!0}):$[X]=fe}var uf=Xi();function Ji($){return $==null?$===void 0?re:V:Z&&Z in Object($)?qs($):Zs($)}function Ds($){return Br($)&&Ji($)==g}function Ms($){if(!Nr($)||ko($))return!1;var X=Wo($)?It:te;return X.test(Ys($))}function ks($){return Br($)&&ta($.length)&&!!Q[Ji($)]}function Fs($){if(!Nr($))return Qr($);var X=Qi($),fe=[];for(var He in $)He=="constructor"&&(X||!ut.call($,He))||fe.push(He);return fe}function Us($,X,fe,He,dt){$!==X&&uf(X,function(yt,Pt){if(dt||(dt=new zt),Nr(yt))ff($,X,Pt,fe,Us,He,dt);else{var Qe=He?He(Fo($,Pt),yt,Pt+"",$,X,dt):void 0;Qe===void 0&&(Qe=yt),xo($,Pt,Qe)}},ra)}function ff($,X,fe,He,dt,yt,Pt){var Qe=Fo($,fe),Rt=Fo(X,fe),en=Pt.get(Rt);if(en){xo($,fe,en);return}var cn=yt?yt(Qe,Rt,fe+"",$,X,Pt):void 0,$r=cn===void 0;if($r){var dn=Ho(Rt),eo=!dn&&ea(Rt),zo=!dn&&!eo&&na(Rt);cn=Rt,dn||eo||zo?Ho(Qe)?cn=Qe:Qs(Qe)?cn=Do(Qe):eo?($r=!1,cn=Hs(Rt)):zo?($r=!1,cn=Ws(Rt)):cn=[]:gf(Rt)||Uo(Rt)?(cn=Qe,Uo(Qe)?cn=_f(Qe):(!Nr(Qe)||Wo(Qe))&&(cn=Vs(Rt))):$r=!1}$r&&(Pt.set(Rt,cn),dt(cn,Rt,He,yt,Pt),Pt.delete(Rt)),xo($,fe,cn)}function lf($,X){return Js(Ks($,X,vt),$+"")}var cf=ce?function($,X){return ce($,"toString",{configurable:!0,enumerable:!1,value:Ot(X),writable:!0})}:vt;function Hs($,X){return $.slice()}function js($){var X=new $.constructor($.byteLength);return new Ut(X).set(new Ut($)),X}function Ws($,X){var fe=js($.buffer);return new $.constructor(fe,$.byteOffset,$.length)}function Do($,X){var fe=-1,He=$.length;for(X||(X=Array(He));++fe<He;)X[fe]=$[fe];return X}function df($,X,fe,He){var dt=!fe;fe||(fe={});for(var yt=-1,Pt=X.length;++yt<Pt;){var Qe=X[yt],Rt=void 0;Rt===void 0&&(Rt=$[Qe]),dt?Yr(fe,Qe,Rt):Zi(fe,Qe,Rt)}return fe}function zs($){return lf(function(X,fe){var He=-1,dt=fe.length,yt=dt>1?fe[dt-1]:void 0,Pt=dt>2?fe[2]:void 0;for(yt=$.length>3&&typeof yt=="function"?(dt--,yt):void 0,Pt&&hf(fe[0],fe[1],Pt)&&(yt=dt<3?void 0:yt,dt=1),X=Object(X);++He<dt;){var Qe=fe[He];Qe&&$(X,Qe,He,yt)}return X})}function Xi($){return function(X,fe,He){for(var dt=-1,yt=Object(X),Pt=He(X),Qe=Pt.length;Qe--;){var Rt=Pt[++dt];if(fe(yt[Rt],Rt,yt)===!1)break}return X}}function vi($,X){var fe=$.__data__;return Gs(X)?fe[typeof X=="string"?"string":"hash"]:fe.map}function Mo($,X){var fe=Ie($,X);return Ms(fe)?fe:void 0}function qs($){var X=ut.call($,Z),fe=$[Z];try{$[Z]=void 0;var He=!0}catch{}var dt=pt.call($);return He&&(X?$[Z]=fe:delete $[Z]),dt}function Vs($){return typeof $.constructor=="function"&&!Qi($)?ae(T($)):{}}function Yi($,X){var fe=typeof $;return X=X??f,!!X&&(fe=="number"||fe!="symbol"&&de.test($))&&$>-1&&$%1==0&&$<X}function hf($,X,fe){if(!Nr(fe))return!1;var He=typeof X;return(He=="number"?jo(fe)&&Yi(X,fe.length):He=="string"&&X in fe)?Ei(fe[X],$):!1}function Gs($){var X=typeof $;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?$!=="__proto__":$===null}function ko($){return!!Ft&&Ft in $}function Qi($){var X=$&&$.constructor,fe=typeof X=="function"&&X.prototype||je;return $===fe}function Qr($){var X=[];if($!=null)for(var fe in Object($))X.push(fe);return X}function Zs($){return pt.call($)}function Ks($,X,fe){return X=Re(X===void 0?$.length-1:X,0),function(){for(var He=arguments,dt=-1,yt=Re(He.length-X,0),Pt=Array(yt);++dt<yt;)Pt[dt]=He[X+dt];dt=-1;for(var Qe=Array(X+1);++dt<X;)Qe[dt]=He[dt];return Qe[X]=fe(Pt),x($,this,Qe)}}function Fo($,X){if(!(X==="constructor"&&typeof $[X]=="function")&&X!="__proto__")return $[X]}var Js=Xs(cf);function Xs($){var X=0,fe=0;return function(){var He=Ve(),dt=u-(He-fe);if(fe=He,dt>0){if(++X>=a)return arguments[0]}else X=0;return $.apply(void 0,arguments)}}function Ys($){if($!=null){try{return $e.call($)}catch{}try{return $+""}catch{}}return""}function Ei($,X){return $===X||$!==$&&X!==X}var Uo=Ds(function(){return arguments}())?Ds:function($){return Br($)&&ut.call($,"callee")&&!Oe.call($,"callee")},Ho=Array.isArray;function jo($){return $!=null&&ta($.length)&&!Wo($)}function Qs($){return Br($)&&jo($)}var ea=m||bf;function Wo($){if(!Nr($))return!1;var X=Ji($);return X==y||X==N||X==d||X==P}function ta($){return typeof $=="number"&&$>-1&&$%1==0&&$<=f}function Nr($){var X=typeof $;return $!=null&&(X=="object"||X=="function")}function Br($){return $!=null&&typeof $=="object"}function gf($){if(!Br($)||Ji($)!=j)return!1;var X=T($);if(X===null)return!0;var fe=ut.call(X,"constructor")&&X.constructor;return typeof fe=="function"&&fe instanceof fe&&$e.call(fe)==ln}var na=We?ne(We):ks;function _f($){return df($,ra($))}function ra($){return jo($)?af($):Fs($)}var pf=zs(function($,X,fe){Us($,X,fe)});function Ot($){return function(){return $}}function vt($){return $}function bf(){return!1}e.exports=pf})(gu,gu.exports);gu.exports;const CB=hu.getLogger("http-helpers");CB.setLevel(Mw.levels.INFO);var _u={exports:{}};/**
|
|
4
4
|
* @license
|