(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2250],{46702:function(e,t,n){"use strict";var r=n(64836),i=r(n(18698)),a=r(n(56690)),o=r(n(89728)),s=r(n(66115)),c=r(n(61655)),u=r(n(94993)),l=r(n(73808)),d=n(67294),h=n(99309).generateQuery,f=[],p=!1,m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p=!0,window.hcaptchaOnLoad=function(){f=f.filter(function(e){return e(),!1})};var t=e.apihost||"https://js.hcaptcha.com";delete e.apihost;var n=document.createElement("script");n.src="".concat(t,"/1/api.js?render=explicit&onload=hcaptchaOnLoad"),n.async=!0;var r=h(e);n.src+=""!==r?"&".concat(r):"",document.head.appendChild(n)},b=function(e){(0,c.default)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,l.default)(r);return e=t?Reflect.construct(n,arguments,(0,l.default)(this).constructor):n.apply(this,arguments),(0,u.default)(this,e)});function r(e){(0,a.default)(this,r),(t=n.call(this,e)).renderCaptcha=t.renderCaptcha.bind((0,s.default)(t)),t.resetCaptcha=t.resetCaptcha.bind((0,s.default)(t)),t.removeCaptcha=t.removeCaptcha.bind((0,s.default)(t)),t.isReady=t.isReady.bind((0,s.default)(t)),t.handleOnLoad=t.handleOnLoad.bind((0,s.default)(t)),t.handleSubmit=t.handleSubmit.bind((0,s.default)(t)),t.handleExpire=t.handleExpire.bind((0,s.default)(t)),t.handleError=t.handleError.bind((0,s.default)(t)),t.handleOpen=t.handleOpen.bind((0,s.default)(t)),t.handleClose=t.handleClose.bind((0,s.default)(t)),t.handleChallengeExpired=t.handleChallengeExpired.bind((0,s.default)(t));var t,i="undefined"!=typeof hcaptcha;return t.ref=d.createRef(),t.state={isApiReady:i,isRemoved:!1,elementId:e.id,captchaId:""},t}return(0,o.default)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.apihost,n=e.assethost,r=e.endpoint,i=e.host,a=e.imghost,o=e.languageOverride,s=e.reCaptchaCompat,c=e.reportapi,u=e.sentry,l=e.custom;if(this.state.isApiReady)this.renderCaptcha();else{if(p)return;m({apihost:t,assethost:n,endpoint:r,hl:o,host:i,imghost:a,recaptchacompat:!1===s?"off":null,reportapi:c,sentry:u,custom:l}),f.push(this.handleOnLoad)}}},{key:"componentWillUnmount",value:function(){var e=this.state.captchaId;this.isReady()&&(hcaptcha.reset(e),hcaptcha.remove(e))}},{key:"shouldComponentUpdate",value:function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved}},{key:"componentDidUpdate",value:function(e){var t=this;["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(function(n){return e[n]===t.props[n]})||this.removeCaptcha(function(){t.renderCaptcha()})}},{key:"renderCaptcha",value:function(e){if(this.state.isApiReady){var t=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),n=hcaptcha.render(this.ref.current,t);this.setState({isRemoved:!1,captchaId:n},function(){e&&e()})}}},{key:"resetCaptcha",value:function(){var e=this.state.captchaId;this.isReady()&&hcaptcha.reset(e)}},{key:"removeCaptcha",value:function(e){var t=this.state.captchaId;this.isReady()&&this.setState({isRemoved:!0},function(){hcaptcha.remove(t),e&&e()})}},{key:"handleOnLoad",value:function(){var e=this;this.setState({isApiReady:!0},function(){e.renderCaptcha(function(){var t=e.props.onLoad;t&&t()})})}},{key:"handleSubmit",value:function(e){var t=this.props.onVerify,n=this.state,r=n.isRemoved,i=n.captchaId;"undefined"==typeof hcaptcha||r||t(hcaptcha.getResponse(i),hcaptcha.getRespKey(i))}},{key:"handleExpire",value:function(){var e=this.props.onExpire,t=this.state.captchaId;this.isReady()&&(hcaptcha.reset(t),e&&e())}},{key:"handleError",value:function(e){var t=this.props.onError,n=this.state.captchaId;this.isReady()&&(hcaptcha.reset(n),t&&t(e))}},{key:"isReady",value:function(){var e=this.state,t=e.isApiReady,n=e.isRemoved;return t&&!n}},{key:"handleOpen",value:function(){this.isReady()&&this.props.onOpen&&this.props.onOpen()}},{key:"handleClose",value:function(){this.isReady()&&this.props.onClose&&this.props.onClose()}},{key:"handleChallengeExpired",value:function(){this.isReady()&&this.props.onChalExpired&&this.props.onChalExpired()}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.state.captchaId;if(this.isReady())return e&&"object"!==(0,i.default)(e)&&(e=null),hcaptcha.execute(t,e)}},{key:"setData",value:function(e){var t=this.state.captchaId;this.isReady()&&(e&&"object"!==(0,i.default)(e)&&(e=null),hcaptcha.setData(t,e))}},{key:"getResponse",value:function(){return hcaptcha.getResponse(this.state.captchaId)}},{key:"getRespKey",value:function(){return hcaptcha.getRespKey(this.state.captchaId)}},{key:"render",value:function(){var e=this.state.elementId;return d.createElement("div",{ref:this.ref,id:e})}}]),r}(d.Component);e.exports=b},99309:function(e,t,n){"use strict";var r=n(64836)(n(27424));e.exports={generateQuery:function(e){return Object.entries(e).filter(function(e){var t=(0,r.default)(e,2),n=(t[0],t[1]);return n||!1===n}).map(function(e){var t=(0,r.default)(e,2),n=t[0],i=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(i))}).join("&")}}},98099:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97117);function i(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function a(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function o(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function l(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),l(e/4294967296>>>0,t,n),l(e>>>0,t,n+4),t}function f(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),d(e>>>0,t,n),d(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=a,t.writeInt16LE=a,t.readInt32BE=o,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=l,t.writeInt32BE=l,t.writeUint32LE=d,t.writeInt32LE=d,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=o(e,t),r=o(e,t+4);return 4294967296*n+r-(r>>31)*4294967296},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*s(e,t)+s(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=c(e,t);return 4294967296*c(e,t+4)+n-(n>>31)*4294967296},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=u(e,t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=h,t.writeInt64BE=h,t.writeUint64LE=f,t.writeInt64LE=f,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,a=e/8+n-1;a>=n;a--)r+=t[a]*i,i*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,a=n;a=i;o--)n[o]=t/a&255,a*=256;return n},t.writeUintLE=function(e,t,n,i){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw Error("writeUintLE value must be an integer");for(var a=1,o=i;o>>16|P<<16)|0,w=w>>>20|w<<12,k^=g=g+E|0,E^=x=x+(k=k>>>16|k<<16)|0,E=E>>>20|E<<12,I^=y=y+_|0,_^=O=O+(I=I>>>16|I<<16)|0,_=_>>>20|_<<12,A^=v=v+D|0,D^=S=S+(A=A>>>16|A<<16)|0,D=D>>>20|D<<12,I^=y=y+_|0,_^=O=O+(I=I>>>24|I<<8)|0,_=_>>>25|_<<7,A^=v=v+D|0,D^=S=S+(A=A>>>24|A<<8)|0,D=D>>>25|D<<7,k^=g=g+E|0,E^=x=x+(k=k>>>24|k<<8)|0,E=E>>>25|E<<7,P^=b=b+w|0,w^=C=C+(P=P>>>24|P<<8)|0,w=w>>>25|w<<7,A^=b=b+E|0,E^=O=O+(A=A>>>16|A<<16)|0,E=E>>>20|E<<12,P^=g=g+_|0,_^=S=S+(P=P>>>16|P<<16)|0,_=_>>>20|_<<12,k^=y=y+D|0,D^=C=C+(k=k>>>16|k<<16)|0,D=D>>>20|D<<12,I^=v=v+w|0,w^=x=x+(I=I>>>16|I<<16)|0,w=w>>>20|w<<12,k^=y=y+D|0,D^=C=C+(k=k>>>24|k<<8)|0,D=D>>>25|D<<7,I^=v=v+w|0,w^=x=x+(I=I>>>24|I<<8)|0,w=w>>>25|w<<7,P^=g=g+_|0,_^=S=S+(P=P>>>24|P<<8)|0,_=_>>>25|_<<7,A^=b=b+E|0,E^=O=O+(A=A>>>24|A<<8)|0,E=E>>>25|E<<7;r.writeUint32LE(b+1634760805|0,e,0),r.writeUint32LE(g+857760878|0,e,4),r.writeUint32LE(y+2036477234|0,e,8),r.writeUint32LE(v+1797285236|0,e,12),r.writeUint32LE(w+i|0,e,16),r.writeUint32LE(E+a|0,e,20),r.writeUint32LE(_+o|0,e,24),r.writeUint32LE(D+s|0,e,28),r.writeUint32LE(C+c|0,e,32),r.writeUint32LE(x+u|0,e,36),r.writeUint32LE(O+l|0,e,40),r.writeUint32LE(S+d|0,e,44),r.writeUint32LE(P+h|0,e,48),r.writeUint32LE(k+f|0,e,52),r.writeUint32LE(I+p|0,e,56),r.writeUint32LE(A+m|0,e,60)}(u,s,e);for(var d=l;d>>=8,t++;if(r>0)throw Error("ChaCha: counter overflow")}(s,0,c)}return i.wipe(u),0===o&&i.wipe(s),a}t.streamXOR=a,t.stream=function(e,t,n,r){return void 0===r&&(r=0),i.wipe(n),a(e,t,n,n,r)}},15501:function(e,t,n){"use strict";var r=n(25439),i=n(63027),a=n(17309),o=n(98099),s=n(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),u=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,n,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");var o,s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);r.stream(this._key,s,c,4);var u=t.length+this.tagLength;if(i){if(i.length!==u)throw Error("ChaCha20Poly1305: incorrect destination length");o=i}else o=new Uint8Array(u);return r.streamXOR(this._key,s,t,o,4),this._authenticate(o.subarray(o.length-this.tagLength,o.length),c,o.subarray(0,o.length-this.tagLength),n),a.wipe(s),o},e.prototype.open=function(e,t,n,i){if(e.length>16)throw Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&s.update(c.subarray(r.length%16))),s.update(n),n.length%16>0&&s.update(c.subarray(n.length%16));var u=new Uint8Array(8);r&&o.writeUint64LE(r.length,u),s.update(u),o.writeUint64LE(n.length,u),s.update(u);for(var l=s.digest(),d=0;d>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,n){return~(e-1)&t|e-1&n},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=n,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==n(e,t)}},79984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},512:function(e,t,n){"use strict";var r=n(25629),i=n(17309),a=function(){function e(e,t,n,i){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var a=r.hmac(this._hash,n,t);this._hmac=new r.HMAC(e,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;nthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},63027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4153),i=n(17309);t.DIGEST_LENGTH=16;var a=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=e[0]|e[1]<<8;this._r[0]=8191&n;var r=e[2]|e[3]<<8;this._r[1]=(n>>>13|r<<3)&8191;var i=e[4]|e[5]<<8;this._r[2]=(r>>>10|i<<6)&7939;var a=e[6]|e[7]<<8;this._r[3]=(i>>>7|a<<9)&8191;var o=e[8]|e[9]<<8;this._r[4]=(a>>>4|o<<12)&255,this._r[5]=o>>>1&8190;var s=e[10]|e[11]<<8;this._r[6]=(o>>>14|s<<2)&8191;var c=e[12]|e[13]<<8;this._r[7]=(s>>>11|c<<5)&8065;var u=e[14]|e[15]<<8;this._r[8]=(c>>>8|u<<8)&8191,this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],a=this._h[1],o=this._h[2],s=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],d=this._h[7],h=this._h[8],f=this._h[9],p=this._r[0],m=this._r[1],b=this._r[2],g=this._r[3],y=this._r[4],v=this._r[5],w=this._r[6],E=this._r[7],_=this._r[8],D=this._r[9];n>=16;){var C,x=e[t+0]|e[t+1]<<8;i+=8191&x;var O=e[t+2]|e[t+3]<<8;a+=(x>>>13|O<<3)&8191;var S=e[t+4]|e[t+5]<<8;o+=(O>>>10|S<<6)&8191;var P=e[t+6]|e[t+7]<<8;s+=(S>>>7|P<<9)&8191;var k=e[t+8]|e[t+9]<<8;c+=(P>>>4|k<<12)&8191,u+=k>>>1&8191;var I=e[t+10]|e[t+11]<<8;l+=(k>>>14|I<<2)&8191;var A=e[t+12]|e[t+13]<<8;d+=(I>>>11|A<<5)&8191;var j=e[t+14]|e[t+15]<<8;h+=(A>>>8|j<<8)&8191,f+=j>>>5|r;var N=0;N=(C=0+i*p+5*D*a+5*_*o+5*E*s+5*w*c)>>>13,C&=8191,C+=5*v*u+5*y*l+5*g*d+5*b*h+5*m*f,N+=C>>>13,C&=8191;var M=N;M+=i*m+a*p+5*D*o+5*_*s+5*E*c,N=M>>>13,M&=8191,M+=5*w*u+5*v*l+5*y*d+5*g*h+5*b*f,N+=M>>>13,M&=8191;var T=N;T+=i*b+a*m+o*p+5*D*s+5*_*c,N=T>>>13,T&=8191,T+=5*E*u+5*w*l+5*v*d+5*y*h+5*g*f,N+=T>>>13,T&=8191;var U=N;U+=i*g+a*b+o*m+s*p+5*D*c,N=U>>>13,U&=8191,U+=5*_*u+5*E*l+5*w*d+5*v*h+5*y*f,N+=U>>>13,U&=8191;var L=N;L+=i*y+a*g+o*b+s*m+c*p,N=L>>>13,L&=8191,L+=5*D*u+5*_*l+5*E*d+5*w*h+5*v*f,N+=L>>>13,L&=8191;var R=N;R+=i*v+a*y+o*g+s*b+c*m,N=R>>>13,R&=8191,R+=u*p+5*D*l+5*_*d+5*E*h+5*w*f,N+=R>>>13,R&=8191;var F=N;F+=i*w+a*v+o*y+s*g+c*b,N=F>>>13,F&=8191,F+=u*m+l*p+5*D*d+5*_*h+5*E*f,N+=F>>>13,F&=8191;var B=N;B+=i*E+a*w+o*v+s*y+c*g,N=B>>>13,B&=8191,B+=u*b+l*m+d*p+5*D*h+5*_*f,N+=B>>>13,B&=8191;var $=N;$+=i*_+a*E+o*w+s*v+c*y,N=$>>>13,$&=8191,$+=u*g+l*b+d*m+h*p+5*D*f,N+=$>>>13,$&=8191;var W=N;W+=i*D+a*_+o*E+s*w+c*v,N=W>>>13,W&=8191,W+=u*y+l*g+d*b+h*m+f*p,N+=W>>>13,W&=8191,C=8191&(N=(N=(N<<2)+N|0)+C|0),N>>>=13,M+=N,i=C,a=M,o=T,s=U,c=L,u=R,l=F,d=B,h=$,f=W,t+=16,n-=16}this._h[0]=i,this._h[1]=a,this._h[2]=o,this._h[3]=s,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=d,this._h[8]=h,this._h[9]=f},e.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,a,o=new Uint16Array(10);if(this._leftover){for(a=this._leftover,this._buffer[a++]=1;a<16;a++)this._buffer[a]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,a=2;a<10;a++)this._h[a]+=n,n=this._h[a]>>>13,this._h[a]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,o[0]=this._h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this._h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,r=(1^n)-1,a=0;a<10;a++)o[a]&=r;for(a=0,r=~r;a<10;a++)this._h[a]=this._h[a]&r|o[a];for(a=1,this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,i=this._h[0]+this._pad[0],this._h[0]=65535&i;a<8;a++)i=(this._h[a]+this._pad[a]|0)+(i>>>16)|0,this._h[a]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(var i=0;i256)throw Error("randomString charset is too long");let i="",c=n.length,u=256-256%c;for(;e>0;){let t=o(Math.ceil(256*e/u),r);for(let r=0;r0;r++){let a=t[r];a0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=s(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,i=t%64<56?64:128;this._buffer[n]=128;for(var a=n+1;a0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=a;var o=new Int32Array([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]);function s(e,t,n,i,a){for(;a>=64;){for(var s=t[0],c=t[1],u=t[2],l=t[3],d=t[4],h=t[5],f=t[6],p=t[7],m=0;m<16;m++){var b=i+4*m;e[m]=r.readUint32BE(n,b)}for(var m=16;m<64;m++){var g=e[m-2],y=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,v=((g=e[m-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;e[m]=(y+e[m-7]|0)+(v+e[m-16]|0)}for(var m=0;m<64;m++){var y=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&f)|0)+(p+(o[m]+e[m]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&c^s&u^c&u)|0;p=f,f=h,h=d,d=l+y|0,l=u,u=c,c=s,s=y+v|0}t[0]+=s,t[1]+=c,t[2]+=u,t[3]+=l,t[4]+=d,t[5]+=h,t[6]+=f,t[7]+=p,i+=64,a-=64}return i}t.vp=function(e){var t=new a;t.update(e);var n=t.digest();return t.clean(),n}},17309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t=0;--e){let t=n[e>>>3]>>>(7&e)&1;u(i,o,t),u(f,p,t),l(m,i,f),d(i,i,f),l(f,o,p),d(o,o,p),h(p,m,m),h(b,i,i),h(i,f,i),h(f,o,m),l(m,i,f),d(i,i,f),h(o,i,i),d(f,p,b),h(i,f,s),l(i,i,p),h(f,f,i),h(i,p,b),h(p,o,r),h(o,m,m),u(i,o,t),u(f,p,t)}for(let e=0;e<16;e++)r[e+16]=i[e],r[e+32]=f[e],r[e+48]=o[e],r[e+64]=p[e];let g=r.subarray(32),y=r.subarray(16);!function(e,t){let n=a();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)h(n,n,n),2!==e&&4!==e&&h(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(g,g),h(y,y,g);let v=new Uint8Array(32);return!function(e,t){let n=a(),r=a();for(let e=0;e<16;e++)r[e]=t[e];c(r),c(r),c(r);for(let e=0;e<2;e++){n[0]=r[0]-65517;for(let e=1;e<15;e++)n[e]=r[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);let e=n[15]>>16&1;n[14]&=65535,u(r,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}(v,y),v}t.Au=function(e){let n=(0,r.randomBytes)(32,e),a=function(e){if(e.length!==t.KS)throw Error(`x25519: seed must be ${t.KS} bytes`);let n=new Uint8Array(e);return{publicKey:f(n,o),secretKey:n}}(n);return(0,i.wipe)(n),a},t.gi=function(e,n,r=!1){if(e.length!==t.kz)throw Error("X25519: incorrect secret key length");if(n.length!==t.kz)throw Error("X25519: incorrect public key length");let i=f(e,n);if(r){let e=0;for(let t=0;t{setTimeout(()=>{t(!0)},e)})}},44273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(70655);r.__exportStar(n(83873),t),r.__exportStar(n(83207),t)},47001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(void 0!==t.elapsed)throw Error(`Watch already stopped for label: ${e}`);let n=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:n})}get(e){let t=this.timestamps.get(e);if(void 0===t)throw Error(`No timestamp found for label: ${e}`);return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=n,t.default=n},88338:function(e,t,n){"use strict";n.d(t,{AW:function(){return k},O6:function(){return tg},rV:function(){return j},gn:function(){return ep},H1:function(){return ec},hF:function(){return eu},WG:function(){return R},pe:function(){return B},m$:function(){return T},vB:function(){return $},HI:function(){return F},E0:function(){return eb},Gq:function(){return eh},$0:function(){return ei},Z4:function(){return ed},Bv:function(){return ek},Au:function(){return N},jd:function(){return M},gu:function(){return O},D:function(){return er},X_:function(){return en},bW:function(){return ev},Z7:function(){return eK},cO:function(){return eE},_H:function(){return ew},fc:function(){return eB},D6:function(){return eH},Hh:function(){return ey},Ym:function(){return U},rj:function(){return L},jU:function(){return ee},gp:function(){return e$},rF:function(){return tl},Bw:function(){return em},UG:function(){return Z},Gg:function(){return tf},xW:function(){return e2},b$:function(){return J},Ih:function(){return eJ},h1:function(){return e3},Q8:function(){return q},o8:function(){return eQ},qt:function(){return eV},Dd:function(){return e6},$t:function(){return tr},nf:function(){return to},Q0:function(){return tt},in:function(){return e9},p8:function(){return ts},sI:function(){return tu},al:function(){return tc},L5:function(){return eY},EJ:function(){return tn},Z2:function(){return e7},PM:function(){return te},hH:function(){return ti},ON:function(){return th},n:function(){return e4},JT:function(){return ta},M_:function(){return eX},jv:function(){return e1},KC:function(){return eo},eG:function(){return eg},fK:function(){return ez},IP:function(){return es},DQ:function(){return x},iP:function(){return ef},M:function(){return eW},he:function(){return eP},uw:function(){return tm},Ll:function(){return W},EN:function(){return z}});var r=n(15501),i=n(512),a=n(31416),o=n(73294),s=n(57664),c=n(75384),u=n(83454),l=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i{if(t.length&&!t.includes(r))return;let i=e[r];n.push(...i.accounts)}),n}function S(e,t){return e.includes(":")?[e]:t.chains||[]}let P="base10",k="base16",I="base64pad",A="utf8",j=1;function N(){let e=s.Au();return{privateKey:(0,c.BB)(e.secretKey,k),publicKey:(0,c.BB)(e.publicKey,k)}}function M(){let e=(0,a.randomBytes)(32);return(0,c.BB)(e,k)}function T(e,t){let n=s.gi((0,c.mL)(e,k),(0,c.mL)(t,k),!0),r=new i.t(o.mE,n).expand(32);return(0,c.BB)(r,k)}function U(e){let t=(0,o.vp)((0,c.mL)(e,k));return(0,c.BB)(t,k)}function L(e){let t=(0,o.vp)((0,c.mL)(e,A));return(0,c.BB)(t,k)}function R(e){return Number((0,c.BB)(e,P))}function F(e){var t;let n=(t="u">typeof e.type?e.type:0,(0,c.mL)(`${t}`,P));if(R(n)===j&&typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");let i="u">typeof e.senderPublicKey?(0,c.mL)(e.senderPublicKey,k):void 0,o="u">typeof e.iv?(0,c.mL)(e.iv,k):(0,a.randomBytes)(12);return function(e){if(R(e.type)===j){if(typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),I)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),I)}({type:n,sealed:new r.OK((0,c.mL)(e.symKey,k)).seal(o,(0,c.mL)(e.message,A)),iv:o,senderPublicKey:i})}function B(e){let t=new r.OK((0,c.mL)(e.symKey,k)),{sealed:n,iv:i}=$(e.encoded),a=t.open(i,n);if(null===a)throw Error("Failed to decrypt");return(0,c.BB)(a,A)}function $(e){let t=(0,c.mL)(e,I),n=t.slice(0,1);if(R(n)===j){let e=t.slice(1,33),r=t.slice(33,45);return{type:n,sealed:t.slice(45),iv:r,senderPublicKey:e}}let r=t.slice(1,13);return{type:n,sealed:t.slice(13),iv:r}}function W(e,t){let n=$(e);return z({type:R(n.type),senderPublicKey:"u">typeof n.senderPublicKey?(0,c.BB)(n.senderPublicKey,k):void 0,receiverPublicKey:t?.receiverPublicKey})}function z(e){let t=e?.type||0;if(t===j){if(typeof e?.senderPublicKey>"u")throw Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function q(e){return e.type===j&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var G=Object.defineProperty,K=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t)=>{for(var n in t||(t={}))H.call(t,n)&&Y(e,n,t[n]);if(K)for(var n of K(t))V.call(t,n)&&Y(e,n,t[n]);return e};let X={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function Z(){return"u">typeof C&&"u">typeof C.versions&&"u">typeof C.versions.node}function J(){return!(0,w.getDocument)()&&!!(0,w.getNavigator)()&&"ReactNative"===navigator.product}function ee(){return!Z()&&!!(0,w.getNavigator)()&&!!(0,w.getDocument)()}function et(){return J()?X.reactNative:Z()?X.node:ee()?X.browser:X.unknown}function en(){var e;try{return J()&&"u">typeof n.g&&"u">typeof(null==n.g?void 0:n.g.Application)?null==(e=n.g.Application)?void 0:e.applicationId:void 0}catch{return}}function er(){return(0,E.D)()||{name:"",description:"",url:"",icons:[""]}}function ei({protocol:e,version:t,relayUrl:r,sdkVersion:i,auth:a,projectId:o,useOnCloseEvent:s,bundleId:c}){var v,E;let D;let C=r.split("?"),x=function(e,t,r){let i=function(){if(et()===X.reactNative&&"u">typeof n.g&&"u">typeof(null==n.g?void 0:n.g.Platform)){let{OS:e,Version:t}=n.g.Platform;return[e,t].join("-")}let e="undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new m:"undefined"!=typeof navigator?function(e){var t=""!==e&&g.reduce(function(t,n){var r=n[0],i=n[1];if(t)return t;var a=i.exec(e);return!!a&&[r,a]},!1);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new p;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=l(l([],i,!0),function(e){for(var t=[],n=0;nt.includes(e)).length===e.length}function eo(e){return Object.fromEntries(e.entries())}function es(e){return new Map(Object.entries(e))}function ec(e=v.FIVE_MINUTES,t){let n,r,i;let a=(0,v.toMiliseconds)(e||v.FIVE_MINUTES);return{resolve:e=>{i&&n&&(clearTimeout(i),n(e))},reject:e=>{i&&r&&(clearTimeout(i),r(e))},done:()=>new Promise((e,o)=>{i=setTimeout(()=>{o(Error(t))},a),n=e,r=o})}}function eu(e,t,n){return new Promise(async(r,i)=>{let a=setTimeout(()=>i(Error(n)),t);try{let t=await e;r(t)}catch(e){i(e)}clearTimeout(a)})}function el(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw Error(`Unknown expirer target type: ${e}`)}function ed(e){return el("topic",e)}function eh(e){return el("id",e)}function ef(e){let[t,n]=e.split(":"),r={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof n)r.topic=n;else if("id"===t&&Number.isInteger(Number(n)))r.id=Number(n);else throw Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);return r}function ep(e,t){return(0,v.fromMiliseconds)((t||Date.now())+(0,v.toMiliseconds)(e))}function em(e){return Date.now()>=(0,v.toMiliseconds)(e)}function eb(e,t){return`${e}${t?`:${t}`:""}`}function eg(e=[],t=[]){return[...new Set([...e,...t])]}async function ey({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;let i="string"==typeof r?JSON.parse(r):r,a=i?.href;if("string"!=typeof a)return;a.endsWith("/")&&(a=a.slice(0,-1));let o=`${a}/wc?requestId=${e}&sessionTopic=${t}`,s=et();s===X.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):s===X.reactNative&&"u">typeof(null==n.g?void 0:n.g.Linking)&&await n.g.Linking.openURL(o)}catch(e){console.error(e)}}async function ev(e,t){try{return await e.getItem(t)||(ee()?localStorage.getItem(t):void 0)}catch(e){console.error(e)}}function ew(e){return e?.relay||{protocol:"irn"}}function eE(e){let t=D[e];if(typeof t>"u")throw Error(`Relay Protocol not supported: ${e}`);return t}var e_=Object.defineProperty,eD=Object.getOwnPropertySymbols,eC=Object.prototype.hasOwnProperty,ex=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?e_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eS=(e,t)=>{for(var n in t||(t={}))eC.call(t,n)&&eO(e,n,t[n]);if(eD)for(var n of eD(t))ex.call(t,n)&&eO(e,n,t[n]);return e};function eP(e){var t;let n=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,n),a=e.substring(n+1,r).split("@"),o="u">typeof r?e.substring(r):"",s=_.parse(o);return{protocol:i,topic:(t=a[0]).startsWith("//")?t.substring(2):t,version:parseInt(a[1],10),symKey:s.symKey,relay:function(e,t="-"){let n={},r="relay"+t;return Object.keys(e).forEach(t=>{if(t.startsWith(r)){let i=t.replace(r,""),a=e[t];n[i]=a}}),n}(s)}}function ek(e){return`${e.protocol}:${e.topic}@${e.version}?`+_.stringify(eS({symKey:e.symKey},function(e,t="-"){let n={};return Object.keys(e).forEach(r=>{e[r]&&(n["relay"+t+r]=e[r])}),n}(e.relay)))}var eI=Object.defineProperty,eA=Object.defineProperties,ej=Object.getOwnPropertyDescriptors,eN=Object.getOwnPropertySymbols,eM=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,eU=(e,t,n)=>t in e?eI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eL=(e,t)=>{for(var n in t||(t={}))eM.call(t,n)&&eU(e,n,t[n]);if(eN)for(var n of eN(t))eT.call(t,n)&&eU(e,n,t[n]);return e},eR=(e,t)=>eA(e,ej(t));function eF(e){let t=[];return e.forEach(e=>{let[n,r]=e.split(":");t.push(`${n}:${r}`)}),t}function eB(e,t){let n=e9(e,t);if(n)throw Error(n.message);let r={};for(let[t,n]of Object.entries(e))r[t]={methods:n.methods,events:n.events,chains:n.accounts.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)};return r}function e$(e){return e.includes(":")}function eW(e){return e$(e)?e.split(":")[0]:e}function ez(e){var t,n,r;let i={};if(!eY(e))return i;for(let[a,o]of Object.entries(e)){let e=e$(a)?[a]:o.chains,s=o.methods||[],c=o.events||[],u=eW(a);i[u]=eR(eL({},i[u]),{chains:eg(e,null==(t=i[u])?void 0:t.chains),methods:eg(s,null==(n=i[u])?void 0:n.methods),events:eg(c,null==(r=i[u])?void 0:r.events)})}return i}let eq={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},eG={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function eK(e,t){let{message:n,code:r}=eG[e];return{message:t?`${n} ${t}`:n,code:r}}function eH(e,t){let{message:n,code:r}=eq[e];return{message:t?`${n} ${t}`:n,code:r}}function eV(e,t){return!!Array.isArray(e)&&(!("u">typeof t)||!e.length||e.every(t))}function eY(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function eQ(e){return typeof e>"u"}function eX(e,t){return!!(t&&eQ(e))||"string"==typeof e&&!!e.trim().length}function eZ(e,t){return!!(t&&eQ(e))||"number"==typeof e&&!isNaN(e)}function eJ(e,t){let{requiredNamespaces:n}=t,r=Object.keys(e.namespaces),i=Object.keys(n),a=!0;return!!ea(i,r)&&(r.forEach(t=>{let{accounts:r,methods:i,events:o}=e.namespaces[t],s=eF(r),c=n[t];ea(S(t,c),s)&&ea(c.methods,i)&&ea(c.events,o)||(a=!1)}),a)}function e0(e){return!!(eX(e,!1)&&e.includes(":"))&&2===e.split(":").length}function e1(e){if(eX(e,!1))try{return"u">typeof new URL(e)}catch{}return!1}function e2(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function e3(e){return e?.topic}function e6(e,t){let n=null;return eX(e?.publicKey,!1)||(n=eK("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}function e5(e){let t=!0;return eV(e)?e.length&&(t=e.every(e=>eX(e,!1))):t=!1,t}function e8(e,t){let n=null;return Object.values(e).forEach(e=>{var r;let i;if(n)return;let a=(r=`${t}, namespace`,i=null,e5(e?.methods)?e5(e?.events)||(i=eH("UNSUPPORTED_EVENTS",`${r}, events should be an array of strings or empty array for no events`)):i=eH("UNSUPPORTED_METHODS",`${r}, methods should be an array of strings or empty array for no methods`),i);a&&(n=a)}),n}function e4(e,t,n){let r=null;if(e&&eY(e)){let i;let a=e8(e,t);a&&(r=a);let o=(i=null,Object.entries(e).forEach(([e,r])=>{var a,o;let s;if(i)return;let c=(a=S(e,r),o=`${t} ${n}`,s=null,eV(a)&&a.length?a.forEach(e=>{s||e0(e)||(s=eH("UNSUPPORTED_CHAINS",`${o}, chain ${e} should be a string and conform to "namespace:chainId" format`))}):e0(e)||(s=eH("UNSUPPORTED_CHAINS",`${o}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),s);c&&(i=c)}),i);o&&(r=o)}else r=eK("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return r}function e9(e,t){let n=null;if(e&&eY(e)){let r;let i=e8(e,t);i&&(n=i);let a=(r=null,Object.values(e).forEach(e=>{var n,i;let a;if(r)return;let o=(n=e?.accounts,i=`${t} namespace`,a=null,eV(n)?n.forEach(e=>{a||function(e){if(eX(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&e0(e)}}return!1}(e)||(a=eH("UNSUPPORTED_ACCOUNTS",`${i}, account ${e} should be a string and conform to "namespace:chainId:address" format`))}):a=eH("UNSUPPORTED_ACCOUNTS",`${i}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),a);o&&(r=o)}),r);a&&(n=a)}else n=eK("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function e7(e){return eX(e.protocol,!0)}function te(e,t){let n=!1;return t&&!e?n=!0:e&&eV(e)&&e.length&&e.forEach(e=>{n=e7(e)}),n}function tt(e){return"number"==typeof e}function tn(e){return"u">typeof e}function tr(e){return!(!e||"object"!=typeof e||!e.code||!eZ(e.code,!1)||!e.message||!eX(e.message,!1))}function ti(e){return!(eQ(e)||!eX(e.method,!1))}function ta(e){return!(eQ(e)||eQ(e.result)&&eQ(e.error)||!eZ(e.id,!1)||!eX(e.jsonrpc,!1))}function to(e){return!(eQ(e)||!eX(e.name,!1))}function ts(e,t){return!(!e0(t)||!(function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...eF(e.accounts))}),t})(e).includes(t))}function tc(e,t,n){return!!eX(n,!1)&&(function(e,t){let n=[];return Object.values(e).forEach(e=>{eF(e.accounts).includes(t)&&n.push(...e.methods)}),n})(e,t).includes(n)}function tu(e,t,n){return!!eX(n,!1)&&(function(e,t){let n=[];return Object.values(e).forEach(e=>{eF(e.accounts).includes(t)&&n.push(...e.events)}),n})(e,t).includes(n)}function tl(e,t,n){let r=null,i=function(e){let t={};return Object.keys(e).forEach(n=>{var r;n.includes(":")?t[n]=e[n]:null==(r=e[n].chains)||r.forEach(r=>{t[r]={methods:e[n].methods,events:e[n].events}})}),t}(e),a=function(e){let t={};return Object.keys(e).forEach(n=>{if(n.includes(":"))t[n]=e[n];else{let r=eF(e[n].accounts);r?.forEach(r=>{t[r]={accounts:e[n].accounts.filter(e=>e.includes(`${r}:`)),methods:e[n].methods,events:e[n].events}})}}),t}(t),o=Object.keys(i),s=Object.keys(a),c=td(Object.keys(e)),u=td(Object.keys(t)),l=c.filter(e=>!u.includes(e));return l.length&&(r=eK("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces. Required: ${l.toString()} Received: ${Object.keys(t).toString()}`)),ea(o,s)||(r=eK("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces. Required: ${o.toString()} Approved: ${s.toString()}`)),Object.keys(t).forEach(e=>{if(!e.includes(":")||r)return;let i=eF(t[e].accounts);i.includes(e)||(r=eK("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${e} Required: ${e} Approved: ${i.toString()}`))}),o.forEach(e=>{r||(ea(i[e].methods,a[e].methods)?ea(i[e].events,a[e].events)||(r=eK("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${e}`)):r=eK("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${e}`))}),r}function td(e){return[...new Set(e.map(e=>e.includes(":")?e.split(":")[0]:e))]}function th(e,t){return eZ(e,!1)&&e<=t.max&&e>=t.min}function tf(){let e=et();return new Promise(t=>{switch(e){case X.browser:t(ee()&&navigator?.onLine);break;case X.reactNative:t(tp());break;case X.node:default:t(!0)}})}async function tp(){if(J()&&"u">typeof n.g&&null!=n.g&&n.g.NetInfo){let e=await (null==n.g?void 0:n.g.NetInfo.fetch());return e?.isConnected}return!0}function tm(e){switch(et()){case X.browser:!J()&&ee()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)));break;case X.reactNative:J()&&"u">typeof n.g&&null!=n.g&&n.g.NetInfo&&n.g?.NetInfo.addEventListener(t=>e(t?.isConnected));case X.node:}}let tb={};class tg{static get(e){return tb[e]}static set(e,t){tb[e]=t}static delete(e){delete tb[e]}}},66151:function(e,t,n){"use strict";let r=n(70610),i=n(44020),a=n(80500),o=n(92806),s=e=>null==e,c=Symbol("encodeFragmentIdentifier");function u(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function d(e,t){return t.decode?i(e):e}function h(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function f(e){let t=(e=h(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function m(e,t){u((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){r[e]=n;return}void 0===r[e]&&(r[e]={}),r[e][t[1]]=n};case"bracket":return(e,n,r)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}r[e]=[].concat(r[e],n)};case"colon-list-separator":return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){r[e]=n;return}if(void 0===r[e]){r[e]=[n];return}r[e]=[].concat(r[e],n)};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),a="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=a?d(n,e):n;let o=i||a?n.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===n?n:d(n,e);r[t]=o};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i){r[t]=n?d(n,e):n;return}let a=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===r[t]){r[t]=a;return}r[t]=[].concat(r[t],a)};default:return(e,t,n)=>{if(void 0===n[e]){n[e]=t;return}n[e]=[].concat(n[e],t)}}}(t),r=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return r;for(let i of e.split("&")){if(""===i)continue;let[e,o]=a(t.decode?i.replace(/\+/g," "):i,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:d(o,t),n(d(e,t),o,r)}for(let e of Object.keys(r)){let n=r[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=p(n[e],t);else r[e]=p(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{let n=r[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=f,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";u((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=n=>t.skipNull&&s(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),":list="].join("")]:[...n,[l(t,e),":list=",l(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length)?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)]}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map(n=>{let i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,r]=a(e,"#");return Object.assign({url:n.split("?")[0]||"",query:m(f(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:d(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[c]:!0},n);let r=h(e.url).split("?")[0]||"",i=t.extract(e.url),a=Object.assign(t.parse(i,{sort:!1}),e.query),o=t.stringify(a,n);o&&(o=`?${o}`);let s=function(e){let t="",n=e.indexOf("#");return -1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(s=`#${n[c]?l(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${o}${s}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[c]:!1},r);let{url:i,query:a,fragmentIdentifier:s}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:o(a,n),fragmentIdentifier:s},r)},t.exclude=(e,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},62873:function(e,t){"use strict";function n(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function r(e){let t=n(e);if(!t)throw Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},65755:function(e,t,n){"use strict";t.D=void 0;let r=n(62873);t.D=function(){let e,t,n;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(e){return null}function i(...t){let n=e.getElementsByTagName("meta");for(let e=0;er.getAttribute(e)).filter(e=>!!e&&t.includes(e));if(i.length&&i){let e=r.getAttribute("content");if(e)return e}}return""}let a=((n=i("name","og:site_name","og:title","twitter:title"))||(n=e.title),n),o=i("description","og:description","twitter:description","keywords");return{description:o,url:t.origin,icons:function(){let n=e.getElementsByTagName("link"),r=[];for(let e=0;e-1){let e=i.getAttribute("href");if(e){if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{let r=t.pathname.split("/");r.pop(),n+=r.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){let n=t.protocol+e;r.push(n)}else r.push(e)}}}return r}(),name:a}}},44020:function(e){"use strict";var t="%[a-f0-9]{2}",n=RegExp("("+t+")|([^%]+?)","gi"),r=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},i=r.exec(e);i;){try{t[i[0]]=decodeURIComponent(i[0])}catch(e){var a=function(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n)||[],r=1;r({width:300,height:220,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"请在下图依次点击",buttonText:"确认",iconSize:22,dotSize:24}),u=e=>(0,r.createElement)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:26,height:26},e),(0,r.createElement)("path",{d:"M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9\n c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9\n c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1\n c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9\n C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3\n L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0\n c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3\n c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z"})),l=e=>(0,r.createElement)("svg",Object.assign({width:26,height:26},e,{viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg"}),(0,r.createElement)("path",{d:"M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6\n c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4\n c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1\n c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9\n c-0.2-0.3-0.5-0.5-0.9-0.5c-0.4,0-0.7,0.2-0.9,0.5L3.8,97.3c-0.2,0.3-0.2,0.7,0,1.1c0.2,0.3,0.5,0.5,0.9,0.5h14.3\n c0,17.2,5.3,33.2,14.3,46.4c0.1,0.2,0.2,0.4,0.3,0.6c0.9,1.4,2,2.6,3,3.9c0.4,0.5,0.7,1,1.1,1.5c1.5,1.8,3,3.5,4.6,5.2\n c0.2,0.2,0.3,0.3,0.5,0.5c5.4,5.5,11.5,10.1,18.2,13.8c0.2,0.1,0.3,0.2,0.5,0.3c1.9,1,3.9,2,5.9,2.9c0.5,0.2,1,0.5,1.5,0.7\n c1.7,0.7,3.5,1.3,5.2,1.9c0.8,0.3,1.7,0.6,2.5,0.8c1.5,0.5,3.1,0.8,4.7,1.2c1.1,0.2,2.1,0.5,3.2,0.7c0.4,0.1,0.9,0.2,1.3,0.3\n c1.5,0.3,3,0.4,4.5,0.6c0.5,0.1,1.1,0.2,1.6,0.2c2.7,0.3,5.4,0.4,8.1,0.4c16.4,0,32.5-5.1,46.2-14.8c4.4-3.1,5.5-9.2,2.4-13.7\n C145.5,147.8,139.4,146.7,135,149.9 M180.6,98.9c0-17.2-5.3-33.1-14.2-46.3c-0.1-0.2-0.2-0.5-0.4-0.7c-1.1-1.6-2.3-3.1-3.5-4.6\n c-0.1-0.2-0.3-0.4-0.4-0.6c-8.2-10.1-18.5-17.9-30.2-23c-0.3-0.1-0.6-0.3-1-0.4c-1.9-0.8-3.8-1.5-5.7-2.1c-0.7-0.2-1.4-0.5-2.1-0.7\n c-1.7-0.5-3.4-0.9-5.1-1.3c-0.9-0.2-1.9-0.5-2.8-0.7c-0.5-0.1-0.9-0.2-1.4-0.3c-1.3-0.2-2.6-0.3-3.8-0.5c-0.9-0.1-1.8-0.3-2.6-0.3\n c-2.1-0.2-4.3-0.3-6.4-0.3c-0.4,0-0.8-0.1-1.2-0.1c-0.1,0-0.1,0-0.2,0c-16.4,0-32.4,5-46.2,14.8C49,35,48,41.1,51,45.6\n c3.1,4.4,9.1,5.5,13.5,2.4c10.6-7.5,23-11.3,35.7-11.2c1.8,0,3.6,0.1,5.4,0.3c0.6,0.1,1.1,0.1,1.6,0.2c1.5,0.2,2.9,0.4,4.3,0.7\n c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2\n c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4\n c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9\n L180.6,98.9z"})),d=e=>(0,r.createElement)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:84,height:84},e),(0,r.createElement)("circle",{cx:"50",cy:"36.8101",r:"10",fill:"#3e7cff"},(0,r.createElement)("animate",{attributeName:"cy",dur:"1s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.45 0 0.9 0.55;0 0.45 0.55 0.9",keyTimes:"0;0.5;1",values:"23;77;23"})));function h(e,t){let n=t.relatedTarget;try{for(;n&&n!==e;)n=n.parentNode}catch(e){console.warn(e)}return n!==e}let f=(e,t,n)=>{let[i,a]=(0,r.useState)([]),o=(0,r.useCallback)(()=>{a([])},[a]),s=(0,r.useCallback)(e=>{let n=function(e){let t=0,n=0;if(e.getBoundingClientRect){let r=e.getBoundingClientRect(),i=document.documentElement;t=r.left+Math.max(i.scrollLeft,document.body.scrollLeft)-i.clientLeft,n=r.top+Math.max(i.scrollTop,document.body.scrollTop)-i.clientTop}else for(;e!==document.body;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{domX:t,domY:n}}(e.currentTarget),r=e.pageX||e.clientX,o=e.pageY||e.clientY,s=n.domX,c=n.domY,u=parseInt((r-s).toString()),l=parseInt((o-c).toString()),d=new Date,h=i.length;return a([...i,{key:d.getTime(),index:h+1,x:u,y:l}]),t.click&&t.click(u,l),e.cancelBubble=!0,e.preventDefault(),!1},[i,t]),c=(0,r.useCallback)(e=>(t.confirm&&t.confirm(i,()=>{o()}),e.cancelBubble=!0,e.preventDefault(),!1),[i,t,o]),u=(0,r.useCallback)(()=>i,[i]),l=(0,r.useCallback)(()=>{o(),n&&n()},[o,n]),d=(0,r.useCallback)(()=>{t.close&&t.close(),o()},[t,o]),h=(0,r.useCallback)(()=>{t.refresh&&t.refresh(),o()},[o]);return{setDots:a,getDots:u,clickEvent:s,confirmEvent:c,closeEvent:(0,r.useCallback)(e=>(d(),e.cancelBubble=!0,e.preventDefault(),!1),[d]),refreshEvent:(0,r.useCallback)(e=>(h(),e.cancelBubble=!0,e.preventDefault(),!1),[t,h]),resetData:o,clearData:l,close:d,refresh:h}},p=(0,r.forwardRef)((e,t)=>{let[n,i]=(0,r.useState)({...c(),...e.config||{}}),[o,h]=(0,r.useState)({...e.data||{}}),[p,m]=(0,r.useState)({...e.events||{}});(0,r.useEffect)(()=>{i({...n,...e.config||{}})},[e.config,i]),(0,r.useEffect)(()=>{h({...o,...e.data||{}})},[e.data,h]),(0,r.useEffect)(()=>{m({...p,...e.events||{}})},[e.events,m]);let b=f(o,p,()=>{h({...o,thumb:"",image:""})}),g=n.horizontalPadding||0,y=n.verticalPadding||0,v=(n.width||0)+2*g+(n.showTheme?2:0),w=(n.width||0)>0||(n.height||0)>0,E=o.image&&o.image.length>0&&o.thumb&&o.thumb.length>0;return(0,r.useImperativeHandle)(t,()=>({reset:b.resetData,clear:b.clearData,refresh:b.refresh,close:b.close})),r.createElement("div",{className:a()(s.wrapper,n.showTheme?s.theme:""),style:{width:v+"px",paddingLeft:g+"px",paddingRight:g+"px",paddingTop:y+"px",paddingBottom:y+"px",display:w?"block":"none"}},r.createElement("div",{className:s.header},r.createElement("span",null,n.title),r.createElement("img",{className:""==o.thumb?s.hide:"",style:{width:n.thumbWidth+"px",height:n.thumbHeight+"px",display:E?"block":"none"},src:o.thumb,alt:""})),r.createElement("div",{className:s.body,style:{width:n.width+"px",height:n.height+"px"}},r.createElement("div",{className:s.loading},r.createElement(d,null)),r.createElement("img",{className:a()(s.picture,""==o.image?s.hide:""),style:{width:n.width+"px",height:n.height+"px",display:E?"block":"none"},src:o.image,alt:"",onClick:b.clickEvent}),r.createElement("div",{className:"index-module_dots__2OJFw"},b.getDots().map(e=>r.createElement("div",{className:"dot",style:{width:n.dotSize+"px",height:n.dotSize+"px",borderRadius:n.dotSize+"px",top:e.y-(n.dotSize||1)/2-1+"px",left:e.x-(n.dotSize||1)/2-1+"px"},key:e.key+"-"+e.index},e.index)))),r.createElement("div",{className:s.footer},r.createElement("div",{className:a()(s.iconBlock,"index-module_iconBlock__Y1IUb")},r.createElement(u,{width:n.iconSize,height:n.iconSize,onClick:b.closeEvent}),r.createElement(l,{width:n.iconSize,height:n.iconSize,onClick:b.refreshEvent})),r.createElement("div",{className:s.buttonBlock},r.createElement("button",{className:a()(!E&&s.disabled),onClick:b.confirmEvent},n.buttonText))))});var m=r.memo(p);o("/**\n * @Author Awen\n * @Date 2024/06/01\n * @Email wengaolng@gmail.com\n **/\n.index-module_tile__8pkQD {\n position: absolute;\n z-index: 2;\n cursor: pointer;\n}\n.index-module_tile__8pkQD img {\n display: block;\n cursor: pointer;\n width: 100%;\n height: 100%;\n}\n");let b=e=>(0,r.createElement)("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),(0,r.createElement)("path",{d:"M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0\n s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9\n c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z"})),g=()=>({thumbX:0,thumbY:0,thumbWidth:0,thumbHeight:0,image:"",thumb:""}),y=()=>({width:300,height:220,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"请拖动滑块完成拼图",iconSize:22,scope:!0}),v=(e,t,n,i,a,o,s,c,u)=>{let[l,d]=(0,r.useState)(0),[f,p]=(0,r.useState)(e.thumbX||0),[m,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{m||p(e.thumbX||0)},[e,p]);let g=(0,r.useCallback)(()=>{d(0),p(e.thumbX||0)},[d,p,e.thumbX]),y=(0,r.useCallback)(r=>{if(!h(c.current,r))return;let u=r.touches&&r.touches[0],l=s.current.offsetLeft,f=a.current.offsetWidth,m=f-s.current.offsetWidth,y=o.current.offsetWidth,v=o.current.offsetLeft,w=f-y,E=(f-(y+v))/m,_=!1,D=null,C=0,x=0;C=u?u.pageX-l:r.clientX-l;let O=n=>{_=!0;let r=n.touches&&n.touches[0],i=0,a=v+(i=r?r.pageX-C:n.clientX-C)*E;if(i>=m){d(m),p(x=w);return}if(i<=0){d(0),p(x=v);return}d(i),p(x=x=a),t.move&&t.move(x,e.thumbY||0),n.cancelBubble=!0,n.preventDefault()},S=n=>{h(c.current,n)&&(M(),_)&&(_=!1,x<0||(t.confirm&&t.confirm({x:parseInt(x.toString()),y:e.thumbY||0},()=>{g()}),n.cancelBubble=!0,n.preventDefault()))},P=e=>{D=e},k=()=>{D=null},I=e=>{D&&(S(D),M())},A=n.scope,j=A?i.current:c.current,N=A?i.current:document.body,M=()=>{N.removeEventListener("mousemove",O,!1),N.removeEventListener("touchmove",O,{passive:!1}),j.removeEventListener("mouseup",S,!1),j.removeEventListener("mouseenter",k,!1),j.removeEventListener("mouseleave",P,!1),j.removeEventListener("touchend",S,!1),N.removeEventListener("mouseleave",S,!1),N.removeEventListener("mouseup",I,!1),b(!1)};b(!0),N.addEventListener("mousemove",O,!1),N.addEventListener("touchmove",O,{passive:!1}),j.addEventListener("mouseup",S,!1),j.addEventListener("mouseenter",k,!1),j.addEventListener("mouseleave",P,!1),j.addEventListener("touchend",S,!1),N.addEventListener("mouseleave",S,!1),N.addEventListener("mouseup",I,!1)},[i,s,a,n,e,o,c,t,g]),v=(0,r.useCallback)(()=>{g(),u&&u()},[g,u]),w=(0,r.useCallback)(()=>{t.close&&t.close(),g()},[t,g]),E=(0,r.useCallback)(()=>{t.refresh&&t.refresh(),g()},[t,g]),_=(0,r.useCallback)(e=>(w(),e.cancelBubble=!0,e.preventDefault(),!1),[w]),D=(0,r.useCallback)(e=>(E(),e.cancelBubble=!0,e.preventDefault(),!1),[E]),C=(0,r.useCallback)(()=>({x:f,y:e.thumbY||0}),[e,f]);return{getState:(0,r.useCallback)(()=>({dragLeft:l,thumbLeft:f}),[f,l]),getPoint:C,dragEvent:y,closeEvent:_,refreshEvent:D,resetData:g,clearData:v,close:w,refresh:E}},w=(0,r.forwardRef)((e,t)=>{let[n,i]=(0,r.useState)({...y(),...e.config||{}}),[o,c]=(0,r.useState)({...g(),...e.data||{}}),[h,f]=(0,r.useState)({...e.events||{}});(0,r.useEffect)(()=>{i({...n,...e.config||{}})},[e.config,i]),(0,r.useEffect)(()=>{c({...o,...e.data||{}})},[e.data,c]),(0,r.useEffect)(()=>{f({...h,...e.events||{}})},[e.events,f]);let p=(0,r.useRef)(null),m=(0,r.useRef)(null),w=(0,r.useRef)(null),E=(0,r.useRef)(null),_=(0,r.useRef)(null),D=v(o,h,n,p,w,_,E,m,()=>{c({...o,...g()})}),C=n.horizontalPadding||0,x=n.verticalPadding||0,O=(n.width||0)+2*C+(n.showTheme?2:0),S=(n.width||0)>0||(n.height||0)>0,P=o.image&&o.image.length>0&&o.thumb&&o.thumb.length>0;return(0,r.useImperativeHandle)(t,()=>({reset:D.resetData,clear:D.clearData,refresh:D.refresh,close:D.close})),(0,r.useEffect)(()=>{let e=e=>e.preventDefault();return E.current&&E.current.addEventListener("dragstart",e),()=>{E.current&&E.current.removeEventListener("dragstart",e)}},[E]),r.createElement("div",{className:a()(s.wrapper,n.showTheme?s.theme:""),style:{width:O+"px",paddingLeft:C+"px",paddingRight:C+"px",paddingTop:x+"px",paddingBottom:x+"px",display:S?"block":"none"},ref:p},r.createElement("div",{className:s.header},r.createElement("span",null,n.title),r.createElement("div",{className:s.iconBlock},r.createElement(u,{width:n.iconSize,height:n.iconSize,onClick:D.closeEvent}),r.createElement(l,{width:n.iconSize,height:n.iconSize,onClick:D.refreshEvent}))),r.createElement("div",{className:s.body,ref:w,style:{width:n.width+"px",height:n.height+"px"}},r.createElement("div",{className:s.loading},r.createElement(d,null)),r.createElement("img",{className:a()(s.picture,""==o.image?s.hide:""),style:{width:n.width+"px",height:n.height+"px",display:P?"block":"none"},src:o.image,alt:""}),r.createElement("div",{className:"index-module_tile__8pkQD",ref:_,style:{width:(o.thumbWidth||0)+"px",height:(o.thumbHeight||0)+"px",top:(o.thumbY||0)+"px",left:D.getState().thumbLeft+"px"}},r.createElement("img",{className:""==o.thumb?s.hide:"",style:{display:P?"block":"none"},src:o.thumb,alt:""}))),r.createElement("div",{className:s.footer},r.createElement("div",{className:s.dragSlideBar,ref:m},r.createElement("div",{className:s.dragLine}),r.createElement("div",{className:a()(s.dragBlock,!P&&s.disabled),ref:E,onMouseDown:D.dragEvent,style:{left:D.getState().dragLeft+"px"}},r.createElement("div",{className:s.dragBlockInline,onTouchStart:D.dragEvent},r.createElement(b,null))))))});var E=r.memo(w),_={header:"index-module_header__jVeEs",tile:"index-module_tile__VR9Ut"};o("/**\n * @Author Awen\n * @Date 2024/06/01\n * @Email wengaolng@gmail.com\n **/\n.index-module_header__jVeEs {\n text-align: center;\n}\n.index-module_tile__VR9Ut {\n position: absolute;\n z-index: 2;\n cursor: pointer;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.index-module_tile__VR9Ut img {\n display: block;\n cursor: pointer;\n width: 100%;\n height: 100%;\n}\n");let D=()=>({width:300,height:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"请拖动滑块完成拼图",iconSize:22,scope:!0}),C=(e,t,n,i,a,o,s)=>{let[c,u]=(0,r.useState)({x:e.thumbX||0,y:e.thumbY||0}),[l,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{l||u({x:e.thumbX||0,y:e.thumbY||0})},[e,u]);let f=(0,r.useCallback)(()=>{u({x:e.thumbX||0,y:e.thumbY||0})},[e.thumbX,e.thumbY,u]),p=(0,r.useCallback)(e=>{if(!h(a.current,e))return;let r=e.touches&&e.touches[0],s=o.current.offsetLeft,c=o.current.offsetTop,l=a.current.offsetWidth,p=a.current.offsetHeight,m=o.current.offsetWidth,b=o.current.offsetHeight,g=l-m,y=p-b,v=!1,w=null,E=0,_=0,D=0,C=0;r?(E=r.pageX-s,_=r.pageY-c):(E=e.clientX-s,_=e.clientY-c);let x=e=>{v=!0;let n=e.touches&&e.touches[0],r=0,i=0;n?(r=n.pageX-E,i=n.pageY-_):(r=e.clientX-E,i=e.clientY-_),r<=0&&(r=0),i<=0&&(i=0),r>=g&&(r=g),i>=y&&(i=y),u({x:r,y:i}),D=r,C=i,t.move&&t.move(r,i),e.cancelBubble=!0,e.preventDefault()},O=e=>{h(a.current,e)&&(N(),v)&&(v=!1,D<0||C<0||(t.confirm&&t.confirm({x:D,y:C},()=>{f()}),e.cancelBubble=!0,e.preventDefault()))},S=e=>{w=e},P=()=>{w=null},k=e=>{w&&(O(w),N())},I=n.scope,A=I?i.current:a.current,j=I?i.current:document.body,N=()=>{j.removeEventListener("mousemove",x,!1),j.removeEventListener("touchmove",x,{passive:!1}),A.removeEventListener("mouseup",O,!1),A.removeEventListener("mouseenter",P,!1),A.removeEventListener("mouseleave",S,!1),A.removeEventListener("touchend",O,!1),j.removeEventListener("mouseleave",O,!1),j.removeEventListener("mouseup",k,!1),d(!1)};d(!0),j.addEventListener("mousemove",x,!1),j.addEventListener("touchmove",x,{passive:!1}),A.addEventListener("mouseup",O,!1),A.addEventListener("mouseenter",P,!1),A.addEventListener("mouseleave",S,!1),A.addEventListener("touchend",O,!1),j.addEventListener("mouseleave",O,!1),j.addEventListener("mouseup",k,!1)},[i,a,o,n,t,d,f]),m=(0,r.useCallback)(()=>{f(),s&&s()},[f,s]),b=(0,r.useCallback)(()=>{t.close&&t.close(),f()},[t,f]),g=(0,r.useCallback)(()=>{t.refresh&&t.refresh(),f()},[t,f]);return{thumbPoint:c,dragEvent:p,closeEvent:(0,r.useCallback)(e=>(b(),e.cancelBubble=!0,e.preventDefault(),!1),[b]),refreshEvent:(0,r.useCallback)(e=>(g(),e.cancelBubble=!0,e.preventDefault(),!1),[g]),resetData:f,clearData:m,close:b,refresh:g}},x=()=>({thumbX:0,thumbY:0,thumbWidth:0,thumbHeight:0,image:"",thumb:""}),O=(0,r.forwardRef)((e,t)=>{let[n,i]=(0,r.useState)({...D(),...e.config||{}}),[o,c]=(0,r.useState)({...x(),...e.data||{}}),[h,f]=(0,r.useState)({...e.events||{}});(0,r.useEffect)(()=>{i({...n,...e.config||{}})},[e.config,i]),(0,r.useEffect)(()=>{c({...o,...e.data||{}})},[e.data,c]),(0,r.useEffect)(()=>{f({...h,...e.events||{}})},[e.events,f]);let p=(0,r.useRef)(null),m=(0,r.useRef)(null),b=(0,r.useRef)(null),g=C(o,h,n,p,m,b,()=>{c({...o,...x()})}),y=n.horizontalPadding||0,v=n.verticalPadding||0,w=(n.width||0)+2*y+(n.showTheme?2:0),E=(n.width||0)>0||(n.height||0)>0,O=o.image&&o.image.length>0&&o.thumb&&o.thumb.length>0;return(0,r.useImperativeHandle)(t,()=>({reset:g.resetData,clear:g.clearData,refresh:g.refresh,close:g.close})),(0,r.useEffect)(()=>{let e=e=>e.preventDefault();return b.current&&b.current.addEventListener("dragstart",e),()=>{b.current&&b.current.removeEventListener("dragstart",e)}},[b]),r.createElement("div",{className:a()(s.wrapper,_.wrapper,n.showTheme?s.theme:""),style:{width:w+"px",paddingLeft:y+"px",paddingRight:y+"px",paddingTop:v+"px",paddingBottom:v+"px",display:E?"block":"none"},ref:p},r.createElement("div",{className:a()(s.header,_.header)},r.createElement("span",null,n.title)),r.createElement("div",{className:s.body,ref:m,style:{width:n.width+"px",height:n.height+"px"}},r.createElement("div",{className:s.loading},r.createElement(d,null)),r.createElement("img",{className:a()(s.picture,""==o.image?s.hide:""),src:o.image,style:{width:n.width+"px",height:n.height+"px",display:O?"block":"none"},alt:""}),r.createElement("div",{className:_.tile,ref:b,style:{width:(o.thumbWidth||0)+"px",height:(o.thumbHeight||0)+"px",top:g.thumbPoint.y+"px",left:g.thumbPoint.x+"px"},onMouseDown:g.dragEvent,onTouchStart:g.dragEvent},r.createElement("img",{className:""==o.thumb?s.hide:"",style:{display:O?"block":"none"},src:o.thumb,alt:""}))),r.createElement("div",{className:s.footer},r.createElement("div",{className:s.iconBlock},r.createElement(u,{width:n.iconSize,height:n.iconSize,onClick:g.closeEvent}),r.createElement(l,{width:n.iconSize,height:n.iconSize,onClick:g.refreshEvent}))))});var S=r.memo(O),P={body:"index-module_body__5eTaZ",bodyInner:"index-module_bodyInner__Lb3mp",picture:"index-module_picture__M-qbX",round:"index-module_round__zaOPS",thumb:"index-module_thumb__jChIh",thumbBlock:"index-module_thumbBlock__u3U1X"};o("/**\n * @Author Awen\n * @Date 2024/06/01\n * @Email wengaolng@gmail.com\n **/\n.index-module_body__5eTaZ {\n background: transparent !important;\n display: flex;\n display: -webkit-flex;\n justify-content: center;\n align-items: center;\n margin: 10px auto 0;\n}\n.index-module_bodyInner__Lb3mp {\n border-radius: 100%;\n}\n.index-module_picture__M-qbX {\n position: relative;\n max-width: 100%;\n max-height: 100%;\n z-index: 2;\n border-radius: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.index-module_picture__M-qbX img {\n max-width: 100%;\n max-height: 100%;\n}\n.index-module_round__zaOPS {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 100%;\n z-index: 2;\n border: 6px solid #e0e0e0;\n border-color: var(--go-captcha-theme-round-color);\n}\n.index-module_thumb__jChIh {\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.index-module_thumb__jChIh img {\n max-width: 100%;\n max-height: 100%;\n}\n.index-module_thumbBlock__u3U1X {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n");let k=()=>({width:300,height:220,size:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"请拖动滑块完成拼图",iconSize:22,scope:!0}),I=(e,t,n,i,a,o,s)=>{let[c,u]=(0,r.useState)(0),[l,d]=(0,r.useState)(e.angle||0),[f,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{f||d(e.angle||0)},[e,d]);let m=(0,r.useCallback)(()=>{u(0),d(e.angle||0)},[e.angle,u,d]),b=(0,r.useCallback)(r=>{if(!h(o.current,r))return;let s=r.touches&&r.touches[0],c=a.current.offsetLeft,l=o.current.offsetWidth-a.current.offsetWidth,f=(360-e.angle)/l,b=0,g=!1,y=null,v=0,w=0;v=s?s.pageX-c:r.clientX-c;let E=n=>{g=!0;let r=n.touches&&n.touches[0],i=0;if(i=r?r.pageX-v:n.clientX-v,b=e.angle+i*f,i>=l){u(l),d(w=360);return}if(i<=0){u(0),d(w=e.angle);return}u(i),w=b,d(b),t.rotate&&t.rotate(b),n.cancelBubble=!0,n.preventDefault()},_=e=>{h(o.current,e)&&(k(),g)&&(g=!1,w<0||(t.confirm&&t.confirm(parseInt(w.toString()),()=>{m()}),e.cancelBubble=!0,e.preventDefault()))},D=e=>{y=e},C=()=>{y=null},x=e=>{y&&(_(y),k())},O=n.scope,S=O?i.current:o.current,P=O?i.current:document.body,k=()=>{P.removeEventListener("mousemove",E,!1),P.removeEventListener("touchmove",E,{passive:!1}),S.removeEventListener("mouseup",_,!1),S.removeEventListener("mouseenter",C,!1),S.removeEventListener("mouseleave",D,!1),S.removeEventListener("touchend",_,!1),P.removeEventListener("mouseleave",_,!1),P.removeEventListener("mouseup",x,!1),p(!1)};p(!0),P.addEventListener("mousemove",E,!1),P.addEventListener("touchmove",E,{passive:!1}),S.addEventListener("mouseup",_,!1),S.addEventListener("mouseenter",C,!1),S.addEventListener("mouseleave",D,!1),S.addEventListener("touchend",_,!1),P.addEventListener("mouseleave",_,!1),P.addEventListener("mouseup",x,!1)},[i,a,o,n,e,t,m]),g=(0,r.useCallback)(()=>{m(),s&&s()},[m,s]),y=(0,r.useCallback)(()=>{t.close&&t.close(),m()},[t,m]),v=(0,r.useCallback)(()=>{t.refresh&&t.refresh(),m()},[t,m]),w=(0,r.useCallback)(e=>(y(),e.cancelBubble=!0,e.preventDefault(),!1),[y]),E=(0,r.useCallback)(e=>(v(),e.cancelBubble=!0,e.preventDefault(),!1),[v]);return{getState:(0,r.useCallback)(()=>({dragLeft:c,thumbAngle:l}),[l,c]),thumbAngle:l,dragEvent:b,closeEvent:w,refreshEvent:E,resetData:m,clearData:g,close:y,refresh:v}},A=()=>({angle:0,image:"",thumb:"",thumbSize:0}),j=(0,r.forwardRef)((e,t)=>{let[n,i]=(0,r.useState)({...k(),...e.config||{}}),[o,c]=(0,r.useState)({...A(),...e.data||{}}),[h,f]=(0,r.useState)({...e.events||{}});(0,r.useEffect)(()=>{i({...n,...e.config||{}})},[e.config,i]),(0,r.useEffect)(()=>{c({...o,...e.data||{}})},[e.data,c]),(0,r.useEffect)(()=>{f({...h,...e.events||{}})},[e.events,f]);let p=(0,r.useRef)(null),m=(0,r.useRef)(null),g=(0,r.useRef)(null),y=I(o,h,n,p,g,m,()=>{c({...o,...A()})}),v=n.horizontalPadding||0,w=n.verticalPadding||0,E=(n.width||0)+2*v+(n.showTheme?2:0),_=(n.size||0)>0?n.size:k().size,D=(n.width||0)>0||(n.height||0)>0,C=o.image&&o.image.length>0&&o.thumb&&o.thumb.length>0;return(0,r.useImperativeHandle)(t,()=>({reset:y.resetData,clear:y.clearData,refresh:y.refresh,close:y.close})),(0,r.useEffect)(()=>{let e=e=>e.preventDefault();return g.current&&g.current.addEventListener("dragstart",e),()=>{g.current&&g.current.removeEventListener("dragstart",e)}},[g]),r.createElement("div",{className:a()(s.wrapper,P.wrapper,n.showTheme?s.theme:""),style:{width:E+"px",paddingLeft:v+"px",paddingRight:v+"px",paddingTop:w+"px",paddingBottom:w+"px",display:D?"block":"none"},ref:p},r.createElement("div",{className:s.header},r.createElement("span",null,n.title),r.createElement("div",{className:s.iconBlock},r.createElement(u,{width:n.iconSize,height:n.iconSize,onClick:y.closeEvent}),r.createElement(l,{width:n.iconSize,height:n.iconSize,onClick:y.refreshEvent}))),r.createElement("div",{className:a()(s.body,P.body),style:{width:n.width+"px",height:n.height+"px"}},r.createElement("div",{className:a()(P.bodyInner,s.bodyInner),style:{width:_+"px",height:_+"px"}},r.createElement("div",{className:s.loading},r.createElement(d,null)),r.createElement("div",{className:P.picture,style:{width:n.size+"px",height:n.size+"px"}},r.createElement("img",{className:""==o.image?s.hide:"",src:o.image,style:{display:C?"block":"none"},alt:""}),r.createElement("div",{className:P.round})),r.createElement("div",{className:P.thumb},r.createElement("div",{className:P.thumbBlock,style:{transform:"rotate("+y.getState().thumbAngle+"deg)",...o.thumbSize>0?{width:o.thumbSize+"px",height:o.thumbSize+"px"}:{}}},r.createElement("img",{className:""==o.thumb?s.hide:"",src:o.thumb,style:{visibility:C?"visible":"hidden"},alt:""}))))),r.createElement("div",{className:s.footer},r.createElement("div",{className:s.dragSlideBar,ref:m},r.createElement("div",{className:s.dragLine}),r.createElement("div",{className:a()(s.dragBlock,!C&&s.disabled),ref:g,onMouseDown:y.dragEvent,style:{left:y.getState().dragLeft+"px"}},r.createElement("div",{className:s.dragBlockInline,onTouchStart:y.dragEvent},r.createElement(b,null))))))});var N=r.memo(j);let M=()=>({width:330,height:44,verticalPadding:12,horizontalPadding:16});var T={btnBlock:"index-module_btnBlock__L96Vx",disabled:"index-module_disabled__U5sNo",default:"index-module_default__r2sQq",error:"index-module_error__mCm6a",warn:"index-module_warn__CT1sW",success:"index-module_success__61kOU",ripple:"index-module_ripple__KF4IK"};o('/**\n * @Author Awen\n * @Date 2024/06/01\n * @Email wengaolng@gmail.com\n **/\n.index-module_btnBlock__L96Vx {\n position: relative;\n box-sizing: border-box;\n display: block;\n font-size: 13px;\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n letter-spacing: 1px;\n border-radius: 5px;\n line-height: 1;\n white-space: nowrap;\n -webkit-appearance: none;\n outline: none;\n margin: 0;\n transition: 0.1s;\n font-weight: 500;\n -moz-user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n justify-items: center;\n box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);\n -webkit-box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);\n -moz-box-shadow: 0 0 20px rgba(62, 124, 255, 0.1);\n}\n.index-module_btnBlock__L96Vx span {\n padding-left: 8px;\n}\n.index-module_disabled__U5sNo {\n pointer-events: none;\n}\n.index-module_default__r2sQq {\n color: var(--go-captcha-theme-default-color);\n border: 1px solid #50a1ff;\n border-color: var(--go-captcha-theme-default-border-color);\n background-color: var(--go-captcha-theme-default-bg-color);\n cursor: pointer;\n}\n.index-module_default__r2sQq:hover {\n background-color: var(--go-captcha-theme-default-hover-color) !important;\n}\n.index-module_error__mCm6a {\n cursor: pointer;\n color: var(--go-captcha-theme-error-color);\n background-color: var(--go-captcha-theme-error-bg-color);\n border: 1px solid #ff5a34;\n border-color: var(--go-captcha-theme-error-border-color);\n}\n.index-module_warn__CT1sW {\n cursor: pointer;\n color: var(--go-captcha-theme-warn-color);\n background-color: var(--go-captcha-theme-warn-bg-color);\n border: 1px solid #ffbe09;\n border-color: var(--go-captcha-theme-warn-border-color);\n}\n.index-module_success__61kOU {\n color: var(--go-captcha-theme-success-color);\n background-color: var(--go-captcha-theme-success-bg-color);\n border: 1px solid #8bc640;\n border-color: var(--go-captcha-theme-success-border-color);\n pointer-events: none;\n}\n.index-module_ripple__KF4IK {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n justify-items: center;\n}\n.index-module_ripple__KF4IK svg {\n position: relative;\n z-index: 2;\n}\n.index-module_ripple__KF4IK > * {\n z-index: 2;\n}\n.index-module_ripple__KF4IK::after {\n background-color: var(--go-captcha-theme-default-border-color);\n border-radius: 50px;\n content: "";\n display: block;\n width: 21px;\n height: 21px;\n opacity: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -11px;\n margin-left: -11px;\n z-index: 1;\n animation: index-module_ripple__KF4IK 1.3s infinite;\n -moz-animation: index-module_ripple__KF4IK 1.3s infinite;\n -webkit-animation: index-module_ripple__KF4IK 1.3s infinite;\n animation-delay: 2s;\n -moz-animation-delay: 2s;\n -webkit-animation-delay: 2s;\n}\n@keyframes index-module_ripple__KF4IK {\n 0% {\n opacity: 0;\n }\n 5% {\n opacity: 0.05;\n }\n 20% {\n opacity: 0.35;\n }\n 65% {\n opacity: 0.01;\n }\n 100% {\n transform: scaleX(2) scaleY(2);\n opacity: 0;\n }\n}\n');let U=e=>(0,r.createElement)("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),(0,r.createElement)("circle",{fill:"#3E7CFF",cx:"100",cy:"100",r:"96.3"}),(0,r.createElement)("path",{fill:"#FFFFFF",d:"M140.8,64.4l-39.6-11.9h-2.4L59.2,64.4c-1.6,0.8-2.8,2.4-2.8,4v24.1c0,25.3,15.8,45.9,42.3,54.6\n c0.4,0,0.8,0.4,1.2,0.4c0.4,0,0.8,0,1.2-0.4c26.5-8.7,42.3-28.9,42.3-54.6V68.3C143.5,66.8,142.3,65.2,140.8,64.4z"})),L=e=>(0,r.createElement)("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),(0,r.createElement)("path",{fill:"#ED4630",d:"M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6\n c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M134.5,123.1\n c3.1,3.1,3.1,8.2,0,11.3c-1.6,1.6-3.6,2.3-5.7,2.3s-4.1-0.8-5.7-2.3L100,111.3l-23.1,23.1c-1.6,1.6-3.6,2.3-5.7,2.3\n c-2,0-4.1-0.8-5.7-2.3c-3.1-3.1-3.1-8.2,0-11.3L88.7,100L65.5,76.9c-3.1-3.1-3.1-8.2,0-11.3c3.1-3.1,8.2-3.1,11.3,0L100,88.7\n l23.1-23.1c3.1-3.1,8.2-3.1,11.3,0c3.1,3.1,3.1,8.2,0,11.3L111.3,100L134.5,123.1z"})),R=e=>(0,r.createElement)("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),(0,r.createElement)("path",{fill:"#FFA000",d:"M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6\n c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M107.3,109.1\n c-0.5,5.4-3.9,7.9-7.3,7.9c-2.5,0,0,0,0,0c-3.2-0.6-5.7-2-6.8-7.4l-4.4-50.9c0-5.1,6.2-9.7,11.5-9.7c5.3,0,11,4.7,11,9.9\n L107.3,109.1z M109.3,133.3c0,5.1-4.2,9.3-9.3,9.3c-5.1,0-9.3-4.2-9.3-9.3c0-5.1,4.2-9.3,9.3-9.3C105.1,124,109.3,128.1,109.3,133.3\n z"})),F=e=>(0,r.createElement)("svg",Object.assign({viewBox:"0 0 200 200",xmlns:"http://www.w3.org/2000/svg",width:20,height:20},e),(0,r.createElement)("path",{fill:"#5EAA2F",d:"M183.3,27.2L102.4,2.9h-4.9L16.7,27.2C13.4,28.8,11,32,11,35.3v49.4c0,51.8,32.4,93.9,86.6,111.7\n c0.8,0,1.6,0.8,2.4,0.8c0.8,0,1.6,0,2.4-0.8c54.2-17.8,86.6-59.1,86.6-111.7V35.3C189,32,186.6,28.8,183.3,27.2z M146.1,81.4\n l-48.5,48.5c-1.6,1.6-3.2,2.4-5.7,2.4c-2.4,0-4-0.8-5.7-2.4L62,105.7c-3.2-3.2-3.2-8.1,0-11.3c3.2-3.2,8.1-3.2,11.3,0l18.6,18.6\n l42.9-42.9c3.2-3.2,8.1-3.2,11.3,0C149.4,73.3,149.4,78.2,146.1,81.4L146.1,81.4z"}));var B=r.memo(e=>{let[t,n]=(0,r.useState)({...M(),...e.config||{}});(0,r.useEffect)(()=>{n({...t,...e.config||{}})},[e.config]);let i=e.type||"default",o=r.createElement(U,null),s=T.default;return"warn"==i?(o=r.createElement(R,null),s=T.warn):"error"==i?(o=r.createElement(L,null),s=T.error):"success"==i&&(o=r.createElement(F,null),s=T.success),r.createElement("div",{className:a()(T.btnBlock,s,e.disabled?T.disabled:""),style:{width:t.width+"px",height:t.height+"px",paddingLeft:t.verticalPadding+"px",paddingRight:t.verticalPadding+"px",paddingTop:t.verticalPadding+"px",paddingBottom:t.verticalPadding+"px"},onClick:e.clickEvent},"default"==i?r.createElement("div",{className:T.ripple},o):o,r.createElement("span",null,e.title||"点击按键进行验证"))});t.Z={Click:m,Slide:E,SlideRegion:S,Rotate:N,Button:B}},72478:function(e,t,n){"use strict";n.d(t,{jc:function(){return c},o5:function(){return s}}),Symbol();let r=Symbol(),i=Object.getPrototypeOf,a=new WeakMap,o=e=>e&&(a.has(e)?a.get(e):i(e)===Object.prototype||i(e)===Array.prototype),s=e=>o(e)&&e[r]||null,c=(e,t=!0)=>{a.set(e,t)}},80500:function(e){"use strict";e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let n=e.indexOf(t);return -1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},70610:function(e){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},70655:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return a},__asyncDelegator:function(){return w},__asyncGenerator:function(){return v},__asyncValues:function(){return E},__await:function(){return y},__awaiter:function(){return l},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return O},__createBinding:function(){return h},__decorate:function(){return s},__exportStar:function(){return f},__extends:function(){return i},__generator:function(){return d},__importDefault:function(){return C},__importStar:function(){return D},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return m},__rest:function(){return o},__spread:function(){return b},__spreadArrays:function(){return g},__values:function(){return p}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})}function d(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function b(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(a[0][2],n)}catch(e){l(a[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function E(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function O(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},26251:function(e,t,n){"use strict";var r=n(67294),i=n(61688),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=o(e,(d=u(function(){function e(e){if(!c){if(c=!0,o=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(o=e,t):(o=e,s=n)}var o,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,i]))[0],d[1]);return c(function(){h.hasValue=!0,h.value=f},[f]),l(f),f}},52798:function(e,t,n){"use strict";e.exports=n(26251)},73897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?e.providers[0]:e},...t};super({chains:e,options:n}),this.id="injected",(0,o.Ko)(this,r,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`,this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,s.K)(e[0])})},this.onChainChanged=e=>{let t=a(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=async e=>{!(1013===e.code&&await this.getProvider()&&await this.getAccount())&&(this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))};let i=n.getProvider();if("string"==typeof n.name)this.name=n.name;else if(i){let e=function(e){if(!e)return"Injected";let t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOktoWallet?"Okto Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){let n=new Set,r=1;for(let i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${r}`,r+=1),n.add(e)}let i=[...n];return i.length?i:i[0]??"Injected"}return t(e)??"Injected"}(i);n.name?this.name=n.name(e):"string"==typeof e?this.name=e:this.name=e[0]}else this.name="Injected";this.ready=!!i}async connect({chainId:e}={}){try{let t=await this.getProvider();if(!t)throw new i.N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let n=await t.request({method:"eth_requestAccounts"}),r=(0,s.K)(n[0]),a=await this.getChainId(),o=this.isChainUnsupported(a);return e&&a!==e&&(a=(await this.switchChain(e)).id,o=this.isChainUnsupported(a)),this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:a,unsupported:o}}}catch(e){if(this.isUserRejectedRequestError(e))throw new c.ab(e);if(-32002===e.code)throw new c.pT(e);throw e}}async disconnect(){let e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){let e=await this.getProvider();if(!e)throw new i.N;let t=await e.request({method:"eth_accounts"});return(0,s.K)(t[0])}async getChainId(){let e=await this.getProvider();if(!e)throw new i.N;return e.request({method:"eth_chainId"}).then(a)}async getProvider(){let e=this.options.getProvider();return e&&(0,o.qx)(this,r,e),(0,o.ac)(this,r)}async getWalletClient({chainId:e}={}){let[t,n]=await Promise.all([this.getProvider(),this.getAccount()]),r=this.chains.find(t=>t.id===e);if(!t)throw Error("provider is required.");return(0,u.K)({account:n,chain:r,transport:(0,l.P)(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!await this.getProvider())throw new i.N;return!!await this.getAccount()}catch{return!1}}async switchChain(e){let t=await this.getProvider();if(!t)throw new i.N;let n=(0,d.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]}),new Promise(t=>this.on("change",({chain:n})=>{n?.id===e&&t()}))]),this.chains.find(t=>t.id===e)??{id:e,name:`Chain ${n}`,network:`${n}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(a){let r=this.chains.find(t=>t.id===e);if(!r)throw new i.B({chainId:e,connectorId:this.id});if(4902===a.code||a?.data?.originalError?.code===4902)try{if(await t.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:r.name,nativeCurrency:r.nativeCurrency,rpcUrls:[r.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(r)}]}),await this.getChainId()!==e)throw new c.ab(Error("User rejected switch after adding network."));return r}catch(e){throw new c.ab(e)}if(this.isUserRejectedRequestError(a))throw new c.ab(a);throw new c.x3(a)}}async watchAsset({address:e,decimals:t=18,image:n,symbol:r}){let a=await this.getProvider();if(!a)throw new i.N;return a.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:n,symbol:r}}})}isUserRejectedRequestError(e){return 4001===e.code}};r=new WeakMap},57858:function(e,t,n){"use strict";n.d(t,{B:function(){return r},N:function(){return i}});var r=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),this.name="ChainNotConfiguredForConnectorError"}},i=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}}},75276:function(e,t,n){"use strict";n.d(t,{wR:function(){return d},Ko:function(){return c},ac:function(){return s},U9:function(){return l},qx:function(){return u}});var r=n(26729),i=n(66403);let a=(0,n(86164).a)({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0});var o=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},s=(e,t,n)=>(o(e,t,"read from private field"),n?n.call(e):t.get(e)),c=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},u=(e,t,n,r)=>(o(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),l=(e,t,n)=>(o(e,t,"access private method"),n),d=class extends r{constructor({chains:e=[i.R,a],options:t}){super(),this.chains=e,this.options=t}getBlockExplorerUrls(e){let{default:t,...n}=e.blockExplorers??{};if(t)return[t.url,...Object.values(n).map(e=>e.url)]}isChainUnsupported(e){return!this.chains.some(t=>t.id===e)}setStorage(e){this.storage=e}}},30438:function(e,t,n){"use strict";n.d(t,{QB:function(){return tF},$j:function(){return t2},_g:function(){return t0},o6:function(){return tX},vZ:function(){return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){let r,i;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)&&Array.isArray(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();let a=Object.keys(t);if((r=a.length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){let r=a[i];if(r&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}},zP:function(){return t3},EG:function(){return nt},w6:function(){return nc},Lk:function(){return nu},D0:function(){return nn},Hy:function(){return nr},wp:function(){return tQ},l:function(){return ni},If:function(){return na},uH:function(){return no},QC:function(){return ns}});var r,i,a,o,s,c=n(64358),u=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},l=(e,t,n)=>(u(e,t,"read from private field"),n?n.call(e):t.get(e)),d=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},h=(e,t,n,r)=>(u(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),f=(e,t,n)=>(u(e,t,"access private method"),n),p=n(16189),m=n(16693),b=n(7210),g=n(77799),y=n(47864),v=n(61836),w=n(92106),E=n(21746),_=n(62027),D=n(97405);function C(e,t){if(!(e instanceof _.G))return!1;let n=e.walk(e=>e instanceof D.Lu);return n instanceof D.Lu&&(!!(n.data?.errorName==="ResolverNotFound"||n.data?.errorName==="ResolverWildcardNotSupported"||n.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&n.reason===E.$[50])}var x=n(57040),O=n(11187),S=n(88184),P=n(15102);function k(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,P.v)(t)?t:null}function I(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,w.ci)(t);let n=e.split(".");for(let e=n.length-1;e>=0;e-=1){let r=k(n[e]),i=r?(0,O.O0)(r):(0,S.w)((0,O.qX)(n[e]),"bytes");t=(0,S.w)((0,x.zo)([t,i]),"bytes")}return(0,w.ci)(t)}function A(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let n=new Uint8Array((0,O.qX)(t).byteLength+2),r=0,i=t.split(".");for(let e=0;e255){var a;t=(0,O.qX)((a=function(e){let t=new Uint8Array(32).fill(0);return e?k(e)||(0,S.w)((0,O.qX)(e)):(0,w.ci)(t)}(i[e]),`[${a.slice(2)}]`))}n[r]=t.length,n.set(t,r+1),r+=t.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}var j=n(93714),N=n(57412),M=n(39028);function T(e,{abi:t,address:n,args:r,docsPath:i,functionName:a,sender:o}){let{code:s,data:c,message:u,shortMessage:l}=e instanceof D.VQ?e:e instanceof _.G?e.walk(e=>"data"in e)||e.walk():{},d=e instanceof N.wb?new D.Dk({functionName:a}):[3,M.XS.code].includes(s)&&(c||u||l)?new D.Lu({abi:t,data:"object"==typeof c?c.data:c,functionName:a,message:l??u}):e;return new D.uq(d,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:a,sender:o})}var U=n(61376);async function L(e,{abi:t,address:n,args:r,functionName:i,...a}){let o=(0,g.R)({abi:t,args:r,functionName:i});try{let{data:s}=await (0,j.s)(e,U.R,"call")({data:o,to:n,...a});return(0,b.k)({abi:t,args:r,functionName:i,data:s||"0x"})}catch(e){throw T(e,{abi:t,address:n,args:r,docsPath:"/docs/contract/readContract",functionName:i})}}async function R(e,{blockNumber:t,blockTag:n,coinType:r,name:i,universalResolverAddress:a}){let o=a;if(!o){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");o=(0,y.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a=(0,g.R)({abi:m.X$,functionName:"addr",...null!=r?{args:[I(i),BigInt(r)]}:{args:[I(i)]}}),s=await (0,j.s)(e,L,"readContract")({address:o,abi:m.k3,functionName:"resolve",args:[(0,w.NC)(A(i)),a],blockNumber:t,blockTag:n});if("0x"===s[0])return null;let c=(0,b.k)({abi:m.X$,args:null!=r?[I(i),BigInt(r)]:void 0,functionName:"addr",data:s[0]});if("0x"===c||"0x00"===(0,v.f)(c))return null;return c}catch(e){if(C(e,"resolve"))return null;throw e}}class F extends _.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class B extends _.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class $ extends _.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class W extends _.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}let z=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,q=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,G=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,K=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function H(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})}}function V(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Y({uri:e,gatewayUrls:t}){let n=G.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};let r=V(t?.ipfs,"https://ipfs.io"),i=V(t?.arweave,"https://arweave.net"),a=e.match(z),{protocol:o,subpath:s,target:c,subtarget:u=""}=a?.groups||{},l="ipns:/"===o||"ipns/"===s,d="ipfs:/"===o||"ipfs/"===s||q.test(e);if(e.startsWith("http")&&!l&&!d){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((l||d)&&c)return{uri:`${r}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if("ar:/"===o&&c)return{uri:`${i}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let h=e.replace(K,"");if(h.startsWith("e.json());return await Z({gatewayUrls:e,uri:Q(n)})}catch{throw new $({uri:t})}}async function Z({gatewayUrls:e,uri:t}){let{uri:n,isOnChain:r}=Y({uri:t,gatewayUrls:e});if(r||await H(n))return n;throw new $({uri:t})}async function J(e,{nft:t}){if("erc721"===t.namespace)return L(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return L(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new W({namespace:t.namespace})}async function ee(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?et(e,{gatewayUrls:t,record:n}):Z({uri:n,gatewayUrls:t})}async function et(e,{gatewayUrls:t,record:n}){let r=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[n,r,i]=t.split("/"),[a,o]=n.split(":"),[s,c]=r.split(":");if(!a||"eip155"!==a.toLowerCase())throw new B({reason:"Only EIP-155 supported"});if(!o)throw new B({reason:"Chain ID not found"});if(!c)throw new B({reason:"Contract address not found"});if(!i)throw new B({reason:"Token ID not found"});if(!s)throw new B({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:s.toLowerCase(),contractAddress:c,tokenID:i}}(n),{uri:i,isOnChain:a,isEncoded:o}=Y({uri:await J(e,{nft:r}),gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return Z({uri:Q(JSON.parse(o?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let s=r.tokenID;return"erc1155"===r.namespace&&(s=s.replace("0x","").padStart(64,"0")),X({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,s)})}async function en(e,{blockNumber:t,blockTag:n,name:r,key:i,universalResolverAddress:a}){let o=a;if(!o){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");o=(0,y.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let a=await (0,j.s)(e,L,"readContract")({address:o,abi:m.k3,functionName:"resolve",args:[(0,w.NC)(A(r)),(0,g.R)({abi:m.nZ,functionName:"text",args:[I(r),i]})],blockNumber:t,blockTag:n});if("0x"===a[0])return null;let s=(0,b.k)({abi:m.nZ,functionName:"text",data:a[0]});return""===s?null:s}catch(e){if(C(e,"resolve"))return null;throw e}}async function er(e,{blockNumber:t,blockTag:n,gatewayUrls:r,name:i,universalResolverAddress:a}){let o=await (0,j.s)(e,en,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:a});if(!o)return null;try{return await ee(e,{record:o,gatewayUrls:r})}catch{return null}}async function ei(e,{address:t,blockNumber:n,blockTag:r,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");a=(0,y.L)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}let o=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let[i,s]=await (0,j.s)(e,L,"readContract")({address:a,abi:m.du,functionName:"reverse",args:[(0,w.NC)(A(o))],blockNumber:n,blockTag:r});if(t.toLowerCase()!==s.toLowerCase())return null;return i}catch(e){if(C(e,"reverse"))return null;throw e}}async function ea(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");a=(0,y.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[o]=await (0,j.s)(e,L,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,w.NC)(A(r))],blockNumber:t,blockTag:n});return o}function eo(e,{method:t}){let n={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:r,status:i,transport:a})=>{"success"===i&&t===e&&(n[r]=a.request)}),t=>n[t]||e.request}async function es(e){let t=eo(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class ec extends _.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var eu=n(74059),el=n(45444),ed=n(80522),eh=n(40840);function ef({abi:e,eventName:t,args:n}){let r=e[0];if(t&&!(r=(0,eh.mE)({abi:e,args:n,name:t})))throw new N.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==r.type)throw new N.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});let i=(0,ed.t)(r),a=(0,eu.e)(i),o=[];if(n&&"inputs"in r){let e=r.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(o=e?.map((e,n)=>Array.isArray(t[n])?t[n].map((r,i)=>ep({param:e,value:t[n][i]})):t[n]?ep({param:e,value:t[n]}):null)??[])}return[a,...o]}function ep({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,S.w)((0,O.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ec(e.type);return(0,el.E)([e],[t])}async function em(e,{address:t,abi:n,args:r,eventName:i,fromBlock:a,strict:o,toBlock:s}){let c=eo(e,{method:"eth_newFilter"}),u=i?ef({abi:n,args:r,eventName:i}):void 0,l=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,w.eC)(a):a,toBlock:"bigint"==typeof s?(0,w.eC)(s):s,topics:u}]});return{abi:n,args:r,eventName:i,id:l,request:c(l),strict:o,type:"event"}}async function eb(e,{address:t,args:n,event:r,events:i,fromBlock:a,strict:o,toBlock:s}={}){let c=i??(r?[r]:void 0),u=eo(e,{method:"eth_newFilter"}),l=[];c&&(l=[c.flatMap(e=>ef({abi:[e],eventName:e.name,args:n}))],r&&(l=l[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,w.eC)(a):a,toBlock:"bigint"==typeof s?(0,w.eC)(s):s,...l.length?{topics:l}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:a,id:d,request:u(d),strict:o,toBlock:s,type:"event"}}async function eg(e){let t=eo(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}var ey=n(14503),ev=n(81841);async function ew(e,{abi:t,address:n,args:r,functionName:i,...a}){let o=(0,g.R)({abi:t,args:r,functionName:i});try{return await (0,j.s)(e,ev.Q,"estimateGas")({data:o,to:n,...a})}catch(o){let e=a.account?(0,ey.T)(a.account):void 0;throw T(o,{abi:t,address:n,args:r,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:e?.address})}}var eE=n(43861),e_=n(79379);async function eD(e,{address:t,blockNumber:n,blockTag:r="latest"}){let i=n?(0,w.eC)(n):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,i||r]}))}var eC=n(75016);let ex=new Map,eO=new Map;async function eS(e,{cacheKey:t,cacheTime:n=1/0}){let r=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,ex),r=t(e,eO);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(t),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()`blockNumber.${e}`;async function ek(e,{cacheTime:t=e.cacheTime,maxAge:n}={}){return BigInt(await eS(()=>e.request({method:"eth_blockNumber"}),{cacheKey:eP(e.uid),cacheTime:n??t}))}var eI=n(95946);async function eA(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){let i;let a=void 0!==n?(0,w.eC)(n):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[a||r]}),(0,eI.ly)(i)}async function ej(e,{address:t,blockNumber:n,blockTag:r="latest"}){let i=void 0!==n?(0,w.eC)(n):void 0,a=await e.request({method:"eth_getCode",params:[t,i||r]});if("0x"!==a)return a}var eN=n(79524),eM=n(34450);let eT="/docs/contract/decodeEventLog";function eU({abi:e,data:t,strict:n,topics:r}){let i=n??!0,[a,...o]=r;if(!a)throw new N.FM({docsPath:eT});let s=e.find(e=>"event"===e.type&&a===(0,eu.e)((0,ed.t)(e)));if(!(s&&"name"in s)||"event"!==s.type)throw new N.lC(a,{docsPath:eT});let{name:c,inputs:u}=s,l=u?.some(e=>!("name"in e&&e.name)),d=l?[]:{},h=u.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e!("indexed"in e&&e.indexed));if(f.length>0){if(t&&"0x"!==t)try{let e=(0,eM.r)(f,t);if(e){if(l)d=[...d,...e];else for(let t=0;t0?d:void 0}}function eL(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function eR(e,{address:t,blockHash:n,fromBlock:r,toBlock:i,event:a,events:o,args:s,strict:c}={}){let u=c??!1,l=o??(a?[a]:void 0),d=[];return l&&(d=[l.flatMap(e=>ef({abi:[e],eventName:e.name,args:s}))],a&&(d=d[0])),(n?await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:"bigint"==typeof r?(0,w.eC)(r):r,toBlock:"bigint"==typeof i?(0,w.eC)(i):i}]})).map(e=>{try{let{eventName:t,args:n}=l?eU({abi:l,data:e.data,topics:e.topics,strict:u}):{eventName:void 0,args:void 0};return eL(e,{args:n,eventName:t})}catch(r){let t,n;if(r instanceof N.SM||r instanceof N.Gy){if(u)return;t=r.abiItem.name,n=r.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return eL(e,{args:n?[]:{},eventName:t})}}).filter(Boolean)}async function eF(e,{abi:t,address:n,args:r,blockHash:i,eventName:a,fromBlock:o,toBlock:s,strict:c}){let u=a?(0,eh.mE)({abi:t,name:a}):void 0,l=u?void 0:t.filter(e=>"event"===e.type);return(0,j.s)(e,eR,"getLogs")({address:n,args:r,blockHash:i,event:u,events:l,fromBlock:o,toBlock:s,strict:c})}async function eB(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){var a;let o=n?(0,w.eC)(n):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,w.eC)(t),o||r,i]})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map(e=>e.map(e=>BigInt(e)))}}async function e$(e,{filter:t}){let n="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map(e=>{if("string"==typeof e)return e;try{let{eventName:r,args:i}="abi"in t&&t.abi?eU({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return eL(e,{args:i,eventName:r})}catch(i){let n,r;if(i instanceof N.SM||i instanceof N.Gy){if("strict"in t&&t.strict)return;n=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return eL(e,{args:r?[]:{},eventName:n})}}).filter(Boolean)}async function eW(e,{filter:t}){let n=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>{try{let{eventName:r,args:i}="abi"in t&&t.abi?eU({abi:t.abi,data:e.data,topics:e.topics,strict:n}):{eventName:void 0,args:void 0};return eL(e,{args:i,eventName:r})}catch(i){let n,r;if(i instanceof N.SM||i instanceof N.Gy){if("strict"in t&&t.strict)return;n=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return eL(e,{args:r?[]:{},eventName:n})}}).filter(Boolean)}var ez=n(24453);async function eq(e,{address:t,blockNumber:n,blockTag:r,storageKeys:i}){var a;let o=void 0!==n?(0,w.eC)(n):void 0;return{...a=await e.request({method:"eth_getProof",params:[t,i,o||(r??"latest")]}),balance:a.balance?BigInt(a.balance):void 0,nonce:a.nonce?(0,eI.ly)(a.nonce):void 0,storageProof:a.storageProof?a.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}async function eG(e,{address:t,blockNumber:n,blockTag:r="latest",slot:i}){let a=void 0!==n?(0,w.eC)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,a||r]})}var eK=n(33639),eH=n(6073);async function eV(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:a}){let o=r||"latest",s=void 0!==n?(0,w.eC)(n):void 0,c=null;if(i?c=await e.request({method:"eth_getTransactionByHash",params:[i]}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,w.eC)(a)]}):(s||o)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||o,(0,w.eC)(a)]})),!c)throw new eK.Bh({blockHash:t,blockNumber:n,blockTag:o,hash:i,index:a});return(e.chain?.formatters?.transaction?.format||eH.Tr)(c)}async function eY(e,{hash:t,transactionReceipt:n}){let[r,i]=await Promise.all([(0,j.s)(e,ek,"getBlockNumber")({}),t?(0,j.s)(e,eV,"getBlockNumber")({hash:t}):void 0]),a=n?.blockNumber||i?.blockNumber;return a?r-a+1n:0n}var eQ=n(86162);let eX={"0x0":"reverted","0x1":"success"};async function eZ(e,{hash:t}){let n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new eK.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||function(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>eL(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,eI.ly)(e.transactionIndex):null,status:e.status?eX[e.status]:null,type:e.type?eH.c8[e.type]||e.type:null}})(n)}async function eJ(e,t){let{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:a,contracts:o,multicallAddress:s}=t,c=r??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),u=s;if(!u){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");u=(0,y.L)({blockNumber:i,chain:e.chain,contract:"multicall3"})}let l=[[]],d=0,h=0;for(let e=0;e0&&h>c&&l[d].length>0&&(d++,h=(e.length-2)/2,l[d]=[]),l[d]=[...l[d],{allowFailure:!0,callData:e,target:r}]}catch(o){let e=T(o,{abi:t,address:r,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!n)throw e;l[d]=[...l[d],{allowFailure:!0,callData:"0x",target:r}]}}let f=await Promise.allSettled(l.map(t=>(0,j.s)(e,L,"readContract")({abi:m.F8,address:u,args:[t],blockNumber:i,blockTag:a,functionName:"aggregate3"}))),p=[];for(let e=0;e`${t} ${e}`).join(",")})`;return n}({primaryType:e,types:t}));return(0,S.w)(n)}({primaryType:n,types:r})];for(let o of r[n]){let[n,s]=function t({types:n,name:r,type:i,value:a}){if(void 0!==n[i])return[{type:"bytes32"},(0,S.w)(e({data:a,primaryType:i,types:n}))];if("bytes"===i){let e=a.length%2?"0":"";return a=`0x${e+a.slice(2)}`,[{type:"bytes32"},(0,S.w)(a)]}if("string"===i)return[{type:"bytes32"},(0,S.w)((0,w.NC)(a))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),o=a.map(i=>t({name:r,type:e,types:n,value:i}));return[{type:"bytes32"},(0,S.w)((0,el.E)(o.map(([e])=>e),o.map(([,e])=>e)))]}return[{type:i},a]}({types:r,name:o.name,type:o.type,value:t[o.name]});i.push(n),a.push(s)}return(0,el.E)(i,a)}({data:e,primaryType:t,types:n});return(0,S.w)(r)}async function e4(e,{address:t,signature:n,message:r,primaryType:i,types:a,domain:o,...s}){return e3(e,{address:t,hash:function({domain:e,message:t,primaryType:n,types:r}){let i=void 0===e?{}:e,a={EIP712Domain:(0,e5.cj)({domain:i}),...r};(0,e5.iC)({domain:i,message:t,primaryType:n,types:a});let o=["0x1901"];return i&&o.push(function({domain:e,types:t}){return e8({data:e,primaryType:"EIP712Domain",types:t})}({domain:i,types:a})),"EIP712Domain"!==n&&o.push(e8({data:t,primaryType:n,types:a})),(0,S.w)((0,x.zo)(o))}({message:r,primaryType:i,types:a,domain:o}),signature:n,...s})}var e9=n(79814);let e7=new Map,te=new Map,tt=0;function tn(e,t,n){let r=++tt,i=()=>e7.get(e)||[],a=()=>{let t=i();e7.set(e,t.filter(e=>e.id!==r))},o=()=>{let t=te.get(e);1===i().length&&t&&t(),a()},s=i();if(e7.set(e,[...s,{id:r,fns:t}]),s&&s.length>0)return o;let c={};for(let e in t)c[e]=(...t)=>{let n=i();if(0!==n.length)for(let r of n)r.fns[e]?.(...t)};let u=n(c);return"function"==typeof u&&te.set(e,u),o}var tr=n(7760),ti=n(96070),ta=n(62914);function to(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0,a=()=>i=!1;return(async()=>{let o;t&&(o=await e({unpoll:a}));let s=await n?.(o)??r;await (0,ta.D)(s);let c=async()=>{i&&(await e({unpoll:a}),await (0,ta.D)(r),c())};c()})(),a}function ts(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:a,pollingInterval:o=e.pollingInterval}){let s,c,u;return(void 0!==a?a:"webSocket"!==e.transport.type)?tn((0,ti.P)(["watchBlockNumber",e.uid,t,n,o]),{onBlockNumber:r,onError:i},r=>to(async()=>{try{let t=await (0,j.s)(e,ek,"getBlockNumber")({cacheTime:0});if(s){if(t===s)return;if(t-s>1&&n)for(let e=s+1n;es)&&(r.onBlockNumber(t,s),s=t)}catch(e){r.onError?.(e)}},{emitOnBegin:t,interval:o})):(c=!0,u=()=>c=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!c)return;let t=(0,eI.y_)(e.result?.number);r(t,s),s=t},onError(e){i?.(e)}});u=t,c||u()}catch(e){i?.(e)}})(),u)}async function tc(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:i=e.pollingInterval,timeout:a}){let o,s,c;let u=(0,ti.P)(["waitForTransactionReceipt",e.uid,n]),l=!1;return new Promise((d,h)=>{a&&setTimeout(()=>h(new eK.mc({hash:n})),a);let f=tn(u,{onReplaced:r,resolve:d,reject:h},r=>{let a=(0,j.s)(e,ts,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){if(l)return;let u=i,d=e=>{a(),e(),f()};try{if(c){if(t>1&&(!c.blockNumber||u-c.blockNumber+1nr.resolve(c));return}if(o||(l=!0,await (0,tr.J)(async()=>{(o=await (0,j.s)(e,eV,"getTransaction")({hash:n})).blockNumber&&(u=o.blockNumber)},{delay:({count:e})=>200*~~(1<1&&(!c.blockNumber||u-c.blockNumber+1nr.resolve(c))}catch(n){if(o&&(n instanceof eK.Bh||n instanceof eK.Yb))try{s=o,l=!0;let n=await (0,tr.J)(()=>(0,j.s)(e,eC.Q,"getBlock")({blockNumber:u,includeTransactions:!0}),{delay:({count:e})=>200*~~(1<e instanceof e9.f});l=!1;let i=n.transactions.find(({from:e,nonce:t})=>e===s.from&&t===s.nonce);if(!i||(c=await (0,j.s)(e,eZ,"getTransactionReceipt")({hash:i.hash}),t>1&&(!c.blockNumber||u-c.blockNumber+1n{r.onReplaced?.({reason:a,replacedTransaction:s,transaction:i,transactionReceipt:c}),r.resolve(c)})}catch(e){d(()=>r.reject(e))}else d(()=>r.reject(n))}}})})})}var tu=n(43310),tl=n(57331),td=n(99238);function th(e){return{call:t=>(0,U.R)(e,t),createBlockFilter:()=>es(e),createContractEventFilter:t=>em(e,t),createEventFilter:t=>eb(e,t),createPendingTransactionFilter:()=>eg(e),estimateContractGas:t=>ew(e,t),estimateGas:t=>(0,ev.Q)(e,t),getBalance:t=>eD(e,t),getBlock:t=>(0,eC.Q)(e,t),getBlockNumber:t=>ek(e,t),getBlockTransactionCount:t=>eA(e,t),getBytecode:t=>ej(e,t),getChainId:()=>(0,eN.L)(e),getContractEvents:t=>eF(e,t),getEnsAddress:t=>R(e,t),getEnsAvatar:t=>er(e,t),getEnsName:t=>ei(e,t),getEnsResolver:t=>ea(e,t),getEnsText:t=>en(e,t),getFeeHistory:t=>eB(e,t),estimateFeesPerGas:t=>(0,eE.X)(e,t),getFilterChanges:t=>e$(e,t),getFilterLogs:t=>eW(e,t),getGasPrice:()=>(0,ez.o)(e),getLogs:t=>eR(e,t),getProof:t=>eq(e,t),estimateMaxPriorityFeePerGas:t=>(0,e_._)(e,t),getStorageAt:t=>eG(e,t),getTransaction:t=>eV(e,t),getTransactionConfirmations:t=>eY(e,t),getTransactionCount:t=>(0,eQ.K)(e,t),getTransactionReceipt:t=>eZ(e,t),multicall:t=>eJ(e,t),prepareTransactionRequest:t=>(0,tl.Z)(e,t),readContract:t=>L(e,t),sendRawTransaction:t=>(0,td.p)(e,t),simulateContract:t=>e0(e,t),verifyMessage:t=>e6(e,t),verifyTypedData:t=>e4(e,t),uninstallFilter:t=>e1(e,t),waitForTransactionReceipt:t=>tc(e,t),watchBlocks:t=>(function(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:a,includeTransactions:o,poll:s,pollingInterval:c=e.pollingInterval}){let u,l,d;let h=void 0!==s?s:"webSocket"!==e.transport.type,f=o??!1;return h?tn((0,ti.P)(["watchBlocks",e.uid,n,r,f,c]),{onBlock:i,onError:a},i=>to(async()=>{try{let r=await (0,j.s)(e,eC.Q,"getBlock")({blockTag:t,includeTransactions:f});if(r.number&&u?.number){if(r.number===u.number)return;if(r.number-u.number>1&&n)for(let t=u?.number+1n;tu.number)&&(i.onBlock(r,u),u=r)}catch(e){i.onError?.(e)}},{emitOnBegin:r,interval:c})):(l=!0,d=()=>l=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newHeads"],onData(t){if(!l)return;let n=(e.chain?.formatters?.block?.format||tu.Z)(t.result);i(n,u),u=n},onError(e){a?.(e)}});d=t,l||d()}catch(e){a?.(e)}})(),d)})(e,t),watchBlockNumber:t=>ts(e,t),watchContractEvent:t=>(function(e,{abi:t,address:n,args:r,batch:i=!0,eventName:a,onError:o,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){let d,h;return(void 0!==c?c:"webSocket"!==e.transport.type)?(()=>{let c=(0,ti.P)(["watchContractEvent",n,r,i,e.uid,a,u]),d=l??!1;return tn(c,{onLogs:s,onError:o},o=>{let s,c;let l=!1,h=to(async()=>{if(!l){try{c=await (0,j.s)(e,em,"createContractEventFilter")({abi:t,address:n,args:r,eventName:a,strict:d})}catch{}l=!0;return}try{let u;if(c)u=await (0,j.s)(e,e$,"getFilterChanges")({filter:c});else{let i=await (0,j.s)(e,ek,"getBlockNumber")({});u=s&&s!==i?await (0,j.s)(e,eF,"getContractEvents")({abi:t,address:n,args:r,eventName:a,fromBlock:s+1n,toBlock:i,strict:d}):[],s=i}if(0===u.length)return;if(i)o.onLogs(u);else for(let e of u)o.onLogs([e])}catch(e){c&&e instanceof M.yR&&(l=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:u});return async()=>{c&&await (0,j.s)(e,e1,"uninstallFilter")({filter:c}),h()}})})():(d=!0,h=()=>d=!1,(async()=>{try{let i=a?ef({abi:t,eventName:a,args:r}):[],{unsubscribe:c}=await e.transport.subscribe({params:["logs",{address:n,topics:i}],onData(e){if(!d)return;let n=e.result;try{let{eventName:e,args:r}=eU({abi:t,data:n.data,topics:n.topics,strict:l}),i=eL(n,{args:r,eventName:e});s([i])}catch(i){let e,t;if(i instanceof N.SM||i instanceof N.Gy){if(l)return;e=i.abiItem.name,t=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let r=eL(n,{args:t?[]:{},eventName:e});s([r])}},onError(e){o?.(e)}});h=c,d||h()}catch(e){o?.(e)}})(),h)})(e,t),watchEvent:t=>(function(e,{address:t,args:n,batch:r=!0,event:i,events:a,onError:o,onLogs:s,poll:c,pollingInterval:u=e.pollingInterval,strict:l}){let d,h;let f=void 0!==c?c:"webSocket"!==e.transport.type,p=l??!1;return f?tn((0,ti.P)(["watchEvent",t,n,r,e.uid,i,u]),{onLogs:s,onError:o},o=>{let s,c;let l=!1,d=to(async()=>{if(!l){try{c=await (0,j.s)(e,eb,"createEventFilter")({address:t,args:n,event:i,events:a,strict:p})}catch{}l=!0;return}try{let u;if(c)u=await (0,j.s)(e,e$,"getFilterChanges")({filter:c});else{let r=await (0,j.s)(e,ek,"getBlockNumber")({});u=s&&s!==r?await (0,j.s)(e,eR,"getLogs")({address:t,args:n,event:i,events:a,fromBlock:s+1n,toBlock:r}):[],s=r}if(0===u.length)return;if(r)o.onLogs(u);else for(let e of u)o.onLogs([e])}catch(e){c&&e instanceof M.yR&&(l=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:u});return async()=>{c&&await (0,j.s)(e,e1,"uninstallFilter")({filter:c}),d()}}):(d=!0,h=()=>d=!1,(async()=>{try{let r=a??(i?[i]:void 0),c=[];r&&(c=[r.flatMap(e=>ef({abi:[e],eventName:e.name,args:n}))],i&&(c=c[0]));let{unsubscribe:u}=await e.transport.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!d)return;let t=e.result;try{let{eventName:e,args:n}=eU({abi:r,data:t.data,topics:t.topics,strict:p}),i=eL(t,{args:n,eventName:e});s([i])}catch(i){let e,n;if(i instanceof N.SM||i instanceof N.Gy){if(l)return;e=i.abiItem.name,n=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let r=eL(t,{args:n?[]:{},eventName:e});s([r])}},onError(e){o?.(e)}});h=u,d||h()}catch(e){o?.(e)}})(),h)})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:n,onTransactions:r,poll:i,pollingInterval:a=e.pollingInterval}){let o,s;return(void 0!==i?i:"webSocket"!==e.transport.type)?tn((0,ti.P)(["watchPendingTransactions",e.uid,t,a]),{onTransactions:r,onError:n},n=>{let r;let i=to(async()=>{try{if(!r)try{r=await (0,j.s)(e,eg,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let a=await (0,j.s)(e,e$,"getFilterChanges")({filter:r});if(0===a.length)return;if(t)n.onTransactions(a);else for(let e of a)n.onTransactions([e])}catch(e){n.onError?.(e)}},{emitOnBegin:!0,interval:a});return async()=>{r&&await (0,j.s)(e,e1,"uninstallFilter")({filter:r}),i()}}):(o=!0,s=()=>o=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!o)return;let t=e.result;r([t])},onError(e){n?.(e)}});s=t,o||s()}catch(e){n?.(e)}})(),s)})(e,t)}}function tf(e){let{key:t="public",name:n="Public Client"}=e;return(0,p.e)({...e,key:t,name:n,type:"publicClient"}).extend(th)}var tp=n(37029),tm=n(31031);function tb(e,t={}){let{key:n="fallback",name:r="Fallback",rank:i=!1,retryCount:a,retryDelay:o}=t;return({chain:t,pollingInterval:s=4e3,timeout:c})=>{let u=e,l=()=>{},d=(0,tm.q)({key:n,name:r,async request({method:e,params:n}){let r=async(i=0)=>{let a=u[i]({chain:t,retryCount:0,timeout:c});try{let t=await a.request({method:e,params:n});return l({method:e,params:n,response:t,transport:a,status:"success"}),t}catch(t){if(l({error:t,method:e,params:n,transport:a,status:"error"}),(0,tp.y)(t)||i===u.length-1)throw t;return r(i+1)}};return r()},retryCount:a,retryDelay:o,type:"fallback"},{onResponse:e=>l=e,transports:u.map(e=>e({chain:t,retryCount:0}))});if(i){let e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:n,sampleCount:r=10,timeout:i=1e3,transports:a,weights:o={}}){let{stability:s=.7,latency:c=.3}=o,u=[],l=async()=>{let o=await Promise.all(a.map(async t=>{let n,r;let a=t({chain:e,retryCount:0,timeout:i}),o=Date.now();try{await a.request({method:"net_listening"}),r=1}catch{r=0}finally{n=Date.now()}return{latency:n-o,success:r}}));u.push(o),u.length>r&&u.shift();let d=Math.max(...u.map(e=>Math.max(...e.map(({latency:e})=>e))));n(a.map((e,t)=>{let n=u.map(e=>e[t].latency),r=n.reduce((e,t)=>e+t,0)/n.length,i=u.map(e=>e[t].success),a=i.reduce((e,t)=>e+t,0)/i.length;return 0===a?[0,t]:[c*(1-r/d)+s*a,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>a[e])),await (0,ta.D)(t),l()};l()}({chain:t,interval:e.interval??s,onTransports:e=>u=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:u,weights:e.weights})}return d}}var tg=n(78863);class ty extends _.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var tv=n(32357);let tw=function(){if("undefined"!=typeof WebSocket)return WebSocket;if(void 0!==global.WebSocket)return global.WebSocket;if(void 0!==window.WebSocket)return window.WebSocket;if(void 0!==self.WebSocket)return self.WebSocket;throw Error("`WebSocket` is not supported in this environment")}();function tE(e,{errorInstance:t=Error("timed out"),timeout:n,signal:r}){return new Promise((i,a)=>{(async()=>{let o;try{let s=new AbortController;n>0&&(o=setTimeout(()=>{r?s.abort():a(t)},n)),i(await e({signal:s?.signal}))}catch(e){"AbortError"===e.name&&a(t),a(e)}finally{clearTimeout(o)}})()})}let t_=0;async function tD(e,{body:t,fetchOptions:n={},timeout:r=1e4}){let{headers:i,method:a,signal:o}=n;try{let s;let c=await tE(async({signal:s})=>await fetch(e,{...n,body:Array.isArray(t)?(0,ti.P)(t.map(e=>({jsonrpc:"2.0",id:e.id??t_++,...e}))):(0,ti.P)({jsonrpc:"2.0",id:t.id??t_++,...t}),headers:{...i,"Content-Type":"application/json"},method:a||"POST",signal:o||(r>0?s:void 0)}),{errorInstance:new tg.W5({body:t,url:e}),timeout:r,signal:!0});if(s=c.headers.get("Content-Type")?.startsWith("application/json")?await c.json():await c.text(),!c.ok)throw new tg.Gg({body:t,details:(0,ti.P)(s.error)||c.statusText,headers:c.headers,status:c.status,url:e});return s}catch(n){if(n instanceof tg.Gg||n instanceof tg.W5)throw n;throw new tg.Gg({body:t,details:n.message,url:e})}}let tC=new Map;async function tx(e){let t=tC.get(e);if(t)return t;let{schedule:n}=(0,tv.S)({id:e,fn:async()=>{let n=new tw(e),r=new Map,i=new Map,a=({data:e})=>{let t=JSON.parse(e),n="eth_subscription"===t.method,a=n?t.params.subscription:t.id,o=n?i:r,s=o.get(a);s&&s({data:e}),n||o.delete(a)},o=()=>{tC.delete(e),n.removeEventListener("close",o),n.removeEventListener("message",a)};return n.addEventListener("close",o),n.addEventListener("message",a),n.readyState===tw.CONNECTING&&await new Promise((e,t)=>{n&&(n.onopen=e,n.onerror=t)}),t=Object.assign(n,{requests:r,subscriptions:i}),tC.set(e,t),[t]}}),[r,[i]]=await n();return i}let tO={http:tD,webSocket:function(e,{body:t,onResponse:n}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new tg.c9({body:t,url:e.url,details:"Socket is closed."});let r=t_++,i=({data:a})=>{let o=JSON.parse(a);("number"!=typeof o.id||r===o.id)&&(n?.(o),"eth_subscribe"===t.method&&"string"==typeof o.result&&e.subscriptions.set(o.result,i),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(r,i),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:r})),e},webSocketAsync:async function(e,{body:t,timeout:n=1e4}){return tE(()=>new Promise(n=>tO.webSocket(e,{body:t,onResponse:n})),{errorInstance:new tg.W5({body:t,url:e.url}),timeout:n})}};var tS=n(57858),tP=n(84192);let tk=e=>(t,n,r)=>{let i=r.subscribe;return r.subscribe=(e,t,n)=>{let a=e;if(t){let i=(null==n?void 0:n.equalityFn)||Object.is,o=e(r.getState());a=n=>{let r=e(n);if(!i(o,r)){let e=o;t(o=r,e)}},(null==n?void 0:n.fireImmediately)&&t(o,o)}return i(a)},e(t,n,r)},tI=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>tI(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>tI(t)(e)}}},tA=(e,t)=>(n,r,i)=>{let a,o,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},c=!1,u=new Set,l=new Set;try{a=s.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=tI(s.serialize),h=()=>{let e;let t=d({state:s.partialize({...r()}),version:s.version}).then(e=>a.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},f=i.setState;i.setState=(e,t)=>{f(e,t),h()};let p=e((...e)=>{n(...e),h()},r,i),m=()=>{var e;if(!a)return;c=!1,u.forEach(e=>e(r()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,r()))||void 0;return tI(a.getItem.bind(a))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return e.state;if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return n(o=s.merge(e,null!=(t=r())?t:p),!0),h()}).then(()=>{null==t||t(o,void 0),c=!0,l.forEach(e=>e(o))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>c,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},m(),o||p},tj=(e,t)=>(n,r,i)=>{let a,o={storage:function(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var t;let r=e=>null===e?null:JSON.parse(e,void 0),i=null!=(t=n.getItem(e))?t:null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,t)=>n.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>n.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,c=new Set,u=new Set,l=o.storage;if(!l)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=o.partialize({...r()});return l.setItem(o.name,{state:e,version:o.version})},h=i.setState;i.setState=(e,t)=>{h(e,t),d()};let f=e((...e)=>{n(...e),d()},r,i);i.getInitialState=()=>f;let p=()=>{var e,t;if(!l)return;s=!1,c.forEach(e=>{var t;return e(null!=(t=r())?t:f)});let i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=r())?e:f))||void 0;return tI(l.getItem.bind(l))(o.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];if(o.migrate)return[!0,o.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[i,s]=e;if(n(a=o.merge(s,null!=(t=r())?t:f),!0),i)return d()}).then(()=>{null==i||i(a,void 0),a=r(),s=!0,u.forEach(e=>e(a))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},o.skipHydration||p(),a||f},tN=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),tA(e,t)):tj(e,t),tM=e=>{let t;let n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},o=t=e(r,i,a);return a},tT=e=>e?tM(e):tM;var tU=n(15229);function tL(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var tR=n(45775);function tF(e,t,{batch:n={multicall:{wait:32}},pollingInterval:r=4e3,rank:i,retryCount:a,retryDelay:o,stallTimeout:s}={}){if(!e.length)throw Error("must have at least one chain");let c=[],u={},l={};for(let n of e){let e=!1;for(let r of t){let t=r(n);t&&(e=!0,c.some(({id:e})=>e===n.id)||(c=[...c,t.chain]),u[n.id]=[...u[n.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(l[n.id]=[...l[n.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw Error(`Could not find valid provider configuration for chain "${n.name}". You may need to add \`jsonRpcProvider\` to \`configureChains\` with the chain's RPC URLs. Read more: https://wagmi.sh/core/providers/jsonRpc`)}return{chains:c,publicClient:({chainId:t})=>{let l=c.find(e=>e.id===t)??e[0],d=u[l.id];if(!d||!d[0])throw Error(`No providers configured for chain "${l.id}"`);return Object.assign(tf({batch:n,chain:l,transport:tb(d.map(e=>(function(e,t={}){let{batch:n,fetchOptions:r,key:i="http",name:a="HTTP JSON-RPC",retryDelay:o}=t;return({chain:s,retryCount:c,timeout:u})=>{let{batchSize:l=1e3,wait:d=0}="object"==typeof n?n:{},h=t.retryCount??c,f=u??t.timeout??1e4,p=e||s?.rpcUrls.default.http[0];if(!p)throw new ty;return(0,tm.q)({key:i,name:a,async request({method:t,params:i}){let a={method:t,params:i},{schedule:o}=(0,tv.S)({id:`${e}`,wait:d,shouldSplitBatch:e=>e.length>l,fn:e=>tO.http(p,{body:e,fetchOptions:r,timeout:f}),sort:(e,t)=>e.id-t.id}),s=async e=>n?o(e):[await tO.http(p,{body:e,fetchOptions:r,timeout:f})],[{error:c,result:u}]=await s(a);if(c)throw new tg.bs({body:a,error:c,url:p});return u},retryCount:h,retryDelay:o,timeout:f,type:"http"},{fetchOptions:r,url:e})}})(e,{timeout:s})),{rank:i,retryCount:a,retryDelay:o}),pollingInterval:r}),{chains:c})},webSocketPublicClient:({chainId:t})=>{let u=c.find(e=>e.id===t)??e[0],d=l[u.id];if(d&&d[0])return Object.assign(tf({batch:n,chain:u,transport:tb(d.map(e=>(function(e,t={}){let{key:n="webSocket",name:r="WebSocket JSON-RPC",retryDelay:i}=t;return({chain:a,retryCount:o,timeout:s})=>{let c=t.retryCount??o,u=s??t.timeout??1e4,l=e||a?.rpcUrls.default.webSocket?.[0];if(!l)throw new ty;return(0,tm.q)({key:n,name:r,async request({method:e,params:t}){let n={method:e,params:t},r=await tx(l),{error:i,result:a}=await tO.webSocketAsync(r,{body:n,timeout:u});if(i)throw new tg.bs({body:n,error:i,url:l});return a},retryCount:c,retryDelay:i,timeout:u,type:"webSocket"},{getSocket:()=>tx(l),async subscribe({params:e,onData:t,onError:n}){let r=await tx(l),{result:i}=await new Promise((i,a)=>tO.webSocket(r,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error){a(e.error),n?.(e.error);return}if("number"==typeof e.id){i(e);return}"eth_subscription"===e.method&&t(e.params)}}));return{subscriptionId:i,unsubscribe:async()=>new Promise(e=>tO.webSocket(r,{body:{method:"eth_unsubscribe",params:[i]},onResponse:e}))}}})}})(e,{timeout:s})),{rank:i,retryCount:a,retryDelay:o}),pollingInterval:r}),{chains:c})}}}var tB=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},t$=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},tW=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},tz=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}},tq=(e,{find:t,replace:n})=>e&&t(e)?n(e):"object"!=typeof e?e:Array.isArray(e)?e.map(e=>tq(e,{find:t,replace:n})):e instanceof Object?Object.entries(e).reduce((e,[r,i])=>({...e,[r]:tq(i,{find:t,replace:n})}),{}):e;function tG(e){return tq(JSON.parse(e),{find:e=>"string"==typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function tK(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(tP.Bd[e])}function tH(e,t){return e.slice(0,t).join(".")||"."}function tV(e,t){let{length:n}=e;for(let r=0;r{let r="bigint"==typeof n?`#bigint.${n.toString()}`:n;return t?.(e,r)||r},r),n??void 0)}var tQ={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function tX({deserialize:e=tG,key:t="wagmi",serialize:n=tY,storage:r}){return{...r,getItem:(n,i=null)=>{let a=r.getItem(`${t}.${n}`);try{return a?e(a):i}catch(e){return console.warn(e),i}},setItem:(e,i)=>{if(null===i)r.removeItem(`${t}.${e}`);else try{r.setItem(`${t}.${e}`,n(i))}catch(e){console.error(e)}},removeItem:e=>r.removeItem(`${t}.${e}`)}}var tZ="store",tJ=class{constructor({autoConnect:e=!1,connectors:t=[new c._],publicClient:n,storage:s=tX({storage:"undefined"!=typeof window?window.localStorage:tQ}),logger:u={warn:console.warn},webSocketPublicClient:l}){let p;d(this,a),this.publicClients=new Map,this.webSocketPublicClients=new Map,d(this,r,void 0),d(this,i,void 0),this.args={autoConnect:e,connectors:t,logger:u,publicClient:n,storage:s,webSocketPublicClient:l};let m="disconnected";if(e)try{let e=s.getItem(tZ),t=e?.state?.data;m=t?.account?"reconnecting":"connecting",p=t?.chain?.id}catch(e){}let b="function"==typeof t?t():t;b.forEach(e=>e.setStorage(s)),this.store=tT(tk(tN(()=>({connectors:b,publicClient:this.getPublicClient({chainId:p}),status:m,webSocketPublicClient:this.getWebSocketPublicClient({chainId:p})}),{name:tZ,storage:s,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}))),this.storage=s,h(this,i,s?.getItem("wallet")),f(this,a,o).call(this),e&&"undefined"!=typeof window&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){let t="function"==typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){this.connector&&await this.connector.disconnect?.(),h(this,r,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(l(this,r))return;h(this,r,!0),this.setState(e=>({...e,status:e.data?.account?"reconnecting":"connecting"}));let e=l(this,i)?[...this.connectors].sort(e=>e.id===l(this,i)?-1:1):this.connectors,t=!1;for(let n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;let e=await n.connect();this.setState(t=>({...t,connector:n,chains:n?.chains,data:e,status:"connected"})),t=!0;break}return t||this.setState(e=>({...e,data:void 0,status:"disconnected"})),h(this,r,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};let t="function"==typeof e?e():e;t.forEach(e=>e.setStorage(this.args.storage)),this.setState(e=>({...e,connectors:t}))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e||(t=this.publicClients.get(e??-1)))return t;let{publicClient:n}=this.args;return t="function"==typeof n?n({chainId:e}):n,this.publicClients.set(e??-1,t),t}setPublicClient(e){let t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(e=>({...e,publicClient:this.getPublicClient({chainId:t})}))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e||(t=this.webSocketPublicClients.get(e??-1)))return t;let{webSocketPublicClient:n}=this.args;return(t="function"==typeof n?n({chainId:e}):n)&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){let t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})}))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}};function t0(e){let t=new tJ(e);return s=t,t}function t1(){if(!s)throw Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return s}async function t2({chainId:e,connector:t}){let n=t1(),r=n.connector;if(r&&t.id===r.id)throw new t$;try{n.setState(e=>({...e,status:"connecting"}));let r=await t.connect({chainId:e});return n.setLastUsedConnector(t.id),n.setState(e=>({...e,connector:t,chains:t?.chains,data:r,status:"connected"})),n.storage.setItem("connected",!0),{...r,connector:t}}catch(e){throw n.setState(e=>({...e,status:e.connector?"connected":"disconnected"})),e}}async function t3(){let e=t1();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}r=new WeakMap,i=new WeakMap,a=new WeakSet,o=function(){let e=e=>{this.setState(t=>({...t,data:{...t.data,...e}}))},t=()=>{this.clearState()},n=e=>{this.setState(t=>({...t,error:e}))};this.store.subscribe(({connector:e})=>e,(r,i)=>{i?.off?.("change",e),i?.off?.("disconnect",t),i?.off?.("error",n),r&&(r.on?.("change",e),r.on?.("disconnect",t),r.on?.("error",n))});let{publicClient:r,webSocketPublicClient:i}=this.args;("function"==typeof r||"function"==typeof i)&&this.store.subscribe(({data:e})=>e?.chain?.id,e=>{this.setState(t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})}))})};var t6=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],t5=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function t8({chainId:e}={}){let t=t1();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function t4({chainId:e}={}){let t=t1();return await t.connector?.getWalletClient?.({chainId:e})||null}async function t9({chainId:e,contracts:t,blockNumber:n,blockTag:r,...i}){let a=t8({chainId:e});if(!a.chains)throw new tW;if(e&&a.chain.id!==e)throw new tB({chainId:e});return a.multicall({allowFailure:i.allowFailure??!0,blockNumber:n,blockTag:r,contracts:t})}async function t7({address:e,account:t,chainId:n,abi:r,args:i,functionName:a,blockNumber:o,blockTag:s}){return t8({chainId:n}).readContract({abi:r,address:e,account:t,functionName:a,args:i,blockNumber:o,blockTag:s})}async function ne({contracts:e,blockNumber:t,blockTag:n,...r}){let{allowFailure:i=!0}=r;try{let r=t8(),a=e.reduce((e,t,n)=>{let i=t.chainId??r.chain.id;return{...e,[i]:[...e[i]||[],{contract:t,index:n}]}},{}),o=(await Promise.all(Object.entries(a).map(([e,r])=>t9({allowFailure:i,chainId:parseInt(e),contracts:r.map(({contract:e})=>e),blockNumber:t,blockTag:n})))).flat(),s=Object.values(a).flatMap(e=>e.map(({index:e})=>e));return o.reduce((e,t,n)=>(e&&(e[s[n]]=t),e),[])}catch(a){if(a instanceof D.uq)throw a;let r=()=>e.map(e=>t7({...e,blockNumber:t,blockTag:n}));if(i)return(await Promise.allSettled(r())).map(e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"});return await Promise.all(r())}}async function nt({address:e,chainId:t,formatUnits:n,token:r}){let i=t1(),a=t8({chainId:t});if(r){let i=async({abi:i})=>{let a={abi:i,address:r,chainId:t},[o,s,c]=await ne({allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[e]},{...a,functionName:"decimals"},{...a,functionName:"symbol"}]});return{decimals:s,formatted:(0,tU.b)(o??"0",tK(n??s)),symbol:c,value:o}};try{return await i({abi:t6})}catch(e){if(e instanceof D.uq){let{symbol:e,...t}=await i({abi:t5});return{symbol:(0,eI.rR)((0,v.f)(e,{dir:"right"})),...t}}throw e}}let o=[...i.publicClient.chains||[],...i.chains??[]],s=await a.getBalance({address:e}),c=o.find(e=>e.id===a.chain.id);return{decimals:c?.nativeCurrency.decimals??18,formatted:(0,tU.b)(s??"0",tK(n??18)),symbol:c?.nativeCurrency.symbol??"ETH",value:s}}function nn(){let{data:e,connector:t,status:n}=t1();switch(n){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:n};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:n};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:n};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:n}}}function nr(){let e=t1(),t=e.data?.chain?.id,n=e.chains??[],r=[...e.publicClient?.chains||[],...n].find(e=>e.id===t)??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...r,...e.data?.chain,id:t}:void 0,chains:n}}async function ni(e){let t=await t4();if(!t)throw new tS.N;return await t.signMessage({message:e.message})}async function na({chainId:e}){let{connector:t}=t1();if(!t)throw new tS.N;if(!t.switchChain)throw new tz({connector:t});return t.switchChain(e)}function no(e,{selector:t=e=>e}={}){return t1().subscribe(({data:e,connector:n,status:r})=>t({address:e?.account,connector:n,status:r}),()=>e(nn()),{equalityFn:tL})}function ns(e,{selector:t=e=>e}={}){return t1().subscribe(({data:e,chains:n})=>t({chainId:e?.chain?.id,chains:n}),()=>e(nr()),{equalityFn:tL})}async function nc({name:e,chainId:t}){let{normalize:r}=await n.e(6512).then(n.bind(n,46512)),i=t8({chainId:t});return await i.getEnsAvatar({name:r(e)})}async function nu({address:e,chainId:t}){return t8({chainId:t}).getEnsName({address:(0,tR.K)(e)})}},68612:function(e,t,n){"use strict";let r;n.d(t,{AccountCtrl:function(){return D},Id:function(){return p},ConfigCtrl:function(){return w},zv:function(){return f},uA:function(){return b},ExplorerCtrl:function(){return W},jb:function(){return K},OptionsCtrl:function(){return y},AV:function(){return h},ThemeCtrl:function(){return ee},ToastCtrl:function(){return en},WcConnectionCtrl:function(){return q}});var i=n(72478);let a=e=>"object"==typeof e&&null!==e,o=new WeakMap,s=new WeakSet,[c]=((e=Object.is,t=(e,t)=>new Proxy(e,t),n=e=>a(e)&&!s.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),r=e=>e.configurable&&e.enumerable&&e.writable,c=e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},u=new WeakMap,l=(e,t,n=c)=>{let r=u.get(e);if((null==r?void 0:r[0])===t)return r[1];let a=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return(0,i.jc)(a,!0),u.set(e,[t,a]),Reflect.ownKeys(e).forEach(t=>{if(Object.getOwnPropertyDescriptor(a,t))return;let r=Reflect.get(e,t),c={value:r,enumerable:!0,configurable:!0};if(s.has(r))(0,i.jc)(r,!1);else if(r instanceof Promise)delete c.value,c.get=()=>n(r);else if(o.has(r)){let[e,t]=o.get(r);c.value=l(e,t(),n)}Object.defineProperty(a,t,c)}),Object.preventExtensions(a)},d=new WeakMap,h=[1,1],f=c=>{if(!a(c))throw Error("object required");let u=d.get(c);if(u)return u;let p=h[0],m=new Set,b=(e,t=++h[0])=>{p!==t&&(p=t,m.forEach(n=>n(e,t)))},g=h[1],y=(e=++h[1])=>(g===e||m.size||(g=e,w.forEach(([t])=>{let n=t[1](e);n>p&&(p=n)})),p),v=e=>(t,n)=>{let r=[...t];r[1]=[e,...r[1]],b(r,n)},w=new Map,E=(e,t)=>{if(w.has(e))throw Error("prop listener already exists");if(m.size){let n=t[3](v(e));w.set(e,[t,n])}else w.set(e,[t])},_=e=>{var t;let n=w.get(e);n&&(w.delete(e),null==(t=n[1])||t.call(n))},D=e=>{m.add(e),1===m.size&&w.forEach(([e,t],n)=>{if(t)throw Error("remove already exists");let r=e[3](v(n));w.set(n,[e,r])});let t=()=>{m.delete(e),0===m.size&&w.forEach(([e,t],n)=>{t&&(t(),w.set(n,[e]))})};return t},C=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),x=(t,r,c,u,l)=>{if(t&&(e(r,u)||d.has(u)&&e(r,d.get(u))))return;_(c),a(u)&&(u=(0,i.o5)(u)||u);let h=u;if(u instanceof Promise)u.then(e=>{u.status="fulfilled",u.value=e,b(["resolve",[c],e])}).catch(e=>{u.status="rejected",u.reason=e,b(["reject",[c],e])});else{!o.has(u)&&n(u)&&(h=f(u));let e=!s.has(h)&&o.get(h);e&&E(c,e)}l(h),b(["set",[c],u,r])},O={deleteProperty(e,t){let n=Reflect.get(e,t);_(t);let r=Reflect.deleteProperty(e,t);return r&&b(["delete",[t],n]),r},set(e,t,n,r){let i=Reflect.has(e,t),a=Reflect.get(e,t,r);return x(i,a,t,n,n=>{Reflect.set(e,t,n,r)}),!0},defineProperty(e,t,n){if(r(n)){let i=Reflect.getOwnPropertyDescriptor(e,t);if(!i||r(i))return x(!!i&&"value"in i,null==i?void 0:i.value,t,n.value,r=>{Reflect.defineProperty(e,t,{...n,value:r})}),!0}return Reflect.defineProperty(e,t,n)}},S=t(C,O);d.set(c,S);let P=[C,y,l,D];return o.set(S,P),Reflect.ownKeys(c).forEach(e=>{let t=Object.getOwnPropertyDescriptor(c,e);"value"in t&&(S[e]=c[e],delete t.value,delete t.writable),Object.defineProperty(C,e,t)}),S})=>[f,o,s,e,t,n,r,c,u,l,d,h])();function u(e={}){return c(e)}function l(e,t,n){let r;let i=o.get(e);i||console.warn("Please use proxy object");let a=[],s=i[3],c=!1,u=s(e=>{if(a.push(e),n){t(a.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,c&&t(a.splice(0))}))});return c=!0,()=>{c=!1,u()}}let d=u({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),h={state:d,subscribe:e=>l(d,()=>e(d)),push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();let[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},f={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",W3M_VERSION:"W3M_VERSION",W3M_PREFER_INJECTED_URL_FLAG:"w3mPreferInjected",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>"u">typeof window&&!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>f.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){let e=navigator.userAgent.toLowerCase();return f.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,n){if(f.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);let i=encodeURIComponent(t);return`${r}wc?uri=${i}`},formatUniversalUrl(e,t,n){if(!f.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,n);let i=encodeURIComponent(t);return`${r}wc?uri=${i}`},wait:async e=>new Promise(t=>{setTimeout(t,e)}),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(f.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{let[t]=e.split("?");localStorage.setItem(f.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(f.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setWeb3ModalVersionInStorage(){try{"u">typeof localStorage&&localStorage.setItem(f.W3M_VERSION,"2.7.1")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;let t=null==(e=h.state.data)?void 0:e.Wallet;if(!t)throw Error('Missing "Wallet" view data');return t},getSwitchNetworkRouterData(){var e;let t=null==(e=h.state.data)?void 0:e.SwitchNetwork;if(!t)throw Error('Missing "SwitchNetwork" view data');return t},isPreferInjectedFlag:()=>"u">typeof location&&new URLSearchParams(location.search).has(f.W3M_PREFER_INJECTED_URL_FLAG)},p={ethereumClient:void 0,setEthereumClient(e){r=e},client(){if(r)return r;throw Error("ClientCtrl has no client set")}},m=u({enabled:"u">typeof location&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),b={state:m,subscribe:e=>l(m.events,()=>e(function(e,t){let n=o.get(e);n||console.warn("Please use proxy object");let[r,i,a]=n;return a(r,i(),void 0)}(m.events[m.events.length-1]))),initialize(){m.enabled&&"u">typeof(null==crypto?void 0:crypto.randomUUID)&&(m.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){m.connectedWalletId=e},click(e){if(m.enabled){let t={type:"CLICK",name:e.name,userSessionId:m.userSessionId,timestamp:Date.now(),data:e};m.events.push(t)}},track(e){if(m.enabled){let t={type:"TRACK",name:e.name,userSessionId:m.userSessionId,timestamp:Date.now(),data:e};m.events.push(t)}},view(e){if(m.enabled){let t={type:"VIEW",name:e.name,userSessionId:m.userSessionId,timestamp:Date.now(),data:e};m.events.push(t)}}},g=u({selectedChain:void 0,chains:void 0,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,isPreferInjected:!1}),y={state:g,subscribe:e=>l(g,()=>e(g)),setChains(e){g.chains=e},getSelectedChain(){let e=p.client().getNetwork().chain;return e&&(g.selectedChain=e),g.selectedChain},setSelectedChain(e){g.selectedChain=e},setIsCustomDesktop(e){g.isCustomDesktop=e},setIsCustomMobile(e){g.isCustomMobile=e},setIsDataLoaded(e){g.isDataLoaded=e},setIsUiLoaded(e){g.isUiLoaded=e},setIsPreferInjected(e){g.isPreferInjected=e}},v=u({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,tokenContracts:void 0,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),w={state:v,subscribe:e=>l(v,()=>e(v)),setConfig(e){var t,n;b.initialize(),y.setIsCustomMobile(!!(null==(t=e.mobileWallets)?void 0:t.length)),y.setIsCustomDesktop(!!(null==(n=e.desktopWallets)?void 0:n.length)),y.setChains(p.client().chains),y.setIsPreferInjected(p.client().isInjectedProviderInstalled()&&f.isPreferInjectedFlag()),e.defaultChain&&y.setSelectedChain(e.defaultChain),f.setWeb3ModalVersionInStorage(),Object.assign(v,e)}},E={async getIdentity(e,t){let{projectId:n}=w.state,r=`eip155:${t}`,i=`https://rpc.walletconnect.com/v1/identity/${e}?chainId=${r}&projectId=${n}`;return(await fetch(i)).json()}},_=u({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),D={state:_,subscribe:e=>l(_,()=>e(_)),getAccount(){let e=p.client().getAccount();_.address=e.address,_.isConnected=e.isConnected},async fetchProfile(e,t){var n;try{_.profileLoading=!0,_.profileName=null,_.profileAvatar=null;let r=t??_.address,i=null==(n=y.state.chains)?void 0:n.find(e=>1===e.id);if(r&&i){try{let e=await E.getIdentity(r,1);_.profileName=e.name,_.profileAvatar=e.avatar}catch{let e=await p.client().fetchEnsName({address:r,chainId:1});if(_.profileName=e,e){let t=await p.client().fetchEnsAvatar({name:e,chainId:1});_.profileAvatar=t}}_.profileAvatar&&await e(_.profileAvatar)}}finally{_.profileLoading=!1}},async fetchBalance(e){try{let t;let{chain:n}=p.client().getNetwork(),{tokenContracts:r}=w.state;n&&r&&(t=r[n.id]),_.balanceLoading=!0;let i=e??_.address;if(i){let e=await p.client().fetchBalance({address:i,token:t});_.balance={amount:e.formatted,symbol:e.symbol}}}finally{_.balanceLoading=!1}},setAddress(e){_.address=e},setIsConnected(e){_.isConnected=e},resetBalance(){_.balance=void 0},resetAccount(){_.address=void 0,_.isConnected=!1,_.profileName=void 0,_.profileAvatar=void 0,_.balance=void 0}};var C=Object.defineProperty,x=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,P=(e,t,n)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))O.call(t,n)&&P(e,n,t[n]);if(x)for(var n of x(t))S.call(t,n)&&P(e,n,t[n]);return e};let I="https://explorer-api.walletconnect.com",A="js-2.7.1";async function j(e,t){let n=k({sdkType:"w3m",sdkVersion:A},t),r=new URL(e,I);return r.searchParams.append("projectId",w.state.projectId),Object.entries(n).forEach(([e,t])=>{t&&r.searchParams.append(e,String(t))}),(await fetch(r)).json()}let N={getDesktopListings:async e=>j("/w3m/v1/getDesktopListings",e),getMobileListings:async e=>j("/w3m/v1/getMobileListings",e),getInjectedListings:async e=>j("/w3m/v1/getInjectedListings",e),getAllListings:async e=>j("/w3m/v1/getAllListings",e),getWalletImageUrl:e=>`${I}/w3m/v1/getWalletImage/${e}?projectId=${w.state.projectId}&sdkType=w3m&sdkVersion=${A}`,getAssetImageUrl:e=>`${I}/w3m/v1/getAssetImage/${e}?projectId=${w.state.projectId}&sdkType=w3m&sdkVersion=${A}`};var M=Object.defineProperty,T=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,R=(e,t,n)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))U.call(t,n)&&R(e,n,t[n]);if(T)for(var n of T(t))L.call(t,n)&&R(e,n,t[n]);return e};let B=f.isMobile(),$=u({wallets:{listings:[],total:0,page:1},injectedWallets:[],search:{listings:[],total:0,page:1},recomendedWallets:[]}),W={state:$,async getRecomendedWallets(){let{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=w.state;if("NONE"===e||"ALL"===t&&!e)return $.recomendedWallets;if(f.isArray(e)){let t={recommendedIds:e.join(",")},{listings:n}=await N.getAllListings(t),r=Object.values(n);r.sort((t,n)=>e.indexOf(t.id)-e.indexOf(n.id)),$.recomendedWallets=r}else{let e=f.isArray(t),n={page:1,entries:f.RECOMMENDED_WALLET_AMOUNT,version:2,excludedIds:e?t.join(","):void 0},{listings:r}=B?await N.getMobileListings(n):await N.getDesktopListings(n);$.recomendedWallets=Object.values(r)}return $.recomendedWallets},async getWallets(e){let t=F({},e),{explorerRecommendedWalletIds:n,explorerExcludedWalletIds:r}=w.state,{recomendedWallets:i}=$;if("ALL"===r)return $.wallets;i.length?t.excludedIds=i.map(e=>e.id).join(","):f.isArray(n)&&(t.excludedIds=n.join(",")),f.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(","));let{page:a,search:o}=e,{listings:s,total:c}=B?await N.getMobileListings(t):await N.getDesktopListings(t),u=Object.values(s),l=o?"search":"wallets";return $[l]={listings:[...$[l].listings,...u],total:c,page:a??1},{listings:u,total:c}},async getInjectedWallets(){let{listings:e}=await N.getInjectedListings({}),t=Object.values(e);return $.injectedWallets=t,$.injectedWallets},getWalletImageUrl:e=>N.getWalletImageUrl(e),getAssetImageUrl:e=>N.getAssetImageUrl(e),resetSearch(){$.search={listings:[],total:0,page:1}}},z=u({pairingEnabled:!1,pairingUri:"",pairingError:!1}),q={state:z,subscribe:e=>l(z,()=>e(z)),setPairingUri(e){z.pairingUri=e},setPairingError(e){z.pairingError=e},setPairingEnabled(e){z.pairingEnabled=e}},G=u({open:!1}),K={state:G,subscribe:e=>l(G,()=>e(G)),open:async e=>new Promise(t=>{let{isUiLoaded:n,isDataLoaded:r,isPreferInjected:i,selectedChain:a}=y.state,{isConnected:o}=D.state,{enableNetworkView:s}=w.state;if(q.setPairingEnabled(!0),o||f.removeWalletConnectDeepLink(),null!=e&&e.route)h.reset(e.route);else if(o)h.reset("Account");else if(s)h.reset("SelectNetwork");else if(i){p.client().connectConnector("injected",a?.id).catch(e=>console.error(e)),t();return}else h.reset("ConnectWallet");let{pairingUri:c}=q.state;if(n&&r&&(c||o))G.open=!0,t();else{let e=setInterval(()=>{let n=y.state,r=q.state;n.isUiLoaded&&n.isDataLoaded&&(r.pairingUri||o)&&(clearInterval(e),G.open=!0,t())},200)}}),close(){G.open=!1}};var H=Object.defineProperty,V=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,X=(e,t,n)=>t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))Y.call(t,n)&&X(e,n,t[n]);if(V)for(var n of V(t))Q.call(t,n)&&X(e,n,t[n]);return e};let J=u({themeMode:"u">typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),ee={state:J,subscribe:e=>l(J,()=>e(J)),setThemeConfig(e){let{themeMode:t,themeVariables:n}=e;t&&(J.themeMode=t),n&&(J.themeVariables=Z({},n))}},et=u({open:!1,message:"",variant:"success"}),en={state:et,subscribe:e=>l(et,()=>e(et)),openToast(e,t){et.open=!0,et.message=e,et.variant=t},closeToast(){et.open=!1}}},55548:function(e,t,n){"use strict";n.d(t,{J0:function(){return U},gu:function(){return R},X:function(){return L}});var r,i,a,o,s,c,u,l,d,h,f,p,m,b,g,y,v,w,E,_,D=n(30438),C=n(64358),x=n(75276),O=n(88338),S=n(45775),P=n(39028),k=n(79578),I=n(3980),A=n(92106),j="eip155",N="requestedChains",M="wallet_addEthereumChain",T=class extends x.wR{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),(0,x.Ko)(this,a),(0,x.Ko)(this,s),(0,x.Ko)(this,u),(0,x.Ko)(this,d),(0,x.Ko)(this,f),(0,x.Ko)(this,m),(0,x.Ko)(this,g),(0,x.Ko)(this,v),(0,x.Ko)(this,E),this.id="walletConnect",this.name="WalletConnect",this.ready=!0,(0,x.Ko)(this,r,void 0),(0,x.Ko)(this,i,void 0),this.onAccountsChanged=e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,S.K)(e[0])})},this.onChainChanged=e=>{let t=Number(e),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{(0,x.U9)(this,m,b).call(this,[]),this.emit("disconnect")},this.onDisplayUri=e=>{this.emit("message",{type:"display_uri",data:e})},this.onConnect=()=>{this.emit("connect",{})},(0,x.U9)(this,a,o).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let n=e;if(!n){let e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;n=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!n)throw Error("No chains found on connector.");let r=await this.getProvider();(0,x.U9)(this,d,h).call(this);let i=(0,x.U9)(this,u,l).call(this);if(r.session&&i&&await r.disconnect(),!r.session||i){let e=this.chains.filter(e=>e.id!==n).map(e=>e.id);this.emit("message",{type:"connecting"}),await r.connect({pairingTopic:t,optionalChains:[n,...e]}),(0,x.U9)(this,m,b).call(this,this.chains.map(({id:e})=>e))}let a=await r.enable(),o=(0,S.K)(a[0]),s=await this.getChainId(),c=this.isChainUnsupported(s);return{account:o,chain:{id:s,unsupported:c}}}catch(e){if(/user rejected/i.test(e?.message))throw new P.ab(e);throw e}}async disconnect(){let e=await this.getProvider();try{await e.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{(0,x.U9)(this,f,p).call(this),(0,x.U9)(this,m,b).call(this,[])}}async getAccount(){let{accounts:e}=await this.getProvider();return(0,S.K)(e[0])}async getChainId(){let{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return(0,x.ac)(this,r)||await (0,x.U9)(this,a,o).call(this),e&&await this.switchChain(e),(0,x.ac)(this,r)}async getWalletClient({chainId:e}={}){let[t,n]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),r=this.chains.find(t=>t.id===e);if(!t)throw Error("provider is required.");return(0,k.K)({account:n,chain:r,transport:(0,I.P)(t)})}async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),n=(0,x.U9)(this,u,l).call(this);if(!e)return!1;if(n&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){let t=this.chains.find(t=>t.id===e);if(!t)throw new P.x3(Error("chain not found on connector."));try{let n=await this.getProvider(),r=(0,x.U9)(this,v,w).call(this),i=(0,x.U9)(this,E,_).call(this);if(!r.includes(e)&&i.includes(M)){await n.request({method:M,params:[{chainId:(0,A.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});let r=(0,x.U9)(this,g,y).call(this);r.push(e),(0,x.U9)(this,m,b).call(this,r)}return await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,A.eC)(e)}]}),t}catch(t){let e="string"==typeof t?t:t?.message;if(/user rejected request/i.test(e))throw new P.ab(t);throw new P.x3(t)}}};r=new WeakMap,i=new WeakMap,a=new WeakSet,o=async function(){return(0,x.ac)(this,i)||"undefined"==typeof window||(0,x.qx)(this,i,(0,x.U9)(this,s,c).call(this)),(0,x.ac)(this,i)},s=new WeakSet,c=async function(){let{EthereumProvider:e}=await n.e(5400).then(n.bind(n,85400)),t=this.chains.map(({id:e})=>e);if(t.length){let{projectId:n,showQrModal:i=!0,qrModalOptions:a,metadata:o,relayUrl:s}=this.options;(0,x.qx)(this,r,await e.init({showQrModal:i,qrModalOptions:a,projectId:n,optionalChains:t,rpcMap:Object.fromEntries(this.chains.map(e=>[e.id,e.rpcUrls.default.http[0]])),metadata:o,relayUrl:s}))}},u=new WeakSet,l=function(){if((0,x.U9)(this,E,_).call(this).includes(M)||!this.options.isNewChainsStale)return!1;let e=(0,x.U9)(this,g,y).call(this),t=this.chains.map(({id:e})=>e),n=(0,x.U9)(this,v,w).call(this);return(!n.length||!!n.some(e=>t.includes(e)))&&!t.every(t=>e.includes(t))},d=new WeakSet,h=function(){(0,x.ac)(this,r)&&((0,x.U9)(this,f,p).call(this),(0,x.ac)(this,r).on("accountsChanged",this.onAccountsChanged),(0,x.ac)(this,r).on("chainChanged",this.onChainChanged),(0,x.ac)(this,r).on("disconnect",this.onDisconnect),(0,x.ac)(this,r).on("session_delete",this.onDisconnect),(0,x.ac)(this,r).on("display_uri",this.onDisplayUri),(0,x.ac)(this,r).on("connect",this.onConnect))},f=new WeakSet,p=function(){(0,x.ac)(this,r)&&((0,x.ac)(this,r).removeListener("accountsChanged",this.onAccountsChanged),(0,x.ac)(this,r).removeListener("chainChanged",this.onChainChanged),(0,x.ac)(this,r).removeListener("disconnect",this.onDisconnect),(0,x.ac)(this,r).removeListener("session_delete",this.onDisconnect),(0,x.ac)(this,r).removeListener("display_uri",this.onDisplayUri),(0,x.ac)(this,r).removeListener("connect",this.onConnect))},m=new WeakSet,b=function(e){this.storage?.setItem(N,e)},g=new WeakSet,y=function(){return this.storage?.getItem(N)??[]},v=new WeakSet,w=function(){if(!(0,x.ac)(this,r))return[];let e=x.ac(this,r).session?.namespaces;if(!e)return[];let t=(0,O.fK)(e);return t[j]?.chains?.map(e=>parseInt(e.split(":")[1]||""))??[]},E=new WeakSet,_=function(){if(!(0,x.ac)(this,r))return[];let e=x.ac(this,r).session?.namespaces;if(!e)return[];let t=(0,O.fK)(e);return t[j]?.methods??[]};class U{constructor(e,t){this.wagmi={},this.chains=[],this.namespace="eip155",this.disconnect=D.zP,this.getAccount=D.D0,this.watchAccount=D.uH,this.fetchBalance=D.EG,this.getNetwork=D.Hy,this.watchNetwork=D.QC,this.switchNetwork=D.If,this.fetchEnsName=D.Lk,this.fetchEnsAvatar=D.w6,this.wagmi=e,this.chains=t}getWalletConnectConnector(){let e=this.wagmi.connectors.find(e=>"walletConnect"===e.id);if(!e)throw Error("WalletConnectConnector is required");return e}async connectWalletConnectProvider(e,t){return await e.getProvider(),new Promise(n=>{e.once("message",e=>{"display_uri"===e.type&&(t(e.data),n())})})}getConnectorById(e){let t=this.wagmi.connectors.find(t=>t.id===e);if(!t)throw Error(`Connector for id ${e} was not found`);return t}getConnectors(){return this.wagmi.connectors.filter(e=>!e.id.includes("walletConnect"))}async connectWalletConnect(e,t){let n=this.getWalletConnectConnector(),r={connector:n};return t&&(r.chainId=t),Promise.all([(0,D.$j)(r),this.connectWalletConnectProvider(n,e)])}async connectConnector(e,t){let n={connector:this.getConnectorById(e)};return t&&(n.chainId=t),await (0,D.$j)(n)}isInjectedProviderInstalled(){return"u">typeof window.ethereum}safeCheckInjectedProvider(e){var t;try{let n=String(e);return!!(null==(t=window.ethereum)?void 0:t[n])}catch(e){return console.error(e),!1}}async getConnectedChainIds(){var e,t,n;let r=null==(t=null==(e=(await this.getWalletConnectConnector().getProvider()).signer)?void 0:e.session)?void 0:t.namespaces,i=null==(n=r?.[this.namespace])?void 0:n.methods;if(null!=i&&i.includes("wallet_addEthereumChain"))return"ALL";if(r){let e=[];return Object.keys(r).forEach(t=>{t.includes(this.namespace)&&e.push(...r[t].accounts)}),e?.map(e=>e.split(":")[1])}return"ALL"}}function L({projectId:e}){return function({rpc:e}){return function(t){let n=e(t);return n&&""!==n.http?{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[n.http]}}},rpcUrls:{http:[n.http],webSocket:n.webSocket?[n.webSocket]:void 0}}:null}}({rpc:t=>{var n;return[1,3,4,5,10,42,56,69,97,100,137,280,324,420,42161,42220,43114,80001,421611,421613,1313161554,1313161555].includes(t.id)?{http:`https://rpc.walletconnect.com/v1/?chainId=eip155:${t.id}&projectId=${e}`}:{http:t.rpcUrls.default.http[0],webSocket:null==(n=t.rpcUrls.default.webSocket)?void 0:n[0]}}})}function R({chains:e,projectId:t}){return[new T({chains:e,options:{projectId:t,showQrModal:!1}}),new C._({chains:e,options:{shimDisconnect:!0}})]}},50555:function(e,t,n){"use strict";n.d(t,{Eg:function(){return b},k_:function(){return D}});var r=n(67294),i=n(68612);Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var a=Object.defineProperty,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&u(e,n,t[n]);if(o)for(var n of o(t))c.call(t,n)&&u(e,n,t[n]);return e};function d(e){return r.createElement("w3m-modal",l({},e))}var h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,m=(e,t)=>{var n={};for(var r in e)f.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&h)for(var r of h(e))0>t.indexOf(r)&&p.call(e,r)&&(n[r]=e[r]);return n};let b=(0,r.memo)(function(e){var{ethereumClient:t}=e,a=m(e,["ethereumClient"]);let o=(0,r.useCallback)(async()=>{i.ThemeCtrl.setThemeConfig(a),t&&i.Id.setEthereumClient(t),i.ConfigCtrl.setConfig(a),await Promise.all([n.e(3583),n.e(1312)]).then(n.bind(n,21312)),i.OptionsCtrl.setIsUiLoaded(!0)},[t,a]);return(0,r.useEffect)(()=>{o()},[o]),r.createElement(d,null)});Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var g=Object.defineProperty,y=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,E=(e,t,n)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||(t={}))v.call(t,n)&&E(e,n,t[n]);if(y)for(var n of y(t))w.call(t,n)&&E(e,n,t[n]);return e};function D(){let[e,t]=(0,r.useState)(i.jb.state);return(0,r.useEffect)(()=>{let e=i.jb.subscribe(e=>t(_({},e)));return()=>{e()}},[]),{isOpen:e.open,open:i.jb.open,close:i.jb.close,setDefaultChain:i.OptionsCtrl.setSelectedChain}}},54428:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=function(e,t,n){if("function"!=typeof e)throw TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)},i=n(2454),a=n(25631),o=(0,i.Z)(function(e,t,n){return r(e,(0,a.Z)(t)||0,n)})},75384:function(e,t,n){"use strict";n.d(t,{zo:function(){return v},mL:function(){return eQ},BB:function(){return eX}});var r={};n.r(r),n.d(r,{identity:function(){return T}});var i={};n.r(i),n.d(i,{base2:function(){return U}});var a={};n.r(a),n.d(a,{base8:function(){return L}});var o={};n.r(o),n.d(o,{base10:function(){return R}});var s={};n.r(s),n.d(s,{base16:function(){return F},base16upper:function(){return B}});var c={};n.r(c),n.d(c,{base32:function(){return $},base32hex:function(){return G},base32hexpad:function(){return H},base32hexpadupper:function(){return V},base32hexupper:function(){return K},base32pad:function(){return z},base32padupper:function(){return q},base32upper:function(){return W},base32z:function(){return Y}});var u={};n.r(u),n.d(u,{base36:function(){return Q},base36upper:function(){return X}});var l={};n.r(l),n.d(l,{base58btc:function(){return Z},base58flickr:function(){return J}});var d={};n.r(d),n.d(d,{base64:function(){return ee},base64pad:function(){return et},base64url:function(){return en},base64urlpad:function(){return er}});var h={};n.r(h),n.d(h,{base256emoji:function(){return es}});var f={};n.r(f),n.d(f,{sha256:function(){return ew},sha512:function(){return eE}});var p={};n.r(p),n.d(p,{identity:function(){return e_}});var m={};n.r(m),n.d(m,{code:function(){return eC},decode:function(){return eO},encode:function(){return ex},name:function(){return eD}});var b={};function g(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function y(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?g(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function v(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));let n=y(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return g(n)}n.r(b),n.d(b,{code:function(){return eI},decode:function(){return ej},encode:function(){return eA},name:function(){return ek}});var w=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,o=new Uint8Array(a);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var d=0,h=a-1;(0!==l||d>>0,o[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var f=a-i;f!==a&&0===o[f];)f++;for(var p=new Uint8Array(r+(a-f)),m=r;f!==a;)p[m++]=o[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,a=t.length;i!==a&&0===t[i];)i++,n++;for(var o=(a-i)*l+1>>>0,u=new Uint8Array(o);i!==a;){for(var d=t[i],h=0,f=o-1;(0!==d||h>>0,u[f]=d%s>>>0,d=d/s>>>0;if(0!==d)throw Error("Non-zero carry");r=h,i++}for(var p=o-r;p!==o&&0===u[p];)p++;for(var m=c.repeat(n);p{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},D=e=>new TextEncoder().encode(e),C=e=>new TextDecoder().decode(e);class x{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class O{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return P(this,e)}}class S{constructor(e){this.decoders=e}or(e){return P(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let P=(e,t)=>new S({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class k{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new x(e,t,n),this.decoder=new O(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let I=({name:e,prefix:t,encode:n,decode:r})=>new k(e,t,n,r),A=({prefix:e,name:t,alphabet:n})=>{let{encode:r,decode:i}=w(n,t);return I({prefix:e,name:t,encode:r,decode:e=>_(i(e))})},j=(e,t,n,r)=>{let i={};for(let e=0;e=8&&(s-=8,o[u++]=255&c>>s)}if(s>=n||255&c<<8-s)throw SyntaxError("Unexpected end of data");return o},N=(e,t,n)=>{let r="="===t[t.length-1],i=(1<n;)o-=n,a+=t[i&s>>o];if(o&&(a+=t[i&s<I({prefix:t,name:e,encode:e=>N(e,r,n),decode:t=>j(t,r,n,e)}),T=I({prefix:"\0",name:"identity",encode:e=>C(e),decode:e=>D(e)}),U=M({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),L=M({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),R=A({prefix:"9",name:"base10",alphabet:"0123456789"}),F=M({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),B=M({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),$=M({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),W=M({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),z=M({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),q=M({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),G=M({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),K=M({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),H=M({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),V=M({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Y=M({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Q=A({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X=A({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Z=A({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),J=A({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),ee=M({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),et=M({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),en=M({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),er=M({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),ei=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),ea=ei.reduce((e,t,n)=>(e[n]=t,e),[]),eo=ei.reduce((e,t,n)=>(e[t.codePointAt(0)]=n,e),[]),es=I({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=ea[t],"")},decode:function(e){let t=[];for(let n of e){let e=eo[n.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var ec=function e(t,n,r){n=n||[];for(var i=r=r||0;t>=2147483648;)n[r++]=255&t|128,t/=128;for(;-128&t;)n[r++]=255&t|128,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},eu=function e(t,n){var r,i=0,n=n||0,a=0,o=n,s=t.length;do{if(o>=s)throw e.bytes=0,RangeError("Could not decode varint");r=t[o++],i+=a<28?(127&r)<=128);return e.bytes=o-n,i};let el=(e,t=0)=>[eu(e,t),eu.bytes],ed=(e,t,n=0)=>(ec(e,t,n),t),eh=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,ef=(e,t)=>{let n=t.byteLength,r=eh(e),i=r+eh(n),a=new Uint8Array(i+n);return ed(e,a,0),ed(n,a,r),a.set(t,i),new eb(e,n,t,a)},ep=e=>{let t=_(e),[n,r]=el(t),[i,a]=el(t.subarray(r)),o=t.subarray(r+a);if(o.byteLength!==i)throw Error("Incorrect length");return new eb(n,i,o,t)},em=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&E(e.bytes,t.bytes);class eb{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}let eg=({name:e,code:t,encode:n})=>new ey(e,t,n);class ey{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?ef(this.code,t):t.then(e=>ef(this.code,e))}throw Error("Unknown type, must be binary type")}}let ev=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ew=eg({name:"sha2-256",code:18,encode:ev("SHA-256")}),eE=eg({name:"sha2-512",code:19,encode:ev("SHA-512")}),e_={code:0,name:"identity",encode:_,digest:e=>ef(0,_(e))},eD="raw",eC=85,ex=e=>_(e),eO=e=>_(e),eS=new TextEncoder,eP=new TextDecoder,ek="json",eI=512,eA=e=>eS.encode(JSON.stringify(e)),ej=e=>JSON.parse(eP.decode(e));class eN{constructor(e,t,n,r){this.code=t,this.version=e,this.multihash=n,this.bytes=r,this.byteOffset=r.byteOffset,this.byteLength=r.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:eW,byteLength:eW,code:e$,version:e$,multihash:e$,bytes:e$,_baseCache:eW,asCID:eW})}toV0(){if(0===this.version)return this;{let{code:e,multihash:t}=this;if(e!==eL)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==eR)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return eN.createV0(t)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,n=ef(e,t);return eN.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&em(this.multihash,e.multihash)}toString(e){let{bytes:t,version:n,_baseCache:r}=this;return 0===n?eT(t,r,e||Z.encoder):eU(t,r,e||$.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return ez(/^0\.0/,eq),!!(e&&(e[eB]||e.asCID===e))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof eN)return e;if(null!=e&&e.asCID===e){let{version:t,code:n,multihash:r,bytes:i}=e;return new eN(t,n,r,i||eF(t,n,r.bytes))}if(null==e||!0!==e[eB])return null;{let{version:t,multihash:n,code:r}=e,i=ep(n);return eN.create(t,r,i)}}static create(e,t,n){if("number"!=typeof t)throw Error("String codecs are no longer supported");switch(e){case 0:if(t===eL)return new eN(e,t,n,n.bytes);throw Error(`Version 0 CID must use dag-pb (code: ${eL}) block encoding`);case 1:{let r=eF(e,t,n.bytes);return new eN(e,t,n,r)}default:throw Error("Invalid version")}}static createV0(e){return eN.create(0,eL,e)}static createV1(e,t){return eN.create(1,e,t)}static decode(e){let[t,n]=eN.decodeFirst(e);if(n.length)throw Error("Incorrect length");return t}static decodeFirst(e){let t=eN.inspectBytes(e),n=t.size-t.multihashSize,r=_(e.subarray(n,n+t.multihashSize));if(r.byteLength!==t.multihashSize)throw Error("Incorrect length");let i=r.subarray(t.multihashSize-t.digestSize),a=new eb(t.multihashCode,t.digestSize,i,r);return[0===t.version?eN.createV0(a):eN.createV1(t.codec,a),e.subarray(t.size)]}static inspectBytes(e){let t=0,n=()=>{let[n,r]=el(e.subarray(t));return t+=r,n},r=n(),i=eL;if(18===r?(r=0,t=0):1===r&&(i=n()),0!==r&&1!==r)throw RangeError(`Invalid CID version ${r}`);let a=t,o=n(),s=n(),c=t+s;return{version:r,codec:i,multihashCode:o,digestSize:s,multihashSize:c-a,size:c}}static parse(e,t){let[n,r]=eM(e,t),i=eN.decode(r);return i._baseCache.set(n,e),i}}let eM=(e,t)=>{switch(e[0]){case"Q":return[Z.prefix,(t||Z).decode(`${Z.prefix}${e}`)];case Z.prefix:return[Z.prefix,(t||Z).decode(e)];case $.prefix:return[$.prefix,(t||$).decode(e)];default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},eT=(e,t,n)=>{let{prefix:r}=n;if(r!==Z.prefix)throw Error(`Cannot string encode V0 in ${n.name} encoding`);let i=t.get(r);if(null!=i)return i;{let i=n.encode(e).slice(1);return t.set(r,i),i}},eU=(e,t,n)=>{let{prefix:r}=n,i=t.get(r);if(null!=i)return i;{let i=n.encode(e);return t.set(r,i),i}},eL=112,eR=18,eF=(e,t,n)=>{let r=eh(e),i=r+eh(t),a=new Uint8Array(i+n.byteLength);return ed(e,a,0),ed(t,a,r),a.set(n,i),a},eB=Symbol.for("@ipld/js-cid/CID"),e$={writable:!1,configurable:!1,enumerable:!0},eW={writable:!1,enumerable:!1,configurable:!1},ez=(e,t)=>{if(e.test("0.0.0-dev"))console.warn(t);else throw Error(t)},eq=`CID.isCID(v) is deprecated and will be removed in the next major release. Following code pattern: if (CID.isCID(value)) { doSomethingWithCID(value) } Is replaced with: const cid = CID.asCID(value) if (cid) { // Make sure to use cid instead of value doSomethingWithCID(cid) } `,eG={...r,...i,...a,...o,...s,...c,...u,...l,...d,...h};function eK(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}({...f,...p});let eH=eK("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),eV=eK("ascii","a",e=>{let t="a";for(let n=0;n{let t=y((e=e.substring(1)).length);for(let n=0;nvoid 0!==e).length>0)}({request:i}))try{return await v(e,{...i,blockNumber:u,blockTag:l})}catch(e){if(!(e instanceof o.pZ)&&!(e instanceof o.mm))throw e}let a=await e.request({method:"eth_call",params:n?[i,n]:[i]});if("0x"===a)return{data:void 0};return{data:a}}catch(c){let r=function(e){if(!(e instanceof a.G))return;let t=e.walk();return"object"==typeof t.data?t.data.data:t.data}(c),{offchainLookup:i,offchainLookupSignature:o}=await n.e(422).then(n.bind(n,10422));if(r?.slice(0,10)===o&&x)return{data:await i(e,{data:r,to:x})};throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,f.k)(e,n);return t instanceof h.cj?e:t})();return new s.cg(r,{docsPath:t,...n})}(c,{...t,account:P,chain:e.chain})}}async function v(e,t){let{batchSize:n=1024,wait:r=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:h="latest",data:f,multicallAddress:p,to:m}=t,g=p;if(!g){if(!e.chain)throw new o.pZ;g=(0,l.L)({blockNumber:a,chain:e.chain,contract:"multicall3"})}let y=(a?(0,d.eC)(a):void 0)||h,{schedule:v}=(0,b.S)({id:`${e.uid}.${y}`,wait:r,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*n,fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,u.R)({abi:i.F8,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:g},y]});return(0,c.k)({abi:i.F8,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:w,success:E}]=await v({data:f,to:m});if(!E)throw new s.VQ({data:w});return"0x"===w?{data:void 0}:{data:w}}},43861:function(e,t,n){"use strict";n.d(t,{C:function(){return u},X:function(){return c}});var r=n(15371),i=n(93714),a=n(79379),o=n(75016),s=n(24453);async function c(e,t){return u(e,t)}async function u(e,t){let{block:n,chain:c=e.chain,request:u,type:l="eip1559"}=t||{},d=await (async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:n,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new r.Fz;let h=10**(d.toString().split(".")[1]?.length??0),f=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),p=n||await (0,i.s)(e,o.Q,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas)return c.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:u,type:l});if("eip1559"===l){if("bigint"!=typeof p.baseFeePerGas)throw new r.e5;let t=u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await (0,a.h)(e,{block:p,chain:c,request:u}),n=f(p.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??n+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??f(await (0,i.s)(e,s.o,"getGasPrice")({}))}}},81841:function(e,t,n){"use strict";n.d(t,{Q:function(){return g}});var r=n(14503),i=n(8998),a=n(92106),o=n(39625),s=n(67795),c=n(62027),u=n(33639);class l extends c.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:f,value:p}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,u.xr)({from:t?.address,to:f,value:void 0!==p&&`${(0,o.d)(p)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:void 0!==c&&`${(0,s.o)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,s.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,s.o)(d)} gwei`,nonce:h})].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}var d=n(26445),h=n(87469),f=n(61163),p=n(74688),m=n(47531),b=n(57331);async function g(e,t){let n=t.account??e.account;if(!n)throw new i.o({docsPath:"/docs/actions/public/estimateGas"});let o=(0,r.T)(n);try{let{accessList:n,blockNumber:r,blockTag:i,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:g,value:y,...v}="local"===o.type?await (0,b.Z)(e,t):t,w=(r?(0,a.eC)(r):void 0)||i;(0,m.F)(t);let E=e.chain?.formatters?.transactionRequest?.format,_=(E||p.tG)({...(0,f.K)(v,{format:E}),from:o.address,accessList:n,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:g,value:y}),D=await e.request({method:"eth_estimateGas",params:w?[_,w]:[_]});return BigInt(D)}catch(n){throw function(e,{docsPath:t,...n}){return new l((()=>{let t=(0,h.k)(e,n);return t instanceof d.cj?e:t})(),{docsPath:t,...n})}(n,{...t,account:o,chain:e.chain})}}},79379:function(e,t,n){"use strict";n.d(t,{_:function(){return c},h:function(){return u}});var r=n(15371),i=n(95946),a=n(93714),o=n(75016),s=n(24453);async function c(e,t){return u(e,t)}async function u(e,t){let{block:n,chain:c=e.chain,request:u}=t||{};if("function"==typeof c?.fees?.defaultPriorityFee){let t=n||await (0,a.s)(e,o.Q,"getBlock")({});return c.fees.defaultPriorityFee({block:t,client:e,request:u})}if(void 0!==c?.fees?.defaultPriorityFee)return c?.fees?.defaultPriorityFee;try{let t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.y_)(t)}catch{let[t,i]=await Promise.all([n?Promise.resolve(n):(0,a.s)(e,o.Q,"getBlock")({}),(0,a.s)(e,s.o,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new r.e5;let c=i-t.baseFeePerGas;if(c<0n)return 0n;return c}}},75016:function(e,t,n){"use strict";n.d(t,{Q:function(){return o}});var r=n(79814),i=n(92106),a=n(43310);async function o(e,{blockHash:t,blockNumber:n,blockTag:o,includeTransactions:s}={}){let c=s??!1,u=void 0!==n?(0,i.eC)(n):void 0,l=null;if(!(l=t?await e.request({method:"eth_getBlockByHash",params:[t,c]}):await e.request({method:"eth_getBlockByNumber",params:[u||(o??"latest"),c]})))throw new r.f({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||a.Z)(l)}},79524:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(95946);async function i(e){let t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},24453:function(e,t,n){"use strict";async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}n.d(t,{o:function(){return r}})},86162:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(95946),i=n(92106);async function a(e,{address:t,blockTag:n="latest",blockNumber:a}){let o=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,i.eC)(a):n]});return(0,r.ly)(o)}},57331:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(14503),i=n(43861),a=n(81841),o=n(75016),s=n(86162),c=n(8998),u=n(15371),l=n(93714),d=n(47531),h=n(33639);async function f(e,t){let{account:n=e.account,chain:f,gas:p,nonce:m,type:b}=t;if(!n)throw new c.o;let g=(0,r.T)(n),y=await (0,l.s)(e,o.Q,"getBlock")({blockTag:"latest"}),v={...t,from:g.address};if(void 0===m&&(v.nonce=await (0,l.s)(e,s.K,"getTransactionCount")({address:g.address,blockTag:"pending"})),void 0===b)try{v.type=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new h.j3({transaction:e})}(v)}catch{v.type="bigint"==typeof y.baseFeePerGas?"eip1559":"legacy"}if("eip1559"===v.type){let{maxFeePerGas:n,maxPriorityFeePerGas:r}=await (0,i.C)(e,{block:y,chain:f,request:v});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas512){r="",a=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(a,a+++e)}()};return Object.assign(m,{extend:function e(t){return n=>{let r=n(t);for(let e in m)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(m)})}},79578:function(e,t,n){"use strict";n.d(t,{K:function(){return R}});var r=n(16189),i=n(79524),a=n(92106);async function o(e,{chain:t}){let{id:n,name:r,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,a.eC)(n),chainName:r,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:e})=>e):void 0}]})}var s=n(30286),c=n(14503),u=n(8998),l=n(80377);function d({chain:e,currentChainId:t}){if(!e)throw new l.Bk;if(t!==e.id)throw new l.Yl({chain:e,currentChainId:t})}var h=n(26445),f=n(33639),p=n(87469),m=n(61163),b=n(74688),g=n(93714),y=n(47531),v=n(57331),w=n(99238);async function E(e,t){let{account:n=e.account,chain:r=e.chain,accessList:a,data:o,gas:s,gasPrice:l,maxFeePerGas:E,maxPriorityFeePerGas:_,nonce:D,to:C,value:x,...O}=t;if(!n)throw new u.o({docsPath:"/docs/actions/wallet/sendTransaction"});let S=(0,c.T)(n);try{let n;if((0,y.F)(t),null!==r&&(n=await (0,g.s)(e,i.L,"getChainId")({}),d({currentChainId:n,chain:r})),"local"===S.type){let t=await (0,g.s)(e,v.Z,"prepareTransactionRequest")({account:S,accessList:a,chain:r,data:o,gas:s,gasPrice:l,maxFeePerGas:E,maxPriorityFeePerGas:_,nonce:D,to:C,value:x,...O});n||(n=await (0,g.s)(e,i.L,"getChainId")({}));let c=r?.serializers?.transaction,u=await S.signTransaction({...t,chainId:n},{serializer:c});return await (0,g.s)(e,w.p,"sendRawTransaction")({serializedTransaction:u})}let c=e.chain?.formatters?.transactionRequest?.format,u=(c||b.tG)({...(0,m.K)(O,{format:c}),accessList:a,data:o,from:S.address,gas:s,gasPrice:l,maxFeePerGas:E,maxPriorityFeePerGas:_,nonce:D,to:C,value:x});return await e.request({method:"eth_sendTransaction",params:[u]})}catch(e){throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,p.k)(e,n);return t instanceof h.cj?e:t})();return new f.mk(r,{docsPath:t,...n})}(e,{...t,account:S,chain:t.chain||void 0})}}var _=n(45775);async function D(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"})).map(e=>(0,_.x)(e))}async function C(e){return await e.request({method:"wallet_getPermissions"})}async function x(e){return(await e.request({method:"eth_requestAccounts"})).map(e=>(0,_.K)(e))}async function O(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}async function S(e,{account:t=e.account,message:n}){if(!t)throw new u.o({docsPath:"/docs/actions/wallet/signMessage"});let r=(0,c.T)(t);if("local"===r.type)return r.signMessage({message:n});let i="string"==typeof n?(0,a.$G)(n):n.raw instanceof Uint8Array?(0,a.NC)(n.raw):n.raw;return e.request({method:"personal_sign",params:[i,r.address]})}async function P(e,t){let{account:n=e.account,chain:r=e.chain,...o}=t;if(!n)throw new u.o({docsPath:"/docs/actions/wallet/signTransaction"});let s=(0,c.T)(n);(0,y.F)({account:s,...t});let l=await (0,g.s)(e,i.L,"getChainId")({});null!==r&&d({currentChainId:l,chain:r});let h=r?.formatters||e.chain?.formatters,f=h?.transactionRequest?.format||b.tG;return"local"===s.type?s.signTransaction({...o,chainId:l},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...f(o),chainId:(0,a.eC)(l),from:s.address}]})}var k=n(15102),I=n(96070),A=n(71352);async function j(e,{account:t=e.account,domain:n,message:r,primaryType:i,types:a}){if(!t)throw new u.o({docsPath:"/docs/actions/wallet/signTypedData"});let o=(0,c.T)(t),s={EIP712Domain:(0,A.cj)({domain:n}),...a};if((0,A.iC)({domain:n,message:r,primaryType:i,types:s}),"local"===o.type)return o.signTypedData({domain:n,primaryType:i,types:s,message:r});let l=(0,I.P)({domain:n??{},primaryType:i,types:s,message:r},(e,t)=>(0,k.v)(t)?t.toLowerCase():t);return e.request({method:"eth_signTypedData_v4",params:[o.address,l]})}async function N(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(t)}]})}async function M(e,t){return await e.request({method:"wallet_watchAsset",params:t})}var T=n(77799);async function U(e,{abi:t,address:n,args:r,dataSuffix:i,functionName:a,...o}){let s=(0,T.R)({abi:t,args:r,functionName:a});return await (0,g.s)(e,E,"sendTransaction")({data:`${s}${i?i.replace("0x",""):""}`,to:n,...o})}function L(e){return{addChain:t=>o(e,t),deployContract:t=>(function(e,{abi:t,args:n,bytecode:r,...i}){let a=(0,s.w)({abi:t,args:n,bytecode:r});return E(e,{...i,data:a})})(e,t),getAddresses:()=>D(e),getChainId:()=>(0,i.L)(e),getPermissions:()=>C(e),prepareTransactionRequest:t=>(0,v.Z)(e,t),requestAddresses:()=>x(e),requestPermissions:t=>O(e,t),sendRawTransaction:t=>(0,w.p)(e,t),sendTransaction:t=>E(e,t),signMessage:t=>S(e,t),signTransaction:t=>P(e,t),signTypedData:t=>j(e,t),switchChain:t=>N(e,t),watchAsset:t=>M(e,t),writeContract:t=>U(e,t)}}function R(e){let{key:t="wallet",name:n="Wallet Client",transport:i}=e;return(0,r.e)({...e,key:t,name:n,transport:e=>i({...e,retryCount:0}),type:"walletClient"}).extend(L)}},31031:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(37029);function i({key:e,name:t,request:n,retryCount:i=3,retryDelay:a=150,timeout:o,type:s},c){return{config:{key:e,name:t,request:n,retryCount:i,retryDelay:a,timeout:o,type:s},request:(0,r.n)(n,{retryCount:i,retryDelay:a}),value:c}}},3980:function(e,t,n){"use strict";n.d(t,{P:function(){return i}});var r=n(31031);function i(e,t={}){let{key:n="custom",name:i="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>(0,r.q)({key:n,name:i,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}},16693:function(e,t,n){"use strict";n.d(t,{$o:function(){return u},F8:function(){return r},X$:function(){return c},du:function(){return o},k3:function(){return a},nZ:function(){return s}});let r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],a=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],o=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],s=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],u=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},21746:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return a}});let r={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},84192:function(e,t,n){"use strict";n.d(t,{Bd:function(){return a},Zn:function(){return i},ez:function(){return r}});let r={gwei:9,wei:18},i={ether:-9,wei:9},a={ether:-18,gwei:-9}},57412:function(e,t,n){"use strict";n.d(t,{CI:function(){return C},FM:function(){return p},Gy:function(){return _},KY:function(){return w},M4:function(){return d},MX:function(){return y},S4:function(){return v},SM:function(){return E},cO:function(){return s},dh:function(){return D},fM:function(){return o},fs:function(){return h},gr:function(){return l},hn:function(){return x},lC:function(){return m},mv:function(){return b},wM:function(){return O},wb:function(){return u},xB:function(){return c},xL:function(){return g},yP:function(){return f}});var r=n(80522),i=n(39135),a=n(62027);class o extends a.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class s extends a.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends a.G{constructor({data:e,params:t,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class u extends a.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends a.G{constructor({expectedLength:e,givenLength:t,type:n}){super(`ABI encoding array length mismatch for type ${n}. Expected length: ${e} Given length: ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class h extends a.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. Expected length (params): ${e} Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class f extends a.G{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the error exists on it. You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class p extends a.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends a.G{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the event exists on it. You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class b extends a.G{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class g extends a.G{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class y extends a.G{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. Cannot decode function result without knowing what the parameter types are. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends a.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class w extends a.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class E extends a.G{constructor({abiItem:e,data:t,params:n,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=i}}class _ extends a.G{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class D extends a.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. Please provide a valid ABI type.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class C extends a.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. Please provide a valid ABI type.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class x extends a.G{constructor(e){super(`Value "${e}" is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class O extends a.G{constructor(e){super(`"${e}" is not a valid definition type. Valid types: "function", "event", "error"`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},8998:function(e,t,n){"use strict";n.d(t,{o:function(){return i}});var r=n(62027);class i extends r.G{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient.",{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}},26087:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(62027);class i extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},62027:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(35280);class i extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});let n=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,n):n?null:t}(this,e)}}},79814:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(62027);class i extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}},80377:function(e,t,n){"use strict";n.d(t,{Bk:function(){return o},Yl:function(){return a},mm:function(){return i},pZ:function(){return s}});var r=n(62027);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class a extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class o extends r.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class s extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}},97405:function(e,t,n){"use strict";n.d(t,{cg:function(){return b},uq:function(){return g},Lu:function(){return y},Dk:function(){return v},VQ:function(){return w}});var r=n(14503),i=n(21746),a=n(86899),o=n(80522),s=n(96070);function c({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"==typeof t[n]?(0,s.P)(t[n]):t[n]}`).join(", ")})`}var u=n(40840),l=n(39625),d=n(67795),h=n(57412),f=n(62027),p=n(33639),m=n(35280);class b extends f.G{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:o,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:h,to:f,value:m}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",(0,p.xr)({from:(t?(0,r.T)(t):void 0)?.address,to:f,value:void 0!==m&&`${(0,l.d)(m)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:o,gasPrice:void 0!==s&&`${(0,d.o)(s)} gwei`,maxFeePerGas:void 0!==c&&`${(0,d.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==u&&`${(0,d.o)(u)} gwei`,nonce:h})].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class g extends f.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:a,sender:s}){let l=(0,u.mE)({abi:t,args:n,name:a}),d=l?c({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0;super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",(0,p.xr)({address:r&&(0,m.CR)(r),function:l?(0,o.t)(l,{includeName:!0}):void 0,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:s})].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=s}}class y extends f.G{constructor({abi:e,data:t,functionName:n,message:r}){let s,u,l,d,f;if(t&&"0x"!==t)try{let{abiItem:n,errorName:r,args:s}=f=(0,a.p)({abi:e,data:t});if("Error"===r)l=s[0];else if("Panic"===r){let[e]=s;l=i.$[e]}else{let e=n?(0,o.t)(n,{includeName:!0}):void 0,t=n&&s?c({abiItem:n,args:s,includeFunctionName:!1,includeName:!1}):void 0;u=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){s=e}else r&&(l=r);s instanceof h.yP&&(d=s.signature,u=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(l&&"execution reverted"!==l||d?[`The contract function "${n}" reverted with the following ${d?"signature":"reason"}:`,l||d].join("\n"):`The contract function "${n}" reverted.`,{cause:s,metaMessages:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=f,this.reason=l,this.signature=d}}class v extends f.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class w extends f.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},69760:function(e,t,n){"use strict";n.d(t,{$:function(){return a},m:function(){return i}});var r=n(62027);class i extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},87788:function(e,t,n){"use strict";n.d(t,{Cd:function(){return a},J5:function(){return i},M6:function(){return o}});var r=n(62027);class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class a extends r.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class o extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},15371:function(e,t,n){"use strict";n.d(t,{Fz:function(){return a},e5:function(){return o},ld:function(){return s}});var r=n(67795),i=n(62027);class a extends i.G{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class o extends i.G{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class s extends i.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.o)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}},26445:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return s},Hh:function(){return o},M_:function(){return a},WF:function(){return h},ZI:function(){return c},cj:function(){return b},cs:function(){return m},dR:function(){return f},pZ:function(){return p},se:function(){return l},vU:function(){return u}});var r=n(67795),i=n(62027);class a extends i.G{constructor({cause:e,message:t}={}){let n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class o extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class h extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class b extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},78863:function(e,t,n){"use strict";n.d(t,{Gg:function(){return o},W5:function(){return u},bs:function(){return c},c9:function(){return s}});var r=n(96070),i=n(62027),a=n(35280);class o extends i.G{constructor({body:e,details:t,headers:n,status:i,url:o}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,a.Gr)(o)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=o}}class s extends i.G{constructor({body:e,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.Gr)(t)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},39028:function(e,t,n){"use strict";n.d(t,{B:function(){return c},GD:function(){return y},I0:function(){return D},KB:function(){return m},LX:function(){return u},Og:function(){return f},PE:function(){return w},Pv:function(){return g},Ts:function(){return E},XS:function(){return d},ab:function(){return v},gS:function(){return b},ir:function(){return x},nY:function(){return l},pT:function(){return p},s7:function(){return s},u5:function(){return _},x3:function(){return C},yR:function(){return h}});var r=n(62027),i=n(78863);class a extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof i.bs?e.code:t??-1}}class o extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class s extends a{constructor(e){super(e,{code:s.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends a{constructor(e){super(e,{code:f.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends o{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends o{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends o{constructor(e){super(e,{code:E.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class _ extends o{constructor(e){super(e,{code:_.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class D extends o{constructor(e){super(e,{code:D.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(D,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class C extends o{constructor(e){super(e,{code:C.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class x extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},33639:function(e,t,n){"use strict";n.d(t,{Bh:function(){return l},Yb:function(){return d},j3:function(){return c},mc:function(){return h},mk:function(){return u},xY:function(){return s},xr:function(){return o}});var r=n(39625),i=n(67795),a=n(62027);function o(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class s extends a.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends a.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",o(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class u extends a.G{constructor(e,{account:t,docsPath:n,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:f,value:p}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",o({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:f,value:void 0!==p&&`${(0,r.d)(p)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:c,gasPrice:void 0!==u&&`${(0,i.o)(u)} gwei`,maxFeePerGas:void 0!==l&&`${(0,i.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.o)(d)} gwei`,nonce:h})].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class l extends a.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let a="Transaction";n&&void 0!==i&&(a=`Transaction at block time "${n}" at index "${i}"`),e&&void 0!==i&&(a=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(a=`Transaction at block number "${t}" at index "${i}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class d extends a.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class h extends a.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},35280:function(e,t,n){"use strict";n.d(t,{CR:function(){return r},Gr:function(){return i},bo:function(){return a}});let r=e=>e,i=e=>e,a=()=>"viem@1.21.3"},34450:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(57412),i=n(45775),a=n(39135),o=n(3972),s=n(61836),c=n(95946),u=n(45444);function l(e,t){if("0x"===t&&e.length>0)throw new r.wb;if((0,a.d)(t)&&32>(0,a.d)(t))throw new r.xB({data:t,params:e,size:(0,a.d)(t)});return function({data:e,params:t}){let n=[],l=0;for(let h=0;h=(0,a.d)(e))throw new r.xB({data:e,params:t,size:(0,a.d)(e)});let{consumed:f,value:p}=function e({data:t,param:n,position:a}){let l=(0,u.S)(n.type);if(l){let[r,i]=l;return function(t,{param:n,length:r,position:i}){if(!r){let r=(0,c.ly)((0,o.tP)(t,i,i+32,{strict:!0})),a=(0,c.ly)((0,o.tP)(t,r,r+32,{strict:!0})),s=0,u=[];for(let i=0;i!e),a=i?[]:{},s=0;if(d(n)){let u=(0,c.ly)((0,o.tP)(t,r,r+32,{strict:!0}));for(let r=0;r48?(0,c.y_)(e,{signed:n}):(0,c.ly)(e,{signed:n})}}(h,{param:n});if("address"===n.type)return{consumed:32,value:(0,i.x)((0,o.tP)(h,-20))};if("bool"===n.type)return{consumed:32,value:(0,c.XA)(h)};throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}({data:e,param:t[h],position:l});n.push(p),l+=f}return n}({data:t,params:e})}function d(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);let n=(0,u.S)(e.type);return!!(n&&d({...e,type:n[1]}))}},86899:function(e,t,n){"use strict";n.d(t,{p:function(){return u}});var r=n(21746),i=n(57412),a=n(3972),o=n(40552),s=n(34450),c=n(80522);function u({abi:e,data:t}){let n=(0,a.tP)(t,0,4);if("0x"===n)throw new i.wb;let u=[...e||[],r.Up,r.hZ].find(e=>"error"===e.type&&n===(0,o.o)((0,c.t)(e)));if(!u)throw new i.yP(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,s.r)(u.inputs,(0,a.tP)(t,4)):void 0,errorName:u.name}}},7210:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(57412),i=n(34450),a=n(40840);let o="/docs/contract/decodeFunctionResult";function s({abi:e,args:t,functionName:n,data:s}){let c=e[0];if(n&&!(c=(0,a.mE)({abi:e,args:t,name:n})))throw new r.xL(n,{docsPath:o});if("function"!==c.type)throw new r.xL(void 0,{docsPath:o});if(!c.outputs)throw new r.MX(c.name,{docsPath:o});let u=(0,i.r)(c.outputs,s);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0}},45444:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return f}});var r=n(57412),i=n(26087),a=n(49321),o=n(57040),s=n(61769),c=n(39135),u=n(3972),l=n(92106);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=h(function({params:e,values:t}){let n=[];for(let d=0;d0?(0,o.zo)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,o.zo)(c.map(({encoded:e})=>e))}}(n,{length:i,param:{...t,type:a}})}if("tuple"===t.type)return function(t,{param:n}){let r=!1,i=[];for(let a=0;ae))}}(n,{param:t});if("address"===t.type)return function(e){if(!(0,a.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,s.gc)(e.toLowerCase())}}(n);if("bool"===t.type)return{dynamic:!1,encoded:(0,s.gc)((0,l.C4)(n))};if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.eC)(e,{size:32,signed:t})}}(n,{signed:t.type.startsWith("int")});if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,n]=t.type.split("bytes"),i=(0,c.d)(e);if(!n){let t=e;return i%32!=0&&(t=(0,s.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,o.zo)([(0,s.gc)((0,l.eC)(i,{size:32})),t])}}if(i!==parseInt(n))throw new r.M4({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,s.gc)(e,{dir:"right"})}}(n,{param:t});if("string"===t.type)return function(e){let t=(0,l.$G)(e),n=Math.ceil((0,c.d)(t)/32),r=[];for(let e=0;e"type"in e&&"constructor"===e.type);if(!s)throw new r.fM({docsPath:o});if(!("inputs"in s)||!s.inputs||0===s.inputs.length)throw new r.cO({docsPath:o});let c=(0,a.E)(s.inputs,t);return(0,i.SM)([n,c])}},77799:function(e,t,n){"use strict";n.d(t,{R:function(){return u}});var r=n(57412),i=n(57040),a=n(40552),o=n(45444),s=n(80522),c=n(40840);function u({abi:e,args:t,functionName:n}){let u=e[0];if(n&&!(u=(0,c.mE)({abi:e,args:t,name:n})))throw new r.xL(n,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==u.type)throw new r.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});let l=(0,s.t)(u),d=(0,a.o)(l),h="inputs"in u&&u.inputs?(0,o.E)(u.inputs,t??[]):void 0;return(0,i.SM)([d,h??"0x"])}},80522:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return i}});var r=n(57412);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${a(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},40840:function(e,t,n){"use strict";n.d(t,{mE:function(){return c}});var r=n(57412),i=n(15102),a=n(74059),o=n(40552),s=n(49321);function c({abi:e,args:t=[],name:n}){let c;let u=(0,i.v)(n,{strict:!1}),l=e.filter(e=>u?"function"===e.type?(0,o.o)(e)===n:"event"===e.type&&(0,a.e)(e)===n:"name"in e&&e.name===n);if(0!==l.length){if(1===l.length)return l[0];for(let e of l)if("inputs"in e){if(!t||0===t.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===t.length&&t.every((t,n)=>{let r="inputs"in e&&e.inputs[n];return!!r&&function e(t,n){let r=typeof t,i=n.type;switch(i){case"address":return(0,s.U)(t);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===i&&"components"in n)return Object.values(n.components).every((n,r)=>e(Object.values(t)[r],n));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===r||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...n,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,r)})){if(c&&"inputs"in c&&c.inputs){let n=function e(t,n,r){for(let i in t){let a=t[i],o=n[i];if("tuple"===a.type&&"tuple"===o.type&&"components"in a&&"components"in o)return e(a.components,o.components,r[i]);let c=[a.type,o.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,s.U)(r[i]))return c}}(e.inputs,c.inputs,t);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:c,type:n[1]})}c=e}}return c||l[0]}}},45775:function(e,t,n){"use strict";n.d(t,{K:function(){return c},x:function(){return s}});var r=n(26087),i=n(11187),a=n(88184),o=n(49321);function s(e,t){let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,i.qX)(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&o[e]&&(o[e]=o[e].toUpperCase()),(15&r[e>>1])>=8&&o[e+1]&&(o[e+1]=o[e+1].toUpperCase());return`0x${o.join("")}`}function c(e,t){if(!(0,o.U)(e))throw new r.b({address:e});return s(e,t)}},49321:function(e,t,n){"use strict";n.d(t,{U:function(){return i}});let r=/^0x[a-fA-F0-9]{40}$/;function i(e){return r.test(e)}},37029:function(e,t,n){"use strict";n.d(t,{n:function(){return c},y:function(){return s}});var r=n(62027),i=n(78863),a=n(39028),o=n(7760);let s=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:e instanceof i.Gg&&!!e.status&&403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status;function c(e,{retryDelay:t=150,retryCount:n=3}={}){return async c=>(0,o.J)(async()=>{try{return await e(c)}catch(e){switch(e.code){case a.s7.code:throw new a.s7(e);case a.B.code:throw new a.B(e);case a.LX.code:throw new a.LX(e);case a.nY.code:throw new a.nY(e);case a.XS.code:throw new a.XS(e);case a.yR.code:throw new a.yR(e);case a.Og.code:throw new a.Og(e);case a.pT.code:throw new a.pT(e);case a.KB.code:throw new a.KB(e);case a.gS.code:throw new a.gS(e);case a.Pv.code:throw new a.Pv(e);case a.GD.code:throw new a.GD(e);case a.ab.code:throw new a.ab(e);case a.PE.code:throw new a.PE(e);case a.Ts.code:throw new a.Ts(e);case a.u5.code:throw new a.u5(e);case a.I0.code:throw new a.I0(e);case a.x3.code:throw new a.x3(e);case 5e3:throw new a.ab(e);default:if(e instanceof r.G)throw e;throw new a.ir(e)}}},{delay:({count:e,error:n})=>{if(n&&n instanceof i.Gg){let e=n?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<!s(e)})}},86164:function(e,t,n){"use strict";function r(e,t={}){let{fees:n=e.fees,formatters:r=e.formatters,serializers:i=e.serializers}=t;return{...e,fees:n,formatters:r,serializers:i}}n.d(t,{a:function(){return r}})},47864:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(80377);function i({blockNumber:e,chain:t,contract:n}){let i=t?.contracts?.[n];if(!i)throw new r.mm({chain:t,contract:{name:n}});if(e&&i.blockCreated&&i.blockCreated>e)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:i.blockCreated}});return i.address}},57040:function(e,t,n){"use strict";function r(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}n.d(t,{SM:function(){return i},zo:function(){return r}})},15102:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}n.d(t,{v:function(){return r}})},61769:function(e,t,n){"use strict";n.d(t,{gc:function(){return a},vk:function(){return i}});var r=n(69760);function i(e,{dir:t,size:n=32}={}){return"string"==typeof e?a(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$({size:e.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r2*n)throw new r.$({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*n,"0")}`}},39135:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(15102);function i(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},3972:function(e,t,n){"use strict";n.d(t,{tP:function(){return o}});var r=n(69760),i=n(15102),a=n(39135);function o(e,t,n,{strict:r}={}){return(0,i.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){s(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&c(i,t,n),i}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){s(e,t);let i=e.slice(t,n);return r&&c(i,t,n),i}(e,t,n,{strict:r})}function s(e,t){if("number"==typeof t&&t>0&&t>(0,a.d)(e)-1)throw new r.m({offset:t,position:"start",size:(0,a.d)(e)})}function c(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,a.d)(e)!==n-t)throw new r.m({offset:n,position:"end",size:(0,a.d)(e)})}},61836:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;et)throw new r.M6({givenSize:(0,i.d)(e),maxSize:t})}function c(e,t={}){let{signed:n}=t;t.size&&s(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function u(e,t={}){let n=e;if(t.size&&(s(n,{size:t.size}),n=(0,a.f)(n)),"0x00"===(0,a.f)(n))return!1;if("0x01"===(0,a.f)(n))return!0;throw new r.Cd(n)}function l(e,t={}){return Number(c(e,t))}function d(e,t={}){let n=(0,o.nr)(e);return t.size&&(s(n,{size:t.size}),n=(0,a.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},11187:function(e,t,n){"use strict";n.d(t,{O0:function(){return u},nr:function(){return h},qX:function(){return f}});var r=n(62027),i=n(15102),a=n(61769),o=n(95946),s=n(92106);let c=new TextEncoder;function u(e,t={}){return"number"==typeof e||"bigint"==typeof e?h((0,s.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(n,{size:t.size}),(0,a.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?h(e,t):f(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function h(e,t={}){let n=e;t.size&&((0,o.Yf)(n,{size:t.size}),n=(0,a.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let s=i.length/2,c=new Uint8Array(s);for(let e=0,t=0;et.toString(16).padStart(2,"0"));function s(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?h(e,t):"boolean"==typeof e?c(e,t):u(e,t)}function c(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}function u(e,t={}){let n="";for(let t=0;tn||se.code===i.M_.code);return a instanceof r.G?new i.M_({cause:e,message:a.details}):i.M_.nodeMessage.test(n)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(n)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},43310:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6073);function i(e){let t=e.transactions?.map(e=>"string"==typeof e?e:r.Tr(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}},61163:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};let n={};return!function t(r){for(let i of Object.keys(r))i in e&&(n[i]=e[i]),r[i]&&"object"==typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}n.d(t,{K:function(){return r}})},6073:function(e,t,n){"use strict";n.d(t,{Tr:function(){return a},c8:function(){return i}});var r=n(95946);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}},74688:function(e,t,n){"use strict";n.d(t,{tG:function(){return a}});var r=n(92106);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function a(e){return{...e,gas:void 0!==e.gas?(0,r.eC)(e.gas):void 0,gasPrice:void 0!==e.gasPrice?(0,r.eC)(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?(0,r.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?(0,r.eC)(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?(0,r.eC)(e.nonce):void 0,type:void 0!==e.type?i[e.type]:void 0,value:void 0!==e.value?(0,r.eC)(e.value):void 0}}},93714:function(e,t,n){"use strict";function r(e,t,n){return r=>e[t.name||n]?.(r)??t(e,r)}n.d(t,{s:function(){return r}})},74059:function(e,t,n){"use strict";n.d(t,{e:function(){return c}});var r=n(11187),i=n(66620);let a=e=>(0,i.r)(e);var o=n(88184);let s=e=>(0,o.w)((0,r.O0)(e)),c=e=>s(a(e))},40552:function(e,t,n){"use strict";n.d(t,{o:function(){return c}});var r=n(3972),i=n(11187),a=n(66620),o=n(88184);let s=e=>(0,o.w)((0,i.O0)(e)),c=e=>(0,r.tP)(s((0,a.r)(e)),0,4)},66620:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});let r=/^tuple(?(\[(\d*)\])*)$/;function i(e){let t="",n=e.length;for(let i=0;i{var t;return function(e){let t=!0,n="",r=0,i="",o=!1;for(let a=0;a0&&!t.includes(e.length))throw Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}n.d(t,{w:function(){return M}});let o=BigInt(4294967296-1),s=BigInt(32),c=(e,t,n)=>e<>>32-n,u=(e,t,n)=>t<>>32-n,l=(e,t,n)=>t<>>64-n,d=(e,t,n)=>e<>>64-n,h=e=>e instanceof Uint8Array,f=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw Error("Non little-endian hardware is not supported");function p(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),!h(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}class m{clone(){return this._cloneInto()}}let[b,g,y]=[[],[],[]],v=BigInt(0),w=BigInt(1),E=BigInt(2),_=BigInt(7),D=BigInt(256),C=BigInt(113);for(let e=0,t=w,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],b.push(2*(5*r+n)),g.push((e+1)*(e+2)/2%64);let i=v;for(let e=0;e<7;e++)(t=(t<>_)*C)%D)&E&&(i^=w<<(w<>s&o)}:{h:0|Number(e>>s&o),l:0|Number(e&o)}}(e[i],t);[n[i],r[i]]=[a,c]}return[n,r]}(y,!0),S=(e,t,n)=>n>32?l(e,t,n):c(e,t,n),P=(e,t,n)=>n>32?d(e,t,n):u(e,t,n);class k extends m{constructor(e,t,n,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=f(this.state)}keccak(){!function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=S(a,o,1)^n[r],c=P(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=g[n],a=S(t,i,r),o=P(t,i,r),s=b[n];t=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=x[r],e[1]^=O[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){a(this);let{blockLen:t,state:n}=this,r=(e=p(e)).length;for(let i=0;i=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return r(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(!function(e,t){i(e);let n=t.outputLen;if(e.lengthe().update(p(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new k(136,1,32));var A=n(15102),j=n(11187),N=n(92106);function M(e,t){let n=I((0,A.v)(e,{strict:!1})?(0,j.O0)(e):e);return"bytes"===(t||"hex")?n:(0,N.NC)(n)}},32357:function(e,t,n){"use strict";n.d(t,{S:function(){return i}});let r=new Map;function i({fn:e,id:t,shouldSplitBatch:n,wait:i=0,sort:a}){let o=async()=>{let t=u();s();let n=t.map(({args:e})=>e);0!==n.length&&e(n).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let n=0;n{for(let n=0;nr.delete(t),c=()=>u().map(({args:e})=>e),u=()=>r.get(t)||[],l=e=>r.set(t,[...u(),e]);return{flush:s,async schedule(e){let t={},r=new Promise((e,n)=>{t.resolve=e,t.reject=n});return(n?.([...c(),e])&&o(),u().length>0)?l({args:e,pendingPromise:t}):(l({args:e,pendingPromise:t}),setTimeout(o,i)),r}}}},7760:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(62914);function i(e,{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}={}){return new Promise((a,o)=>{let s=async({count:c=0}={})=>{let u=async({error:e})=>{let n="function"==typeof t?t({count:c,error:e}):t;n&&await (0,r.D)(n),s({count:c+1})};try{let t=await e();a(t)}catch(e){if(cJSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},47531:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(14503),i=n(26087),a=n(26445),o=n(33639),s=n(49321);function c(e){let{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:u,to:l}=e,d=t?(0,r.T)(t):void 0;if(d&&!(0,s.U)(d.address))throw new i.b({address:d.address});if(l&&!(0,s.U)(l))throw new i.b({address:l});if(void 0!==n&&(void 0!==c||void 0!==u))throw new o.xY;if(c&&c>2n**256n-1n)throw new a.Hh({maxFeePerGas:c});if(u&&c&&u>c)throw new a.cs({maxFeePerGas:c,maxPriorityFeePerGas:u})}},71352:function(e,t,n){"use strict";n.d(t,{cj:function(){return d},iC:function(){return l}});var r=n(57412),i=n(26087),a=n(49321),o=n(39135),s=n(92106);let c=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,u=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function l({domain:e,message:t,primaryType:n,types:l}){let d=(e,t)=>{for(let n of e){let{name:e,type:h}=n,f=t[e],p=h.match(u);if(p&&("number"==typeof f||"bigint"==typeof f)){let[e,t,n]=p;(0,s.eC)(f,{signed:"int"===t,size:parseInt(n)/8})}if("address"===h&&"string"==typeof f&&!(0,a.U)(f))throw new i.b({address:f});let m=h.match(c);if(m){let[e,t]=m;if(t&&(0,o.d)(f)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,o.d)(f)})}let b=l[h];b&&d(b,f)}};l.EIP712Domain&&e&&d(l.EIP712Domain,e),"EIP712Domain"!==n&&d(l[n],t)}function d({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},39625:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(84192),i=n(15229);function a(e,t="wei"){return(0,i.b)(e,r.ez[t])}},67795:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(84192),i=n(15229);function a(e,t="wei"){return(0,i.b)(e,r.Zn[t])}},15229:function(e,t,n){"use strict";function r(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,a]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${a?`.${a}`:""}`}n.d(t,{b:function(){return r}})},62914:function(e,t,n){"use strict";async function r(e){return new Promise(t=>setTimeout(t,e))}n.d(t,{D:function(){return r}})},57421:function(e,t,n){"use strict";function r(){}n.d(t,{eM:function(){return ec},_g:function(){return ea},mA:function(){return ed},qL:function(){return ep},QW:function(){return eg}});let i="undefined"==typeof window||"Deno"in window;function a(){}function o(e,t,n){return g(e)?"function"==typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function s(e,t,n){return g(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function c(e,t,n){return g(e)?[{...t,queryKey:e},n]:[e||{},t]}function u(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(g(o)){if(r){if(t.queryHash!==d(o,t.options))return!1}else{if(!f(t.queryKey,o))return!1}}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&(void 0===i||i===t.state.fetchStatus)&&(!a||!!a(t))}function l(e,t){let{exact:n,fetching:r,predicate:i,mutationKey:a}=e;if(g(a)){if(!t.options.mutationKey)return!1;if(n){if(h(t.options.mutationKey)!==h(a))return!1}else{if(!f(t.options.mutationKey,a))return!1}}return("boolean"!=typeof r||"loading"===t.state.status===r)&&(!i||!!i(t))}function d(e,t){return((null==t?void 0:t.queryKeyHashFn)||h)(e)}function h(e){return JSON.stringify(e,(e,t)=>m(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function f(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!f(e[n],t[n]))}function p(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function m(e){if(!b(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(b(n)&&n.hasOwnProperty("isPrototypeOf"))}function b(e){return"[object Object]"===Object.prototype.toString.call(e)}function g(e){return Array.isArray(e)}function y(e){return new Promise(t=>{setTimeout(t,e)})}function v(e){y(0).then(e)}let w=console,E=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=r=>{t?e.push(r):v(()=>{n(r)})},a=()=>{let t=e;e=[],t.length&&v(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||a()}return n},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class _{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}class D extends _{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}let C=new D,x=["online","offline"];class O extends _{constructor(){super(),this.setup=e=>{if(!i&&window.addEventListener){let t=()=>e();return x.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{x.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}}let S=new O;function P(e){return Math.min(1e3*2**e,3e4)}function k(e){return(null!=e?e:"online")!=="online"||S.isOnline()}class I{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function A(e){return e instanceof I}function j(e){let t,n,r,i=!1,a=0,o=!1,s=new Promise((e,t)=>{n=e,r=t}),c=()=>!C.isFocused()||"always"!==e.networkMode&&!S.isOnline(),u=r=>{o||(o=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},l=n=>{o||(o=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},d=()=>new Promise(n=>{t=e=>{let t=o||!c();return t&&n(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,o||null==e.onContinue||e.onContinue()}),h=()=>{let t;if(!o){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{var n,r;if(o)return;let s=null!=(n=e.retry)?n:3,u=null!=(r=e.retryDelay)?r:P,f="function"==typeof u?u(a,t):u,p=!0===s||"number"==typeof s&&a{if(c())return d()}).then(()=>{i?l(t):h()})})}};return k(e.networkMode)?h():d().then(h),{promise:s,cancel:t=>{o||(l(new I(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?s:Promise.resolve(),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1}}}class N{destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.cacheTime)&&e>=0&&e!==1/0&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:i?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class M extends N{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||w,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){var n,r;let i=(n=this.state.data,null!=(r=this.options).isDataEqual&&r.isDataEqual(n,e)?n:"function"==typeof r.structuralSharing?r.structuralSharing(n,e):!1!==r.structuralSharing?function e(t,n){if(t===n)return t;let r=p(t)&&p(n);if(r||m(t)&&m(n)){let i=r?t.length:Object.keys(t).length,a=r?n:Object.keys(n),o=a.length,s=r?[]:{},c=0;for(let i=0;i!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r,i,a;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let o=function(){if("function"==typeof AbortController)return new AbortController}(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(s);let u={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};c(u),null==(n=this.options.behavior)||n.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=u.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(a=u.fetchOptions)?void 0:a.meta});let l=e=>{if(A(e)&&e.silent||this.dispatch({type:"error",error:e}),!A(e)){var t,n,r,i;null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=j({fn:u.fetchFn,abort:null==o?void 0:o.abort.bind(o),onSuccess:e=>{var t,n,r,i;if(void 0===e){l(Error(this.queryHash+" data is undefined"));return}this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:k(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if(A(i)&&i.revert&&this.revertState)return{...this.revertState,fetchStatus:"idle"};return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),E.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}class T extends _{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;let i=t.queryKey,a=null!=(r=t.queryHash)?r:d(i,t),o=this.get(a);return o||(o=new M({cache:this,logger:e.getLogger(),queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){E.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[n]=c(e,t);return void 0===n.exact&&(n.exact=!0),this.queries.find(e=>u(n,e))}findAll(e,t){let[n]=c(e,t);return Object.keys(n).length>0?this.queries.filter(e=>u(n,e)):this.queries}notify(e){E.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){E.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){E.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class U extends N{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||w,this.observers=[],this.state=e.state||L(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,n,r,i,a,o,s,c,u,l,d,h,f,p,m,b,g,y,v;let w="loading"===this.state.status;try{if(!w){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(c=(u=this.mutationCache.config).onMutate)?void 0:c.call(u,this.state.variables,this));let e=await (null==(l=(d=this.options).onMutate)?void 0:l.call(d,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let h=await (()=>{var e;return this.retryer=j({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,h,this.state.variables,this.state.context,this)),await (null==(n=(r=this.options).onSuccess)?void 0:n.call(r,h,this.state.variables,this.state.context)),await (null==(i=(a=this.mutationCache.config).onSettled)?void 0:i.call(a,h,null,this.state.variables,this.state.context,this)),await (null==(o=(s=this.options).onSettled)?void 0:o.call(s,h,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:h}),h}catch(e){try{throw await (null==(h=(f=this.mutationCache.config).onError)?void 0:h.call(f,e,this.state.variables,this.state.context,this)),await (null==(p=(m=this.options).onError)?void 0:p.call(m,e,this.state.variables,this.state.context)),await (null==(b=(g=this.mutationCache.config).onSettled)?void 0:b.call(g,void 0,e,this.state.variables,this.state.context,this)),await (null==(y=(v=this.options).onSettled)?void 0:y.call(v,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!k(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),E.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function L(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class R extends _{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){let r=new U({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){E.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>l(e,t))}findAll(e){return this.mutations.filter(t=>l(e,t))}notify(e){E.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>e.state.isPaused);return E.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(a)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function F(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}class B{constructor(e={}){this.queryCache=e.queryCache||new T,this.mutationCache=e.mutationCache||new R,this.logger=e.logger||w,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=C.subscribe(()=>{C.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=S.subscribe(()=>{S.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[n]=c(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){let r=o(e,t,n),i=this.getQueryData(r.queryKey);return i?Promise.resolve(i):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.queryCache.find(e),i=null==r?void 0:r.state.data,a="function"==typeof t?t(i):t;if(void 0===a)return;let s=o(e),c=this.defaultQueryOptions(s);return this.queryCache.build(this,c).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return E.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){let[n]=c(e,t),r=this.queryCache;E.batch(()=>{r.findAll(n).forEach(e=>{r.remove(e)})})}resetQueries(e,t,n){let[r,i]=c(e,t,n),a=this.queryCache,o={type:"active",...r};return E.batch(()=>(a.findAll(r).forEach(e=>{e.reset()}),this.refetchQueries(o,i)))}cancelQueries(e,t,n){let[r,i={}]=c(e,t,n);return void 0===i.revert&&(i.revert=!0),Promise.all(E.batch(()=>this.queryCache.findAll(r).map(e=>e.cancel(i)))).then(a).catch(a)}invalidateQueries(e,t,n){let[r,i]=c(e,t,n);return E.batch(()=>{var e,t;if(this.queryCache.findAll(r).forEach(e=>{e.invalidate()}),"none"===r.refetchType)return Promise.resolve();let n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,i)})}refetchQueries(e,t,n){let[r,i]=c(e,t,n),o=Promise.all(E.batch(()=>this.queryCache.findAll(r).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}))).then(a);return null!=i&&i.throwOnError||(o=o.catch(a)),o}fetchQuery(e,t,n){let r=o(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);let a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(a).catch(a)}fetchInfiniteQuery(e,t,n){let r=o(e,t,n);return r.behavior={onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,a,o,s;let c;let u=null==(t=e.fetchOptions)?void 0:null==(n=t.meta)?void 0:n.refetchPage,l=null==(r=e.fetchOptions)?void 0:null==(i=r.meta)?void 0:i.fetchMore,d=null==l?void 0:l.pageParam,h=(null==l?void 0:l.direction)==="forward",f=(null==l?void 0:l.direction)==="backward",p=(null==(a=e.state.data)?void 0:a.pages)||[],m=(null==(o=e.state.data)?void 0:o.pageParams)||[],b=m,g=!1,y=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?g=!0:null==(n=e.signal)||n.addEventListener("abort",()=>{g=!0}),e.signal}})},v=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),w=(e,t,n,r)=>(b=r?[t,...b]:[...b,t],r?[n,...e]:[...e,n]),E=(t,n,r,i)=>{if(g)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);let a={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};return y(a),Promise.resolve(v(a)).then(e=>w(t,r,e,i))};if(p.length){if(h){let t=void 0!==d,n=t?d:F(e.options,p);c=E(p,t,n)}else if(f){let t=void 0!==d,n=t?d:null==(s=e.options).getPreviousPageParam?void 0:s.getPreviousPageParam(p[0],p);c=E(p,t,n,!0)}else{b=[];let t=void 0===e.options.getNextPageParam;c=!u||!p[0]||u(p[0],0,p)?E([],t,m[0]):Promise.resolve(w([],m[0],p[0]));for(let n=1;n{if(!u||!p[n]||u(p[n],n,p)){let i=t?m[n]:F(e.options,r);return E(r,t,i)}return Promise.resolve(w(r,m[n],p[n]))})}}else c=E([]);return c.then(e=>({pages:e,pageParams:b}))}}},this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(a).catch(a)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let n=this.queryDefaults.find(t=>h(e)===h(t.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>f(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let n=this.mutationDefaults.find(t=>h(e)===h(t.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>f(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=d(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}function $(e){return e.state.isPaused}function W(e){return"success"===e.state.status}let z=["added","removed","updated"];function q(e){return z.includes(e)}async function G({queryClient:e,persister:t,maxAge:n=864e5,buster:r="",hydrateOptions:i}){try{let a=await t.restoreClient();if(a){if(a.timestamp){let o=Date.now()-a.timestamp>n,s=a.buster!==r;o||s?t.removeClient():function(e,t,n){if("object"!=typeof t||null===t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=t.mutations||[],o=t.queries||[];a.forEach(t=>{var i;r.build(e,{...null==n?void 0:null==(i=n.defaultOptions)?void 0:i.mutations,mutationKey:t.mutationKey},t.state)}),o.forEach(({queryKey:t,state:r,queryHash:a})=>{var o;let s=i.get(a);if(s){if(s.state.dataUpdatedAt{r(e)&&n.push({mutationKey:e.options.mutationKey,state:e.state})})}if(!1!==t.dehydrateQueries){let n=t.shouldDehydrateQuery||W;e.getQueryCache().getAll().forEach(e=>{n(e)&&r.push({state:e.state,queryKey:e.queryKey,queryHash:e.queryHash})})}return{mutations:n,queries:r}}(e,r)};await t.persistClient(i)}var H=n(30438),V=n(67294);let Y=V.createContext(void 0),Q=V.createContext(!1);function X(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Y),window.ReactQueryClientContext):Y)}let Z=({context:e}={})=>{let t=V.useContext(X(e,V.useContext(Q)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},J=({client:e,children:t,context:n,contextSharing:r=!1})=>{V.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=X(n,r);return V.createElement(Q.Provider,{value:!n&&r},V.createElement(i.Provider,{value:e},t))};var ee=n(61688);class et extends _{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=this.client.defaultMutationOptions(e),!function(e,t){if(e&&!t||t&&!e)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}(n,this.options)&&this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:L(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){E.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,n,r,i,a,o,s,c;e.onSuccess?(null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(a=(o=this.mutateOptions).onError)||a.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(s=(c=this.mutateOptions).onSettled)||s.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}}let en=ee.useSyncExternalStore;function er(){}var ei=n(52798);function ea({queryClient:e=new B({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:t=(0,H.o6)({storage:"undefined"!=typeof window&&window.localStorage?window.localStorage:H.wp}),persister:n="undefined"!=typeof window?function({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:i=JSON.stringify,deserialize:a=JSON.parse,retry:o}){if(e){let r=n=>{try{e.setItem(t,i(n));return}catch(e){return e}};return{persistClient:function(e,t=100){let n,r=null;return function(...i){n=i,null===r&&(r=setTimeout(()=>{e(...n),r=null},t))}}(e=>{let t=e,n=r(t),i=0;for(;n&&t;)i++,(t=null==o?void 0:o({persistedClient:t,error:n,errorCount:i}))&&(n=r(t))},n),restoreClient:()=>{let n=e.getItem(t);if(n)return a(n)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:r,restoreClient:()=>void 0,removeClient:r}}({key:"cache",storage:t,serialize:e=>e,deserialize:e=>e}):void 0,...i}){let a=(0,H._g)({...i,storage:t});if(n){var o;let t,r;r=!1,G(o={queryClient:e,persister:n,dehydrateOptions:{shouldDehydrateQuery:e=>0!==e.cacheTime&&!1!==e.queryKey[0].persist}}).then(()=>{r||(t=function(e){let t=e.queryClient.getQueryCache().subscribe(t=>{q(t.type)&&K(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{q(t.type)&&K(e)});return()=>{t(),n()}}(o))})}return Object.assign(a,{queryClient:e})}var eo=V.createContext(void 0),es=V.createContext(void 0);function ec({children:e,config:t}){return V.createElement(eo.Provider,{children:V.createElement(J,{children:e,client:t.queryClient,context:es}),value:t})}function eu(e,t,n){return function(e,t,n){var r,i;let a=s(e,void 0,void 0),o=Z({context:a.context}),[c]=V.useState(()=>new et(o,a));V.useEffect(()=>{c.setOptions(a)},[c,a]);let u=en(V.useCallback(e=>c.subscribe(E.batchCalls(e)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),l=V.useCallback((e,t)=>{c.mutate(e,t).catch(er)},[c]);if(u.error&&(r=c.options.useErrorBoundary,i=[u.error],"function"==typeof r?r(...i):!!r))throw u.error;return{...u,mutate:l,mutateAsync:u.mutate}}({context:es,...s(e,t,n)})}ee.useSyncExternalStore;var el=e=>"object"==typeof e&&!Array.isArray(e);function ed({onConnect:e,onDisconnect:t}={}){let n=function(){let e=V.useContext(eo);if(!e)throw Error("`useConfig` must be used within `WagmiConfig`.\n\nRead more: https://wagmi.sh/react/WagmiConfig");return e}(),r=function(e,t,n=t,r=H.vZ){let i=V.useRef([]),a=(0,ei.useSyncExternalStoreWithSelector)(e,t,n,e=>e,(e,t)=>{if(el(e)&&el(t)&&i.current.length){for(let n of i.current)if(!r(e[n],t[n]))return!1;return!0}return r(e,t)});if(el(a)){let e={...a};return Object.defineProperties(e,Object.entries(e).reduce((e,[t,n])=>({...e,[t]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(t)||i.current.push(t),n)}}),{})),e}return a}(V.useCallback(e=>(0,H.uH)(e),[n]),H.D0),i=V.useRef(),a=i.current;return V.useEffect(()=>{a?.status!=="connected"&&"connected"===r.status&&e?.({address:r.address,connector:r.connector,isReconnected:a?.status==="reconnecting"||a?.status===void 0}),a?.status==="connected"&&"disconnected"===r.status&&t?.(),i.current=r},[e,t,a,r]),r}var eh=[{entity:"disconnect"}],ef=()=>(0,H.zP)();function ep({onError:e,onMutate:t,onSettled:n,onSuccess:r}={}){let{error:i,isError:a,isIdle:o,isLoading:s,isSuccess:c,mutate:u,mutateAsync:l,reset:d,status:h}=eu(eh,ef,{...e?{onError(t,n,r){e(t,r)}}:{},onMutate:t,...n?{onSettled(e,t,r,i){n(t,i)}}:{},...r?{onSuccess(e,t,n){r(n)}}:{}});return{disconnect:u,disconnectAsync:l,error:i,isError:a,isIdle:o,isLoading:s,isSuccess:c,reset:d,status:h}}var em=e=>[{entity:"signMessage",...e}],eb=e=>{let{message:t}=e;if(!t)throw Error("message is required");return(0,H.l)({message:t})};function eg({message:e,onError:t,onMutate:n,onSettled:r,onSuccess:i}={}){let{data:a,error:o,isError:s,isIdle:c,isLoading:u,isSuccess:l,mutate:d,mutateAsync:h,reset:f,status:p,variables:m}=eu(em({message:e}),eb,{onError:t,onMutate:n,onSettled:r,onSuccess:i});return{data:a,error:o,isError:s,isIdle:c,isLoading:u,isSuccess:l,reset:f,signMessage:V.useCallback(t=>d(t||{message:e}),[e,d]),signMessageAsync:V.useCallback(t=>h(t||{message:e}),[e,h]),status:p,variables:m}}}}]);