@dcl/profile-site 0.4.1-5833194274.commit-5ad3f93 → 0.4.1-5833522515.commit-e551e2d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{g as Z}from"./index-1987bdcd.js";function $(h,y){for(var a=0;a<y.length;a++){const r=y[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in h)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(h,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var z=function(h){var y={};function a(r){if(y[r])return y[r].exports;var o=y[r]={i:r,l:!1,exports:{}};return h[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=h,a.c=y,a.d=function(r,o,u){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:u})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)a.d(u,l,function(R){return r[R]}.bind(null,l));return u},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(h,y){h.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(h,y){h.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(h,y,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(y,"__esModule",{value:!0}),y.sendAsyncWrapper=function(o,u){var l=this;return new Promise(function(R,x){l.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:u||[]},function(O,T){O?x(O):R(T.result)})})},y.sendFortmaticAsyncWrapper=function(o){var u=this;return new Promise(function(l,R){u.getProvider().sendFortmaticAsync(o,function(x,O){x?R(x):l(O?O.result:{})})})},y.randomId=r,y.findExistingResponse=function(o,u){for(var l=0;l<o.length;l++)if(o[l].id===u)return o[l];return null}},function(h,y,a){h.exports=a(4)},function(h,y,a){var r=a(0),o=r(a(1)),u=r(a(5)),l=a(2),R="fm_composeSend",x="fm_logout",O="fm_get_balances",T="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};h.exports=function b(_,A,I){var v=this;if((0,o.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=A,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:A})),this.transactions={send:function(m,M){var C=new g(R,{to:m.to,value:m.amount});v.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(v.queryParams)]||(f["fortmatic-".concat(v.queryParams)]=new u.default(v.fortmaticClient,{API_KEY:_,ETH_NETWORK:A})),f["fortmatic-".concat(v.queryParams)]},this.user={login:function(){return v.getProvider().enable()},logout:function(){v.getProvider().account=null,v.getProvider().network=null;var m=new g(x);return l.sendFortmaticAsyncWrapper.call(v,m)},getUser:function(){var m=new g(s);return l.sendFortmaticAsyncWrapper.call(v,m)},getBalances:function(){var m=new g(O);return l.sendFortmaticAsyncWrapper.call(v,m)},getTransactions:function(){var m=new g(T);return l.sendFortmaticAsyncWrapper.call(v,m)},isLoggedIn:function(){var m=new g(w);return l.sendFortmaticAsyncWrapper.call(v,m)},settings:function(){var m=new g(P);return l.sendFortmaticAsyncWrapper.call(v,m)},deposit:function(m){var M=new g(n,m);return l.sendFortmaticAsyncWrapper.call(v,M)}},this.configure=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new g(c);return M.params=[m],l.sendFortmaticAsyncWrapper.call(v,M)}};var g=function b(_,A){(0,o.default)(this,b),this.id=(0,l.randomId)(),this.method=_,this.params=A?[A]:[{}]}},function(h,y,a){var r=a(0);Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var o=r(a(6)),u=r(a(9)),l=r(a(1)),R=r(a(10)),x=a(11),O=r(a(12)),T=a(2),w=function(){function P(n,s){if((0,l.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var A=!0,I=!1,v=void 0;try{for(var m,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(A=(m=M.next()).done);A=!0)if(m.value.src.includes(n.queryParams))return!1}catch(C){I=!0,v=C}finally{try{A||M.return==null||M.return()}finally{if(I)throw v}}return!0}()){var g=document.createElement("style");g.innerHTML=O.default.css,g.type="text/css",document.head.appendChild(g);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(b);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,T.randomId)(),batch:n.map(function(c){return c.id=(0,T.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return T.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,u.default)(o.default.mark(function s(){var c,f,g,b=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,g=c.cb,f.id=(0,T.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(A){b.requests[A.id]={parentId:f.id,payload:A,cb:function(I,v){var m=b.requests[f.id].batchResponse;if(I&&I.response&&!(0,T.findExistingResponse)(m,I.response.id))throw m.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[f.id].cb(null,m),I.response;if(v&&v.result&&!(0,T.findExistingResponse)(m,v.id))return m.push(v);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:g,batchResponse:[]}):this.requests[f.id]={payload:f,cb:g},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,u.default)(o.default.mark(function s(c,f){var g;return o.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(g=b.sent).iframe.contentWindow){b.next=7;break}g.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return T.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var g=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",b=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:g,code:b,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();y.default=w},function(h,y,a){h.exports=a(7)},function(h,y,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,u=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,h.exports=a(8),o)r.regeneratorRuntime=u;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(h,y){(function(a){var r,o=Object.prototype,u=o.hasOwnProperty,l=typeof Symbol=="function"?Symbol:{},R=l.iterator||"@@iterator",x=l.asyncIterator||"@@asyncIterator",O=l.toStringTag||"@@toStringTag",T=typeof h=="object",w=a.regeneratorRuntime;if(w)T&&(h.exports=w);else{(w=a.regeneratorRuntime=T?h.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},g={};g[R]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(G([])));_&&_!==o&&u.call(_,R)&&(g=_);var A=C.prototype=m.prototype=Object.create(g);M.prototype=A.constructor=C,C.constructor=M,C[O]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,O in t||(t[O]="GeneratorFunction")),t.prototype=Object.create(A),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(A),A[O]="Generator",A[R]=function(){return this},A.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=u.call(i,"catchLoc"),q=u.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&u.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof m?e:m,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var L=P;return function(S,D){if(L===s)throw new Error("Generator is already running");if(L===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(L===P)throw L=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);L=s;var k=v(q,W,E);if(k.type==="normal"){if(L=E.done?c:n,k.arg===f)continue;return{value:k.arg,done:E.done}}k.type==="throw"&&(L=c,E.method="throw",E.arg=k.arg)}}}(t,d,j),F}function v(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function m(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,L,S){var D=v(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&u.call(N,"__await")?Promise.resolve(N.__await).then(function(k){q("next",k,L,S)},function(k){q("throw",k,L,S)}):Promise.resolve(N).then(function(k){H.value=k,L(H)},function(k){return q("throw",k,L,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=v(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function J(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(J,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(u.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(h,y){function a(r,o,u,l,R,x,O){try{var T=r[x](O),w=T.value}catch(P){return void u(P)}T.done?o(w):Promise.resolve(w).then(l,R)}h.exports=function(r){return function(){var o=this,u=arguments;return new Promise(function(l,R){var x=r.apply(o,u);function O(w){a(x,l,R,O,T,"next",w)}function T(w){a(x,l,R,O,T,"throw",w)}O(void 0)})}}},function(h,y){function a(r,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(r,l.key,l)}}h.exports=function(r,o,u){return o&&a(r.prototype,o),u&&a(r,u),r}},function(h){h.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(h,y,a){y.css=`
1
+ import{g as Z}from"./index-60b595bb.js";function $(h,y){for(var a=0;a<y.length;a++){const r=y[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in h)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(h,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var z=function(h){var y={};function a(r){if(y[r])return y[r].exports;var o=y[r]={i:r,l:!1,exports:{}};return h[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=h,a.c=y,a.d=function(r,o,u){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:u})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)a.d(u,l,function(R){return r[R]}.bind(null,l));return u},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(h,y){h.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(h,y){h.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(h,y,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(y,"__esModule",{value:!0}),y.sendAsyncWrapper=function(o,u){var l=this;return new Promise(function(R,x){l.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:u||[]},function(O,T){O?x(O):R(T.result)})})},y.sendFortmaticAsyncWrapper=function(o){var u=this;return new Promise(function(l,R){u.getProvider().sendFortmaticAsync(o,function(x,O){x?R(x):l(O?O.result:{})})})},y.randomId=r,y.findExistingResponse=function(o,u){for(var l=0;l<o.length;l++)if(o[l].id===u)return o[l];return null}},function(h,y,a){h.exports=a(4)},function(h,y,a){var r=a(0),o=r(a(1)),u=r(a(5)),l=a(2),R="fm_composeSend",x="fm_logout",O="fm_get_balances",T="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};h.exports=function b(_,A,I){var v=this;if((0,o.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=A,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:A})),this.transactions={send:function(m,M){var C=new g(R,{to:m.to,value:m.amount});v.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(v.queryParams)]||(f["fortmatic-".concat(v.queryParams)]=new u.default(v.fortmaticClient,{API_KEY:_,ETH_NETWORK:A})),f["fortmatic-".concat(v.queryParams)]},this.user={login:function(){return v.getProvider().enable()},logout:function(){v.getProvider().account=null,v.getProvider().network=null;var m=new g(x);return l.sendFortmaticAsyncWrapper.call(v,m)},getUser:function(){var m=new g(s);return l.sendFortmaticAsyncWrapper.call(v,m)},getBalances:function(){var m=new g(O);return l.sendFortmaticAsyncWrapper.call(v,m)},getTransactions:function(){var m=new g(T);return l.sendFortmaticAsyncWrapper.call(v,m)},isLoggedIn:function(){var m=new g(w);return l.sendFortmaticAsyncWrapper.call(v,m)},settings:function(){var m=new g(P);return l.sendFortmaticAsyncWrapper.call(v,m)},deposit:function(m){var M=new g(n,m);return l.sendFortmaticAsyncWrapper.call(v,M)}},this.configure=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new g(c);return M.params=[m],l.sendFortmaticAsyncWrapper.call(v,M)}};var g=function b(_,A){(0,o.default)(this,b),this.id=(0,l.randomId)(),this.method=_,this.params=A?[A]:[{}]}},function(h,y,a){var r=a(0);Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var o=r(a(6)),u=r(a(9)),l=r(a(1)),R=r(a(10)),x=a(11),O=r(a(12)),T=a(2),w=function(){function P(n,s){if((0,l.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var A=!0,I=!1,v=void 0;try{for(var m,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(A=(m=M.next()).done);A=!0)if(m.value.src.includes(n.queryParams))return!1}catch(C){I=!0,v=C}finally{try{A||M.return==null||M.return()}finally{if(I)throw v}}return!0}()){var g=document.createElement("style");g.innerHTML=O.default.css,g.type="text/css",document.head.appendChild(g);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(b);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,T.randomId)(),batch:n.map(function(c){return c.id=(0,T.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return T.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,u.default)(o.default.mark(function s(){var c,f,g,b=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,g=c.cb,f.id=(0,T.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(A){b.requests[A.id]={parentId:f.id,payload:A,cb:function(I,v){var m=b.requests[f.id].batchResponse;if(I&&I.response&&!(0,T.findExistingResponse)(m,I.response.id))throw m.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[f.id].cb(null,m),I.response;if(v&&v.result&&!(0,T.findExistingResponse)(m,v.id))return m.push(v);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:g,batchResponse:[]}):this.requests[f.id]={payload:f,cb:g},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,u.default)(o.default.mark(function s(c,f){var g;return o.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(g=b.sent).iframe.contentWindow){b.next=7;break}g.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return T.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var g=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",b=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:g,code:b,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();y.default=w},function(h,y,a){h.exports=a(7)},function(h,y,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,u=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,h.exports=a(8),o)r.regeneratorRuntime=u;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(h,y){(function(a){var r,o=Object.prototype,u=o.hasOwnProperty,l=typeof Symbol=="function"?Symbol:{},R=l.iterator||"@@iterator",x=l.asyncIterator||"@@asyncIterator",O=l.toStringTag||"@@toStringTag",T=typeof h=="object",w=a.regeneratorRuntime;if(w)T&&(h.exports=w);else{(w=a.regeneratorRuntime=T?h.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},g={};g[R]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(G([])));_&&_!==o&&u.call(_,R)&&(g=_);var A=C.prototype=m.prototype=Object.create(g);M.prototype=A.constructor=C,C.constructor=M,C[O]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,O in t||(t[O]="GeneratorFunction")),t.prototype=Object.create(A),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(A),A[O]="Generator",A[R]=function(){return this},A.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=u.call(i,"catchLoc"),q=u.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&u.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof m?e:m,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var L=P;return function(S,D){if(L===s)throw new Error("Generator is already running");if(L===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(L===P)throw L=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);L=s;var k=v(q,W,E);if(k.type==="normal"){if(L=E.done?c:n,k.arg===f)continue;return{value:k.arg,done:E.done}}k.type==="throw"&&(L=c,E.method="throw",E.arg=k.arg)}}}(t,d,j),F}function v(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function m(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,L,S){var D=v(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&u.call(N,"__await")?Promise.resolve(N.__await).then(function(k){q("next",k,L,S)},function(k){q("throw",k,L,S)}):Promise.resolve(N).then(function(k){H.value=k,L(H)},function(k){return q("throw",k,L,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=v(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function J(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(J,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(u.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(h,y){function a(r,o,u,l,R,x,O){try{var T=r[x](O),w=T.value}catch(P){return void u(P)}T.done?o(w):Promise.resolve(w).then(l,R)}h.exports=function(r){return function(){var o=this,u=arguments;return new Promise(function(l,R){var x=r.apply(o,u);function O(w){a(x,l,R,O,T,"next",w)}function T(w){a(x,l,R,O,T,"throw",w)}O(void 0)})}}},function(h,y){function a(r,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(r,l.key,l)}}h.exports=function(r,o,u){return o&&a(r.prototype,o),u&&a(r,u),r}},function(h){h.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(h,y,a){y.css=`
2
2
  .fortmatic-iframe {
3
3
  display: none;
4
4
  position: fixed;
@@ -1,4 +1,4 @@
1
- import{j as mr,f as Ye,r as Qr,b as V,d as ne,c as ue,B as me}from"./index-1987bdcd.js";var pr={exports:{}},Zr=mr.EventEmitter,ir,Cr;function Bn(){if(Cr)return ir;Cr=1;function e(O,N){var x=Object.keys(O);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(O);N&&(S=S.filter(function(P){return Object.getOwnPropertyDescriptor(O,P).enumerable})),x.push.apply(x,S)}return x}function t(O){for(var N=1;N<arguments.length;N++){var x=arguments[N]!=null?arguments[N]:{};N%2?e(Object(x),!0).forEach(function(S){r(O,S,x[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(x)):e(Object(x)).forEach(function(S){Object.defineProperty(O,S,Object.getOwnPropertyDescriptor(x,S))})}return O}function r(O,N,x){return N=u(N),N in O?Object.defineProperty(O,N,{value:x,enumerable:!0,configurable:!0,writable:!0}):O[N]=x,O}function n(O,N){if(!(O instanceof N))throw new TypeError("Cannot call a class as a function")}function o(O,N){for(var x=0;x<N.length;x++){var S=N[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(O,u(S.key),S)}}function f(O,N,x){return N&&o(O.prototype,N),x&&o(O,x),Object.defineProperty(O,"prototype",{writable:!1}),O}function u(O){var N=c(O,"string");return typeof N=="symbol"?N:String(N)}function c(O,N){if(typeof O!="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var S=x.call(O,N||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(O)}var _=Ye(),v=_.Buffer,C=Qr,j=C.inspect,m=j&&j.custom||"inspect";function M(O,N,x){v.prototype.copy.call(O,N,x)}return ir=function(){function O(){n(this,O),this.head=null,this.tail=null,this.length=0}return f(O,[{key:"push",value:function(x){var S={data:x,next:null};this.length>0?this.tail.next=S:this.head=S,this.tail=S,++this.length}},{key:"unshift",value:function(x){var S={data:x,next:this.head};this.length===0&&(this.tail=S),this.head=S,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var S=this.head,P=""+S.data;S=S.next;)P+=x+S.data;return P}},{key:"concat",value:function(x){if(this.length===0)return v.alloc(0);for(var S=v.allocUnsafe(x>>>0),P=this.head,T=0;P;)M(P.data,S,T),T+=P.data.length,P=P.next;return S}},{key:"consume",value:function(x,S){var P;return x<this.head.data.length?(P=this.head.data.slice(0,x),this.head.data=this.head.data.slice(x)):x===this.head.data.length?P=this.shift():P=S?this._getString(x):this._getBuffer(x),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(x){var S=this.head,P=1,T=S.data;for(x-=T.length;S=S.next;){var B=S.data,L=x>B.length?B.length:x;if(L===B.length?T+=B:T+=B.slice(0,x),x-=L,x===0){L===B.length?(++P,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=B.slice(L));break}++P}return this.length-=P,T}},{key:"_getBuffer",value:function(x){var S=v.allocUnsafe(x),P=this.head,T=1;for(P.data.copy(S),x-=P.data.length;P=P.next;){var B=P.data,L=x>B.length?B.length:x;if(B.copy(S,S.length-x,0,L),x-=L,x===0){L===B.length?(++T,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=B.slice(L));break}++T}return this.length-=T,S}},{key:m,value:function(x,S){return j(this,t(t({},S),{},{depth:0,customInspect:!1}))}}]),O}(),ir}function Nn(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,V.nextTick(br,this,e)):V.nextTick(br,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(f){!t&&f?r._writableState?r._writableState.errorEmitted?V.nextTick(Ve,r):(r._writableState.errorEmitted=!0,V.nextTick(Mr,r,f)):V.nextTick(Mr,r,f):t?(V.nextTick(Ve,r),t(f)):V.nextTick(Ve,r)}),this)}function Mr(e,t){br(e,t),Ve(e)}function Ve(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function In(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function br(e,t){e.emit("error",t)}function jn(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var en={destroy:Nn,undestroy:In,errorOrDestroy:jn},Se={};function Ln(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var tn={};function fe(e,t,r){r||(r=Error);function n(f,u,c){return typeof t=="string"?t:t(f,u,c)}var o=function(f){Ln(u,f);function u(c,_,v){return f.call(this,n(c,_,v))||this}return u}(r);o.prototype.name=r.name,o.prototype.code=e,tn[e]=o}function Pr(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Dn(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Fn(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function kn(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}fe("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);fe("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Dn(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(Fn(e," argument"))o="The ".concat(e," ").concat(n," ").concat(Pr(t,"type"));else{var f=kn(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(f," ").concat(n," ").concat(Pr(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError);fe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");fe("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});fe("ERR_STREAM_PREMATURE_CLOSE","Premature close");fe("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});fe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");fe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");fe("ERR_STREAM_WRITE_AFTER_END","write after end");fe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);fe("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);fe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Se.codes=tn;var qn=Se.codes.ERR_INVALID_OPT_VALUE;function Un(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Hn(e,t,r,n){var o=Un(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var f=n?r:"highWaterMark";throw new qn(f,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var rn={getHighWaterMark:Hn},$n=zn;function zn(e,t){if(ar("noDeprecation"))return e;var r=!1;function n(){if(!r){if(ar("throwDeprecation"))throw new Error(t);ar("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function ar(e){try{if(!ne.localStorage)return!1}catch{return!1}var t=ne.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var or,Br;function nn(){if(Br)return or;Br=1,or=U;function e(s){var l=this;this.next=null,this.entry=null,this.finish=function(){E(l,s)}}var t;U.WritableState=F;var r={deprecate:$n},n=Zr,o=Ye().Buffer,f=(typeof ne<"u"?ne:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(s){return o.from(s)}function c(s){return o.isBuffer(s)||s instanceof f}var _=en,v=rn,C=v.getHighWaterMark,j=Se.codes,m=j.ERR_INVALID_ARG_TYPE,M=j.ERR_METHOD_NOT_IMPLEMENTED,O=j.ERR_MULTIPLE_CALLBACK,N=j.ERR_STREAM_CANNOT_PIPE,x=j.ERR_STREAM_DESTROYED,S=j.ERR_STREAM_NULL_VALUES,P=j.ERR_STREAM_WRITE_AFTER_END,T=j.ERR_UNKNOWN_ENCODING,B=_.errorOrDestroy;ue(U,n);function L(){}function F(s,l,g){t=t||Ce(),s=s||{},typeof g!="boolean"&&(g=l instanceof t),this.objectMode=!!s.objectMode,g&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=C(this,s,"writableHighWaterMark",g),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=s.decodeStrings===!1;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(I){H(l,I)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=s.emitClose!==!1,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}F.prototype.getBuffer=function(){for(var l=this.bufferedRequest,g=[];l;)g.push(l),l=l.next;return g},function(){try{Object.defineProperty(F.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G=Function.prototype[Symbol.hasInstance],Object.defineProperty(U,Symbol.hasInstance,{value:function(l){return G.call(this,l)?!0:this!==U?!1:l&&l._writableState instanceof F}})):G=function(l){return l instanceof this};function U(s){t=t||Ce();var l=this instanceof t;if(!l&&!G.call(U,this))return new U(s);this._writableState=new F(s,this,l),this.writable=!0,s&&(typeof s.write=="function"&&(this._write=s.write),typeof s.writev=="function"&&(this._writev=s.writev),typeof s.destroy=="function"&&(this._destroy=s.destroy),typeof s.final=="function"&&(this._final=s.final)),n.call(this)}U.prototype.pipe=function(){B(this,new N)};function D(s,l){var g=new P;B(s,g),V.nextTick(l,g)}function X(s,l,g,w){var I;return g===null?I=new S:typeof g!="string"&&!l.objectMode&&(I=new m("chunk",["string","Buffer"],g)),I?(B(s,I),V.nextTick(w,I),!1):!0}U.prototype.write=function(s,l,g){var w=this._writableState,I=!1,i=!w.objectMode&&c(s);return i&&!o.isBuffer(s)&&(s=u(s)),typeof l=="function"&&(g=l,l=null),i?l="buffer":l||(l=w.defaultEncoding),typeof g!="function"&&(g=L),w.ending?D(this,g):(i||X(this,w,s,g))&&(w.pendingcb++,I=ae(this,w,i,s,l,g)),I},U.prototype.cork=function(){this._writableState.corked++},U.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,!s.writing&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&K(this,s))},U.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new T(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ie(s,l,g){return!s.objectMode&&s.decodeStrings!==!1&&typeof l=="string"&&(l=o.from(l,g)),l}Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ae(s,l,g,w,I,i){if(!g){var a=ie(l,w,I);w!==a&&(g=!0,I="buffer",w=a)}var y=l.objectMode?1:w.length;l.length+=y;var A=l.length<l.highWaterMark;if(A||(l.needDrain=!0),l.writing||l.corked){var W=l.lastBufferedRequest;l.lastBufferedRequest={chunk:w,encoding:I,isBuf:g,callback:i,next:null},W?W.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else J(s,l,!1,y,w,I,i);return A}function J(s,l,g,w,I,i,a){l.writelen=w,l.writecb=a,l.writing=!0,l.sync=!0,l.destroyed?l.onwrite(new x("write")):g?s._writev(I,l.onwrite):s._write(I,i,l.onwrite),l.sync=!1}function Q(s,l,g,w,I){--l.pendingcb,g?(V.nextTick(I,w),V.nextTick(b,s,l),s._writableState.errorEmitted=!0,B(s,w)):(I(w),s._writableState.errorEmitted=!0,B(s,w),b(s,l))}function Z(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}function H(s,l){var g=s._writableState,w=g.sync,I=g.writecb;if(typeof I!="function")throw new O;if(Z(g),l)Q(s,g,w,l,I);else{var i=h(g)||s.destroyed;!i&&!g.corked&&!g.bufferProcessing&&g.bufferedRequest&&K(s,g),w?V.nextTick(ee,s,g,i,I):ee(s,g,i,I)}}function ee(s,l,g,w){g||re(s,l),l.pendingcb--,w(),b(s,l)}function re(s,l){l.length===0&&l.needDrain&&(l.needDrain=!1,s.emit("drain"))}function K(s,l){l.bufferProcessing=!0;var g=l.bufferedRequest;if(s._writev&&g&&g.next){var w=l.bufferedRequestCount,I=new Array(w),i=l.corkedRequestsFree;i.entry=g;for(var a=0,y=!0;g;)I[a]=g,g.isBuf||(y=!1),g=g.next,a+=1;I.allBuffers=y,J(s,l,!0,l.length,I,"",i.finish),l.pendingcb++,l.lastBufferedRequest=null,i.next?(l.corkedRequestsFree=i.next,i.next=null):l.corkedRequestsFree=new e(l),l.bufferedRequestCount=0}else{for(;g;){var A=g.chunk,W=g.encoding,k=g.callback,z=l.objectMode?1:A.length;if(J(s,l,!1,z,A,W,k),g=g.next,l.bufferedRequestCount--,l.writing)break}g===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=g,l.bufferProcessing=!1}U.prototype._write=function(s,l,g){g(new M("_write()"))},U.prototype._writev=null,U.prototype.end=function(s,l,g){var w=this._writableState;return typeof s=="function"?(g=s,s=null,l=null):typeof l=="function"&&(g=l,l=null),s!=null&&this.write(s,l),w.corked&&(w.corked=1,this.uncork()),w.ending||R(this,w,g),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(s){return s.ending&&s.length===0&&s.bufferedRequest===null&&!s.finished&&!s.writing}function d(s,l){s._final(function(g){l.pendingcb--,g&&B(s,g),l.prefinished=!0,s.emit("prefinish"),b(s,l)})}function p(s,l){!l.prefinished&&!l.finalCalled&&(typeof s._final=="function"&&!l.destroyed?(l.pendingcb++,l.finalCalled=!0,V.nextTick(d,s,l)):(l.prefinished=!0,s.emit("prefinish")))}function b(s,l){var g=h(l);if(g&&(p(s,l),l.pendingcb===0&&(l.finished=!0,s.emit("finish"),l.autoDestroy))){var w=s._readableState;(!w||w.autoDestroy&&w.endEmitted)&&s.destroy()}return g}function R(s,l,g){l.ending=!0,b(s,l),g&&(l.finished?V.nextTick(g):s.once("finish",g)),l.ended=!0,s.writable=!1}function E(s,l,g){var w=s.entry;for(s.entry=null;w;){var I=w.callback;l.pendingcb--,I(g),w=w.next}l.corkedRequestsFree.next=s}return Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){this._writableState&&(this._writableState.destroyed=l)}}),U.prototype.destroy=_.destroy,U.prototype._undestroy=_.undestroy,U.prototype._destroy=function(s,l){l(s)},or}var sr,Nr;function Ce(){if(Nr)return sr;Nr=1;var e=Object.keys||function(v){var C=[];for(var j in v)C.push(j);return C};sr=u;var t=on(),r=nn();ue(u,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var f=n[o];u.prototype[f]||(u.prototype[f]=r.prototype[f])}function u(v){if(!(this instanceof u))return new u(v);t.call(this,v),r.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)))}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function c(){this._writableState.ended||V.nextTick(_,this)}function _(v){v.end()}return Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(C){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=C,this._writableState.destroyed=C)}}),sr}var yr={},gr={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Ye(),n=r.Buffer;function o(u,c){for(var _ in u)c[_]=u[_]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=f);function f(u,c,_){return n(u,c,_)}f.prototype=Object.create(n.prototype),o(n,f),f.from=function(u,c,_){if(typeof u=="number")throw new TypeError("Argument must not be a number");return n(u,c,_)},f.alloc=function(u,c,_){if(typeof u!="number")throw new TypeError("Argument must be a number");var v=n(u);return c!==void 0?typeof _=="string"?v.fill(c,_):v.fill(c):v.fill(0),v},f.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n(u)},f.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}})(gr,gr.exports);var ge=gr.exports,Er=ge.Buffer,Ir=Er.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Wn(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Gn(e){var t=Wn(e);if(typeof t!="string"&&(Er.isEncoding===Ir||!Ir(e)))throw new Error("Unknown encoding: "+e);return t||e}yr.StringDecoder=De;function De(e){this.encoding=Gn(e);var t;switch(this.encoding){case"utf16le":this.text=Qn,this.end=Zn,t=4;break;case"utf8":this.fillLast=Kn,t=4;break;case"base64":this.text=ei,this.end=ti,t=3;break;default:this.write=ri,this.end=ni;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Er.allocUnsafe(t)}De.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};De.prototype.end=Xn;De.prototype.text=Yn;De.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function fr(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vn(e,t,r){var n=t.length-1;if(n<r)return 0;var o=fr(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=fr(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=fr(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}function Jn(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function Kn(e){var t=this.lastTotal-this.lastNeed,r=Jn(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Yn(e,t){var r=Vn(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Xn(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function Qn(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Zn(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function ei(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function ti(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function ri(e){return e.toString(this.encoding)}function ni(e){return e&&e.length?this.write(e):""}var jr=Se.codes.ERR_STREAM_PREMATURE_CLOSE;function ii(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function ai(){}function oi(e){return e.setHeader&&typeof e.abort=="function"}function an(e,t,r){if(typeof t=="function")return an(e,null,t);t||(t={}),r=ii(r||ai);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,f=function(){e.writable||c()},u=e._writableState&&e._writableState.finished,c=function(){o=!1,u=!0,n||r.call(e)},_=e._readableState&&e._readableState.endEmitted,v=function(){n=!1,_=!0,o||r.call(e)},C=function(O){r.call(e,O)},j=function(){var O;if(n&&!_)return(!e._readableState||!e._readableState.ended)&&(O=new jr),r.call(e,O);if(o&&!u)return(!e._writableState||!e._writableState.ended)&&(O=new jr),r.call(e,O)},m=function(){e.req.on("finish",c)};return oi(e)?(e.on("complete",c),e.on("abort",j),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",f),e.on("close",f)),e.on("end",v),e.on("finish",c),t.error!==!1&&e.on("error",C),e.on("close",j),function(){e.removeListener("complete",c),e.removeListener("abort",j),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("end",v),e.removeListener("error",C),e.removeListener("close",j)}}var Sr=an,ur,Lr;function si(){if(Lr)return ur;Lr=1;var e;function t(T,B,L){return B=r(B),B in T?Object.defineProperty(T,B,{value:L,enumerable:!0,configurable:!0,writable:!0}):T[B]=L,T}function r(T){var B=n(T,"string");return typeof B=="symbol"?B:String(B)}function n(T,B){if(typeof T!="object"||T===null)return T;var L=T[Symbol.toPrimitive];if(L!==void 0){var F=L.call(T,B||"default");if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(T)}var o=Sr,f=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),C=Symbol("handlePromise"),j=Symbol("stream");function m(T,B){return{value:T,done:B}}function M(T){var B=T[f];if(B!==null){var L=T[j].read();L!==null&&(T[v]=null,T[f]=null,T[u]=null,B(m(L,!1)))}}function O(T){V.nextTick(M,T)}function N(T,B){return function(L,F){T.then(function(){if(B[_]){L(m(void 0,!0));return}B[C](L,F)},F)}}var x=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((e={get stream(){return this[j]},next:function(){var B=this,L=this[c];if(L!==null)return Promise.reject(L);if(this[_])return Promise.resolve(m(void 0,!0));if(this[j].destroyed)return new Promise(function(D,X){V.nextTick(function(){B[c]?X(B[c]):D(m(void 0,!0))})});var F=this[v],G;if(F)G=new Promise(N(F,this));else{var U=this[j].read();if(U!==null)return Promise.resolve(m(U,!1));G=new Promise(this[C])}return this[v]=G,G}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var B=this;return new Promise(function(L,F){B[j].destroy(null,function(G){if(G){F(G);return}L(m(void 0,!0))})})}),e),x),P=function(B){var L,F=Object.create(S,(L={},t(L,j,{value:B,writable:!0}),t(L,f,{value:null,writable:!0}),t(L,u,{value:null,writable:!0}),t(L,c,{value:null,writable:!0}),t(L,_,{value:B._readableState.endEmitted,writable:!0}),t(L,C,{value:function(U,D){var X=F[j].read();X?(F[v]=null,F[f]=null,F[u]=null,U(m(X,!1))):(F[f]=U,F[u]=D)},writable:!0}),L));return F[v]=null,o(B,function(G){if(G&&G.code!=="ERR_STREAM_PREMATURE_CLOSE"){var U=F[u];U!==null&&(F[v]=null,F[f]=null,F[u]=null,U(G)),F[c]=G;return}var D=F[f];D!==null&&(F[v]=null,F[f]=null,F[u]=null,D(m(void 0,!0))),F[_]=!0}),B.on("readable",O.bind(null,F)),F};return ur=P,ur}var lr,Dr;function fi(){return Dr||(Dr=1,lr=function(){throw new Error("Readable.from is not available in the browser")}),lr}var cr,Fr;function on(){if(Fr)return cr;Fr=1,cr=D;var e;D.ReadableState=U,mr.EventEmitter;var t=function(a,y){return a.listeners(y).length},r=Zr,n=Ye().Buffer,o=(typeof ne<"u"?ne:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(i){return n.from(i)}function u(i){return n.isBuffer(i)||i instanceof o}var c=Qr,_;c&&c.debuglog?_=c.debuglog("stream"):_=function(){};var v=Bn(),C=en,j=rn,m=j.getHighWaterMark,M=Se.codes,O=M.ERR_INVALID_ARG_TYPE,N=M.ERR_STREAM_PUSH_AFTER_EOF,x=M.ERR_METHOD_NOT_IMPLEMENTED,S=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,T,B;ue(D,r);var L=C.errorOrDestroy,F=["error","close","destroy","pause","resume"];function G(i,a,y){if(typeof i.prependListener=="function")return i.prependListener(a,y);!i._events||!i._events[a]?i.on(a,y):Array.isArray(i._events[a])?i._events[a].unshift(y):i._events[a]=[y,i._events[a]]}function U(i,a,y){e=e||Ce(),i=i||{},typeof y!="boolean"&&(y=a instanceof e),this.objectMode=!!i.objectMode,y&&(this.objectMode=this.objectMode||!!i.readableObjectMode),this.highWaterMark=m(this,i,"readableHighWaterMark",y),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=i.emitClose!==!1,this.autoDestroy=!!i.autoDestroy,this.destroyed=!1,this.defaultEncoding=i.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,i.encoding&&(P||(P=yr.StringDecoder),this.decoder=new P(i.encoding),this.encoding=i.encoding)}function D(i){if(e=e||Ce(),!(this instanceof D))return new D(i);var a=this instanceof e;this._readableState=new U(i,this,a),this.readable=!0,i&&(typeof i.read=="function"&&(this._read=i.read),typeof i.destroy=="function"&&(this._destroy=i.destroy)),r.call(this)}Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),D.prototype.destroy=C.destroy,D.prototype._undestroy=C.undestroy,D.prototype._destroy=function(i,a){a(i)},D.prototype.push=function(i,a){var y=this._readableState,A;return y.objectMode?A=!0:typeof i=="string"&&(a=a||y.defaultEncoding,a!==y.encoding&&(i=n.from(i,a),a=""),A=!0),X(this,i,a,!1,A)},D.prototype.unshift=function(i){return X(this,i,null,!0,!1)};function X(i,a,y,A,W){_("readableAddChunk",a);var k=i._readableState;if(a===null)k.reading=!1,H(i,k);else{var z;if(W||(z=ae(k,a)),z)L(i,z);else if(k.objectMode||a&&a.length>0)if(typeof a!="string"&&!k.objectMode&&Object.getPrototypeOf(a)!==n.prototype&&(a=f(a)),A)k.endEmitted?L(i,new S):ie(i,k,a,!0);else if(k.ended)L(i,new N);else{if(k.destroyed)return!1;k.reading=!1,k.decoder&&!y?(a=k.decoder.write(a),k.objectMode||a.length!==0?ie(i,k,a,!1):K(i,k)):ie(i,k,a,!1)}else A||(k.reading=!1,K(i,k))}return!k.ended&&(k.length<k.highWaterMark||k.length===0)}function ie(i,a,y,A){a.flowing&&a.length===0&&!a.sync?(a.awaitDrain=0,i.emit("data",y)):(a.length+=a.objectMode?1:y.length,A?a.buffer.unshift(y):a.buffer.push(y),a.needReadable&&ee(i)),K(i,a)}function ae(i,a){var y;return!u(a)&&typeof a!="string"&&a!==void 0&&!i.objectMode&&(y=new O("chunk",["string","Buffer","Uint8Array"],a)),y}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(i){P||(P=yr.StringDecoder);var a=new P(i);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;for(var y=this._readableState.buffer.head,A="";y!==null;)A+=a.write(y.data),y=y.next;return this._readableState.buffer.clear(),A!==""&&this._readableState.buffer.push(A),this._readableState.length=A.length,this};var J=1073741824;function Q(i){return i>=J?i=J:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i}function Z(i,a){return i<=0||a.length===0&&a.ended?0:a.objectMode?1:i!==i?a.flowing&&a.length?a.buffer.head.data.length:a.length:(i>a.highWaterMark&&(a.highWaterMark=Q(i)),i<=a.length?i:a.ended?a.length:(a.needReadable=!0,0))}D.prototype.read=function(i){_("read",i),i=parseInt(i,10);var a=this._readableState,y=i;if(i!==0&&(a.emittedReadable=!1),i===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended))return _("read: emitReadable",a.length,a.ended),a.length===0&&a.ended?g(this):ee(this),null;if(i=Z(i,a),i===0&&a.ended)return a.length===0&&g(this),null;var A=a.needReadable;_("need readable",A),(a.length===0||a.length-i<a.highWaterMark)&&(A=!0,_("length less than watermark",A)),a.ended||a.reading?(A=!1,_("reading or ended",A)):A&&(_("do read"),a.reading=!0,a.sync=!0,a.length===0&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1,a.reading||(i=Z(y,a)));var W;return i>0?W=l(i,a):W=null,W===null?(a.needReadable=a.length<=a.highWaterMark,i=0):(a.length-=i,a.awaitDrain=0),a.length===0&&(a.ended||(a.needReadable=!0),y!==i&&a.ended&&g(this)),W!==null&&this.emit("data",W),W};function H(i,a){if(_("onEofChunk"),!a.ended){if(a.decoder){var y=a.decoder.end();y&&y.length&&(a.buffer.push(y),a.length+=a.objectMode?1:y.length)}a.ended=!0,a.sync?ee(i):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,re(i)))}}function ee(i){var a=i._readableState;_("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(_("emitReadable",a.flowing),a.emittedReadable=!0,V.nextTick(re,i))}function re(i){var a=i._readableState;_("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&(a.length||a.ended)&&(i.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,s(i)}function K(i,a){a.readingMore||(a.readingMore=!0,V.nextTick(h,i,a))}function h(i,a){for(;!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0);){var y=a.length;if(_("maybeReadMore read 0"),i.read(0),y===a.length)break}a.readingMore=!1}D.prototype._read=function(i){L(this,new x("_read()"))},D.prototype.pipe=function(i,a){var y=this,A=this._readableState;switch(A.pipesCount){case 0:A.pipes=i;break;case 1:A.pipes=[A.pipes,i];break;default:A.pipes.push(i);break}A.pipesCount+=1,_("pipe count=%d opts=%j",A.pipesCount,a);var W=(!a||a.end!==!1)&&i!==V.stdout&&i!==V.stderr,k=W?ce:pe;A.endEmitted?V.nextTick(k):y.once("end",k),i.on("unpipe",z);function z(he,le){_("onunpipe"),he===y&&le&&le.hasUnpiped===!1&&(le.hasUnpiped=!0,We())}function ce(){_("onend"),i.end()}var ve=d(y);i.on("drain",ve);var Be=!1;function We(){_("cleanup"),i.removeListener("close",Ae),i.removeListener("finish",Te),i.removeListener("drain",ve),i.removeListener("error",xe),i.removeListener("unpipe",z),y.removeListener("end",ce),y.removeListener("end",pe),y.removeListener("data",Ne),Be=!0,A.awaitDrain&&(!i._writableState||i._writableState.needDrain)&&ve()}y.on("data",Ne);function Ne(he){_("ondata");var le=i.write(he);_("dest.write",le),le===!1&&((A.pipesCount===1&&A.pipes===i||A.pipesCount>1&&I(A.pipes,i)!==-1)&&!Be&&(_("false write response, pause",A.awaitDrain),A.awaitDrain++),y.pause())}function xe(he){_("onerror",he),pe(),i.removeListener("error",xe),t(i,"error")===0&&L(i,he)}G(i,"error",xe);function Ae(){i.removeListener("finish",Te),pe()}i.once("close",Ae);function Te(){_("onfinish"),i.removeListener("close",Ae),pe()}i.once("finish",Te);function pe(){_("unpipe"),y.unpipe(i)}return i.emit("pipe",y),A.flowing||(_("pipe resume"),y.resume()),i};function d(i){return function(){var y=i._readableState;_("pipeOnDrain",y.awaitDrain),y.awaitDrain&&y.awaitDrain--,y.awaitDrain===0&&t(i,"data")&&(y.flowing=!0,s(i))}}D.prototype.unpipe=function(i){var a=this._readableState,y={hasUnpiped:!1};if(a.pipesCount===0)return this;if(a.pipesCount===1)return i&&i!==a.pipes?this:(i||(i=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,i&&i.emit("unpipe",this,y),this);if(!i){var A=a.pipes,W=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var k=0;k<W;k++)A[k].emit("unpipe",this,{hasUnpiped:!1});return this}var z=I(a.pipes,i);return z===-1?this:(a.pipes.splice(z,1),a.pipesCount-=1,a.pipesCount===1&&(a.pipes=a.pipes[0]),i.emit("unpipe",this,y),this)},D.prototype.on=function(i,a){var y=r.prototype.on.call(this,i,a),A=this._readableState;return i==="data"?(A.readableListening=this.listenerCount("readable")>0,A.flowing!==!1&&this.resume()):i==="readable"&&!A.endEmitted&&!A.readableListening&&(A.readableListening=A.needReadable=!0,A.flowing=!1,A.emittedReadable=!1,_("on readable",A.length,A.reading),A.length?ee(this):A.reading||V.nextTick(b,this)),y},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(i,a){var y=r.prototype.removeListener.call(this,i,a);return i==="readable"&&V.nextTick(p,this),y},D.prototype.removeAllListeners=function(i){var a=r.prototype.removeAllListeners.apply(this,arguments);return(i==="readable"||i===void 0)&&V.nextTick(p,this),a};function p(i){var a=i._readableState;a.readableListening=i.listenerCount("readable")>0,a.resumeScheduled&&!a.paused?a.flowing=!0:i.listenerCount("data")>0&&i.resume()}function b(i){_("readable nexttick read 0"),i.read(0)}D.prototype.resume=function(){var i=this._readableState;return i.flowing||(_("resume"),i.flowing=!i.readableListening,R(this,i)),i.paused=!1,this};function R(i,a){a.resumeScheduled||(a.resumeScheduled=!0,V.nextTick(E,i,a))}function E(i,a){_("resume",a.reading),a.reading||i.read(0),a.resumeScheduled=!1,i.emit("resume"),s(i),a.flowing&&!a.reading&&i.read(0)}D.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function s(i){var a=i._readableState;for(_("flow",a.flowing);a.flowing&&i.read()!==null;);}D.prototype.wrap=function(i){var a=this,y=this._readableState,A=!1;i.on("end",function(){if(_("wrapped end"),y.decoder&&!y.ended){var z=y.decoder.end();z&&z.length&&a.push(z)}a.push(null)}),i.on("data",function(z){if(_("wrapped data"),y.decoder&&(z=y.decoder.write(z)),!(y.objectMode&&z==null)&&!(!y.objectMode&&(!z||!z.length))){var ce=a.push(z);ce||(A=!0,i.pause())}});for(var W in i)this[W]===void 0&&typeof i[W]=="function"&&(this[W]=function(ce){return function(){return i[ce].apply(i,arguments)}}(W));for(var k=0;k<F.length;k++)i.on(F[k],this.emit.bind(this,F[k]));return this._read=function(z){_("wrapped _read",z),A&&(A=!1,i.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=si()),T(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(a){this._readableState&&(this._readableState.flowing=a)}}),D._fromList=l,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function l(i,a){if(a.length===0)return null;var y;return a.objectMode?y=a.buffer.shift():!i||i>=a.length?(a.decoder?y=a.buffer.join(""):a.buffer.length===1?y=a.buffer.first():y=a.buffer.concat(a.length),a.buffer.clear()):y=a.buffer.consume(i,a.decoder),y}function g(i){var a=i._readableState;_("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,V.nextTick(w,a,i))}function w(i,a){if(_("endReadableNT",i.endEmitted,i.length),!i.endEmitted&&i.length===0&&(i.endEmitted=!0,a.readable=!1,a.emit("end"),i.autoDestroy)){var y=a._writableState;(!y||y.autoDestroy&&y.finished)&&a.destroy()}}typeof Symbol=="function"&&(D.from=function(i,a){return B===void 0&&(B=fi()),B(D,i,a)});function I(i,a){for(var y=0,A=i.length;y<A;y++)if(i[y]===a)return y;return-1}return cr}var sn=_e,Xe=Se.codes,ui=Xe.ERR_METHOD_NOT_IMPLEMENTED,li=Xe.ERR_MULTIPLE_CALLBACK,ci=Xe.ERR_TRANSFORM_ALREADY_TRANSFORMING,hi=Xe.ERR_TRANSFORM_WITH_LENGTH_0,Qe=Ce();ue(_e,Qe);function di(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new li);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function _e(e){if(!(this instanceof _e))return new _e(e);Qe.call(this,e),this._transformState={afterTransform:di.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",_i)}function _i(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){kr(e,t,r)}):kr(this,null,null)}_e.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qe.prototype.push.call(this,e,t)};_e.prototype._transform=function(e,t,r){r(new ui("_transform()"))};_e.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};_e.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};_e.prototype._destroy=function(e,t){Qe.prototype._destroy.call(this,e,function(r){t(r)})};function kr(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new hi;if(e._transformState.transforming)throw new ci;return e.push(null)}var pi=je,fn=sn;ue(je,fn);function je(e){if(!(this instanceof je))return new je(e);fn.call(this,e)}je.prototype._transform=function(e,t,r){r(null,e)};var hr;function bi(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var un=Se.codes,yi=un.ERR_MISSING_ARGS,gi=un.ERR_STREAM_DESTROYED;function qr(e){if(e)throw e}function vi(e){return e.setHeader&&typeof e.abort=="function"}function wi(e,t,r,n){n=bi(n);var o=!1;e.on("close",function(){o=!0}),hr===void 0&&(hr=Sr),hr(e,{readable:t,writable:r},function(u){if(u)return n(u);o=!0,n()});var f=!1;return function(u){if(!o&&!f){if(f=!0,vi(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(u||new gi("pipe"))}}}function Ur(e){e()}function mi(e,t){return e.pipe(t)}function Ei(e){return!e.length||typeof e[e.length-1]!="function"?qr:e.pop()}function Si(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ei(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new yi("streams");var o,f=t.map(function(u,c){var _=c<t.length-1,v=c>0;return wi(u,_,v,function(C){o||(o=C),C&&f.forEach(Ur),!_&&(f.forEach(Ur),n(o))})});return t.reduce(mi)}var Ri=Si;(function(e,t){t=e.exports=on(),t.Stream=t,t.Readable=t,t.Writable=nn(),t.Duplex=Ce(),t.Transform=sn,t.PassThrough=pi,t.finished=Sr,t.pipeline=Ri})(pr,pr.exports);var ln=pr.exports;const{Transform:xi}=ln;var Ai=e=>class cn extends xi{constructor(r,n,o,f,u){super(u),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._hashBitLength=f,this._options=u,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let f=null;try{this.update(r,n)}catch(u){f=u}o(f)}_flush(r){let n=null;try{this.push(this.digest())}catch(o){n=o}r(n)}update(r,n){if(!me.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return me.isBuffer(r)||(r=me.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new cn(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Ti}=ln;var Oi=e=>class hn extends Ti{constructor(r,n,o,f){super(f),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._options=f,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let f=null;try{this.update(r,n)}catch(u){f=u}o(f)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!me.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return me.isBuffer(r)||(r=me.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return n!==void 0&&(o=o.toString(n)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new hn(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Ci=Ai,Mi=Oi;var Pi=function(e){const t=Ci(e),r=Mi(e);return function(n,o){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,o);case"keccak256":return new t(1088,512,null,256,o);case"keccak384":return new t(832,768,null,384,o);case"keccak512":return new t(576,1024,null,512,o);case"sha3-224":return new t(1152,448,6,224,o);case"sha3-256":return new t(1088,512,6,256,o);case"sha3-384":return new t(832,768,6,384,o);case"sha3-512":return new t(576,1024,6,512,o);case"shake128":return new r(1344,256,31,o);case"shake256":return new r(1088,512,31,o);default:throw new Error("Invald algorithm: "+n)}}},dn={};const Hr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];dn.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],f=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],_=e[6]^e[16]^e[26]^e[36]^e[46],v=e[7]^e[17]^e[27]^e[37]^e[47],C=e[8]^e[18]^e[28]^e[38]^e[48],j=e[9]^e[19]^e[29]^e[39]^e[49];let m=C^(o<<1|f>>>31),M=j^(f<<1|o>>>31);const O=e[0]^m,N=e[1]^M,x=e[10]^m,S=e[11]^M,P=e[20]^m,T=e[21]^M,B=e[30]^m,L=e[31]^M,F=e[40]^m,G=e[41]^M;m=r^(u<<1|c>>>31),M=n^(c<<1|u>>>31);const U=e[2]^m,D=e[3]^M,X=e[12]^m,ie=e[13]^M,ae=e[22]^m,J=e[23]^M,Q=e[32]^m,Z=e[33]^M,H=e[42]^m,ee=e[43]^M;m=o^(_<<1|v>>>31),M=f^(v<<1|_>>>31);const re=e[4]^m,K=e[5]^M,h=e[14]^m,d=e[15]^M,p=e[24]^m,b=e[25]^M,R=e[34]^m,E=e[35]^M,s=e[44]^m,l=e[45]^M;m=u^(C<<1|j>>>31),M=c^(j<<1|C>>>31);const g=e[6]^m,w=e[7]^M,I=e[16]^m,i=e[17]^M,a=e[26]^m,y=e[27]^M,A=e[36]^m,W=e[37]^M,k=e[46]^m,z=e[47]^M;m=_^(r<<1|n>>>31),M=v^(n<<1|r>>>31);const ce=e[8]^m,ve=e[9]^M,Be=e[18]^m,We=e[19]^M,Ne=e[28]^m,xe=e[29]^M,Ae=e[38]^m,Te=e[39]^M,pe=e[48]^m,he=e[49]^M,le=O,ut=N,lt=S<<4|x>>>28,ct=x<<4|S>>>28,ht=P<<3|T>>>29,dt=T<<3|P>>>29,_t=L<<9|B>>>23,pt=B<<9|L>>>23,bt=F<<18|G>>>14,yt=G<<18|F>>>14,gt=U<<1|D>>>31,vt=D<<1|U>>>31,wt=ie<<12|X>>>20,mt=X<<12|ie>>>20,Et=ae<<10|J>>>22,St=J<<10|ae>>>22,Rt=Z<<13|Q>>>19,xt=Q<<13|Z>>>19,At=H<<2|ee>>>30,Tt=ee<<2|H>>>30,Ot=K<<30|re>>>2,Ct=re<<30|K>>>2,Mt=h<<6|d>>>26,Pt=d<<6|h>>>26,Bt=b<<11|p>>>21,Nt=p<<11|b>>>21,It=R<<15|E>>>17,jt=E<<15|R>>>17,Lt=l<<29|s>>>3,Dt=s<<29|l>>>3,Ft=g<<28|w>>>4,kt=w<<28|g>>>4,qt=i<<23|I>>>9,Ut=I<<23|i>>>9,Ht=a<<25|y>>>7,$t=y<<25|a>>>7,zt=A<<21|W>>>11,Wt=W<<21|A>>>11,Gt=z<<24|k>>>8,Vt=k<<24|z>>>8,Jt=ce<<27|ve>>>5,Kt=ve<<27|ce>>>5,Yt=Be<<20|We>>>12,Xt=We<<20|Be>>>12,Qt=xe<<7|Ne>>>25,Zt=Ne<<7|xe>>>25,er=Ae<<8|Te>>>24,tr=Te<<8|Ae>>>24,rr=pe<<14|he>>>18,nr=he<<14|pe>>>18;e[0]=le^~wt&Bt,e[1]=ut^~mt&Nt,e[10]=Ft^~Yt&ht,e[11]=kt^~Xt&dt,e[20]=gt^~Mt&Ht,e[21]=vt^~Pt&$t,e[30]=Jt^~lt&Et,e[31]=Kt^~ct&St,e[40]=Ot^~qt&Qt,e[41]=Ct^~Ut&Zt,e[2]=wt^~Bt&zt,e[3]=mt^~Nt&Wt,e[12]=Yt^~ht&Rt,e[13]=Xt^~dt&xt,e[22]=Mt^~Ht&er,e[23]=Pt^~$t&tr,e[32]=lt^~Et&It,e[33]=ct^~St&jt,e[42]=qt^~Qt&_t,e[43]=Ut^~Zt&pt,e[4]=Bt^~zt&rr,e[5]=Nt^~Wt&nr,e[14]=ht^~Rt&Lt,e[15]=dt^~xt&Dt,e[24]=Ht^~er&bt,e[25]=$t^~tr&yt,e[34]=Et^~It&Gt,e[35]=St^~jt&Vt,e[44]=Qt^~_t&At,e[45]=Zt^~pt&Tt,e[6]=zt^~rr&le,e[7]=Wt^~nr&ut,e[16]=Rt^~Lt&Ft,e[17]=xt^~Dt&kt,e[26]=er^~bt&gt,e[27]=tr^~yt&vt,e[36]=It^~Gt&Jt,e[37]=jt^~Vt&Kt,e[46]=_t^~At&Ot,e[47]=pt^~Tt&Ct,e[8]=rr^~le&wt,e[9]=nr^~ut&mt,e[18]=Lt^~Ft&Yt,e[19]=Dt^~kt&Xt,e[28]=bt^~gt&Mt,e[29]=yt^~vt&Pt,e[38]=Gt^~Jt&lt,e[39]=Vt^~Kt&ct,e[48]=At^~Ot&qt,e[49]=Tt^~Ct&Ut,e[0]^=Hr[t*2],e[1]^=Hr[t*2+1]}};const Je=dn;function Me(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Me.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Me.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(Je.p1600(this.state),this.count=0)};Me.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&Je.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Je.p1600(this.state),this.count=0,this.squeezing=!0};Me.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=me.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Je.p1600(this.state),this.count=0);return t};Me.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var Bi=Me,io=Pi(Bi),_n={exports:{}},pn=ge.Buffer;function Ze(e,t){this._block=pn.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Ze.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=pn.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,f=this._len,u=0;u<o;){for(var c=f%n,_=Math.min(o-u,n-c),v=0;v<_;v++)r[c+v]=e[u+v];f+=_,u+=_,f%n===0&&this._update(r)}return this._len+=o,this};Ze.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var f=this._hash();return e?f.toString(e):f};Ze.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Pe=Ze,Ni=ue,bn=Pe,Ii=ge.Buffer,ji=[1518500249,1859775393,-1894007588,-899497514],Li=new Array(80);function Fe(){this.init(),this._w=Li,bn.call(this,64,56)}Ni(Fe,bn);Fe.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Di(e){return e<<5|e>>>27}function Fi(e){return e<<30|e>>>2}function ki(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Fe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var _=0;_<80;++_){var v=~~(_/20),C=Di(r)+ki(v,n,o,f)+u+t[_]+ji[v]|0;u=f,f=o,o=Fi(n),n=r,r=C}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0};Fe.prototype._hash=function(){var e=Ii.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var qi=Fe,Ui=ue,yn=Pe,Hi=ge.Buffer,$i=[1518500249,1859775393,-1894007588,-899497514],zi=new Array(80);function ke(){this.init(),this._w=zi,yn.call(this,64,56)}Ui(ke,yn);ke.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Wi(e){return e<<1|e>>>31}function Gi(e){return e<<5|e>>>27}function Vi(e){return e<<30|e>>>2}function Ji(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}ke.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=Wi(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var _=0;_<80;++_){var v=~~(_/20),C=Gi(r)+Ji(v,n,o,f)+u+t[_]+$i[v]|0;u=f,f=o,o=Vi(n),n=r,r=C}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0};ke.prototype._hash=function(){var e=Hi.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Ki=ke,Yi=ue,gn=Pe,Xi=ge.Buffer,Qi=[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],Zi=new Array(64);function qe(){this.init(),this._w=Zi,gn.call(this,64,56)}Yi(qe,gn);qe.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function ea(e,t,r){return r^e&(t^r)}function ta(e,t,r){return e&t|r&(e|t)}function ra(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function na(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ia(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function aa(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}qe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=this._f|0,_=this._g|0,v=this._h|0,C=0;C<16;++C)t[C]=e.readInt32BE(C*4);for(;C<64;++C)t[C]=aa(t[C-2])+t[C-7]+ia(t[C-15])+t[C-16]|0;for(var j=0;j<64;++j){var m=v+na(u)+ea(u,c,_)+Qi[j]+t[j]|0,M=ra(r)+ta(r,n,o)|0;v=_,_=c,c=u,u=f+m|0,f=o,o=n,n=r,r=m+M|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=_+this._g|0,this._h=v+this._h|0};qe.prototype._hash=function(){var e=Xi.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var vn=qe,oa=ue,sa=vn,fa=Pe,ua=ge.Buffer,la=new Array(64);function et(){this.init(),this._w=la,fa.call(this,64,56)}oa(et,sa);et.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};et.prototype._hash=function(){var e=ua.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var ca=et,ha=ue,wn=Pe,da=ge.Buffer,$r=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_a=new Array(160);function Ue(){this.init(),this._w=_a,wn.call(this,128,112)}ha(Ue,wn);Ue.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function zr(e,t,r){return r^e&(t^r)}function Wr(e,t,r){return e&t|r&(e|t)}function Gr(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Vr(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function pa(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function ba(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function ya(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function ga(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Y(e,t){return e>>>0<t>>>0?1:0}Ue.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,o=this._ch|0,f=this._dh|0,u=this._eh|0,c=this._fh|0,_=this._gh|0,v=this._hh|0,C=this._al|0,j=this._bl|0,m=this._cl|0,M=this._dl|0,O=this._el|0,N=this._fl|0,x=this._gl|0,S=this._hl|0,P=0;P<32;P+=2)t[P]=e.readInt32BE(P*4),t[P+1]=e.readInt32BE(P*4+4);for(;P<160;P+=2){var T=t[P-30],B=t[P-15*2+1],L=pa(T,B),F=ba(B,T);T=t[P-2*2],B=t[P-2*2+1];var G=ya(T,B),U=ga(B,T),D=t[P-7*2],X=t[P-7*2+1],ie=t[P-16*2],ae=t[P-16*2+1],J=F+X|0,Q=L+D+Y(J,F)|0;J=J+U|0,Q=Q+G+Y(J,U)|0,J=J+ae|0,Q=Q+ie+Y(J,ae)|0,t[P]=Q,t[P+1]=J}for(var Z=0;Z<160;Z+=2){Q=t[Z],J=t[Z+1];var H=Wr(r,n,o),ee=Wr(C,j,m),re=Gr(r,C),K=Gr(C,r),h=Vr(u,O),d=Vr(O,u),p=$r[Z],b=$r[Z+1],R=zr(u,c,_),E=zr(O,N,x),s=S+d|0,l=v+h+Y(s,S)|0;s=s+E|0,l=l+R+Y(s,E)|0,s=s+b|0,l=l+p+Y(s,b)|0,s=s+J|0,l=l+Q+Y(s,J)|0;var g=K+ee|0,w=re+H+Y(g,K)|0;v=_,S=x,_=c,x=N,c=u,N=O,O=M+s|0,u=f+l+Y(O,M)|0,f=o,M=m,o=n,m=j,n=r,j=C,C=s+g|0,r=l+w+Y(C,s)|0}this._al=this._al+C|0,this._bl=this._bl+j|0,this._cl=this._cl+m|0,this._dl=this._dl+M|0,this._el=this._el+O|0,this._fl=this._fl+N|0,this._gl=this._gl+x|0,this._hl=this._hl+S|0,this._ah=this._ah+r+Y(this._al,C)|0,this._bh=this._bh+n+Y(this._bl,j)|0,this._ch=this._ch+o+Y(this._cl,m)|0,this._dh=this._dh+f+Y(this._dl,M)|0,this._eh=this._eh+u+Y(this._el,O)|0,this._fh=this._fh+c+Y(this._fl,N)|0,this._gh=this._gh+_+Y(this._gl,x)|0,this._hh=this._hh+v+Y(this._hl,S)|0};Ue.prototype._hash=function(){var e=da.allocUnsafe(64);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var mn=Ue,va=ue,wa=mn,ma=Pe,Ea=ge.Buffer,Sa=new Array(160);function tt(){this.init(),this._w=Sa,ma.call(this,128,112)}va(tt,wa);tt.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};tt.prototype._hash=function(){var e=Ea.allocUnsafe(48);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Ra=tt,Re=_n.exports=function(t){t=t.toLowerCase();var r=Re[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};Re.sha=qi;Re.sha1=Ki;Re.sha224=ca;Re.sha256=vn;Re.sha384=Ra;Re.sha512=mn;var ao=_n.exports;const Jr=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let o=0;o<arguments.length;o++)n[o]=arguments[o];return new r((o,f)=>{t.errorFirst?n.push(function(u,c){if(t.multiArgs){const _=new Array(arguments.length-1);for(let v=1;v<arguments.length;v++)_[v-1]=arguments[v];u?(_.unshift(u),f(_)):o(_)}else u?f(u):o(c)}):n.push(function(u){if(t.multiArgs){const c=new Array(arguments.length-1);for(let _=0;_<arguments.length;_++)c[_]=arguments[_];o(c)}else o(u)}),e.apply(this,n)})};var oo=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=o=>{const f=u=>typeof u=="string"?o===u:u.test(o);return t.include?t.include.some(f):!t.exclude.some(f)};let n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):Jr(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(const o in e){const f=e[o];n[o]=typeof f=="function"&&r(o)?Jr(f,t):f}return n},xa=Ta,Aa=Object.prototype.hasOwnProperty;function Ta(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Aa.call(r,n)&&(e[n]=r[n])}return e}var Oa=Ca;function Ca(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const Ma=xa,Pa=Oa();var so=q;function q(e){const t=this;t.currentProvider=e}q.prototype.getBalance=He(2,"eth_getBalance");q.prototype.getCode=He(2,"eth_getCode");q.prototype.getTransactionCount=He(2,"eth_getTransactionCount");q.prototype.getStorageAt=He(3,"eth_getStorageAt");q.prototype.call=He(2,"eth_call");q.prototype.protocolVersion=$("eth_protocolVersion");q.prototype.syncing=$("eth_syncing");q.prototype.coinbase=$("eth_coinbase");q.prototype.mining=$("eth_mining");q.prototype.hashrate=$("eth_hashrate");q.prototype.gasPrice=$("eth_gasPrice");q.prototype.accounts=$("eth_accounts");q.prototype.blockNumber=$("eth_blockNumber");q.prototype.getBlockTransactionCountByHash=$("eth_getBlockTransactionCountByHash");q.prototype.getBlockTransactionCountByNumber=$("eth_getBlockTransactionCountByNumber");q.prototype.getUncleCountByBlockHash=$("eth_getUncleCountByBlockHash");q.prototype.getUncleCountByBlockNumber=$("eth_getUncleCountByBlockNumber");q.prototype.sign=$("eth_sign");q.prototype.sendTransaction=$("eth_sendTransaction");q.prototype.sendRawTransaction=$("eth_sendRawTransaction");q.prototype.estimateGas=$("eth_estimateGas");q.prototype.getBlockByHash=$("eth_getBlockByHash");q.prototype.getBlockByNumber=$("eth_getBlockByNumber");q.prototype.getTransactionByHash=$("eth_getTransactionByHash");q.prototype.getTransactionByBlockHashAndIndex=$("eth_getTransactionByBlockHashAndIndex");q.prototype.getTransactionByBlockNumberAndIndex=$("eth_getTransactionByBlockNumberAndIndex");q.prototype.getTransactionReceipt=$("eth_getTransactionReceipt");q.prototype.getUncleByBlockHashAndIndex=$("eth_getUncleByBlockHashAndIndex");q.prototype.getUncleByBlockNumberAndIndex=$("eth_getUncleByBlockNumberAndIndex");q.prototype.getCompilers=$("eth_getCompilers");q.prototype.compileLLL=$("eth_compileLLL");q.prototype.compileSolidity=$("eth_compileSolidity");q.prototype.compileSerpent=$("eth_compileSerpent");q.prototype.newFilter=$("eth_newFilter");q.prototype.newBlockFilter=$("eth_newBlockFilter");q.prototype.newPendingTransactionFilter=$("eth_newPendingTransactionFilter");q.prototype.uninstallFilter=$("eth_uninstallFilter");q.prototype.getFilterChanges=$("eth_getFilterChanges");q.prototype.getFilterLogs=$("eth_getFilterLogs");q.prototype.getLogs=$("eth_getLogs");q.prototype.getWork=$("eth_getWork");q.prototype.submitWork=$("eth_submitWork");q.prototype.submitHashrate=$("eth_submitHashrate");q.prototype.sendAsync=function(e,t){this.currentProvider.sendAsync(Ba(e),function(n,o){if(!n&&o.error&&(n=new Error("EthQuery - RPC Error - "+o.error.message)),n)return t(n);t(null,o.result)})};function $(e){return function(){const t=this;var r=[].slice.call(arguments),n=r.pop();t.sendAsync({method:e,params:r},n)}}function He(e,t){return function(){const r=this;var n=[].slice.call(arguments),o=n.pop();n.length<e&&n.push("latest"),r.sendAsync({method:t,params:n},o)}}function Ba(e){return Ma({id:Pa(),jsonrpc:"2.0",params:[]},e)}var Na={},Rr={},En={exports:{}};(function(e){var t,r,n,o,f,u,c,_,v,C,j,m,M,O,N,x,S,P,T,B,L,F,G,U,D,X,ie,ae,J,Q,Z;(function(H){var ee=typeof ne=="object"?ne:typeof self=="object"?self:typeof this=="object"?this:{};H(re(ee,re(e.exports)));function re(K,h){return K!==ee&&(typeof Object.create=="function"?Object.defineProperty(K,"__esModule",{value:!0}):K.__esModule=!0),function(d,p){return K[d]=h?h(d,p):p}}})(function(H){var ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(h[p]=d[p])};t=function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");ee(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)},r=Object.assign||function(h){for(var d,p=1,b=arguments.length;p<b;p++){d=arguments[p];for(var R in d)Object.prototype.hasOwnProperty.call(d,R)&&(h[R]=d[R])}return h},n=function(h,d){var p={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&d.indexOf(b)<0&&(p[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,b=Object.getOwnPropertySymbols(h);R<b.length;R++)d.indexOf(b[R])<0&&Object.prototype.propertyIsEnumerable.call(h,b[R])&&(p[b[R]]=h[b[R]]);return p},o=function(h,d,p,b){var R=arguments.length,E=R<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,p):b,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,d,p,b);else for(var l=h.length-1;l>=0;l--)(s=h[l])&&(E=(R<3?s(E):R>3?s(d,p,E):s(d,p))||E);return R>3&&E&&Object.defineProperty(d,p,E),E},f=function(h,d){return function(p,b){d(p,b,h)}},u=function(h,d,p,b,R,E){function s(z){if(z!==void 0&&typeof z!="function")throw new TypeError("Function expected");return z}for(var l=b.kind,g=l==="getter"?"get":l==="setter"?"set":"value",w=!d&&h?b.static?h:h.prototype:null,I=d||(w?Object.getOwnPropertyDescriptor(w,b.name):{}),i,a=!1,y=p.length-1;y>=0;y--){var A={};for(var W in b)A[W]=W==="access"?{}:b[W];for(var W in b.access)A.access[W]=b.access[W];A.addInitializer=function(z){if(a)throw new TypeError("Cannot add initializers after decoration has completed");E.push(s(z||null))};var k=(0,p[y])(l==="accessor"?{get:I.get,set:I.set}:I[g],A);if(l==="accessor"){if(k===void 0)continue;if(k===null||typeof k!="object")throw new TypeError("Object expected");(i=s(k.get))&&(I.get=i),(i=s(k.set))&&(I.set=i),(i=s(k.init))&&R.unshift(i)}else(i=s(k))&&(l==="field"?R.unshift(i):I[g]=i)}w&&Object.defineProperty(w,b.name,I),a=!0},c=function(h,d,p){for(var b=arguments.length>2,R=0;R<d.length;R++)p=b?d[R].call(h,p):d[R].call(h);return b?p:void 0},_=function(h){return typeof h=="symbol"?h:"".concat(h)},v=function(h,d,p){return typeof d=="symbol"&&(d=d.description?"[".concat(d.description,"]"):""),Object.defineProperty(h,"name",{configurable:!0,value:p?"".concat(p," ",d):d})},C=function(h,d){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(h,d)},j=function(h,d,p,b){function R(E){return E instanceof p?E:new p(function(s){s(E)})}return new(p||(p=Promise))(function(E,s){function l(I){try{w(b.next(I))}catch(i){s(i)}}function g(I){try{w(b.throw(I))}catch(i){s(i)}}function w(I){I.done?E(I.value):R(I.value).then(l,g)}w((b=b.apply(h,d||[])).next())})},m=function(h,d){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},b,R,E,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(w){return function(I){return g([w,I])}}function g(w){if(b)throw new TypeError("Generator is already executing.");for(;s&&(s=0,w[0]&&(p=0)),p;)try{if(b=1,R&&(E=w[0]&2?R.return:w[0]?R.throw||((E=R.return)&&E.call(R),0):R.next)&&!(E=E.call(R,w[1])).done)return E;switch(R=0,E&&(w=[w[0]&2,E.value]),w[0]){case 0:case 1:E=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,R=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!E||w[1]>E[0]&&w[1]<E[3])){p.label=w[1];break}if(w[0]===6&&p.label<E[1]){p.label=E[1],E=w;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(w);break}E[2]&&p.ops.pop(),p.trys.pop();continue}w=d.call(h,p)}catch(I){w=[6,I],R=0}finally{b=E=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},M=function(h,d){for(var p in h)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&J(d,h,p)},J=Object.create?function(h,d,p,b){b===void 0&&(b=p);var R=Object.getOwnPropertyDescriptor(d,p);(!R||("get"in R?!d.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(h,b,R)}:function(h,d,p,b){b===void 0&&(b=p),h[b]=d[p]},O=function(h){var d=typeof Symbol=="function"&&Symbol.iterator,p=d&&h[d],b=0;if(p)return p.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&b>=h.length&&(h=void 0),{value:h&&h[b++],done:!h}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},N=function(h,d){var p=typeof Symbol=="function"&&h[Symbol.iterator];if(!p)return h;var b=p.call(h),R,E=[],s;try{for(;(d===void 0||d-- >0)&&!(R=b.next()).done;)E.push(R.value)}catch(l){s={error:l}}finally{try{R&&!R.done&&(p=b.return)&&p.call(b)}finally{if(s)throw s.error}}return E},x=function(){for(var h=[],d=0;d<arguments.length;d++)h=h.concat(N(arguments[d]));return h},S=function(){for(var h=0,d=0,p=arguments.length;d<p;d++)h+=arguments[d].length;for(var b=Array(h),R=0,d=0;d<p;d++)for(var E=arguments[d],s=0,l=E.length;s<l;s++,R++)b[R]=E[s];return b},P=function(h,d,p){if(p||arguments.length===2)for(var b=0,R=d.length,E;b<R;b++)(E||!(b in d))&&(E||(E=Array.prototype.slice.call(d,0,b)),E[b]=d[b]);return h.concat(E||Array.prototype.slice.call(d))},T=function(h){return this instanceof T?(this.v=h,this):new T(h)},B=function(h,d,p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var b=p.apply(h,d||[]),R,E=[];return R={},s("next"),s("throw"),s("return"),R[Symbol.asyncIterator]=function(){return this},R;function s(a){b[a]&&(R[a]=function(y){return new Promise(function(A,W){E.push([a,y,A,W])>1||l(a,y)})})}function l(a,y){try{g(b[a](y))}catch(A){i(E[0][3],A)}}function g(a){a.value instanceof T?Promise.resolve(a.value.v).then(w,I):i(E[0][2],a)}function w(a){l("next",a)}function I(a){l("throw",a)}function i(a,y){a(y),E.shift(),E.length&&l(E[0][0],E[0][1])}},L=function(h){var d,p;return d={},b("next"),b("throw",function(R){throw R}),b("return"),d[Symbol.iterator]=function(){return this},d;function b(R,E){d[R]=h[R]?function(s){return(p=!p)?{value:T(h[R](s)),done:!1}:E?E(s):s}:E}},F=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var d=h[Symbol.asyncIterator],p;return d?d.call(h):(h=typeof O=="function"?O(h):h[Symbol.iterator](),p={},b("next"),b("throw"),b("return"),p[Symbol.asyncIterator]=function(){return this},p);function b(E){p[E]=h[E]&&function(s){return new Promise(function(l,g){s=h[E](s),R(l,g,s.done,s.value)})}}function R(E,s,l,g){Promise.resolve(g).then(function(w){E({value:w,done:l})},s)}},G=function(h,d){return Object.defineProperty?Object.defineProperty(h,"raw",{value:d}):h.raw=d,h};var re=Object.create?function(h,d){Object.defineProperty(h,"default",{enumerable:!0,value:d})}:function(h,d){h.default=d};U=function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var p in h)p!=="default"&&Object.prototype.hasOwnProperty.call(h,p)&&J(d,h,p);return re(d,h),d},D=function(h){return h&&h.__esModule?h:{default:h}},X=function(h,d,p,b){if(p==="a"&&!b)throw new TypeError("Private accessor was defined without a getter");if(typeof d=="function"?h!==d||!b:!d.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?b:p==="a"?b.call(h):b?b.value:d.get(h)},ie=function(h,d,p,b,R){if(b==="m")throw new TypeError("Private method is not writable");if(b==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof d=="function"?h!==d||!R:!d.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return b==="a"?R.call(h,p):R?R.value=p:d.set(h,p),p},ae=function(h,d){if(d===null||typeof d!="object"&&typeof d!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h=="function"?d===h:h.has(d)},Q=function(h,d,p){if(d!=null){if(typeof d!="object"&&typeof d!="function")throw new TypeError("Object expected.");var b;if(p){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");b=d[Symbol.asyncDispose]}if(b===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");b=d[Symbol.dispose]}if(typeof b!="function")throw new TypeError("Object not disposable.");h.stack.push({value:d,dispose:b,async:p})}else p&&h.stack.push({async:!0});return d};var K=typeof SuppressedError=="function"?SuppressedError:function(h,d,p){var b=new Error(p);return b.name="SuppressedError",b.error=h,b.suppressed=d,b};Z=function(h){function d(b){h.error=h.hasError?new K(b,h.error,"An error was suppressed during disposal."):b,h.hasError=!0}function p(){for(;h.stack.length;){var b=h.stack.pop();try{var R=b.dispose&&b.dispose.call(b.value);if(b.async)return Promise.resolve(R).then(p,function(E){return d(E),p()})}catch(E){d(E)}}if(h.hasError)throw h.error}return p()},H("__extends",t),H("__assign",r),H("__rest",n),H("__decorate",o),H("__param",f),H("__esDecorate",u),H("__runInitializers",c),H("__propKey",_),H("__setFunctionName",v),H("__metadata",C),H("__awaiter",j),H("__generator",m),H("__exportStar",M),H("__createBinding",J),H("__values",O),H("__read",N),H("__spread",x),H("__spreadArrays",S),H("__spreadArray",P),H("__await",T),H("__asyncGenerator",B),H("__asyncDelegator",L),H("__asyncValues",F),H("__makeTemplateObject",G),H("__importStar",U),H("__importDefault",D),H("__classPrivateFieldGet",X),H("__classPrivateFieldSet",ie),H("__classPrivateFieldIn",ae),H("__addDisposableResource",Q),H("__disposeResources",Z)})})(En);var xr=En.exports,rt={};Object.defineProperty(rt,"__esModule",{value:!0});var Kr=xr,Ia=function(){function e(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return e.prototype.acquire=function(){var t=this,r=this.isLocked(),n=new Promise(function(o){return t._queue.push(o)});return r||this._dispatch(),n},e.prototype.runExclusive=function(t){return Kr.__awaiter(this,void 0,void 0,function(){var r,n,o;return Kr.__generator(this,function(f){switch(f.label){case 0:return[4,this.acquire()];case 1:r=f.sent(),n=r[0],o=r[1],f.label=2;case 2:return f.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,f.sent()];case 4:return o(),[7];case 5:return[2]}})})},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},e.prototype._dispatch=function(){var t=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},r([this._value--,this._currentReleaser])}},e}();rt.default=Ia;Object.defineProperty(Rr,"__esModule",{value:!0});var Yr=xr,ja=rt,La=function(){function e(){this._semaphore=new ja.default(1)}return e.prototype.acquire=function(){return Yr.__awaiter(this,void 0,void 0,function(){var t,r;return Yr.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=n.sent(),r=t[1],[2,r]}})})},e.prototype.runExclusive=function(t){return this._semaphore.runExclusive(function(){return t()})},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();Rr.default=La;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});nt.withTimeout=void 0;var Ge=xr;function Da(e,t,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(o,f){return Ge.__awaiter(n,void 0,void 0,function(){var u,c,_;return Ge.__generator(this,function(v){switch(v.label){case 0:return u=!1,setTimeout(function(){u=!0,f(r)},t),[4,e.acquire()];case 1:return c=v.sent(),u?(_=Array.isArray(c)?c[1]:c,_()):o(c),[2]}})})})},runExclusive:function(o){return Ge.__awaiter(this,void 0,void 0,function(){var f,u;return Ge.__generator(this,function(c){switch(c.label){case 0:f=function(){},c.label=1;case 1:return c.trys.push([1,,7,8]),[4,this.acquire()];case 2:return u=c.sent(),Array.isArray(u)?(f=u[1],[4,o(u[0])]):[3,4];case 3:return[2,c.sent()];case 4:return f=u,[4,o()];case 5:return[2,c.sent()];case 6:return[3,8];case 7:return f(),[7];case 8:return[2]}})})},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}nt.withTimeout=Da;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var t=Rr;Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return t.default}});var r=rt;Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=nt;Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(Na);var Fa={},it={},$e={};Object.defineProperty($e,"__esModule",{value:!0});$e.getUniqueId=void 0;const Sn=4294967295;let dr=Math.floor(Math.random()*Sn);function ka(){return dr=(dr+1)%Sn,dr}$e.getUniqueId=ka;Object.defineProperty(it,"__esModule",{value:!0});it.createIdRemapMiddleware=void 0;const qa=$e;function Ua(){return(e,t,r,n)=>{const o=e.id,f=qa.getUniqueId();e.id=f,t.id=f,r(u=>{e.id=o,t.id=o,u()})}}it.createIdRemapMiddleware=Ua;var at={};Object.defineProperty(at,"__esModule",{value:!0});at.createAsyncMiddleware=void 0;function Ha(e){return async(t,r,n,o)=>{let f;const u=new Promise(C=>{f=C});let c=null,_=!1;const v=async()=>{_=!0,n(C=>{c=C,f()}),await u};try{await e(t,r,v),_?(await u,c(null)):o(null)}catch(C){c?c(C):o(C)}}}at.createAsyncMiddleware=Ha;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.createScaffoldMiddleware=void 0;function $a(e){return(t,r,n,o)=>{const f=e[t.method];return f===void 0?n():typeof f=="function"?f(t,r,n,o):(r.result=f,o())}}ot.createScaffoldMiddleware=$a;var ze={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});const za=mr;function Xr(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function Wa(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}class Ga extends za.EventEmitter{emit(t,...r){let n=t==="error";const o=this._events;if(o!==void 0)n=n&&o.error===void 0;else if(!n)return!1;if(n){let u;if(r.length>0&&([u]=r),u instanceof Error)throw u;const c=new Error(`Unhandled error.${u?` (${u.message})`:""}`);throw c.context=u,c}const f=o[t];if(f===void 0)return!1;if(typeof f=="function")Xr(f,this,r);else{const u=f.length,c=Wa(f);for(let _=0;_<u;_+=1)Xr(c[_],this,r)}return!0}}Ar.default=Ga;var Rn={},be={},Va=Le;Le.default=Le;Le.stable=Tn;Le.stableStringify=Tn;var Ke="[...]",xn="[Circular]",Ee=[],we=[];function An(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Le(e,t,r,n){typeof n>"u"&&(n=An()),vr(e,"",0,[],void 0,0,n);var o;try{we.length===0?o=JSON.stringify(e,t,r):o=JSON.stringify(e,On(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ee.length!==0;){var f=Ee.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return o}function Oe(e,t,r,n){var o=Object.getOwnPropertyDescriptor(n,r);o.get!==void 0?o.configurable?(Object.defineProperty(n,r,{value:e}),Ee.push([n,r,t,o])):we.push([t,r,e]):(n[r]=e,Ee.push([n,r,t]))}function vr(e,t,r,n,o,f,u){f+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){Oe(xn,e,t,o);return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){Oe(Ke,e,t,o);return}if(typeof u.edgesLimit<"u"&&r+1>u.edgesLimit){Oe(Ke,e,t,o);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)vr(e[c],c,c,n,e,f,u);else{var _=Object.keys(e);for(c=0;c<_.length;c++){var v=_[c];vr(e[v],v,c,n,e,f,u)}}n.pop()}}function Ja(e,t){return e<t?-1:e>t?1:0}function Tn(e,t,r,n){typeof n>"u"&&(n=An());var o=wr(e,"",0,[],void 0,0,n)||e,f;try{we.length===0?f=JSON.stringify(o,t,r):f=JSON.stringify(o,On(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ee.length!==0;){var u=Ee.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return f}function wr(e,t,r,n,o,f,u){f+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){Oe(xn,e,t,o);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){Oe(Ke,e,t,o);return}if(typeof u.edgesLimit<"u"&&r+1>u.edgesLimit){Oe(Ke,e,t,o);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)wr(e[c],c,c,n,e,f,u);else{var _={},v=Object.keys(e).sort(Ja);for(c=0;c<v.length;c++){var C=v[c];wr(e[C],C,c,n,e,f,u),_[C]=e[C]}if(typeof o<"u")Ee.push([o,t,e]),o[t]=_;else return _}n.pop()}}function On(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(we.length>0)for(var n=0;n<we.length;n++){var o=we[n];if(o[1]===t&&o[0]===r){r=o[2],we.splice(n,1);break}}return e.call(this,t,r)}}Object.defineProperty(be,"__esModule",{value:!0});be.EthereumProviderError=be.EthereumRpcError=void 0;const Ka=Va;class Cn extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}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 Ka.default(this.serialize(),Qa,2)}}be.EthereumRpcError=Cn;class Ya extends Cn{constructor(t,r,n){if(!Xa(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}be.EthereumProviderError=Ya;function Xa(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function Qa(e,t){if(t!=="[Circular]")return t}var Tr={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});ye.errorValues=ye.errorCodes=void 0;ye.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}};ye.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=ye,r=be,n=t.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",f={code:n,message:u(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function u(m,M=o){if(Number.isInteger(m)){const O=m.toString();if(j(t.errorValues,O))return t.errorValues[O].message;if(v(m))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return M}e.getMessageFromCode=u;function c(m){if(!Number.isInteger(m))return!1;const M=m.toString();return!!(t.errorValues[M]||v(m))}e.isValidCode=c;function _(m,{fallbackError:M=f,shouldIncludeStack:O=!1}={}){var N,x;if(!M||!Number.isInteger(M.code)||typeof M.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(m instanceof r.EthereumRpcError)return m.serialize();const S={};if(m&&typeof m=="object"&&!Array.isArray(m)&&j(m,"code")&&c(m.code)){const T=m;S.code=T.code,T.message&&typeof T.message=="string"?(S.message=T.message,j(T,"data")&&(S.data=T.data)):(S.message=u(S.code),S.data={originalError:C(m)})}else{S.code=M.code;const T=(N=m)===null||N===void 0?void 0:N.message;S.message=T&&typeof T=="string"?T:M.message,S.data={originalError:C(m)}}const P=(x=m)===null||x===void 0?void 0:x.stack;return O&&m&&P&&typeof P=="string"&&(S.stack=P),S}e.serializeError=_;function v(m){return m>=-32099&&m<=-32e3}function C(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function j(m,M){return Object.prototype.hasOwnProperty.call(m,M)}})(Tr);var st={};Object.defineProperty(st,"__esModule",{value:!0});st.ethErrors=void 0;const Or=be,Mn=Tr,te=ye;st.ethErrors={rpc:{parse:e=>oe(te.errorCodes.rpc.parse,e),invalidRequest:e=>oe(te.errorCodes.rpc.invalidRequest,e),invalidParams:e=>oe(te.errorCodes.rpc.invalidParams,e),methodNotFound:e=>oe(te.errorCodes.rpc.methodNotFound,e),internal:e=>oe(te.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 oe(t,e)},invalidInput:e=>oe(te.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>oe(te.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>oe(te.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>oe(te.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>oe(te.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>oe(te.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Ie(te.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>Ie(te.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>Ie(te.errorCodes.provider.unsupportedMethod,e),disconnected:e=>Ie(te.errorCodes.provider.disconnected,e),chainDisconnected:e=>Ie(te.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Or.EthereumProviderError(t,r,n)}}};function oe(e,t){const[r,n]=Pn(t);return new Or.EthereumRpcError(e,r||Mn.getMessageFromCode(e),n)}function Ie(e,t){const[r,n]=Pn(t);return new Or.EthereumProviderError(e,r||Mn.getMessageFromCode(e),n)}function Pn(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=be;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=Tr;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=st;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const o=ye;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})})(Rn);var Za=ne&&ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.JsonRpcEngine=void 0;const eo=Za(Ar),se=Rn;class de extends eo.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,n,o)=>{try{const[f,u,c]=await de._runAllMiddleware(t,r,this._middleware);return u?(await de._runReturnHandlers(c),o(f)):n(async _=>{try{await de._runReturnHandlers(c)}catch(v){return _(v)}return _()})}catch(f){return o(f)}}}async _handleBatch(t,r){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(n,o)=>{r(o)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const u=new se.EthereumRpcError(se.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof t}`,{request:t});return r(u,{id:void 0,jsonrpc:"2.0",error:u})}if(typeof t.method!="string"){const u=new se.EthereumRpcError(se.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof t.method}`,{request:t});return r(u,{id:t.id,jsonrpc:"2.0",error:u})}const n=Object.assign({},t),o={id:n.id,jsonrpc:n.jsonrpc};let f=null;try{await this._processRequest(n,o)}catch(u){f=u}return f&&(delete o.result,o.error||(o.error=se.serializeError(f))),r(f,o)}async _processRequest(t,r){const[n,o,f]=await de._runAllMiddleware(t,r,this._middleware);if(de._checkForCompletion(t,r,o),await de._runReturnHandlers(f),n)throw n}static async _runAllMiddleware(t,r,n){const o=[];let f=null,u=!1;for(const c of n)if([f,u]=await de._runMiddleware(t,r,c,o),u)break;return[f,u,o.reverse()]}static _runMiddleware(t,r,n,o){return new Promise(f=>{const u=_=>{const v=_||r.error;v&&(r.error=se.serializeError(v)),f([v,!0])},c=_=>{r.error?u(r.error):(_&&(typeof _!="function"&&u(new se.EthereumRpcError(se.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof _}" for request:
1
+ import{j as mr,f as Ye,r as Qr,b as V,d as ne,c as ue,B as me}from"./index-60b595bb.js";var pr={exports:{}},Zr=mr.EventEmitter,ir,Cr;function Bn(){if(Cr)return ir;Cr=1;function e(O,N){var x=Object.keys(O);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(O);N&&(S=S.filter(function(P){return Object.getOwnPropertyDescriptor(O,P).enumerable})),x.push.apply(x,S)}return x}function t(O){for(var N=1;N<arguments.length;N++){var x=arguments[N]!=null?arguments[N]:{};N%2?e(Object(x),!0).forEach(function(S){r(O,S,x[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(x)):e(Object(x)).forEach(function(S){Object.defineProperty(O,S,Object.getOwnPropertyDescriptor(x,S))})}return O}function r(O,N,x){return N=u(N),N in O?Object.defineProperty(O,N,{value:x,enumerable:!0,configurable:!0,writable:!0}):O[N]=x,O}function n(O,N){if(!(O instanceof N))throw new TypeError("Cannot call a class as a function")}function o(O,N){for(var x=0;x<N.length;x++){var S=N[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(O,u(S.key),S)}}function f(O,N,x){return N&&o(O.prototype,N),x&&o(O,x),Object.defineProperty(O,"prototype",{writable:!1}),O}function u(O){var N=c(O,"string");return typeof N=="symbol"?N:String(N)}function c(O,N){if(typeof O!="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var S=x.call(O,N||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(O)}var _=Ye(),v=_.Buffer,C=Qr,j=C.inspect,m=j&&j.custom||"inspect";function M(O,N,x){v.prototype.copy.call(O,N,x)}return ir=function(){function O(){n(this,O),this.head=null,this.tail=null,this.length=0}return f(O,[{key:"push",value:function(x){var S={data:x,next:null};this.length>0?this.tail.next=S:this.head=S,this.tail=S,++this.length}},{key:"unshift",value:function(x){var S={data:x,next:this.head};this.length===0&&(this.tail=S),this.head=S,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var S=this.head,P=""+S.data;S=S.next;)P+=x+S.data;return P}},{key:"concat",value:function(x){if(this.length===0)return v.alloc(0);for(var S=v.allocUnsafe(x>>>0),P=this.head,T=0;P;)M(P.data,S,T),T+=P.data.length,P=P.next;return S}},{key:"consume",value:function(x,S){var P;return x<this.head.data.length?(P=this.head.data.slice(0,x),this.head.data=this.head.data.slice(x)):x===this.head.data.length?P=this.shift():P=S?this._getString(x):this._getBuffer(x),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(x){var S=this.head,P=1,T=S.data;for(x-=T.length;S=S.next;){var B=S.data,L=x>B.length?B.length:x;if(L===B.length?T+=B:T+=B.slice(0,x),x-=L,x===0){L===B.length?(++P,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=B.slice(L));break}++P}return this.length-=P,T}},{key:"_getBuffer",value:function(x){var S=v.allocUnsafe(x),P=this.head,T=1;for(P.data.copy(S),x-=P.data.length;P=P.next;){var B=P.data,L=x>B.length?B.length:x;if(B.copy(S,S.length-x,0,L),x-=L,x===0){L===B.length?(++T,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=B.slice(L));break}++T}return this.length-=T,S}},{key:m,value:function(x,S){return j(this,t(t({},S),{},{depth:0,customInspect:!1}))}}]),O}(),ir}function Nn(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,V.nextTick(br,this,e)):V.nextTick(br,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(f){!t&&f?r._writableState?r._writableState.errorEmitted?V.nextTick(Ve,r):(r._writableState.errorEmitted=!0,V.nextTick(Mr,r,f)):V.nextTick(Mr,r,f):t?(V.nextTick(Ve,r),t(f)):V.nextTick(Ve,r)}),this)}function Mr(e,t){br(e,t),Ve(e)}function Ve(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function In(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function br(e,t){e.emit("error",t)}function jn(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var en={destroy:Nn,undestroy:In,errorOrDestroy:jn},Se={};function Ln(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var tn={};function fe(e,t,r){r||(r=Error);function n(f,u,c){return typeof t=="string"?t:t(f,u,c)}var o=function(f){Ln(u,f);function u(c,_,v){return f.call(this,n(c,_,v))||this}return u}(r);o.prototype.name=r.name,o.prototype.code=e,tn[e]=o}function Pr(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Dn(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Fn(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function kn(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}fe("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);fe("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Dn(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(Fn(e," argument"))o="The ".concat(e," ").concat(n," ").concat(Pr(t,"type"));else{var f=kn(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(f," ").concat(n," ").concat(Pr(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError);fe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");fe("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});fe("ERR_STREAM_PREMATURE_CLOSE","Premature close");fe("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});fe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");fe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");fe("ERR_STREAM_WRITE_AFTER_END","write after end");fe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);fe("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);fe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Se.codes=tn;var qn=Se.codes.ERR_INVALID_OPT_VALUE;function Un(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Hn(e,t,r,n){var o=Un(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var f=n?r:"highWaterMark";throw new qn(f,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var rn={getHighWaterMark:Hn},$n=zn;function zn(e,t){if(ar("noDeprecation"))return e;var r=!1;function n(){if(!r){if(ar("throwDeprecation"))throw new Error(t);ar("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function ar(e){try{if(!ne.localStorage)return!1}catch{return!1}var t=ne.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var or,Br;function nn(){if(Br)return or;Br=1,or=U;function e(s){var l=this;this.next=null,this.entry=null,this.finish=function(){E(l,s)}}var t;U.WritableState=F;var r={deprecate:$n},n=Zr,o=Ye().Buffer,f=(typeof ne<"u"?ne:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(s){return o.from(s)}function c(s){return o.isBuffer(s)||s instanceof f}var _=en,v=rn,C=v.getHighWaterMark,j=Se.codes,m=j.ERR_INVALID_ARG_TYPE,M=j.ERR_METHOD_NOT_IMPLEMENTED,O=j.ERR_MULTIPLE_CALLBACK,N=j.ERR_STREAM_CANNOT_PIPE,x=j.ERR_STREAM_DESTROYED,S=j.ERR_STREAM_NULL_VALUES,P=j.ERR_STREAM_WRITE_AFTER_END,T=j.ERR_UNKNOWN_ENCODING,B=_.errorOrDestroy;ue(U,n);function L(){}function F(s,l,g){t=t||Ce(),s=s||{},typeof g!="boolean"&&(g=l instanceof t),this.objectMode=!!s.objectMode,g&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=C(this,s,"writableHighWaterMark",g),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=s.decodeStrings===!1;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(I){H(l,I)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=s.emitClose!==!1,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}F.prototype.getBuffer=function(){for(var l=this.bufferedRequest,g=[];l;)g.push(l),l=l.next;return g},function(){try{Object.defineProperty(F.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G=Function.prototype[Symbol.hasInstance],Object.defineProperty(U,Symbol.hasInstance,{value:function(l){return G.call(this,l)?!0:this!==U?!1:l&&l._writableState instanceof F}})):G=function(l){return l instanceof this};function U(s){t=t||Ce();var l=this instanceof t;if(!l&&!G.call(U,this))return new U(s);this._writableState=new F(s,this,l),this.writable=!0,s&&(typeof s.write=="function"&&(this._write=s.write),typeof s.writev=="function"&&(this._writev=s.writev),typeof s.destroy=="function"&&(this._destroy=s.destroy),typeof s.final=="function"&&(this._final=s.final)),n.call(this)}U.prototype.pipe=function(){B(this,new N)};function D(s,l){var g=new P;B(s,g),V.nextTick(l,g)}function X(s,l,g,w){var I;return g===null?I=new S:typeof g!="string"&&!l.objectMode&&(I=new m("chunk",["string","Buffer"],g)),I?(B(s,I),V.nextTick(w,I),!1):!0}U.prototype.write=function(s,l,g){var w=this._writableState,I=!1,i=!w.objectMode&&c(s);return i&&!o.isBuffer(s)&&(s=u(s)),typeof l=="function"&&(g=l,l=null),i?l="buffer":l||(l=w.defaultEncoding),typeof g!="function"&&(g=L),w.ending?D(this,g):(i||X(this,w,s,g))&&(w.pendingcb++,I=ae(this,w,i,s,l,g)),I},U.prototype.cork=function(){this._writableState.corked++},U.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,!s.writing&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&K(this,s))},U.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new T(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ie(s,l,g){return!s.objectMode&&s.decodeStrings!==!1&&typeof l=="string"&&(l=o.from(l,g)),l}Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ae(s,l,g,w,I,i){if(!g){var a=ie(l,w,I);w!==a&&(g=!0,I="buffer",w=a)}var y=l.objectMode?1:w.length;l.length+=y;var A=l.length<l.highWaterMark;if(A||(l.needDrain=!0),l.writing||l.corked){var W=l.lastBufferedRequest;l.lastBufferedRequest={chunk:w,encoding:I,isBuf:g,callback:i,next:null},W?W.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else J(s,l,!1,y,w,I,i);return A}function J(s,l,g,w,I,i,a){l.writelen=w,l.writecb=a,l.writing=!0,l.sync=!0,l.destroyed?l.onwrite(new x("write")):g?s._writev(I,l.onwrite):s._write(I,i,l.onwrite),l.sync=!1}function Q(s,l,g,w,I){--l.pendingcb,g?(V.nextTick(I,w),V.nextTick(b,s,l),s._writableState.errorEmitted=!0,B(s,w)):(I(w),s._writableState.errorEmitted=!0,B(s,w),b(s,l))}function Z(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}function H(s,l){var g=s._writableState,w=g.sync,I=g.writecb;if(typeof I!="function")throw new O;if(Z(g),l)Q(s,g,w,l,I);else{var i=h(g)||s.destroyed;!i&&!g.corked&&!g.bufferProcessing&&g.bufferedRequest&&K(s,g),w?V.nextTick(ee,s,g,i,I):ee(s,g,i,I)}}function ee(s,l,g,w){g||re(s,l),l.pendingcb--,w(),b(s,l)}function re(s,l){l.length===0&&l.needDrain&&(l.needDrain=!1,s.emit("drain"))}function K(s,l){l.bufferProcessing=!0;var g=l.bufferedRequest;if(s._writev&&g&&g.next){var w=l.bufferedRequestCount,I=new Array(w),i=l.corkedRequestsFree;i.entry=g;for(var a=0,y=!0;g;)I[a]=g,g.isBuf||(y=!1),g=g.next,a+=1;I.allBuffers=y,J(s,l,!0,l.length,I,"",i.finish),l.pendingcb++,l.lastBufferedRequest=null,i.next?(l.corkedRequestsFree=i.next,i.next=null):l.corkedRequestsFree=new e(l),l.bufferedRequestCount=0}else{for(;g;){var A=g.chunk,W=g.encoding,k=g.callback,z=l.objectMode?1:A.length;if(J(s,l,!1,z,A,W,k),g=g.next,l.bufferedRequestCount--,l.writing)break}g===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=g,l.bufferProcessing=!1}U.prototype._write=function(s,l,g){g(new M("_write()"))},U.prototype._writev=null,U.prototype.end=function(s,l,g){var w=this._writableState;return typeof s=="function"?(g=s,s=null,l=null):typeof l=="function"&&(g=l,l=null),s!=null&&this.write(s,l),w.corked&&(w.corked=1,this.uncork()),w.ending||R(this,w,g),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(s){return s.ending&&s.length===0&&s.bufferedRequest===null&&!s.finished&&!s.writing}function d(s,l){s._final(function(g){l.pendingcb--,g&&B(s,g),l.prefinished=!0,s.emit("prefinish"),b(s,l)})}function p(s,l){!l.prefinished&&!l.finalCalled&&(typeof s._final=="function"&&!l.destroyed?(l.pendingcb++,l.finalCalled=!0,V.nextTick(d,s,l)):(l.prefinished=!0,s.emit("prefinish")))}function b(s,l){var g=h(l);if(g&&(p(s,l),l.pendingcb===0&&(l.finished=!0,s.emit("finish"),l.autoDestroy))){var w=s._readableState;(!w||w.autoDestroy&&w.endEmitted)&&s.destroy()}return g}function R(s,l,g){l.ending=!0,b(s,l),g&&(l.finished?V.nextTick(g):s.once("finish",g)),l.ended=!0,s.writable=!1}function E(s,l,g){var w=s.entry;for(s.entry=null;w;){var I=w.callback;l.pendingcb--,I(g),w=w.next}l.corkedRequestsFree.next=s}return Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){this._writableState&&(this._writableState.destroyed=l)}}),U.prototype.destroy=_.destroy,U.prototype._undestroy=_.undestroy,U.prototype._destroy=function(s,l){l(s)},or}var sr,Nr;function Ce(){if(Nr)return sr;Nr=1;var e=Object.keys||function(v){var C=[];for(var j in v)C.push(j);return C};sr=u;var t=on(),r=nn();ue(u,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var f=n[o];u.prototype[f]||(u.prototype[f]=r.prototype[f])}function u(v){if(!(this instanceof u))return new u(v);t.call(this,v),r.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)))}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function c(){this._writableState.ended||V.nextTick(_,this)}function _(v){v.end()}return Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(C){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=C,this._writableState.destroyed=C)}}),sr}var yr={},gr={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Ye(),n=r.Buffer;function o(u,c){for(var _ in u)c[_]=u[_]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=f);function f(u,c,_){return n(u,c,_)}f.prototype=Object.create(n.prototype),o(n,f),f.from=function(u,c,_){if(typeof u=="number")throw new TypeError("Argument must not be a number");return n(u,c,_)},f.alloc=function(u,c,_){if(typeof u!="number")throw new TypeError("Argument must be a number");var v=n(u);return c!==void 0?typeof _=="string"?v.fill(c,_):v.fill(c):v.fill(0),v},f.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n(u)},f.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}})(gr,gr.exports);var ge=gr.exports,Er=ge.Buffer,Ir=Er.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Wn(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Gn(e){var t=Wn(e);if(typeof t!="string"&&(Er.isEncoding===Ir||!Ir(e)))throw new Error("Unknown encoding: "+e);return t||e}yr.StringDecoder=De;function De(e){this.encoding=Gn(e);var t;switch(this.encoding){case"utf16le":this.text=Qn,this.end=Zn,t=4;break;case"utf8":this.fillLast=Kn,t=4;break;case"base64":this.text=ei,this.end=ti,t=3;break;default:this.write=ri,this.end=ni;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Er.allocUnsafe(t)}De.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};De.prototype.end=Xn;De.prototype.text=Yn;De.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function fr(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Vn(e,t,r){var n=t.length-1;if(n<r)return 0;var o=fr(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=fr(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=fr(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}function Jn(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function Kn(e){var t=this.lastTotal-this.lastNeed,r=Jn(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Yn(e,t){var r=Vn(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Xn(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function Qn(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Zn(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function ei(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function ti(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function ri(e){return e.toString(this.encoding)}function ni(e){return e&&e.length?this.write(e):""}var jr=Se.codes.ERR_STREAM_PREMATURE_CLOSE;function ii(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function ai(){}function oi(e){return e.setHeader&&typeof e.abort=="function"}function an(e,t,r){if(typeof t=="function")return an(e,null,t);t||(t={}),r=ii(r||ai);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,f=function(){e.writable||c()},u=e._writableState&&e._writableState.finished,c=function(){o=!1,u=!0,n||r.call(e)},_=e._readableState&&e._readableState.endEmitted,v=function(){n=!1,_=!0,o||r.call(e)},C=function(O){r.call(e,O)},j=function(){var O;if(n&&!_)return(!e._readableState||!e._readableState.ended)&&(O=new jr),r.call(e,O);if(o&&!u)return(!e._writableState||!e._writableState.ended)&&(O=new jr),r.call(e,O)},m=function(){e.req.on("finish",c)};return oi(e)?(e.on("complete",c),e.on("abort",j),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",f),e.on("close",f)),e.on("end",v),e.on("finish",c),t.error!==!1&&e.on("error",C),e.on("close",j),function(){e.removeListener("complete",c),e.removeListener("abort",j),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("end",v),e.removeListener("error",C),e.removeListener("close",j)}}var Sr=an,ur,Lr;function si(){if(Lr)return ur;Lr=1;var e;function t(T,B,L){return B=r(B),B in T?Object.defineProperty(T,B,{value:L,enumerable:!0,configurable:!0,writable:!0}):T[B]=L,T}function r(T){var B=n(T,"string");return typeof B=="symbol"?B:String(B)}function n(T,B){if(typeof T!="object"||T===null)return T;var L=T[Symbol.toPrimitive];if(L!==void 0){var F=L.call(T,B||"default");if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(T)}var o=Sr,f=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),C=Symbol("handlePromise"),j=Symbol("stream");function m(T,B){return{value:T,done:B}}function M(T){var B=T[f];if(B!==null){var L=T[j].read();L!==null&&(T[v]=null,T[f]=null,T[u]=null,B(m(L,!1)))}}function O(T){V.nextTick(M,T)}function N(T,B){return function(L,F){T.then(function(){if(B[_]){L(m(void 0,!0));return}B[C](L,F)},F)}}var x=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((e={get stream(){return this[j]},next:function(){var B=this,L=this[c];if(L!==null)return Promise.reject(L);if(this[_])return Promise.resolve(m(void 0,!0));if(this[j].destroyed)return new Promise(function(D,X){V.nextTick(function(){B[c]?X(B[c]):D(m(void 0,!0))})});var F=this[v],G;if(F)G=new Promise(N(F,this));else{var U=this[j].read();if(U!==null)return Promise.resolve(m(U,!1));G=new Promise(this[C])}return this[v]=G,G}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var B=this;return new Promise(function(L,F){B[j].destroy(null,function(G){if(G){F(G);return}L(m(void 0,!0))})})}),e),x),P=function(B){var L,F=Object.create(S,(L={},t(L,j,{value:B,writable:!0}),t(L,f,{value:null,writable:!0}),t(L,u,{value:null,writable:!0}),t(L,c,{value:null,writable:!0}),t(L,_,{value:B._readableState.endEmitted,writable:!0}),t(L,C,{value:function(U,D){var X=F[j].read();X?(F[v]=null,F[f]=null,F[u]=null,U(m(X,!1))):(F[f]=U,F[u]=D)},writable:!0}),L));return F[v]=null,o(B,function(G){if(G&&G.code!=="ERR_STREAM_PREMATURE_CLOSE"){var U=F[u];U!==null&&(F[v]=null,F[f]=null,F[u]=null,U(G)),F[c]=G;return}var D=F[f];D!==null&&(F[v]=null,F[f]=null,F[u]=null,D(m(void 0,!0))),F[_]=!0}),B.on("readable",O.bind(null,F)),F};return ur=P,ur}var lr,Dr;function fi(){return Dr||(Dr=1,lr=function(){throw new Error("Readable.from is not available in the browser")}),lr}var cr,Fr;function on(){if(Fr)return cr;Fr=1,cr=D;var e;D.ReadableState=U,mr.EventEmitter;var t=function(a,y){return a.listeners(y).length},r=Zr,n=Ye().Buffer,o=(typeof ne<"u"?ne:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(i){return n.from(i)}function u(i){return n.isBuffer(i)||i instanceof o}var c=Qr,_;c&&c.debuglog?_=c.debuglog("stream"):_=function(){};var v=Bn(),C=en,j=rn,m=j.getHighWaterMark,M=Se.codes,O=M.ERR_INVALID_ARG_TYPE,N=M.ERR_STREAM_PUSH_AFTER_EOF,x=M.ERR_METHOD_NOT_IMPLEMENTED,S=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,T,B;ue(D,r);var L=C.errorOrDestroy,F=["error","close","destroy","pause","resume"];function G(i,a,y){if(typeof i.prependListener=="function")return i.prependListener(a,y);!i._events||!i._events[a]?i.on(a,y):Array.isArray(i._events[a])?i._events[a].unshift(y):i._events[a]=[y,i._events[a]]}function U(i,a,y){e=e||Ce(),i=i||{},typeof y!="boolean"&&(y=a instanceof e),this.objectMode=!!i.objectMode,y&&(this.objectMode=this.objectMode||!!i.readableObjectMode),this.highWaterMark=m(this,i,"readableHighWaterMark",y),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=i.emitClose!==!1,this.autoDestroy=!!i.autoDestroy,this.destroyed=!1,this.defaultEncoding=i.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,i.encoding&&(P||(P=yr.StringDecoder),this.decoder=new P(i.encoding),this.encoding=i.encoding)}function D(i){if(e=e||Ce(),!(this instanceof D))return new D(i);var a=this instanceof e;this._readableState=new U(i,this,a),this.readable=!0,i&&(typeof i.read=="function"&&(this._read=i.read),typeof i.destroy=="function"&&(this._destroy=i.destroy)),r.call(this)}Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),D.prototype.destroy=C.destroy,D.prototype._undestroy=C.undestroy,D.prototype._destroy=function(i,a){a(i)},D.prototype.push=function(i,a){var y=this._readableState,A;return y.objectMode?A=!0:typeof i=="string"&&(a=a||y.defaultEncoding,a!==y.encoding&&(i=n.from(i,a),a=""),A=!0),X(this,i,a,!1,A)},D.prototype.unshift=function(i){return X(this,i,null,!0,!1)};function X(i,a,y,A,W){_("readableAddChunk",a);var k=i._readableState;if(a===null)k.reading=!1,H(i,k);else{var z;if(W||(z=ae(k,a)),z)L(i,z);else if(k.objectMode||a&&a.length>0)if(typeof a!="string"&&!k.objectMode&&Object.getPrototypeOf(a)!==n.prototype&&(a=f(a)),A)k.endEmitted?L(i,new S):ie(i,k,a,!0);else if(k.ended)L(i,new N);else{if(k.destroyed)return!1;k.reading=!1,k.decoder&&!y?(a=k.decoder.write(a),k.objectMode||a.length!==0?ie(i,k,a,!1):K(i,k)):ie(i,k,a,!1)}else A||(k.reading=!1,K(i,k))}return!k.ended&&(k.length<k.highWaterMark||k.length===0)}function ie(i,a,y,A){a.flowing&&a.length===0&&!a.sync?(a.awaitDrain=0,i.emit("data",y)):(a.length+=a.objectMode?1:y.length,A?a.buffer.unshift(y):a.buffer.push(y),a.needReadable&&ee(i)),K(i,a)}function ae(i,a){var y;return!u(a)&&typeof a!="string"&&a!==void 0&&!i.objectMode&&(y=new O("chunk",["string","Buffer","Uint8Array"],a)),y}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(i){P||(P=yr.StringDecoder);var a=new P(i);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;for(var y=this._readableState.buffer.head,A="";y!==null;)A+=a.write(y.data),y=y.next;return this._readableState.buffer.clear(),A!==""&&this._readableState.buffer.push(A),this._readableState.length=A.length,this};var J=1073741824;function Q(i){return i>=J?i=J:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i}function Z(i,a){return i<=0||a.length===0&&a.ended?0:a.objectMode?1:i!==i?a.flowing&&a.length?a.buffer.head.data.length:a.length:(i>a.highWaterMark&&(a.highWaterMark=Q(i)),i<=a.length?i:a.ended?a.length:(a.needReadable=!0,0))}D.prototype.read=function(i){_("read",i),i=parseInt(i,10);var a=this._readableState,y=i;if(i!==0&&(a.emittedReadable=!1),i===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended))return _("read: emitReadable",a.length,a.ended),a.length===0&&a.ended?g(this):ee(this),null;if(i=Z(i,a),i===0&&a.ended)return a.length===0&&g(this),null;var A=a.needReadable;_("need readable",A),(a.length===0||a.length-i<a.highWaterMark)&&(A=!0,_("length less than watermark",A)),a.ended||a.reading?(A=!1,_("reading or ended",A)):A&&(_("do read"),a.reading=!0,a.sync=!0,a.length===0&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1,a.reading||(i=Z(y,a)));var W;return i>0?W=l(i,a):W=null,W===null?(a.needReadable=a.length<=a.highWaterMark,i=0):(a.length-=i,a.awaitDrain=0),a.length===0&&(a.ended||(a.needReadable=!0),y!==i&&a.ended&&g(this)),W!==null&&this.emit("data",W),W};function H(i,a){if(_("onEofChunk"),!a.ended){if(a.decoder){var y=a.decoder.end();y&&y.length&&(a.buffer.push(y),a.length+=a.objectMode?1:y.length)}a.ended=!0,a.sync?ee(i):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,re(i)))}}function ee(i){var a=i._readableState;_("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(_("emitReadable",a.flowing),a.emittedReadable=!0,V.nextTick(re,i))}function re(i){var a=i._readableState;_("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&(a.length||a.ended)&&(i.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,s(i)}function K(i,a){a.readingMore||(a.readingMore=!0,V.nextTick(h,i,a))}function h(i,a){for(;!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0);){var y=a.length;if(_("maybeReadMore read 0"),i.read(0),y===a.length)break}a.readingMore=!1}D.prototype._read=function(i){L(this,new x("_read()"))},D.prototype.pipe=function(i,a){var y=this,A=this._readableState;switch(A.pipesCount){case 0:A.pipes=i;break;case 1:A.pipes=[A.pipes,i];break;default:A.pipes.push(i);break}A.pipesCount+=1,_("pipe count=%d opts=%j",A.pipesCount,a);var W=(!a||a.end!==!1)&&i!==V.stdout&&i!==V.stderr,k=W?ce:pe;A.endEmitted?V.nextTick(k):y.once("end",k),i.on("unpipe",z);function z(he,le){_("onunpipe"),he===y&&le&&le.hasUnpiped===!1&&(le.hasUnpiped=!0,We())}function ce(){_("onend"),i.end()}var ve=d(y);i.on("drain",ve);var Be=!1;function We(){_("cleanup"),i.removeListener("close",Ae),i.removeListener("finish",Te),i.removeListener("drain",ve),i.removeListener("error",xe),i.removeListener("unpipe",z),y.removeListener("end",ce),y.removeListener("end",pe),y.removeListener("data",Ne),Be=!0,A.awaitDrain&&(!i._writableState||i._writableState.needDrain)&&ve()}y.on("data",Ne);function Ne(he){_("ondata");var le=i.write(he);_("dest.write",le),le===!1&&((A.pipesCount===1&&A.pipes===i||A.pipesCount>1&&I(A.pipes,i)!==-1)&&!Be&&(_("false write response, pause",A.awaitDrain),A.awaitDrain++),y.pause())}function xe(he){_("onerror",he),pe(),i.removeListener("error",xe),t(i,"error")===0&&L(i,he)}G(i,"error",xe);function Ae(){i.removeListener("finish",Te),pe()}i.once("close",Ae);function Te(){_("onfinish"),i.removeListener("close",Ae),pe()}i.once("finish",Te);function pe(){_("unpipe"),y.unpipe(i)}return i.emit("pipe",y),A.flowing||(_("pipe resume"),y.resume()),i};function d(i){return function(){var y=i._readableState;_("pipeOnDrain",y.awaitDrain),y.awaitDrain&&y.awaitDrain--,y.awaitDrain===0&&t(i,"data")&&(y.flowing=!0,s(i))}}D.prototype.unpipe=function(i){var a=this._readableState,y={hasUnpiped:!1};if(a.pipesCount===0)return this;if(a.pipesCount===1)return i&&i!==a.pipes?this:(i||(i=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,i&&i.emit("unpipe",this,y),this);if(!i){var A=a.pipes,W=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var k=0;k<W;k++)A[k].emit("unpipe",this,{hasUnpiped:!1});return this}var z=I(a.pipes,i);return z===-1?this:(a.pipes.splice(z,1),a.pipesCount-=1,a.pipesCount===1&&(a.pipes=a.pipes[0]),i.emit("unpipe",this,y),this)},D.prototype.on=function(i,a){var y=r.prototype.on.call(this,i,a),A=this._readableState;return i==="data"?(A.readableListening=this.listenerCount("readable")>0,A.flowing!==!1&&this.resume()):i==="readable"&&!A.endEmitted&&!A.readableListening&&(A.readableListening=A.needReadable=!0,A.flowing=!1,A.emittedReadable=!1,_("on readable",A.length,A.reading),A.length?ee(this):A.reading||V.nextTick(b,this)),y},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(i,a){var y=r.prototype.removeListener.call(this,i,a);return i==="readable"&&V.nextTick(p,this),y},D.prototype.removeAllListeners=function(i){var a=r.prototype.removeAllListeners.apply(this,arguments);return(i==="readable"||i===void 0)&&V.nextTick(p,this),a};function p(i){var a=i._readableState;a.readableListening=i.listenerCount("readable")>0,a.resumeScheduled&&!a.paused?a.flowing=!0:i.listenerCount("data")>0&&i.resume()}function b(i){_("readable nexttick read 0"),i.read(0)}D.prototype.resume=function(){var i=this._readableState;return i.flowing||(_("resume"),i.flowing=!i.readableListening,R(this,i)),i.paused=!1,this};function R(i,a){a.resumeScheduled||(a.resumeScheduled=!0,V.nextTick(E,i,a))}function E(i,a){_("resume",a.reading),a.reading||i.read(0),a.resumeScheduled=!1,i.emit("resume"),s(i),a.flowing&&!a.reading&&i.read(0)}D.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function s(i){var a=i._readableState;for(_("flow",a.flowing);a.flowing&&i.read()!==null;);}D.prototype.wrap=function(i){var a=this,y=this._readableState,A=!1;i.on("end",function(){if(_("wrapped end"),y.decoder&&!y.ended){var z=y.decoder.end();z&&z.length&&a.push(z)}a.push(null)}),i.on("data",function(z){if(_("wrapped data"),y.decoder&&(z=y.decoder.write(z)),!(y.objectMode&&z==null)&&!(!y.objectMode&&(!z||!z.length))){var ce=a.push(z);ce||(A=!0,i.pause())}});for(var W in i)this[W]===void 0&&typeof i[W]=="function"&&(this[W]=function(ce){return function(){return i[ce].apply(i,arguments)}}(W));for(var k=0;k<F.length;k++)i.on(F[k],this.emit.bind(this,F[k]));return this._read=function(z){_("wrapped _read",z),A&&(A=!1,i.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=si()),T(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(a){this._readableState&&(this._readableState.flowing=a)}}),D._fromList=l,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function l(i,a){if(a.length===0)return null;var y;return a.objectMode?y=a.buffer.shift():!i||i>=a.length?(a.decoder?y=a.buffer.join(""):a.buffer.length===1?y=a.buffer.first():y=a.buffer.concat(a.length),a.buffer.clear()):y=a.buffer.consume(i,a.decoder),y}function g(i){var a=i._readableState;_("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,V.nextTick(w,a,i))}function w(i,a){if(_("endReadableNT",i.endEmitted,i.length),!i.endEmitted&&i.length===0&&(i.endEmitted=!0,a.readable=!1,a.emit("end"),i.autoDestroy)){var y=a._writableState;(!y||y.autoDestroy&&y.finished)&&a.destroy()}}typeof Symbol=="function"&&(D.from=function(i,a){return B===void 0&&(B=fi()),B(D,i,a)});function I(i,a){for(var y=0,A=i.length;y<A;y++)if(i[y]===a)return y;return-1}return cr}var sn=_e,Xe=Se.codes,ui=Xe.ERR_METHOD_NOT_IMPLEMENTED,li=Xe.ERR_MULTIPLE_CALLBACK,ci=Xe.ERR_TRANSFORM_ALREADY_TRANSFORMING,hi=Xe.ERR_TRANSFORM_WITH_LENGTH_0,Qe=Ce();ue(_e,Qe);function di(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new li);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function _e(e){if(!(this instanceof _e))return new _e(e);Qe.call(this,e),this._transformState={afterTransform:di.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",_i)}function _i(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){kr(e,t,r)}):kr(this,null,null)}_e.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qe.prototype.push.call(this,e,t)};_e.prototype._transform=function(e,t,r){r(new ui("_transform()"))};_e.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};_e.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};_e.prototype._destroy=function(e,t){Qe.prototype._destroy.call(this,e,function(r){t(r)})};function kr(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new hi;if(e._transformState.transforming)throw new ci;return e.push(null)}var pi=je,fn=sn;ue(je,fn);function je(e){if(!(this instanceof je))return new je(e);fn.call(this,e)}je.prototype._transform=function(e,t,r){r(null,e)};var hr;function bi(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var un=Se.codes,yi=un.ERR_MISSING_ARGS,gi=un.ERR_STREAM_DESTROYED;function qr(e){if(e)throw e}function vi(e){return e.setHeader&&typeof e.abort=="function"}function wi(e,t,r,n){n=bi(n);var o=!1;e.on("close",function(){o=!0}),hr===void 0&&(hr=Sr),hr(e,{readable:t,writable:r},function(u){if(u)return n(u);o=!0,n()});var f=!1;return function(u){if(!o&&!f){if(f=!0,vi(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(u||new gi("pipe"))}}}function Ur(e){e()}function mi(e,t){return e.pipe(t)}function Ei(e){return!e.length||typeof e[e.length-1]!="function"?qr:e.pop()}function Si(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ei(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new yi("streams");var o,f=t.map(function(u,c){var _=c<t.length-1,v=c>0;return wi(u,_,v,function(C){o||(o=C),C&&f.forEach(Ur),!_&&(f.forEach(Ur),n(o))})});return t.reduce(mi)}var Ri=Si;(function(e,t){t=e.exports=on(),t.Stream=t,t.Readable=t,t.Writable=nn(),t.Duplex=Ce(),t.Transform=sn,t.PassThrough=pi,t.finished=Sr,t.pipeline=Ri})(pr,pr.exports);var ln=pr.exports;const{Transform:xi}=ln;var Ai=e=>class cn extends xi{constructor(r,n,o,f,u){super(u),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._hashBitLength=f,this._options=u,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let f=null;try{this.update(r,n)}catch(u){f=u}o(f)}_flush(r){let n=null;try{this.push(this.digest())}catch(o){n=o}r(n)}update(r,n){if(!me.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return me.isBuffer(r)||(r=me.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new cn(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Ti}=ln;var Oi=e=>class hn extends Ti{constructor(r,n,o,f){super(f),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._options=f,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let f=null;try{this.update(r,n)}catch(u){f=u}o(f)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!me.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return me.isBuffer(r)||(r=me.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return n!==void 0&&(o=o.toString(n)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new hn(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Ci=Ai,Mi=Oi;var Pi=function(e){const t=Ci(e),r=Mi(e);return function(n,o){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,o);case"keccak256":return new t(1088,512,null,256,o);case"keccak384":return new t(832,768,null,384,o);case"keccak512":return new t(576,1024,null,512,o);case"sha3-224":return new t(1152,448,6,224,o);case"sha3-256":return new t(1088,512,6,256,o);case"sha3-384":return new t(832,768,6,384,o);case"sha3-512":return new t(576,1024,6,512,o);case"shake128":return new r(1344,256,31,o);case"shake256":return new r(1088,512,31,o);default:throw new Error("Invald algorithm: "+n)}}},dn={};const Hr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];dn.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],f=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],_=e[6]^e[16]^e[26]^e[36]^e[46],v=e[7]^e[17]^e[27]^e[37]^e[47],C=e[8]^e[18]^e[28]^e[38]^e[48],j=e[9]^e[19]^e[29]^e[39]^e[49];let m=C^(o<<1|f>>>31),M=j^(f<<1|o>>>31);const O=e[0]^m,N=e[1]^M,x=e[10]^m,S=e[11]^M,P=e[20]^m,T=e[21]^M,B=e[30]^m,L=e[31]^M,F=e[40]^m,G=e[41]^M;m=r^(u<<1|c>>>31),M=n^(c<<1|u>>>31);const U=e[2]^m,D=e[3]^M,X=e[12]^m,ie=e[13]^M,ae=e[22]^m,J=e[23]^M,Q=e[32]^m,Z=e[33]^M,H=e[42]^m,ee=e[43]^M;m=o^(_<<1|v>>>31),M=f^(v<<1|_>>>31);const re=e[4]^m,K=e[5]^M,h=e[14]^m,d=e[15]^M,p=e[24]^m,b=e[25]^M,R=e[34]^m,E=e[35]^M,s=e[44]^m,l=e[45]^M;m=u^(C<<1|j>>>31),M=c^(j<<1|C>>>31);const g=e[6]^m,w=e[7]^M,I=e[16]^m,i=e[17]^M,a=e[26]^m,y=e[27]^M,A=e[36]^m,W=e[37]^M,k=e[46]^m,z=e[47]^M;m=_^(r<<1|n>>>31),M=v^(n<<1|r>>>31);const ce=e[8]^m,ve=e[9]^M,Be=e[18]^m,We=e[19]^M,Ne=e[28]^m,xe=e[29]^M,Ae=e[38]^m,Te=e[39]^M,pe=e[48]^m,he=e[49]^M,le=O,ut=N,lt=S<<4|x>>>28,ct=x<<4|S>>>28,ht=P<<3|T>>>29,dt=T<<3|P>>>29,_t=L<<9|B>>>23,pt=B<<9|L>>>23,bt=F<<18|G>>>14,yt=G<<18|F>>>14,gt=U<<1|D>>>31,vt=D<<1|U>>>31,wt=ie<<12|X>>>20,mt=X<<12|ie>>>20,Et=ae<<10|J>>>22,St=J<<10|ae>>>22,Rt=Z<<13|Q>>>19,xt=Q<<13|Z>>>19,At=H<<2|ee>>>30,Tt=ee<<2|H>>>30,Ot=K<<30|re>>>2,Ct=re<<30|K>>>2,Mt=h<<6|d>>>26,Pt=d<<6|h>>>26,Bt=b<<11|p>>>21,Nt=p<<11|b>>>21,It=R<<15|E>>>17,jt=E<<15|R>>>17,Lt=l<<29|s>>>3,Dt=s<<29|l>>>3,Ft=g<<28|w>>>4,kt=w<<28|g>>>4,qt=i<<23|I>>>9,Ut=I<<23|i>>>9,Ht=a<<25|y>>>7,$t=y<<25|a>>>7,zt=A<<21|W>>>11,Wt=W<<21|A>>>11,Gt=z<<24|k>>>8,Vt=k<<24|z>>>8,Jt=ce<<27|ve>>>5,Kt=ve<<27|ce>>>5,Yt=Be<<20|We>>>12,Xt=We<<20|Be>>>12,Qt=xe<<7|Ne>>>25,Zt=Ne<<7|xe>>>25,er=Ae<<8|Te>>>24,tr=Te<<8|Ae>>>24,rr=pe<<14|he>>>18,nr=he<<14|pe>>>18;e[0]=le^~wt&Bt,e[1]=ut^~mt&Nt,e[10]=Ft^~Yt&ht,e[11]=kt^~Xt&dt,e[20]=gt^~Mt&Ht,e[21]=vt^~Pt&$t,e[30]=Jt^~lt&Et,e[31]=Kt^~ct&St,e[40]=Ot^~qt&Qt,e[41]=Ct^~Ut&Zt,e[2]=wt^~Bt&zt,e[3]=mt^~Nt&Wt,e[12]=Yt^~ht&Rt,e[13]=Xt^~dt&xt,e[22]=Mt^~Ht&er,e[23]=Pt^~$t&tr,e[32]=lt^~Et&It,e[33]=ct^~St&jt,e[42]=qt^~Qt&_t,e[43]=Ut^~Zt&pt,e[4]=Bt^~zt&rr,e[5]=Nt^~Wt&nr,e[14]=ht^~Rt&Lt,e[15]=dt^~xt&Dt,e[24]=Ht^~er&bt,e[25]=$t^~tr&yt,e[34]=Et^~It&Gt,e[35]=St^~jt&Vt,e[44]=Qt^~_t&At,e[45]=Zt^~pt&Tt,e[6]=zt^~rr&le,e[7]=Wt^~nr&ut,e[16]=Rt^~Lt&Ft,e[17]=xt^~Dt&kt,e[26]=er^~bt&gt,e[27]=tr^~yt&vt,e[36]=It^~Gt&Jt,e[37]=jt^~Vt&Kt,e[46]=_t^~At&Ot,e[47]=pt^~Tt&Ct,e[8]=rr^~le&wt,e[9]=nr^~ut&mt,e[18]=Lt^~Ft&Yt,e[19]=Dt^~kt&Xt,e[28]=bt^~gt&Mt,e[29]=yt^~vt&Pt,e[38]=Gt^~Jt&lt,e[39]=Vt^~Kt&ct,e[48]=At^~Ot&qt,e[49]=Tt^~Ct&Ut,e[0]^=Hr[t*2],e[1]^=Hr[t*2+1]}};const Je=dn;function Me(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Me.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Me.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(Je.p1600(this.state),this.count=0)};Me.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&Je.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Je.p1600(this.state),this.count=0,this.squeezing=!0};Me.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=me.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Je.p1600(this.state),this.count=0);return t};Me.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var Bi=Me,io=Pi(Bi),_n={exports:{}},pn=ge.Buffer;function Ze(e,t){this._block=pn.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Ze.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=pn.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,f=this._len,u=0;u<o;){for(var c=f%n,_=Math.min(o-u,n-c),v=0;v<_;v++)r[c+v]=e[u+v];f+=_,u+=_,f%n===0&&this._update(r)}return this._len+=o,this};Ze.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var f=this._hash();return e?f.toString(e):f};Ze.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Pe=Ze,Ni=ue,bn=Pe,Ii=ge.Buffer,ji=[1518500249,1859775393,-1894007588,-899497514],Li=new Array(80);function Fe(){this.init(),this._w=Li,bn.call(this,64,56)}Ni(Fe,bn);Fe.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Di(e){return e<<5|e>>>27}function Fi(e){return e<<30|e>>>2}function ki(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Fe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var _=0;_<80;++_){var v=~~(_/20),C=Di(r)+ki(v,n,o,f)+u+t[_]+ji[v]|0;u=f,f=o,o=Fi(n),n=r,r=C}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0};Fe.prototype._hash=function(){var e=Ii.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var qi=Fe,Ui=ue,yn=Pe,Hi=ge.Buffer,$i=[1518500249,1859775393,-1894007588,-899497514],zi=new Array(80);function ke(){this.init(),this._w=zi,yn.call(this,64,56)}Ui(ke,yn);ke.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Wi(e){return e<<1|e>>>31}function Gi(e){return e<<5|e>>>27}function Vi(e){return e<<30|e>>>2}function Ji(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}ke.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=Wi(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var _=0;_<80;++_){var v=~~(_/20),C=Gi(r)+Ji(v,n,o,f)+u+t[_]+$i[v]|0;u=f,f=o,o=Vi(n),n=r,r=C}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0};ke.prototype._hash=function(){var e=Hi.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Ki=ke,Yi=ue,gn=Pe,Xi=ge.Buffer,Qi=[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],Zi=new Array(64);function qe(){this.init(),this._w=Zi,gn.call(this,64,56)}Yi(qe,gn);qe.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function ea(e,t,r){return r^e&(t^r)}function ta(e,t,r){return e&t|r&(e|t)}function ra(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function na(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ia(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function aa(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}qe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,f=this._d|0,u=this._e|0,c=this._f|0,_=this._g|0,v=this._h|0,C=0;C<16;++C)t[C]=e.readInt32BE(C*4);for(;C<64;++C)t[C]=aa(t[C-2])+t[C-7]+ia(t[C-15])+t[C-16]|0;for(var j=0;j<64;++j){var m=v+na(u)+ea(u,c,_)+Qi[j]+t[j]|0,M=ra(r)+ta(r,n,o)|0;v=_,_=c,c=u,u=f+m|0,f=o,o=n,n=r,r=m+M|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=f+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=_+this._g|0,this._h=v+this._h|0};qe.prototype._hash=function(){var e=Xi.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var vn=qe,oa=ue,sa=vn,fa=Pe,ua=ge.Buffer,la=new Array(64);function et(){this.init(),this._w=la,fa.call(this,64,56)}oa(et,sa);et.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};et.prototype._hash=function(){var e=ua.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var ca=et,ha=ue,wn=Pe,da=ge.Buffer,$r=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_a=new Array(160);function Ue(){this.init(),this._w=_a,wn.call(this,128,112)}ha(Ue,wn);Ue.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function zr(e,t,r){return r^e&(t^r)}function Wr(e,t,r){return e&t|r&(e|t)}function Gr(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Vr(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function pa(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function ba(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function ya(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function ga(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Y(e,t){return e>>>0<t>>>0?1:0}Ue.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,o=this._ch|0,f=this._dh|0,u=this._eh|0,c=this._fh|0,_=this._gh|0,v=this._hh|0,C=this._al|0,j=this._bl|0,m=this._cl|0,M=this._dl|0,O=this._el|0,N=this._fl|0,x=this._gl|0,S=this._hl|0,P=0;P<32;P+=2)t[P]=e.readInt32BE(P*4),t[P+1]=e.readInt32BE(P*4+4);for(;P<160;P+=2){var T=t[P-30],B=t[P-15*2+1],L=pa(T,B),F=ba(B,T);T=t[P-2*2],B=t[P-2*2+1];var G=ya(T,B),U=ga(B,T),D=t[P-7*2],X=t[P-7*2+1],ie=t[P-16*2],ae=t[P-16*2+1],J=F+X|0,Q=L+D+Y(J,F)|0;J=J+U|0,Q=Q+G+Y(J,U)|0,J=J+ae|0,Q=Q+ie+Y(J,ae)|0,t[P]=Q,t[P+1]=J}for(var Z=0;Z<160;Z+=2){Q=t[Z],J=t[Z+1];var H=Wr(r,n,o),ee=Wr(C,j,m),re=Gr(r,C),K=Gr(C,r),h=Vr(u,O),d=Vr(O,u),p=$r[Z],b=$r[Z+1],R=zr(u,c,_),E=zr(O,N,x),s=S+d|0,l=v+h+Y(s,S)|0;s=s+E|0,l=l+R+Y(s,E)|0,s=s+b|0,l=l+p+Y(s,b)|0,s=s+J|0,l=l+Q+Y(s,J)|0;var g=K+ee|0,w=re+H+Y(g,K)|0;v=_,S=x,_=c,x=N,c=u,N=O,O=M+s|0,u=f+l+Y(O,M)|0,f=o,M=m,o=n,m=j,n=r,j=C,C=s+g|0,r=l+w+Y(C,s)|0}this._al=this._al+C|0,this._bl=this._bl+j|0,this._cl=this._cl+m|0,this._dl=this._dl+M|0,this._el=this._el+O|0,this._fl=this._fl+N|0,this._gl=this._gl+x|0,this._hl=this._hl+S|0,this._ah=this._ah+r+Y(this._al,C)|0,this._bh=this._bh+n+Y(this._bl,j)|0,this._ch=this._ch+o+Y(this._cl,m)|0,this._dh=this._dh+f+Y(this._dl,M)|0,this._eh=this._eh+u+Y(this._el,O)|0,this._fh=this._fh+c+Y(this._fl,N)|0,this._gh=this._gh+_+Y(this._gl,x)|0,this._hh=this._hh+v+Y(this._hl,S)|0};Ue.prototype._hash=function(){var e=da.allocUnsafe(64);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var mn=Ue,va=ue,wa=mn,ma=Pe,Ea=ge.Buffer,Sa=new Array(160);function tt(){this.init(),this._w=Sa,ma.call(this,128,112)}va(tt,wa);tt.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};tt.prototype._hash=function(){var e=Ea.allocUnsafe(48);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Ra=tt,Re=_n.exports=function(t){t=t.toLowerCase();var r=Re[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};Re.sha=qi;Re.sha1=Ki;Re.sha224=ca;Re.sha256=vn;Re.sha384=Ra;Re.sha512=mn;var ao=_n.exports;const Jr=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let o=0;o<arguments.length;o++)n[o]=arguments[o];return new r((o,f)=>{t.errorFirst?n.push(function(u,c){if(t.multiArgs){const _=new Array(arguments.length-1);for(let v=1;v<arguments.length;v++)_[v-1]=arguments[v];u?(_.unshift(u),f(_)):o(_)}else u?f(u):o(c)}):n.push(function(u){if(t.multiArgs){const c=new Array(arguments.length-1);for(let _=0;_<arguments.length;_++)c[_]=arguments[_];o(c)}else o(u)}),e.apply(this,n)})};var oo=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=o=>{const f=u=>typeof u=="string"?o===u:u.test(o);return t.include?t.include.some(f):!t.exclude.some(f)};let n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):Jr(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(const o in e){const f=e[o];n[o]=typeof f=="function"&&r(o)?Jr(f,t):f}return n},xa=Ta,Aa=Object.prototype.hasOwnProperty;function Ta(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Aa.call(r,n)&&(e[n]=r[n])}return e}var Oa=Ca;function Ca(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const Ma=xa,Pa=Oa();var so=q;function q(e){const t=this;t.currentProvider=e}q.prototype.getBalance=He(2,"eth_getBalance");q.prototype.getCode=He(2,"eth_getCode");q.prototype.getTransactionCount=He(2,"eth_getTransactionCount");q.prototype.getStorageAt=He(3,"eth_getStorageAt");q.prototype.call=He(2,"eth_call");q.prototype.protocolVersion=$("eth_protocolVersion");q.prototype.syncing=$("eth_syncing");q.prototype.coinbase=$("eth_coinbase");q.prototype.mining=$("eth_mining");q.prototype.hashrate=$("eth_hashrate");q.prototype.gasPrice=$("eth_gasPrice");q.prototype.accounts=$("eth_accounts");q.prototype.blockNumber=$("eth_blockNumber");q.prototype.getBlockTransactionCountByHash=$("eth_getBlockTransactionCountByHash");q.prototype.getBlockTransactionCountByNumber=$("eth_getBlockTransactionCountByNumber");q.prototype.getUncleCountByBlockHash=$("eth_getUncleCountByBlockHash");q.prototype.getUncleCountByBlockNumber=$("eth_getUncleCountByBlockNumber");q.prototype.sign=$("eth_sign");q.prototype.sendTransaction=$("eth_sendTransaction");q.prototype.sendRawTransaction=$("eth_sendRawTransaction");q.prototype.estimateGas=$("eth_estimateGas");q.prototype.getBlockByHash=$("eth_getBlockByHash");q.prototype.getBlockByNumber=$("eth_getBlockByNumber");q.prototype.getTransactionByHash=$("eth_getTransactionByHash");q.prototype.getTransactionByBlockHashAndIndex=$("eth_getTransactionByBlockHashAndIndex");q.prototype.getTransactionByBlockNumberAndIndex=$("eth_getTransactionByBlockNumberAndIndex");q.prototype.getTransactionReceipt=$("eth_getTransactionReceipt");q.prototype.getUncleByBlockHashAndIndex=$("eth_getUncleByBlockHashAndIndex");q.prototype.getUncleByBlockNumberAndIndex=$("eth_getUncleByBlockNumberAndIndex");q.prototype.getCompilers=$("eth_getCompilers");q.prototype.compileLLL=$("eth_compileLLL");q.prototype.compileSolidity=$("eth_compileSolidity");q.prototype.compileSerpent=$("eth_compileSerpent");q.prototype.newFilter=$("eth_newFilter");q.prototype.newBlockFilter=$("eth_newBlockFilter");q.prototype.newPendingTransactionFilter=$("eth_newPendingTransactionFilter");q.prototype.uninstallFilter=$("eth_uninstallFilter");q.prototype.getFilterChanges=$("eth_getFilterChanges");q.prototype.getFilterLogs=$("eth_getFilterLogs");q.prototype.getLogs=$("eth_getLogs");q.prototype.getWork=$("eth_getWork");q.prototype.submitWork=$("eth_submitWork");q.prototype.submitHashrate=$("eth_submitHashrate");q.prototype.sendAsync=function(e,t){this.currentProvider.sendAsync(Ba(e),function(n,o){if(!n&&o.error&&(n=new Error("EthQuery - RPC Error - "+o.error.message)),n)return t(n);t(null,o.result)})};function $(e){return function(){const t=this;var r=[].slice.call(arguments),n=r.pop();t.sendAsync({method:e,params:r},n)}}function He(e,t){return function(){const r=this;var n=[].slice.call(arguments),o=n.pop();n.length<e&&n.push("latest"),r.sendAsync({method:t,params:n},o)}}function Ba(e){return Ma({id:Pa(),jsonrpc:"2.0",params:[]},e)}var Na={},Rr={},En={exports:{}};(function(e){var t,r,n,o,f,u,c,_,v,C,j,m,M,O,N,x,S,P,T,B,L,F,G,U,D,X,ie,ae,J,Q,Z;(function(H){var ee=typeof ne=="object"?ne:typeof self=="object"?self:typeof this=="object"?this:{};H(re(ee,re(e.exports)));function re(K,h){return K!==ee&&(typeof Object.create=="function"?Object.defineProperty(K,"__esModule",{value:!0}):K.__esModule=!0),function(d,p){return K[d]=h?h(d,p):p}}})(function(H){var ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(h[p]=d[p])};t=function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");ee(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)},r=Object.assign||function(h){for(var d,p=1,b=arguments.length;p<b;p++){d=arguments[p];for(var R in d)Object.prototype.hasOwnProperty.call(d,R)&&(h[R]=d[R])}return h},n=function(h,d){var p={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&d.indexOf(b)<0&&(p[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,b=Object.getOwnPropertySymbols(h);R<b.length;R++)d.indexOf(b[R])<0&&Object.prototype.propertyIsEnumerable.call(h,b[R])&&(p[b[R]]=h[b[R]]);return p},o=function(h,d,p,b){var R=arguments.length,E=R<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,p):b,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,d,p,b);else for(var l=h.length-1;l>=0;l--)(s=h[l])&&(E=(R<3?s(E):R>3?s(d,p,E):s(d,p))||E);return R>3&&E&&Object.defineProperty(d,p,E),E},f=function(h,d){return function(p,b){d(p,b,h)}},u=function(h,d,p,b,R,E){function s(z){if(z!==void 0&&typeof z!="function")throw new TypeError("Function expected");return z}for(var l=b.kind,g=l==="getter"?"get":l==="setter"?"set":"value",w=!d&&h?b.static?h:h.prototype:null,I=d||(w?Object.getOwnPropertyDescriptor(w,b.name):{}),i,a=!1,y=p.length-1;y>=0;y--){var A={};for(var W in b)A[W]=W==="access"?{}:b[W];for(var W in b.access)A.access[W]=b.access[W];A.addInitializer=function(z){if(a)throw new TypeError("Cannot add initializers after decoration has completed");E.push(s(z||null))};var k=(0,p[y])(l==="accessor"?{get:I.get,set:I.set}:I[g],A);if(l==="accessor"){if(k===void 0)continue;if(k===null||typeof k!="object")throw new TypeError("Object expected");(i=s(k.get))&&(I.get=i),(i=s(k.set))&&(I.set=i),(i=s(k.init))&&R.unshift(i)}else(i=s(k))&&(l==="field"?R.unshift(i):I[g]=i)}w&&Object.defineProperty(w,b.name,I),a=!0},c=function(h,d,p){for(var b=arguments.length>2,R=0;R<d.length;R++)p=b?d[R].call(h,p):d[R].call(h);return b?p:void 0},_=function(h){return typeof h=="symbol"?h:"".concat(h)},v=function(h,d,p){return typeof d=="symbol"&&(d=d.description?"[".concat(d.description,"]"):""),Object.defineProperty(h,"name",{configurable:!0,value:p?"".concat(p," ",d):d})},C=function(h,d){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(h,d)},j=function(h,d,p,b){function R(E){return E instanceof p?E:new p(function(s){s(E)})}return new(p||(p=Promise))(function(E,s){function l(I){try{w(b.next(I))}catch(i){s(i)}}function g(I){try{w(b.throw(I))}catch(i){s(i)}}function w(I){I.done?E(I.value):R(I.value).then(l,g)}w((b=b.apply(h,d||[])).next())})},m=function(h,d){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},b,R,E,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(w){return function(I){return g([w,I])}}function g(w){if(b)throw new TypeError("Generator is already executing.");for(;s&&(s=0,w[0]&&(p=0)),p;)try{if(b=1,R&&(E=w[0]&2?R.return:w[0]?R.throw||((E=R.return)&&E.call(R),0):R.next)&&!(E=E.call(R,w[1])).done)return E;switch(R=0,E&&(w=[w[0]&2,E.value]),w[0]){case 0:case 1:E=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,R=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!E||w[1]>E[0]&&w[1]<E[3])){p.label=w[1];break}if(w[0]===6&&p.label<E[1]){p.label=E[1],E=w;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(w);break}E[2]&&p.ops.pop(),p.trys.pop();continue}w=d.call(h,p)}catch(I){w=[6,I],R=0}finally{b=E=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},M=function(h,d){for(var p in h)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&J(d,h,p)},J=Object.create?function(h,d,p,b){b===void 0&&(b=p);var R=Object.getOwnPropertyDescriptor(d,p);(!R||("get"in R?!d.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(h,b,R)}:function(h,d,p,b){b===void 0&&(b=p),h[b]=d[p]},O=function(h){var d=typeof Symbol=="function"&&Symbol.iterator,p=d&&h[d],b=0;if(p)return p.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&b>=h.length&&(h=void 0),{value:h&&h[b++],done:!h}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},N=function(h,d){var p=typeof Symbol=="function"&&h[Symbol.iterator];if(!p)return h;var b=p.call(h),R,E=[],s;try{for(;(d===void 0||d-- >0)&&!(R=b.next()).done;)E.push(R.value)}catch(l){s={error:l}}finally{try{R&&!R.done&&(p=b.return)&&p.call(b)}finally{if(s)throw s.error}}return E},x=function(){for(var h=[],d=0;d<arguments.length;d++)h=h.concat(N(arguments[d]));return h},S=function(){for(var h=0,d=0,p=arguments.length;d<p;d++)h+=arguments[d].length;for(var b=Array(h),R=0,d=0;d<p;d++)for(var E=arguments[d],s=0,l=E.length;s<l;s++,R++)b[R]=E[s];return b},P=function(h,d,p){if(p||arguments.length===2)for(var b=0,R=d.length,E;b<R;b++)(E||!(b in d))&&(E||(E=Array.prototype.slice.call(d,0,b)),E[b]=d[b]);return h.concat(E||Array.prototype.slice.call(d))},T=function(h){return this instanceof T?(this.v=h,this):new T(h)},B=function(h,d,p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var b=p.apply(h,d||[]),R,E=[];return R={},s("next"),s("throw"),s("return"),R[Symbol.asyncIterator]=function(){return this},R;function s(a){b[a]&&(R[a]=function(y){return new Promise(function(A,W){E.push([a,y,A,W])>1||l(a,y)})})}function l(a,y){try{g(b[a](y))}catch(A){i(E[0][3],A)}}function g(a){a.value instanceof T?Promise.resolve(a.value.v).then(w,I):i(E[0][2],a)}function w(a){l("next",a)}function I(a){l("throw",a)}function i(a,y){a(y),E.shift(),E.length&&l(E[0][0],E[0][1])}},L=function(h){var d,p;return d={},b("next"),b("throw",function(R){throw R}),b("return"),d[Symbol.iterator]=function(){return this},d;function b(R,E){d[R]=h[R]?function(s){return(p=!p)?{value:T(h[R](s)),done:!1}:E?E(s):s}:E}},F=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var d=h[Symbol.asyncIterator],p;return d?d.call(h):(h=typeof O=="function"?O(h):h[Symbol.iterator](),p={},b("next"),b("throw"),b("return"),p[Symbol.asyncIterator]=function(){return this},p);function b(E){p[E]=h[E]&&function(s){return new Promise(function(l,g){s=h[E](s),R(l,g,s.done,s.value)})}}function R(E,s,l,g){Promise.resolve(g).then(function(w){E({value:w,done:l})},s)}},G=function(h,d){return Object.defineProperty?Object.defineProperty(h,"raw",{value:d}):h.raw=d,h};var re=Object.create?function(h,d){Object.defineProperty(h,"default",{enumerable:!0,value:d})}:function(h,d){h.default=d};U=function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var p in h)p!=="default"&&Object.prototype.hasOwnProperty.call(h,p)&&J(d,h,p);return re(d,h),d},D=function(h){return h&&h.__esModule?h:{default:h}},X=function(h,d,p,b){if(p==="a"&&!b)throw new TypeError("Private accessor was defined without a getter");if(typeof d=="function"?h!==d||!b:!d.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?b:p==="a"?b.call(h):b?b.value:d.get(h)},ie=function(h,d,p,b,R){if(b==="m")throw new TypeError("Private method is not writable");if(b==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof d=="function"?h!==d||!R:!d.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return b==="a"?R.call(h,p):R?R.value=p:d.set(h,p),p},ae=function(h,d){if(d===null||typeof d!="object"&&typeof d!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h=="function"?d===h:h.has(d)},Q=function(h,d,p){if(d!=null){if(typeof d!="object"&&typeof d!="function")throw new TypeError("Object expected.");var b;if(p){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");b=d[Symbol.asyncDispose]}if(b===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");b=d[Symbol.dispose]}if(typeof b!="function")throw new TypeError("Object not disposable.");h.stack.push({value:d,dispose:b,async:p})}else p&&h.stack.push({async:!0});return d};var K=typeof SuppressedError=="function"?SuppressedError:function(h,d,p){var b=new Error(p);return b.name="SuppressedError",b.error=h,b.suppressed=d,b};Z=function(h){function d(b){h.error=h.hasError?new K(b,h.error,"An error was suppressed during disposal."):b,h.hasError=!0}function p(){for(;h.stack.length;){var b=h.stack.pop();try{var R=b.dispose&&b.dispose.call(b.value);if(b.async)return Promise.resolve(R).then(p,function(E){return d(E),p()})}catch(E){d(E)}}if(h.hasError)throw h.error}return p()},H("__extends",t),H("__assign",r),H("__rest",n),H("__decorate",o),H("__param",f),H("__esDecorate",u),H("__runInitializers",c),H("__propKey",_),H("__setFunctionName",v),H("__metadata",C),H("__awaiter",j),H("__generator",m),H("__exportStar",M),H("__createBinding",J),H("__values",O),H("__read",N),H("__spread",x),H("__spreadArrays",S),H("__spreadArray",P),H("__await",T),H("__asyncGenerator",B),H("__asyncDelegator",L),H("__asyncValues",F),H("__makeTemplateObject",G),H("__importStar",U),H("__importDefault",D),H("__classPrivateFieldGet",X),H("__classPrivateFieldSet",ie),H("__classPrivateFieldIn",ae),H("__addDisposableResource",Q),H("__disposeResources",Z)})})(En);var xr=En.exports,rt={};Object.defineProperty(rt,"__esModule",{value:!0});var Kr=xr,Ia=function(){function e(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return e.prototype.acquire=function(){var t=this,r=this.isLocked(),n=new Promise(function(o){return t._queue.push(o)});return r||this._dispatch(),n},e.prototype.runExclusive=function(t){return Kr.__awaiter(this,void 0,void 0,function(){var r,n,o;return Kr.__generator(this,function(f){switch(f.label){case 0:return[4,this.acquire()];case 1:r=f.sent(),n=r[0],o=r[1],f.label=2;case 2:return f.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,f.sent()];case 4:return o(),[7];case 5:return[2]}})})},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},e.prototype._dispatch=function(){var t=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},r([this._value--,this._currentReleaser])}},e}();rt.default=Ia;Object.defineProperty(Rr,"__esModule",{value:!0});var Yr=xr,ja=rt,La=function(){function e(){this._semaphore=new ja.default(1)}return e.prototype.acquire=function(){return Yr.__awaiter(this,void 0,void 0,function(){var t,r;return Yr.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=n.sent(),r=t[1],[2,r]}})})},e.prototype.runExclusive=function(t){return this._semaphore.runExclusive(function(){return t()})},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();Rr.default=La;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});nt.withTimeout=void 0;var Ge=xr;function Da(e,t,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(o,f){return Ge.__awaiter(n,void 0,void 0,function(){var u,c,_;return Ge.__generator(this,function(v){switch(v.label){case 0:return u=!1,setTimeout(function(){u=!0,f(r)},t),[4,e.acquire()];case 1:return c=v.sent(),u?(_=Array.isArray(c)?c[1]:c,_()):o(c),[2]}})})})},runExclusive:function(o){return Ge.__awaiter(this,void 0,void 0,function(){var f,u;return Ge.__generator(this,function(c){switch(c.label){case 0:f=function(){},c.label=1;case 1:return c.trys.push([1,,7,8]),[4,this.acquire()];case 2:return u=c.sent(),Array.isArray(u)?(f=u[1],[4,o(u[0])]):[3,4];case 3:return[2,c.sent()];case 4:return f=u,[4,o()];case 5:return[2,c.sent()];case 6:return[3,8];case 7:return f(),[7];case 8:return[2]}})})},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}nt.withTimeout=Da;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var t=Rr;Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return t.default}});var r=rt;Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=nt;Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(Na);var Fa={},it={},$e={};Object.defineProperty($e,"__esModule",{value:!0});$e.getUniqueId=void 0;const Sn=4294967295;let dr=Math.floor(Math.random()*Sn);function ka(){return dr=(dr+1)%Sn,dr}$e.getUniqueId=ka;Object.defineProperty(it,"__esModule",{value:!0});it.createIdRemapMiddleware=void 0;const qa=$e;function Ua(){return(e,t,r,n)=>{const o=e.id,f=qa.getUniqueId();e.id=f,t.id=f,r(u=>{e.id=o,t.id=o,u()})}}it.createIdRemapMiddleware=Ua;var at={};Object.defineProperty(at,"__esModule",{value:!0});at.createAsyncMiddleware=void 0;function Ha(e){return async(t,r,n,o)=>{let f;const u=new Promise(C=>{f=C});let c=null,_=!1;const v=async()=>{_=!0,n(C=>{c=C,f()}),await u};try{await e(t,r,v),_?(await u,c(null)):o(null)}catch(C){c?c(C):o(C)}}}at.createAsyncMiddleware=Ha;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.createScaffoldMiddleware=void 0;function $a(e){return(t,r,n,o)=>{const f=e[t.method];return f===void 0?n():typeof f=="function"?f(t,r,n,o):(r.result=f,o())}}ot.createScaffoldMiddleware=$a;var ze={},Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});const za=mr;function Xr(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function Wa(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}class Ga extends za.EventEmitter{emit(t,...r){let n=t==="error";const o=this._events;if(o!==void 0)n=n&&o.error===void 0;else if(!n)return!1;if(n){let u;if(r.length>0&&([u]=r),u instanceof Error)throw u;const c=new Error(`Unhandled error.${u?` (${u.message})`:""}`);throw c.context=u,c}const f=o[t];if(f===void 0)return!1;if(typeof f=="function")Xr(f,this,r);else{const u=f.length,c=Wa(f);for(let _=0;_<u;_+=1)Xr(c[_],this,r)}return!0}}Ar.default=Ga;var Rn={},be={},Va=Le;Le.default=Le;Le.stable=Tn;Le.stableStringify=Tn;var Ke="[...]",xn="[Circular]",Ee=[],we=[];function An(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Le(e,t,r,n){typeof n>"u"&&(n=An()),vr(e,"",0,[],void 0,0,n);var o;try{we.length===0?o=JSON.stringify(e,t,r):o=JSON.stringify(e,On(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ee.length!==0;){var f=Ee.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return o}function Oe(e,t,r,n){var o=Object.getOwnPropertyDescriptor(n,r);o.get!==void 0?o.configurable?(Object.defineProperty(n,r,{value:e}),Ee.push([n,r,t,o])):we.push([t,r,e]):(n[r]=e,Ee.push([n,r,t]))}function vr(e,t,r,n,o,f,u){f+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){Oe(xn,e,t,o);return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){Oe(Ke,e,t,o);return}if(typeof u.edgesLimit<"u"&&r+1>u.edgesLimit){Oe(Ke,e,t,o);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)vr(e[c],c,c,n,e,f,u);else{var _=Object.keys(e);for(c=0;c<_.length;c++){var v=_[c];vr(e[v],v,c,n,e,f,u)}}n.pop()}}function Ja(e,t){return e<t?-1:e>t?1:0}function Tn(e,t,r,n){typeof n>"u"&&(n=An());var o=wr(e,"",0,[],void 0,0,n)||e,f;try{we.length===0?f=JSON.stringify(o,t,r):f=JSON.stringify(o,On(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ee.length!==0;){var u=Ee.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return f}function wr(e,t,r,n,o,f,u){f+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){Oe(xn,e,t,o);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){Oe(Ke,e,t,o);return}if(typeof u.edgesLimit<"u"&&r+1>u.edgesLimit){Oe(Ke,e,t,o);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)wr(e[c],c,c,n,e,f,u);else{var _={},v=Object.keys(e).sort(Ja);for(c=0;c<v.length;c++){var C=v[c];wr(e[C],C,c,n,e,f,u),_[C]=e[C]}if(typeof o<"u")Ee.push([o,t,e]),o[t]=_;else return _}n.pop()}}function On(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(we.length>0)for(var n=0;n<we.length;n++){var o=we[n];if(o[1]===t&&o[0]===r){r=o[2],we.splice(n,1);break}}return e.call(this,t,r)}}Object.defineProperty(be,"__esModule",{value:!0});be.EthereumProviderError=be.EthereumRpcError=void 0;const Ka=Va;class Cn extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}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 Ka.default(this.serialize(),Qa,2)}}be.EthereumRpcError=Cn;class Ya extends Cn{constructor(t,r,n){if(!Xa(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}be.EthereumProviderError=Ya;function Xa(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function Qa(e,t){if(t!=="[Circular]")return t}var Tr={},ye={};Object.defineProperty(ye,"__esModule",{value:!0});ye.errorValues=ye.errorCodes=void 0;ye.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}};ye.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=ye,r=be,n=t.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",f={code:n,message:u(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function u(m,M=o){if(Number.isInteger(m)){const O=m.toString();if(j(t.errorValues,O))return t.errorValues[O].message;if(v(m))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return M}e.getMessageFromCode=u;function c(m){if(!Number.isInteger(m))return!1;const M=m.toString();return!!(t.errorValues[M]||v(m))}e.isValidCode=c;function _(m,{fallbackError:M=f,shouldIncludeStack:O=!1}={}){var N,x;if(!M||!Number.isInteger(M.code)||typeof M.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(m instanceof r.EthereumRpcError)return m.serialize();const S={};if(m&&typeof m=="object"&&!Array.isArray(m)&&j(m,"code")&&c(m.code)){const T=m;S.code=T.code,T.message&&typeof T.message=="string"?(S.message=T.message,j(T,"data")&&(S.data=T.data)):(S.message=u(S.code),S.data={originalError:C(m)})}else{S.code=M.code;const T=(N=m)===null||N===void 0?void 0:N.message;S.message=T&&typeof T=="string"?T:M.message,S.data={originalError:C(m)}}const P=(x=m)===null||x===void 0?void 0:x.stack;return O&&m&&P&&typeof P=="string"&&(S.stack=P),S}e.serializeError=_;function v(m){return m>=-32099&&m<=-32e3}function C(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function j(m,M){return Object.prototype.hasOwnProperty.call(m,M)}})(Tr);var st={};Object.defineProperty(st,"__esModule",{value:!0});st.ethErrors=void 0;const Or=be,Mn=Tr,te=ye;st.ethErrors={rpc:{parse:e=>oe(te.errorCodes.rpc.parse,e),invalidRequest:e=>oe(te.errorCodes.rpc.invalidRequest,e),invalidParams:e=>oe(te.errorCodes.rpc.invalidParams,e),methodNotFound:e=>oe(te.errorCodes.rpc.methodNotFound,e),internal:e=>oe(te.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 oe(t,e)},invalidInput:e=>oe(te.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>oe(te.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>oe(te.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>oe(te.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>oe(te.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>oe(te.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Ie(te.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>Ie(te.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>Ie(te.errorCodes.provider.unsupportedMethod,e),disconnected:e=>Ie(te.errorCodes.provider.disconnected,e),chainDisconnected:e=>Ie(te.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Or.EthereumProviderError(t,r,n)}}};function oe(e,t){const[r,n]=Pn(t);return new Or.EthereumRpcError(e,r||Mn.getMessageFromCode(e),n)}function Ie(e,t){const[r,n]=Pn(t);return new Or.EthereumProviderError(e,r||Mn.getMessageFromCode(e),n)}function Pn(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=be;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=Tr;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=st;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const o=ye;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})})(Rn);var Za=ne&&ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.JsonRpcEngine=void 0;const eo=Za(Ar),se=Rn;class de extends eo.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,n,o)=>{try{const[f,u,c]=await de._runAllMiddleware(t,r,this._middleware);return u?(await de._runReturnHandlers(c),o(f)):n(async _=>{try{await de._runReturnHandlers(c)}catch(v){return _(v)}return _()})}catch(f){return o(f)}}}async _handleBatch(t,r){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(n,o)=>{r(o)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const u=new se.EthereumRpcError(se.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof t}`,{request:t});return r(u,{id:void 0,jsonrpc:"2.0",error:u})}if(typeof t.method!="string"){const u=new se.EthereumRpcError(se.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof t.method}`,{request:t});return r(u,{id:t.id,jsonrpc:"2.0",error:u})}const n=Object.assign({},t),o={id:n.id,jsonrpc:n.jsonrpc};let f=null;try{await this._processRequest(n,o)}catch(u){f=u}return f&&(delete o.result,o.error||(o.error=se.serializeError(f))),r(f,o)}async _processRequest(t,r){const[n,o,f]=await de._runAllMiddleware(t,r,this._middleware);if(de._checkForCompletion(t,r,o),await de._runReturnHandlers(f),n)throw n}static async _runAllMiddleware(t,r,n){const o=[];let f=null,u=!1;for(const c of n)if([f,u]=await de._runMiddleware(t,r,c,o),u)break;return[f,u,o.reverse()]}static _runMiddleware(t,r,n,o){return new Promise(f=>{const u=_=>{const v=_||r.error;v&&(r.error=se.serializeError(v)),f([v,!0])},c=_=>{r.error?u(r.error):(_&&(typeof _!="function"&&u(new se.EthereumRpcError(se.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof _}" for request:
2
2
  ${_r(t)}`,{request:t})),o.push(_)),f([null,!1]))};try{n(t,r,c,u)}catch(_){u(_)}})}static async _runReturnHandlers(t){for(const r of t)await new Promise((n,o)=>{r(f=>f?o(f):n())})}static _checkForCompletion(t,r,n){if(!("result"in r)&&!("error"in r))throw new se.EthereumRpcError(se.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
3
3
  ${_r(t)}`,{request:t});if(!n)throw new se.EthereumRpcError(se.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
4
4
  ${_r(t)}`,{request:t})}}ze.JsonRpcEngine=de;function _r(e){return JSON.stringify(e,null,2)}var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.mergeMiddleware=void 0;const to=ze;function ro(e){const t=new to.JsonRpcEngine;return e.forEach(r=>t.push(r)),t.asMiddleware()}ft.mergeMiddleware=ro;(function(e){var t=ne&&ne.__createBinding||(Object.create?function(n,o,f,u){u===void 0&&(u=f),Object.defineProperty(n,u,{enumerable:!0,get:function(){return o[f]}})}:function(n,o,f,u){u===void 0&&(u=f),n[u]=o[f]}),r=ne&&ne.__exportStar||function(n,o){for(var f in n)f!=="default"&&!Object.prototype.hasOwnProperty.call(o,f)&&t(o,n,f)};Object.defineProperty(e,"__esModule",{value:!0}),r(it,e),r(at,e),r(ot,e),r($e,e),r(ze,e),r(ft,e)})(Fa);export{yr as a,ao as b,Ar as c,Fa as d,so as e,Rn as f,Oa as g,xa as i,io as j,Na as l,oo as p,ln as r,ge as s};