(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9394],{7117:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,s){if("function"!=typeof r)throw TypeError("The listener must be a function");var o=new i(r,a||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],o]:e._events[u].push(o):(e._events[u]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,s=Array(a);i<a;i++)s[i]=r[i].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,a,s){var o=n?n+e:e;if(!this._events[o])return!1;var u,c,l=this._events[o],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,a),!0;case 6:return l.fn.call(l.context,t,r,i,a,s),!0}for(c=1,u=Array(d-1);c<d;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),d){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(f=1,u=Array(d-1);f<d;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},o.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||s(this,a);else{for(var u=0,c=[],l=o.length;u<l;u++)(o[u].fn!==t||i&&!o[u].once||r&&o[u].context!==r)&&c.push(o[u]);c.length?this._events[a]=1===c.length?c[0]:c:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},31248:function(e){e.exports={style:{fontFamily:"'__Inter_d65c78', '__Inter_Fallback_d65c78'",fontStyle:"normal"},className:"__className_d65c78",variable:"__variable_d65c78"}},70477:function(e){e.exports={style:{fontFamily:"'__Lora_4cf44b', '__Lora_Fallback_4cf44b'",fontWeight:600,fontStyle:"normal"},className:"__className_4cf44b",variable:"__variable_4cf44b"}},28468:function(e){e.exports={style:{fontFamily:"'__Work_Sans_e57538', '__Work_Sans_Fallback_e57538'",fontWeight:600,fontStyle:"normal"},className:"__className_e57538",variable:"__variable_e57538"}},91716:function(e){e.exports={style:{fontFamily:"'__cal_edfe9c', '__cal_Fallback_edfe9c'",fontWeight:600},className:"__className_edfe9c",variable:"__variable_edfe9c"}},94640:function(e){e.exports={style:{fontFamily:"'__calTitle_3d483c', '__calTitle_Fallback_3d483c'",fontWeight:600},className:"__className_3d483c",variable:"__variable_3d483c"}},18354:function(e,t,n){"use strict";n.d(t,{Gm:function(){return i},Qy:function(){return o},ZF:function(){return u}});var r=n(40300);function i(e){return{onFetch:(t,n)=>{let i=async()=>{let n;let i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[],l=!1,d=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},f=t.options.queryFn||(()=>Promise.reject(Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(e,n,i)=>{if(l)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let a={queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};d(a);let s=await f(a),{maxPages:o}=t.options,u=i?r.Ht:r.VX;return{pages:u(e.pages,s,o),pageParams:u(e.pageParams,n,o)}};if(o&&u.length){let e="backward"===o,t=e?s:a,r={pages:u,pageParams:c},l=t(i,r);n=await h(r,l,e)}else{n=await h({pages:[],pageParams:[]},c[0]??i.initialPageParam);let t=e??u.length;for(let e=1;e<t;e++){let e=a(i,n);n=await h(n,e)}}return n};t.options.persister?t.fetchFn=()=>t.options.persister?.(i,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=i}}}function a(e,{pages:t,pageParams:n}){let r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function s(e,{pages:t,pageParams:n}){return e.getPreviousPageParam?.(t[0],t,n[0],n)}function o(e,t){return!!t&&null!=a(e,t)}function u(e,t){return!!t&&!!e.getPreviousPageParam&&null!=s(e,t)}},43059:function(e,t,n){"use strict";n.d(t,{S:function(){return y}});var r=n(40300),i=n(17987),a=n(11640),s=n(99024),o=class extends s.F{#e;#t;#n;#r;#i;#a;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.#u(e.options),this.#a=[],this.#n=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=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?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=this.#e,this.scheduleGc()}get meta(){return this.options.meta}#u(e){this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.#a.length||"idle"!==this.state.fetchStatus||this.#n.remove(this)}setData(e,t){let n=(0,r.oE)(this.state.data,e,this.options);return this.#c({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#r;return this.#i?.cancel(e),t?t.then(r.ZT).catch(r.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.#a.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||void 0===this.state.data||this.#a.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,r.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.#a.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){let e=this.#a.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.#a.includes(e)||(this.#a.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.#a.includes(e)&&(this.#a=this.#a.filter(t=>t!==e),this.#a.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.#a.length}invalidate(){this.state.isInvalidated||this.#c({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#i?.continueRetry(),this.#r}if(e&&this.#u(e),!this.options.queryFn){let e=this.#a.find(e=>e.options.queryFn);e&&this.#u(e.options)}let n=new AbortController,r={queryKey:this.queryKey,meta:this.meta},i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})};i(r);let s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.#o=!1,this.options.persister)?this.options.persister(this.options.queryFn,r,this):this.options.queryFn(r):Promise.reject(Error(`Missing queryFn: '${this.options.queryHash}'`))};i(s),this.options.behavior?.onFetch(s,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#c({type:"fetch",meta:s.fetchOptions?.meta});let o=e=>{(0,a.DV)(e)&&e.silent||this.#c({type:"error",error:e}),(0,a.DV)(e)||(this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#i=(0,a.Mz)({fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){o(Error(`${this.queryHash} data is undefined`));return}this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(e,t)=>{this.#c({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#c({type:"pause"})},onContinue:()=>{this.#c({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode}),this.#r=this.#i.promise,this.#r}#c(e){this.state=(t=>{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:e.meta??null,fetchStatus:(0,a.Kw)(this.options.networkMode)?"fetching":"paused",...void 0===t.data&&{error:null,status:"pending"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if((0,a.DV)(n)&&n.revert&&this.#t)return{...this.#t,fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.V.batch(()=>{this.#a.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}},u=n(42996),c=class extends u.l{constructor(e={}){super(),this.config=e,this.#l=new Map}#l;build(e,t,n){let i=t.queryKey,a=t.queryHash??(0,r.Rm)(i,t),s=this.get(a);return s||(s=new o({cache:this,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#l.has(e.queryHash)||(this.#l.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#l.get(e.queryHash);t&&(e.destroy(),t===e&&this.#l.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#l.get(e)}getAll(){return[...this.#l.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r._x)(e,t)):t}notify(e){i.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=n(77470),d=class extends u.l{constructor(e={}){super(),this.config=e,this.#d=[],this.#f=0}#d;#f;#h;build(e,t,n){let r=new l.m({mutationCache:this,mutationId:++this.#f,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#d.push(e),this.notify({type:"added",mutation:e})}remove(e){this.#d=this.#d.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){i.V.batch(()=>{this.#d.forEach(e=>{this.remove(e)})})}getAll(){return this.#d}find(e){let t={exact:!0,...e};return this.#d.find(e=>(0,r.X7)(t,e))}findAll(e={}){return this.#d.filter(t=>(0,r.X7)(e,t))}notify(e){i.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){return this.#h=(this.#h??Promise.resolve()).then(()=>{let e=this.#d.filter(e=>e.state.isPaused);return i.V.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(r.ZT)),Promise.resolve()))}).then(()=>{this.#h=void 0}),this.#h}},f=n(79198),h=n(20436),p=n(18354),y=class{#p;#y;#s;#m;#b;#g;#v;#w;constructor(e={}){this.#p=e.queryCache||new c,this.#y=e.mutationCache||new d,this.#s=e.defaultOptions||{},this.#m=new Map,this.#b=new Map,this.#g=0}mount(){this.#g++,1===this.#g&&(this.#v=f.j.subscribe(()=>{f.j.isFocused()&&(this.resumePausedMutations(),this.#p.onFocus())}),this.#w=h.N.subscribe(e=>{e&&(this.resumePausedMutations(),this.#p.onOnline())}))}unmount(){this.#g--,0===this.#g&&(this.#v?.(),this.#v=void 0,this.#w?.(),this.#w=void 0)}isFetching(e){return this.#p.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#y.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#p.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);return void 0!==t?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>{let n=t.data;return[e,n]})}setQueryData(e,t,n){let i=this.defaultQueryOptions({queryKey:e}),a=this.#p.get(i.queryHash),s=a?.state.data,o=(0,r.SE)(t,s);if(void 0!==o)return this.#p.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return i.V.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#p.get(t.queryHash)?.state}removeQueries(e){let t=this.#p;i.V.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#p,r={type:"active",...e};return i.V.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){let n={revert:!0,...t},a=i.V.batch(()=>this.#p.findAll(e).map(e=>e.cancel(n)));return Promise.all(a).then(r.ZT).catch(r.ZT)}invalidateQueries(e={},t={}){return i.V.batch(()=>{if(this.#p.findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();let n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){let n={...t,cancelRefetch:t?.cancelRefetch??!0},a=i.V.batch(()=>this.#p.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(a).then(r.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#p.build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.ZT).catch(r.ZT)}fetchInfiniteQuery(e){return e.behavior=(0,p.Gm)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.ZT).catch(r.ZT)}resumePausedMutations(){return h.N.isOnline()?this.#y.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#p}getMutationCache(){return this.#y}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#m.set((0,r.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#m.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.queryKey)&&(n={...n,...t.defaultOptions})}),n}setMutationDefaults(e,t){this.#b.set((0,r.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#b.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#p.clear(),this.#y.clear()}}},89817:function(e,t,n){"use strict";n.r(t),n.d(t,{Analytics:function(){return d},track:function(){return l}});var r=n(2265),i=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function a(){return"undefined"!=typeof window}function s(){return"production"}function o(){let e=a()?window.vam:s();return e||"production"}function u(){return"production"===o()}function c(){return"development"===o()}function l(e,t){var n,r;if(!a()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(u())console.warn(e);else throw Error(e);return}if(!t){null==(n=window.va)||n.call(window,"event",{name:e});return}try{let n=function(e,t){if(!e)return;let n=e,r=[];for(let[i,a]of Object.entries(e))"object"==typeof a&&null!==a&&(t.strip?n=function(e,{[e]:t,...n}){return n}(i,n):r.push(i));if(r.length>0&&!t.strip)throw Error(`The following properties are not valid: ${r.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return n}(t,{strip:u()});null==(r=window.va)||r.call(window,"event",{name:e,data:n})}catch(e){e instanceof Error&&c()&&console.error(e)}}function d(e){return(0,r.useEffect)(()=>{!function(e={debug:!0}){var t;if(!a())return;(function(e="auto"){if("auto"===e){window.vam=s();return}window.vam=e})(e.mode),i(),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let n=e.scriptSrc||(c()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.js");if(document.head.querySelector(`script[src*="${n}"]`))return;let r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),r.dataset.sdkv="1.2.2",e.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),e.endpoint&&(r.dataset.endpoint=e.endpoint),e.dsn&&(r.dataset.dsn=e.dsn),r.onerror=()=>{let e=c()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${e}`)},c()&&!1===e.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}({framework:e.framework||"react",...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var n;null==(n=window.va)||n.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}},11181:function(e,t,n){"use strict";function r(e,t={}){let n;try{n=e.getClient(t)}catch{}return n}n.d(t,{s:function(){return r}})},73613:function(e,t,n){"use strict";n.d(t,{L:function(){return a}});var r=n(65459),i=n(46981);function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.L,"readContract");return o(a)}},94727:function(e,t,n){"use strict";n.d(t,{J:function(){return u}});var r=n(98458),i=n(73105),a=n(46981);async function s(e,t){let{allowFailure:n=!0,chainId:r,contracts:s,...o}=t,u=e.getClient({chainId:r}),c=(0,a.s)(u,i.A,"multicall");return c({allowFailure:n,contracts:s,...o})}var o=n(73613);async function u(e,t){let{allowFailure:n=!0,blockNumber:i,blockTag:a,...u}=t,c=t.contracts;try{let t=c.reduce((t,n,r)=>{let i=n.chainId??e.state.chainId;return{...t,[i]:[...t[i]||[],{contract:n,index:r}]}},{}),r=(await Promise.all(Object.entries(t).map(([t,r])=>s(e,{...u,allowFailure:n,blockNumber:i,blockTag:a,chainId:parseInt(t),contracts:r.map(({contract:e})=>e)})))).flat(),o=Object.values(t).flatMap(e=>e.map(({index:e})=>e));return r.reduce((e,t,n)=>(e&&(e[o[n]]=t),e),[])}catch(s){if(s instanceof r.uq)throw s;let t=()=>c.map(t=>(0,o.L)(e,{...t,blockNumber:i,blockTag:a}));if(n)return(await Promise.allSettled(t())).map(e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"});return await Promise.all(t())}}},3029:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var r=n(9031),i=n(46981),a=n(71660);async function s(e,t){let n;let{abi:s,chainId:o,connector:u,...c}=t;if(t.account)n=t.account;else{let t=await (0,a.e)(e,{chainId:o,connector:u});n=t.account}let l=e.getClient({chainId:o}),d=(0,i.s)(l,r.a,"simulateContract"),{result:f,request:h}=await d({...c,abi:s,account:n});return{chainId:l.chain.id,result:f,request:{__mode:"prepared",...h,chainId:o}}}},57874:function(e,t,n){"use strict";let r;n.d(t,{_:function(){return C}});var i,a=n(30315);let s=e=>(t,n,r)=>{let i=r.subscribe;r.subscribe=(e,t,n)=>{let a=e;if(t){let i=(null==n?void 0:n.equalityFn)||Object.is,s=e(r.getState());a=n=>{let r=e(n);if(!i(s,r)){let e=s;t(s=r,e)}},(null==n?void 0:n.fireImmediately)&&t(s,s)}return i(a)};let a=e(t,n,r);return a},o=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>o(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>o(t)(e)}}},u=(e,t)=>(n,r,i)=>{let a,s,u={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},c=!1,l=new Set,d=new Set;try{a=u.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),n(...e)},r,i);let f=o(u.serialize),h=()=>{let e;let t=u.partialize({...r()}),n=f({state:t,version:u.version}).then(e=>a.setItem(u.name,e)).catch(t=>{e=t});if(e)throw e;return n},p=i.setState;i.setState=(e,t)=>{p(e,t),h()};let y=e((...e)=>{n(...e),h()},r,i),m=()=>{var e;if(!a)return;c=!1,l.forEach(e=>e(r()));let t=(null==(e=u.onRehydrateStorage)?void 0:e.call(u,r()))||void 0;return o(a.getItem.bind(a))(u.name).then(e=>{if(e)return u.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===u.version)return e.state;if(u.migrate)return u.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(s=u.merge(e,null!=(t=r())?t:y),!0),h()}).then(()=>{null==t||t(s,void 0),c=!0,d.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{u={...u,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>m(),hasHydrated:()=>c,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},m(),s||y},c=(e,t)=>(n,r,i)=>{let a,s={storage:function(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(r=n.getItem(e))?r:null;return a instanceof Promise?a.then(i):i(a)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,l=new Set,d=s.storage;if(!d)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 f=()=>{let e=s.partialize({...r()});return d.setItem(s.name,{state:e,version:s.version})},h=i.setState;i.setState=(e,t)=>{h(e,t),f()};let p=e((...e)=>{n(...e),f()},r,i),y=()=>{var e,t;if(!d)return;u=!1,c.forEach(e=>{var t;return e(null!=(t=r())?t:p)});let i=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=r())?e:p))||void 0;return o(d.getItem.bind(d))(s.name).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(a=s.merge(e,null!=(t=r())?t:p),!0),f()}).then(()=>{null==i||i(a,void 0),a=r(),u=!0,l.forEach(e=>e(a))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},s.skipHydration||y(),a||p},l=(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."),u(e,t)):c(e,t),d=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)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,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()}};return t=e(r,i,a),a},f=e=>e?d(e):d;var h=n(18783),p=n(7117),y=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class m{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),i.set(this,new p)}on(e,t){y(this,i,"f").on(e,t)}once(e,t){y(this,i,"f").once(e,t)}off(e,t){y(this,i,"f").off(e,t)}emit(e,...t){let n=t[0];y(this,i,"f").emit(e,{uid:this.uid,...n})}listenerCount(e){return y(this,i,"f").listenerCount(e)}}i=new WeakMap;var b=n(65534),g=n(76026);let v=256;var w=n(81784);function C(e){let t;let{chains:n,multiInjectedProviderDiscovery:i=!0,storage:o=(0,b.o)({storage:"undefined"!=typeof window&&window.localStorage?window.localStorage:b.w}),syncConnectedChain:u=!0,ssr:c,...d}=e,p="undefined"!=typeof window&&i?function(){let e=new Set,t=[],n=()=>(function(e){let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)})(n=>{t.some(({info:e})=>e.uuid===n.info.uuid)||(t=[...t,n],e.forEach(e=>e(t,{added:[n]})))}),r=n();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),r(),r=n()},subscribe:(n,{emitImmediately:r}={})=>(e.add(n),r&&n(t,{added:t}),()=>e.delete(n))}}():void 0,y=f(()=>[...d.connectors??[],...c?[]:p?.getProviders().map(P)??[]].map(C));function C(e){let t=new m(function(e=11){if(!r||v+e>512){r="",v=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(v,v+++e)}()),i={...e({emitter:t,chains:n,storage:o}),emitter:t,uid:t.uid};return t.on("connect",q),i.setup?.(),i}function P(e){let{info:t}=e,n=e.provider;return(0,h.L)({target:{...t,id:t.rdns,provider:n}})}let x=new Map,I={chainId:n[0].id,connections:new Map,current:void 0,status:"disconnected"},F="0.0.0-canary-";t=w.i.startsWith(F)?parseInt(w.i.replace(F,"")):parseInt(w.i.split(".")[0]??"0");let O=f(s(o?l(()=>I,{migrate(e,n){if(n===t)return e;let r=e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId?e.chainId:I.chainId;return{...I,chainId:r}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(([e,t])=>{let{id:n,name:r,type:i,uid:a}=t.connector;return[e,{...t,connector:{id:n,name:r,type:i,uid:a}}]})},chainId:e.chainId,current:e.current}),skipHydration:c,storage:o,version:t}):()=>I));function E(e){O.setState(t=>{let n=t.connections.get(e.uid);return{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??n.accounts,chainId:e.chainId??n.chainId,connector:n.connector})}})}function q(e){"connecting"!==O.getState().status&&"reconnecting"!==O.getState().status&&O.setState(t=>{let n=y.getState().find(t=>t.uid===e.uid);return n?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:n}),current:e.uid,status:"connected"}:t})}return u&&O.subscribe(({connections:e,current:t})=>t?e.get(t)?.chainId:void 0,e=>{let t=n.some(t=>t.id===e);if(t)return O.setState(t=>({...t,chainId:e??t.chainId}))}),p?.subscribe(e=>{let t=new Map;for(let e of y.getState())t.set(e.id,!0);let n=[];for(let r of e){let e=C(P(r));t.has(e.id)||n.push(e)}y.setState(e=>[...e,...n],!0)}),{chains:n,get connectors(){return y.getState()},storage:o,getClient:function(e={}){let t;let r=e.chainId??O.getState().chainId,i=n.find(e=>e.id===r);if(e.chainId&&!i)throw new g.X4;{let e=x.get(O.getState().chainId);if(e&&!i)return e;if(!i)throw new g.X4}{let e=x.get(r);if(e)return e}if(d.client)t=d.client({chain:i});else{let e=i.id,n={},r=Object.entries(d);for(let[t,i]of r)"client"!==t&&"connectors"!==t&&"transports"!==t&&("object"==typeof i?n[t]=i[e]:n[t]=i);t=(0,a.e)({...n,chain:i,batch:n.batch??{multicall:!0},transport:t=>d.transports[e]({...t,connectors:y})})}return x.set(r,t),t},get state(){return O.getState()},setState(e){let t;"object"!=typeof(t="function"==typeof e?e(O.getState()):e)&&(t=I);let n=Object.keys(I).some(e=>!(e in t));n&&(t=I),O.setState(t,!0)},subscribe:(e,t,n)=>O.subscribe(e,t,n?{...n,fireImmediately:n.emitImmediately}:void 0),_internal:{mipd:p,store:O,ssr:!!c,syncConnectedChain:u,transports:d.transports,connectors:{providerDetailToConnector:P,setup:C,setState:e=>y.setState("function"==typeof e?e(y.getState()):e,!0),subscribe:e=>y.subscribe(e)},events:{change:E,connect:q,disconnect:function e(t){O.setState(n=>{let r=n.connections.get(t.uid);if(r&&(r.connector.emitter.off("change",E),r.connector.emitter.off("disconnect",e),r.connector.emitter.on("connect",q)),n.connections.delete(t.uid),0===n.connections.size)return{...n,connections:new Map,current:void 0,status:"disconnected"};let i=n.connections.values().next().value;return{...n,connections:new Map(n.connections),current:i.connector.uid}})}}}}}},65534:function(e,t,n){"use strict";function r(e,t){return JSON.parse(e,(e,n)=>{let r=n;return r?.__type==="bigint"&&(r=BigInt(r.value)),r?.__type==="Map"&&(r=new Map(r.value)),t?.(e,r)??r})}function i(e,t){return e.slice(0,t).join(".")||"."}function a(e,t){let{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function s(e,t,n,r){return JSON.stringify(e,function(e,t){let n="function"==typeof e,r="function"==typeof t,s=[],o=[];return function(u,c){if("object"==typeof c){if(s.length){let e=a(s,this);0===e?s[s.length]=this:(s.splice(e),o.splice(e)),o[o.length]=u;let n=a(s,c);if(0!==n)return r?t.call(this,u,c,i(o,n)):`[ref=${i(o,n)}]`}else s[0]=c,o[0]=u}return n?e.call(this,u,c):c}}((e,n)=>{let r=n;return"bigint"==typeof r&&(r={__type:"bigint",value:n.toString()}),r instanceof Map&&(r={__type:"Map",value:Array.from(n.entries())}),t?.(e,r)??r},r),n??void 0)}function o(e){let{deserialize:t=r,key:n="wagmi",serialize:i=s,storage:a=u}=e;function o(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return{...a,key:n,async getItem(e,r){let i=a.getItem(`${n}.${e}`),s=await o(i);return s?t(s)??null:r??null},async setItem(e,t){let r=`${n}.${e}`;null===t?await o(a.removeItem(r)):await o(a.setItem(r,i(t)))},async removeItem(e){await o(a.removeItem(`${n}.${e}`))}}}n.d(t,{o:function(){return o},w:function(){return u}});let u={getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},21637:function(e,t,n){"use strict";function r(e){return JSON.stringify(e,(e,t)=>!function(e){if(!i(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(i(n)&&n.hasOwnProperty("isPrototypeOf"))}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}))}function i(e){return"[object Object]"===Object.prototype.toString.call(e)}function a(e){let{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:a,maxPages:s,meta:o,networkMode:u,queryFn:c,queryHash:l,queryKey:d,queryKeyHashFn:f,retry:h,retryDelay:p,structuralSharing:y,getPreviousPageParam:m,getNextPageParam:b,initialPageParam:g,_optimisticResults:v,enabled:w,notifyOnChangeProps:C,placeholderData:P,refetchInterval:x,refetchIntervalInBackground:I,refetchOnMount:F,refetchOnReconnect:O,refetchOnWindowFocus:E,retryOnMount:q,select:T,staleTime:k,suspense:S,throwOnError:R,config:$,connector:G,query:M,...N}=e;return N}n.d(t,{O:function(){return a},k:function(){return r}})},48799:function(e,t,n){"use strict";n.d(t,{Dr:function(){return r}});let r={getItem(e){if("undefined"==typeof window)return null;let t=function(e,t){let n=e.split("; ").find(e=>e.startsWith(`${t}=`));if(n)return n.substring(t.length+1)}(document.cookie,e);return t??null},setItem(e,t){"undefined"!=typeof window&&(document.cookie=`${e}=${t}`)},removeItem(e){"undefined"!=typeof window&&(document.cookie=`${e}=;max-age=-1`)}}},57161:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(36238);function i(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(r.Bd[e])}},67397:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var r=n(42980),i=n(3458),a=n(53883),s=n(94540),o=n(94973),u=n(21693),c=n(87815),l=n(87332),d=n(66257),f=n(82600),h=n(65459);async function p(e,{blockNumber:t,blockTag:n,coinType:p,name:y,gatewayUrls:m,strict:b,universalResolverAddress:g}){let v=g;if(!v){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");v=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let s=(0,a.R)({abi:r.X$,functionName:"addr",...null!=p?{args:[(0,l.V)(y),BigInt(p)]}:{args:[(0,l.V)(y)]}}),c={address:v,abi:r.k3,functionName:"resolve",args:[(0,u.NC)((0,d.T)(y)),s],blockNumber:t,blockTag:n},b=(0,f.s)(e,h.L,"readContract"),g=m?await b({...c,args:[...c.args,m]}):await b(c);if("0x"===g[0])return null;let w=(0,i.k)({abi:r.X$,args:null!=p?[(0,l.V)(y),BigInt(p)]:void 0,functionName:"addr",data:g[0]});if("0x"===w||"0x00"===(0,o.f)(w))return null;return w}catch(e){if(b)throw e;if((0,c.c)(e,"resolve"))return null;throw e}}},16470:function(e,t,n){"use strict";n.d(t,{r:function(){return I}});var r=n(65459),i=n(95950);class a extends i.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 s extends i.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 o extends i.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 u extends i.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 c=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,l=/^(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,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,d=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,f=/^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 p(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function y({uri:e,gatewayUrls:t}){let n=d.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};let r=p(t?.ipfs,"https://ipfs.io"),i=p(t?.arweave,"https://arweave.net"),a=e.match(c),{protocol:s,subpath:u,target:h,subtarget:y=""}=a?.groups||{},m="ipns:/"===s||"ipns/"===u,b="ipfs:/"===s||"ipfs/"===u||l.test(e);if(e.startsWith("http")&&!m&&!b){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((m||b)&&h)return{uri:`${r}/${m?"ipns":"ipfs"}/${h}${y}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&h)return{uri:`${i}/${h}${y||""}`,isOnChain:!1,isEncoded:!1};let g=e.replace(f,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return{uri:g,isOnChain:!0,isEncoded:!1};throw new o({uri:e})}function m(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new a({data:e});return e.image||e.image_url||e.image_data}async function b({gatewayUrls:e,uri:t}){try{let n=await fetch(t).then(e=>e.json()),r=await g({gatewayUrls:e,uri:m(n)});return r}catch{throw new o({uri:t})}}async function g({gatewayUrls:e,uri:t}){let{uri:n,isOnChain:r}=y({uri:t,gatewayUrls:e});if(r)return n;let i=await h(n);if(i)return n;throw new o({uri:t})}async function v(e,{nft:t}){if("erc721"===t.namespace)return(0,r.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(0,r.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 u({namespace:t.namespace})}async function w(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?C(e,{gatewayUrls:t,record:n}):g({uri:n,gatewayUrls:t})}async function C(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(":"),[u,c]=r.split(":");if(!a||"eip155"!==a.toLowerCase())throw new s({reason:"Only EIP-155 supported"});if(!o)throw new s({reason:"Chain ID not found"});if(!c)throw new s({reason:"Contract address not found"});if(!i)throw new s({reason:"Token ID not found"});if(!u)throw new s({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}}(n),i=await v(e,{nft:r}),{uri:a,isOnChain:o,isEncoded:u}=y({uri:i,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){let e=u?atob(a.replace("data:application/json;base64,","")):a,n=JSON.parse(e);return g({uri:m(n),gatewayUrls:t})}let c=r.tokenID;return"erc1155"===r.namespace&&(c=c.replace("0x","").padStart(64,"0")),b({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}var P=n(82600),x=n(35271);async function I(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:a,strict:s,universalResolverAddress:o}){let u=await (0,P.s)(e,x.g,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:a,strict:s});if(!u)return null;try{return await w(e,{record:u,gatewayUrls:r})}catch{return null}}},42557:function(e,t,n){"use strict";n.d(t,{w:function(){return l}});var r=n(42980),i=n(94540),a=n(21693),s=n(87815),o=n(66257),u=n(82600),c=n(65459);async function l(e,{address:t,blockNumber:n,blockTag:l,gatewayUrls:d,strict:f,universalResolverAddress:h}){let p=h;if(!p){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");p=(0,i.L)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}let y=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let i={address:p,abi:r.du,functionName:"reverse",args:[(0,a.NC)((0,o.T)(y))],blockNumber:n,blockTag:l},s=(0,u.s)(e,c.L,"readContract"),[f,h]=d?await s({...i,args:[...i.args,d]}):await s(i);if(t.toLowerCase()!==h.toLowerCase())return null;return f}catch(e){if(f)throw e;if((0,s.c)(e,"reverse"))return null;throw e}}},26985:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var r=n(94540),i=n(21693),a=n(66257),s=n(82600),o=n(65459);async function u(e,{blockNumber:t,blockTag:n,name:u,universalResolverAddress:c}){let l=c;if(!l){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");l=(0,r.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[d]=await (0,s.s)(e,o.L,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,i.NC)((0,a.T)(u))],blockNumber:t,blockTag:n});return d}},35271:function(e,t,n){"use strict";n.d(t,{g:function(){return h}});var r=n(42980),i=n(3458),a=n(53883),s=n(94540),o=n(21693),u=n(87815),c=n(87332),l=n(66257),d=n(82600),f=n(65459);async function h(e,{blockNumber:t,blockTag:n,name:h,key:p,gatewayUrls:y,strict:m,universalResolverAddress:b}){let g=b;if(!g){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");g=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let s={address:g,abi:r.k3,functionName:"resolve",args:[(0,o.NC)((0,l.T)(h)),(0,a.R)({abi:r.nZ,functionName:"text",args:[(0,c.V)(h),p]})],blockNumber:t,blockTag:n},u=(0,d.s)(e,f.L,"readContract"),m=y?await u({...s,args:[...s.args,y]}):await u(s);if("0x"===m[0])return null;let b=(0,i.k)({abi:r.nZ,functionName:"text",data:m[0]});return""===b?null:b}catch(e){if(m)throw e;if((0,u.c)(e,"resolve"))return null;throw e}}},98873:function(e,t,n){"use strict";n.d(t,{R:function(){return g}});var r=n(4832),i=n(42980),a=n(95950),s=n(27878),o=n(98458),u=n(3458),c=n(53883),l=n(94540),d=n(21693),f=n(40009),h=n(36074),p=n(21028),y=n(86868),m=n(33668),b=n(2445);async function g(e,t){let{account:i=e.account,batch:u=!!e.batch?.multicall,blockNumber:c,blockTag:l="latest",accessList:m,data:g,gas:w,gasPrice:C,maxFeePerGas:P,maxPriorityFeePerGas:x,nonce:I,to:F,value:O,...E}=t,q=i?(0,r.T)(i):void 0;try{(0,b.F)(t);let n=c?(0,d.eC)(c):void 0,r=n||l,i=e.chain?.formatters?.transactionRequest?.format,a=i||y.tG,o=a({...(0,p.K)(E,{format:i}),from:q?.address,accessList:m,data:g,gas:w,gasPrice:C,maxFeePerGas:P,maxPriorityFeePerGas:x,nonce:I,to:F,value:O});if(u&&function({request:e}){let{data:t,to:n,...r}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!n&&!(Object.values(r).filter(e=>void 0!==e).length>0)}({request:o}))try{return await v(e,{...o,blockNumber:c,blockTag:l})}catch(e){if(!(e instanceof s.pZ)&&!(e instanceof s.mm))throw e}let f=await e.request({method:"eth_call",params:r?[o,r]:[o]});if("0x"===f)return{data:void 0};return{data:f}}catch(u){let r=function(e){if(!(e instanceof a.G))return;let t=e.walk();return"object"==typeof t.data?t.data.data:t.data}(u),{offchainLookup:i,offchainLookupSignature:s}=await n.e(5572).then(n.bind(n,5572));if(r?.slice(0,10)===s&&F)return{data:await i(e,{data:r,to:F})};throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,h.k)(e,n);return t instanceof f.cj?e:t})();return new o.cg(r,{docsPath:t,...n})}(u,{...t,account:q,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:f="latest",data:h,multicallAddress:p,to:y}=t,b=p;if(!b){if(!e.chain)throw new s.pZ;b=(0,l.L)({blockNumber:a,chain:e.chain,contract:"multicall3"})}let g=a?(0,d.eC)(a):void 0,v=g||f,{schedule:w}=(0,m.S)({id:`${e.uid}.${v}`,wait:r,shouldSplitBatch(e){let t=e.reduce((e,{data:t})=>e+(t.length-2),0);return t>2*n},fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,c.R)({abi:i.F8,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:b},v]});return(0,u.k)({abi:i.F8,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:C,success:P}]=await w({data:h,to:y});if(!P)throw new o.VQ({data:C});return"0x"===C?{data:void 0}:{data:C}}},77096:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(38789),i=n(21693),a=n(96157);async function s(e,t){let{address:n,abi:s,args:o,eventName:u,fromBlock:c,strict:l,toBlock:d}=t,f=(0,a.g)(e,{method:"eth_newFilter"}),h=u?(0,r.O)({abi:s,args:o,eventName:u}):void 0,p=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:"bigint"==typeof c?(0,i.eC)(c):c,toBlock:"bigint"==typeof d?(0,i.eC)(d):d,topics:h}]});return{abi:s,args:o,eventName:u,id:p,request:f(p),strict:!!l,type:"event"}}},46280:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(96157);async function i(e){let t=(0,r.g)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}},77451:function(e,t,n){"use strict";n.d(t,{C:function(){return c},X:function(){return u}});var r=n(84161),i=n(82600),a=n(17976),s=n(3891),o=n(75188);async function u(e,t){return c(e,t)}async function c(e,t){let{block:n,chain:u=e.chain,request:c,type:l="eip1559"}=t||{},d=await (async()=>"function"==typeof u?.fees?.baseFeeMultiplier?u.fees.baseFeeMultiplier({block:n,client:e,request:c}):u?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new r.Fz;let f=d.toString().split(".")[1]?.length??0,h=10**f,p=e=>e*BigInt(Math.ceil(d*h))/BigInt(h),y=n||await (0,i.s)(e,s.Q,"getBlock")({});if("function"==typeof u?.fees?.estimateFeesPerGas)return u.fees.estimateFeesPerGas({block:n,client:e,multiply:p,request:c,type:l});if("eip1559"===l){if("bigint"!=typeof y.baseFeePerGas)throw new r.e5;let t="bigint"==typeof c?.maxPriorityFeePerGas?c.maxPriorityFeePerGas:await (0,a.h)(e,{block:y,chain:u,request:c}),n=p(y.baseFeePerGas),i=c?.maxFeePerGas??n+t;return{maxFeePerGas:i,maxPriorityFeePerGas:t}}let m=c?.gasPrice??p(await (0,i.s)(e,o.o,"getGasPrice")({}));return{gasPrice:m}}},89412:function(e,t,n){"use strict";n.d(t,{Q:function(){return m}});var r=n(4832),i=n(21693),a=n(79352),s=n(32421),o=n(95950),u=n(44818);class c extends o.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:o,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){let y=(0,u.xr)({from:t?.address,to:h,value:void 0!==p&&`${(0,a.d)(p)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,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:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",y].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 l=n(40009),d=n(36074),f=n(21028),h=n(86868),p=n(2445),y=n(21765);async function m(e,t){let n=t.account??e.account,a=n?(0,r.T)(n):void 0;try{let{accessList:n,blockNumber:r,blockTag:s,data:o,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:m,to:b,value:g,...v}=a?.type==="local"?await (0,y.Z)(e,t):t,w=r?(0,i.eC)(r):void 0,C=w||s;(0,p.F)(t);let P=e.chain?.formatters?.transactionRequest?.format,x=P||h.tG,I=x({...(0,f.K)(v,{format:P}),from:a?.address,accessList:n,data:o,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:m,to:b,value:g}),F=await e.request({method:"eth_estimateGas",params:C?[I,C]:[I]});return BigInt(F)}catch(n){throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,d.k)(e,n);return t instanceof l.cj?e:t})();return new c(r,{docsPath:t,...n})}(n,{...t,account:a,chain:e.chain})}}},17976:function(e,t,n){"use strict";n.d(t,{_:function(){return u},h:function(){return c}});var r=n(84161),i=n(30838),a=n(82600),s=n(3891),o=n(75188);async function u(e,t){return c(e,t)}async function c(e,t){let{block:n,chain:u=e.chain,request:c}=t||{};if("function"==typeof u?.fees?.defaultPriorityFee){let t=n||await (0,a.s)(e,s.Q,"getBlock")({});return u.fees.defaultPriorityFee({block:t,client:e,request:c})}if(void 0!==u?.fees?.defaultPriorityFee)return u?.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,s.Q,"getBlock")({}),(0,a.s)(e,o.o,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new r.e5;let u=i-t.baseFeePerGas;if(u<0n)return 0n;return u}}},53002:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(21693);async function i(e,{address:t,blockNumber:n,blockTag:i="latest"}){let a=n?(0,r.eC)(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,a||i]});return BigInt(s)}},3891:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(71492),i=n(21693),a=n(78723);async function s(e,{blockHash:t,blockNumber:n,blockTag:s,includeTransactions:o}={}){let u=o??!1,c=void 0!==n?(0,i.eC)(n):void 0,l=null;if(!(l=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[c||(s??"latest"),u]})))throw new r.f({blockHash:t,blockNumber:n});let d=e.chain?.formatters?.block?.format||a.Z;return d(l)}},15552:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});let r=new Map,i=new Map;async function a(e,{cacheKey:t,cacheTime:n=1/0}){let a=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,r),a=t(e,i);return{clear:()=>{n.clear(),a.clear()},promise:n,response:a}}(t),s=a.response.get();if(s&&n>0){let e=new Date().getTime()-s.created.getTime();if(e<n)return s.data}let o=a.promise.get();o||(o=e(),a.promise.set(o));try{let e=await o;return a.response.set({created:new Date,data:e}),e}finally{a.promise.clear()}}let s=e=>`blockNumber.${e}`;async function o(e,{cacheTime:t=e.cacheTime}={}){let n=await a(()=>e.request({method:"eth_blockNumber"}),{cacheKey:s(e.uid),cacheTime:t});return BigInt(n)}},80852:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});var r=n(30838),i=n(21693);async function a(e,{blockHash:t,blockNumber:n,blockTag:a="latest"}={}){let s;let o=void 0!==n?(0,i.eC)(n):void 0;return s=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||a]}),(0,r.ly)(s)}},43661:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(21693);async function i(e,{address:t,blockNumber:n,blockTag:i="latest"}){let a=void 0!==n?(0,r.eC)(n):void 0,s=await e.request({method:"eth_getCode",params:[t,a||i]});if("0x"!==s)return s}},13438:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(30838);async function i(e){let t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},30120:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(77804),i=n(82600),a=n(31801);async function s(e,t){let{abi:n,address:s,args:o,blockHash:u,eventName:c,fromBlock:l,toBlock:d,strict:f}=t,h=c?(0,r.mE)({abi:n,name:c}):void 0,p=h?void 0:n.filter(e=>"event"===e.type);return(0,i.s)(e,a.y,"getLogs")({address:s,args:o,blockHash:u,event:h,events:p,fromBlock:l,toBlock:d,strict:f})}},26841:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(21693);async function i(e,{blockCount:t,blockNumber:n,blockTag:i="latest",rewardPercentiles:a}){let s=n?(0,r.eC)(n):void 0,o=await e.request({method:"eth_feeHistory",params:[(0,r.eC)(t),s||i,a]});return{baseFeePerGas:o.baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:o.gasUsedRatio,oldestBlock:BigInt(o.oldestBlock),reward:o.reward?.map(e=>e.map(e=>BigInt(e)))}}},53138:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(48751),i=n(18457);async function a(e,{filter:t}){let n="strict"in t&&t.strict,a=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof a[0])return a;let s=a.map(e=>(0,i.U)(e));return"abi"in t&&t.abi?(0,r.h)({abi:t.abi,logs:s,strict:n}):s}},75188:function(e,t,n){"use strict";async function r(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}n.d(t,{o:function(){return r}})},31801:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(38789),i=n(48751),a=n(21693),s=n(18457);async function o(e,{address:t,blockHash:n,fromBlock:o,toBlock:u,event:c,events:l,args:d,strict:f}={}){let h;let p=l??(c?[c]:void 0),y=[];p&&(y=[p.flatMap(e=>(0,r.O)({abi:[e],eventName:e.name,args:d}))],c&&(y=y[0])),h=n?await e.request({method:"eth_getLogs",params:[{address:t,topics:y,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:y,fromBlock:"bigint"==typeof o?(0,a.eC)(o):o,toBlock:"bigint"==typeof u?(0,a.eC)(u):u}]});let m=h.map(e=>(0,s.U)(e));return p?(0,i.h)({abi:p,logs:m,strict:f??!1}):m}},49361:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(21693),i=n(30838);async function a(e,{address:t,blockNumber:n,blockTag:a,storageKeys:s}){let o=void 0!==n?(0,r.eC)(n):void 0,u=await e.request({method:"eth_getProof",params:[t,s,o||(a??"latest")]});return{...u,balance:u.balance?BigInt(u.balance):void 0,nonce:u.nonce?(0,i.ly)(u.nonce):void 0,storageProof:u.storageProof?u.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}},97952:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(21693);async function i(e,{address:t,blockNumber:n,blockTag:i="latest",slot:a}){let s=void 0!==n?(0,r.eC)(n):void 0,o=await e.request({method:"eth_getStorageAt",params:[t,a,s||i]});return o}},37498:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(44818),i=n(21693),a=n(52017);async function s(e,{blockHash:t,blockNumber:n,blockTag:s,hash:o,index:u}){let c=s||"latest",l=void 0!==n?(0,i.eC)(n):void 0,d=null;if(o?d=await e.request({method:"eth_getTransactionByHash",params:[o]}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.eC)(u)]}):(l||c)&&(d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,(0,i.eC)(u)]})),!d)throw new r.Bh({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:u});let f=e.chain?.formatters?.transaction?.format||a.Tr;return f(d)}},64356:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var r=n(82600),i=n(15552),a=n(37498);async function s(e,{hash:t,transactionReceipt:n}){let[s,o]=await Promise.all([(0,r.s)(e,i.z,"getBlockNumber")({}),t?(0,r.s)(e,a.f,"getBlockNumber")({hash:t}):void 0]),u=n?.blockNumber||o?.blockNumber;return u?s-u+1n:0n}},31742:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(30838),i=n(21693);async function a(e,{address:t,blockTag:n="latest",blockNumber:a}){let s=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,i.eC)(a):n]});return(0,r.ly)(s)}},34843:function(e,t,n){"use strict";n.d(t,{a:function(){return a}});var r=n(44818),i=n(3324);async function a(e,{hash:t}){let n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new r.Yb({hash:t});let a=e.chain?.formatters?.transactionReceipt?.format||i.f;return a(n)}},73105:function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r=n(42980),i=n(71878),a=n(95950),s=n(98458),o=n(3458),u=n(53883),c=n(94540),l=n(65573),d=n(82600),f=n(65459);async function h(e,t){let{allowFailure:n=!0,batchSize:h,blockNumber:p,blockTag:y,multicallAddress:m}=t,b=t.contracts,g=h??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),v=m;if(!v){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");v=(0,c.L)({blockNumber:p,chain:e.chain,contract:"multicall3"})}let w=[[]],C=0,P=0;for(let e=0;e<b.length;e++){let{abi:t,address:r,args:i,functionName:a}=b[e];try{let e=(0,u.R)({abi:t,args:i,functionName:a});P+=(e.length-2)/2,g>0&&P>g&&w[C].length>0&&(C++,P=(e.length-2)/2,w[C]=[]),w[C]=[...w[C],{allowFailure:!0,callData:e,target:r}]}catch(s){let e=(0,l.S)(s,{abi:t,address:r,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!n)throw e;w[C]=[...w[C],{allowFailure:!0,callData:"0x",target:r}]}}let x=await Promise.allSettled(w.map(t=>(0,d.s)(e,f.L,"readContract")({abi:r.F8,address:v,args:[t],blockNumber:p,blockTag:y,functionName:"aggregate3"}))),I=[];for(let e=0;e<x.length;e++){let t=x[e];if("rejected"===t.status){if(!n)throw t.reason;for(let n=0;n<w[e].length;n++)I.push({status:"failure",error:t.reason,result:void 0});continue}let r=t.value;for(let t=0;t<r.length;t++){let{returnData:a,success:u}=r[t],{callData:c}=w[e][t],{abi:d,address:f,functionName:h,args:p}=b[I.length];try{if("0x"===c)throw new i.wb;if(!u)throw new s.VQ({data:a});let e=(0,o.k)({abi:d,args:p,data:a,functionName:h});I.push(n?{result:e,status:"success"}:e)}catch(t){let e=(0,l.S)(t,{abi:d,address:f,args:p,docsPath:"/docs/contract/multicall",functionName:h});if(!n)throw e;I.push({error:e,result:void 0,status:"failure"})}}}if(I.length!==b.length)throw new a.G("multicall results mismatch");return I}},65459:function(e,t,n){"use strict";n.d(t,{L:function(){return u}});var r=n(3458),i=n(53883),a=n(65573),s=n(82600),o=n(98873);async function u(e,t){let{abi:n,address:u,args:c,functionName:l,...d}=t,f=(0,i.R)({abi:n,args:c,functionName:l});try{let{data:t}=await (0,s.s)(e,o.R,"call")({...d,data:f,to:u});return(0,r.k)({abi:n,args:c,functionName:l,data:t||"0x"})}catch(e){throw(0,a.S)(e,{abi:n,address:u,args:c,docsPath:"/docs/contract/readContract",functionName:l})}}},9031:function(e,t,n){"use strict";n.d(t,{a:function(){return c}});var r=n(4832),i=n(3458),a=n(53883),s=n(65573),o=n(82600),u=n(98873);async function c(e,t){let{abi:n,address:c,args:l,dataSuffix:d,functionName:f,...h}=t,p=h.account?(0,r.T)(h.account):e.account,y=(0,a.R)({abi:n,args:l,functionName:f});try{let{data:r}=await (0,o.s)(e,u.R,"call")({batch:!1,data:`${y}${d?d.replace("0x",""):""}`,to:c,...h,account:p}),a=(0,i.k)({abi:n,args:l,functionName:f,data:r||"0x"}),s=n.filter(e=>"name"in e&&e.name===t.functionName);return{result:a,request:{abi:s,address:c,args:l,dataSuffix:d,functionName:f,...h,account:p}}}catch(e){throw(0,s.S)(e,{abi:n,address:c,args:l,docsPath:"/docs/contract/simulateContract",functionName:f,sender:p?.address})}}},81621:function(e,t,n){"use strict";async function r(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}n.d(t,{W:function(){return r}})},4992:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(42980),i=n(98458);BigInt(0),BigInt(1),BigInt(2);var a=n(56728),s=n(45008),o=n(82600),u=n(21693),c=n(12732),l=n(98873);async function d(e,{address:t,hash:n,signature:d,...f}){let h=(0,s.v)(d)?d:(0,u.NC)(d);try{let{data:i}=await (0,o.s)(e,l.R,"call")({data:(0,c.w)({abi:r.$o,args:[t,n,h],bytecode:"0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"}),...f});return function(e,t){let n=(0,s.v)(e)?(0,a.O0)(e):e,r=(0,s.v)(t)?(0,a.O0)(t):t;return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,r)}(i??"0x0","0x1")}catch(e){if(e instanceof i.cg)return!1;throw e}}},18285:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(69809),i=n(56728),a=n(55852),s=n(4992);async function o(e,{address:t,message:n,signature:o,...u}){let c=function(e,t){let n="string"==typeof e?(0,i.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,i.O0)(e.raw),s=(0,i.qX)(`Ethereum Signed Message:
${n.length}`);return(0,a.w)((0,r.zo)([s,n]),void 0)}(n);return(0,s.Z)(e,{address:t,hash:c,signature:o,...u})}},52558:function(e,t,n){"use strict";n.d(t,{B:function(){return l}});var r=n(90929),i=n(69809),a=n(21693),s=n(55852),o=n(29578);function u({data:e,primaryType:t,types:n}){let i=function e({data:t,primaryType:n,types:i}){let o=[{type:"bytes32"}],u=[function({primaryType:e,types:t}){let n=(0,a.NC)(function({primaryType:e,types:t}){let n="",r=function e({primaryType:t,types:n},r=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(r.has(a)||void 0===n[a])return r;for(let t of(r.add(a),n[a]))e({primaryType:t.type,types:n},r);return r}({primaryType:e,types:t});r.delete(e);let i=[e,...Array.from(r).sort()];for(let e of i)n+=`${e}(${t[e].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return n}({primaryType:e,types:t}));return(0,s.w)(n)}({primaryType:n,types:i})];for(let c of i[n]){let[n,l]=function t({types:n,name:i,type:o,value:u}){if(void 0!==n[o])return[{type:"bytes32"},(0,s.w)(e({data:u,primaryType:o,types:n}))];if("bytes"===o){let e=u.length%2?"0":"";return u=`0x${e+u.slice(2)}`,[{type:"bytes32"},(0,s.w)(u)]}if("string"===o)return[{type:"bytes32"},(0,s.w)((0,a.NC)(u))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),a=u.map(r=>t({name:i,type:e,types:n,value:r}));return[{type:"bytes32"},(0,s.w)((0,r.E)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:o},u]}({types:i,name:c.name,type:c.type,value:t[c.name]});o.push(n),u.push(l)}return(0,r.E)(o,u)}({data:e,primaryType:t,types:n});return(0,s.w)(i)}var c=n(4992);async function l(e,t){let{address:n,signature:r,message:a,primaryType:l,types:d,domain:f,...h}=t,p=function(e){let{domain:t={},message:n,primaryType:r}=e,a={EIP712Domain:(0,o.cj)({domain:t}),...e.types};(0,o.iC)({domain:t,message:n,primaryType:r,types:a});let c=["0x1901"];return t&&c.push(function({domain:e,types:t}){return u({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:a})),"EIP712Domain"!==r&&c.push(u({data:n,primaryType:r,types:a})),(0,s.w)((0,i.zo)(c))}({message:a,primaryType:l,types:d,domain:f});return(0,c.Z)(e,{address:n,hash:p,signature:r,...h})}},31764:function(e,t,n){"use strict";n.d(t,{e:function(){return h}});var r=n(71492),i=n(44818),a=n(82600),s=n(87162),o=n(36063),u=n(71891),c=n(3891),l=n(37498),d=n(34843),f=n(63928);async function h(e,{confirmations:t=1,hash:n,onReplaced:h,pollingInterval:p=e.pollingInterval,retryCount:y=6,retryDelay:m=({count:e})=>200*~~(1<<e),timeout:b}){let g,v,w;let C=(0,u.P)(["waitForTransactionReceipt",e.uid,n]),P=!1;return new Promise((u,x)=>{b&&setTimeout(()=>x(new i.mc({hash:n})),b);let I=(0,s.N7)(C,{onReplaced:h,resolve:u,reject:x},s=>{let u=(0,a.s)(e,f.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(f){if(P)return;let h=f,p=e=>{u(),e(),I()};try{if(w){if(t>1&&(!w.blockNumber||h-w.blockNumber+1n<t))return;p(()=>s.resolve(w));return}if(g||(P=!0,await (0,o.J)(async()=>{(g=await (0,a.s)(e,l.f,"getTransaction")({hash:n})).blockNumber&&(h=g.blockNumber)},{delay:m,retryCount:y}),P=!1),w=await (0,a.s)(e,d.a,"getTransactionReceipt")({hash:n}),t>1&&(!w.blockNumber||h-w.blockNumber+1n<t))return;p(()=>s.resolve(w))}catch(n){if(n instanceof i.Bh||n instanceof i.Yb){if(!g){P=!1;return}try{v=g,P=!0;let n=await (0,o.J)(()=>(0,a.s)(e,c.Q,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:m,retryCount:y,shouldRetry:({error:e})=>e instanceof r.f});P=!1;let i=n.transactions.find(({from:e,nonce:t})=>e===v.from&&t===v.nonce);if(!i||(w=await (0,a.s)(e,d.a,"getTransactionReceipt")({hash:i.hash}),t>1&&(!w.blockNumber||h-w.blockNumber+1n<t)))return;let u="replaced";i.to===v.to&&i.value===v.value?u="repriced":i.from===i.to&&0n===i.value&&(u="cancelled"),p(()=>{s.onReplaced?.({reason:u,replacedTransaction:v,transaction:i,transactionReceipt:w}),s.resolve(w)})}catch(e){p(()=>s.reject(e))}}else p(()=>s.reject(n))}}})})})}},63928:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var r=n(30838),i=n(82600),a=n(87162),s=n(62468),o=n(71891),u=n(15552);function c(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:c,onError:l,poll:d,pollingInterval:f=e.pollingInterval}){let h,p,y;let m=void 0!==d?d:"webSocket"!==e.transport.type;return m?(()=>{let r=(0,o.P)(["watchBlockNumber",e.uid,t,n,f]);return(0,a.N7)(r,{onBlockNumber:c,onError:l},r=>(0,s.$)(async()=>{try{let t=await (0,i.s)(e,u.z,"getBlockNumber")({cacheTime:0});if(h){if(t===h)return;if(t-h>1&&n)for(let e=h+1n;e<t;e++)r.onBlockNumber(e,h),h=e}(!h||t>h)&&(r.onBlockNumber(t,h),h=t)}catch(e){r.onError?.(e)}},{emitOnBegin:t,interval:f}))})():(p=!0,y=()=>p=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!p)return;let t=(0,r.y_)(e.result?.number);c(t,h),h=t},onError(e){l?.(e)}});y=t,p||y()}catch(e){l?.(e)}})(),y)}},58854:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(78723),i=n(82600),a=n(87162),s=n(62468),o=n(71891),u=n(3891);function c(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:c=!1,onBlock:l,onError:d,includeTransactions:f,poll:h,pollingInterval:p=e.pollingInterval}){let y,m,b;let g=void 0!==h?h:"webSocket"!==e.transport.type,v=f??!1;return g?(()=>{let r=(0,o.P)(["watchBlocks",e.uid,n,c,v,p]);return(0,a.N7)(r,{onBlock:l,onError:d},r=>(0,s.$)(async()=>{try{let a=await (0,i.s)(e,u.Q,"getBlock")({blockTag:t,includeTransactions:v});if(a.number&&y?.number){if(a.number===y.number)return;if(a.number-y.number>1&&n)for(let t=y?.number+1n;t<a.number;t++){let n=await (0,i.s)(e,u.Q,"getBlock")({blockNumber:t,includeTransactions:v});r.onBlock(n,y),y=n}}(!y?.number||"pending"===t&&!a?.number||a.number&&a.number>y.number)&&(r.onBlock(a,y),y=a)}catch(e){r.onError?.(e)}},{emitOnBegin:c,interval:p}))})():(m=!0,b=()=>m=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newHeads"],onData(t){if(!m)return;let n=e.chain?.formatters?.block?.format||r.Z,i=n(t.result);l(i,y),y=i},onError(e){d?.(e)}});b=t,m||b()}catch(e){d?.(e)}})(),b)}},40457:function(e,t,n){"use strict";n.d(t,{Y:function(){return b}});var r=n(71878),i=n(48519),a=n(63610),s=n(38789),o=n(18457),u=n(82600),c=n(87162),l=n(62468),d=n(71891),f=n(77096),h=n(15552),p=n(30120),y=n(53138),m=n(81621);function b(e,t){let n,b;let{abi:g,address:v,args:w,batch:C=!0,eventName:P,onError:x,onLogs:I,poll:F,pollingInterval:O=e.pollingInterval,strict:E}=t,q=void 0!==F?F:"webSocket"!==e.transport.type;return q?(()=>{let t=(0,d.P)(["watchContractEvent",v,w,C,e.uid,P,O]),n=E??!1;return(0,c.N7)(t,{onLogs:I,onError:x},t=>{let r,a;let s=!1,o=(0,l.$)(async()=>{if(!s){try{a=await (0,u.s)(e,f.A,"createContractEventFilter")({abi:g,address:v,args:w,eventName:P,strict:n})}catch{}s=!0;return}try{let i;if(a)i=await (0,u.s)(e,y.K,"getFilterChanges")({filter:a});else{let t=await (0,u.s)(e,h.z,"getBlockNumber")({});i=r&&r!==t?await (0,u.s)(e,p.m,"getContractEvents")({abi:g,address:v,args:w,eventName:P,fromBlock:r+1n,toBlock:t,strict:n}):[],r=t}if(0===i.length)return;if(C)t.onLogs(i);else for(let e of i)t.onLogs([e])}catch(e){a&&e instanceof i.yR&&(s=!1),t.onError?.(e)}},{emitOnBegin:!0,interval:O});return async()=>{a&&await (0,u.s)(e,m.W,"uninstallFilter")({filter:a}),o()}})})():(n=!0,b=()=>n=!1,(async()=>{try{let t=P?(0,s.O)({abi:g,eventName:P,args:w}):[],{unsubscribe:i}=await e.transport.subscribe({params:["logs",{address:v,topics:t}],onData(e){if(!n)return;let t=e.result;try{let{eventName:e,args:n}=(0,a.F)({abi:g,data:t.data,topics:t.topics,strict:E}),r=(0,o.U)(t,{args:n,eventName:e});I([r])}catch(a){let e,n;if(a instanceof r.SM||a instanceof r.Gy){if(E)return;e=a.abiItem.name,n=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,o.U)(t,{args:n?[]:{},eventName:e});I([i])}},onError(e){x?.(e)}});b=i,n||b()}catch(e){x?.(e)}})(),b)}},48176:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var r=n(82600),i=n(87162),a=n(62468),s=n(71891),o=n(46280),u=n(53138),c=n(81621);function l(e,{batch:t=!0,onError:n,onTransactions:l,poll:d,pollingInterval:f=e.pollingInterval}){let h,p;let y=void 0!==d?d:"webSocket"!==e.transport.type;return y?(()=>{let d=(0,s.P)(["watchPendingTransactions",e.uid,t,f]);return(0,i.N7)(d,{onTransactions:l,onError:n},n=>{let i;let s=(0,a.$)(async()=>{try{if(!i)try{i=await (0,r.s)(e,o.W,"createPendingTransactionFilter")({});return}catch(e){throw s(),e}let a=await (0,r.s)(e,u.K,"getFilterChanges")({filter:i});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:f});return async()=>{i&&await (0,r.s)(e,c.W,"uninstallFilter")({filter:i}),s()}})})():(h=!0,p=()=>h=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!h)return;let t=e.result;l([t])},onError(e){n?.(e)}});p=t,h||p()}catch(e){n?.(e)}})(),p)}},21765:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(4832),i=n(77451),a=n(89412),s=n(3891),o=n(31742),u=n(84161),c=n(82600),l=n(2445),d=n(74714);async function f(e,t){let{account:n=e.account,chain:f,gas:h,nonce:p,parameters:y=["fees","gas","nonce","type"],type:m}=t,b=n?(0,r.T)(n):void 0,g=await (0,c.s)(e,s.Q,"getBlock")({blockTag:"latest"}),v={...t,...b?{from:b?.address}:{}};if(y.includes("nonce")&&void 0===p&&b&&(v.nonce=await (0,c.s)(e,o.K,"getTransactionCount")({address:b.address,blockTag:"pending"})),(y.includes("fees")||y.includes("type"))&&void 0===m)try{v.type=(0,d.l)(v)}catch{v.type="bigint"==typeof g.baseFeePerGas?"eip1559":"legacy"}if(y.includes("fees")){if("eip1559"===v.type){let{maxFeePerGas:n,maxPriorityFeePerGas:r}=await (0,i.C)(e,{block:g,chain:f,request:v});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<r)throw new u.ld({maxPriorityFeePerGas:r});v.maxPriorityFeePerGas=r,v.maxFeePerGas=n}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new u.e5;let{gasPrice:n}=await (0,i.C)(e,{block:g,chain:f,request:v,type:"legacy"});v.gasPrice=n}}return y.includes("gas")&&void 0===h&&(v.gas=await (0,c.s)(e,a.Q,"estimateGas")({...v,account:b?{address:b.address,type:"json-rpc"}:void 0})),(0,l.F)(v),delete v.parameters,v}},73971:function(e,t,n){"use strict";async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}n.d(t,{p:function(){return r}})},64394:function(e,t,n){"use strict";n.d(t,{T:function(){return m}});var r=n(4832),i=n(67333),a=n(64305),s=n(40009),o=n(44818),u=n(36074),c=n(21028),l=n(86868),d=n(82600),f=n(2445),h=n(13438),p=n(21765),y=n(73971);async function m(e,t){let{account:n=e.account,chain:m=e.chain,accessList:b,data:g,gas:v,gasPrice:w,maxFeePerGas:C,maxPriorityFeePerGas:P,nonce:x,to:I,value:F,...O}=t;if(!n)throw new i.o({docsPath:"/docs/actions/wallet/sendTransaction"});let E=(0,r.T)(n);try{let n;if((0,f.F)(t),null!==m&&(n=await (0,d.s)(e,h.L,"getChainId")({}),(0,a.q)({currentChainId:n,chain:m})),"local"===E.type){let t=await (0,d.s)(e,p.Z,"prepareTransactionRequest")({account:E,accessList:b,chain:m,data:g,gas:v,gasPrice:w,maxFeePerGas:C,maxPriorityFeePerGas:P,nonce:x,to:I,value:F,...O});n||(n=await (0,d.s)(e,h.L,"getChainId")({}));let r=m?.serializers?.transaction,i=await E.signTransaction({...t,chainId:n},{serializer:r});return await (0,d.s)(e,y.p,"sendRawTransaction")({serializedTransaction:i})}let r=e.chain?.formatters?.transactionRequest?.format,i=r||l.tG,s=i({...(0,c.K)(O,{format:r}),accessList:b,data:g,from:E.address,gas:v,gasPrice:w,maxFeePerGas:C,maxPriorityFeePerGas:P,nonce:x,to:I,value:F});return await e.request({method:"eth_sendTransaction",params:[s]},{retryCount:0})}catch(e){throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,u.k)(e,n);return t instanceof s.cj?e:t})();return new o.mk(r,{docsPath:t,...n})}(e,{...t,account:E,chain:t.chain||void 0})}}},31951:function(e,t,n){"use strict";n.d(t,{x:function(){return u}});var r=n(4832),i=n(67333),a=n(45008),s=n(71891),o=n(29578);async function u(e,t){let{account:n=e.account,domain:u,message:c,primaryType:l}=t;if(!n)throw new i.o({docsPath:"/docs/actions/wallet/signTypedData"});let d=(0,r.T)(n),f={EIP712Domain:(0,o.cj)({domain:u}),...t.types};if((0,o.iC)({domain:u,message:c,primaryType:l,types:f}),"local"===d.type)return d.signTypedData({domain:u,message:c,primaryType:l,types:f});let h=(0,s.P)({domain:u??{},message:c,primaryType:l,types:f},(e,t)=>(0,a.v)(t)?t.toLowerCase():t);return e.request({method:"eth_signTypedData_v4",params:[d.address,h]},{retryCount:0})}},23570:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});var r=n(53883),i=n(82600),a=n(64394);async function s(e,t){let{abi:n,address:s,args:o,dataSuffix:u,functionName:c,...l}=t,d=(0,r.R)({abi:n,args:o,functionName:c});return(0,i.s)(e,a.T,"sendTransaction")({data:`${d}${u?u.replace("0x",""):""}`,to:s,...l})}},75404:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(71186);let i=(0,r.a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x8cab227b1162f03b8338331adaad7aadc83b895e",blockCreated:18958930},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},14307:function(e,t,n){"use strict";n.d(t,{v:function(){return F}});var r=n(71186),i=n(30838),a=n(78723),s=n(52017),o=n(3324);let u={block:(0,a.G)({format(e){let t=e.transactions?.map(e=>{if("string"==typeof e)return e;let t=s.Tr(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?i.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:(0,s.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,i.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,o.d)({format:e=>({l1GasPrice:e.l1GasPrice?(0,i.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,i.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,i.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var c=n(21485),l=n(87364),d=n(69809),f=n(21693),h=n(95950),p=n(73222),y=n(56728);function m(e,t="hex"){let n=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),n=b(t),r=t<=55?1+t:1+n+t;return{length:r,encode(r){for(let{encode:i}of(t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t)),e))i(r)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,y.nr)(e):e,n=b(t.length),r=1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length;return{length:r,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),r=(0,p.q)(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,f.ci)(r.bytes):r.bytes}function b(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new h.G("Length is too large.")}var g=n(44818),v=n(94973),w=n(27878),C=n(40009),P=n(74714);function x(e){if(!e||0===e.length)return[];let t=[];for(let n=0;n<e.length;n++){let{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new g.JC({storageKey:i[e]});if(!(0,l.U)(r))throw new c.b({address:r});t.push([r,i])}return t}let I={contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:u,serializers:{transaction:(e,t)=>"deposit"===e.type||void 0!==e.sourceHash?function(e){!function(e){let{from:t,to:n}=e;if(t&&!(0,l.U)(t))throw new c.b({address:t});if(n&&!(0,l.U)(n))throw new c.b({address:n})}(e);let{sourceHash:t,data:n,from:r,gas:i,isSystemTx:a,mint:s,to:o,value:u}=e,h=[t,r,o??"0x",s?(0,f.NC)(s):"0x",u?(0,f.NC)(u):"0x",i?(0,f.NC)(i):"0x",a?"0x1":"0x",n??"0x"];return(0,d.SM)(["0x7e",m(h)])}(e):function(e,t){let n=(0,P.l)(e);return"eip1559"===n?function(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:s,maxFeePerGas:o,maxPriorityFeePerGas:u,accessList:p,data:y}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(t<=0)throw new w.hJ({chainId:t});if(a&&!(0,l.U)(a))throw new c.b({address:a});if(r)throw new h.G("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(i&&i>2n**256n-1n)throw new C.Hh({maxFeePerGas:i});if(n&&i&&n>i)throw new C.cs({maxFeePerGas:i,maxPriorityFeePerGas:n})}(e);let b=x(p),g=[(0,f.NC)(n),i?(0,f.NC)(i):"0x",u?(0,f.NC)(u):"0x",o?(0,f.NC)(o):"0x",r?(0,f.NC)(r):"0x",a??"0x",s?(0,f.NC)(s):"0x",y??"0x",b];if(t){let e=0n===t.v?"0x":1n===t.v?(0,f.NC)(1):27n===t.v?"0x":(0,f.NC)(1);g.push(e,(0,v.f)(t.r),(0,v.f)(t.s))}return(0,d.SM)(["0x02",m(g)])}(e,t):"eip2930"===n?function(e,t){let{chainId:n,gas:r,data:i,nonce:a,to:s,value:o,accessList:u,gasPrice:p}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(t<=0)throw new w.hJ({chainId:t});if(a&&!(0,l.U)(a))throw new c.b({address:a});if(n||i)throw new h.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>2n**256n-1n)throw new C.Hh({maxFeePerGas:r})}(e);let y=x(u),b=[(0,f.NC)(n),a?(0,f.NC)(a):"0x",p?(0,f.NC)(p):"0x",r?(0,f.NC)(r):"0x",s??"0x",o?(0,f.NC)(o):"0x",i??"0x",y];if(t){let e=0n===t.v?"0x":1n===t.v?(0,f.NC)(1):27n===t.v?"0x":(0,f.NC)(1);b.push(e,(0,v.f)(t.r),(0,v.f)(t.s))}return(0,d.SM)(["0x01",m(b)])}(e,t):function(e,t){let{chainId:n=0,gas:r,data:i,nonce:a,to:s,value:o,gasPrice:u}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a,accessList:s}=e;if(a&&!(0,l.U)(a))throw new c.b({address:a});if(void 0!==t&&t<=0)throw new w.hJ({chainId:t});if(n||i)throw new h.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>2n**256n-1n)throw new C.Hh({maxFeePerGas:r});if(s)throw new h.G("`accessList` is not a valid Legacy Transaction attribute.")}(e);let d=[a?(0,f.NC)(a):"0x",u?(0,f.NC)(u):"0x",r?(0,f.NC)(r):"0x",s??"0x",o?(0,f.NC)(o):"0x",i??"0x"];if(t){let e=(()=>{if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);if(t.v>=35n){let e=(t.v-35n)/2n;return e>0?t.v:27n+(35n===t.v?0n:1n)}let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new g.vl({v:t.v});return e})();d=[...d,(0,f.NC)(e),t.r,t.s]}else n>0&&(d=[...d,(0,f.NC)(n),"0x","0x"]);return m(d)}(e,t)}(e,t)}},F=(0,r.a)({...I,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io"}},contracts:{...I.contracts,l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}}},sourceId:1})},35148:function(e,t,n){"use strict";n.d(t,{d:function(){return d}});var r=n(20722),i=n(95950);class a extends i.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var s=n(33668),o=n(33679),u=n(71891);let c={current:0,take(){return this.current++},reset(){this.current=0}};var l=n(36855);function d(e,t={}){let{batch:n,fetchOptions:i,key:d="http",name:f="HTTP JSON-RPC",retryDelay:h}=t;return({chain:p,retryCount:y,timeout:m})=>{let{batchSize:b=1e3,wait:g=0}="object"==typeof n?n:{},v=t.retryCount??y,w=m??t.timeout??1e4,C=e||p?.rpcUrls.default.http[0];if(!C)throw new a;let P=function(e,t={}){return{async request(n){let{body:i,fetchOptions:a={},timeout:s=t.timeout??1e4}=n,{headers:l,method:d,signal:f}={...t.fetchOptions,...a};try{let t;let n=await (0,o.F)(async({signal:t})=>{let n=await fetch(e,{...a,body:Array.isArray(i)?(0,u.P)(i.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,u.P)({jsonrpc:"2.0",id:i.id??c.take(),...i}),headers:{...l,"Content-Type":"application/json"},method:d||"POST",signal:f||(s>0?t:void 0)});return n},{errorInstance:new r.W5({body:i,url:e}),timeout:s,signal:!0});if(t=n.headers.get("Content-Type")?.startsWith("application/json")?await n.json():await n.text(),!n.ok)throw new r.Gg({body:i,details:(0,u.P)(t.error)||n.statusText,headers:n.headers,status:n.status,url:e});return t}catch(t){if(t instanceof r.Gg||t instanceof r.W5)throw t;throw new r.Gg({body:i,details:t.message,url:e})}}}}(C,{fetchOptions:i,timeout:w});return(0,l.q)({key:d,name:f,async request({method:t,params:i}){let a={method:t,params:i},{schedule:o}=(0,s.S)({id:`${e}`,wait:g,shouldSplitBatch:e=>e.length>b,fn:e=>P.request({body:e}),sort:(e,t)=>e.id-t.id}),u=async e=>n?o(e):[await P.request({body:e})],[{error:c,result:l}]=await u(a);if(c)throw new r.bs({body:a,error:c,url:C});return l},retryCount:v,retryDelay:h,timeout:w,type:"http"},{fetchOptions:i,url:C})}}},42980:function(e,t,n){"use strict";n.d(t,{$o:function(){return c},F8:function(){return r},X$:function(){return u},du:function(){return s},k3:function(){return a},nZ:function(){return o}});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"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",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"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...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"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],u=[{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"}]}],c=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},28483: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"}},36238: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}},71878:function(e,t,n){"use strict";n.d(t,{CI:function(){return I},FM:function(){return p},Gy:function(){return P},KY:function(){return w},M4:function(){return d},MX:function(){return g},S4:function(){return v},SM:function(){return C},cO:function(){return o},dh:function(){return x},fM:function(){return s},fs:function(){return f},gr:function(){return l},hn:function(){return F},lC:function(){return y},mv:function(){return m},wM:function(){return O},wb:function(){return c},xB:function(){return u},xL:function(){return b},yP:function(){return h}});var r=n(40928),i=n(39868),a=n(95950);class s 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 o 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 u 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 c 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 f 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 h 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 y 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 m 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 b 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 g 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 C 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 P 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 x 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 I 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 F 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"})}}},71492:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(95950);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"})}}},27878:function(e,t,n){"use strict";n.d(t,{Bk:function(){return s},Yl:function(){return a},hJ:function(){return u},mm:function(){return i},pZ:function(){return o}});var r=n(95950);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 s 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 o extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class u extends r.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}},98458:function(e,t,n){"use strict";n.d(t,{cg:function(){return m},uq:function(){return b},Lu:function(){return g},Dk:function(){return v},VQ:function(){return w}});var r=n(4832),i=n(28483),a=n(49039),s=n(40928),o=n(71891);function u({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,o.P)(t[n]):t[n]}`).join(", ")})`}var c=n(77804),l=n(79352),d=n(32421),f=n(71878),h=n(95950),p=n(44818),y=n(66291);class m extends h.G{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:s,gasPrice:o,maxFeePerGas:u,maxPriorityFeePerGas:c,nonce:f,to:h,value:y}){let m=t?(0,r.T)(t):void 0,b=(0,p.xr)({from:m?.address,to:h,value:void 0!==y&&`${(0,l.d)(y)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:s,gasPrice:void 0!==o&&`${(0,d.o)(o)} gwei`,maxFeePerGas:void 0!==u&&`${(0,d.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,d.o)(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",b].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 b extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:a,sender:o}){let l=(0,c.mE)({abi:t,args:n,name:a}),d=l?u({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,s.t)(l,{includeName:!0}):void 0,h=(0,p.xr)({address:r&&(0,y.CR)(r),function:f,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",h].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=o}}class g extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let o,c,l,d,h;if(t&&"0x"!==t)try{h=(0,a.p)({abi:e,data:t});let{abiItem:n,errorName:r,args:o}=h;if("Error"===r)l=o[0];else if("Panic"===r){let[e]=o;l=i.$[e]}else{let e=n?(0,s.t)(n,{includeName:!0}):void 0,t=n&&o?u({abiItem:n,args:o,includeFunctionName:!1,includeName:!1}):void 0;c=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(r?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else r&&(l=r);o instanceof f.yP&&(d=o.signature,c=[`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:o,metaMessages:c}),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=h,this.reason=l,this.signature=d}}class v extends h.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 h.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}}},99851:function(e,t,n){"use strict";n.d(t,{KD:function(){return s},T_:function(){return i},lQ:function(){return a}});var r=n(95950);class i extends r.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class a extends r.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class s extends r.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}},84161:function(e,t,n){"use strict";n.d(t,{Fz:function(){return a},e5:function(){return s},ld:function(){return o}});var r=n(32421),i=n(95950);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 s 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 o 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"})}}},40009:function(e,t,n){"use strict";n.d(t,{C_:function(){return d},G$:function(){return o},Hh:function(){return s},M_:function(){return a},WF:function(){return f},ZI:function(){return u},cj:function(){return m},cs:function(){return y},dR:function(){return h},pZ:function(){return p},se:function(){return l},vU:function(){return c}});var r=n(32421),i=n(95950);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 s 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(s,"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 o 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(o,"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 u 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(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c 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(c,"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 f 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(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h 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(h,"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 y 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(y,"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 m 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"})}}},44818:function(e,t,n){"use strict";n.d(t,{Bh:function(){return f},JC:function(){return l},Yb:function(){return h},j3:function(){return c},mc:function(){return p},mk:function(){return d},vl:function(){return u},xY:function(){return o},xr:function(){return s}});var r=n(79352),i=n(32421),a=n(95950);function s(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 o 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 u extends a.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class c extends a.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(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 l extends a.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class d extends a.G{constructor(e,{account:t,docsPath:n,chain:a,data:o,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){let y=s({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:void 0!==p&&`${(0,r.d)(p)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:u,gasPrice:void 0!==c&&`${(0,i.o)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,i.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.o)(d)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",y].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 f 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 h 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 p 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"})}}},29580:function(e,t,n){"use strict";n.d(t,{r:function(){return y}});var r=n(71878),i=n(39803),a=n(73222),s=n(39868),o=n(72619),u=n(94973),c=n(1475),l=n(30838),d=n(21693);function f(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,l.ly)(n,t)}var h=n(56728),p=n(90929);function y(e,t){let n="string"==typeof t?(0,h.nr)(t):t,y=(0,a.q)(n);if(0===(0,s.d)(n)&&e.length>0)throw new r.wb;if((0,s.d)(t)&&32>(0,s.d)(t))throw new r.xB({data:"string"==typeof t?t:(0,d.ci)(t),params:e,size:(0,s.d)(t)});let b=0,g=[];for(let t=0;t<e.length;++t){let n=e[t];y.setPosition(b);let[a,s]=function e(t,n,{staticPosition:a}){let s=(0,p.S)(n.type);if(s){let[r,i]=s;return function(t,n,{length:r,staticPosition:i}){if(!r){let r=f(t.readBytes(32)),a=i+r,s=a+32;t.setPosition(a);let o=f(t.readBytes(32)),u=m(n),c=0,l=[];for(let r=0;r<o;++r){t.setPosition(s+(u?32*r:c));let[i,a]=e(t,n,{staticPosition:s});c+=a,l.push(i)}return t.setPosition(i+32),[l,32]}if(m(n)){let a=f(t.readBytes(32)),s=i+a,o=[];for(let i=0;i<r;++i){t.setPosition(s+32*i);let[r]=e(t,n,{staticPosition:s});o.push(r)}return t.setPosition(i+32),[o,32]}let a=0,s=[];for(let o=0;o<r;++o){let[r,o]=e(t,n,{staticPosition:i+a});a+=o,s.push(r)}return[s,a]}(t,{...n,type:i},{length:r,staticPosition:a})}if("tuple"===n.type)return function(t,n,{staticPosition:r}){let i=0===n.components.length||n.components.some(({name:e})=>!e),a=i?[]:{},s=0;if(m(n)){let o=f(t.readBytes(32)),u=r+o;for(let r=0;r<n.components.length;++r){let o=n.components[r];t.setPosition(u+s);let[c,l]=e(t,o,{staticPosition:u});s+=l,a[i?r:o?.name]=c}return t.setPosition(r+32),[a,32]}for(let o=0;o<n.components.length;++o){let u=n.components[o],[c,l]=e(t,u,{staticPosition:r});a[i?o:u?.name]=c,s+=l}return[a,s]}(t,n,{staticPosition:a});if("address"===n.type)return function(e){let t=e.readBytes(32);return[(0,i.x)((0,d.ci)((0,o.T4)(t,-20))),32]}(t);if("bool"===n.type)return[function(e,t={}){let n=e;if(void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,u.f)(n)),n.length>1||n[0]>1)throw new c.yr(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(n.type.startsWith("bytes"))return function(e,t,{staticPosition:n}){let[r,i]=t.type.split("bytes");if(!i){let t=f(e.readBytes(32));e.setPosition(n+t);let r=f(e.readBytes(32));if(0===r)return e.setPosition(n+32),["0x",32];let i=e.readBytes(r);return e.setPosition(n+32),[(0,d.ci)(i),32]}let a=(0,d.ci)(e.readBytes(parseInt(i),32));return[a,32]}(t,n,{staticPosition:a});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[r>48?function(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,d.ci)(e,t);return(0,l.y_)(n,t)}(i,{signed:n}):f(i,{signed:n}),32]}(t,n);if("string"===n.type)return function(e,{staticPosition:t}){let n=f(e.readBytes(32));e.setPosition(t+n);let r=f(e.readBytes(32));if(0===r)return e.setPosition(t+32),["",32];let i=e.readBytes(r,32),a=function(e,t={}){let n=e;return void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,u.f)(n,{dir:"right"})),new TextDecoder().decode(n)}((0,u.f)(i));return e.setPosition(t+32),[a,32]}(t,{staticPosition:a});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(y,n,{staticPosition:0});b+=s,g.push(a)}return g}function m(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(m);let n=(0,p.S)(e.type);return!!(n&&m({...e,type:n[1]}))}},49039:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(28483),i=n(71878),a=n(72619),s=n(65634),o=n(29580),u=n(40928);function c(e){let{abi:t,data:n}=e,c=(0,a.tP)(n,0,4);if("0x"===c)throw new i.wb;let l=[...t||[],r.Up,r.hZ],d=l.find(e=>"error"===e.type&&c===(0,s.C)((0,u.t)(e)));if(!d)throw new i.yP(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:d,args:"inputs"in d&&d.inputs&&d.inputs.length>0?(0,o.r)(d.inputs,(0,a.tP)(n,4)):void 0,errorName:d.name}}},63610:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var r=n(71878),i=n(39868),a=n(40959),s=n(99851),o=n(29580),u=n(40928);let c="/docs/contract/decodeEventLog";function l(e){let{abi:t,data:n,strict:l,topics:d}=e,f=l??!0,[h,...p]=d;if(!h)throw new r.FM({docsPath:c});let y=t.find(e=>"event"===e.type&&h===(0,a.n)((0,u.t)(e)));if(!(y&&"name"in y)||"event"!==y.type)throw new r.lC(h,{docsPath:c});let{name:m,inputs:b}=y,g=b?.some(e=>!("name"in e&&e.name)),v=g?[]:{},w=b.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e<w.length;e++){let t=w[e],n=p[e];if(!n)throw new r.Gy({abiItem:y,param:t});v[t.name||e]=function({param:e,value:t}){if("string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))return t;let n=(0,o.r)([e],t)||[];return n[0]}({param:t,value:n})}let C=b.filter(e=>!("indexed"in e&&e.indexed));if(C.length>0){if(n&&"0x"!==n)try{let e=(0,o.r)(C,n);if(e){if(g)v=[...v,...e];else for(let t=0;t<C.length;t++)v[C[t].name]=e[t]}}catch(e){if(f){if(e instanceof r.xB||e instanceof s.lQ)throw new r.SM({abiItem:y,data:n,params:C,size:(0,i.d)(n)});throw e}}else if(f)throw new r.SM({abiItem:y,data:"0x",params:C,size:0})}return{eventName:m,args:Object.values(v).length>0?v:void 0}}},3458:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(71878),i=n(29580),a=n(77804);let s="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:n,functionName:o,data:u}=e,c=t[0];if(o){let e=(0,a.mE)({abi:t,args:n,name:o});if(!e)throw new r.xL(o,{docsPath:s});c=e}if("function"!==c.type)throw new r.xL(void 0,{docsPath:s});if(!c.outputs)throw new r.MX(c.name,{docsPath:s});let l=(0,i.r)(c.outputs,u);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},90929:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return h}});var r=n(71878),i=n(21485),a=n(87364),s=n(69809),o=n(99725),u=n(39868),c=n(72619),l=n(21693);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=function({params:e,values:t}){let n=[];for(let d=0;d<e.length;d++)n.push(function e({param:t,value:n}){let d=h(t.type);if(d){let[i,a]=d;return function(t,{length:n,param:i}){let a=null===n;if(!Array.isArray(t))throw new r.hn(t);if(!a&&t.length!==n)throw new r.gr({expectedLength:n,givenLength:t.length,type:`${i.type}[${n}]`});let o=!1,u=[];for(let n=0;n<t.length;n++){let r=e({param:i,value:t[n]});r.dynamic&&(o=!0),u.push(r)}if(a||o){let e=f(u);if(a){let t=(0,l.eC)(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?(0,s.zo)([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.zo)(u.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;a<n.components.length;a++){let s=n.components[a],o=Array.isArray(t)?a:s.name,u=e({param:s,value:t[o]});i.push(u),u.dynamic&&(r=!0)}return{dynamic:r,encoded:r?f(i):(0,s.zo)(i.map(({encoded:e})=>e))}}(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,o.gc)(e.toLowerCase())}}(n);if("bool"===t.type)return{dynamic:!1,encoded:(0,o.gc)((0,l.C4)(n))};if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int");return function(e,{signed:t}){return{dynamic:!1,encoded:(0,l.eC)(e,{size:32,signed:t})}}(n,{signed:e})}if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,n]=t.type.split("bytes"),i=(0,u.d)(e);if(!n){let t=e;return i%32!=0&&(t=(0,o.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,s.zo)([(0,o.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,o.gc)(e,{dir:"right"})}}(n,{param:t});if("string"===t.type)return function(e){let t=(0,l.$G)(e),n=Math.ceil((0,u.d)(t)/32),r=[];for(let e=0;e<n;e++)r.push((0,o.gc)((0,c.tP)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.zo)([(0,o.gc)((0,l.eC)((0,u.d)(t),{size:32})),...r])}}(n);throw new r.dh(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[d],value:t[d]}));return n}({params:e,values:t}),d=f(n);return 0===d.length?"0x":d}function f(e){let t=0;for(let n=0;n<e.length;n++){let{dynamic:r,encoded:i}=e[n];r?t+=32:t+=(0,u.d)(i)}let n=[],r=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:o}=e[a];s?(n.push((0,l.eC)(t+i,{size:32})),r.push(o),i+=(0,u.d)(o)):n.push(o)}return(0,s.zo)([...n,...r])}function h(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},12732:function(e,t,n){"use strict";n.d(t,{w:function(){return o}});var r=n(71878),i=n(69809),a=n(90929);let s="/docs/contract/encodeDeployData";function o(e){let{abi:t,args:n,bytecode:o}=e;if(!n||0===n.length)return o;let u=t.find(e=>"type"in e&&"constructor"===e.type);if(!u)throw new r.fM({docsPath:s});if(!("inputs"in u)||!u.inputs||0===u.inputs.length)throw new r.cO({docsPath:s});let c=(0,a.E)(u.inputs,n);return(0,i.SM)([o,c])}},38789:function(e,t,n){"use strict";n.d(t,{O:function(){return h}});var r=n(71878),i=n(95950);class a extends i.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var s=n(56728),o=n(55852),u=n(40959),c=n(90929),l=n(40928),d=n(77804);let f="/docs/contract/encodeEventTopics";function h(e){let{abi:t,eventName:n,args:i}=e,a=t[0];if(n){let e=(0,d.mE)({abi:t,name:n});if(!e)throw new r.mv(n,{docsPath:f});a=e}if("event"!==a.type)throw new r.mv(void 0,{docsPath:f});let s=(0,l.t)(a),o=(0,u.n)(s),c=[];if(i&&"inputs"in a){let e=a.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(i)?i:Object.values(i).length>0?e?.map(e=>i[e.name])??[]:[];t.length>0&&(c=e?.map((e,n)=>Array.isArray(t[n])?t[n].map((r,i)=>p({param:e,value:t[n][i]})):t[n]?p({param:e,value:t[n]}):null)??[])}return[o,...c]}function p({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,o.w)((0,s.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new a(e.type);return(0,c.E)([e],[t])}},53883:function(e,t,n){"use strict";n.d(t,{R:function(){return l}});var r=n(71878),i=n(69809),a=n(65634),s=n(90929),o=n(40928),u=n(77804);let c="/docs/contract/encodeFunctionData";function l(e){let{abi:t,args:n,functionName:l}=e,d=t[0];if(l){let e=(0,u.mE)({abi:t,args:n,name:l});if(!e)throw new r.xL(l,{docsPath:c});d=e}if("function"!==d.type)throw new r.xL(void 0,{docsPath:c});let f=(0,o.t)(d),h=(0,a.C)(f),p="inputs"in d&&d.inputs?(0,s.E)(d.inputs,n??[]):void 0;return(0,i.SM)([h,p??"0x"])}},40928:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return i}});var r=n(71878);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?", ":","):""}},77804:function(e,t,n){"use strict";n.d(t,{mE:function(){return u}});var r=n(71878),i=n(45008),a=n(87364),s=n(40959),o=n(65634);function u(e){let t;let{abi:n,args:u=[],name:c}=e,l=(0,i.v)(c,{strict:!1}),d=n.filter(e=>l?"function"===e.type?(0,o.C)(e)===c:"event"===e.type&&(0,s.n)(e)===c:"name"in e&&e.name===c);if(0!==d.length){if(1===d.length)return d[0];for(let e of d){if(!("inputs"in e))continue;if(!u||0===u.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(!e.inputs||0===e.inputs.length||e.inputs.length!==u.length)continue;let n=u.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,a.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(n){if(t&&"inputs"in t&&t.inputs){let n=function e(t,n,r){for(let i in t){let s=t[i],o=n[i];if("tuple"===s.type&&"tuple"===o.type&&"components"in s&&"components"in o)return e(s.components,o.components,r[i]);let u=[s.type,o.type],c=!!(u.includes("address")&&u.includes("bytes20"))||!!(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&(0,a.U)(r[i]);if(c)return u}}(e.inputs,t.inputs,u);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:t,type:n[1]})}t=e}}return t||d[0]}}},48751:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var r=n(71878),i=n(63610);function a({abi:e,eventName:t,logs:n,strict:a=!0}){return n.map(n=>{try{let r=(0,i.F)({...n,abi:e,strict:a});if(t&&!t.includes(r.eventName))return null;return{...r,...n}}catch(i){let e,t;if(i instanceof r.lC)return null;if(i instanceof r.SM||i instanceof r.Gy){if(a)return null;e=i.abiItem.name,t=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...n,args:t?[]:{},eventName:e}}}).filter(Boolean)}},64305:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(27878);function i({chain:e,currentChainId:t}){if(!e)throw new r.Bk;if(t!==e.id)throw new r.Yl({chain:e,currentChainId:t})}},71186:function(e,t,n){"use strict";function r(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}n.d(t,{a:function(){return r}})},94540:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(27878);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}},73222:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});var r=n(99851);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new r.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new r.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function a(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(i);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},69809: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}})},72619:function(e,t,n){"use strict";n.d(t,{T4:function(){return c},tP:function(){return s}});var r=n(741),i=n(45008),a=n(39868);function s(e,t,n,{strict:r}={}){return(0,i.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&u(i,t,n),i}(e,t,n,{strict:r}):c(e,t,n,{strict:r})}function o(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 u(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)})}function c(e,t,n,{strict:r}={}){o(e,t);let i=e.slice(t,n);return r&&u(i,t,n),i}},581:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(45008);function i(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,r.v)(t)?t:null}},87815:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var r=n(28483),i=n(95950),a=n(98458);function s(e,t){if(!(e instanceof i.G))return!1;let n=e.walk(e=>e instanceof a.Lu);return n instanceof a.Lu&&(!!(n.data?.errorName==="ResolverNotFound"||n.data?.errorName==="ResolverWildcardNotSupported"||n.data?.errorName==="ResolverNotContract"||n.data?.errorName==="ResolverError"||n.data?.errorName==="HttpError"||n.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&n.reason===r.$[50])}},87332:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var r=n(69809),i=n(56728),a=n(21693),s=n(55852),o=n(581);function u(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.ci)(t);let n=e.split(".");for(let e=n.length-1;e>=0;e-=1){let a=(0,o.i)(n[e]),u=a?(0,i.O0)(a):(0,s.w)((0,i.qX)(n[e]),"bytes");t=(0,s.w)((0,r.zo)([t,u]),"bytes")}return(0,a.ci)(t)}},66257:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var r=n(56728),i=n(21693),a=n(55852),s=n(581);function o(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let n=new Uint8Array((0,r.qX)(t).byteLength+2),o=0,u=t.split(".");for(let e=0;e<u.length;e++){let t=(0,r.qX)(u[e]);if(t.byteLength>255){var c;t=(0,r.qX)((c=function(e){let t=new Uint8Array(32).fill(0);return e?(0,s.i)(e)||(0,a.w)((0,r.qX)(e)):(0,i.ci)(t)}(u[e]),`[${c.slice(2)}]`))}n[o]=t.length,n.set(t,o+1),o+=t.length+1}return n.byteLength!==o+1?n.slice(0,o+1):n}},65573:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(71878),i=n(95950),a=n(98458),s=n(48519);function o(e,{abi:t,address:n,args:o,docsPath:u,functionName:c,sender:l}){let{code:d,data:f,message:h,shortMessage:p}=e instanceof a.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},y=e instanceof r.wb?new a.Dk({functionName:c}):[3,s.XS.code].includes(d)&&(f||h||p)?new a.Lu({abi:t,data:"object"==typeof f?f.data:f,functionName:c,message:p??h}):e;return new a.uq(y,{abi:t,args:o,contractAddress:n,docsPath:u,functionName:c,sender:l})}},36074:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(95950),i=n(40009);function a(e,t){let n=(e.details||"").toLowerCase(),a=e instanceof r.G?e.walk(e=>e.code===i.M_.code):e;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})}},96157:function(e,t,n){"use strict";function r(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}n.d(t,{g:function(){return r}})},78723:function(e,t,n){"use strict";n.d(t,{G:function(){return s},Z:function(){return a}});var r=n(76471),i=n(52017);function a(e){let t=e.transactions?.map(e=>"string"==typeof e?e:i.Tr(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):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}}let s=(0,r.$)("block",a)},21028:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};let n={},r=t(e||{});return!function t(r){let i=Object.keys(r);for(let a of i)a in e&&(n[a]=e[a]),r[a]&&"object"==typeof r[a]&&!Array.isArray(r[a])&&t(r[a])}(r),n}n.d(t,{K:function(){return r}})},76471:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{let i=t(e);if(n)for(let e of n)delete i[e];return{...i,...r(e)}},type:e})}n.d(t,{$:function(){return r}})},18457:function(e,t,n){"use strict";function r(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}:{}}}n.d(t,{U:function(){return r}})},52017:function(e,t,n){"use strict";n.d(t,{Tr:function(){return s},c8:function(){return a},y_:function(){return o}});var r=n(30838),i=n(76471);let a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function s(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,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):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?a[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.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let o=(0,i.$)("transaction",s)},3324:function(e,t,n){"use strict";n.d(t,{d:function(){return c},f:function(){return u}});var r=n(30838),i=n(76471),a=n(18457),s=n(52017);let o={"0x0":"reverted","0x1":"success"};function u(e){let t={...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=>(0,a.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?o[e.status]:null,type:e.type?s.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}let c=(0,i.$)("transactionReceipt",u)},86868:function(e,t,n){"use strict";n.d(t,{tG:function(){return a}});var r=n(21693);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};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}}},82600: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}})},40959:function(e,t,n){"use strict";n.d(t,{n:function(){return i}});var r=n(20497);let i=r.r},65634:function(e,t,n){"use strict";n.d(t,{C:function(){return a}});var r=n(72619),i=n(20497);let a=e=>(0,r.tP)((0,i.r)(e),0,4)},20497:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(56728),i=n(55852);let a=e=>(0,i.w)((0,r.O0)(e)),s=/^tuple(?<array>(\[(\d*)\])*)$/;function o(e){let t="",n=e.length;for(let r=0;r<n;r++){let i=e[r];t+=function e(t){let n=t.type;if(s.test(t.type)&&"components"in t){n="(";let r=t.components.length;for(let i=0;i<r;i++){let a=t.components[i];n+=e(a),i<r-1&&(n+=", ")}let i=function(e,t){let n=e.exec(t);return n?.groups}(s,t.type);return n+=`)${i?.array??""}`,e({...t,type:n})}return("indexed"in t&&t.indexed&&(n=`${n} indexed`),t.name)?`${n} ${t.name}`:n}(i),r!==n-1&&(t+=", ")}return t}var u=n(95950);let c=e=>{var t;let n="string"==typeof e?e:"function"===(t=e).type?`function ${t.name}(${o(t.inputs)})${t.stateMutability&&"nonpayable"!==t.stateMutability?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${o(t.outputs)})`:""}`:"event"===t.type?`event ${t.name}(${o(t.inputs)})`:"error"===t.type?`error ${t.name}(${o(t.inputs)})`:"constructor"===t.type?`constructor(${o(t.inputs)})${"payable"===t.stateMutability?" payable":""}`:"fallback"===t.type?"fallback()":"receive() external payable";return function(e){let t=!0,n="",r=0,i="",a=!1;for(let s=0;s<e.length;s++){let o=e[s];if(["(",")",","].includes(o)&&(t=!0),"("===o&&r++,")"===o&&r--,t){if(0===r){if(" "===o&&["event","function",""].includes(i))i="";else if(i+=o,")"===o){a=!0;break}continue}if(" "===o){","!==e[s-1]&&","!==n&&",("!==n&&(n="",t=!1);continue}i+=o,n+=o}}if(!a)throw new u.G("Unable to normalize signature.");return i}(n)};function l(e){return a(c(e))}},87162:function(e,t,n){"use strict";n.d(t,{N7:function(){return s}});let r=new Map,i=new Map,a=0;function s(e,t,n){let s=++a,o=()=>r.get(e)||[],u=()=>{let t=o();r.set(e,t.filter(e=>e.id!==s))},c=()=>{let t=i.get(e);1===o().length&&t&&t(),u()},l=o();if(r.set(e,[...l,{id:s,fns:t}]),l&&l.length>0)return c;let d={};for(let e in t)d[e]=(...t)=>{let n=o();if(0!==n.length)for(let r of n)r.fns[e]?.(...t)};let f=n(d);return"function"==typeof f&&i.set(e,f),c}},62468:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(21810);function i(e,{emitOnBegin:t,initialWaitTime:n,interval:i}){let a=!0,s=()=>a=!1,o=async()=>{let o;t&&(o=await e({unpoll:s}));let u=await n?.(o)??i;await (0,r.D)(u);let c=async()=>{a&&(await e({unpoll:s}),await (0,r.D)(i),c())};c()};return o(),s}},33668: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 s=async()=>{let t=c();o();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<t.length;n++){let{pendingPromise:r}=t[n];r.resolve?.([e[n],e])}}).catch(e=>{for(let n=0;n<t.length;n++){let{pendingPromise:r}=t[n];r.reject?.(e)}})},o=()=>r.delete(t),u=()=>c().map(({args:e})=>e),c=()=>r.get(t)||[],l=e=>r.set(t,[...c(),e]);return{flush:o,async schedule(e){let t={},r=new Promise((e,n)=>{t.resolve=e,t.reject=n}),a=n?.([...u(),e]);a&&s();let o=c().length>0;return o?l({args:e,pendingPromise:t}):(l({args:e,pendingPromise:t}),setTimeout(s,i)),r}}}},2445:function(e,t,n){"use strict";n.d(t,{F:function(){return u}});var r=n(4832),i=n(21485),a=n(40009),s=n(44818),o=n(87364);function u(e){let{account:t,gasPrice:n,maxFeePerGas:u,maxPriorityFeePerGas:c,to:l}=e,d=t?(0,r.T)(t):void 0;if(d&&!(0,o.U)(d.address))throw new i.b({address:d.address});if(l&&!(0,o.U)(l))throw new i.b({address:l});if(void 0!==n&&(void 0!==u||void 0!==c))throw new s.xY;if(u&&u>2n**256n-1n)throw new a.Hh({maxFeePerGas:u});if(c&&u&&c>u)throw new a.cs({maxFeePerGas:u,maxPriorityFeePerGas:c})}},74714:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(44818);function i(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 r.j3({transaction:e})}},29578:function(e,t,n){"use strict";n.d(t,{cj:function(){return d},iC:function(){return l}});var r=n(71878),i=n(21485),a=n(87364),s=n(39868),o=n(21693);let u=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,c=/^(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(e){let{domain:t,message:n,primaryType:l,types:d}=e,f=(e,t)=>{for(let n of e){let{name:e,type:l}=n,h=t[e],p=l.match(c);if(p&&("number"==typeof h||"bigint"==typeof h)){let[e,t,n]=p;(0,o.eC)(h,{signed:"int"===t,size:parseInt(n)/8})}if("address"===l&&"string"==typeof h&&!(0,a.U)(h))throw new i.b({address:h});let y=l.match(u);if(y){let[e,t]=y;if(t&&(0,s.d)(h)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,s.d)(h)})}let m=d[l];m&&f(m,h)}};if(d.EIP712Domain&&t&&f(d.EIP712Domain,t),"EIP712Domain"!==l){let e=d[l];f(e,n)}}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)}},79352:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(36238),i=n(16775);function a(e,t="wei"){return(0,i.b)(e,r.ez[t])}},32421:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(36238),i=n(16775);function a(e,t="wei"){return(0,i.b)(e,r.Zn[t])}},16775: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}})},33844:function(e,t,n){"use strict";n.r(t),n.d(t,{useAccountEffect:function(){return s}});var r=n(10815),i=n(2265),a=n(41012);function s(e={}){let{onConnect:t,onDisconnect:n}=e,s=(0,a.useConfig)(e);(0,i.useEffect)(()=>(0,r.u)(s,{onChange(e,r){if(("reconnecting"===r.status||"connecting"===r.status&&void 0===r.address)&&"connected"===e.status){let{address:n,addresses:i,chain:a,chainId:s,connector:o}=e,u="reconnecting"===r.status||void 0===r.status;t?.({address:n,addresses:i,chain:a,chainId:s,connector:o,isReconnected:u})}else"connected"===r.status&&"disconnected"===e.status&&n?.()}}),[s,t,n])}},93428:function(e,t,n){"use strict";n.r(t),n.d(t,{useBalance:function(){return b}});var r=n(98458),i=n(30838),a=n(94973),s=n(16775),o=n(53002),u=n(46981),c=n(57161),l=n(94727);async function d(e,t){let{address:n,blockNumber:l,blockTag:d,chainId:h,token:p,unit:y="ether"}=t;if(p)try{return f(e,{balanceAddress:n,chainId:h,symbolType:"string",tokenAddress:p})}catch(t){if(t instanceof r.uq){let t=await f(e,{balanceAddress:n,chainId:h,symbolType:"bytes32",tokenAddress:p}),r=(0,i.rR)((0,a.f)(t.symbol,{dir:"right"}));return{...t,symbol:r}}throw t}let m=e.getClient({chainId:h}),b=(0,u.s)(m,o.s,"getBalance"),g=await b(l?{address:n,blockNumber:l}:{address:n,blockTag:d}),v=e.chains.find(e=>e.id===h)??m.chain;return{decimals:v.nativeCurrency.decimals,formatted:(0,s.b)(g,(0,c.W)(y)),symbol:v.nativeCurrency.symbol,value:g}}async function f(e,t){let{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:a,unit:o}=t,u={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:a},[d,f,h]=await (0,l.J)(e,{allowFailure:!1,contracts:[{...u,functionName:"balanceOf",args:[n],chainId:r},{...u,functionName:"decimals",chainId:r},{...u,functionName:"symbol",chainId:r}]}),p=(0,s.b)(d??"0",(0,c.W)(o??f));return{decimals:f,formatted:p,symbol:h,value:d}}var h=n(21637),p=n(26088),y=n(6613),m=n(41012);function b(e={}){let{address:t,query:n={}}=e,r=(0,m.useConfig)(e),i=(0,y.useChainId)(),a=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:r,...i}=t[1];if(!n)throw Error("address is required");let a=await d(e,{...i,address:n});return a??null},queryKey:function(e={}){return["balance",(0,h.O)(e)]}(t)}}(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return(0,p.aM)({...n,...a,enabled:s})}},18428:function(e,t,n){"use strict";n.r(t),n.d(t,{useBlock:function(){return f}});var r=n(38038),i=n(3891),a=n(46981);async function s(e,t={}){let{chainId:n,...r}=t,s=e.getClient({chainId:n}),o=(0,a.s)(s,i.Q,"getBlock"),u=await o(r);return{...u,chainId:s.chain.id}}var o=n(21637),u=n(26088),c=n(6613),l=n(41012),d=n(84904);function f(e={}){let{query:t={},watch:n}=e,i=(0,l.useConfig)(e),a=(0,r.NL)(),f=(0,c.useChainId)(),h=e.chainId??f,p=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1],i=await s(e,r);return i??null},queryKey:function(e={}){return["block",(0,o.O)(e)]}(t)}}(i,{...e,chainId:h}),y=!!(t.enabled??!0);return(0,d.useWatchBlocks)({...{config:e.config,chainId:e.chainId,..."object"==typeof n?n:{}},enabled:!!(y&&("object"==typeof n?n.enabled:n)),onBlock(e){a.setQueryData(p.queryKey,e)}}),(0,u.aM)({...t,...p,enabled:y})}},97126:function(e,t,n){"use strict";n.r(t),n.d(t,{useBlockNumber:function(){return d}});var r=n(38038),i=n(15552),a=n(46981),s=n(21637),o=n(26088),u=n(6613),c=n(41012),l=n(11464);function d(e={}){let{query:t={},watch:n}=e,d=(0,c.useConfig)(e),f=(0,r.NL)(),h=(0,u.useChainId)(),p=e.chainId??h,y=function(e,t={}){return{gcTime:0,async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1],s=await function(e,t={}){let{chainId:n,...r}=t,s=e.getClient({chainId:n}),o=(0,a.s)(s,i.z,"getBlockNumber");return o(r)}(e,r);return s??null},queryKey:function(e={}){return["blockNumber",(0,s.O)(e)]}(t)}}(d,{...e,chainId:p});return(0,l.useWatchBlockNumber)({...{config:e.config,chainId:e.chainId,..."object"==typeof n?n:{}},enabled:!!((t.enabled??!0)&&("object"==typeof n?n.enabled:n)),onBlockNumber(e){f.setQueryData(y.queryKey,e)}}),(0,o.aM)({...t,...y})}},39810:function(e,t,n){"use strict";n.r(t),n.d(t,{useBlockTransactionCount:function(){return c}});var r=n(80852),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{query:t={}}=e,n=(0,u.useConfig)(e),c=(0,o.useChainId)(),l=e.chainId??c,d=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...a}=t[1],s=await function(e,t={}){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.c,"getBlockTransactionCount");return o(a)}(e,a);return s??null},queryKey:function(e={}){return["blockTransactionCount",(0,a.O)(e)]}(t)}}(n,{...e,chainId:l});return(0,s.aM)({...t,...d})}},46867:function(e,t,n){"use strict";n.r(t),n.d(t,{useBytecode:function(){return l}});var r=n(43661),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.c,"getBytecode");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,query:n={}}=e,r=(0,c.useConfig)(e),i=(0,u.useChainId)(),l=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:r,...i}=t[1];if(!n)throw Error("address is required");let s=await a(e,{...i,address:n});return s??null},queryKey:["getBytecode",(0,s.O)(t)]}}(r,{...e,chainId:e.chainId??i}),d=!!(t&&(n.enabled??!0));return(0,o.aM)({...n,...l,enabled:d})}},1134:function(e,t,n){"use strict";n.r(t),n.d(t,{useCall:function(){return l}});var r=n(98873),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.R,"call");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{query:t={}}=e,n=(0,c.useConfig)(e),r=(0,u.useChainId)(),i=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1],i=await a(e,{...r});return i??null},queryKey:["call",(0,s.O)(t)]}}(n,{...e,chainId:e.chainId??r});return(0,o.aM)({...t,...i})}},6613:function(e,t,n){"use strict";function r(e){return e.state.chainId}n.r(t),n.d(t,{useChainId:function(){return s}});var i=n(2265),a=n(41012);function s(e={}){let t=(0,a.useConfig)(e);return(0,i.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(e=>e.chainId,n)})(t,{onChange:e}),()=>r(t),()=>r(t))}},47337:function(e,t,n){"use strict";n.r(t),n.d(t,{useClient:function(){return s}});var r=n(11181),i=n(65401),a=n(41012);function s(e={}){let t=(0,a.useConfig)(e);return(0,i.useSyncExternalStoreWithSelector)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>(0,r.s)(e),n,{equalityFn:(e,t)=>e?.uid===t?.uid})})(t,{onChange:e}),()=>(0,r.s)(t,e),()=>(0,r.s)(t,e),e=>e,(e,t)=>e?.uid===t?.uid)}},820:function(e,t,n){"use strict";n.r(t),n.d(t,{useConnections:function(){return u}});var r=n(48369);let i=[];function a(e){let t=[...e.state.connections.values()];return"reconnecting"===e.state.status||(0,r.v)(i,t)?i:(i=t,t)}var s=n(2265),o=n(41012);function u(e={}){let t=(0,o.useConfig)(e);return(0,s.useSyncExternalStore)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>a(e),n,{equalityFn:r.v})})(t,{onChange:e}),()=>a(t),()=>a(t))}},15642:function(e,t,n){"use strict";n.r(t),n.d(t,{useConnectorClient:function(){return d}});var r=n(38038),i=n(71660),a=n(21637),s=n(2265),o=n(26088),u=n(79037),c=n(6613),l=n(41012);function d(e={}){let{query:t={}}=e,n=(0,l.useConfig)(e),d=(0,r.NL)(),{address:f,connector:h,status:p}=(0,u.useAccount)(),y=(0,c.useChainId)(),{queryKey:m,...b}=function(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){let{connector:r}=t,{connectorUid:a,scopeKey:s,...o}=n[1];return(0,i.e)(e,{...o,connector:r})},queryKey:function(e={}){let{connector:t,...n}=e;return["connectorClient",{...(0,a.O)(n),connectorUid:t?.uid}]}(t)}}(n,{...e,chainId:e.chainId??y,connector:e.connector??h}),g=!!("disconnected"!==p&&(t.enabled??!0));return(0,s.useEffect)(()=>{f?d.invalidateQueries({queryKey:m}):d.removeQueries({queryKey:m})},[f,d]),(0,o.aM)({...t,...b,queryKey:m,enabled:g,staleTime:1/0})}},23081:function(e,t,n){"use strict";n.r(t),n.d(t,{useDisconnect:function(){return o}});var r=n(23588);async function i(e,t={}){let n;if(t.connector)n=t.connector;else{let{connections:t,current:r}=e.state,i=t.get(r);n=i?.connector}let r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(e=>{if(0===r.size)return{...e,connections:new Map,current:void 0,status:"disconnected"};let t=r.values().next().value;return{...e,connections:new Map(r),current:t.connector.uid}});{let t=e.state.current;if(!t)return;let n=e.state.connections.get(t)?.connector;if(!n)return;await e.storage?.setItem("recentConnectorId",n.id)}}var a=n(41012),s=n(820);function o(e={}){let{mutation:t}=e,n=(0,a.useConfig)(e),{mutate:o,mutateAsync:u,...c}=(0,r.D)({...t,mutationFn:e=>i(n,e),mutationKey:["disconnect"]});return{...c,connectors:(0,s.useConnections)().map(e=>e.connector),disconnect:o,disconnectAsync:u}}},80009:function(e,t,n){"use strict";n.r(t),n.d(t,{useEnsAddress:function(){return c}});var r=n(67397),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{name:t,query:n={}}=e,c=(0,u.useConfig)(e),l=(0,o.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:t}){let{name:n,scopeKey:a,...s}=t[1];if(!n)throw Error("name is required");return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.O,"getEnsAddress");return o(a)}(e,{...s,name:n})},queryKey:function(e={}){return["ensAddress",(0,a.O)(e)]}(t)}}(c,{...e,chainId:e.chainId??l}),f=!!(t&&(n.enabled??!0));return(0,s.aM)({...n,...d,enabled:f})}},96554:function(e,t,n){"use strict";n.r(t),n.d(t,{useEnsAvatar:function(){return c}});var r=n(16470),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{name:t,query:n={}}=e,c=(0,u.useConfig)(e),l=(0,o.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:t}){let{name:n,scopeKey:a,...s}=t[1];if(!n)throw Error("name is required");return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.r,"getEnsAvatar");return o(a)}(e,{...s,name:n})},queryKey:function(e={}){return["ensAvatar",(0,a.O)(e)]}(t)}}(c,{...e,chainId:e.chainId??l}),f=!!(t&&(n.enabled??!0));return(0,s.aM)({...n,...d,enabled:f})}},61517:function(e,t,n){"use strict";n.r(t),n.d(t,{useEnsName:function(){return c}});var r=n(42557),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{address:t,query:n={}}=e,c=(0,u.useConfig)(e),l=(0,o.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:a,...s}=t[1];if(!n)throw Error("address is required");return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.w,"getEnsName");return o(a)}(e,{...s,address:n})},queryKey:function(e={}){return["ensName",(0,a.O)(e)]}(t)}}(c,{...e,chainId:e.chainId??l}),f=!!(t&&(n.enabled??!0));return(0,s.aM)({...n,...d,enabled:f})}},86793:function(e,t,n){"use strict";n.r(t),n.d(t,{useEnsResolver:function(){return c}});var r=n(26985),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{name:t,query:n={}}=e,c=(0,u.useConfig)(e),l=(0,o.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:t}){let{name:n,scopeKey:a,...s}=t[1];if(!n)throw Error("name is required");return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.S,"getEnsResolver");return o(a)}(e,{...s,name:n})},queryKey:function(e={}){return["ensResolver",(0,a.O)(e)]}(t)}}(c,{...e,chainId:e.chainId??l}),f=!!(t&&(n.enabled??!0));return(0,s.aM)({...n,...d,enabled:f})}},96925:function(e,t,n){"use strict";n.r(t),n.d(t,{useEnsText:function(){return c}});var r=n(35271),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{key:t,name:n,query:c={}}=e,l=(0,u.useConfig)(e),d=(0,o.useChainId)(),f=function(e,t={}){return{async queryFn({queryKey:t}){let{key:n,name:a,scopeKey:s,...o}=t[1];if(!n||!a)throw Error("key and name are required");return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.g,"getEnsText");return o(a)}(e,{...o,key:n,name:a})},queryKey:function(e={}){return["ensText",(0,a.O)(e)]}(t)}}(l,{...e,chainId:e.chainId??d}),h=!!(t&&n&&(c.enabled??!0));return(0,s.aM)({...c,...f,enabled:h})}},22798:function(e,t,n){"use strict";n.r(t),n.d(t,{useEstimateFeesPerGas:function(){return f}});var r=n(16775),i=n(77451),a=n(46981),s=n(57161);async function o(e,t={}){let{chainId:n,formatUnits:o="gwei",...u}=t,c=e.getClient({chainId:n}),l=(0,a.s)(c,i.X,"estimateFeesPerGas"),{gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h}=await l({...u,chain:c.chain}),p=(0,s.W)(o),y={gasPrice:d?(0,r.b)(d,p):void 0,maxFeePerGas:f?(0,r.b)(f,p):void 0,maxPriorityFeePerGas:h?(0,r.b)(h,p):void 0};return{formatted:y,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:h}}var u=n(21637),c=n(26088),l=n(6613),d=n(41012);function f(e={}){let{query:t={}}=e,n=(0,d.useConfig)(e),r=(0,l.useChainId)(),i=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1];return o(e,r)},queryKey:function(e={}){return["estimateFeesPerGas",(0,u.O)(e)]}(t)}}(n,{...e,chainId:e.chainId??r});return(0,c.aM)({...t,...i})}},23820:function(e,t,n){"use strict";n.r(t),n.d(t,{useEstimateGas:function(){return f}});var r=n(89412),i=n(46981),a=n(71660);async function s(e,t){let n;let{chainId:s,connector:o,...u}=t;if(t.account)n=t.account;else{let r=await (0,a.e)(e,{account:t.account,chainId:s,connector:o});n=r.account}let c=e.getClient({chainId:s}),l=(0,i.s)(c,r.Q,"estimateGas");return l({...u,account:n})}var o=n(21637),u=n(26088),c=n(6613),l=n(41012),d=n(15642);function f(e={}){let{connector:t,query:n={}}=e,r=(0,l.useConfig)(e),{data:i}=(0,d.useConnectorClient)({connector:t,query:{enabled:void 0===e.account}}),a=e.account??i?.account,f=(0,c.useChainId)(),h=function(e,t={}){return{async queryFn({queryKey:n}){let{connector:r}=t,{account:i,scopeKey:a,...o}=n[1];if(!i&&!r)throw Error("account or connector is required");return s(e,{account:i,connector:r,...o})},queryKey:function(e={}){let{connector:t,...n}=e;return["estimateGas",(0,o.O)(n)]}(t)}}(r,{...e,account:a,chainId:e.chainId??f,connector:t}),p=!!((a||t)&&(n.enabled??!0));return(0,u.aM)({...n,...h,enabled:p})}},89259:function(e,t,n){"use strict";n.r(t),n.d(t,{useEstimateMaxPriorityFeePerGas:function(){return l}});var r=n(17976),i=n(46981);async function a(e,t={}){let{chainId:n}=t,a=e.getClient({chainId:n}),s=(0,i.s)(a,r._,"estimateMaxPriorityFeePerGas");return s({chain:a.chain})}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{query:t={}}=e,n=(0,c.useConfig)(e),r=(0,u.useChainId)(),i=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1];return a(e,r)},queryKey:function(e={}){return["estimateMaxPriorityFeePerGas",(0,s.O)(e)]}(t)}}(n,{...e,chainId:e.chainId??r});return(0,o.aM)({...t,...i})}},12604:function(e,t,n){"use strict";n.r(t),n.d(t,{useFeeHistory:function(){return c}});var r=n(26841),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{blockCount:t,rewardPercentiles:n,query:c={}}=e,l=(0,u.useConfig)(e),d=(0,o.useChainId)(),f=function(e,t={}){return{async queryFn({queryKey:t}){let{blockCount:n,rewardPercentiles:a,scopeKey:s,...o}=t[1];if(!n)throw Error("blockCount is required");if(!a)throw Error("rewardPercentiles is required");let u=await function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.Z,"getFeeHistory");return o(a)}(e,{...o,blockCount:n,rewardPercentiles:a});return u??null},queryKey:function(e={}){return["feeHistory",(0,a.O)(e)]}(t)}}(l,{...e,chainId:e.chainId??d}),h=!!(t&&n&&(c.enabled??!0));return(0,s.aM)({...c,...f,enabled:h})}},97280:function(e,t,n){"use strict";n.r(t),n.d(t,{useGasPrice:function(){return c}});var r=n(75188),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{query:t={}}=e,n=(0,u.useConfig)(e),c=(0,o.useChainId)(),l=e.chainId??c,d=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:n,...a}=t[1],s=await function(e,t={}){let{chainId:n}=t,a=e.getClient({chainId:n}),s=(0,i.s)(a,r.o,"getGasPrice");return s({})}(e,a);return s??null},queryKey:function(e={}){return["gasPrice",(0,a.O)(e)]}(t)}}(n,{...e,chainId:l});return(0,s.aM)({...t,...d})}},92932:function(e,t,n){"use strict";n.r(t),n.d(t,{useInfiniteReadContracts:function(){return u}});var r=n(94727),i=n(21637),a=n(26088),s=n(6613),o=n(41012);function u(e){var t;let{contracts:n=[],query:u}=e,c=(0,o.useConfig)(e),l=(0,s.useChainId)(),d={...(t={...e,chainId:l,contracts:n,query:u}).query,async queryFn({pageParam:e,queryKey:n}){let{contracts:i}=t,{cacheKey:a,scopeKey:s,...o}=n[1];return await (0,r.J)(c,{...o,contracts:i(e)})},queryKey:function(e){let{contracts:t,query:n,...r}=e;return["infiniteReadContracts",(0,i.O)(r)]}(t)};return(0,a.NS)({...u,...d,initialPageParam:d.initialPageParam,structuralSharing:u.structuralSharing??a.if})}},70193:function(e,t,n){"use strict";n.r(t),n.d(t,{usePrepareTransactionRequest:function(){return d}});var r=n(21765),i=n(46981),a=n(71660);async function s(e,t){let n;let{account:s,chainId:o,connector:u,...c}=t;n="object"==typeof s&&"local"===s.type?e.getClient({chainId:o}):await (0,a.e)(e,{account:s,chainId:o,connector:u});let l=(0,i.s)(n,r.Z,"prepareTransactionRequest");return l({...c,...s?{account:s}:{}})}var o=n(21637),u=n(26088),c=n(6613),l=n(41012);function d(e={}){let{to:t,query:n={}}=e,r=(0,l.useConfig)(e),i=(0,c.useChainId)(),a=function(e,t={}){return{queryFn({queryKey:t}){let{scopeKey:n,to:r,...i}=t[1];if(!r)throw Error("to is required");return s(e,{to:r,...i})},queryKey:function(e){let{connector:t,...n}=e;return["prepareTransactionRequest",(0,o.O)(n)]}(t)}}(r,{...e,chainId:e.chainId??i}),d=!!(t&&(n.enabled??!0));return(0,u.aM)({...n,...a,enabled:d})}},1010:function(e,t,n){"use strict";n.r(t),n.d(t,{useProof:function(){return l}});var r=n(49361),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.S,"getProof");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,storageKeys:n,query:r={}}=e,i=(0,c.useConfig)(e),l=(0,u.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:r,storageKeys:i,...s}=t[1];if(!n||!i)throw Error("address and storageKeys are required");return a(e,{...s,address:n,storageKeys:i})},queryKey:["getProof",(0,s.O)(t)]}}(i,{...e,chainId:e.chainId??l}),f=!!(t&&n&&(r.enabled??!0));return(0,o.aM)({...r,...d,enabled:f})}},24037:function(e,t,n){"use strict";n.r(t),n.d(t,{usePublicClient:function(){return ep}});var r=n(67397),i=n(16470),a=n(42557),s=n(26985),o=n(35271),u=n(98873),c=n(96157);async function l(e){let t=(0,c.g)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}var d=n(77096),f=n(38789),h=n(21693);async function p(e,{address:t,args:n,event:r,events:i,fromBlock:a,strict:s,toBlock:o}={}){let u=i??(r?[r]:void 0),l=(0,c.g)(e,{method:"eth_newFilter"}),d=[];u&&(d=[u.flatMap(e=>(0,f.O)({abi:[e],eventName:e.name,args:n}))],r&&(d=d[0]));let p=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,h.eC)(a):a,toBlock:"bigint"==typeof o?(0,h.eC)(o):o,...d.length?{topics:d}:{}}]});return{abi:u,args:n,eventName:r?r.name:void 0,fromBlock:a,id:p,request:l(p),strict:!!s,toBlock:o,type:"event"}}var y=n(46280),m=n(4832),b=n(53883),g=n(65573),v=n(82600),w=n(89412);async function C(e,t){let{abi:n,address:r,args:i,functionName:a,...s}=t,o=(0,b.R)({abi:n,args:i,functionName:a});try{let t=await (0,v.s)(e,w.Q,"estimateGas")({data:o,to:r,...s});return t}catch(t){let e=s.account?(0,m.T)(s.account):void 0;throw(0,g.S)(t,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:e?.address})}}var P=n(77451),x=n(17976),I=n(53002),F=n(3891),O=n(15552),E=n(80852),q=n(43661),T=n(13438),k=n(30120),S=n(26841),R=n(53138),$=n(48751),G=n(18457);async function M(e,{filter:t}){let n=t.strict??!1,r=await t.request({method:"eth_getFilterLogs",params:[t.id]}),i=r.map(e=>(0,G.U)(e));return t.abi?(0,$.h)({abi:t.abi,logs:i,strict:n}):i}var N=n(75188),B=n(31801),A=n(49361),_=n(97952),j=n(37498),U=n(64356),D=n(31742),K=n(34843),L=n(73105),Q=n(65459),z=n(9031),H=n(81621),W=n(18285),Z=n(52558),V=n(31764),J=n(63928),Y=n(58854),X=n(40457),ee=n(87162),et=n(62468),en=n(71891),er=n(71878),ei=n(48519),ea=n(63610),es=n(48176),eo=n(21765),eu=n(73971);function ec(e){return{call:t=>(0,u.R)(e,t),createBlockFilter:()=>l(e),createContractEventFilter:t=>(0,d.A)(e,t),createEventFilter:t=>p(e,t),createPendingTransactionFilter:()=>(0,y.W)(e),estimateContractGas:t=>C(e,t),estimateGas:t=>(0,w.Q)(e,t),getBalance:t=>(0,I.s)(e,t),getBlock:t=>(0,F.Q)(e,t),getBlockNumber:t=>(0,O.z)(e,t),getBlockTransactionCount:t=>(0,E.c)(e,t),getBytecode:t=>(0,q.c)(e,t),getChainId:()=>(0,T.L)(e),getContractEvents:t=>(0,k.m)(e,t),getEnsAddress:t=>(0,r.O)(e,t),getEnsAvatar:t=>(0,i.r)(e,t),getEnsName:t=>(0,a.w)(e,t),getEnsResolver:t=>(0,s.S)(e,t),getEnsText:t=>(0,o.g)(e,t),getFeeHistory:t=>(0,S.Z)(e,t),estimateFeesPerGas:t=>(0,P.X)(e,t),getFilterChanges:t=>(0,R.K)(e,t),getFilterLogs:t=>M(e,t),getGasPrice:()=>(0,N.o)(e),getLogs:t=>(0,B.y)(e,t),getProof:t=>(0,A.S)(e,t),estimateMaxPriorityFeePerGas:t=>(0,x._)(e,t),getStorageAt:t=>(0,_.Y)(e,t),getTransaction:t=>(0,j.f)(e,t),getTransactionConfirmations:t=>(0,U.a)(e,t),getTransactionCount:t=>(0,D.K)(e,t),getTransactionReceipt:t=>(0,K.a)(e,t),multicall:t=>(0,L.A)(e,t),prepareTransactionRequest:t=>(0,eo.Z)(e,t),readContract:t=>(0,Q.L)(e,t),sendRawTransaction:t=>(0,eu.p)(e,t),simulateContract:t=>(0,z.a)(e,t),verifyMessage:t=>(0,W.n)(e,t),verifyTypedData:t=>(0,Z.B)(e,t),uninstallFilter:t=>(0,H.W)(e,t),waitForTransactionReceipt:t=>(0,V.e)(e,t),watchBlocks:t=>(0,Y.p)(e,t),watchBlockNumber:t=>(0,J.q)(e,t),watchContractEvent:t=>(0,X.Y)(e,t),watchEvent:t=>(function(e,{address:t,args:n,batch:r=!0,event:i,events:a,onError:s,onLogs:o,poll:u,pollingInterval:c=e.pollingInterval,strict:l}){let d,h;let y=void 0!==u?u:"webSocket"!==e.transport.type,m=l??!1;return y?(()=>{let u=(0,en.P)(["watchEvent",t,n,r,e.uid,i,c]);return(0,ee.N7)(u,{onLogs:o,onError:s},s=>{let o,u;let l=!1,d=(0,et.$)(async()=>{if(!l){try{u=await (0,v.s)(e,p,"createEventFilter")({address:t,args:n,event:i,events:a,strict:m})}catch{}l=!0;return}try{let c;if(u)c=await (0,v.s)(e,R.K,"getFilterChanges")({filter:u});else{let r=await (0,v.s)(e,O.z,"getBlockNumber")({});c=o&&o!==r?await (0,v.s)(e,B.y,"getLogs")({address:t,args:n,event:i,events:a,fromBlock:o+1n,toBlock:r}):[],o=r}if(0===c.length)return;if(r)s.onLogs(c);else for(let e of c)s.onLogs([e])}catch(e){u&&e instanceof ei.yR&&(l=!1),s.onError?.(e)}},{emitOnBegin:!0,interval:c});return async()=>{u&&await (0,v.s)(e,H.W,"uninstallFilter")({filter:u}),d()}})})():(d=!0,h=()=>d=!1,(async()=>{try{let r=a??(i?[i]:void 0),u=[];r&&(u=[r.flatMap(e=>(0,f.O)({abi:[e],eventName:e.name,args:n}))],i&&(u=u[0]));let{unsubscribe:c}=await e.transport.subscribe({params:["logs",{address:t,topics:u}],onData(e){if(!d)return;let t=e.result;try{let{eventName:e,args:n}=(0,ea.F)({abi:r??[],data:t.data,topics:t.topics,strict:m}),i=(0,G.U)(t,{args:n,eventName:e});o([i])}catch(i){let e,n;if(i instanceof er.SM||i instanceof er.Gy){if(l)return;e=i.abiItem.name,n=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let r=(0,G.U)(t,{args:n?[]:{},eventName:e});o([r])}},onError(e){s?.(e)}});h=c,d||h()}catch(e){s?.(e)}})(),h)})(e,t),watchPendingTransactions:t=>(0,es.O)(e,t)}}var el=n(11181);function ed(e,t={}){let n=(0,el.s)(e,t);return n?.extend(ec)}var ef=n(65401),eh=n(41012);function ep(e={}){let t=(0,eh.useConfig)(e);return(0,ef.useSyncExternalStoreWithSelector)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>ed(e),n,{equalityFn:(e,t)=>e?.uid===t?.uid})})(t,{onChange:e}),()=>ed(t,e),()=>ed(t,e),e=>e,(e,t)=>e?.uid===t?.uid)}},45233:function(e,t,n){"use strict";n.r(t),n.d(t,{useReadContract:function(){return u}});var r=n(73613),i=n(21637),a=n(26088),s=n(6613),o=n(41012);function u(e={}){let{abi:t,address:n,functionName:u,query:c={}}=e,l=(0,o.useConfig)(e),d=(0,s.useChainId)(),f=function(e,t={}){return{async queryFn({queryKey:n}){let i=t.abi;if(!i)throw Error("abi is required");let{address:a,functionName:s,scopeKey:o,...u}=n[1];if(!a)throw Error("address is required");if(!s)throw Error("functionName is required");let c=u.args;return(0,r.L)(e,{abi:i,address:a,functionName:s,args:c,...u})},queryKey:function(e={}){let{abi:t,...n}=e;return["readContract",(0,i.O)(n)]}(t)}}(l,{...e,chainId:e.chainId??d}),h=!!(n&&t&&u&&(c.enabled??!0));return(0,a.aM)({...c,...f,enabled:h,structuralSharing:c.structuralSharing??a.if})}},83447:function(e,t,n){"use strict";n.r(t),n.d(t,{useReadContracts:function(){return c}});var r=n(94727),i=n(21637),a=n(2265),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{contracts:t=[],query:n={}}=e,c=(0,u.useConfig)(e),l=(0,o.useChainId)(),d=function(e,t={}){return{async queryFn({queryKey:n}){let i=[],a=n[1].contracts.length;for(let e=0;e<a;e++){let r=n[1].contracts[e],a=t.contracts?.[e].abi;i.push({...r,abi:a})}let{scopeKey:s,...o}=n[1];return(0,r.J)(e,{...o,contracts:i})},queryKey:function(e={}){let t=[];for(let n of e.contracts??[]){let{abi:r,...i}=n;t.push({...i,chainId:i.chainId??e.chainId})}return["readContracts",(0,i.O)({...e,contracts:t})]}(t)}}(c,{...e,chainId:l}),f=(0,a.useMemo)(()=>{let e=!1;for(let n of t){let{abi:t,address:r,functionName:i}=n;if(!t||!r||!i){e=!1;break}e=!0}return!!(e&&(n.enabled??!0))},[t,n.enabled]);return(0,s.aM)({...d,...n,enabled:f,structuralSharing:n.structuralSharing??s.if})}},43209:function(e,t,n){"use strict";n.r(t),n.d(t,{useReconnect:function(){return s}});var r=n(23588),i=n(70996),a=n(41012);function s(e={}){let{mutation:t}=e,n=(0,a.useConfig)(e),{mutate:s,mutateAsync:o,...u}=(0,r.D)({...t,mutationFn:e=>(0,i.G)(n,e),mutationKey:["reconnect"]});return{...u,connectors:n.connectors,reconnect:s,reconnectAsync:o}}},29821:function(e,t,n){"use strict";n.r(t),n.d(t,{useSendTransaction:function(){return l}});var r=n(23588),i=n(89412),a=n(64394),s=n(46981),o=n(71660);async function u(e,t){let n;let{account:r,chainId:u,connector:c,gas:l,...d}=t;n="object"==typeof r&&"local"===r.type?e.getClient({chainId:u}):await (0,o.e)(e,{account:r,chainId:u,connector:c});let f=await (async()=>{if(null!==l){if(void 0===l){let e=(0,s.s)(n,i.Q,"estimateGas");return e({...d,account:r,chain:u?{id:u}:null})}return l}})(),h=(0,s.s)(n,a.T,"sendTransaction"),p=await h({...d,...r?{account:r}:{},gas:f,chain:u?{id:u}:null});return p}var c=n(41012);function l(e={}){let{mutation:t}=e,n=(0,c.useConfig)(e),{mutate:i,mutateAsync:a,...s}=(0,r.D)({...t,mutationFn:e=>u(n,e),mutationKey:["sendTransaction"]});return{...s,sendTransaction:i,sendTransactionAsync:a}}},4126:function(e,t,n){"use strict";n.r(t),n.d(t,{useSignTypedData:function(){return c}});var r=n(23588),i=n(31951),a=n(46981),s=n(71660);async function o(e,t){let n;let{account:r,connector:o,...u}=t;n="object"==typeof r&&"local"===r.type?e.getClient():await (0,s.e)(e,{account:r,connector:o});let c=(0,a.s)(n,i.x,"signTypedData");return c({...u,...r?{account:r}:{}})}var u=n(41012);function c(e={}){let{mutation:t}=e,n=(0,u.useConfig)(e),{mutate:i,mutateAsync:a,...s}=(0,r.D)({...t,mutationFn:e=>o(n,e),mutationKey:["signTypedData"]});return{...s,signTypedData:i,signTypedDataAsync:a}}},27446:function(e,t,n){"use strict";n.r(t),n.d(t,{useSimulateContract:function(){return c}});var r=n(3029),i=n(21637),a=n(26088),s=n(6613),o=n(41012),u=n(15642);function c(e={}){let{abi:t,address:n,connector:c,functionName:l,query:d={}}=e,f=(0,o.useConfig)(e),{data:h}=(0,u.useConnectorClient)({connector:c,query:{enabled:void 0===e.account}}),p=(0,s.useChainId)(),y=function(e,t={}){return{async queryFn({queryKey:n}){let{abi:i,connector:a}=t;if(!i)throw Error("abi is required");let{scopeKey:s,...o}=n[1],{address:u,functionName:c}=o;if(!u)throw Error("address is required");if(!c)throw Error("functionName is required");return(0,r.a)(e,{abi:i,connector:a,...o})},queryKey:function(e={}){let{abi:t,connector:n,...r}=e;return["simulateContract",(0,i.O)(r)]}(t)}}(f,{...e,account:e.account??h?.account,chainId:e.chainId??p}),m=!!(t&&n&&l&&(d.enabled??!0));return(0,a.aM)({...d,...y,enabled:m})}},33190:function(e,t,n){"use strict";n.r(t),n.d(t,{useStorageAt:function(){return l}});var r=n(97952),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.Y,"getStorageAt");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,slot:n,query:r={}}=e,i=(0,c.useConfig)(e),l=(0,u.useChainId)(),d=function(e,t={}){return{queryFn({queryKey:t}){let{address:n,slot:r,scopeKey:i,...s}=t[1];if(!n||!r)throw Error("address and slot are required");return a(e,{...s,address:n,slot:r})},queryKey:["getStorageAt",(0,s.O)(t)]}}(i,{...e,chainId:e.chainId??l}),f=!!(t&&n&&(r.enabled??!0));return(0,o.aM)({...r,...d,enabled:f})}},96974:function(e,t,n){"use strict";n.r(t),n.d(t,{useSwitchAccount:function(){return u}});var r=n(23588),i=n(76026);async function a(e,t){let{connector:n}=t,r=e.state.connections.get(n.uid);if(!r)throw new i.aH;return await e.storage?.setItem("recentConnectorId",n.id),e.setState(e=>({...e,current:n.uid})),{accounts:r.accounts,chainId:r.chainId}}var s=n(41012),o=n(820);function u(e={}){let{mutation:t}=e,n=(0,s.useConfig)(e),{mutate:i,mutateAsync:u,...c}=(0,r.D)({...t,mutationFn:e=>a(n,e),mutationKey:["switchAccount"]});return{...c,connectors:(0,o.useConnections)().map(e=>e.connector),switchAccount:i,switchAccountAsync:u}}},7018:function(e,t,n){"use strict";n.r(t),n.d(t,{useSwitchChain:function(){return u}});var r=n(23588),i=n(76026),a=n(29358);async function s(e,t){let{chainId:n}=t,r=e.state.connections.get(t.connector?.uid??e.state.current);if(r){let e=r.connector;if(!e.switchChain)throw new a.O({connector:e});let t=await e.switchChain({chainId:n});return t}let s=e.chains.find(e=>e.id===n);if(!s)throw new i.X4;return e.setState(e=>({...e,chainId:n})),s}var o=n(41012);function u(e={}){let{mutation:t}=e,n=(0,o.useConfig)(e),{mutate:i,mutateAsync:a,...u}=(0,r.D)({...t,mutationFn:e=>s(n,e),mutationKey:["switchChain"]});return{...u,chains:n.chains,switchChain:i,switchChainAsync:a}}},59449:function(e,t,n){"use strict";n.r(t),n.d(t,{useToken:function(){return p}});var r=n(98458),i=n(16775),a=n(30838),s=n(94973),o=n(57161),u=n(94727);async function c(e,t){let{address:n,chainId:c,formatUnits:l=18}=t;function d(e){return[{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:e}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:e}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]}]}try{let t=d("string"),a={address:n,abi:t,chainId:c},[s,f,h,p]=await (0,u.J)(e,{allowFailure:!0,contracts:[{...a,functionName:"decimals"},{...a,functionName:"name"},{...a,functionName:"symbol"},{...a,functionName:"totalSupply"}]});if(f.error instanceof r.uq)throw f.error;if(h.error instanceof r.uq)throw h.error;if(s.error)throw s.error;if(p.error)throw p.error;return{address:n,decimals:s.result,name:f.result,symbol:h.result,totalSupply:{formatted:(0,i.b)(p.result,(0,o.W)(l)),value:p.result}}}catch(t){if(t instanceof r.uq){let t=d("bytes32"),r={address:n,abi:t,chainId:c},[f,h,p,y]=await (0,u.J)(e,{allowFailure:!1,contracts:[{...r,functionName:"decimals"},{...r,functionName:"name"},{...r,functionName:"symbol"},{...r,functionName:"totalSupply"}]});return{address:n,decimals:f,name:(0,a.rR)((0,s.f)(h,{dir:"right"})),symbol:(0,a.rR)((0,s.f)(p,{dir:"right"})),totalSupply:{formatted:(0,i.b)(y,(0,o.W)(l)),value:y}}}throw t}}var l=n(21637),d=n(26088),f=n(6613),h=n(41012);function p(e={}){let{address:t,query:n={}}=e,r=(0,h.useConfig)(e),i=(0,f.useChainId)(),a=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:r,...i}=t[1];if(!n)throw Error("address is required");return c(e,{...i,address:n})},queryKey:function(e={}){return["token",(0,l.O)(e)]}(t)}}(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return(0,d.aM)({...n,...a,enabled:s})}},61628:function(e,t,n){"use strict";n.r(t),n.d(t,{useTransaction:function(){return c}});var r=n(37498),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{blockHash:t,blockNumber:n,blockTag:c,hash:l,query:d={}}=e,f=(0,u.useConfig)(e),h=(0,o.useChainId)(),p=function(e,t={}){return{async queryFn({queryKey:t}){let{blockHash:n,blockNumber:a,blockTag:s,hash:o,index:u}=t[1];if(!n&&!a&&!s&&!o)throw Error("blockHash, blockNumber, blockTag, or hash is required");if(!o&&!u)throw Error("index is required for blockHash, blockNumber, or blockTag");let{scopeKey:c,...l}=t[1];return function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.f,"getTransaction");return o(a)}(e,l)},queryKey:function(e={}){return["transaction",(0,a.O)(e)]}(t)}}(f,{...e,chainId:e.chainId??h}),y=!!(!(t&&n&&c&&l)&&(d.enabled??!0));return(0,s.aM)({...d,...p,enabled:y})}},36150:function(e,t,n){"use strict";n.r(t),n.d(t,{useTransactionConfirmations:function(){return c}});var r=n(64356),i=n(46981),a=n(21637),s=n(26088),o=n(6613),u=n(41012);function c(e={}){let{hash:t,transactionReceipt:n,query:c={}}=e,l=(0,u.useConfig)(e),d=(0,o.useChainId)(),f=function(e,t={}){return{async queryFn({queryKey:t}){let{hash:n,transactionReceipt:a,scopeKey:s,...o}=t[1];if(!n&&!a)throw Error("hash or transactionReceipt is required");let u=await function(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.a,"getTransactionConfirmations");return o(a)}(e,{hash:n,transactionReceipt:a,...o});return u??null},queryKey:function(e={}){return["transactionConfirmations",(0,a.O)(e)]}(t)}}(l,{...e,chainId:e.chainId??d}),h=!!(!(t&&n)&&(t||n)&&(c.enabled??!0));return(0,s.aM)({...c,...f,enabled:h})}},52496:function(e,t,n){"use strict";n.r(t),n.d(t,{useTransactionCount:function(){return l}});var r=n(31742),i=n(46981);async function a(e,t){let{address:n,blockNumber:a,blockTag:s,chainId:o}=t,u=e.getClient({chainId:o}),c=(0,i.s)(u,r.K,"getTransactionCount");return c(a?{address:n,blockNumber:a}:{address:n,blockTag:s})}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,query:n={}}=e,r=(0,c.useConfig)(e),i=(0,u.useChainId)(),l=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,scopeKey:r,...i}=t[1];if(!n)throw Error("address is required");let s=await a(e,{...i,address:n});return s??null},queryKey:function(e={}){return["transactionCount",(0,s.O)(e)]}(t)}}(r,{...e,chainId:e.chainId??i}),d=!!(t&&(n.enabled??!0));return(0,o.aM)({...n,...l,enabled:d})}},70030:function(e,t,n){"use strict";n.r(t),n.d(t,{useTransactionReceipt:function(){return l}});var r=n(34843),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.a,"getTransactionReceipt");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{hash:t,query:n={}}=e,r=(0,c.useConfig)(e),i=(0,u.useChainId)(),l=function(e,t={}){return{queryFn({queryKey:t}){let{hash:n,scopeKey:r,...i}=t[1];if(!n)throw Error("hash is required");return a(e,{...i,hash:n})},queryKey:["getTransactionReceipt",(0,s.O)(t)]}}(r,{...e,chainId:e.chainId??i}),d=!!(t&&(n.enabled??!0));return(0,o.aM)({...n,...l,enabled:d})}},58785:function(e,t,n){"use strict";n.r(t),n.d(t,{useVerifyMessage:function(){return l}});var r=n(18285),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.n,"verifyMessage");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,message:n,signature:r,query:i={}}=e,l=(0,c.useConfig)(e),d=(0,u.useChainId)(),f=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,message:r,signature:i}=t[1];if(!n||!r||!i)throw Error("address, message, and signature are required");let{scopeKey:s,...o}=t[1],u=await a(e,o);return u??null},queryKey:["verifyMessage",(0,s.O)(t)]}}(l,{...e,chainId:e.chainId??d}),h=!!(t&&n&&r&&(i.enabled??!0));return(0,o.aM)({...i,...f,enabled:h})}},50622:function(e,t,n){"use strict";n.r(t),n.d(t,{useVerifyTypedData:function(){return l}});var r=n(52558),i=n(46981);async function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n}),o=(0,i.s)(s,r.B,"verifyTypedData");return o(a)}var s=n(21637),o=n(26088),u=n(6613),c=n(41012);function l(e={}){let{address:t,message:n,primaryType:r,signature:i,types:l,query:d={}}=e,f=(0,c.useConfig)(e),h=(0,u.useChainId)(),p=function(e,t={}){return{async queryFn({queryKey:t}){let{address:n,message:r,primaryType:i,signature:s,types:o,scopeKey:u,...c}=t[1];if(!n)throw Error("address is required");if(!r)throw Error("message is required");if(!i)throw Error("primaryType is required");if(!s)throw Error("signature is required");if(!o)throw Error("types is required");let l=await a(e,{...c,address:n,message:r,primaryType:i,signature:s,types:o});return l??null},queryKey:["verifyTypedData",(0,s.O)(t)]}}(f,{...e,chainId:e.chainId??h}),y=!!(t&&n&&r&&i&&l&&(d.enabled??!0));return(0,o.aM)({...d,...p,enabled:y})}},47973:function(e,t,n){"use strict";n.r(t),n.d(t,{useWaitForTransactionReceipt:function(){return h}});var r=n(30838),i=n(31764),a=n(37498),s=n(98873),o=n(46981);async function u(e,t){let{chainId:n,timeout:u=0,...c}=t,l=e.getClient({chainId:n}),d=(0,o.s)(l,i.e,"waitForTransactionReceipt"),f=await d({...c,timeout:u});if("reverted"===f.status){let e=(0,o.s)(l,a.f,"getTransaction"),t=await e({hash:f.transactionHash}),n=(0,o.s)(l,s.R,"call"),i=await n({...t,gasPrice:"eip1559"!==t.type?t.gasPrice:void 0,maxFeePerGas:"eip1559"===t.type?t.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===t.type?t.maxPriorityFeePerGas:void 0}),u=(0,r.rR)(`0x${i.substring(138)}`);throw Error(u)}return{...f,chainId:l.chain.id}}var c=n(21637),l=n(26088),d=n(6613),f=n(41012);function h(e={}){let{hash:t,query:n={}}=e,r=(0,f.useConfig)(e),i=(0,d.useChainId)(),a=function(e,t={}){return{async queryFn({queryKey:n}){let{hash:r,...i}=n[1];if(!r)throw Error("hash is required");return u(e,{...i,onReplaced:t.onReplaced,hash:r})},queryKey:function(e={}){let{onReplaced:t,...n}=e;return["waitForTransactionReceipt",(0,c.O)(n)]}(t)}}(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return(0,l.aM)({...n,...a,enabled:s})}},31937:function(e,t,n){"use strict";n.r(t),n.d(t,{useWalletClient:function(){return B}});var r=n(38038),i=n(13438),a=n(21693);async function s(e,{chain:t}){let{id:n,name:r,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,a.eC)(n),chainName:r,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:e})=>e):void 0}]},{retryCount:0})}var o=n(12732),u=n(64394),c=n(39803);async function l(e){if(e.account?.type==="local")return[e.account.address];let t=await e.request({method:"eth_accounts"});return t.map(e=>(0,c.x)(e))}async function d(e){let t=await e.request({method:"wallet_getPermissions"});return t}var f=n(21765);async function h(e){let t=await e.request({method:"eth_requestAccounts"},{retryCount:0});return t.map(e=>(0,c.K)(e))}async function p(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}var y=n(73971),m=n(77043),b=n(4832),g=n(67333),v=n(64305),w=n(86868),C=n(82600),P=n(2445);async function x(e,t){let{account:n=e.account,chain:r=e.chain,...s}=t;if(!n)throw new g.o({docsPath:"/docs/actions/wallet/signTransaction"});let o=(0,b.T)(n);(0,P.F)({account:o,...t});let u=await (0,C.s)(e,i.L,"getChainId")({});null!==r&&(0,v.q)({currentChainId:u,chain:r});let c=r?.formatters||e.chain?.formatters,l=c?.transactionRequest?.format||w.tG;return"local"===o.type?o.signTransaction({...s,chainId:u},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(s),chainId:(0,a.eC)(u),from:o.address}]},{retryCount:0})}var I=n(31951);async function F(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(t)}]},{retryCount:0})}async function O(e,t){let n=await e.request({method:"wallet_watchAsset",params:t},{retryCount:0});return n}var E=n(23570);function q(e){return{addChain:t=>s(e,t),deployContract:t=>(function(e,t){let{abi:n,args:r,bytecode:i,...a}=t,s=(0,o.w)({abi:n,args:r,bytecode:i});return(0,u.T)(e,{...a,data:s})})(e,t),getAddresses:()=>l(e),getChainId:()=>(0,i.L)(e),getPermissions:()=>d(e),prepareTransactionRequest:t=>(0,f.Z)(e,t),requestAddresses:()=>h(e),requestPermissions:t=>p(e,t),sendRawTransaction:t=>(0,y.p)(e,t),sendTransaction:t=>(0,u.T)(e,t),signMessage:t=>(0,m.l)(e,t),signTransaction:t=>x(e,t),signTypedData:t=>(0,I.x)(e,t),switchChain:t=>F(e,t),watchAsset:t=>O(e,t),writeContract:t=>(0,E.n)(e,t)}}var T=n(71660);async function k(e,t={}){let n=await (0,T.e)(e,t);return n.extend(q),n.extend(q)}var S=n(21637),R=n(2265),$=n(26088),G=n(79037),M=n(6613),N=n(41012);function B(e={}){let{query:t={},...n}=e,i=(0,N.useConfig)(n),a=(0,r.NL)(),{address:s,connector:o,status:u}=(0,G.useAccount)(),c=(0,M.useChainId)(),{queryKey:l,...d}=function(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){let{connector:r}=t,{connectorUid:i,scopeKey:a,...s}=n[1];return k(e,{...s,connector:r})},queryKey:function(e={}){let{connector:t,...n}=e;return["walletClient",{...(0,S.O)(n),connectorUid:t?.uid}]}(t)}}(i,{...e,chainId:e.chainId??c,connector:e.connector??o}),f=!!("disconnected"!==u&&(t.enabled??!0));return(0,R.useEffect)(()=>{s?a.invalidateQueries({queryKey:l}):a.removeQueries({queryKey:l})},[s,a]),(0,$.aM)({...t,...d,queryKey:l,enabled:f,staleTime:1/0})}},11464:function(e,t,n){"use strict";n.r(t),n.d(t,{useWatchBlockNumber:function(){return u}});var r=n(63928),i=n(46981),a=n(2265),s=n(6613),o=n(41012);function u(e={}){let{enabled:t=!0,onBlockNumber:n,config:u,...c}=e,l=(0,o.useConfig)(e),d=(0,s.useChainId)(),f=e.chainId??d;(0,a.useEffect)(()=>{if(t&&n)return function(e,t){let n,a;let{syncConnectedChain:s=e._internal.syncConnectedChain,...o}=t,u=t=>{n&&n();let a=e.getClient({chainId:t}),s=(0,i.s)(a,r.q,"watchBlockNumber");return n=s(o)},c=u(t.chainId);return s&&!t.chainId&&(a=e.subscribe(({chainId:e})=>e,async e=>u(e))),()=>{c?.(),a?.()}}(l,{...c,chainId:f,onBlockNumber:n})},[f,l,t,n,c])}},84904:function(e,t,n){"use strict";n.r(t),n.d(t,{useWatchBlocks:function(){return u}});var r=n(58854),i=n(46981),a=n(2265),s=n(6613),o=n(41012);function u(e={}){let{enabled:t=!0,onBlock:n,config:u,...c}=e,l=(0,o.useConfig)(e),d=(0,s.useChainId)(),f=e.chainId??d;(0,a.useEffect)(()=>{if(t&&n)return function(e,t){let n,a;let{syncConnectedChain:s=e._internal.syncConnectedChain,...o}=t,u=t=>{n&&n();let a=e.getClient({chainId:t}),s=(0,i.s)(a,r.p,"watchBlocks");return n=s(o)},c=u(t.chainId);return s&&!t.chainId&&(a=e.subscribe(({chainId:e})=>e,async e=>u(e))),()=>{c?.(),a?.()}}(l,{...c,chainId:f,onBlock:n})},[f,l,t,n,c])}},70638:function(e,t,n){"use strict";n.r(t),n.d(t,{useWatchContractEvent:function(){return u}});var r=n(40457),i=n(46981),a=n(2265),s=n(6613),o=n(41012);function u(e={}){let{enabled:t=!0,onLogs:n,config:u,...c}=e,l=(0,o.useConfig)(e),d=(0,s.useChainId)(),f=e.chainId??d;(0,a.useEffect)(()=>{if(t&&n)return function(e,t){let n,a;let{syncConnectedChain:s=e._internal.syncConnectedChain,...o}=t,u=t=>{n&&n();let a=e.getClient({chainId:t}),s=(0,i.s)(a,r.Y,"watchContractEvent");return n=s(o)},c=u(t.chainId);return s&&!t.chainId&&(a=e.subscribe(({chainId:e})=>e,async e=>u(e))),()=>{c?.(),a?.()}}(l,{...c,chainId:f,onLogs:n})},[f,l,t,c,n])}},37093:function(e,t,n){"use strict";n.r(t),n.d(t,{useWatchPendingTransactions:function(){return u}});var r=n(48176),i=n(46981),a=n(2265),s=n(6613),o=n(41012);function u(e={}){let{enabled:t=!0,onTransactions:n,config:u,...c}=e,l=(0,o.useConfig)(e),d=(0,s.useChainId)(),f=e.chainId??d;(0,a.useEffect)(()=>{if(t&&n)return function(e,t){let n,a;let{syncConnectedChain:s=e._internal.syncConnectedChain,...o}=t,u=t=>{n&&n();let a=e.getClient({chainId:t}),s=(0,i.s)(a,r.O,"watchPendingTransactions");return n=s(o)},c=u(t.chainId);return s&&!t.chainId&&(a=e.subscribe(({chainId:e})=>e,async e=>u(e))),()=>{c?.(),a?.()}}(l,{...c,chainId:f,onTransactions:n})},[f,l,t,n,c])}},18559:function(e,t,n){"use strict";n.r(t),n.d(t,{useWriteContract:function(){return l}});var r=n(23588),i=n(23570),a=n(46981),s=n(71660),o=n(3029);async function u(e,t){let n,r;let{account:u,chainId:c,connector:l,__mode:d,...f}=t;if(n="object"==typeof u&&"local"===u.type?e.getClient({chainId:c}):await (0,s.e)(e,{account:u,chainId:c,connector:l}),"prepared"===d)r=f;else{let{request:t}=await (0,o.a)(e,{...f,account:u});r=t}let h=(0,a.s)(n,i.n,"writeContract"),p=await h({...r,...u?{account:u}:{},chain:c?{id:c}:null});return p}var c=n(41012);function l(e={}){let{mutation:t}=e,n=(0,c.useConfig)(e),{mutate:i,mutateAsync:a,...s}=(0,r.D)({...t,mutationFn:e=>u(n,e),mutationKey:["writeContract"]});return{...s,writeContract:i,writeContractAsync:a}}},26088:function(e,t,n){"use strict";let r;n.d(t,{if:function(){return G},NS:function(){return $},aM:function(){return R}});var i=n(40300),a=n(17987),s=n(79198),o=n(42996),u=n(11640),c=class extends o.l{constructor(e,t){super(),this.options=t,this.#C=e,this.#P=null,this.bindMethods(),this.setOptions(t)}#C;#x=void 0;#I=void 0;#F=void 0;#O;#E;#P;#q;#T;#k;#S;#R;#$;#G=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#x.addObserver(this),l(this.#x,this.options)?this.#M():this.updateResult(),this.#N())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#x,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#x,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#B(),this.#A(),this.#x.removeObserver(this)}setOptions(e,t){let n=this.options,r=this.#x;if(this.options=this.#C.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.#_(),(0,i.VS)(this.options,n)||this.#C.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#x,observer:this});let a=this.hasListeners();a&&f(this.#x,r,this.options,n)&&this.#M(),this.updateResult(t),a&&(this.#x!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.#j();let s=this.#U();a&&(this.#x!==r||this.options.enabled!==n.enabled||s!==this.#$)&&this.#D(s)}getOptimisticResult(e){let t=this.#C.getQueryCache().build(this.#C,e),n=this.createResult(t,e);return(0,i.VS)(this.getCurrentResult(),n)||(this.#F=n,this.#E=this.options,this.#O=this.#x.state),n}getCurrentResult(){return this.#F}trackResult(e,t){let n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#G.add(e)}getCurrentQuery(){return this.#x}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#C.defaultQueryOptions(e),n=this.#C.getQueryCache().build(this.#C,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#M({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#F))}#M(e){this.#_();let t=this.#x.fetch(this.options,e);return e?.throwOnError||(t=t.catch(i.ZT)),t}#j(){if(this.#B(),i.sk||this.#F.isStale||!(0,i.PN)(this.options.staleTime))return;let e=(0,i.Kp)(this.#F.dataUpdatedAt,this.options.staleTime);this.#S=setTimeout(()=>{this.#F.isStale||this.updateResult()},e+1)}#U(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#x):this.options.refetchInterval)??!1}#D(e){this.#A(),this.#$=e,!i.sk&&!1!==this.options.enabled&&(0,i.PN)(this.#$)&&0!==this.#$&&(this.#R=setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#M()},this.#$))}#N(){this.#j(),this.#D(this.#U())}#B(){this.#S&&(clearTimeout(this.#S),this.#S=void 0)}#A(){this.#R&&(clearInterval(this.#R),this.#R=void 0)}createResult(e,t){let n;let r=this.#x,a=this.options,s=this.#F,o=this.#O,c=this.#E,d=e!==r,p=d?e.state:this.#I,{state:y}=e,{error:m,errorUpdatedAt:b,fetchStatus:g,status:v}=y,w=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&l(e,t),s=n&&f(e,r,t,a);(i||s)&&(g=(0,u.Kw)(e.options.networkMode)?"fetching":"paused",void 0===y.data&&(v="pending")),"isRestoring"===t._optimisticResults&&(g="idle")}if(t.select&&void 0!==y.data){if(s&&y.data===o?.data&&t.select===this.#q)n=this.#T;else try{this.#q=t.select,n=t.select(y.data),n=(0,i.oE)(s?.data,n,t),this.#T=n,this.#P=null}catch(e){this.#P=e}}else n=y.data;if(void 0!==t.placeholderData&&void 0===n&&"pending"===v){let e;if(s?.isPlaceholderData&&t.placeholderData===c?.placeholderData)e=s.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#k?.state.data,this.#k):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#P=null}catch(e){this.#P=e}void 0!==e&&(v="success",n=(0,i.oE)(s?.data,e,t),w=!0)}this.#P&&(m=this.#P,n=this.#T,b=Date.now(),v="error");let C="fetching"===g,P="pending"===v,x="error"===v,I=P&&C,F=void 0!==y.data,O={status:v,fetchStatus:g,isPending:P,isSuccess:"success"===v,isError:x,isInitialLoading:I,isLoading:I,data:n,dataUpdatedAt:y.dataUpdatedAt,error:m,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:C,isRefetching:C&&!P,isLoadingError:x&&!F,isPaused:"paused"===g,isPlaceholderData:w,isRefetchError:x&&F,isStale:h(e,t),refetch:this.refetch};return O}updateResult(e){let t=this.#F,n=this.createResult(this.#x,this.options);if(this.#O=this.#x.state,this.#E=this.options,void 0!==this.#O.data&&(this.#k=this.#x),(0,i.VS)(n,t))return;this.#F=n;let r={};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#G.size)return!0;let r=new Set(n??this.#G);return this.options.throwOnError&&r.add("error"),Object.keys(this.#F).some(e=>{let n=this.#F[e]!==t[e];return n&&r.has(e)})})()&&(r.listeners=!0),this.#K({...r,...e})}#_(){let e=this.#C.getQueryCache().build(this.#C,this.options);if(e===this.#x)return;let t=this.#x;this.#x=e,this.#I=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#N()}#K(e){a.V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#F)}),this.#C.getQueryCache().notify({query:this.#x,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==t.enabled&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,n){if(!1!==t.enabled){let r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&h(e,t)}return!1}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return e.isStaleByTime(t.staleTime)}var p=n(2265);n(57437);var y=p.createContext((r=!1,{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r})),m=()=>p.useContext(y),b=n(38038),g=p.createContext(!1),v=()=>p.useContext(g);g.Provider;var w=n(14805),C=(e,t)=>{(e.suspense||e.throwOnError)&&!t.isReset()&&(e.retryOnMount=!1)},P=e=>{p.useEffect(()=>{e.clearReset()},[e])},x=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(0,w.L)(n,[e.error,r]),I=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},F=(e,t)=>e?.suspense&&t.isPending,O=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function E(e,t,n){let r=(0,b.NL)(n),i=v(),s=m(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",I(o),C(o,s),P(s);let[u]=p.useState(()=>new t(r,o)),c=u.getOptimisticResult(o);if(p.useSyncExternalStore(p.useCallback(e=>{let t=i?()=>void 0:u.subscribe(a.V.batchCalls(e));return u.updateResult(),t},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),p.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),F(o,c))throw O(o,u,s);if(x({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return o.notifyOnChangeProps?c:u.trackResult(c)}var q=n(18354),T=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,q.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,q.Gm)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a}=r,s=i&&n.fetchMeta?.fetchMore?.direction==="forward",o=i&&n.fetchMeta?.fetchMore?.direction==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,q.Qy)(t,n.data),hasPreviousPage:(0,q.ZF)(t,n.data),isFetchingNextPage:s,isFetchingPreviousPage:o,isRefetching:a&&!s&&!o}}},k=n(48369),S=n(21637);function R(e){let t=E({...e,queryKeyHashFn:S.k},c,void 0);return t.queryKey=e.queryKey,t}function $(e){let t=E({...e,queryKeyHashFn:S.k},T,void 0);return t.queryKey=e.queryKey,t}function G(e,t){return(0,k.v)(e,t)?e:(0,i.Q$)(e,t)}}}]);