1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[219],{58789:function(e,t,n){n.d(t,{bM:function(){return x}});var r=n(9784),i=n(13421),a=n(38418),s=n(22594);let o=new i.Yd(a.i),u={},c=s.O$.from(0),l=s.O$.from(-1);function d(e,t,n,r){let a={fault:t,operation:n};return void 0!==r&&(a.value=r),o.throwError(e,i.Yd.errors.NUMERIC_FAULT,a)}let f="0";for(;f.length<256;)f+=f;function h(e){if("number"!=typeof e)try{e=s.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+f.substring(0,e):o.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);let n=h(t),r=(e=s.O$.from(e)).lt(c);r&&(e=e.mul(l));let i=e.mod(n).toString();for(;i.length<n.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];let a=e.div(n).toString();return e=1===n.length?a:a+"."+i,r&&(e="-"+e),e}function m(e,t){null==t&&(t=0);let n=h(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||o.throwArgumentError("invalid decimal value","value",e);let r="-"===e.substring(0,1);r&&(e=e.substring(1)),"."===e&&o.throwArgumentError("missing value","value",e);let i=e.split(".");i.length>2&&o.throwArgumentError("too many decimal points","value",e);let a=i[0],u=i[1];for(a||(a="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>n.length-1&&d("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.length<n.length-1;)u+="0";let c=s.O$.from(a),f=s.O$.from(u),p=c.mul(n).add(f);return r&&(p=p.mul(l)),p}class y{constructor(e,t,n,r){e!==u&&o.throwError("cannot use FixedFormat constructor; use FixedFormat.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=n,this.decimals=r,this.name=(t?"":"u")+"fixed"+String(n)+"x"+String(r),this._multiplier=h(r),Object.freeze(this)}static from(e){if(e instanceof y)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if("string"==typeof e){if("fixed"===e);else if("ufixed"===e)t=!1;else{let i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||o.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],n=parseInt(i[2]),r=parseInt(i[3])}}else if(e){let i=(t,n,r)=>null==e[t]?r:(typeof e[t]!==n&&o.throwArgumentError("invalid fixed format ("+t+" not "+n+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),n=i("width","number",n),r=i("decimals","number",r)}return n%8&&o.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&o.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new y(u,t,n,r)}}class g{constructor(e,t,n,r){e!==u&&o.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&o.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),n=m(e._value,e.format.decimals);return g.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),n=m(e._value,e.format.decimals);return g.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),n=m(e._value,e.format.decimals);return g.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),n=m(e._value,e.format.decimals);return g.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(b.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(b.toFormat(t.format))),t}round(e){null==e&&(e=0);let t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&o.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let n=g.from("1"+f.substring(0,e),this.format),r=v.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&o.throwArgumentError("invalid byte width","width",e);let t=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,r.$m)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return g.fromString(this._value,e)}static fromValue(e,t,n){return null!=n||null==t||(0,s.Zm)(t)||(n=t,t=null),null==t&&(t=0),null==n&&(n="fixed"),g.fromString(p(e,t),y.from(n))}static fromString(e,t){null==t&&(t="fixed");let n=y.from(t),i=m(e,n.decimals);!n.signed&&i.lt(c)&&d("unsigned value cannot be negative","overflow","value",e);let a=null;return n.signed?a=i.toTwos(n.width).toHexString():(a=i.toHexString(),a=(0,r.$m)(a,n.width/8)),new g(u,a,p(i,n.decimals),n)}static fromBytes(e,t){null==t&&(t="fixed");let n=y.from(t);if((0,r.lE)(e).length>n.width/8)throw Error("overflow");let i=s.O$.from(e);return n.signed&&(i=i.fromTwos(n.width)),new g(u,i.toTwos((n.signed?0:1)+n.width).toHexString(),p(i,n.decimals),n)}static from(e,t){if("string"==typeof e)return g.fromString(e,t);if((0,r._t)(e))return g.fromBytes(e,t);try{return g.fromValue(e,0,t)}catch(e){if(e.code!==i.Yd.errors.INVALID_ARGUMENT)throw e}return o.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}let b=g.from(1),v=g.from("0.5");new i.Yd("units/5.8.0");let w=["wei","kwei","mwei","gwei","szabo","finney","ether"];function x(e,t){if("string"==typeof t){let e=w.indexOf(t);-1!==e&&(t=3*e)}return p(e,null!=t?t:18)}},37836:function(e){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;
1if(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},16463:function(e,t,n){var r=n(71169);n.o(r,"useParams")&&n.d(t,{useParams:function(){return r.useParams}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},928:function(e,t){t.J=void 0,t.J=(e={})=>{if("undefined"==typeof window)return{persistAtom:()=>{}};let{key:t="recoil-persist",storage:n=localStorage,converter:r=JSON}=e,i=(e,t,n,r)=>{r?delete t[n]:t[n]=e,o(t)},a=()=>{let e=n.getItem(t);return null==e?{}:"string"==typeof e?s(e):"function"==typeof e.then?e.then(s):{}},s=e=>{if(void 0===e)return{};try{return r.parse(e)}catch(e){return console.error(e),{}}},o=e=>{try{"function"==typeof n.mergeItem?n.mergeItem(t,r.stringify(e)):n.setItem(t,r.stringify(e))}catch(e){console.error(e)}};return{persistAtom:({onSet:e,node:t,trigger:n,setSelf:r})=>{if("get"===n){let e=a();"function"==typeof e.then&&e.then(e=>{e.hasOwnProperty(t.key)&&r(e[t.key])}),e.hasOwnProperty(t.key)&&r(e[t.key])}e(async(e,n,r)=>{let s=a();"function"==typeof s.then?s.then(n=>i(e,n,t.key,r)):i(e,s,t.key,r)})}}}},50836:function(e,t,n){n.d(t,{Gm:function(){return i},Qy:function(){return o},ZF:function(){return u}});var r=n(56298);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=(0,r.cG)(t.options,t.fetchOptions),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={pages:u,pageParams:c},r=(e?s:a)(i,t);n=await h(t,r,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)}},2459:function(e,t,n){n.d(t,{A:function(){return o},z:function(){return u}});var r=n(56298),i=n(69948),a=n(30924),s=n(43494),o=class extends s.F{#e;#t;#n;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],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,errorUpdate
1Count: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}get promise(){return this.#r?.promise}setOptions(e){this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.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.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#r?.promise;return this.#r?.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.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,r.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({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.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=(0,r.cG)(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(i(n),this.#a=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};i(s),this.options.behavior?.onFetch(s,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#s({type:"fetch",meta:s.fetchOptions?.meta});let o=e=>{(0,a.DV)(e)&&e.silent||this.#s({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.#r=(0,a.Mz)({initialPromise:t?.initialPromise,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.#s({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#r.start()}#s(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,...u(t.data,this.options),fetchMeta:e.meta??null};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"};
1return{...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.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},26895:function(e,t,n){n.d(t,{KZ:function(){return s},a_:function(){return o},d7:function(){return a},fI:function(){return c}});var r,i,a={TON:"0x2be5e8c109e2197D077D13A82dAead6a9b3433C5",WTON:"0xc4A11aaf6ea915Ed7Ac194161d2fC9384F15bff2",Layer2Registry:"0x7846c2248a7b4de77e9c2bae7fbb93bfc286837b",DepositManager:"0x0b58ca72b12f01fc05f8f252e226f3e2089bd00e",SeigManager:"0x0b55a0f463b6defb81c6063973763951712d0e5f",DAOCommittee:"0xDD9f0cCc044B0781289Ee318e5971b0139602C26",DAOAgendaManager:"0xcD4421d082752f363E1687544a09d5112cD4f484",Candidate:"0x0000000000000000000000000000000000000000",AutoRefactorCoinage:"0x0000000000000000000000000000000000000000",OperatorManager:"0x0000000000000000000000000000000000000000",Layer2Manager:"0x0000000000000000000000000000000000000000"},s={TON:"0xa30fe40285b8f5c0457dbc3b7c8a280373c40044",WTON:"0x79e0d92670106c85e9067b56b8f674340dca0bbd",Layer2Registry:"0xA0a9576b437E52114aDA8b0BC4149F2F5c604581",DepositManager:"0x90ffcc7F168DceDBEF1Cb6c6eB00cA73F922956F",SeigManager:"0x2320542ae933FbAdf8f5B97cA348c7CeDA90fAd7",DAOCommittee:"0xA2101482b28E3D99ff6ced517bA41EFf4971a386",DAOAgendaManager:"0x1444f7a8bC26a3c9001a13271D56d6fF36B44f08",Candidate:"0x0000000000000000000000000000000000000000",AutoRefactorCoinage:"0x0000000000000000000000000000000000000000",OperatorManager:"0x0000000000000000000000000000000000000000",Layer2Manager:"0x58B4C2FEf19f5CDdd944AadD8DC99cCC71bfeFDc"},o=((r=o||{})[r.MAINNET=1]="MAINNET",r[r.SEPOLIA=11155111]="SEPOLIA",r[r.NONE=0]="NONE",r),u=((i=u||{}).MAINNET="mainnet",i.SEPOLIA="sepolia",i.NONE="unknown",i),c={TON:"TON",WTON:"WTON",Layer2Registry:"Layer2Registry",DepositManager:"DepositManager",SeigManager:"SeigManager",DAOCommittee:"DAOCommittee",DAOAgendaManager:"DAOAgendaManager",AutoRefactorCoinage:"AutoRefactorCoinage",Candidate:"Candidate",OperatorManager:"OperatorManager",Layer2Manager:"Layer2Manager"}},93130:function(e,t,n){n.d(t,{DI:function(){return l},sE:function(){return A},SC:function(){return y},Uh:function(){return g},NT:function(){return _},E:function(){return P},kd:function(){return p},vj:function(){return m}});var r,i,a,s=n(2265),o=n(26152),u=n(26895);n(64654);var c=(0,s.createContext)(null),l=({children:e,rpcUrl:t,chainId:n,walletClient:r})=>{let i=(0,s.useMemo)(()=>new o.a(t,n,{walletClient:r}),[t,n,r]);return s.createElement(c.Provider,{value:i},e)},d=()=>{let e=(0,s.useContext)(c);if(!e)throw Error("useTONStaking must be used within TONStakingProvider");return e};function f(e){let t=d(),{contract:n,functionName:r,args:i,enabled:a=!0,address:o,onSuccess:u,onError:c}
1=e,[l,f]=(0,s.useState)(null),[h,p]=(0,s.useState)(!1),[m,y]=(0,s.useState)(!1),[g,b]=(0,s.useState)(null),v=JSON.stringify(i),w=(0,s.useCallback)(async()=>{try{p(!0),y(!1),b(null);let e=v?JSON.parse(v):[],i=await t.contractOperationManager.readContract({contract:n,functionName:r,args:e||[],address:o});f(i),u?.(i)}catch(e){y(!0),b(e),c?.(e)}finally{p(!1)}},[t,n,r,v,o,u,c]);return(0,s.useEffect)(()=>{a&&w()},[a,w]),{data:l,isLoading:h,isError:m,error:g,read:w}}function h(){let e=d();return{publicClient:e.clientManager.getPublicClient(),walletClient:e.clientManager.getWalletClient()}}function p({account:e}){let{data:t,isLoading:n,isError:r,error:i}=f({contract:"TON",functionName:"balanceOf",args:[e],enabled:!!e});return{data:t,isLoading:n,isError:r,error:i}}function m({account:e}){let{data:t,isLoading:n,isError:r,error:i}=f({contract:"WTON",functionName:"balanceOf",args:[e],enabled:!!e});return{data:t,isLoading:n,isError:r,error:i}}u.a_.MAINNET,u.d7,u.a_.SEPOLIA,u.KZ;var y=()=>{let{data:e=0n,isLoading:t,isError:n,error:r}=f({contract:"SeigManager",functionName:"stakeOfTotal"});return{data:e,isLoading:t,isError:n,error:r}};function g({candidateAddress:e}){let[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(!0),[a,o]=(0,s.useState)(null),{data:u,isLoading:c,error:l}=f({contract:"SeigManager",functionName:"claimableL2Seigniorage",args:[e],enabled:!!e});(0,s.useEffect)(()=>{if(c){i(!0);return}if(i(!1),l){o(l);return}void 0!==u?n(u):o(Error("No claimable seigniorage data returned"))},[u,c,l]);let d=(0,s.useMemo)(()=>t?(Number(t)/1e18).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):null,[t]),h=(0,s.useCallback)(()=>null!==t&&t>0n,[t]);return{claimableAmount:t,formattedClaimableAmount:d,hasClaimableAmount:h,isLoading:r,error:a}}var b=e=>{if(1===e)return u.d7.WTON;if(11155111===e)return u.KZ.WTON;throw Error("Unsupported chainId")},v=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Balance",name:"oldBalance",type:"tuple"},{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Balance",name:"newBalance",type:"tuple"},{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Balance",name:"oldTotalBalance",type:"tuple"},{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Balance",name:"newTotalBalance",type:"tuple"}],name:"ChangedBalance",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Factor",name:"previous",type:"tuple"},{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],indexed:!1,internalType:"struct IRefactor.Factor",name:"next",type:"tuple"}],name:"ChangedFactor",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"previous",type:"uint256"},{indexed:!1,internalType:"uint256",name:"current",type:"uint256"},{indexed:!1,internalType:"uint256",name:"shiftCount",type:"uint256"}],name:"FactorSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"MINTER_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"OPERATOR_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"REFACTOR_BOUNDARY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"REFACTOR_DIVIDER",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"_allowances",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"accountBalanceIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"accountBalanceSnapshots",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"addAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"addMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"addOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"aliveImplementation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],internalType:"struct IRefactor.Balance",name:"_balance",type:"tuple"}],name:"applyFactor",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"snapshotId",type:"uint256"}],name:"balanceOfAt",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"factor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"factorSnapshotIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"factorSnapshots",outputs:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getBalanceAndFactor",outputs:[{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],internalType:"struct IRefactor.Balance",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],internalType:"struct IRefactor.Factor",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"snapshotId",type:"uint256"}],name:"getBalanceAndFactorAt",outputs:[{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],internalType:"struct IRefactor.Balance",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],internalType:"struct IRefactor.Factor",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalAndFactor",outputs:[{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],internalType:"struct IRefactor.Balance",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],internalType:"struct IRefactor.Factor",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"snapshotId",type:"uint256"}],name:"getTotalAndFactorAt",outputs:[{components:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],internalType:"struct IRefactor.Balance",name:"",type:"tuple"},{components:[{internalType:"uint256",name:"factor",type:"uint256"},{internalType:"uint256",name:"refactorCount",type:"uint256"}],internalType:"struct IRefactor.Factor",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"uint256",name:"factor_",type:"uint256"},{internalType:"address",name:"seigManager_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isAdmin",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isOperator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isOwner",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"lastSnapshotId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"pauseProxy",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"progressSnapshotId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"proxyImplementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"removeOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"revokeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"revokeOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"seigManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"",type:"bytes4"}],name:"selectorImplementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"factor_",type:"uint256"}],name:"setFactor",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_seigManager",type:"address"}],name:"setSeigManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"snapshotId",type:"uint256"}],name:"totalSupplyAt",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}
1],name:"totalSupplySnapshotIds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"totalSupplySnapshots",outputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"refactoredCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"transferAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],w={RAYDIFF:BigInt("1"+"0".repeat(9)),RAY:BigInt("1"+"0".repeat(27)),REFACTOR_DIVIDER:BigInt(2),REFACTOR_BOUNDARY:BigInt("1"+"0".repeat(28)),ZERO_ADDRESS:"0x0000000000000000000000000000000000000000",ONE_ADDRESS:"0x0000000000000000000000000000000000000001"},x=e=>{let t=0,n=e;for(;n>=w.REFACTOR_BOUNDARY;)n/=w.REFACTOR_DIVIDER,t++;return{factor:n,refactorCount:BigInt(t)}},E=(e,t,n,r)=>{let i=n*e/w.RAY,a=t-r,s=BigInt(1);for(let e=0;e<a;e++)s*=w.REFACTOR_DIVIDER;return i*s};function _(e,t,n){let[r,i]=(0,s.useState)(""),[a,o]=(0,s.useState)(""),[u,c]=(0,s.useState)(!0),[l,d]=(0,s.use
1State)(null),{publicClient:p}=h(),{data:m}=function(e={}){let{watch:t=!1,pollingInterval:n=12e3}=e,[r,i]=(0,s.useState)(null),{publicClient:a}=h(),o=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=async()=>{try{if(a){let e=await a.getBlockNumber();i(e)}}catch(e){console.error("Error fetching block number:",e)}};return e(),t&&(o.current=setInterval(e,n)),()=>{o.current&&(clearInterval(o.current),o.current=null)}},[a,t,n]),{data:r,isLoading:null===r,refetch:async()=>{try{if(a){let e=await a.getBlockNumber();return i(e),e}}catch(e){console.error("Error fetching block number:",e)}return null}}}({watch:!0}),{data:y}=f({contract:"SeigManager",functionName:"lastSeigBlock",enabled:!!e}),{data:g}=f({contract:"SeigManager",functionName:"seigPerBlock",enabled:!!e}),{data:_}=f({contract:"SeigManager",functionName:"relativeSeigRate",enabled:!!e}),{data:A,error:I}=f({contract:"SeigManager",functionName:"tot",enabled:!!e}),{data:T}=f({contract:"SeigManager",functionName:"commissionRates",args:[e],enabled:!!e}),{data:k}=f({contract:"SeigManager",functionName:"isCommissionRateNegative",args:[e],enabled:!!e}),{data:P}=f({contract:"SeigManager",functionName:"coinages",args:[e],enabled:!!e}),{data:O}=f({contract:"TON",functionName:"totalSupply",enabled:!!e}),{chainId:S}=function(){let{publicClient:e}=h();return{chainId:e?.chain?.id}}(),{data:C}=f({contract:"TON",functionName:"balanceOf",args:[b(S)],enabled:!!e}),{data:N}=f({contract:"TON",functionName:"balanceOf",args:[w.ZERO_ADDRESS],enabled:!!e}),{data:B}=f({contract:"TON",functionName:"balanceOf",args:[w.ONE_ADDRESS],enabled:!!e}),R=(0,s.useMemo)(()=>!!(e&&n&&p&&m&&y&&g&&_&&A&&P&&O&&C&&null!==N&&B&&t&&t!==BigInt(0)),[e,n,p,m,y,g,_,A,P,O,C,N,B,t]),M=(0,s.useMemo)(()=>r?(Number(r)/1e27).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:6}):null,[r]),F=(0,s.useMemo)(()=>a?(Number(a)/1e18).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):null,[a]);return(0,s.useEffect)(()=>{(async()=>{if(!R){c(!0);return}try{let r;c(!0);let[a,s,u]=await Promise.all([p.readContract({address:A,abi:v,functionName:"totalSupply"}),p.readContract({address:A,abi:v,functionName:"factor"}),p.readContract({address:A,abi:v,functionName:"getBalanceAndFactor",args:[e]})]),[l,f]=await Promise.all([p.readContract({address:P,abi:[{name:"totalSupply",type:"function",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]}],functionName:"totalSupply"}),p.readContract({address:P,abi:[{name:"balanceOf",type:"function",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]}],functionName:"balanceOf",args:[n]})]),h=(BigInt(O.toString())-BigInt(C.toString())-BigInt(N.toString())-BigInt(B.toString()))*w.RAYDIFF+a,b=m-y,I=g*b,S=I*a/h,R=S+(I-S)*_/w.RAY,{factor:M,refactorCount:F}=x((a+R)*s/a),j=u[0].balance,U=u[0].refactoredCount,$=E(M,F,j,U)-l,z=T?BigInt(T.toString()):BigInt(0);if(z!==BigInt(0)){if(k)r=$*f/t;else{let e=$*z/w.RAY;r=($-e)*f/t}}else r=$*f/t;o($.toString()),i(r.toString()),c(!1),d(null)}catch(e){console.error("Error calculating expectedSeig:",e),d(e instanceof Error?e:Error("Failed to calculate expected seig")),c(!1)}})()},[R,n,e,t,p,m,y,g,_,A,P,O,C,N,B,T,k]),{expectedSeig:r,formattedExpectedSeig:M,seigOfLayer:a,formattedSeigOfLayer:F,lastSeigBlock:y?.toString()??null,isLoading:u,error:l}}function A(){let[e,t]=(0,s.useState)([]),{totalCandidateNums:n,isLoading:r,error:i}=function(){let{data:e,error:t,isError:n,isLoading:r,read:i}=f({contract:"Layer2Registry",functionName:"numLayer2s"});return{totalCandidateNums:e,error:t,isError:n,isLoading:r,read:i}}(),[a,o]=(0,s.useState)(!0),[u,c]=(0,s.useState)(null),l=d();return(0,s.useEffect)(()=>{(async()=>{if(n)try{o(!0);let e=[];for(let t=0;t<10;t++){let n=await l.contractOperationManager.readContract({contract:"Layer2Registry",functionName:"layer2ByIndex",args:[t]});e.push(n)}t(e)}catch(e){c(e instanceof Error?e:Error("Failed to fetch candidates"))}finally{o(!1)}})()},[n,l]),{candidates:e,isLoading:a||r,error:u||i,totalCount:n?Number(n):0}}var I=((r=I||{}).CANDIDATE="CANDIDATE",r.PRIVATE_LAYER2_CANDIDATE="PRIVATE_LAYER2_CANDIDATE",r.CANDIDATE_ADDON="CANDIDATE_ADDON",r.UNKNOWN="UNKNOWN",r),T=((i=T||{})[i.UNKNOWN=0]="UNKNOWN",i[i.LEGACY_OPTIMISM=1]="LEGACY_OPTIMISM",i[i.THANOS_STACK=2]="THANOS_STACK",i),k=((a=k||{})[a.NONE=0]="NONE",a[a.REGISTERED=1]="REGISTERED",a[a.PAUSED=2]="PAUSED",a);function P({candidateAddress:e}
1){let[t,n]=(0,s.useState)(null),[r,i]=(0,s.useState)(!0),[a,o]=(0,s.useState)(null),{data:u,isLoading:c,error:l}=f({contract:"SeigManager",functionName:"getLayer2RewardInfo",args:[e],enabled:!!e});(0,s.useEffect)(()=>{if(c){i(!0);return}if(i(!1),l){o(l);return}if(u)try{let e,t,r;if(Array.isArray(u))[e,t,r]=u;else if("object"==typeof u&&null!==u)e=u.layer2Tvl,t=u.initialDebt,r=u.startBlock;else throw Error("Unexpected data format from getLayer2RewardInfo");n({layer2Tvl:e,initialDebt:t,startBlock:r})}catch(e){o(e instanceof Error?e:Error("Failed to process Layer2 reward info data"))}else o(Error("No Layer2 reward info data returned"))},[u,c,l]);let d=(0,s.useMemo)(()=>t?.layer2Tvl?(Number(t.layer2Tvl)/1e18).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):null,[t?.layer2Tvl]),h=(0,s.useMemo)(()=>t?.initialDebt?(Number(t.initialDebt)/1e18).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):null,[t?.initialDebt]);return{layer2Reward:t,isLoading:r,error:a,formattedLayer2Tvl:d,formattedInitialDebt:h,startBlock:t?.startBlock}}},80660:function(e,t,n){n.d(t,{s:function(){return r}});function r(e,t={}){let n;try{n=e.getClient(t)}catch{}return n}},42467:function(e,t,n){n.d(t,{L:function(){return a}});var r=n(3796),i=n(61954);function a(e,t){let{chainId:n,...a}=t,s=e.getClient({chainId:n});return(0,i.s)(s,r.L,"readContract")(a)}},34954:function(e,t,n){n.d(t,{OP:function(){return o},if:function(){return i},kq:function(){return a}});var r=n(56298);function i(e,t){return(0,r.Q$)(e,t)}function a(e){return JSON.stringify(e,(e,t)=>!function(e){if(!s(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(s(n)&&n.hasOwnProperty("isPrototypeOf"))}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}))}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(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:m,getPreviousPageParam:y,getNextPageParam:g,initialPageParam:b,_optimisticResults:v,enabled:w,notifyOnChangeProps:x,placeholderData:E,refetchInterval:_,refetchIntervalInBackground:A,refetchOnMount:I,refetchOnReconnect:T,refetchOnWindowFocus:k,retryOnMount:P,select:O,staleTime:S,suspense:C,throwOnError:N,config:B,connector:R,query:M,...F}=e;return F}},61954:function(e,t,n){n.d(t,{s:function(){return r}});function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}},59963:function(e,t,n){n.d(t,{G:function(){return r}});class r extends Error{constructor(e,t={}){let n=t.cause instanceof r?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof r&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],"Version: [email protected]"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}},74022:function(e,t,n){n.d(t,{F:function(){return a},Hk:function(){return s},a_:function(){return i}});var r=n(59963);class i extends r.G{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class a extends r.G{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class s extends r.G{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}},88454:function(e,t,n){n.d(t,{TT:function(){return a},_D:function(){return o},aZ:function(){return u},jO:function(){return i},zL:function(){return s}});var r=n(59963);class i extends r.G{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class a extends r.G{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class s extends r.G{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class o extends r.G{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class u extends r.G{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
1d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}},67440:function(e,t,n){n.d(t,{H6:function(){return s},Vs:function(){return a},wn:function(){return i}});var r=n(59963);class i extends r.G{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class a extends r.G{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class s extends r.G{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}},4822:function(e,t,n){n.d(t,{t:function(){return i}});var r=n(45607);function i(e){return"function"===e.type?`function ${e.name}(${(0,r.P)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,r.P)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,r.P)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,r.P)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,r.P)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"}},45607:function(e,t,n){n.d(t,{P:function(){return a}});var r=n(43197);let i=/^tuple(?<array>(\[(\d*)\])*)$/;function a(e){let t="",n=e.length;for(let a=0;a<n;a++)t+=function e(t){let n=t.type;if(i.test(t.type)&&"components"in t){n="(";let a=t.components.length;for(let r=0;r<a;r++)n+=e(t.components[r]),r<a-1&&(n+=", ");let s=(0,r.Zw)(i,t.type);return n+=`)${s?.array??""}`,e({...t,type:n})}return("indexed"in t&&t.indexed&&(n=`${n}
1 indexed`),t.name)?`${n} ${t.name}`:n}(e[a]),a!==n-1&&(t+=", ");return t}},60365:function(e,t,n){n.d(t,{Dt:function(){return I},EC:function(){return w},N0:function(){return p},PI:function(){return b},QM:function(){return _},SA:function(){return s},Wg:function(){return A},_c:function(){return a},a4:function(){return g},c3:function(){return u},g1:function(){return m},l$:function(){return f},qm:function(){return x},rh:function(){return d},wA:function(){return c}});var r=n(43197);let i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function a(e){return i.test(e)}function s(e){return(0,r.Zw)(i,e)}let o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function u(e){return o.test(e)}function c(e){return(0,r.Zw)(o,e)}let l=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function d(e){return l.test(e)}function f(e){return(0,r.Zw)(l,e)}let h=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function p(e){return h.test(e)}function m(e){return(0,r.Zw)(h,e)}let y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function g(e){return y.test(e)}function b(e){return(0,r.Zw)(y,e)}let v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function w(e){return v.test(e)}function x(e){return(0,r.Zw)(v,e)}let E=/^receive\(\) external payable$/;function _(e){return E.test(e)}let A=new Set(["indexed"]),I=new Set(["calldata","memory","storage"])},16748:function(e,t,n){n.d(t,{D:function(){return d}});var r=n(43197),i=n(74022),a=n(88454),s=n(67440),o=n(59963);class u extends o.G{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var c=n(60365),l=n(20090);function d(e){let t={},n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!(0,c.N0)(n))continue;let i=(0,c.g1)(n);if(!i)throw new s.wn({signature:n,type:"struct"});let a=i.properties.split(";"),o=[],u=a.length;for(let e=0;e<u;e++){let t=a[e].trim();if(!t)continue;let n=(0,l.C$)(t,{type:"struct"});o.push(n)}if(!o.length)throw new s.H6({signature:n});t[i.name]=o}let o={},d=Object.entries(t),h=d.length;for(let e=0;e<h;e++){let[n,s]=d[e];o[n]=function e(t,n,s=new Set){let o=[],c=t.length;for(let d=0;d<c;d++){let c=t[d];if(r.cN.test(c.type))o.push(c);else{let t=(0,r.Zw)(f,c.type);if(!t?.type)throw new a.aZ({abiParameter:c});let{array:d,type:h}=t;if(h in n){if(s.has(h))throw new u({type:h});o.push({...c,type:`tuple${d??""}`,components:e(n[h]??[],n,new Set([...s,h]))})}else if((0,l.uN)(h))o.push(c);else throw new i.F({type:h})}}return o}(s,t)}return o}let f=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/},20090:function(e,t,n){n.d(t,{uN:function(){return g},C$:function(){return m},cK:function(){return d}});var r=n(43197),i=n(74022),a=n(88454),s=n(67440),o=n(59963);class u extends o.G{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let c=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var l=n(60365);function d(e,t={}){if((0,l.rh)(e))return function(e,t={}){let n=(0,l.l$)(e);if(!n)throw new s.wn({signature:e,type:"function"});let r=y(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(m(r[e],{modifiers:l.Dt,structs:t,type:"function"}));let o=[];if(n.returns){let e=y(n.returns),r=e.length;for(let n=0;n<r;n++)o.push(m(e[n],{modifiers:l.Dt,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:o}}(e,t);if((0,l.c3)(e))return function(e,t={}){let n=(0,l.wA)(e);if(!n)throw new s.wn({signature:e,type:"event"});let r=y(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(m(r[e],{modifiers:l.Wg,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:i}}(e,t);if((0,l._c)(e))return function(e,t={}){let n=(0,l.SA)(e);if(!n)throw new s.wn({signature:e,type:"error"});let r=y(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(m(r[e],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:i}}(e,t);if((0,l.a4)(e))return function(e,t={}){let n=(0,l.PI)(e);if(!n)throw new s.wn({signature:e,type:"constructor"});let r=y(n.parameters),i=[],a=r.length;for(let e=0;e<a;e++)i.push(m(r[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}(e,t);if((0,l.EC)(e))return function(e){let t=(0,l.qm)(e);if(!t)throw new s.wn({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}(e);if((0,l.QM)(e))return{type:"receive",stateMutability:"payable"};throw new s.Vs({signature:e})}let f=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function m(e,t){var n,s;let o;let u=function(e,t,n){let r="";if(n)for(let e of Object.entries(n)){if(!e)continue;let t="";for(let n of e[1])t+=`[${n.type}${n.name?`:${n.name}`:""}]`;r+=`(${e[0]}{${t}})`}return t?`${t}:${e}${r}`:e}(e,t?.type,t?.structs);if(c.has(u))return c.get(u);let d=r.cN.test(e),v=(0,r.Zw)(d?h:f,e);if(!v)throw new a.jO({param:e});if(v.name&&("address"===(n=v.name)||"bool"===n||"function"===n||"string"===n||"tuple"===n||r.eL.test(n)||r.lh.test(n)||b.test(n)))throw new a.TT({param:e,name:v.name});let w=v.name?{name:v.name}:{},x="indexed"===v.modifier?{indexed:!0}:{},E=t?.structs??{},_={};if(d){o="tuple";let e=y(v.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(m(e[r],{structs:E}));_={components:t}}else if(v.type in E)o="tuple",_={components:E[v.type]};else if(p.test(v.type))o=`${v.type}256`;else if(o=v.type,t?.type!=="struct"&&!g(o))throw new i.Hk({type:o});if(v.modifier){if(!t?.modifiers?.has?.(v.modifier))throw new a.zL({param:e,type:t?.type,modifier:v.modifier});if(l.Dt.has(v.modifier)&&(s=o,!v.array&&"bytes"!==s&&"string"!==s&&"tuple"!==s))throw new a._D({param:e,type:t?.type,modifier:v.modifier})}let A={type:`${o}${v.array??""}`,...w,...x,..._};return c.set(u,A),A}function y(e,t=[],n="",r=0){let i=e.trim().length;for(let a=0;a<i;a++){let i=e[a],s=e.slice(a+1);switch(i){case",":return 0===r?y(s,[...t,n.trim()]):y(s,t,`${n}${i}`,r);case"(":return y(s,t,`${n}${i}`,r+1);case")":return y(s,t,`${n}${i}`,r-1);default:return y(s,t,`${n}${i}`,r)}}if(""===n)return t;if(0!==r)throw new u({current:n,depth:r});return t.push(n.trim()),t}function g(e){return"address"===e||"bool"===e||"function"===e||"string"===e||r.eL.test(e)||r.lh.test(e)}let b=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/},43197:function(e,t,n){function r(e,t){let n=e.exec(t);return n?.groups}n.d(t,{Zw:function(){return r},cN:function(){return s},eL:function(){return i},lh:function(){return a}});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,a=/^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)?$/,s=/^\(.+?\).*?$/},36393:function(e,t,n){n.d(t,{v:function(){return r}});var r=n(37836);t.Z=r},95862:function(e,t,n){n.d(t,{o:function(){return a}});var r=n(4438);function i(e){return{address:e.address,amount:r.xS(e.amount),index:r.xS(e.index),validatorIndex:r.xS(e.validatorIndex)}}function a(e){return{..."bigint"==typeof e.baseFeePerGas&&{baseFeePerGas:r.xS(e.baseFeePerGas)},..."bigint"==typeof e.blobBaseFee&&{blobBaseFee:r.xS(e.blobBaseFee)},..."string"==typeof e.feeRecipient&&{feeRecipient:e.feeRecipient}
vendor: 4,314 bytes, line 1
1,..."bigint"==typeof e.gasLimit&&{gasLimit:r.xS(e.gasLimit)},..."bigint"==typeof e.number&&{number:r.xS(e.number)},..."bigint"==typeof e.prevRandao&&{prevRandao:r.xS(e.prevRandao)},..."bigint"==typeof e.time&&{time:r.xS(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(i)}}}},37870:function(e,t,n){n.d(t,{G:function(){return r}});class r extends Error{constructor(e,t={}){let n=(()=>{if(t.cause instanceof r){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof r&&t.cause.docsPath||t.docsPath,a=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||i?["",n?`Details: ${n}`:void 0,i?`See: ${a}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=n,this.docs=a,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}},4438:function(e,t,n){n.d(t,{$s:function(){return _},Gu:function(){return g},J5:function(){return b},M6:function(){return x},O3:function(){return c},Q_:function(){return h},dp:function(){return y},eh:function(){return p},mL:function(){return f},mV:function(){return E},tP:function(){return m},xS:function(){return d},xv:function(){return l},zo:function(){return u}});var r=n(37870),i=n(93156),a=n(55793);let s=new TextEncoder,o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function c(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?(a.Yf(n,t.size),h(n,t.size)):n}function l(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=o[e[t]];let r=`0x${n}`;return"number"==typeof t.size?(a.Yf(r,t.size),p(r,t.size)):r}function d(e,t={}){let n;let{signed:r,size:i}=t,a=BigInt(e);i?n=r?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let s="bigint"==typeof n&&r?-n-1n:0;if(n&&a>n||a<s){let t="bigint"==typeof e?"n":"";throw new b({max:n?`${n}${t}`:void 0,min:`${s}${t}`,signed:r,size:i,value:`${e}${t}`})}let o=(r&&a<0?(1n<<BigInt(8*i))+BigInt(a):a).toString(16),u=`0x${o}`;return i?h(u,i):u}function f(e,t={}){return l(s.encode(e),t)}function h(e,t){return a.vk(e,{dir:"left",size:t})}function p(e,t){return a.vk(e,{dir:"right",size:t})}function m(e,t,n,r={}){let{strict:i}=r;a.EM(e,t);let s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return i&&a.Ro(s,t,n),s}function y(e){return Math.ceil((e.length-2)/2)}function g(e,t={}){let{strict:n=!1}=t;try{return!function(e,t={}){let{strict:n=!1}=t;if(!e||"string"!=typeof e)throw new v(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new w(e)}(e,{strict:n}),!0}catch{return!1}}class b extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number \`${i}\` is not in safe${r?` ${8*r}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class v extends r.G{constructor(e){super(`Value \`${"object"==typeof e?i.P(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class w extends r.G{constructor(e){super(`Value \`${e}
1\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class x extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class E extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class _ extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}},93156:function(e,t,n){n.d(t,{P:function(){return r}});function r(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+"#__bigint":n,n)}},55793:function(e,t,n){n.d(t,{EM:function(){return a},Ro:function(){return s},Yf:function(){return i},vk:function(){return o}});var r=n(4438);function i(e,t){if(r.dp(e)>t)throw new r.M6({givenSize:r.dp(e),maxSize:t})}function a(e,t){if("number"==typeof t&&t>0&&t>r.dp(e)-1)throw new r.mV({offset:t,position:"start",size:r.dp(e)})}function s(e,t,n){if("number"==typeof t&&"number"==typeof n&&r.dp(e)!==n-t)throw new r.mV({offset:n,position:"end",size:r.dp(e)})}function o(e,t={}){let{dir:n,size:i=32}=t;if(0===i)return e;let a=e.replace("0x","");if(a.length>2*i)throw new r.$s({size:Math.ceil(a.length/2),targetSize:i,type:"Hex"});return`0x${a["right"===n?"padEnd":"padStart"](2*i,"0")}`}},96104:function(e,t,n){n.d(t,{T:function(){return r}});function r(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},78045:function(e,t,n){n.d(t,{O:function(){return m}});var r=n(21620),i=n(97225),a=n(31006),s=n(18543),o=n(77955),u=n(95046),c=n(25652),l=n(62517),d=n(82978),f=n(68890),h=n(93413),p=n(3796);async function m(e,t){let{blockNumber:n,blockTag:m,coinType:y,name:g,gatewayUrls:b,strict:v}=t,{chain:w}=e,x=(()=>
1{if(t.universalResolverAddress)return t.universalResolverAddress;if(!w)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:n,chain:w,contract:"ensUniversalResolver"})})(),E=null==w?void 0:w.ensTlds;if(E&&!E.some(e=>g.endsWith(e)))return null;try{let t=(0,a.R)({abi:r.X$,functionName:"addr",...null!=y?{args:[(0,d.V)(g),BigInt(y)]}:{args:[(0,d.V)(g)]}}),s={address:x,abi:r.k3,functionName:"resolve",args:[(0,u.NC)((0,f.T)(g)),t,null!=b?b:[l.M]],blockNumber:n,blockTag:m},c=(0,h.s)(e,p.L,"readContract"),v=await c(s);if("0x"===v[0])return null;let w=(0,i.k)({abi:r.X$,args:null!=y?[(0,d.V)(g),BigInt(y)]:void 0,functionName:"addr",data:v[0]});if("0x"===w||"0x00"===(0,o.f)(w))return null;return w}catch(e){if(v)throw e;if((0,c.c)(e,"resolve"))return null;throw e}}},48061:function(e,t,n){n.d(t,{r:function(){return A}});var r=n(3796),i=n(6649);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: ".concat(JSON.stringify(e))],name:"EnsAvatarInvalidMetadataError"})}}class s extends i.G{constructor({reason:e}){super("ENS NFT avatar URI is invalid. ".concat(e),{name:"EnsAvatarInvalidNftUriError"})}}class o extends i.G{constructor({uri:e}){super('Unable to resolve ENS avatar URI "'.concat(e,'". The URI may be malformed, invalid, or does not respond with a valid image.'),{name:"EnsAvatarUriResolutionError"})}}class u extends i.G{constructor({namespace:e}){super('ENS NFT avatar namespace "'.concat(e,'" is not supported. Must be "erc721" or "erc1155".'),{name:"EnsAvatarUnsupportedNamespaceError"})}}let c=RegExp("(?<protocol>https?:\\/\\/[^\\/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?<root>\\/)?(?<subpath>ipfs\\/|ipns\\/)?(?<target>[\\w\\-.]+)(?<subtarget>\\/.*)?"),l=RegExp("^(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 null==e?void 0: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 m(e){let{uri:t,gatewayUrls:n}=e,r=d.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};let i=p(null==n?void 0:n.ipfs,"https://ipfs.io"),a=p(null==n?void 0:n.arweave,"https://arweave.net"),s=t.match(c),{protocol:u,subpath:h,target:m,subtarget:y=""}=(null==s?void 0:s.groups)||{},g="ipns:/"===u||"ipns/"===h,b="ipfs:/"===u||"ipfs/"===h||l.test(t);if(t.startsWith("http")&&!g&&!b){let e=t;return(null==n?void 0:n.arweave)&&(e=t.replace(/https:\/\/arweave.net/g,null==n?void 0:n.arweave)),{uri:e,isOnChain:!1,isEncoded:!1}}if((g||b)&&m)return{uri:"".concat(i,"/").concat(g?"ipns":"ipfs","/").concat(m).concat(y),isOnChain:!1,isEncoded:!1};if("ar:/"===u&&m)return{uri:"".concat(a,"/").concat(m).concat(y||""),isOnChain:!1,isEncoded:!1};let v=t.replace(f,"");if(v.startsWith("<svg")&&(v="data:image/svg+xml;base64,".concat(btoa(v))),v.startsWith("data:")||v.startsWith("{"))return{uri:v,isOnChain:!0,isEncoded:!1};throw new o({uri:t})}function y(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 g(e){let{gatewayUrls:t,uri:n}=e;try{let e=await fetch(n).then(e=>e.json());return await b({gatewayUrls:t,uri:y(e)})}catch(e){throw new o({uri:n})}}async function b(e){let{gatewayUrls:t,uri:n}=e,{uri:r,isOnChain:i}=m({uri:n,gatewayUrls:t});if(i||await h(r))return r;throw new o({uri:n})}async function v(e,t){let{nft:n}=t;if("erc721"===n.namespace)return(0,r.L)(e,{address:n.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(n.tokenID)]});if("erc1155"===n.namespace)return(0,r.L)(e,{address:n.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(n.tokenID)]});throw new u({namespace:n.namespace})}async function w(e,t){let{gatewayUrls:n,record:r}=t;return/eip155:/i.test(r)?x(e,{gatewayUrls:n,record:r}):b({uri:r,gatewayUrls:n})}async function x(e,t){let{gatewayUrls:n,record:r}=t,i=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:Number.parseInt(o),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}}(r),{uri:a,isOnChain:o,isEncoded:u}=m({uri:await v(e,{nft:i}),gatewayUrls:n});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{")))return b({uri:y(JSON.parse(u?atob(a.replace("data:application/json;base64,","")):a)),gatewayUrls:n});let c=i.tokenID;return"erc1155"===i.namespace&&(c=c.replace("0x","").padStart(64,"0")),g({gatewayUrls:n,uri:a.replace(/(?:0x)?{id}/,c)})}var E=n(93413),_=n(133);async function A(e,t){let{blockNumber:n,blockTag:r,assetGatewayUrls:i,name:a,gatewayUrls:s,strict:o,universalResolverAddress:u}=t,c=await (0,E.s)(e,_.g,"getEnsText")({blockNumber:n,blockTag:r,key:"avatar",name:a,universalResolverAddress:u,gatewayUrls:s,strict:o});if(!c)return null;try{return await w(e,{record:c,gatewayUrls:i})}catch(e){return null}}},48729:function(e,t,n){n.d(t,{w:function(){return l}});var r=n(21620),i=n(18543),a=n(95046),s=n(25652),o=n(68890),u=n(93413),c=n(3796);async function l(e,t){let{address:n,blockNumber:l,blockTag:d,gatewayUrls:f,strict:h,universalResolverAddress:p}=t,m=p;if(!m){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");m=(0,i.L)({blockNumber:l,chain:e.chain,contract:"ensUniversalResolver"})}let y="".concat(n.toLowerCase().substring(2),".addr.reverse");try{let t={address:m,abi:r.du,functionName:"reverse",args:[(0,a.NC)((0,o.T)(y))],blockNumber:l,blockTag:d},i=(0,u.s)(e,c.L,"readContract"),[s,h]=f?await i({...t,args:[...t.args,f]}):await i(t);if(n.toLowerCase()!==h.toLowerCase())return null;return s}catch(e){if(h)throw e;if((0,s.c)(e,"reverse"))return null;throw e}}},2886:function(e,t,n){n.d(t,{S:function(){return u}});var r=n(18543),i=n(95046),a=n(68890),s=n(93413),o=n(3796);async function u(e,t){let{blockNumber:n,blockTag:u,name:c}=t,{chain:l}=e,d=(()=>
1{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw Error("client chain not configured. universalResolverAddress is required.");return(0,r.L)({blockNumber:n,chain:l,contract:"ensUniversalResolver"})})(),f=null==l?void 0:l.ensTlds;if(f&&!f.some(e=>c.endsWith(e)))throw Error("".concat(c," is not a valid ENS TLD (").concat(null==f?void 0:f.join(", "),') for chain "').concat(l.name,'" (id: ').concat(l.id,")."));let[h]=await (0,s.s)(e,o.L,"readContract")({address:d,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,i.NC)((0,a.T)(c))],blockNumber:n,blockTag:u});return h}},133:function(e,t,n){n.d(t,{g:function(){return p}});var r=n(21620),i=n(97225),a=n(31006),s=n(18543),o=n(95046),u=n(25652),c=n(62517),l=n(82978),d=n(68890),f=n(93413),h=n(3796);async function p(e,t){let{blockNumber:n,blockTag:p,key:m,name:y,gatewayUrls:g,strict:b}=t,{chain:v}=e,w=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!v)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:n,chain:v,contract:"ensUniversalResolver"})})(),x=null==v?void 0:v.ensTlds;if(x&&!x.some(e=>y.endsWith(e)))return null;try{let t={address:w,abi:r.k3,functionName:"resolve",args:[(0,o.NC)((0,d.T)(y)),(0,a.R)({abi:r.nZ,functionName:"text",args:[(0,l.V)(y),m]}),null!=g?g:[c.M]],blockNumber:n,blockTag:p},s=(0,f.s)(e,h.L,"readContract"),u=await s(t);if("0x"===u[0])return null;let b=(0,i.k)({abi:r.nZ,functionName:"text",data:u[0]});return""===b?null:b}catch(e){if(b)throw e;if((0,u.c)(e,"resolve"))return null;throw e}}},89681:function(e,t,n){n.d(t,{uN:function(){return d}});var r=n(93413),i=n(92498),a=n(89431),s=n(83677),o=n(3796),u=n(9660),c=n(19205),l=n(85721);function d(e){let{abi:t,address:n,client:d}=e,[p,m]=d?"public"in d&&"wallet"in d?[d.public,d.wallet]:"public"in d?[d.public,void 0]:"wallet"in d?[void 0,d.wallet]:[d,d]:[void 0,void 0],y=null!=p,g=null!=m,b={},v=!1,w=!1,x=!1;for(let e of t)if("function"===e.type?"view"===e.stateMutability||"pure"===e.stateMutability?v=!0:w=!0:"event"===e.type&&(x=!0),v&&w&&x)break;return y&&(v&&(b.read=new Proxy({},{get:(e,i)=>function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];let{args:u,options:c}=f(a);return(0,r.s)(p,o.L,"readContract")({abi:t,address:n,functionName:i,args:u,...c})}})),w&&(b.simulate=new Proxy({},{get:(e,i)=>function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];let{args:o,options:c}=f(a);return(0,r.s)(p,u.a,"simulateContract")({abi:t,address:n,functionName:i,args:o,...c})}})),x&&(b.createEventFilter=new Proxy({},{get:(e,a)=>function(){for(var e=arguments.length,s=Array(e),o=0;o<e;o++)s[o]=arguments[o];let{args:u,options:c}=h(s,t.find(e=>"event"===e.type&&e.name===a));return(0,r.s)(p,i.A,"createContractEventFilter")({abi:t,address:n,eventName:a,args:u,...c})}}),b.getEvents=new Proxy({},{get:(e,i)=>function(){for(var e=arguments.length,a=Array(e),o=0;o<e;o++)a[o]=arguments[o];let{args:u,options:c}=h(a,t.find(e=>"event"===e.type&&e.name===i));return(0,r.s)(p,s.m,"getContractEvents")({abi:t,address:n,eventName:i,args:u,...c})}}),b.watchEvent=new Proxy({},{get:(e,i)=>function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];let{args:o,options:u}=h(a,t.find(e=>"event"===e.type&&e.name===i));return(0,r.s)(p,c.Y,"watchContractEvent")({abi:t,address:n,eventName:i,args:o,...u})}}))),g&&w&&(b.write=new Proxy({},{get:(e,i)=>function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];let{args:o,options:u}=f(a);return(0,r.s)(m,l.n,"writeContract")({abi:t,address:n,functionName:i,args:o,...u})}})),(y||g)&&w&&(b.estimateGas=new Proxy({},{get:(e,i)=>function(){for(var e,s=arguments.length,o=Array(s),u=0;u<s;u++)o[u]=arguments[u];let{args:c,options:l}=f(o),d=null!=p?p:m;return(0,r.s)(d,a.D,"estimateContractGas")({abi:t,address:n,functionName:i,args:c,...l,account:null!==(e=l.account)&&void 0!==e?e:m.account})}})),b.address=n,b.abi=t,b}function f(e){var t;let n=e.length&&Array.isArray(e[0]);return{args:n?e[0]:[],options:null!==(t=n?e[1]:e[0])&&void 0!==t?t:{}}}function h(e,t){var n;let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some(e=>e.indexed):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:null!==(n=r?e[1]:e[0])&&void 0!==n?n:{}}}},63322:function(e,t,n){n.d(t,{R:function(){return I}});var r=n(60365),i=n(16748),a=n(20090);function s(e){let t=(0,i.D)(e),n=[],s=e.length;for(let i=0;i<s;i++){let s=e[i];(0,r.N0)(s)||n.push((0,a.cK)(s,t))}return n}var o=n(95862),u=n(96104),c=n(21620),l=n(13955),d=n(6649),f=n(89045),h=n(58591),p=n(97225),m=n(32637),y=n(31006),g=n(18543),b=n(95046),v=n(8114),w=n(27031),x=n(37669),E=n(10639),_=n(11667),A=n(33425);async function I(e,t){var r,i,a,c;let{account:p=e.account,authorizationList:y,batch:g=!!(null===(r=e.batch)||void 0===r?void 0:r.multicall),blockNumber:E,blockTag:I="latest",accessList:k,blobs:P,blockOverrides:O,code:S,data:C,factory:N,factoryData:B,gas:R,gasPrice:M,maxFeePerBlobGas:F,maxFeePerGas:j,maxPriorityFeePerGas:U,nonce:$,to:z,value:G,stateOverride:L,...D}=t,Z=p?(0,u.T)(p):void 0;if(S&&(N||B))throw new d.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(S&&z)throw new d.G("Cannot provide both `code` & `to` as parameters.");
1let q=S&&C,H=N&&B&&z&&C,V=q||H,W=q?function(e){let{code:t,data:n}=e;return(0,m.w)({abi:s(["constructor(bytes, bytes)"]),bytecode:l.NO,args:[t,n]})}({code:S,data:C}):H?function(e){let{data:t,factory:n,factoryData:r,to:i}=e;return(0,m.w)({abi:s(["constructor(address, bytes, address, bytes)"]),bytecode:l.pG,args:[i,t,n,r]})}({data:C,factory:N,factoryData:B,to:z}):C;try{(0,A.F)(t);let n=("bigint"==typeof E?(0,b.eC)(E):void 0)||I,r=O?o.o(O):void 0,s=(0,_.mF)(L),u=null===(c=e.chain)||void 0===c?void 0:null===(a=c.formatters)||void 0===a?void 0:null===(i=a.transactionRequest)||void 0===i?void 0:i.format,l=(u||x.tG)({...(0,w.K)(D,{format:u}),from:null==Z?void 0:Z.address,accessList:k,authorizationList:y,blobs:P,data:W,gas:R,gasPrice:M,maxFeePerBlobGas:F,maxFeePerGas:j,maxPriorityFeePerGas:U,nonce:$,to:V?void 0:z,value:G});if(g&&function(e){let{request:t}=e,{data:n,to:r,...i}=t;return!(!n||n.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(i).filter(e=>void 0!==e).length>0)}({request:l})&&!s&&!r)try{return await T(e,{...l,blockNumber:E,blockTag:I})}catch(e){if(!(e instanceof f.pZ)&&!(e instanceof f.mm))throw e}let d=(()=>{let e=[l,n];return s&&r?[...e,s,r]:s?[...e,s]:r?[...e,{},r]:e})(),h=await e.request({method:"eth_call",params:d});if("0x"===h)return{data:void 0};return{data:h}}catch(s){let r=function(e){var t;if(!(e instanceof d.G))return;let n=e.walk();return"object"==typeof(null==n?void 0:n.data)?null===(t=n.data)||void 0===t?void 0:t.data:n.data}(s),{offchainLookup:i,offchainLookupSignature:a}=await n.e(26).then(n.bind(n,35026));if(!1!==e.ccipRead&&(null==r?void 0:r.slice(0,10))===a&&z)return{data:await i(e,{data:r,to:z})};if(V&&(null==r?void 0:r.slice(0,10))==="0x101bb98d")throw new h.Mo({factory:N});throw(0,v.P)(s,{...t,account:Z,chain:e.chain})}}async function T(e,t){var n;let{batchSize:r=1024,wait:i=0}="object"==typeof(null===(n=e.batch)||void 0===n?void 0:n.multicall)?e.batch.multicall:{},{blockNumber:a,blockTag:s="latest",data:o,multicallAddress:u,to:l}=t,d=u;if(!d){if(!e.chain)throw new f.pZ;d=(0,g.L)({blockNumber:a,chain:e.chain,contract:"multicall3"})}let m=("bigint"==typeof a?(0,b.eC)(a):void 0)||s,{schedule:v}=(0,E.S)({id:"".concat(e.uid,".").concat(m),wait:i,shouldSplitBatch:e=>e.reduce((e,t)=>{let{data:n}=t;return e+(n.length-2)},0)>2*r,fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,y.R)({abi:c.F8,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{data:r,to:d},m]});return(0,p.k)({abi:c.F8,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:w,success:x}]=await v({data:o,to:l});if(!x)throw new h.VQ({data:w});return"0x"===w?{data:void 0}:{data:w}}},92498:function(e,t,n){n.d(t,{A:function(){return s}});var r=n(36212),i=n(95046),a=n(48586);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"}}},41146:function(e,t,n){n.d(t,{W:function(){return i}});var r=n(48586);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"}}},89431:function(e,t,n){n.d(t,{D:function(){return u}});var r=n(96104),i=n(31006),a=n(92915),s=n(93413),o=n(60730);async function u(e,t){let{abi:n,address:u,args:c,functionName:l,dataSuffix:d,...f}=t,h=(0,i.R)({abi:n,args:c,functionName:l});try{return await (0,s.s)(e,o.Q,"estimateGas")({data:"".concat(h).concat(d?d.replace("0x",""):""),to:u,...f})}catch(t){let e=f.account?(0,r.T)(f.account):void 0;throw(0,a.S)(t,{abi:n,address:u,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:l,sender:null==e?void 0:e.address})}}},42665:function(e,t,n){n.d(t,{C:function(){return c},X:function(){return u}});var r=n(25511),i=n(93413),a=n(72127),s=n(49235),o=n(48206);async function u(e,t){return c(e,t)}async function c(e,t){var n,u,c,l,d;let{block:f,chain:h=e.chain,request:p,type:m="eip1559"}=t||{},y=await (async()=>{var t,n,r;return"function"==typeof(null==h?void 0:null===(t=h.fees)||void 0===t?void 0:t.baseFeeMultiplier)?h.fees.baseFeeMultiplier({block:f,client:e,request:p}):null!==(r=null==h?void 0:null===(n=h.fees)||void 0===n?void 0:n.baseFeeMultiplier)&&void 0!==r?r:1.2})();if(y<1)throw new r.Fz;let g=10**(null!==(c=null===(n=y.toString().split(".")[1])||void 0===n?void 0:n.length)&&void 0!==c?c:0),b=e=>e*BigInt(Math.ceil(y*g))/BigInt(g),v=f||await (0,i.s)(e,s.Q,"getBlock")({});if("function"==typeof(null==h?void 0:null===(u=h.fees)||void 0===u?void 0:u.estimateFeesPerGas)){let t=await h.fees.estimateFeesPerGas({block:f,client:e,multiply:b,request:p,type:m});if(null!==t)return t}if("eip1559"===m){if("bigint"!=typeof v.baseFeePerGas)throw new r.e5;let t="bigint"==typeof(null==p?void 0:p.maxPriorityFeePerGas)?p.maxPriorityFeePerGas:await (0,a.h)(e,{block:v,chain:h,request:p}),n=b(v.baseFeePerGas);return{maxFeePerGas:null!==(l=null==p?void 0:p.maxFeePerGas)&&void 0!==l?l:n+t,maxPriorityFeePerGas:t}}return{gasPrice:null!==(d=null==p?void 0:p.gasPrice)&&void 0!==d?d:b(await (0,i.s)(e,o.o,"getGasPrice")({}))}}},60730:function(e,t,n){n.d(t,{Q:function(){return v}});var r=n(96104),i=n(6649),a=n(72664),s=n(95046),o=n(85053),u=n(49268),c=n(97658);class l extends i.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:a,gasPrice:s,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:h,value:p}){var m;super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,c.xr)({from:null==t?void 0:t.address,to:h,value:void 0!==p&&"".concat((0,o.d)(p)," ").concat((null==r?void 0:null===(m=r.nativeCurrency)||void 0===m?void 0:m.symbol)||"ETH"),data:i,gas:a,gasPrice:void 0!==s&&"".concat((0,u.o)(s)," gwei"),maxFeePerGas:void 0!==l&&"".concat((0,u.o)(l)," gwei"),maxPriorityFeePerGas:void 0!==d&&"".concat((0,u.o)(d)," gwei"),nonce:f}
1)].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var d=n(37764),f=n(43149),h=n(27031),p=n(37669),m=n(11667),y=n(33425),g=n(83435),b=n(5106);async function v(e,t){let{account:n=e.account}=t,o=n?(0,r.T)(n):void 0;try{var u,c,v;let{accessList:n,authorizationList:r,blobs:l,blobVersionedHashes:d,blockNumber:f,blockTag:x,data:E,gas:_,gasPrice:A,maxFeePerBlobGas:I,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:P,value:O,stateOverride:S,...C}=await (0,g.ZE)(e,{...t,parameters:(null==o?void 0:o.type)==="local"?void 0:["blobVersionedHashes"]}),N=("bigint"==typeof f?(0,s.eC)(f):void 0)||x,B=(0,m.mF)(S),R=await (async()=>C.to?C.to:r&&r.length>0?await (0,a.z)({authorization:r[0]}).catch(()=>{throw new i.G("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,y.F)(t);let M=null===(v=e.chain)||void 0===v?void 0:null===(c=v.formatters)||void 0===c?void 0:null===(u=c.transactionRequest)||void 0===u?void 0:u.format,F=(M||p.tG)({...(0,h.K)(C,{format:M}),from:null==o?void 0:o.address,accessList:n,authorizationList:r,blobs:l,blobVersionedHashes:d,data:E,gas:_,gasPrice:A,maxFeePerBlobGas:I,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:P,to:R,value:O});function w(t){let{block:n,request:r,rpcStateOverride:i}=t;return e.request({method:"eth_estimateGas",params:i?[r,null!=n?n:"latest",i]:n?[r,n]:[r]})}let j=BigInt(await w({block:N,request:F,rpcStateOverride:B}));if(r){let t=await (0,b.s)(e,{address:F.from}),n=await Promise.all(r.map(async e=>{let{address:n}=e,r=await w({block:N,request:{authorizationList:void 0,data:E,from:null==o?void 0:o.address,to:n,value:(0,s.eC)(t)},rpcStateOverride:B}).catch(()=>100000n);return 2n*BigInt(r)}));j+=n.reduce((e,t)=>e+t,0n)}return j}catch(n){throw function(e,t){let{docsPath:n,...r}=t;return new l((()=>{let t=(0,f.k)(e,r);return t instanceof d.cj?e:t})(),{docsPath:n,...r})}(n,{...t,account:o,chain:e.chain})}}},72127:function(e,t,n){n.d(t,{_:function(){return u},h:function(){return c}});var r=n(25511),i=n(21019),a=n(93413),s=n(49235),o=n(48206);async function u(e,t){return c(e,t)}async function c(e,t){let{block:n,chain:u=e.chain,request:c}=t||{};try{var l,d,f;let t=null!==(f=null==u?void 0:null===(l=u.fees)||void 0===l?void 0:l.maxPriorityFeePerGas)&&void 0!==f?f:null==u?void 0:null===(d=u.fees)||void 0===d?void 0:d.defaultPriorityFee;if("function"==typeof t){let r=n||await (0,a.s)(e,s.Q,"getBlock")({}),i=await t({block:r,client:e,request:c});if(null===i)throw Error();return i}if(void 0!==t)return t;let r=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.y_)(r)}catch(c){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}}},5106:function(e,t,n){n.d(t,{s:function(){return i}});var r=n(95046);async function i(e,t){let{address:n,blockNumber:i,blockTag:a="latest"}=t,s="bigint"==typeof i?(0,r.eC)(i):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[n,s||a]}))}},49235:function(e,t,n){n.d(t,{Q:function(){return s}});var r=n(87655),i=n(95046),a=n(20621);async function s(e){var t,n,s;let{blockHash:o,blockNumber:u,blockTag:c,includeTransactions:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=null!=l&&l,f=void 0!==u?(0,i.eC)(u):void 0,h=null;if(!(h=o?await e.request({method:"eth_getBlockByHash",params:[o,d]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[f||(null!=c?c:"latest"),d]},{dedupe:!!f})))throw new r.f({blockHash:o,blockNumber:u});return((null===(s=e.chain)||void 0===s?void 0:null===(n=s.formatters)||void 0===n?void 0:null===(t=n.block)||void 0===t?void 0:t.format)||a.Z)(h)}},75304:function(e,t,n){n.d(t,{z:function(){return o}});let r=new Map,i=new Map;async function a(e,t){let{cacheKey:n,cacheTime:a=Number.POSITIVE_INFINITY}=t,s=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}}(n),o=s.response.get();if(o&&a>0&&new Date().getTime()-o.created.getTime()<a)return o.data;let u=s.promise.get();u||(u=e(),s.promise.set(u));try{let e=await u;return s.response.set({created:new Date,data:e}),e}finally{s.promise.clear()}}let s=e=>"blockNumber.".concat(e);async function o(e){let{cacheTime:t=e.cacheTime}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return BigInt(await a(()=>e.request({method:"eth_blockNumber"}),{cacheKey:s(e.uid),cacheTime:t}))}},68796:function(e,t,n){n.d(t,{c:function(){return a}});var r=n(21019),i=n(95046);async function a(e){let t,{blockHash:n,blockNumber:a,blockTag:s="latest"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0!==a?(0,i.eC)(a):void 0;return t=n?await e.request({method:"eth_getBlockTransactionCountByHash",params:[n]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||s]},{dedupe:!!o}),(0,r.ly)(t)}},16416:function(e,t,n){n.d(t,{L:function(){return i}});var r=n(21019);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,r.ly)(t)}},55094:function(e,t,n){n.d(t,{C:function(){return i}});var r=n(95046);async function i(e,t){let{address:n,blockNumber:i,blockTag:a="latest"}=t,s=void 0!==i?(0,r.eC)(i):void 0,o=await e.request({method:"eth_getCode",params:[n,s||a]},{dedupe:!!s});if("0x"!==o)return o}},83677:function(e,t,n){n.d(t,{m:function(){return s}});var r=n(18748),i=n(93413),a=n(5729);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})}},70072:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(95046);async function i(e,t){var n,i;let{blockCount:a,blockNumber:s,blockTag:o="latest",rewardPercentiles:u}=t,c="bigint"==typeof s?(0,r.eC)(s):void 0;return{baseFeePerGas:(n=await e.request({method:"eth_feeHistory",params:[(0,r.eC)(a),c||o,u]},{dedupe:!!c})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:n.gasUsedRatio,oldestBlock:BigInt(n.oldestBlock),reward:null===(i=n.reward)||void 0===i?void 0:i.map(e=>e.map(e=>BigInt(e)))}}},99597:function(e,t,n){n.d(t,{K:function(){return a}});var r=n(31703),i=n(21677);async function a(e,t){let{filter:n}=t,a="strict"in n&&n.strict,s=await n.request({method:"eth_getFilterChanges",params:[n.id]});if("string"==typeof s[0])return s;let o=s.map(e=>(0,i.U)(e));return"abi"in n&&n.abi?(0,r.h)({abi:n.abi,logs:o,strict:a}):o}},48206:function(e,t,n){n.d(t,{o:function(){return r}});async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}},5729:function(e,t,n){n.d(t,{y:function(){return o}});var r=n(36212),i=n(31703),a=n(95046),s=n(21677);async function o(e){let{address:t,blockHash:n,fromBlock:o,toBlock:u,event:c,events:l,args:d,strict:f}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=null!=l?l:c?[c]:void 0,p=[];h&&(p=[h.flatMap(e=>(0,r.O)({abi:[e],eventName:e.name,args:l?void 0:d}))],c&&(p=p[0]));let m=(n?await e.request({method:"eth_getLogs",params:[{address:t,topics:p,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:p,fromBlock:"bigint"==typeof o?(0,a.eC)(o):o,toBlock:"bigint"==typeof u?(0,a.eC)(u):u}]})).map(e=>(0,s.U)(e));return h?(0,i.h)({abi:h,args:d,logs:m,strict:null!=f&&f}):m}},69631:function(e,t,n){n.d(t,{S:function(){return a}});var r=n(95046),i=n(21019);async function a(e,t){var n;let{address:a,blockNumber:s,blockTag:o,storageKeys:u}=t,c=void 0!==s?(0,r.eC)(s):void 0;return{...n=await e.request({method:"eth_getProof",params:[a,u,c||(null!=o?o:"latest")]}),balance:n.balance?BigInt(n.balance):void 0,nonce:n.nonce?(0,i.ly)(n.nonce):void 0,storageProof:n.storageProof?n.storageProof.map(e=>
1({...e,value:BigInt(e.value)})):void 0}}},96985:function(e,t,n){n.d(t,{Y:function(){return i}});var r=n(95046);async function i(e,t){let{address:n,blockNumber:i,blockTag:a="latest",slot:s}=t,o=void 0!==i?(0,r.eC)(i):void 0;return await e.request({method:"eth_getStorageAt",params:[n,s,o||a]})}},85753:function(e,t,n){n.d(t,{f:function(){return s}});var r=n(97658),i=n(95046),a=n(16719);async function s(e,t){var n,s,o;let{blockHash:u,blockNumber:c,blockTag:l,hash:d,index:f}=t,h=l||"latest",p=void 0!==c?(0,i.eC)(c):void 0,m=null;if(d?m=await e.request({method:"eth_getTransactionByHash",params:[d]},{dedupe:!0}):u?m=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[u,(0,i.eC)(f)]},{dedupe:!0}):(p||h)&&(m=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[p||h,(0,i.eC)(f)]},{dedupe:!!p})),!m)throw new r.Bh({blockHash:u,blockNumber:c,blockTag:h,hash:d,index:f});return((null===(o=e.chain)||void 0===o?void 0:null===(s=o.formatters)||void 0===s?void 0:null===(n=s.transaction)||void 0===n?void 0:n.format)||a.Tr)(m)}},98624:function(e,t,n){n.d(t,{a:function(){return s}});var r=n(93413),i=n(75304),a=n(85753);async function s(e,t){let{hash:n,transactionReceipt:s}=t,[o,u]=await Promise.all([(0,r.s)(e,i.z,"getBlockNumber")({}),n?(0,r.s)(e,a.f,"getTransaction")({hash:n}):void 0]),c=(null==s?void 0:s.blockNumber)||(null==u?void 0:u.blockNumber);return c?o-c+1n:0n}},33208:function(e,t,n){n.d(t,{K:function(){return a}});var r=n(21019),i=n(95046);async function a(e,t){let{address:n,blockTag:a="latest",blockNumber:s}=t,o=await e.request({method:"eth_getTransactionCount",params:[n,"bigint"==typeof s?(0,i.eC)(s):a]},{dedupe:!!s});return(0,r.ly)(o)}},30911:function(e,t,n){n.d(t,{a:function(){return a}});var r=n(97658),i=n(55875);async function a(e,t){var n,a,s;let{hash:o}=t,u=await e.request({method:"eth_getTransactionReceipt",params:[o]},{dedupe:!0});if(!u)throw new r.Yb({hash:o});return((null===(s=e.chain)||void 0===s?void 0:null===(a=s.formatters)||void 0===a?void 0:null===(n=a.transactionReceipt)||void 0===n?void 0:n.format)||i.fA)(u)}},6577:function(e,t,n){n.d(t,{A:function(){return h}});var r=n(21620),i=n(52186),a=n(6649),s=n(58591),o=n(97225),u=n(31006),c=n(18543),l=n(92915),d=n(93413),f=n(3796);async function h(e,t){var n;let{account:h,allowFailure:p=!0,batchSize:m,blockNumber:y,blockTag:g,multicallAddress:b,stateOverride:v}=t,w=t.contracts,x=null!=m?m:"object"==typeof(null===(n=e.batch)||void 0===n?void 0:n.multicall)&&e.batch.multicall.batchSize||1024,E=b;if(!E){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");E=(0,c.L)({blockNumber:y,chain:e.chain,contract:"multicall3"})}let _=[[]],A=0,I=0;for(let e=0;e<w.length;e++){let{abi:t,address:n,args:r,functionName:i}=w[e];try{let e=(0,u.R)({abi:t,args:r,functionName:i});I+=(e.length-2)/2,x>0&&I>x&&_[A].length>0&&(A++,I=(e.length-2)/2,_[A]=[]),_[A]=[..._[A],{allowFailure:!0,callData:e,target:n}]}catch(a){let e=(0,l.S)(a,{abi:t,address:n,args:r,docsPath:"/docs/contract/multicall",functionName:i,sender:h});if(!p)throw e;_[A]=[..._[A],{allowFailure:!0,callData:"0x",target:n}]}}let T=await Promise.allSettled(_.map(t=>(0,d.s)(e,f.L,"readContract")({abi:r.F8,account:h,address:E,args:[t],blockNumber:y,blockTag:g,functionName:"aggregate3",stateOverride:v}))),k=[];for(let e=0;e<T.length;e++){let t=T[e];if("rejected"===t.status){if(!p)throw t.reason;for(let n=0;n<_[e].length;n++)k.push({status:"failure",error:t.reason,result:void 0});continue}let n=t.value;for(let t=0;t<n.length;t++){let{returnData:r,success:a}=n[t],{callData:u}=_[e][t],{abi:c,address:d,functionName:f,args:h}=w[k.length];try{if("0x"===u)throw new i.wb;if(!a)throw new s.VQ({data:r});let e=(0,o.k)({abi:c,args:h,data:r,functionName:f});k.push(p?{result:e,status:"success"}:e)}catch(t){let e=(0,l.S)(t,{abi:c,address:d,args:h,docsPath:"/docs/contract/multicall",functionName:f});if(!p)throw e;k.push({error:e,result:void 0,status:"failure"})}}}if(k.length!==w.length)throw new a.G("multicall results mismatch");return k}},3796:function(e,t,n){n.d(t,{L:function(){return u}});var r=n(97225),i=n(31006),a=n(92915),s=n(93413),o=n(63322);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})}}},9660:function(e,t,n){n.d(t,{a:function(){return c}});var r=n(96104),i=n(97225),a=n(31006),s=n(92915),o=n(93413),u=n(63322);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,m=(0,a.R)({abi:n,args:l,functionName:f});try{let{data:r}=await (0,o.s)(e,u.R,"call")({batch:!1,data:"".concat(m).concat(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:null==p?void 0:p.address})}}},57478:function(e,t,n){n.d(t,{W:function(){return r}});async function r(e,t){let{filter:n}=t;return n.request({method:"eth_uninstallFilter",params:[n.id]})}},24150:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(21620),i=n(13955),a=n(58591),s=n(32637),o=n(99112),u=n(65937),c=n(40369),l=n(9504
16),d=n(93413),f=n(31006),h=n(21019);let p="0x6492649264926492649264926492649264926492649264926492649264926492";var m=n(49014),y=n(97261),g=n(39480),b=n(53932),v=n(82361),w=n(71813),x=n(63322);async function E(e,t){var n,E,_;let{address:A,factory:I,factoryData:T,hash:k,signature:P,universalSignatureVerifierAddress:O=null===(_=e.chain)||void 0===_?void 0:null===(E=_.contracts)||void 0===E?void 0:null===(n=E.universalSignatureVerifier)||void 0===n?void 0:n.address,...S}=t,C=(0,c.v)(P)?P:"object"==typeof P&&"r"in P&&"s"in P?function(e){let{r:t,s:n,to:r="hex",v:i,yParity:a}=e,s=(()=>{if(0===a||1===a)return a;if(i&&(27n===i||28n===i||i>=35n))return i%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),o="0x".concat(new w.secp256k1.Signature((0,h.y_)(t),(0,h.y_)(n)).toCompactHex()).concat(0===s?"1b":"1c");return"hex"===r?o:(0,v.nr)(o)}(P):(0,l.ci)(P),N=await (async()=>I||T?(0,m.p5)(C,-32)===p?C:function(e){let{address:t,data:n,signature:r,to:i="hex"}=e,a=(0,b.SM)([(0,g.E)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),p]);return"hex"===i?a:(0,v.nr)(a)}({address:I,data:T,signature:C}):C)();try{let t=O?{to:O,data:(0,f.R)({abi:r.$o,functionName:"isValidSig",args:[A,k,N]}),...S}:{data:(0,s.w)({abi:r.$o,args:[A,k,N],bytecode:i.ST}),...S},{data:n}=await (0,d.s)(e,x.R,"call")(t);return(0,h.XA)(null!=n?n:"0x0")}catch(e){try{if((0,u.E)((0,o.K)(A),await (0,y.R)({hash:k,signature:P})))return!0}catch(e){}if(e instanceof a.cg)return!1;throw e}}},64845:function(e,t,n){n.d(t,{n:function(){return a}});var r=n(32933),i=n(24150);async function a(e,t){let{address:n,message:a,factory:s,factoryData:o,signature:u,...c}=t,l=(0,r.r)(a);return(0,i.Z)(e,{address:n,factory:s,factoryData:o,hash:l,signature:u,...c})}},44138:function(e,t,n){n.d(t,{B:function(){return l}});var r=n(39480),i=n(53932),a=n(95046),s=n(47147),o=n(92180);function u(e){let{data:t,primaryType:n,types:i}=e,o=function e(t){let{data:n,primaryType:i,types:o}=t,u=[{type:"bytes32"}],c=[function(e){let{primaryType:t,types:n}=e,r=(0,a.NC)(function(e){let{primaryType:t,types:n}=e,r="",i=function e(t){let{primaryType:n,types:r}=t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,a=n.match(/^\w*/u),s=null==a?void 0:a[0];if(i.has(s)||void 0===r[s])return i;for(let t of(i.add(s),r[s]))e({primaryType:t.type,types:r},i);return i}({primaryType:t,types:n});for(let e of(i.delete(t),[t,...Array.from(i).sort()]))r+="".concat(e,"(").concat(n[e].map(e=>{let{name:t,type:n}=e;return"".concat(n," ").concat(t)}).join(","),")");return r}({primaryType:t,types:n}));return(0,s.w)(r)}({primaryType:i,types:o})];for(let t of o[i]){let[i,l]=function t(n){let{types:i,name:o,type:u,value:c}=n;if(void 0!==i[u])return[{type:"bytes32"},(0,s.w)(e({data:c,primaryType:u,types:i}))];if("bytes"===u){let e=c.length%2?"0":"";return c="0x".concat(e+c.slice(2)),[{type:"bytes32"},(0,s.w)(c)]}if("string"===u)return[{type:"bytes32"},(0,s.w)((0,a.NC)(c))];if(u.lastIndexOf("]")===u.length-1){let e=u.slice(0,u.lastIndexOf("[")),n=c.map(n=>t({name:o,type:e,types:i,value:n}));return[{type:"bytes32"},(0,s.w)((0,r.E)(n.map(e=>{let[t]=e;return t}),n.map(e=>{let[,t]=e;return t})))]}return[{type:u},c]}({types:o,name:t.name,type:t.type,value:n[t.name]});u.push(i),c.push(l)}return(0,r.E)(u,c)}({data:t,primaryType:n,types:i});return(0,s.w)(o)}var c=n(24150);async function l(e,t){let{address:n,factory:r,factoryData:a,signature:l,message:d,primaryType:f,types:h,domain:p,...m}=t,y=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(e){let{domain:t,types:n}=e;return u({data:t,primaryType:"EIP712Domain",types:n})}({domain:t,types:a})),"EIP712Domain"!==r&&c.push(u({data:n,primaryType:r,types:a})),(0,s.w)((0,i.zo)(c))}({message:d,primaryType:f,types:h,domain:p});return(0,c.Z)(e,{address:n,factory:r,factoryData:a,hash:y,signature:l,...m})}},95131:function(e,t,n){n.d(t,{e:function(){return p}});var r=n(87655),i=n(97658),a=n(93413),s=n(24606),o=n(49568),u=n(55894),c=n(47499),l=n(49235),d=n(85753),f=n(30911),h=n(38128);async function p(e,t){let n,p,m,y,g,{confirmations:b=1,hash:v,onReplaced:w,pollingInterval:x=e.pollingInterval,retryCount:E=6,retryDelay:_=e=>{let{count:t}=e;return 200*~~(1<<t)},timeout:A=18e4}=t,I=(0,c.P)(["waitForTransactionReceipt",e.uid,v]),T=!1,{promise:k,resolve:P,reject:O}=(0,o.n)(),S=A?setTimeout(()=>{g(),y(),O(new i.mc({hash:v}))},A):void 0;return y=(0,s.N7)(I,{onReplaced:w,resolve:P,reject:O},t=>{g=(0,a.s)(e,h.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:x,async onBlockNumber(s){let o=e=>{clearTimeout(S),g(),e(),y()},c=s;if(!T)try{if(m){if(b>1&&(!m.blockNumber||c-m.blockNumber+1n<b))return;o(()=>t.resolve(m));return}if(n||(T=!0,await (0,u.J)(async()=>{(n=await (0,a.s)(e,d.f,"getTransaction")({hash:v})).blockNumber&&(c=n.blockNumber)},{delay:_,retryCount:E}),T=!1),m=await (0,a.s)(e,f.a,"getTransactionReceipt")({hash:v}),b>1&&(!m.blockNumber||c-m.blockNumber+1n<b))return;o(()=>t.resolve(m))}catch(s){if(s instanceof i.Bh||s instanceof i.Yb){if(!n){T=!1;return}try{p=n,T=!0;let i=await (0,u.J)(()=>(0,a.s)(e,l.Q,"getBlock")({blockNumber:c,includeTransactions:!0}),{delay:_,retryCount:E,shouldRetry:e=>{let{error:t}=e;return t instanceof r.f}});T=!1;let s=i.transactions.find(e=>{let{from:t,nonce:n}=e;return t===p.from&&n===p.nonce});if(!s||(m=await (0,a.s)(e,f.a,"getTransactionReceipt")({hash:s.hash}),b>1&&(!m.blockNumber||c-m.blockNumber+1n<b)))return;let d="replaced";s.to===p.to&&s.value===p.value&&s.input===p.input?d="repriced":s.from===s.to&&0n===s.value&&(d="cancelled"),o(()=>{var e;null===(e=t.onReplaced)||void 0===e||e.call(t,{reason:d,replacedTransaction:p,transaction:s,transactionReceipt:m}),t.resolve(m)})}catch(e){o(()=>t.reject(e))}}else o(()=>t.reject(s))}}})}),k}},38128:function(e,t,n){n.d(t,{q:function(){return c}});var r=n(21019),i=n(93413),a=n(24606),s=n(9338),o=n(47499),u=n(75304);function c(e,t){let n,{emitOnBegin:c=!1,emitMissed:l=!1,onBlockNumber:d,onError:f,poll:h,pollingInterval:p=e.pollingInterval}=t;return(void 0!==h?h:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
1onfig.type))?(()=>{let t=(0,o.P)(["watchBlockNumber",e.uid,c,l,p]);return(0,a.N7)(t,{onBlockNumber:d,onError:f},t=>(0,s.$)(async()=>{try{let r=await (0,i.s)(e,u.z,"getBlockNumber")({cacheTime:0});if(n){if(r===n)return;if(r-n>1&&l)for(let e=n+1n;e<r;e++)t.onBlockNumber(e,n),n=e}(!n||r>n)&&(t.onBlockNumber(r,n),n=r)}catch(e){var r;null===(r=t.onError)||void 0===r||r.call(t,e)}},{emitOnBegin:c,interval:p}))})():(()=>{let t=(0,o.P)(["watchBlockNumber",e.uid,c,l]);return(0,a.N7)(t,{onBlockNumber:d,onError:f},t=>{let i=!0,a=()=>i=!1;return(async()=>{try{let s=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:o}=await s.subscribe({params:["newHeads"],onData(e){var a;if(!i)return;let s=(0,r.y_)(null===(a=e.result)||void 0===a?void 0:a.number);t.onBlockNumber(s,n),n=s},onError(e){var n;null===(n=t.onError)||void 0===n||n.call(t,e)}});a=o,i||a()}catch(e){null==f||f(e)}})(),()=>a()})})()}},86387:function(e,t,n){n.d(t,{p:function(){return u}});var r=n(93413),i=n(24606),a=n(9338),s=n(47499),o=n(49235);function u(e,t){let n,u,c,l,{blockTag:d="latest",emitMissed:f=!1,emitOnBegin:h=!1,onBlock:p,onError:m,includeTransactions:y,poll:g,pollingInterval:b=e.pollingInterval}=t,v=void 0!==g?g:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
1onfig.type),w=null!=y&&y;return v?(()=>{let t=(0,s.P)(["watchBlocks",e.uid,d,f,h,w,b]);return(0,i.N7)(t,{onBlock:p,onError:m},t=>(0,a.$)(async()=>{try{let n=await (0,r.s)(e,o.Q,"getBlock")({blockTag:d,includeTransactions:w});if(null!==n.number&&(null==l?void 0:l.number)!=null){if(n.number===l.number)return;if(n.number-l.number>1&&f)for(let i=(null==l?void 0:l.number)+1n;i<n.number;i++){let n=await (0,r.s)(e,o.Q,"getBlock")({blockNumber:i,includeTransactions:w});t.onBlock(n,l),l=n}}((null==l?void 0:l.number)==null||"pending"===d&&(null==n?void 0:n.number)==null||null!==n.number&&n.number>l.number)&&(t.onBlock(n,l),l=n)}catch(e){var n;null===(n=t.onError)||void 0===n||n.call(t,e)}},{emitOnBegin:h,interval:b}))})():(n=!0,u=!0,c=()=>n=!1,(async()=>{try{h&&(0,r.s)(e,o.Q,"getBlock")({blockTag:d,includeTransactions:w}).then(e=>{n&&u&&(p(e,void 0),u=!1)}).catch(m);let t=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:i}=await t.subscribe({params:["newHeads"],async onData(t){if(!n)return;let i=await (0,r.s)(e,o.Q,"getBlock")({blockNumber:t.blockNumber,includeTransactions:w}).catch(()=>{});n&&(p(i,l),u=!1,l=i)},onError(e){null==m||m(e)}});c=i,n||c()}catch(e){null==m||m(e)}})(),()=>c())}},19205:function(e,t,n){n.d(t,{Y:function(){return g}});var r=n(52186),i=n(96329),a=n(46699),s=n(36212),o=n(21677),u=n(93413),c=n(24606),l=n(9338),d=n(47499),f=n(92498),h=n(75304),p=n(83677),m=n(99597),y=n(57478);function g(e,t){let{abi:n,address:g,args:b,batch:v=!0,eventName:w,fromBlock:x,onError:E,onLogs:_,poll:A,pollingInterval:I=e.pollingInterval,strict:T}=t;return(void 0!==A?A:"bigint"==typeof x||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
1onfig.type))?(()=>{let t=null!=T&&T,r=(0,d.P)(["watchContractEvent",g,b,v,e.uid,w,I,t,x]);return(0,c.N7)(r,{onLogs:_,onError:E},r=>{let a,s;void 0!==x&&(a=x-1n);let o=!1,c=(0,l.$)(async()=>{if(!o){try{s=await (0,u.s)(e,f.A,"createContractEventFilter")({abi:n,address:g,args:b,eventName:w,strict:t,fromBlock:x})}catch(e){}o=!0;return}try{let i;if(s)i=await (0,u.s)(e,m.K,"getFilterChanges")({filter:s});else{let r=await (0,u.s)(e,h.z,"getBlockNumber")({});i=a&&a<r?await (0,u.s)(e,p.m,"getContractEvents")({abi:n,address:g,args:b,eventName:w,fromBlock:a+1n,toBlock:r,strict:t}):[],a=r}if(0===i.length)return;if(v)r.onLogs(i);else for(let e of i)r.onLogs([e])}catch(e){var c;s&&e instanceof i.yR&&(o=!1),null===(c=r.onError)||void 0===c||c.call(r,e)}},{emitOnBegin:!0,interval:I});return async()=>{s&&await (0,u.s)(e,y.W,"uninstallFilter")({filter:s}),c()}})})():(()=>{let t=(0,d.P)(["watchContractEvent",g,b,v,e.uid,w,I,null!=T&&T]),i=!0,u=()=>i=!1;return(0,c.N7)(t,{onLogs:_,onError:E},t=>((async()=>{try{let c=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=w?(0,s.O)({abi:n,eventName:w,args:b}):[],{unsubscribe:d}=await c.subscribe({params:["logs",{address:g,topics:l}],onData(e){if(!i)return;let s=e.result;try{let{eventName:e,args:r}=(0,a.F)({abi:n,data:s.data,topics:s.topics,strict:T}),i=(0,o.U)(s,{args:r,eventName:e});t.onLogs([i])}catch(a){let e,n;if(a instanceof r.SM||a instanceof r.Gy){var u;if(T)return;e=a.abiItem.name,n=null===(u=a.abiItem.inputs)||void 0===u?void 0:u.some(e=>!("name"in e&&e.name))}let i=(0,o.U)(s,{args:n?[]:{},eventName:e});t.onLogs([i])}},onError(e){var n;null===(n=t.onError)||void 0===n||n.call(t,e)}});u=d,i||u()}catch(e){null==E||E(e)}})(),()=>u()))})()}},22099:function(e,t,n){n.d(t,{O:function(){return l}});var r=n(93413),i=n(24606),a=n(9338),s=n(47499),o=n(41146),u=n(99597),c=n(57478);function l(e,t){let n,l,{batch:d=!0,onError:f,onTransactions:h,poll:p,pollingInterval:m=e.pollingInterval}=t;return(void 0!==p?p:"webSocket"!==e.transport.type)?(()=>{let t=(0,s.P)(["watchPendingTransactions",e.uid,d,m]);return(0,i.N7)(t,{onTransactions:h,onError:f},t=>{let n;let i=(0,a.$)(async()=>{try{if(!n)try{n=await (0,r.s)(e,o.W,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let a=await (0,r.s)(e,u.K,"getFilterChanges")({filter:n});if(0===a.length)return;if(d)t.onTransactions(a);else for(let e of a)t.onTransactions([e])}catch(e){var a;null===(a=t.onError)||void 0===a||a.call(t,e)}},{emitOnBegin:!0,interval:m});return async()=>{n&&await (0,r.s)(e,c.W,"uninstallFilter")({filter:n}),i()}})})():(n=!0,l=()=>n=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!n)return;let t=e.result;h([t])},onError(e){null==f||f(e)}});l=t,n||l()}catch(e){null==f||f(e)}})(),()=>l())}},79542:function(e,t,n){n.d(t,{P:function(){return a}});var r=n(32637),i=n(76830);function a(e,t){let{abi:n,args:a,bytecode:s,...o}=t,u=(0,r.w)({abi:n,args:a,bytecode:s});return(0,i.T)(e,{...o,...o.authorizationList?{to:null}:{},data:u})}},4798:function(e,t,n){n.d(t,{$:function(){return u}});var r=n(49014),i=n(77955),a=n(21019),s=n(55875),o=n(19267);async function u(e,t){var n;async function u(t){if(t.endsWith(o.ny.slice(2))){let n=(0,i.f)((0,r.p5)(t,-64,-32)),s=(0,r.p5)(t,0,-64).slice(2).match(/.{1,64}/g),u=await Promise.all(s.map(t=>o.rC.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:["0x".concat(t)]},{dedupe:!0}):void 0)),c=u.some(e=>null===e)?100:u.every(e=>(null==e?void 0:e.status)==="0x1")?200:u.every(e=>(null==e?void 0:e.status)==="0x0")?500:600;return{atomic:!1,chainId:(0,a.ly)(n),receipts:u.filter(Boolean),status:c,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}let{atomic:c=!1,chainId:l,receipts:d,version:f="2.0.0",...h}=await u(t.id),[p,m]=(()=>{let e=h.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...h,atomic:c,chainId:l?(0,a.ly)(l):void 0,receipts:null!==(n=null==d?void 0:d.map(e=>({...e,blockNumber:(0,a.y_)(e.blockNumber),gasUsed:(0,a.y_)(e.gasUsed),status:s.ew[e.status]})))&&void 0!==n?n:[],statusCode:m,status:p,version:f}}},67839:function(e,t,n){n.d(t,{F:function(){return a}});var r=n(96104),i=n(95046);async function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{account:n=e.account,chainId:a}=t,s=n?(0,r.T)(n):void 0,o=a?[null==s?void 0:s.address,[(0,i.eC)(a)]]:[null==s?void 0:s.address],u=await e.request({method:"wallet_getCapabilities",params:o}),c={};for(let[e,t]of Object.entries(u))for(let[n,r]of(c[Number(e)]={},Object.entries(t)))"addSubAccount"===n&&(n="unstable_addSubAccount"),c[Number(e)][n]=r;return"number"==typeof a?c[a]:c}},83435:function(e,t,n){n.d(t,{QZ:function(){return A},ZE:function(){return T}});var r=n(96104),i=n(42665),a=n(60730),s=n(49235),o=n(33208),u=n(25511),c=n(82361),l=n(9504
16);function d(e){var t;let{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.blobs[0]?"hex":"bytes",i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,c.nr)(e)):e.blobs,a=[];for(let e of i)a.push(Uint8Array.from(n.blobToKzgCommitment(e)));return"bytes"===r?a:a.map(e=>(0,l.ci)(e))}function f(e){var t;let{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.blobs[0]?"hex":"bytes",i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,c.nr)(e)):e.blobs,a="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,c.nr)(e)):e.commitments,s=[];for(let e=0;e<i.length;e++){let t=i[e],r=a[e];s.push(Uint8Array.from(n.computeBlobKzgProof(t,r)))}return"bytes"===r?s:s.map(e=>(0,l.ci)(e))}let h=n(89860).JQ;var p=n(40369),m=n(6649);class y extends m.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:["Max: ".concat(e," bytes"),"Given: ".concat(t," bytes")],name:"BlobSizeTooLargeError"})}}class g extends m.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}var b=n(15222),v=n(7508),w=n(93413),x=n(33425),E=n(97658),_=n(16416);let A=["blobVersionedHashes","chainId","fees","gas","nonce","type"],I=new Map;async function T(e,t){let n,m;let{account:T=e.account,blobs:k,chain:P,gas:O,kzg:S,nonce:C,nonceManager:N,parameters:B=A,type:R}=t,M=T?(0,r.T)(T):T,F={...t,...M?{from:null==M?void 0:M.address}:{}};async function j(){return n||(n=await (0,w.s)(e,s.Q,"getBlock")({blockTag:"latest"}))}async function U(){return m||(P?P.id:void 0!==t.chainId?t.chainId:m=await (0,w.s)(e,_.L,"getChainId")({}))}if(B.includes("nonce")&&void 0===C&&M){if(N){let t=await U();F.nonce=await N.consume({address:M.address,chainId:t,client:e})}else F.nonce=await (0,w.s)(e,o.K,"getTransactionCount")({address:M.address,blockTag:"pending"})}if((B.includes("blobVersionedHashes")||B.includes("sidecars"))&&k&&S){let e=d({blobs:k,kzg:S});if(B.includes("blobVersionedHashes")){let t=function(e){var t;let{commitments:n,version:r}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"==typeof n[0]?"hex":"bytes",a=[];for(let e of n)a.push(function(e){var t;let{commitment:n,version:r=1}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"==typeof n?"hex":"bytes",a=function(e,t){let n=h((0,p.v)(e,{strict:!1})?(0,c.O0)(e):e);return"bytes"===(t||"hex")?n:(0,l.NC)(n)}(n,"bytes");return a.set([r],0),"bytes"===i?a:(0,l.ci)(a)}({commitment:e,to:i,version:r}));return a}({commitments:e,to:"hex"});F.blobVersionedHashes=t}if(B.includes("sidecars")){let t=f({blobs:k,commitments:e,kzg:S}),n=function(e){var t,n,r;let{data:i,kzg:a,to:s}=e,o=null!==(t=e.blobs)&&void 0!==t?t:function(e){var t;let n=null!==(t=e.to)&&void 0!==t?t:"string"==typeof e.data?"hex":"bytes",r="string"==typeof e.data?(0,c.nr)(e.data):e.data,i=(0,v.d)(r);if(!i)throw new g;if(i>761855)throw new y({maxSize:761855,size:i});let a=[],s=!0,o=0;for(;s;){let e=(0,b.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(o,o+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),s=!1;break}t++,o+=31}a.push(e)}return"bytes"===n?a.map(e=>e.bytes):a.map(e=>(0,l.ci)(e.bytes))}({data:i,to:s}),u=null!==(n=e.commitments)&&void 0!==n?n:d({blobs:o,kzg:a,to:s}),h=null!==(r=e.proofs)&&void 0!==r?r:f({blobs:o,commitments:u,kzg:a,to:s}),p=[];for(let e=0;e<o.length;e++)p.push({blob:o[e],commitment:u[e],proof:h[e]});return p}({blobs:k,commitments:e,proofs:t,to:"hex"});F.sidecars=n}}if(B.includes("chainId")&&(F.chainId=await U()),(B.includes("fees")||B.includes("type"))&&void 0===R)try{F.type=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";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 E.j3({transaction:e})}(F)}catch(n){let t=I.get(e.uid);if(void 0===t){let n=await j();t="bigint"==typeof(null==n?void 0:n.baseFeePerGas),I.set(e.uid,t)}F.type=t?"eip1559":"legacy"}if(B.includes("fees")){if("legacy"!==F.type&&"eip2930"!==F.type){if(void 0===F.maxFeePerGas||void 0===F.maxPriorityFeePerGas){let n=await j(),{maxFeePerGas:r,maxPriorityFeePerGas:a}=await (0,i.C)(e,{block:n,chain:P,request:F});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<a)throw new u.ld({maxPriorityFeePerGas:a});F.maxPriorityFeePerGas=a,F.maxFeePerGas=r}}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new u.e5;if(void 0===t.gasPrice){let t=await j(),{gasPrice:n}=await (0,i.C)(e,{block:t,chain:P,request:F,type:"legacy"});F.gasPrice=n}}}return B.includes("gas")&&void 0===O&&(F.gas=await (0,w.s)(e,a.Q,"estimateGas")({...F,account:M?{address:M.address,type:"json-rpc"}:M})),(0,x.F)(F),delete F.parameters,F}},19267:function(e,t,n){n.d(t,{ny:function(){return f},rC:function(){return h},s_:function(){return p}});var r=n(96104),i=n(6649),a=n(96329),s=n(31006),o=n(53932),u=n(21019),c=n(95046),l=n(79320),d=n(76830);let f="0x5792579257925792579257925792579257925792579257925792579257925792",h=(0,c.eC)(0,{size:32});async function p(e,t){let{account:n=e.account,capabilities:p,chain:m=e.chain,experimental_fallback:y,experimental_fallbackDelay:g=32,forceAtomic:b=!1,id:v,version:w="2.0.0"}=t,x=n?(0,r.T)(n):null,E=t.calls.map(e=>({data:e.abi?(0,s.R)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data,to:e.to,value:e.value?(0,c.eC)(e.value):void 0}));try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:b,calls:E,capabilities:p,chainId:(0,c.eC)(m.id),from:null==x?void 0:x.address,id:v,version:w}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(n){if(y&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did n
1ot match any variant of untagged enum"))){if(p&&Object.values(p).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new a.vl(new i.G(e,{details:e}))}if(b&&E.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new a.r0(new i.G(e,{details:e}))}let t=[];for(let n of E){let r=(0,d.T)(e,{account:x,chain:m,data:n.data,to:n.to,value:n.value?(0,u.y_)(n.value):void 0});t.push(r),g>0&&await new Promise(e=>setTimeout(e,g))}let n=await Promise.allSettled(t);if(n.every(e=>"rejected"===e.status))throw n[0].reason;let r=n.map(e=>"fulfilled"===e.status?e.value:h);return{id:(0,o.zo)([...r,(0,c.eC)(m.id,{size:32}),f])}}throw(0,l.$)(n,{...t,account:x,chain:t.chain})}}},96432:function(e,t,n){n.d(t,{p:function(){return r}});async function r(e,t){let{serializedTransaction:n}=t;return e.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}},76830:function(e,t,n){n.d(t,{T:function(){return b}});var r=n(96104),i=n(25355),a=n(6649),s=n(72664),o=n(63659),u=n(79320),c=n(27031),l=n(37669),d=n(93413),f=n(98992),h=n(33425),p=n(16416),m=n(83435),y=n(96432);let g=new f.k(128);async function b(e,t){let{account:n=e.account,chain:f=e.chain,accessList:b,authorizationList:v,blobs:w,data:x,gas:E,gasPrice:_,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:k,type:P,value:O,...S}=t;if(void 0===n)throw new i.o({docsPath:"/docs/actions/wallet/sendTransaction"});let C=n?(0,r.T)(n):null;try{var N,B,R,M;(0,h.F)(t);let n=await (async()=>t.to?t.to:null!==t.to&&v&&v.length>0?await (0,s.z)({authorization:v[0]}).catch(()=>{throw new a.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if((null==C?void 0:C.type)==="json-rpc"||null===C){let t;null!==f&&(t=await (0,d.s)(e,p.L,"getChainId")({}),(0,o.q)({currentChainId:t,chain:f}));let r=null===(R=e.chain)||void 0===R?void 0:null===(B=R.formatters)||void 0===B?void 0:null===(N=B.transactionRequest)||void 0===N?void 0:N.format,i=(r||l.tG)({...(0,c.K)(S,{format:r}),accessList:b,authorizationList:v,blobs:w,chainId:t,data:x,from:null==C?void 0:C.address,gas:E,gasPrice:_,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:k,to:n,type:P,value:O}),a=g.get(e.uid);try{return await e.request({method:a?"wallet_sendTransaction":"eth_sendTransaction",params:[i]},{retryCount:0})}catch(t){if(!1===a)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[i]},{retryCount:0}).then(t=>(g.set(e.uid,!0),t)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw g.set(e.uid,!1),t;throw n});throw t}}if((null==C?void 0:C.type)==="local"){let t=await (0,d.s)(e,m.ZE,"prepareTransactionRequest")({account:C,accessList:b,authorizationList:v,blobs:w,chain:f,data:x,gas:E,gasPrice:_,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:k,nonceManager:C.nonceManager,parameters:[...m.QZ,"sidecars"],type:P,value:O,...S,to:n}),r=null==f?void 0:null===(M=f.serializers)||void 0===M?void 0:M.transaction,i=await C.signTransaction(t,{serializer:r});return await (0,d.s)(e,y.p,"sendRawTransaction")({serializedTransaction:i})}if((null==C?void 0:C.type)==="smart")throw new i.Y({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new i.Y({docsPath:"/docs/actions/wallet/sendTransaction",type:null==C?void 0:C.type})}catch(e){if(e instanceof i.Y)throw e;throw(0,u.$)(e,{...t,account:C,chain:t.chain||void 0})}}},12762:function(e,t,n){n.d(t,{Z:function(){return r}});async function r(e,t){let{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}},99154:function(e,t,n){n.d(t,{l:function(){return s}});var r=n(96104),i=n(25355),a=n(95046);async function s(e,t){let{account:n=e.account,message:s}=t;if(!n)throw new i.o({docsPath:"/docs/actions/wallet/signMessage"});let o=(0,r.T)(n);if(o.signMessage)return o.signMessage({message:s});let u="string"==typeof s?(0,a.$G)(s):s.raw instanceof Uint8Array?(0,a.NC)(s.raw):s.raw;return e.request({method:"personal_sign",params:[u,o.address]},{retryCount:0})}},64435:function(e,t,n){n.d(t,{x:function(){return s}});var r=n(96104),i=n(25355),a=n(92180);async function s(e,t){let{account:n=e.account,domain:s,message:o,primaryType:u}=t;if(!n)throw new i.o({docsPath:"/docs/actions/wallet/signTypedData"});let c=(0,r.T)(n),l={EIP712Domain:(0,a.cj)({domain:s}),...t.types};if((0,a.iC)({domain:s,message:o,primaryType:u,types:l}),c.signTypedData)return c.signTypedData({domain:s,message:o,primaryType:u,types:l});let d=(0,a.H6)({domain:s,message:o,primaryType:u,types:l});return e.request({method:"eth_signTypedData_v4",params:[c.address,d]},{retryCount:0})}},45843:function(e,t,n){n.d(t,{l:function(){return c}});var r=n(6649),i=n(24606),a=n(9338),s=n(49568),o=n(47499),u=n(4798);async function c(e,t){let n;let{id:r,pollingInterval:c=e.pollingInterval,status:d=e=>{let{statusCode:t}=e;return t>=200},timeout:f=6e4}=t,h=(0,o.P)(["waitForCallsStatus",e.uid,r]),{promise:p,resolve:m,reject:y}=(0,s.n)(),g=(0,i.N7)(h,{resolve:m,reject:y},t=>{let i=(0,a.$)(async()=>{let a=e=>{clearTimeout(n),i(),e(),g()};try{let n=await (0,u.$)(e,{id:r});if(!d(n))return;a(()=>t.resolve(n))}catch(e){a(()=>t.reject(e))}},{interval:c,emitOnBegin:!0});return i});return n=f?setTimeout(()=>{g(),clearTimeout(n),y(new l({id:r}))},f):void 0,await p}class l extends r.G{constructor({id:e}){super('Timed out while waiting for call bundle with id "'.concat(e,'" to be confirmed.'),{name:"WaitForCallsStatusTimeoutError"})}}},32775:function(e,t,n){n.d(t,{d:function(){return r}});async function r(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}},85721:function(e,t,n){n.d(t,{n:function(){return c}});var r=n(96104),i=n(25355),a=n(31006),s=n(92915),o=n(93413),u=n(76830);async function c(e,t){let{abi:n,account:c=e.account,address:l,args:d,dataSuffix:f,functionName:h,...p}=t;if(void 0===c)throw new i.o({docsPath:"/docs/contract/writeContract"});let m=c?(0,r.T)(c):null,y=(0,a.R)({abi:n,args:d,functionName:h});try{return await (0,o.s)(e,u.T,"sendTransaction")({data:"".concat(y).concat(f?f.replace("0x",""):""),to:l,account:m,...p})}catch(e){throw(0,s.S)(e,{abi:n,address:l,args:d,docsPath:"/docs/contract/writeContract",functionName:h,sender:null==m?void 0:m.address})}}},16491:function(e,t,n){n.d(t,{R:function(){return r}});let r=(0,n(95258).a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol
1:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},8483:function(e,t,n){n.d(t,{F:function(){return r}});let r=(0,n(95258).a)({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0})},72688:function(e,t,n){n.d(t,{e:function(){return a}});var r=n(96104),i=n(14851);function a(e){var t,n,a;let{batch:s,chain:o,ccipRead:u,key:c="base",name:l="Base Client",type:d="base"}=e,f=null!==(t=null==o?void 0:o.blockTime)&&void 0!==t?t:12e3,h=null!==(n=e.pollingInterval)&&void 0!==n?n:Math.min(Math.max(Math.floor(f/2),500),4e3),p=null!==(a=e.cacheTime)&&void 0!==a?a:h,m=e.account?(0,r.T)(e.account):void 0,{config:y,request:g,value:b}=e.transport({chain:o,pollingInterval:h}),v={account:m,batch:s,cacheTime:p,ccipRead:u,chain:o,key:c,name:l,pollingInterval:h,request:g,transport:{...y,...b},type:d,uid:(0,i.h)()};return Object.assign(v,{extend:function e(t){return n=>{let r=n(t);for(let e in v)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(v)})}},60152:function(e,t,n){n.d(t,{v:function(){return a}});var r=n(72688),i=n(72418);function a(e){let{key:t="public",name:n="Public Client"}=e;return(0,r.e)({...e,key:t,name:n,type:"publicClient"}).extend(i.I)}},73042:function(e,t,n){n.d(t,{K:function(){return a}});var r=n(72688),i=n(68705);function a(e){let{key:t="wallet",name:n="Wallet Client",transport:a}=e;return(0,r.e)({...e,key:t,name:n,transport:a,type:"walletClient"}).extend(i.v)}},72418:function(e,t,n){n.d(t,{I:function(){return tL}});var r=n(78045),i=n(48061),a=n(48729),s=n(2886),o=n(133),u=n(63322),c=n(96104),l=n(95046),d=n(8114),f=n(27031),h=n(37669),p=n(33425);async function m(e,t){let{account:n=e.account,blockNumber:r,blockTag:i="latest",blobs:a,data:s,gas:o,gasPrice:u,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:g,to:b,value:v,...w}=t,x=n?(0,c.T)(n):void 0;try{var E,_,A;(0,p.F)(t);let n="bigint"==typeof r?(0,l.eC)(r):void 0,c=null===(A=e.chain)||void 0===A?void 0:null===(_=A.formatters)||void 0===_?void 0:null===(E=_.transactionRequest)||void 0===E?void 0:E.format,d=(c||h.tG)({...(0,f.K)(w,{format:c}),from:null==x?void 0:x.address,blobs:a,data:s,gas:o,gasPrice:u,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:g,to:b,value:v}),I=await e.request({method:"eth_createAccessList",params:[d,n||i]});return{accessList:I.accessList,gasUsed:BigInt(I.gasUsed)}}catch(n){throw(0,d.P)(n,{...t,account:x,chain:e.chain})}}var y=n(48586);async function g(e){let t=(0,y.g)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}var b=n(92498),v=n(36212);async function w(e){let{address:t,args:n,event:r,events:i,fromBlock:a,strict:s,toBlock:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=null!=i?i:r?[r]:void 0,c=(0,y.g)(e,{method:"eth_newFilter"}),d=[];u&&(d=[u.flatMap(e=>(0,v.O)({abi:[e],eventName:e.name,args:n}))],r&&(d=d[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,l.eC)(a):a,toBlock:"bigint"==typeof o?(0,l.eC)(o):o,...d.length?{topics:d}:{}}]});return{abi:u,args:n,eventName:r?r.name:void 0,fromBlock:a,id:f,request:c(f),strict:!!s,toBlock:o,type:"event"}}var x=n(41146),E=n(89431),_=n(42665),A=n(60730),I=n(72127),T=n(5106);async function k(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var P=n(49235),O=n(75304),S=n(68796),C=n(16416),N=n(55094),B=n(83677),R=n(6649);class M extends R.G{constructor({address:e}){super('No EIP-712 domain found on contract "'.concat(e,'".'),{metaMessages:["Ensure that:",'- The contract is deployed at the address "'.concat(e,'".'),"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}var F=n(93413),j=n(3796);async function U(e,t){let{address:n,factory:r,factoryData:i}=t;try{let[t,a,s,o,u,c,l]=await (0,F.s)(e,j.L,"readContract")({abi:$,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:a,version:s,chainId:Number(o),verifyingContract:u,salt:c},extensions:l,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new M({address:n});throw e}}let $=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];var z=n(70072),G=n(99597),L=n(31703),D=n(21677);async function Z(e,t){var n;let{filter:r}=t,i=null!==(n=r.strict)&&void 0!==n&&n,a=(await r.request({method:"eth_getFilterLogs",params:[r.id]})).map(e=>(0,D.U)(e));return r.abi?(0,L.h)({abi:r.abi,logs:a,strict:i}):a}var q=n(48206),H=n(5729),V=n(69631),W=n(96985),K=n(85753),Y=n(98
1624),Q=n(33208),J=n(30911),X=n(6577),ee=n(95862),et=n(52186),en=n(58591),er=n(37764),ei=n(97225),ea=n(31006),es=n(92915),eo=n(43149),eu=n(20621),ec=n(11667);async function el(e,t){let{blockNumber:n,blockTag:r="latest",blocks:i,returnFullTransactions:a,traceTransfers:s,validation:o}=t;try{let t=[];for(let e of i){let n=e.blockOverrides?ee.o(e.blockOverrides):void 0,r=e.calls.map(e=>{var t;let n=e.account?(0,c.T)(e.account):void 0,r={...e,data:e.abi?(0,ea.R)(e):e.data,from:null!==(t=e.from)&&void 0!==t?t:null==n?void 0:n.address};return(0,p.F)(r),(0,h.tG)(r)}),i=e.stateOverrides?(0,ec.mF)(e.stateOverrides):void 0;t.push({blockOverrides:n,calls:r,stateOverrides:i})}let u="bigint"==typeof n?(0,l.eC)(n):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:a,traceTransfers:s,validation:o},u||r]})).map((e,t)=>({...(0,eu.Z)(e),calls:e.calls.map((e,n)=>{var r,a,s;let{abi:o,args:u,functionName:c,to:l}=i[t].calls[n],d=null!==(s=null===(r=e.error)||void 0===r?void 0:r.data)&&void 0!==s?s:e.returnData,f=BigInt(e.gasUsed),h=null===(a=e.logs)||void 0===a?void 0:a.map(e=>(0,D.U)(e)),p="0x1"===e.status?"success":"failure",m=o&&"success"===p&&"0x"!==d?(0,ei.k)({abi:o,data:d,functionName:c}):null,y=(()=>{var t;let n;if("success"!==p&&((null===(t=e.error)||void 0===t?void 0:t.data)==="0x"?n=new et.wb:e.error&&(n=new en.VQ(e.error)),n))return(0,es.S)(n,{abi:null!=o?o:[],address:l,args:u,functionName:null!=c?c:"<unknown>"})})();return{data:d,gasUsed:f,logs:h,status:p,..."success"===p?{result:m}:{error:y}}})}))}catch(t){let e=(0,eo.k)(t,{});if(e instanceof er.cj)throw t;throw e}}var ed=n(74022),ef=n(60365),eh=n(16748),ep=n(20090),em=n(4822),ey=n(37870);function eg(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function eb(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function ev(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let ew=BigInt(4294967296-1),ex=BigInt(32),eE=(e,t,n)=>e<<n|t>>>32-n,e_=(e,t,n)=>t<<n|e>>>32-n,eA=(e,t,n)=>t<<n-32|e>>>64-n,eI=(e,t,n)=>e<<n-32|t>>>64-n,eT=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function ek(e){for(let n=0;n<e.length;n++){var t;e[n]=(t=e[n])<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}}function eP(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),eb(e),e}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex;class eO{clone(){return this._cloneInto()}}let eS=[],eC=[],eN=[],eB=BigInt(0),eR=BigInt(1),eM=BigInt(2),eF=BigInt(7),ej=BigInt(256),eU=BigInt(113);for(let e=0,t=eR,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],eS.push(2*(5*r+n)),eC.push((e+1)*(e+2)/2%64);let i=eB;for(let e=0;e<7;e++)(t=(t<<eR^(t>>eF)*eU)%ej)&eM&&(i^=eR<<(eR<<BigInt(e))-eR);eN.push(i)}let[e$,ez]=function(e,t=!1){let n=new Uint32Array(e.length),r=new
1Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:a,l:s}=function(e,t=!1){return t?{h:Number(e&ew),l:Number(e>>ex&ew)}:{h:0|Number(e>>ex&ew),l:0|Number(e&ew)}}(e[i],t);[n[i],r[i]]=[a,s]}return[n,r]}(eN,!0),eG=(e,t,n)=>n>32?eA(e,t,n):eE(e,t,n),eL=(e,t,n)=>n>32?eI(e,t,n):e_(e,t,n);class eD extends eO{constructor(e,t,n,r=!1,i=24){var a;if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,eg(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=new Uint32Array((a=this.state).buffer,a.byteOffset,Math.floor(a.byteLength/4))}keccak(){eT||ek(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],s=n[i+1],o=eG(a,s,1)^n[r],u=eL(a,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=o,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=eC[n],a=eG(t,i,r),s=eL(t,i,r),o=eS[n];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=e$[r],e[1]^=ez[r]}n.fill(0)}(this.state32,this.rounds),eT||ek(this.state32),this.posOut=0,this.pos=0}update(e){ev(this);let{blockLen:t,state:n}=this,r=(e=eP(e)).length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){ev(this,!1),eb(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return eg(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(!function(e,t){eb(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return e||(e=new eD(t,n,r,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}let eZ=function(e){let t=t=>e().update(eP(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new eD(136,1,32));var eq=n(4438);n(93156);let eH={zero:48,nine:57,A:65,F:70,a:97,f:102};function eV(e){return e>=eH.zero&&e<=eH.nine?e-eH.zero:e>=eH.A&&e<=eH.F?e-(eH.A-10):e>=eH.a&&e<=eH.f?e-(eH.a-10):void 0}var eW=n(55793);let eK=new TextEncoder;class eY extends ey.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class eQ extends ey.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}function eJ(e,t={}){let{as:n="string"==typeof e?"Hex":"Bytes"}=t,r=eZ(e instanceof Uint8Array?e:"string"==typeof e?function(e,t={}){let{size:n}=t,r=e;n&&(eW.Yf(e,n),r=eq.eh(e,n));let i=r.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,s=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let n=eV(i.charCodeAt(t++)),r=eV(i.charCodeAt(t++));if(void 0===n||void 0===r)throw new ey.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);s[e]=16*n+r}return s}(e):e instanceof Uint8Array?e:new Uint8Array(e));return"Bytes"===n?r:eq.xv(r)}class eX extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let e0={checksum:new eX(8192)}.checksum,e1=/^0x[a-fA-F0-9]{40}$/;function e2(e,t={}){let{strict:n=!0}=t;if(!e1.test(e))throw new e5({address:e,cause:new e3});if(n){if(e.toLowerCase()===e)return;if(function(e){if(e0.has(e))return e0.get(e);e2(e,{strict:!1});let t=e.substring(2).toLowerCase(),n=eJ(function(e,t={}){let{size:n}=t,r=eK.encode(e);return"number"==typeof n?(!function(e,t){if(e.length>t)throw new eY({givenSize:e.length,maxSize:t})}(r,n),function(e,t={}){let{dir:n,size:r=32}=t;if(0===r)return e;if(e.length>r)throw new eQ({size:e.length,targetSize:r,type:"Bytes"});let i=new Uint8Array(r);for(let t=0;t<r;t++){let a="right"===n;i[a?t:r-t-1]=e[a?t:e.length-t-1]}return i}(r,{dir:"right",size:n})):r}(t),{as:"Bytes"}),r=t.split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&r[e]&&(r[e]=r[e].toUpperCase()),(15&n[e>>1])>=8&&r[e+1]&&(r[e+1]=r[e+1].toUpperCase());let i=`0x${r.join("")}`;return e0.set(e,i),i}(e)!==e)throw new e5({address:e,cause:new e4})}}function e6(e,t={}){let{strict:n=!0}=t??{};try{return e2(e,{strict:n}),!0}catch{return!1}}
1class e5 extends ey.G{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class e3 extends ey.G{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class e4 extends ey.G{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function e8(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","error",""].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 ey.G("Unable to normalize signature.");return i}function e9(e,t={}){let{prepare:n=!0}=t,r=Array.isArray(e)||"string"==typeof e?function(e){let t;if("string"==typeof e)t=(0,ep.cK)(e);else{let n=(0,eh.D)(e),r=e.length;for(let i=0;i<r;i++){let r=e[i];if(!(0,ef.N0)(r)){t=(0,ep.cK)(r,n);break}}}if(!t)throw new ed.a_({signature:e});return t}(e):e;return{...r,...n?{hash:te(r)}:{}}}function e7(e){return eq.tP(te(e),0,4)}function te(e){return"string"!=typeof e&&"hash"in e&&e.hash?e.hash:eJ(eq.mL(e8("string"==typeof e?e:em.t(e))))}class tt extends ey.G{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${e8(em.t(e.abiItem))}\`, and`,`\`${t.type}\` in \`${e8(em.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:"AbiItem.AmbiguityError"})}}class tn extends ey.G{constructor({name:e,data:t,type:n="item"}){super(`ABI ${n}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}n(45607);let tr=/^(.*)\[([0-9]*)\]$/,ti=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ta=/^(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 ts(e){let t=0;for(let n=0;n<e.length;n++){let{dynamic:r,encoded:i}=e[n];r?t+=32:t+=eq.dp(i)}let n=[],r=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:o}=e[a];s?(n.push(eq.xS(t+i,{size:32})),r.push(o),i+=eq.dp(o)):n.push(o)}return eq.zo(...n,...r)}function to(e,t,n){let{checksumAddress:r=!1}=n??{};if(e.length!==t.length)throw new td({expectedLength:e.length,givenLength:t.length});let i=ts(function({checksumAddress:e,parameters:t,values:n}){let r=[];for(let i=0;i<t.length;i++)r.push(function e({checksumAddress:t=!1,parameter:n,value:r}){let i=function(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(n.type);if(i){let[a,s]=i;return function(t,n){let{checksumAddress:r,length:i,parameter:a}=n,s=null===i;if(!Array.isArray(t))throw new tf(t);if(!s&&t.length!==i)throw new tc({expectedLength:i,givenLength:t.length,type:`${a.type}[${i}]`});let o=!1,u=[];for(let n=0;n<t.length;n++){let i=e({checksumAddress:r,parameter:a,value:t[n]});i.dynamic&&(o=!0),u.push(i)}if(s||o){let e=ts(u);if(s){let t=eq.xS(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?eq.zo(t,e):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:eq.zo(...u.map(({encoded:e})=>e))}}(r,{checksumAddress:t,length:a,parameter:{...n,type:s}})}if("tuple"===n.type)return function(t,n){let{checksumAddress:r,parameter:i}=n,a=!1,s=[];for(let n=0;n<i.components.length;n++){let o=i.components[n],u=Array.isArray(t)?n:o.name,c=e({checksumAddress:r,parameter:o,value:t[u]});s.push(c),c.dynamic&&(a=!0)}return{dynamic:a,encoded:a?ts(s):eq.zo(...s.map(({encoded:e})=>e))}}(r,{checksumAddress:t,parameter:n});if("address"===n.type)return function(e,t){let{checksum:n=!1}=t;return e2(e,{strict:n}),{dynamic:!1,encoded:eq.Q_(e.toLowerCase())}}(r,{checksum:t});if("bool"===n.type)return function(e){if("boolean"!=typeof e)throw new ey.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:eq.Q_(eq.O3(e))}}(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){let e=n.type.startsWith("int"),[,,t="256"]=ta.exec(n.type)??[];return function(e,{signed:t,size:n}){if("number"==typeof n){let r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e<i)throw new eq.J5({max:r.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:eq.xS(e,{size:32,signed:t})}}(r,{signed:e,size:Number(t)})}if(n.type.startsWith("bytes"))return function(e,{type:t}){let[,n]=t.split("bytes"),r=eq.dp(e);if(!n){let t=e;return r%32!=0&&(t=eq.eh(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:eq.zo(eq.Q_(eq.xS(r,{size:32})),t)}}if(r!==Number.parseInt(n))throw new tl({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:eq.eh(e)}}(r,{type:n.type});if("string"===n.type)return function(e){let t=eq.mL(e),n=Math.ceil(eq.dp(t)/32),r=[];for(let e=0;e<n;e++)r.push(eq.eh(eq.tP(t,32*e,(e+1)*32)));return{dynamic:!0,encoded:eq.zo(eq.eh(eq.xS(eq.dp(t),{size:32})),...r)}}(r);throw new th(n.type)}({checksumAddress:e,parameter:t[i],value:n[i]}));return r}({checksumAddress:r,parameters:e,values:t}));return 0===i.length?"0x":i}function tu(e,t){if(e.length!==t.length)throw new td({expectedLength:e.length,givenLength:t.length});let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r];n.push(tu.encode(i,a))}return eq.zo(...n)}(tu||(tu={})).encode=function e(t,n,r=!1){if("address"===t)return e2(n),eq.Q_(n.toLowerCase(),r?32:0);if("string"===t)return eq.mL(n);if("bytes"===t)return n;if("bool"===t)return eq.Q_(eq.O3(n),r?32:1);let i=t.match(ta);if(i){let[e,t,a="256"]=i,s=Number.parseInt(a)/8;return eq.xS(n,{size:r?32:s,signed:"int"===t})}let a=t.match(ti);if(a){let[e,t]=a;if(Number.parseInt(t)!==(n.length-2)/2)throw new tl({expectedSize:Number.parseInt(t),value:n});return eq.eh(n,r?32:0)}let s=t.match(tr);if(s&&Array.isArray(n)){let[t,r]=s,i=[];for(let t=0;t<n.length;t++)i.push(e(r,n[t],!0));return 0===i.length?"0x":eq.zo(...i)}throw new th(t)};
1class tc extends ey.G{constructor({expectedLength:e,givenLength:t,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class tl extends ey.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${eq.dp(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class td extends ey.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding parameters/values length mismatch. 2Expected length (parameters): ${e} 3Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class tf extends ey.G{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class th extends ey.G{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function tp(e,t={}){return e9(e,t)}let tm="0x0000000000000000000000000000000000000000";var ty=n(13955),tg=n(21019);async function tb(e,t){var n,r,i,a,s,o,u,l;let{blockNumber:d,blockTag:f,calls:h,stateOverrides:p,traceAssetChanges:y,traceTransfers:g,validation:b}=t,v=t.account?(0,c.T)(t.account):void 0;if(y&&!v)throw new R.G("`account` is required when `traceAssetChanges` is true");let w=v?function(e,t){let{bytecode:n,args:r}=t;return eq.zo(n,e.inputs?.length&&r?.length?to(e.inputs,r):"0x")}(e9("constructor(bytes, bytes)"),{bytecode:ty.NO,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",function(e,...t){let{overloads:n}=e,r=n?function(e,t,n){let r=function(e,t,n){let r;let{args:i=[],prepare:a=!0}=n??{},s=eq.Gu(t,{strict:!1}),o=e.filter(e=>s?"function"===e.type||"error"===e.type?e7(e)===eq.tP(t,0,4):"event"===e.type&&te(e)===t:"name"in e&&e.name===t);if(0===o.length)throw new tn({name:t});if(1===o.length)return{...o[0],...a?{hash:te(o[0])}:{}};for(let e of o)if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...a?{hash:te(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.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 e6(t,{strict:!1});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;
3if(/[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(r&&"inputs"in r&&r.inputs){let t=function e(t,n,r){for(let i in t){let a=t[i],s=n[i];if("tuple"===a.type&&"tuple"===s.type&&"components"in a&&"components"in s)return e(a.components,s.components,r[i]);let o=[a.type,s.type];if(o.includes("address")&&o.includes("bytes20")||(o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes"))&&e6(r[i],{strict:!1}))return o}}(e.inputs,r.inputs,i);if(t)throw new tt({abiItem:e,type:t[0]},{abiItem:r,type:t[1]})}r=e}}let u=(()=>{if(r)return r;let[e,...t]=o;return{...e,overloads:t}})();if(!u)throw new tn({name:t});return{...u,...a?{hash:te(u)}:{}}}(e,t,n);if("function"!==r.type)throw new tn({name:t,type:"function"});return r}([e,...n],e.name,{args:t[0]}):e,i=e7(r),a=t.length>0?to(r.inputs,t[0]):void 0;return a?eq.zo(i,a):i}(tp("function getBalance(address)"),[v.address])]}):void 0,x=y?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:n}=await m(e,{account:v.address,...t,data:t.abi?(0,ea.R)(t):t.data});return n.map(e=>{let{address:t,storageKeys:n}=e;return n.length>0?t:null})})).then(e=>e.flat().filter(Boolean)):[],E=null==p?void 0:p.map(e=>e.address===(null==v?void 0:v.address)?{...e,nonce:0}:e),_=await el(e,{blockNumber:d,blockTag:f,blocks:[...y?[{calls:[{data:w}],stateOverrides:p},{calls:x.map((e,t)=>({abi:[tp("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:tm,nonce:t})),stateOverrides:[{address:tm,nonce:0}]}]:[],{calls:[...h,{}].map((e,t)=>({...e,from:null==v?void 0:v.address,nonce:t})),stateOverrides:E},...y?[{calls:[{data:w}]},{calls:x.map((e,t)=>({abi:[tp("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:tm,nonce:t})),stateOverrides:[{address:tm,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[tp("function decimals() returns (uint256)")],functionName:"decimals",from:tm,nonce:t})),stateOverrides:[{address:tm,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[tp("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:tm,nonce:t})),stateOverrides:[{address:tm,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[tp("function symbol() returns (string)")],functionName:"symbol",from:tm,nonce:t})),stateOverrides:[{address:tm,nonce:0}]}]:[]],traceTransfers:g,validation:b}),A=y?_[2]:_[0],[I,T,,k,P,O,S,C]=y?_:[],{calls:N,...B}=A,M=null!==(n=N.slice(0,-1))&&void 0!==n?n:[],F=[...null!==(r=null==I?void 0:I.calls)&&void 0!==r?r:[],...null!==(i=null==T?void 0:T.calls)&&void 0!==i?i:[]].map(e=>"success"===e.status?(0,tg.y_)(e.data):null),j=[...null!==(a=null==k?void 0:k.calls)&&void 0!==a?a:[],...null!==(s=null==P?void 0:P.calls)&&void 0!==s?s:[]].map(e=>"success"===e.status?(0,tg.y_)(e.data):null),U=(null!==(o=null==O?void 0:O.calls)&&void 0!==o?o:[]).map(e=>"success"===e.status?e.result:null),$=(null!==(u=null==C?void 0:C.calls)&&void 0!==u?u:[]).map(e=>"success"===e.status?e.result:null),z=(null!==(l=null==S?void 0:S.calls)&&void 0!==l?l:[]).map(e=>"success"===e.status?e.result:null),G=[];for(let[e,t]of j.entries()){let n=F[e];if("bigint"!=typeof t||"bigint"!=typeof n)continue;let r=U[e-1],i=$[e-1],a=z[e-1],s=0===e?{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",decimals:18,symbol:"ETH"}:{address:x[e-1],decimals:a||r?Number(null!=r?r:1):void 0,symbol:null!=i?i:void 0};G.some(e=>e.token.address===s.address)||G.push({token:s,value:{pre:n,post:t,diff:t-n}})}return{assetChanges:G,block:B,results:M}}var tv=n(9660),tw=n(57478),tx=n(64845),tE=n(44138),t_=n(95131),tA=n(38128),tI=n(86387),tT=n(19205),tk=n(24606),tP=n(9338),tO=n(47499),tS=n(96329),tC=n(46699),tN=n(22099),tB=n(32933);let tR=RegExp("^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\\/\\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\n)(?<address>0x[a-fA-F0-9]{40})\\n\\n(?:(?<statement>.*)\\n\\n)?"),tM=RegExp("(?:URI: (?<uri>.+))\\n(?:Version: (?<version>.+))\\n(?:Chain ID: (?<chainId>
3\\d+))\\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\\n(?:Issued At: (?<issuedAt>.+))(?:\\nExpiration Time: (?<expirationTime>.+))?(?:\\nNot Before: (?<notBefore>.+))?(?:\\nRequest ID: (?<requestId>.+))?");var tF=n(64113),tj=n(65937),tU=n(24150);async function t$(e,t){let{address:n,domain:r,message:i,nonce:a,scheme:s,signature:o,time:u=new Date,...c}=t,l=function(e){var t,n,r,i,a;let{scheme:s,statement:o,...u}=null!==(i=null===(t=e.match(tR))||void 0===t?void 0:t.groups)&&void 0!==i?i:{},{chainId:c,expirationTime:l,issuedAt:d,notBefore:f,requestId:h,...p}=null!==(a=null===(n=e.match(tM))||void 0===n?void 0:n.groups)&&void 0!==a?a:{},m=null===(r=e.split("Resources:")[1])||void 0===r?void 0:r.split("\n- ").slice(1);return{...u,...p,...c?{chainId:Number(c)}:{},...l?{expirationTime:new Date(l)}:{},...d?{issuedAt:new Date(d)}:{},...f?{notBefore:new Date(f)}:{},...h?{requestId:h}:{},...m?{resources:m}:{},...s?{scheme:s}:{},...o?{statement:o}:{}}}(i);if(!l.address||!function(e){let{address:t,domain:n,message:r,nonce:i,scheme:a,time:s=new Date}=e;if(n&&r.domain!==n||i&&r.nonce!==i||a&&r.scheme!==a||r.expirationTime&&s>=r.expirationTime||r.notBefore&&s<r.notBefore)return!1;try{if(!r.address||!(0,tF.U)(r.address,{strict:!1})||t&&!(0,tj.E)(r.address,t))return!1}catch(e){return!1}return!0}({address:n,domain:r,message:l,nonce:a,scheme:s,time:u}))return!1;let d=(0,tB.r)(i);return(0,tU.Z)(e,{address:l.address,hash:d,signature:o,...c})}var tz=n(83435),tG=n(96432);function tL(e){return{call:t=>(0,u.R)(e,t),createAccessList:t=>m(e,t),createBlockFilter:()=>g(e),createContractEventFilter:t=>(0,b.A)(e,t),createEventFilter:t=>w(e,t),createPendingTransactionFilter:()=>(0,x.W)(e),estimateContractGas:t=>(0,E.D)(e,t),estimateGas:t=>(0,A.Q)(e,t),getBalance:t=>(0,T.s)(e,t),getBlobBaseFee:()=>k(e),getBlock:t=>(0,P.Q)(e,t),getBlockNumber:t=>(0,O.z)(e,t),getBlockTransactionCount:t=>(0,S.c)(e,t),getBytecode:t=>(0,N.C)(e,t),getChainId:()=>(0,C.L)(e),getCode:t=>(0,N.C)(e,t),getContractEvents:t=>(0,B.m)(e,t),getEip712Domain:t=>U(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,z.Z)(e,t),estimateFeesPerGas:t=>(0,_.X)(e,t),getFilterChanges:t=>(0,G.K)(e,t),getFilterLogs:t=>Z(e,t),getGasPrice:()=>(0,q.o)(e),getLogs:t=>(0,H.y)(e,t),getProof:t=>(0,V.S)(e,t),estimateMaxPriorityFeePerGas:t=>(0,I._)(e,t),getStorageAt:t=>(0,W.Y)(e,t),getTransaction:t=>(0,K.f)(e,t),getTransactionConfirmations:t=>(0,Y.a)(e,t),getTransactionCount:t=>(0,Q.K)(e,t),getTransactionReceipt:t=>(0,J.a)(e,t),multicall:t=>(0,X.A)(e,t),prepareTransactionRequest:t=>(0,tz.ZE)(e,t),readContract:t=>(0,j.L)(e,t),sendRawTransaction:t=>(0,tG.p)(e,t),simulate:t=>el(e,t),simulateBlocks:t=>el(e,t),simulateCalls:t=>tb(e,t),simulateContract:t=>(0,tv.a)(e,t),verifyMessage:t=>(0,tx.n)(e,t),verifySiweMessage:t=>t$(e,t),verifyTypedData:t=>(0,tE.B)(e,t),uninstallFilter:t=>(0,tw.W)(e,t),waitForTransactionReceipt:t=>(0,t_.e)(e,t),watchBlocks:t=>(0,tI.p)(e,t),watchBlockNumber:t=>(0,tA.q)(e,t),watchContractEvent:t=>(0,tT.Y)(e,t),watchEvent:t=>(function(e,t){let n,r,{address:i,args:a,batch:s=!0,event:o,events:u,fromBlock:c,onError:l,onLogs:d,poll:f,pollingInterval:h=e.pollingInterval,strict:p}=t,m=void 0!==f?f:"bigint"==typeof c||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
3onfig.type),y=null!=p&&p;return m?(()=>{let t=(0,tO.P)(["watchEvent",i,a,s,e.uid,o,h,c]);return(0,tk.N7)(t,{onLogs:d,onError:l},t=>{let n,r;void 0!==c&&(n=c-1n);let l=!1,d=(0,tP.$)(async()=>{if(!l){try{r=await (0,F.s)(e,w,"createEventFilter")({address:i,args:a,event:o,events:u,strict:y,fromBlock:c})}catch(e){}l=!0;return}try{let c;if(r)c=await (0,F.s)(e,G.K,"getFilterChanges")({filter:r});else{let t=await (0,F.s)(e,O.z,"getBlockNumber")({});c=n&&n!==t?await (0,F.s)(e,H.y,"getLogs")({address:i,args:a,event:o,events:u,fromBlock:n+1n,toBlock:t}):[],n=t}if(0===c.length)return;if(s)t.onLogs(c);else for(let e of c)t.onLogs([e])}catch(e){var d;r&&e instanceof tS.yR&&(l=!1),null===(d=t.onError)||void 0===d||d.call(t,e)}},{emitOnBegin:!0,interval:h});return async()=>{r&&await (0,F.s)(e,tw.W,"uninstallFilter")({filter:r}),d()}})})():(n=!0,r=()=>n=!1,(async()=>{try{let t=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),s=null!=u?u:o?[o]:void 0,c=[];s&&(c=[s.flatMap(e=>(0,v.O)({abi:[e],eventName:e.name,args:a}))],o&&(c=c[0]));let{unsubscribe:f}=await t.subscribe({params:["logs",{address:i,topics:c}],onData(e){if(!n)return;let t=e.result;try{let{eventName:e,args:n}=(0,tC.F)({abi:null!=s?s:[],data:t.data,topics:t.topics,strict:y}),r=(0,D.U)(t,{args:n,eventName:e});d([r])}catch(a){let e,n;if(a instanceof et.SM||a instanceof et.Gy){var r;if(p)return;e=a.abiItem.name,n=null===(r=a.abiItem.inputs)||void 0===r?void 0:r.some(e=>!("name"in e&&e.name))}let i=(0,D.U)(t,{args:n?[]:{},eventName:e});d([i])}},onError(e){null==l||l(e)}});r=f,n||r()}catch(e){null==l||l(e)}})(),()=>r())})(e,t),watchPendingTransactions:t=>(0,tN.O)(e,t)}}},68705:function(e,t,n){n.d(t,{v:function(){return F}});var r=n(16416),i=n(95046);async function a(e,t){let{chain:n}=t,{id:r,name:a,nativeCurrency:s,rpcUrls:o,blockExplorers:u}=n;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,i.eC)(r),chainName:a,nativeCurrency:s,rpcUrls:o.default.http,blockExplorerUrls:u?Object.values(u).map(e=>{let{url:t}=e;return t}):void 0}]},{dedupe:!0,retryCount:0})}var s=n(79542),o=n(99112);async function u(e){var t;return(null===(t=e.account)||void 0===t?void 0:t.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,o.x)(e))}var c=n(4798),l=n(67839);async function d(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}var f=n(96104),h=n(25355),p=n(65937),m=n(93413),y=n(33208);async function g(e,t){var n,i,a;let{account:s=e.account,chainId:o,nonce:u}=t;if(!s)throw new h.o({docsPath:"/docs/eip7702/prepareAuthorization"});let c=(0,f.T)(s),l=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,f.T)(t.executor)})(),d={address:null!==(i=t.contractAddress)&&void 0!==i?i:t.address,chainId:o,nonce:u};return void 0===d.chainId&&(d.chainId=null!==(a=null===(n=e.chain)||void 0===n?void 0:n.id)&&void 0!==a?a:await (0,m.s)(e,r.L,"getChainId")({})),void 0===d.nonce&&(d.nonce=await (0,m.s)(e,y.K,"getTransactionCount")({address:c.address,blockTag:"pending"}),("self"===l||(null==l?void 0:l.address)&&(0,p.E)(l.address,c.address))&&(d.nonce+=1)),d}var b=n(83435);async function v(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,o.K)(e))}async function w(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}var x=n(19267),E=n(96432),_=n(76830),A=n(12762);async function I(e,t){let{account:n=e.account}=t;if(!n)throw new h.o({docsPath:"/docs/eip7702/signAuthorization"});let r=(0,f.T)(n);if(!r.signAuthorization)throw new h.Y({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});let i=await g(e,t);return r.signAuthorization(i)}var T=n(99154),k=n(63659),P=n(37669),O=n(33425);async function S(e,t){var n,a,s,o;let{account:u=e.account,chain:c=e.chain,...l}=t;if(!u)throw new h.o({docsPath:"/docs/actions/wallet/signTransaction"});let d=(0,f.T)(u);(0,O.F)({account:d,...t});let p=await (0,m.s)(e,r.L,"getChainId")({});null!==c&&(0,k.q)({currentChainId:p,chain:c});let y=(null==c?void 0:c.formatters)||(null===(n=e.chain)||void 0===n?void 0:n.formatters),g=(null==y?void 0:null===(a=y.transactionRequest)||void 0===a?void 0:a.format)||P.tG;return d.signTransaction?d.signTransaction({...l,chainId:p},{serializer:null===(o=e.chain)||void 0===o?void 0:null===(s=o.serializers)||void 0===s?void 0:s.transaction}):await e.request({method:"eth_signTransaction",params:[{...g(l),chainId:(0,i.eC)(p),from:d.address}]},{retryCount:0})}var C=n(64435);async function N(e,t){let{id:n}=t;await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,i.eC)(n)}]},{retryCount:0})}
3var B=n(45843),R=n(32775),M=n(85721);function F(e){return{addChain:t=>a(e,t),deployContract:t=>(0,s.P)(e,t),getAddresses:()=>u(e),getCallsStatus:t=>(0,c.$)(e,t),getCapabilities:t=>(0,l.F)(e,t),getChainId:()=>(0,r.L)(e),getPermissions:()=>d(e),prepareAuthorization:t=>g(e,t),prepareTransactionRequest:t=>(0,b.ZE)(e,t),requestAddresses:()=>v(e),requestPermissions:t=>w(e,t),sendCalls:t=>(0,x.s_)(e,t),sendRawTransaction:t=>(0,E.p)(e,t),sendTransaction:t=>(0,_.T)(e,t),showCallsStatus:t=>(0,A.Z)(e,t),signAuthorization:t=>I(e,t),signMessage:t=>(0,T.l)(e,t),signTransaction:t=>S(e,t),signTypedData:t=>(0,C.x)(e,t),switchChain:t=>N(e,t),waitForCallsStatus:t=>(0,B.l)(e,t),watchAsset:t=>(0,R.d)(e,t),writeContract:t=>(0,M.n)(e,t)}}},93423:function(e,t,n){n.d(t,{q:function(){return d}});var r=n(6649),i=n(4456),a=n(96329),s=n(95046);let o=new(n(98992)).k(8192);var u=n(55894),c=n(47499),l=n(14851);function d(e,t){let{key:n,methods:d,name:f,request:h,retryCount:p=3,retryDelay:m=150,timeout:y,type:g}=e;return{config:{key:n,methods:d,name:f,request:h,retryCount:p,retryDelay:m,timeout:y,type:g},request:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function(n){var l;let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dedupe:f=!1,methods:h,retryDelay:p=150,retryCount:m=3,uid:y}={...t,...d},{method:g}=n;if((null==h?void 0:null===(l=h.exclude)||void 0===l?void 0:l.includes(g))||(null==h?void 0:h.include)&&!h.include.includes(g))throw new a.gS(Error("method not supported"),{method:g});let b=f?(0,s.$G)("".concat(y,".").concat((0,c.P)(n))):void 0;return function(e,t){let{enabled:n=!0,id:r}=t;if(!n||!r)return e();if(o.get(r))return o.get(r);let i=e().finally(()=>o.delete(r));return o.set(r,i),i}(()=>(0,u.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case a.s7.code:throw new a.s7(e);case a.B.code:throw new a.B(e);case a.LX.code:throw new a.LX(e,{method:n.method});case a.nY.code:throw new a.nY(e);case a.XS.code:throw new a.XS(e);case a.yR.code:throw new a.yR(e);case a.Og.code:throw new a.Og(e);case a.pT.code:throw new a.pT(e);case a.KB.code:throw new a.KB(e);case a.gS.code:throw new a.gS(e,{method:n.method});case a.Pv.code:throw new a.Pv(e);case a.GD.code:throw new a.GD(e);case a.ab.code:throw new a.ab(e);case a.PE.code:throw new a.PE(e);case a.Ts.code:throw new a.Ts(e);case a.u5.code:throw new a.u5(e);case a.I0.code:throw new a.I0(e);case a.x3.code:throw new a.x3(e);case a.vl.code:throw new a.vl(e);case a.Uu.code:throw new a.Uu(e);case a.Nt.code:throw new a.Nt(e);case a.EJ.code:throw new a.EJ(e);case a.fl.code:throw new a.fl(e);case a.NO.code:throw new a.NO(e);case a.r0.code:throw new a.r0(e);case 5e3:throw new a.ab(e);default:if(e instanceof r.G)throw e;throw new a.ir(e)}}},{delay:e=>{let{count:t,error:n}=e;if(n&&n instanceof i.Gg){var r;let e=null==n?void 0:null===(r=n.headers)||void 0===r?void 0:r.get("Retry-After");if(null==e?void 0:e.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<<t)*p},retryCount:m,shouldRetry:e=>{let{error:t}=e;return"code"in t&&"number"==typeof t.code?-1===t.code||t.code===a.Pv.code||t.code===a.XS.code:!(t instanceof i.Gg)||!t.status||403===t.status||408===t.status||413===t.status||429===t.status||500===t.status||502===t.status||503===t.status||504===t.status}}),{enabled:f,id:b})}}(h,{methods:d,retryCount:p,retryDelay:m,uid:(0,l.h)()}),value:t}}},62536:function(e,t,n){n.d(t,{d:function(){return d}});var r=n(4456),i=n(6649);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",name:"UrlRequiredError"})}}var s=n(10639),o=n(13581),u=n(47499);let c={current:0,take(){return this.current++},reset(){this.current=0}};var l=n(93423);function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{batch:n,fetchOptions:i,key:d="http",methods:f,name:h="HTTP JSON-RPC",onFetchRequest:p,onFetchResponse:m,retryDelay:y,raw:g}=t;return b=>{var v,w;let{chain:x,retryCount:E,timeout:_}=b,{batchSize:A=1e3,wait:I=0}="object"==typeof n?n:{},T=null!==(v=t.retryCount)&&void 0!==v?v:E,k=null!==(w=null!=_?_:t.timeout)&&void 0!==w?w:1e4,P=e||(null==x?void 0:x.rpcUrls.default.http[0]);if(!P)throw new a;let O=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{async request(n){var i,a,s,l;let{body:d,onRequest:f=t.onRequest,onResponse:h=t.onResponse,timeout:p=null!==(i=t.timeout)&&void 0!==i?i:1e4}=n,m={...null!==(a=t.fetchOptions)&&void 0!==a?a:{},...null!==(s=n.fetchOptions)&&void 0!==s?s:{}},{headers:y,method:g,signal:b}=m;try{let t;let n=await (0,o.F)(async t=>{var n,r,i;let{signal:a}=t,s={...m,body:Array.isArray(d)?(0,u.P)(d.map(e=>{var t;return{jsonrpc:"2.0",id:null!==(t=e.id)&&void 0!==t?t:c.take(),...e}})):(0,u.P)({jsonrpc:"2.0",id:null!==(n=d.id)&&void 0!==n?n:c.take(),...d}),headers:{"Content-Type":"application/json",...y},method:g||"POST",signal:b||(p>0?a:null)}
3,o=new Request(e,s),l=null!==(r=await (null==f?void 0:f(o,s)))&&void 0!==r?r:{...s,url:e};return await fetch(null!==(i=l.url)&&void 0!==i?i:e,l)},{errorInstance:new r.W5({body:d,url:e}),timeout:p,signal:!0});if(h&&await h(n),null===(l=n.headers.get("Content-Type"))||void 0===l?void 0:l.startsWith("application/json"))t=await n.json();else{t=await n.text();try{t=JSON.parse(t||"{}")}catch(e){if(n.ok)throw e;t={error:t}}}if(!n.ok)throw new r.Gg({body:d,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:d,cause:t,url:e})}}}}(P,{fetchOptions:i,onRequest:p,onResponse:m,timeout:k});return(0,l.q)({key:d,methods:f,name:h,async request(e){let{method:t,params:i}=e,a={method:t,params:i},{schedule:o}=(0,s.S)({id:P,wait:I,shouldSplitBatch:e=>e.length>A,fn:e=>O.request({body:e}),sort:(e,t)=>e.id-t.id}),u=async e=>n?o(e):[await O.request({body:e})],[{error:c,result:l}]=await u(a);if(g)return{error:c,result:l};if(c)throw new r.bs({body:a,error:c,url:P});return l},retryCount:T,retryDelay:y,timeout:k,type:"http"},{fetchOptions:i,url:P})}}},21620:function(e,t,n){n.d(t,{$o:function(){return l},F8:function(){return r},X$:function(){return c},Yi:function(){return i},du:function(){return o},k3:function(){return s},nZ:function(){return u}});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=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],a=[{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"}],s=[...a,{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"}]}],o=[...a,{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"}]}],u=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],l=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}]},13955:function(e,t,n){n.d(t,{NO:function(){return r},ST:function(){return a},pG:function(){return i}});let r="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b
3602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",a="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
3603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"},47807:function(e,t,n){n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return a}});let r={1:"An `assert` condition failed.",17:"Arithmetic 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"}},90408:function(e,t,n){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}},52186:function(e,t,n){n.d(t,{CI:function(){return k},FM:function(){return y},Gy:function(){return I},KY:function(){return _},M4:function(){return d},MS:function(){return p},MX:function(){return w},S4:function(){return E},SM:function(){return A},Zh:function(){return h},cO:function(){return o},dh:function(){return T},eF:function(){return x},fM:function(){return s},fs:function(){return f},gr:function(){return l},hn:function(){return P},lC:function(){return g},mv:function(){return b},wM:function(){return O},wb:function(){return c},xB:function(){return u},xL:function(){return v},yP:function(){return m}});var r=n(20101),i=n(7508),a=n(6649);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,name:"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,name:"AbiConstructorParamsNotFoundError"})}}class u extends a.G{constructor({data:e,params:t,size:n}){super(["Data size of ".concat(n," bytes is too small for given parameters.")].join("\n"),{metaMessages:["Params: (".concat((0,r.h)(t,{includeName:!0}),")"),"Data: ".concat(e," (").concat(n," bytes)")],name:"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.',{name:"AbiDecodingZeroDataError"})}}class l extends a.G{constructor({expectedLength:e,givenLength:t,type:n}){super(["ABI encoding array length mismatch for type ".concat(n,"."),"Expected length: ".concat(e),"Given length: ".concat(t)].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.G{constructor({expectedSize:e,value:t}){super('Size of bytes "'.concat(t,'" (bytes').concat((0,i.d)(t),") does not match expected size (bytes").concat(e,")."),{name:"AbiEncodingBytesSizeMismatchError"})}}class f extends a.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.","Expected length (params): ".concat(e),"Given length (values): ".concat(t)].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class h extends a.G{constructor(e,{docsPath:t}){super(['Arguments (`args`) were provided to "'.concat(e,'", but "').concat(e,'" on the ABI does not contain any parameters (`inputs`).'),"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}class p extends a.G{constructor(e,{docsPath:t}={}){super(["Error ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t,name:"AbiErrorNotFoundError"})}}class m extends a.G{constructor(e,{docsPath:t}){super(['Encoded error signature "'.concat(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=".concat(e,".")].join("\n"),{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class y extends a.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class g extends a.G{constructor(e,{docsPath:t}){super(['Encoded event signature "'.concat(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=".concat(e,".")].join("\n"),{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class b extends a.G{constructor(e,{docsPath:t}={}){super(["Event ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t,name:"AbiEventNotFoundError"})}}class v extends a.G{constructor(e,{docsPath:t}={}){super(["Function ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class w extends a.G{constructor(e,{docsPath:t}){super(['Function "'.concat(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."].join("\n"),{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class x extends a.G{constructor(e,{docsPath:t}){super(['Encoded function signature "'.concat(e,'" not found on ABI.'),"Make sure you are using the correct ABI and that the function exists on it.","You can look up the signature here: https://openchain.xyz/signatures?query=".concat(e,".")].join("\n"),{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class E extends a.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:["`".concat(e.type,"` in `").concat((0,r.t)(e.abiItem),"`, and"),"`".concat(t.type,"` in `").concat((0,r.t)(t.abiItem),"`"),"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class _ extends a.G{constructor({expectedSize:e,givenSize:t}
3){super("Expected bytes".concat(e,", got bytes").concat(t,"."),{name:"BytesSizeMismatchError"})}}class A extends a.G{constructor({abiItem:e,data:t,params:n,size:i}){super(["Data size of ".concat(i," bytes is too small for non-indexed event parameters.")].join("\n"),{metaMessages:["Params: (".concat((0,r.h)(n,{includeName:!0}),")"),"Data: ".concat(t," (").concat(i," bytes)")],name:"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 I extends a.G{constructor({abiItem:e,param:t}){super(["Expected a topic for indexed event parameter".concat(t.name?' "'.concat(t.name,'"'):"",' on event "').concat((0,r.t)(e,{includeName:!0}),'".')].join("\n"),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class T extends a.G{constructor(e,{docsPath:t}){super(['Type "'.concat(e,'" is not a valid encoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class k extends a.G{constructor(e,{docsPath:t}){super(['Type "'.concat(e,'" is not a valid decoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiDecodingType"})}}class P extends a.G{constructor(e){super(['Value "'.concat(e,'" is not a valid array.')].join("\n"),{name:"InvalidArrayError"})}}class O extends a.G{constructor(e){super(['"'.concat(e,'" is not a valid definition type.'),'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}},25355:function(e,t,n){n.d(t,{Y:function(){return a},o:function(){return i}});var r=n(6649);class i extends r.G{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class a extends r.G{constructor({docsPath:e,metaMessages:t,type:n}){super('Account type "'.concat(n,'" is not supported.'),{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}},51359:function(e,t,n){n.d(t,{b:function(){return i}});var r=n(6649);class i extends r.G{constructor({address:e}){super('Address "'.concat(e,'" is invalid.'),{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},6649:function(e,t,n){n.d(t,{G:function(){return a}});let r="2.31.0",i={getDocsUrl:e=>{let{docsBaseUrl:t,docsPath:n="",docsSlug:r}=e;return n?"".concat(null!=t?t:"https://viem.sh").concat(n).concat(r?"#".concat(r):""):void 0},version:"viem@".concat(r)};class a extends Error{walk(e){return function e(t,n){return(null==n?void 0:n(t))?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}constructor(e,t={}){var n,s,o;let u=t.cause instanceof a?t.cause.details:(null===(o=t.cause)||void 0===o?void 0:o.message)?t.cause.message:t.details,c=t.cause instanceof a&&t.cause.docsPath||t.docsPath,l=null===(n=i.getDocsUrl)||void 0===n?void 0:n.call(i,{...t,docsPath:c});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...l?["Docs: ".concat(l)]:[],...u?["Details: ".concat(u)]:[],...i.version?["Version: ".concat(i.version)]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=u,this.docsPath=c,this.metaMessages=t.metaMessages,this.name=null!==(s=t.name)&&void 0!==s?s:this.name,this.shortMessage=e,this.version=r}}},87655:function(e,t,n){n.d(t,{f:function(){return i}});var r=n(6649);class i extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n='Block at hash "'.concat(e,'"')),t&&(n='Block at number "'.concat(t,'"')),super("".concat(n," could not be found."),{name:"BlockNotFoundError"})}}},89045:function(e,t,n){n.d(t,{Bk:function(){return s},Yl:function(){return a},mm:function(){return i},pZ:function(){return o}});var r=n(6649);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super('Chain "'.concat(t.name,'" does not support contract "').concat(n.name,'".'),{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?['- The contract "'.concat(n.name,'" was not deployed until block ').concat(n.blockCreated," (current block ").concat(e,").")]:['- The chain does not have the contract "'.concat(n.name,'" configured.')]],name:"ChainDoesNotSupportContract"})}}class a extends r.G{constructor({chain:e,currentChainId:t}){super("The current chain of the wallet (id: ".concat(t,") does not match the target chain for the transaction (id: ").concat(e.id," – ").concat(e.name,")."),{metaMessages:["Current Chain ID: ".concat(t),"Expected Chain ID: ".concat(e.id," – ").concat(e.name)],name:"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.",{name:"ChainNotFoundError"})}}class o extends r.G{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}},58591:function(e,t,n){n.d(t,{cg:function(){return g},uq:function(){return b},Lu:function(){return v},Dk:function(){return w},Mo:function(){return x},VQ:function(){return E}});var r=n(96104),i=n(47807),a=n(71108),s=n(20101),o=n(47499);function u(e){let{abiItem:t,args:n,includeFunctionName:r=!0,includeName:i=!1}=e;
vendor: 6,779 bytes, line 3
3if("name"in t&&"inputs"in t&&t.inputs)return"".concat(r?t.name:"","(").concat(t.inputs.map((e,t)=>"".concat(i&&e.name?"".concat(e.name,": "):"").concat("object"==typeof n[t]?(0,o.P)(n[t]):n[t])).join(", "),")")}var c=n(18748),l=n(85053),d=n(49268),f=n(52186),h=n(6649),p=n(75534),m=n(97658),y=n(87137);class g 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,stateOverride:g}){var b;let v=t?(0,r.T)(t):void 0,w=(0,m.xr)({from:null==v?void 0:v.address,to:h,value:void 0!==y&&"".concat((0,l.d)(y)," ").concat((null==i?void 0:null===(b=i.nativeCurrency)||void 0===b?void 0:b.symbol)||"ETH"),data:a,gas:s,gasPrice:void 0!==o&&"".concat((0,d.o)(o)," gwei"),maxFeePerGas:void 0!==u&&"".concat((0,d.o)(u)," gwei"),maxPriorityFeePerGas:void 0!==c&&"".concat((0,d.o)(c)," gwei"),nonce:f});g&&(w+="\n".concat((0,p.Bj)(g))),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class b extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:a,sender:o}){var l;let d=(0,c.mE)({abi:t,args:n,name:a}),f=d?u({abiItem:d,args:n,includeFunctionName:!1,includeName:!1}):void 0,h=d?(0,s.t)(d,{includeName:!0}):void 0,p=(0,m.xr)({address:r&&(0,y.C)(r),function:h,args:f&&"()"!==f&&"".concat([...Array(null!==(l=null==a?void 0:a.length)&&void 0!==l?l:0).keys()].map(()=>" ").join("")).concat(f),sender:o});super(e.shortMessage||'An unknown error occurred while executing the contract function "'.concat(a,'".'),{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),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}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=o}}class v extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let o,c,l,d,h;if(t&&"0x"!==t)try{let{abiItem:n,errorName:r,args:o}=h=(0,a.p)({abi:e,data:t});if("Error"===r)l=o[0];else if("Panic"===r){let[e]=o;l=i.$[e]}else{var p;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: ".concat(e):"",t&&"()"!==t?" ".concat([...Array(null!==(p=null==r?void 0:r.length)&&void 0!==p?p:0).keys()].map(()=>" ").join("")).concat(t):""]}}catch(e){o=e}else r&&(l=r);o instanceof f.yP&&(d=o.signature,c=['Unable to decode signature "'.concat(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=".concat(d,".")]),super(l&&"execution reverted"!==l||d?['The contract function "'.concat(n,'" reverted with the following ').concat(d?"signature":"reason",":"),l||d].join("\n"):'The contract function "'.concat(n,'" reverted.'),{cause:o,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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.raw=t,this.reason=l,this.signature=d}}class w extends h.G{constructor({functionName:e}){super('The contract function "'.concat(e,'" returned no data ("0x").'),{metaMessages:["This could be due to any of the following:",' - The contract does not have the function "'.concat(e,'",')," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class x extends h.G{constructor({factory:e}){super("Deployment for counterfactual contract call failed".concat(e?' for factory "'.concat(e,'".'):""),{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class E extends h.G{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},19477:function(e,t,n){n.d(t,{KD:function(){return s},T_:function(){return i},lQ:function(){return a}});var r=n(6649);class i extends r.G{constructor({offset:e}){super("Offset `".concat(e,"` cannot be negative."),{name:"NegativeOffsetError"})}}class a extends r.G{constructor({length:e,position:t}){super("Position `".concat(t,"` is out of bounds (`0 < position < ").concat(e,"`)."),{name:"PositionOutOfBoundsError"})}}class s extends r.G{constructor({count:e,limit:t}){super("Recursive read limit of `".concat(t,"` exceeded (recursive read count: `").concat(e,"`)."),{name:"RecursiveReadLimitExceededError"})}}},75057:function(e,t,n){n.d(t,{$s:function(){return a},W_:function(){return s},mV:function(){return i}});var r=n(6649);class i extends r.G{constructor({offset:e,position:t,size:n}){super("Slice ".concat("start"===t?"starting":"ending",' at offset "').concat(e,'" is out-of-bounds (size: ').concat(n,")."),{name:"SliceOffsetOutOfBoundsError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," size (").concat(e,") exceeds padding size (").concat(t,")."),{name:"SizeExceedsPaddingSizeError"})}}class s extends r.G{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," is expected to be ").concat(t," ").concat(n," long, but is ").concat(e," ").concat(n," long."),{name:"InvalidBytesLengthError"})}}}
3,74188:function(e,t,n){n.d(t,{Cd:function(){return s},J5:function(){return i},M6:function(){return o},yr:function(){return a}});var r=n(6649);class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super('Number "'.concat(i,'" is not in safe ').concat(r?"".concat(8*r,"-bit ").concat(n?"signed":"unsigned"," "):"","integer range ").concat(e?"(".concat(t," to ").concat(e,")"):"(above ".concat(t,")")),{name:"IntegerOutOfRangeError"})}}class a extends r.G{constructor(e){super('Bytes value "'.concat(e,'" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.'),{name:"InvalidBytesBooleanError"})}}class s extends r.G{constructor(e){super('Hex value "'.concat(e,'" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).'),{name:"InvalidHexBooleanError"})}}class o extends r.G{constructor({givenSize:e,maxSize:t}){super("Size cannot exceed ".concat(t," bytes. Given size: ").concat(e," bytes."),{name:"SizeOverflowError"})}}},25511:function(e,t,n){n.d(t,{Fz:function(){return a},e5:function(){return s},ld:function(){return o}});var r=n(49268),i=n(6649);class a extends i.G{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class s extends i.G{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class o extends i.G{constructor({maxPriorityFeePerGas:e}){super("`maxFeePerGas` cannot be less than the `maxPriorityFeePerGas` (".concat((0,r.o)(e)," gwei)."),{name:"MaxFeePerGasTooLowError"})}}},37764:function(e,t,n){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 y},cs:function(){return m},dR:function(){return h},pZ:function(){return p},se:function(){return l},vU:function(){return c}});var r=n(49268),i=n(6649);class a extends i.G{constructor({cause:e,message:t}={}){var n;let r=null==t?void 0:null===(n=t.replace("execution reverted: ",""))||void 0===n?void 0:n.replace("execution reverted","");super("Execution reverted ".concat(r?"with reason: ".concat(r):"for an unknown reason","."),{cause:e,name:"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`".concat(t?" = ".concat((0,r.o)(t)," gwei"):"",") cannot be higher than the maximum allowed value (2^256-1)."),{cause:e,name:"FeeCapTooHighError"})}}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`".concat(t?" = ".concat((0,r.o)(t)):""," gwei) cannot be lower than the block base fee."),{cause:e,name:"FeeCapTooLowError"})}}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 ".concat(t?"(".concat(t,") "):"","is higher than the next one expected."),{cause:e,name:"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 ".concat(t?"(".concat(t,") "):"","is lower than the current nonce of the account."),"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"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 ".concat(t?"(".concat(t,") "):"","exceeds the maximum allowed nonce."),{cause:e,name:"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."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends i.G{constructor({cause:e,gas:t}={}){super("The amount of gas ".concat(t?"(".concat(t,") "):"","provided for the transaction exceeds the limit allowed for the block."),{cause:e,name:"IntrinsicGasTooHighError"})}}
vendor: 10,208 bytes, line 3
3Object.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 ".concat(t?"(".concat(t,") "):"","provided for the transaction is too low."),{cause:e,name:"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,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(["The provided tip (`maxPriorityFeePerGas`".concat(t?" = ".concat((0,r.o)(t)," gwei"):"",") cannot be higher than the fee cap (`maxFeePerGas`").concat(n?" = ".concat((0,r.o)(n)," gwei"):"",").")].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends i.G{constructor({cause:e}){super("An error occurred while executing: ".concat(null==e?void 0:e.shortMessage),{cause:e,name:"UnknownNodeError"})}}},4456:function(e,t,n){n.d(t,{Gg:function(){return s},W5:function(){return u},bs:function(){return o}});var r=n(47499),i=n(6649),a=n(87137);class s extends i.G{constructor({body:e,cause:t,details:n,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:t,details:n,metaMessages:[s&&"Status: ".concat(s),"URL: ".concat((0,a.G)(o)),e&&"Request body: ".concat((0,r.P)(e))].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=o}}class o extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:["URL: ".concat((0,a.G)(n)),"Request body: ".concat((0,r.P)(e))],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data}}class u extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:["URL: ".concat((0,a.G)(t)),"Request body: ".concat((0,r.P)(e))],name:"TimeoutError"})}}},96329:function(e,t,n){n.d(t,{B:function(){return u},EJ:function(){return P},GD:function(){return b},I0:function(){return _},KB:function(){return m},LX:function(){return c},NO:function(){return S},Nt:function(){return k},Og:function(){return h},PE:function(){return w},Pv:function(){return g},Ts:function(){return x},Uu:function(){return T},XS:function(){return d},ab:function(){return v},fl:function(){return O},gS:function(){return y},ir:function(){return N},nY:function(){return l},pT:function(){return p},r0:function(){return C},s7:function(){return o},u5:function(){return E},vl:function(){return I},x3:function(){return A},yR:function(){return f}});var r=n(6649),i=n(4456);class a extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,name:a,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:r||(null==e?void 0:e.metaMessages),name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||e.name,this.code=e instanceof i.bs?e.code:null!=t?t:-1}}class s extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends a{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class u extends a{constructor(e){super(e,{code:u.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends a{constructor(e,{method:t}={}){super(e,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:"The method".concat(t?' "'.concat(t,'"'):""," does not exist / is not available.")})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends a{constructor(e){super(e,{code:f.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class h extends a{constructor(e){super(e,{code:h.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends a{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class y extends a{constructor(e,{method:t}={}){super(e,{code:y.code,name:"MethodNotSupportedRpcError",shortMessage:"Method".concat(t?' "'.concat(t,'"'):""," is not supported.")})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends a{constructor(e){super(e,{code:g.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends a{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends s{constructor(e,{method:t}={}){super(e,{code:x.code,name:"UnsupportedProviderMethodError",shortMessage:"The Provider does not support the requested method".concat(t?' " '.concat(t,'"'):"",".")})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class E extends s{constructor(e){super(e,{code:E.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class _ extends s{constructor(e){super(e,{code:_.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class A extends s{constructor(e){super(e,{code:A.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends s{constructor(e){super(e,{code:I.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class T extends s{constructor(e){super(e,{code:T.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class k extends s{constructor(e){super(e,{code:k.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class P extends s{constructor(e){super(e,{code:P.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class O extends s{constructor(e){super(e,{code:O.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class S extends s{constructor(e){super(e,{code:S.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
3);class C extends s{constructor(e){super(e,{code:C.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class N extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},75534:function(e,t,n){n.d(t,{Bj:function(){return o},Nc:function(){return i},Z8:function(){return a}});var r=n(6649);class i extends r.G{constructor({address:e}){super('State for account "'.concat(e,'" is set multiple times.'),{name:"AccountStateConflictError"})}}class a extends r.G{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function s(e){return e.reduce((e,t)=>{let{slot:n,value:r}=t;return"".concat(e," ").concat(n,": ").concat(r,"\n")},"")}function o(e){return e.reduce((e,t)=>{let{address:n,...r}=t,i="".concat(e," ").concat(n,":\n");return r.nonce&&(i+=" nonce: ".concat(r.nonce,"\n")),r.balance&&(i+=" balance: ".concat(r.balance,"\n")),r.code&&(i+=" code: ".concat(r.code,"\n")),r.state&&(i+=" state:\n"+s(r.state)),r.stateDiff&&(i+=" stateDiff:\n"+s(r.stateDiff)),i}," State Override:\n").slice(0,-1)}},97658:function(e,t,n){n.d(t,{Bh:function(){return l},Yb:function(){return d},j3:function(){return u},mc:function(){return f},mk:function(){return c},xY:function(){return o},xr:function(){return s}});var r=n(85053),i=n(49268),a=n(6649);function s(e){let t=Object.entries(e).map(e=>{let[t,n]=e;return void 0===n||!1===n?null:[t,n]}).filter(Boolean),n=t.reduce((e,t)=>{let[n]=t;return Math.max(e,n.length)},0);return t.map(e=>{let[t,r]=e;return" ".concat("".concat(t,":").padEnd(n+1)," ").concat(r)}).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.",{name:"FeeConflictError"})}}class u 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","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class c 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}){var m;super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",s({chain:a&&"".concat(null==a?void 0:a.name," (id: ").concat(null==a?void 0:a.id,")"),from:null==t?void 0:t.address,to:h,value:void 0!==p&&"".concat((0,r.d)(p)," ").concat((null==a?void 0:null===(m=a.nativeCurrency)||void 0===m?void 0:m.symbol)||"ETH"),data:o,gas:u,gasPrice:void 0!==c&&"".concat((0,i.o)(c)," gwei"),maxFeePerGas:void 0!==l&&"".concat((0,i.o)(l)," gwei"),maxPriorityFeePerGas:void 0!==d&&"".concat((0,i.o)(d)," gwei"),nonce:f})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class l extends a.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let a="Transaction";n&&void 0!==i&&(a='Transaction at block time "'.concat(n,'" at index "').concat(i,'"')),e&&void 0!==i&&(a='Transaction at block hash "'.concat(e,'" at index "').concat(i,'"')),t&&void 0!==i&&(a='Transaction at block number "'.concat(t,'" at index "').concat(i,'"')),r&&(a='Transaction with hash "'.concat(r,'"')),super("".concat(a," could not be found."),{name:"TransactionNotFoundError"})}}class d extends a.G{constructor({hash:e}){super('Transaction receipt with hash "'.concat(e,'" could not be found. The Transaction may not be processed on a block yet.'),{name:"TransactionReceiptNotFoundError"})}}class f extends a.G{constructor({hash:e}){super('Timed out while waiting for transaction with hash "'.concat(e,'" to be confirmed.'),{name:"WaitForTransactionReceiptTimeoutError"})}}},87137:function(e,t,n){n.d(t,{C:function(){return r},G:function(){return i}});let r=e=>e,i=e=>e},52998:function(e,t,n){n.d(t,{r:function(){return m}});var r=n(52186),i=n(99112),a=n(15222),s=n(7508),o=n(49014),u=n(77955),c=n(74188),l=n(21019),d=n(95046);function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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(82361),p=n(39480);function m(e,t){let n="string"==typeof t?(0,h.nr)(t):t,m=(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 g=0,b=[];for(let t=0;t<e.length;++t){let n=e[t];m.setPosition(g);let[a,s]=function e(t,n,a){let{staticPosition:s}=a,h=(0,p.S)(n.type);if(h){let[r,i]=h;return function(t,n,r){let{length:i,staticPosition:a}=r;if(!i){let r=a+f(t.readBytes(32)),i=r+32;t.setPosition(r);let s=f(t.readBytes(32)),o=y(n),u=0,c=[];for(let r=0;r<s;++r){t.setPosition(i+(o?32*r:u));let[a,s]=e(t,n,{staticPosition:i});u+=s,c.push(a)}return t.setPosition(a+32),[c,32]}if(y(n)){let r=a+f(t.readBytes(32)),s=[];for(let a=0;a<i;++a){t.setPosition(r+32*a);let[i]=e(t,n,{staticPosition:r});s.push(i)}return t.setPosition(a+32),[s,32]}let s=0,o=[];for(let r=0;r<i;++r){let[r,i]=e(t,n,{staticPosition:a+s});s+=i,o.push(r)}return[o,s]}(t,{...n,type:i},{length:r,staticPosition:s})}if("tuple"===n.type)return function(t,n,r){let{staticPosition:i}
3=r,a=0===n.components.length||n.components.some(e=>{let{name:t}=e;return!t}),s=a?[]:{},o=0;if(y(n)){let r=i+f(t.readBytes(32));for(let i=0;i<n.components.length;++i){let u=n.components[i];t.setPosition(r+o);let[c,l]=e(t,u,{staticPosition:r});o+=l,s[a?i:null==u?void 0:u.name]=c}return t.setPosition(i+32),[s,32]}for(let r=0;r<n.components.length;++r){let u=n.components[r],[c,l]=e(t,u,{staticPosition:i});s[a?r:null==u?void 0:u.name]=c,o+=l}return[s,o]}(t,n,{staticPosition:s});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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},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,n){let{staticPosition:r}=n,[i,a]=t.type.split("bytes");if(!a){let t=f(e.readBytes(32));e.setPosition(r+t);let n=f(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.ci)(i),32]}return[(0,d.ci)(e.readBytes(Number.parseInt(a),32)),32]}(t,n,{staticPosition:s});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[r>48?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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,t){let{staticPosition:n}=t,r=f(e.readBytes(32));e.setPosition(n+r);let i=f(e.readBytes(32));if(0===i)return e.setPosition(n+32),["",32];let a=e.readBytes(i,32),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},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)(a));return e.setPosition(n+32),[s,32]}(t,{staticPosition:s});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(m,n,{staticPosition:0});g+=s,b.push(a)}return b}function y(e){var t;let{type:n}=e;if("string"===n||"bytes"===n||n.endsWith("[]"))return!0;if("tuple"===n)return null===(t=e.components)||void 0===t?void 0:t.some(y);let r=(0,p.S)(e.type);return!!(r&&y({...e,type:r[1]}))}},71108:function(e,t,n){n.d(t,{p:function(){return c}});var r=n(47807),i=n(52186),a=n(49014),s=n(87522),o=n(52998),u=n(20101);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].find(e=>"error"===e.type&&c===(0,s.C)((0,u.t)(e)));if(!l)throw new i.yP(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,o.r)(l.inputs,(0,a.tP)(n,4)):void 0,errorName:l.name}}},46699:function(e,t,n){n.d(t,{F:function(){return l}});var r=n(52186),i=n(7508),a=n(53263),s=n(19477),o=n(52998),u=n(20101);let c="/docs/contract/decodeEventLog";function l(e){let{abi:t,data:n,strict:l,topics:d}=e,f=null==l||l,[h,...p]=d;if(!h)throw new r.FM({docsPath:c});let m=t.find(e=>"event"===e.type&&h===(0,a.n)((0,u.t)(e)));if(!(m&&"name"in m)||"event"!==m.type)throw new r.lC(h,{docsPath:c});let{name:y,inputs:g}=m,b=null==g?void 0:g.some(e=>!("name"in e&&e.name)),v=b?[]:{},w=g.map((e,t)=>[e,t]).filter(e=>{let[t]=e;return"indexed"in t&&t.indexed});for(let e=0;e<w.length;e++){let[t,n]=w[e],i=p[e];if(!i)throw new r.Gy({abiItem:m,param:t});v[b?n:t.name||n]=function(e){let{param:t,value:n}=e;return"string"===t.type||"bytes"===t.type||"tuple"===t.type||t.type.match(/^(.*)\[(\d+)?\]$/)?n:((0,o.r)([t],n)||[])[0]}({param:t,value:i})}let x=g.filter(e=>!("indexed"in e&&e.indexed));if(x.length>0){if(n&&"0x"!==n)try{let e=(0,o.r)(x,n);if(e){var E;if(b)for(let t=0;t<g.length;t++)v[t]=null!==(E=v[t])&&void 0!==E?E:e.shift();else for(let t=0;t<x.length;t++)v[x[t].name]=e[t]}}catch(e){if(f){if(e instanceof r.xB||e instanceof s.lQ)throw new r.SM({abiItem:m,data:n,params:x,size:(0,i.d)(n)});throw e}}else if(f)throw new r.SM({abiItem:m,data:"0x",params:x,size:0})}return{eventName:y,args:Object.values(v).length>0?v:void 0}}},97225:function(e,t,n){n.d(t,{k:function(){return o}});var r=n(52186),i=n(52998),a=n(18748);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}},39480:function(e,t,n){n.d(t,{E:function(){return p},S:function(){return y}});var r=n(52186),i=n(51359),a=n(6649),s=n(74188),o=n(64113),u=n(53932),c=n(88202),l=n(7508),d=n(49014),f=n(95046),h=n(88
vendor: 4,132 bytes, line 3
3056);function p(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=m(function(e){let{params:t,values:n}=e,p=[];for(let e=0;e<t.length;e++)p.push(function e(t){let{param:n,value:p}=t,g=y(n.type);if(g){let[t,i]=g;return function(t,n){let{length:i,param:a}=n,s=null===i;if(!Array.isArray(t))throw new r.hn(t);if(!s&&t.length!==i)throw new r.gr({expectedLength:i,givenLength:t.length,type:"".concat(a.type,"[").concat(i,"]")});let o=!1,c=[];for(let n=0;n<t.length;n++){let r=e({param:a,value:t[n]});r.dynamic&&(o=!0),c.push(r)}if(s||o){let e=m(c);if(s){let t=(0,f.eC)(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?(0,u.zo)([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,u.zo)(c.map(e=>{let{encoded:t}=e;return t}))}}(p,{length:t,param:{...n,type:i}})}if("tuple"===n.type)return function(t,n){let{param:r}=n,i=!1,a=[];for(let n=0;n<r.components.length;n++){let s=r.components[n],o=Array.isArray(t)?n:s.name,u=e({param:s,value:t[o]});a.push(u),u.dynamic&&(i=!0)}return{dynamic:i,encoded:i?m(a):(0,u.zo)(a.map(e=>{let{encoded:t}=e;return t}))}}(p,{param:n});if("address"===n.type)return function(e){if(!(0,o.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,c.gc)(e.toLowerCase())}}(p);if("bool"===n.type)return function(e){if("boolean"!=typeof e)throw new a.G('Invalid boolean value: "'.concat(e,'" (type: ').concat(typeof e,"). Expected: `true` or `false`."));return{dynamic:!1,encoded:(0,c.gc)((0,f.C4)(e))}}(p);if(n.type.startsWith("uint")||n.type.startsWith("int")){var b;let e=n.type.startsWith("int"),[,,t="256"]=null!==(b=h.lh.exec(n.type))&&void 0!==b?b:[];return function(e,t){let{signed:n,size:r=256}=t;if("number"==typeof r){let t=2n**(BigInt(r)-(n?1n:0n))-1n,i=n?-t-1n:0n;if(e>t||e<i)throw new s.J5({max:t.toString(),min:i.toString(),signed:n,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,f.eC)(e,{size:32,signed:n})}}(p,{signed:e,size:Number(t)})}if(n.type.startsWith("bytes"))return function(e,t){let{param:n}=t,[,i]=n.type.split("bytes"),a=(0,l.d)(e);if(!i){let t=e;return a%32!=0&&(t=(0,c.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,u.zo)([(0,c.gc)((0,f.eC)(a,{size:32})),t])}}if(a!==Number.parseInt(i))throw new r.M4({expectedSize:Number.parseInt(i),value:e});return{dynamic:!1,encoded:(0,c.gc)(e,{dir:"right"})}}(p,{param:n});if("string"===n.type)return function(e){let t=(0,f.$G)(e),n=Math.ceil((0,l.d)(t)/32),r=[];for(let e=0;e<n;e++)r.push((0,c.gc)((0,d.tP)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,u.zo)([(0,c.gc)((0,f.eC)((0,l.d)(t),{size:32})),...r])}}(p);throw new r.dh(n.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:t[e],value:n[e]}));return p}({params:e,values:t}));return 0===n.length?"0x":n}function m(e){let t=0;for(let n=0;n<e.length;n++){let{dynamic:r,encoded:i}=e[n];r?t+=32:t+=(0,l.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,f.eC)(t+i,{size:32})),r.push(o),i+=(0,l.d)(o)):n.push(o)}return(0,u.zo)([...n,...r])}function y(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},32637:function(e,t,n){n.d(t,{w:function(){return o}});var r=n(52186),i=n(53932),a=n(39480);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])}},36212:function(e,t,n){n.d(t,{O:function(){return h}});var r=n(52186),i=n(6649);class a extends i.G{constructor(e){super('Filter type "'.concat(e,'" is not supported.'),{name:"FilterTypeNotSupportedError"})}}var s=n(82361),o=n(47147),u=n(53263),c=n(39480),l=n(20101),d=n(18748);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=[];
3if(i&&"inputs"in a){var h,m,y;let e=null===(h=a.inputs)||void 0===h?void 0:h.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(i)?i:Object.values(i).length>0&&null!==(m=null==e?void 0:e.map(e=>i[e.name]))&&void 0!==m?m:[];t.length>0&&(c=null!==(y=null==e?void 0:e.map((e,n)=>Array.isArray(t[n])?t[n].map((r,i)=>p({param:e,value:t[n][i]})):void 0!==t[n]&&null!==t[n]?p({param:e,value:t[n]}):null))&&void 0!==y?y:[])}return[o,...c]}function p(e){let{param:t,value:n}=e;if("string"===t.type||"bytes"===t.type)return(0,o.w)((0,s.O0)(n));if("tuple"===t.type||t.type.match(/^(.*)\[(\d+)?\]$/))throw new a(t.type);return(0,c.E)([t],[n])}},31006:function(e,t,n){n.d(t,{R:function(){return l}});var r=n(53932),i=n(39480),a=n(52186),s=n(87522),o=n(20101),u=n(18748);let c="/docs/contract/encodeFunctionData";function l(e){var t;let{args:n}=e,{abi:l,functionName:d}=1===e.abi.length&&(null===(t=e.functionName)||void 0===t?void 0:t.startsWith("0x"))?e:function(e){let{abi:t,args:n,functionName:r}=e,i=t[0];if(r){let e=(0,u.mE)({abi:t,args:n,name:r});if(!e)throw new a.xL(r,{docsPath:c});i=e}if("function"!==i.type)throw new a.xL(void 0,{docsPath:c});return{abi:[i],functionName:(0,s.C)((0,o.t)(i))}}
3(e),f=l[0],h="inputs"in f&&f.inputs?(0,i.E)(f.inputs,null!=n?n:[]):void 0;return(0,r.SM)([d,null!=h?h:"0x"])}},20101:function(e,t,n){n.d(t,{h:function(){return a},t:function(){return i}});var r=n(52186);function i(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return"".concat(e.name,"(").concat(a(e.inputs,{includeName:t}),")")}function a(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.map(e=>(function(e,t){let{includeName:n}=t;return e.type.startsWith("tuple")?"(".concat(a(e.components,{includeName:n}),")").concat(e.type.slice(5)):e.type+(n&&e.name?" ".concat(e.name):"")})(e,{includeName:t})).join(t?", ":","):""}},18748:function(e,t,n){n.d(t,{mE:function(){return u}});var r=n(52186),i=n(40369),a=n(64113),s=n(53263),o=n(87522);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){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&&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,{strict:!1});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;
vendor: 9,047 bytes, line 3
3if(/[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(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];if(u.includes("address")&&u.includes("bytes20")||(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&(0,a.U)(r[i],{strict:!1}))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]}}},31703:function(e,t,n){n.d(t,{h:function(){return c}});var r=n(52186),i=n(65937),a=n(82361),s=n(47147),o=n(53263),u=n(46699);function c(e){let{abi:t,args:n,logs:c,strict:l=!0}=e,d=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return c.map(e=>{try{let r=t.find(t=>"event"===t.type&&e.topics[0]===(0,o.n)(t));if(!r)return null;let c=(0,u.F)({...e,abi:[r],strict:l});if(d&&!d.includes(c.eventName)||!function(e){let{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(e,t,n){try{if("address"===e.type)return(0,i.E)(t,n);if("string"===e.type||"bytes"===e.type)return(0,s.w)((0,a.O0)(t))===n;return t===n}catch(e){return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((e,r)=>{if(null==e)return!0;let i=n[r];return!!i&&(Array.isArray(e)?e:[e]).some(e=>o(i,e,t[r]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof r||Array.isArray(r))&&Object.entries(r).every(e=>{let[r,i]=e;if(null==i)return!0;let a=n.find(e=>e.name===r);return!!a&&(Array.isArray(i)?i:[i]).some(e=>o(a,e,t[r]))})}({args:c.args,inputs:r.inputs,matchArgs:n}))return null;return{...c,...e}}catch(i){let t,n;if(i instanceof r.lC)return null;if(i instanceof r.SM||i instanceof r.Gy){var c;if(l)return null;t=i.abiItem.name,n=null===(c=i.abiItem.inputs)||void 0===c?void 0:c.some(e=>!("name"in e&&e.name))}return{...e,args:n?[]:{},eventName:t}}}).filter(Boolean)}},99112:function(e,t,n){n.d(t,{K:function(){return l},x:function(){return c}});var r=n(51359),i=n(82361),a=n(47147),s=n(98992),o=n(64113);let u=new s.k(8192);function c(e,t){if(u.has("".concat(e,".").concat(t)))return u.get("".concat(e,".").concat(t));let n=t?"".concat(t).concat(e.toLowerCase()):e.substring(2).toLowerCase(),r=(0,a.w)((0,i.qX)(n),"bytes"),s=(t?n.substring("".concat(t,"0x").length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&r[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());let o="0x".concat(s.join(""));return u.set("".concat(e,".").concat(t),o),o}function l(e,t){if(!(0,o.U)(e,{strict:!1}))throw new r.b({address:e});return c(e,t)}},64113:function(e,t,n){n.d(t,{U:function(){return o}});var r=n(98992),i=n(99112);let a=/^0x[a-fA-F0-9]{40}$/,s=new r.k(8192);function o(e,t){let{strict:n=!0}=null!=t?t:{},r="".concat(e,".").concat(n);if(s.has(r))return s.get(r);let o=!!a.test(e)&&(e.toLowerCase()===e||!n||(0,i.x)(e)===e);return s.set(r,o),o}},65937:function(e,t,n){n.d(t,{E:function(){return a}});var r=n(51359),i=n(64113);function a(e,t){if(!(0,i.U)(e,{strict:!1}))throw new r.b({address:e});if(!(0,i.U)(t,{strict:!1}))throw new r.b({address:t});return e.toLowerCase()===t.toLowerCase()}},72664:function(e,t,n){n.d(t,{z:function(){return d}});var r=n(97261),i=n(53932),a=n(82361),s=n(95046),o=n(6649),u=n(15222);function c(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new o.G("Length is too large.")}var l=n(47147);async function d(e){let{authorization:t,signature:n}=e;return(0,r.R)({hash:function(e){var t;let{chainId:n,nonce:r,to:o}=e,d=null!==(t=e.contractAddress)&&void 0!==t?t:e.address,f=(0,l.w)((0,i.SM)(["0x05",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",n=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),n=c(t);return{length:t<=55?1+t:1+n+t,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,a.nr)(e):e,n=c(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,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,u.q)(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,s.ci)(r.bytes):r.bytes}([n?(0,s.eC)(n):"0x",d,r?(0,s.eC)(r):"0x"])]));return"bytes"===o?(0,a.nr)(f):f}(t),signature:null!=n?n:t})}},63659:function(e,t,n){n.d(t,{q:function(){return i}});var r=n(89045);function i(e){let{chain:t,currentChainId:n}=e;if(!t)throw new r.Bk;if(n!==t.id)throw new r.Yl({chain:t,currentChainId:n})}},95258:function(e,t,n){n.d(t,{a:function(){return r}});function r(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},18543:function(e,t,n){n.d(t,{L:function(){return i}});var r=n(89045);function i(e){var t;let{blockNumber:n,chain:i,contract:a}=e,s=null==i?void 0:null===(t=i.contracts)||void 0===t?void 0:t[a];if(!s)throw new r.mm({chain:i,contract:{name:a}});if(n&&s.blockCreated&&s.blockCreated>n)throw new r.mm({blockNumber:n,chain:i,contract:{name:a,blockCreated:s.blockCreated}});return s.address}},15222:function(e,t,n){n.d(t,{q:function(){return a}});var r=n(19477);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,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=null!=e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=null!=t?t:this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=null!=e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=null!=e?e:this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=null!=e?e:this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=null!=e?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+=null!=t?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},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function a(e){let{recursiveReadLimit:t=8192}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},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}},53932:function(e,t,n){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".concat(e.reduce((e,t)=>
3e+t.replace("0x",""),""))}n.d(t,{SM:function(){return i},zo:function(){return r}})},40369:function(e,t,n){n.d(t,{v:function(){return r}});function r(e){let{strict:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},88202:function(e,t,n){n.d(t,{gc:function(){return a},vk:function(){return i}});var r=n(75057);function i(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?a(e,{dir:t,size:n}):function(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;if(e.length>n)throw new r.$s({size:e.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r<n;r++){let a="right"===t;i[a?r:n-r-1]=e[a?r:e.length-r-1]}return i}(e,{dir:t,size:n})}function a(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;let i=e.replace("0x","");if(i.length>2*n)throw new r.$s({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return"0x".concat(i["right"===t?"padEnd":"padStart"](2*n,"0"))}},7508:function(e,t,n){n.d(t,{d:function(){return i}});var r=n(40369);function i(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},49014:function(e,t,n){n.d(t,{T4:function(){return c},p5:function(){return l},tP:function(){return s}});var r=n(75057),i=n(40369),a=n(7508);function s(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.v)(e,{strict:!1})?l(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.mV({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.mV({offset:n,position:"end",size:(0,a.d)(e)})}function c(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};o(e,t);let i=e.slice(t,n);return r&&u(i,t,n),i}function l(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};o(e,t);let i="0x".concat(e.replace("0x","").slice((null!=t?t:0)*2,(null!=n?n:e.length)*2));return r&&u(i,t,n),i}},77955:function(e,t,n){n.d(t,{f:function(){return r}});function r(e){let{dir:t="left"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;e<n.length-1&&"0"===n["left"===t?e:n.length-e-1].toString();e++)r++;return(n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e)?(1===n.length&&"right"===t&&(n="".concat(n,"0")),"0x".concat(n.length%2==1?"0".concat(n):n)):n}},21019:function(e,t,n){n.d(t,{XA:function(){return c},Yf:function(){return o},ly:function(){return l},rR:function(){return d},y_:function(){return u}});var r=n(74188),i=n(7508),a=n(77955),s=n(82361);function o(e,t){let{size:n}=t;if((0,i.d)(e)>n)throw new r.M6({givenSize:(0,i.d)(e),maxSize:n})}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:n}=t;t.size&&o(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt("0x".concat("f".padStart(2*i,"f")))-1n}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if(t.size&&(o(n,{size:t.size}),n=(0,a.f)(n)),"0x00"===(0,a.f)(n))return!1;if("0x01"===(0,a.f)(n))return!0;throw new r.Cd(n)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Number(u(e,t))}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.nr)(e);return t.size&&(o(n,{size:t.size}),n=(0,a.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},82361:function(e,t,n){n.d(t,{O0:function(){return c},nr:function(){return f},qX:function(){return h}});var r=n(6649),i=n(40369),a=n(88202),s=n(21019),o=n(95046);let u=new TextEncoder;function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?f((0,o.eC)(e,t)):"boolean"==typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,s.Yf)(n,{size:t.size}),(0,a.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?f(e,t):h(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,a.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i="0".concat(i));let o=i.length/2,u=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let n=d(i.charCodeAt(t++)),a=d(i.charCodeAt(t++));if(void 0===n||void 0===a)throw new r.G('Invalid byte sequence ("'.concat(i[t-2]).concat(i[t-1],'" in "').concat(i,'").'));u[e]=16*n+a}return u}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u.encode(e);return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,a.vk)(n,{dir:"right",size:t.size})):n}},95046:function(e,t,n){n.d(t,{$G:function(){return f},C4:function(){return u},NC:function(){return o},ci:function(){return c},eC:function(){return l}});var r=n(74188),i=n(88202),a=n(21019);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?f(e,t):"boolean"==typeof e?u(e,t):c(e,t)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="0x".concat(Number(e));return"number"==typeof t.size?((0,a.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";for(let t=0;t<e.length;t++)n+=s[e[t]];let r="0x".concat(n);return"number"==typeof t.size?((0,a.Yf)(r,{size:t.size}),(0,i.vk)(r,{dir:"right",size:t.size})):r}function l(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:a,size:s}=n,o=BigInt(e);s?t=a?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(t=BigInt(Number.MAX_SAFE_INTEGER));let u="bigint"==typeof t&&a?-t-1n:0;if(t&&o>t||o<u){let n="bigint"==typeof e?"n":"";throw new r.J5({max:t?"".concat(t).concat(n):void 0,min:"".concat(u).
3concat(n),signed:a,size:s,value:"".concat(e).concat(n)})}let c="0x".concat((a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16));return s?(0,i.vk)(c,{size:s}):c}let d=new TextEncoder;function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(d.encode(e),t)}},48:function(e,t,n){n.d(t,{i:function(){return i}});var r=n(40369);function i(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t="0x".concat(e.slice(1,65));return(0,r.v)(t)?t:null}},25652:function(e,t,n){n.d(t,{c:function(){return s}});var r=n(47807),i=n(6649),a=n(58591);function s(e,t){var n,s,o,u,c,l;if(!(e instanceof i.G))return!1;let d=e.walk(e=>e instanceof a.Lu);return d instanceof a.Lu&&(!!((null===(n=d.data)||void 0===n?void 0:n.errorName)==="ResolverNotFound"||(null===(s=d.data)||void 0===s?void 0:s.errorName)==="ResolverWildcardNotSupported"||(null===(o=d.data)||void 0===o?void 0:o.errorName)==="ResolverNotContract"||(null===(u=d.data)||void 0===u?void 0:u.errorName)==="ResolverError"||(null===(c=d.data)||void 0===c?void 0:c.errorName)==="HttpError"||(null===(l=d.reason)||void 0===l?void 0:l.includes("Wildcard on non-extended resolvers is not supported")))||"reverse"===t&&d.reason===r.$[50])}},62517:function(e,t,n){n.d(t,{w:function(){return g},M:function(){return y}});var r=n(21620),i=n(47807),a=n(52186),s=n(49014),o=n(87522),u=n(52998),c=n(20101),l=n(53932),d=n(39480),f=n(18748);let h="/docs/contract/encodeErrorResult";function p(e){let{abi:t,errorName:n,args:r}=e,i=t[0];if(n){let e=(0,f.mE)({abi:t,args:r,name:n});if(!e)throw new a.MS(n,{docsPath:h});i=e}if("error"!==i.type)throw new a.MS(void 0,{docsPath:h});let s=(0,c.t)(i),u=(0,o.C)(s),p="0x";if(r&&r.length>0){if(!i.inputs)throw new a.Zh(i.name,{docsPath:h});p=(0,d.E)(i.inputs,r)}return(0,l.SM)([u,p])}let m="/docs/contract/encodeFunctionResult",y="x-batch-gateway:true";async function g(e){let{data:t,ccipRequest:n}=e,{args:[l]}=function(e){let{abi:t,data:n}=e,r=(0,s.tP)(n,0,4),i=t.find(e=>"function"===e.type&&r===(0,o.C)((0,c.t)(e)));if(!i)throw new a.eF(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:i.name,args:"inputs"in i&&i.inputs&&i.inputs.length>0?(0,u.r)(i.inputs,(0,s.tP)(n,4)):void 0}}({abi:r.Yi,data:t}),h=[],y=[];return await Promise.all(l.map(async(e,t)=>{try{y[t]=await n(e),h[t]=!1}catch(e){h[t]=!0,y[t]="HttpRequestError"===e.name&&e.status?p({abi:r.Yi,errorName:"HttpError",args:[e.status,e.shortMessage]}):p({abi:[i.Up],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}})),function(e){let{abi:t,functionName:n,result:r}=e,i=t[0];if(n){let e=(0,f.mE)({abi:t,name:n});if(!e)throw new a.xL(n,{docsPath:m});i=e}if("function"!==i.type)throw new a.xL(void 0,{docsPath:m});if(!i.outputs)throw new a.MX(i.name,{docsPath:m});let s=(()=>{if(0===i.outputs.length)return[];if(1===i.outputs.length)return[r];if(Array.isArray(r))return r;throw new a.hn(r)})();return(0,d.E)(i.outputs,s)}({abi:r.Yi,functionName:"query",result:[h,y]})}},82978:function(e,t,n){n.d(t,{V:function(){return u}});var r=n(53932),i=n(82361),a=n(95046),s=n(47147),o=n(48);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)}},68890:function(e,t,n){n.d(t,{T:function(){return o}});var r=n(82361),i=n(95046),a=n(47147),s=n(48);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]),"[".concat(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}},8114:function(e,t,n){n.d(t,{P:function(){return s}});var r=n(58591),i=n(37764),a=n(43149);function s(e,t){let{docsPath:n,...s}=t,o=(()=>{let t=(0,a.k)(e,s);return t instanceof i.cj?e:t})();return new r.cg(o,{docsPath:n,...s})}},92915:function(e,t,n){n.d(t,{S:function(){return u}});var r=n(52186),i=n(6649),a=n(58591),s=n(4456),o=n(96329);function u(e,t){let{abi:n,address:u,args:c,docsPath:l,functionName:d,sender:f}=t,h=e instanceof a.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},{code:p,data:m,details:y,message:g,shortMessage:b}=h,v=e instanceof r.wb?new a.Dk({functionName:d}
3):[3,o.XS.code].includes(p)&&(m||y||g||b)?new a.Lu({abi:n,data:"object"==typeof m?m.data:m,functionName:d,message:h instanceof s.bs?y:null!=b?b:g}):e;return new a.uq(v,{abi:n,args:c,contractAddress:u,docsPath:l,functionName:d,sender:f})}},43149:function(e,t,n){n.d(t,{k:function(){return a}});var r=n(6649),i=n(37764);function a(e,t){let n=(e.details||"").toLowerCase(),a=e instanceof r.G?e.walk(e=>(null==e?void 0: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:null==t?void 0:t.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:null==t?void 0:t.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:null==t?void 0:t.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:null==t?void 0:t.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:null==t?void 0:t.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:null==t?void 0:t.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:null==t?void 0:t.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:null==t?void 0:t.maxFeePerGas,maxPriorityFeePerGas:null==t?void 0:t.maxPriorityFeePerGas}):new i.cj({cause:e})}},79320:function(e,t,n){n.d(t,{$:function(){return s}});var r=n(37764),i=n(97658),a=n(43149);function s(e,t){let{docsPath:n,...s}=t,o=(()=>{let t=(0,a.k)(e,s);return t instanceof r.cj?e:t})();return new i.mk(o,{docsPath:n,...s})}},48586:function(e,t,n){n.d(t,{g:function(){return r}});function r(e,t){var n,r;let{method:i}=t,a={};return"fallback"===e.transport.type&&(null===(n=(r=e.transport).onResponse)||void 0===n||n.call(r,e=>{let{method:t,response:n,status:r,transport:s}=e;"success"===r&&i===t&&(a[n]=s.request)})),t=>a[t]||e.request}},20621:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(16719);function i(e){var t;let n=(null!==(t=e.transactions)&&void 0!==t?t:[]).map(e=>"string"==typeof e?e:(0,r.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:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}},27031:function(e,t,n){n.d(t,{K:function(){return r}});function r(e,t){let{format:n}=t;if(!n)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(n(e||{})),r}},21677:function(e,t,n){n.d(t,{U:function(){return r}});function r(e){let{args:t,eventName:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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}:{}}}},16719:function(e,t,n){n.d(t,{Tr:function(){return a},c8:function(){return i}});var r=n(21019);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,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?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>
vendor: 5,672 bytes, line 3
3{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}},55875:function(e,t,n){n.d(t,{ew:function(){return s},fA:function(){return o}});var r=n(21019),i=n(21677),a=n(16719);let s={"0x0":"reverted","0x1":"success"};function o(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,i.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?s[e.status]:null,type:e.type?a.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}},37669:function(e,t,n){n.d(t,{tG:function(){return a}});var r=n(95046);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,r.eC)(BigInt(e.r)):e.r,s:e.s?(0,r.eC)(BigInt(e.s)):e.s,chainId:(0,r.eC)(e.chainId),nonce:(0,r.eC)(e.nonce),...void 0!==e.yParity?{yParity:(0,r.eC)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,r.eC)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,r.ci)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,r.eC)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,r.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,r.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,r.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,r.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,r.eC)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,r.eC)(e.value)),t}},93413:function(e,t,n){n.d(t,{s:function(){return r}});function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}},47147:function(e,t,n){n.d(t,{w:function(){return A}});var r=n(43452),i=n(12403);let a=BigInt(0),s=BigInt(1),o=BigInt(2),u=BigInt(7),c=BigInt(256),l=BigInt(113),d=[],f=[],h=[];for(let e=0,t=s,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],d.push(2*(5*r+n)),f.push((e+1)*(e+2)/2%64);let i=a;for(let e=0;e<7;e++)(t=(t<<s^(t>>u)*l)%c)&o&&(i^=s<<(s<<BigInt(e))-s);h.push(i)}let p=(0,r.Vl)(h,!0),m=p[0],y=p[1],g=(e,t,n)=>n>32?(0,r.SD)(e,t,n):(0,r.EP)(e,t,n),b=(e,t,n)=>n>32?(0,r.mk)(e,t,n):(0,r.gm)(e,t,n);class v extends i.kb{clone(){return this._cloneInto()}keccak(){(0,i.Ux)(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],s=n[i+1],o=g(a,s,1)^n[r],u=b(a,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=o,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=f[n],a=g(t,i,r),s=b(t,i,r),o=d[n];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=m[r],e[1]^=y[r]}(0,i.ru)(n)}(this.state32,this.rounds),(0,i.Ux)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.$h)(this),e=(0,i.O0)(e),(0,i.gk)(e);let{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,i.$h)(this,!1),(0,i.gk)(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.k8)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.eB)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.ru)(this.state)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return e||(e=new v(t,n,r,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}constructor(e,t,n,r=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=a,(0,i.k8)(n),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.Jq)(this.state)}}let w=(0,i.V1)(()=>new v(136,1,32));
3var x=n(40369),E=n(82361),_=n(95046);function A(e,t){let n=w((0,x.v)(e,{strict:!1})?(0,E.O0)(e):e);return"bytes"===(t||"hex")?n:(0,_.NC)(n)}},53263:function(e,t,n){n.d(t,{n:function(){return r}});let r=n(81430).r},87522:function(e,t,n){n.d(t,{C:function(){return a}});var r=n(49014),i=n(81430);let a=e=>(0,r.tP)((0,i.r)(e),0,4)},81430:function(e,t,n){n.d(t,{r:function(){return c}});var r=n(82361),i=n(47147);let a=e=>(0,i.w)((0,r.O0)(e));var s=n(4822),o=n(6649);let u=e=>(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 o.G("Unable to normalize signature.");return i})("string"==typeof e?e:(0,s.t)(e));function c(e){return a(u(e))}},98992:function(e,t,n){n.d(t,{k:function(){return r}});class r extends Map{get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}}},24606:function(e,t,n){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=()=>
3{let t=o();if(!t.some(e=>e.id===s))return;let n=i.get(e);1===t.length&&n&&n(),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]=function(){for(var t,n,r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];let s=o();if(0!==s.length)for(let r of s)null===(t=(n=r.fns)[e])||void 0===t||t.call(n,...i)};let f=n(d);return"function"==typeof f&&i.set(e,f),c}},9338:function(e,t,n){n.d(t,{$:function(){return i}});var r=n(97317);function i(e,t){let{emitOnBegin:n,initialWaitTime:i,interval:a}=t,s=!0,o=()=>s=!1;return(async()=>{var t;let u;n&&(u=await e({unpoll:o}));let c=null!==(t=await (null==i?void 0:i(u)))&&void 0!==t?t:a;await (0,r.D)(c);let l=async()=>{s&&(await e({unpoll:o}),await (0,r.D)(a),l())};l()})(),o}},10639:function(e,t,n){n.d(t,{S:function(){return a}});var r=n(49568);let i=new Map;function a(e){let{fn:t,id:n,shouldSplitBatch:a,wait:s=0,sort:o}=e,u=async()=>{let e=d();c();let n=e.map(e=>{let{args:t}=e;return t});0!==n.length&&t(n).then(t=>{o&&Array.isArray(t)&&t.sort(o);for(let n=0;n<e.length;n++){let{resolve:r}=e[n];null==r||r([t[n],t])}}).catch(t=>{for(let n=0;n<e.length;n++){let{reject:r}=e[n];null==r||r(t)}})},c=()=>i.delete(n),l=()=>d().map(e=>{let{args:t}=e;return t}),d=()=>i.get(n)||[],f=e=>i.set(n,[...d(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:n,reject:i}=(0,r.n)();return((null==a?void 0:a([...l(),e]))&&u(),d().length>0)?f({args:e,resolve:n,reject:i}):(f({args:e,resolve:n,reject:i}),setTimeout(u,s)),t}}}},49568:function(e,t,n){n.d(t,{n:function(){return r}});function r(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}},55894:function(e,t,n){n.d(t,{J:function(){return i}});var r=n(97317);function i(e){let{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((a,s)=>{let o=async function(){let{count:u=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=async e=>{let{error:n}=e,i="function"==typeof t?t({count:u,error:n}):t;i&&await (0,r.D)(i),o({count:u+1})};try{let t=await e();a(t)}catch(e){if(u<n&&await i({count:u,error:e}))return c({error:e});s(e)}};o()})}},13581:function(e,t,n){n.d(t,{F:function(){return r}});function r(e,t){let{errorInstance:n=Error("timed out"),timeout:r,signal:i}=t;return new Promise((t,a)=>{(async()=>{let s;try{let o=new AbortController;r>0&&(s=setTimeout(()=>{i?o.abort():a(n)},r)),t(await e({signal:(null==o?void 0:o.signal)||null}))}catch(e){(null==e?void 0:e.name)==="AbortError"&&a(n),a(e)}finally{clearTimeout(s)}})()})}},88056:function(e,t,n){n.d(t,{eL:function(){return r},lh:function(){return i}});let r=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,i=/^(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)?$/},32933:function(e,t,n){n.d(t,{r:function(){return o}});var r=n(47147),i=n(53932),a=n(7508),s=n(95046);function o(e,t){return(0,r.w)(function(e){let t="string"==typeof e?(0,s.$G)(e):"string"==typeof e.raw?e.raw:(0,s.ci)(e.raw),n=(0,s.$G)("".concat("\x19Ethereum Signed Message:\n").concat((0,a.d)(t)));return(0,i.zo)([n,t])}(e),t)}},97261:function(e,t,n){n.d(t,{R:function(){return d}});var r=n(99112),i=n(47147),a=n(40369),s=n(7508),o=n(21019),u=n(95046);async function c(e){let{hash:t,signature:r}=e,i=(0,a.v)(t)?t:(0,u.NC)(t),{secp256k1:c}=await Promise.resolve().then(n.bind(n,71813)),d=(()=>{if("object"==typeof r&&"r"in r&&"s"in r){let{r:e,s:t,v:n,yParity:i}=r,a=l(Number(null!=i?i:n));return new c.Signature((0,o.y_)(e),(0,o.y_)(t)).addRecoveryBit(a)}let e=(0,a.v)(r)?r:(0,u.NC)(r);if(65!==(0,s.d)(e))throw Error("invalid signature length");let t=l((0,o.ly)("0x".concat(e.slice(130))));return c.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(t)})().recoverPublicKey(i.substring(2)).toHex(!1);return"0x".concat(d)}function l(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function d(e){let{hash:t,signature:n}=e;return function(e){let t=(0,i.w)("0x".concat(e.substring(4))).substring(26);return(0,r.x)("0x".concat(t))}(await c({hash:t,signature:n}))}},11667:function(e,t,n){n.d(t,{mF:function(){return c}});var r=n(51359),i=n(75057),a=n(75534),s=n(64113),o=n(95046);function u(e){if(e&&0!==e.length)return e.reduce((e,t)=>
3{let{slot:n,value:r}=t;if(66!==n.length)throw new i.W_({size:n.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.W_({size:r.length,targetSize:66,type:"hex"});return e[n]=r,e},{})}function c(e){if(!e)return;let t={};for(let{address:n,...i}of e){if(!(0,s.U)(n,{strict:!1}))throw new r.b({address:n});if(t[n])throw new a.Nc({address:n});t[n]=function(e){let{balance:t,nonce:n,state:r,stateDiff:i,code:s}=e,c={};if(void 0!==s&&(c.code=s),void 0!==t&&(c.balance=(0,o.eC)(t)),void 0!==n&&(c.nonce=(0,o.eC)(n)),void 0!==r&&(c.state=u(r)),void 0!==i){if(c.state)throw new a.Z8;c.stateDiff=u(i)}return c}(i)}return t}},47499:function(e,t,n){n.d(t,{P:function(){return r}});let r=(e,t,n)=>JSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},33425:function(e,t,n){n.d(t,{F:function(){return c}});var r=n(96104);let i=2n**256n-1n;var a=n(51359),s=n(37764),o=n(97658),u=n(64113);function c(e){let{account:t,gasPrice:n,maxFeePerGas:c,maxPriorityFeePerGas:l,to:d}=e,f=t?(0,r.T)(t):void 0;if(f&&!(0,u.U)(f.address))throw new a.b({address:f.address});if(d&&!(0,u.U)(d))throw new a.b({address:d});if(void 0!==n&&(void 0!==c||void 0!==l))throw new o.xY;if(c&&c>i)throw new s.Hh({maxFeePerGas:c});if(l&&c&&l>c)throw new s.cs({maxFeePerGas:c,maxPriorityFeePerGas:l})}},92180:function(e,t,n){n.d(t,{cj:function(){return y},H6:function(){return p},iC:function(){return m}});var r=n(52186),i=n(51359),a=n(47499),s=n(6649);class o extends s.G{constructor({domain:e}){super('Invalid domain "'.concat((0,a.P)(e),'".'),{metaMessages:["Must be a valid EIP-712 domain."]})}}class u extends s.G{constructor({primaryType:e,types:t}){super("Invalid primary type `".concat(e,"` must be one of `").concat(JSON.stringify(Object.keys(t)),"`."),{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class c extends s.G{constructor({type:e}){super('Struct type "'.concat(e,'" is invalid.'),{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}var l=n(64113),d=n(7508),f=n(95046),h=n(88056);function p(e){let{domain:t,message:n,primaryType:r,types:i}=e,s=(e,t)=>{let n={...t};for(let t of e){let{name:e,type:r}=t;"address"===r&&(n[e]=n[e].toLowerCase())}return n},o=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},u=(()=>{if("EIP712Domain"!==r)return s(i[r],n)})();return(0,a.P)({domain:o,message:u,primaryType:r,types:i})}function m(e){let{domain:t,message:n,primaryType:a,types:s}=e,p=(e,t)=>{for(let n of e){let{name:e,type:a}=n,o=t[e],u=a.match(h.lh);if(u&&("number"==typeof o||"bigint"==typeof o)){let[e,t,n]=u;(0,f.eC)(o,{signed:"int"===t,size:Number.parseInt(n)/8})}if("address"===a&&"string"==typeof o&&!(0,l.U)(o))throw new i.b({address:o});let m=a.match(h.eL);if(m){let[e,t]=m;if(t&&(0,d.d)(o)!==Number.parseInt(t))throw new r.KY({expectedSize:Number.parseInt(t),givenSize:(0,d.d)(o)})}let y=s[a];y&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new c({type:e})}(a),p(y,o))}};if(s.EIP712Domain&&t){if("object"!=typeof t)throw new o({domain:t});p(s.EIP712Domain,t)}if("EIP712Domain"!==a){if(s[a])p(s[a],n);else throw new u({primaryType:a,types:s})}}function y(e){let{domain:t}=e;return["string"==typeof(null==t?void 0:t.name)&&{name:"name",type:"string"},(null==t?void 0:t.version)&&{name:"version",type:"string"},("number"==typeof(null==t?void 0:t.chainId)||"bigint"==typeof(null==t?void 0:t.chainId))&&{name:"chainId",type:"uint256"},(null==t?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(null==t?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}},14851:function(e,t,n){let r;n.d(t,{h:function(){return a}});let i=256;function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11;if(!r||i+e>512){r="",i=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(i,i+++e)}},85053:function(e,t,n){n.d(t,{d:function(){return a}});var r=n(90408),i=n(42921);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.b)(e,r.ez[t])}},49268:function(e,t,n){n.d(t,{o:function(){return a}});var r=n(90408),i=n(42921);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.b)(e,r.Zn[t])}},42921:function(e,t,n){n.d(t,{b:function(){return r}});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+)$/,""),"".concat(r?"-":"").concat(i||"0").concat(a?".".concat(a):"")}},97317:function(e,t,n){n.d(t,{D:function(){return r}});async function r(e){return new Promise(t=>setTimeout(t,e))}},71813:function(e,t,n){n.d(t,{secp256k1:function(){return eA}});var r=n(89860),i=n(12403);class a extends i.kb{update(e){return(0,i.$h)(this),this.iHash.update(e),this}digestInto(e){(0,i.$h)(this),(0,i.gk)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,i.z3)(e);let n=(0,i.O0)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),(0,i.ru)(a)}}let s=(e,t,n)=>new a(e,t).update(n).digest();s.create=(e,t)=>
vendor: 5,463 bytes, line 3
3new a(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let o=BigInt(0),u=BigInt(1);function c(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function l(e){if(!c(e))throw Error("Uint8Array expected")}function d(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}function f(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function h(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?o:BigInt("0x"+e)}let p="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,m=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function y(e){if(l(e),p)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=m[e[n]];return t}let g={_0:48,_9:57,A:65,F:70,a:97,f:102};function b(e){return e>=g._0&&e<=g._9?e-g._0:e>=g.A&&e<=g.F?e-(g.A-10):e>=g.a&&e<=g.f?e-(g.a-10):void 0}function v(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(p)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=b(e.charCodeAt(i)),a=b(e.charCodeAt(i+1));if(void 0===n||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);r[t]=16*n+a}return r}function w(e){return h(y(e))}function x(e){return l(e),h(y(Uint8Array.from(e).reverse()))}function E(e,t){return v(e.toString(16).padStart(2*t,"0"))}function _(e,t){return E(e,t).reverse()}function A(e,t,n){let r;if("string"==typeof t)try{r=v(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(c(t))r=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=r.length;if("number"==typeof n&&i!==n)throw Error(e+" of length "+n+" expected, got "+i);return r}function I(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=0;for(let e=0;e<t.length;e++){let n=t[e];l(n),r+=n.length}let i=new Uint8Array(r);for(let e=0,n=0;e<t.length;e++){let r=t[e];i.set(r,n),n+=r.length}return i}let T=e=>"bigint"==typeof e&&o<=e;function k(e,t,n){return T(e)&&T(t)&&T(n)&&t<=e&&e<n}function P(e,t,n,r){if(!k(t,n,r))throw Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}let O=e=>(u<<BigInt(e))-u,S=e=>new Uint8Array(e),C=e=>Uint8Array.from(e),N={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||c(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t,n,r)=>{let i=N[n];if("function"!=typeof i)throw Error("invalid validator function");let a=e[t];if((!r||void 0!==a)&&!i(a,e))throw Error("param "+String(t)+" is invalid. Expected "+n+", got "+a)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}function R(e){let t=new WeakMap;return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];let s=t.get(n);if(void 0!==s)return s;let o=e(n,...i);return t.set(n,o),o}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let M=BigInt(0),F=BigInt(1),j=BigInt(2),U=BigInt(3),$=BigInt(4),z=BigInt(5),G=BigInt(8);function L(e,t){let n=e%t;return n>=M?n:t+n}function D(e,t,n){let r=e;for(;t-- >M;)r*=r,r%=n;return r}function Z(e,t){if(e===M)throw Error("invert: expected non-zero number");if(t<=M)throw Error("invert: expected positive modulus, got "+t);let n=L(e,t),r=t,i=M,a=F,s=F,o=M;for(;n!==M;){let e=r/n,t=r%n,u=i-s*e,c=a-o*e;r=n,n=t,i=s,a=o,s=u,o=c}if(r!==F)throw Error("invert: does not exist");return L(i,t)}function q(e,t){let n=(e.ORDER+F)/$,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw Error("Cannot find square root");return r}function H(e,t){let n=(e.ORDER-z)/G,r=e.mul(t,j),i=e.pow(r,n),a=e.mul(t,i),s=e.mul(e.mul(a,j),i),o=e.mul(a,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),t))throw Error("Cannot find square root");return o}let V=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),a=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),a),r}function K(e,t){let n=(e.ORDER-F)/j,r=e.pow(t,n),i=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),s=e.eql(r,e.neg(e.ONE));if(!i&&!a&&!s)throw Error("invalid Legendre symbol result");return i?1:a?0:-1}function Y(e,t){void 0!==t&&(0,i.k8)(t);let n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Q(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=M)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:a,nByteLength:s}=Y(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let o=Object.freeze({ORDER:e,isLE:r,BITS:a,BYTES:s,MASK:O(a),ZERO:M,ONE:F,create:t=>L(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return M<=t&&t<e},is0:e=>e===M,isOdd:e=>(e&F)===F,neg:t=>L(-t,e),eql:(e,t)=>
vendor: 7,493 bytes, line 3
3e===t,sqr:t=>L(t*t,e),add:(t,n)=>L(t+n,e),sub:(t,n)=>L(t-n,e),mul:(t,n)=>L(t*n,e),pow:(e,t)=>(function(e,t,n){if(n<M)throw Error("invalid exponent, negatives unsupported");if(n===M)return e.ONE;if(n===F)return t;let r=e.ONE,i=t;for(;n>M;)n&F&&(r=e.mul(r,i)),i=e.sqr(i),n>>=F;return r})(o,e,t),div:(t,n)=>L(t*Z(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Z(t,e),sqrt:i.sqrt||(t=>(!n&&(n=e%$===U?q:e%G===z?H:function(e){if(e<BigInt(3))throw Error("sqrt is not defined for small field");let t=e-F,n=0;for(;t%j===M;)t/=j,n++;let r=j,i=Q(e);for(;1===K(i,r);)if(r++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return q;let a=i.pow(r,t),s=(t+F)/j;return function(e,r){if(e.is0(r))return r;if(1!==K(e,r))throw Error("Cannot find square root");let i=n,o=e.mul(e.ONE,a),u=e.pow(r,t),c=e.pow(r,s);for(;!e.eql(u,e.ONE);){if(e.is0(u))return e.ZERO;let t=1,n=e.sqr(u);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw Error("Cannot find square root");let r=F<<BigInt(i-t-1),a=e.pow(o,r);i=t,o=e.sqr(a),u=e.mul(u,o),c=e.mul(c,a)}return c}}(e)),n(o,t))),toBytes:e=>r?_(e,s):E(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return r?x(e):w(e)},invertBatch:e=>W(o,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(o)}function J(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function X(e){let t=J(e);return t+Math.ceil(t/2)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let ee=BigInt(0),et=BigInt(1);function en(e,t){let n=t.negate();return e?n:t}function er(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ei(e,t){er(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),i=2**e;return{windows:n,windowSize:r,mask:O(e),maxNumber:i,shiftBy:BigInt(e)}}function ea(e,t,n){let{windowSize:r,mask:i,maxNumber:a,shiftBy:s}=n,o=Number(e&i),u=e>>s;o>r&&(o-=a,u+=et);let c=t*r,l=c+Math.abs(o)-1;return{nextN:u,offset:l,isZero:0===o,isNeg:o<0,isNegF:t%2!=0,offsetF:c}}let es=new WeakMap,eo=new WeakMap;function eu(e){return eo.get(e)||1}function ec(e){return B(e.Fp,V.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),B(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Y(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function el(e){void 0!==e.lowS&&d("lowS",e.lowS),void 0!==e.prehash&&d("prehash",e.prehash)}class ed extends Error{constructor(e=""){super(e)}}let ef={Err:ed,_tlv:{encode:(e,t)=>{let{Err:n}=ef;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");let r=t.length/2,i=f(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");let a=r>127?f(i.length/2|128):"";return f(e)+a+i+t},decode(e,t){let{Err:n}=ef,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let i=t[r++],a=0;if(128&i){let e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of s)a=a<<8|e;if(r+=e,a<128)throw new n("tlv.decode(long): not minimal encoding")}else a=i;let s=t.subarray(r,r+a);if(s.length!==a)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+a)}}},_int:{encode(e){let{Err:t}=ef;if(e<eh)throw new t("integer: negative integers are not allowed");let n=f(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){let{Err:t}=ef;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return w(e)}},toSig(e){let{Err:t,_int:n,_tlv:r}=ef,i=A("signature",e),{v:a,l:s}=r.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:o,l:u}=r.decode(2,a),{v:c,l:l}=r.decode(2,u);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(o),s:n.decode(c)}},hexFromSig(e){let{_tlv:t,_int:n}=ef,r=t.encode(2,n.encode(e.r)),i=t.encode(2,n.encode(e.s));return t.encode(48,r+i)}},eh=BigInt(0),ep=BigInt(1),em=(BigInt(2),BigInt(3)),ey=BigInt(4),eg=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),eb=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ev=BigInt(0),ew=BigInt(1),ex=BigInt(2),eE=(e,t)=>(e+t/ex)/t,e_=Q(eg,void 0,void 0,{sqrt:function(e){let t=BigInt(3),n=BigInt(6),r=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),o=BigInt(88),u=e*e*e%eg,c=u*u*e%eg,l=D(c,t,eg)*c%eg,d=D(l,t,eg)*c%eg,f=D(d,ex,eg)*u%eg,h=D(f,r,eg)*f%eg,p=D(h,i,eg)*h%eg,m=D(p,s,eg)*p%eg,y=D(m,o,eg)*m%eg,g=D(y,s,eg)*p%eg,b=D(g,t,eg)*c%eg,v=D(b,a,eg)*h%eg,w=D(v,n,eg)*u%eg,x=D(w,ex,eg);if(!e_.eql(e_.sqr(x),e))throw Error("Cannot find square root");return x}}),eA=function(e,t){let n=t=>(function(e){let t=function(e){let t=ec(e);return B(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r,nByteLength:i,nBitLength:a}=t,s=n.BYTES+1,l=2*n.BYTES+1;function f(e){return L(e,r)}let{ProjectivePoint:h,normPrivateKeyToScalar:p,weierstrassEquation:m,isWithinCurveOrder:g}=function(e){var t;let n=function(e){let t=ec(e);B(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:r}=n,i=Q(n.n,n.nBitLength),a=n.toBytes||((e,t,n)=>{let i=t.toAffine();return I(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),s=n.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function l(e){let{a:t,b:i}=n,a=r.sqr(e),s=r.mul(a,e);return r.add(r.add(s,r.mul(e,t)),i)}function f(e,t){let n=r.sqr(t),i=l(e);return r.eql(n,i)}if(!f(n.Gx,n.Gy))throw Error("bad curve params: generator point");let h=r.mul(r.pow(n.a,em),ey),p=r.mul(r.sqr(n.b),BigInt(27));if(r.is0(r.add(h,p)))throw Error("bad curve params: a or b");function m(e){let t;let{allowedPrivateKeyLengths:r,nByteLength:i,wrapPrivateKey:a,n:s}=n;if(r&&"bigint"!=typeof e){if(c(e)&&(e=y(e)),"string"!=typeof e||!r.includes(e.length))throw Error("invalid private key");e=e.padStart(2*i,"0")}try{t="bigint"==typeof e?e:w(A("private key",e,i))}catch(t){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof e)}return a&&(t=L(t,s)),P("private key",t,ep,s),t}function g(e){if(!(e instanceof x))throw Error("ProjectivePoint expected")}let b=R((e,t)=>{let{px:n,py:i,pz:a}=e;if(r.eql(a,r.ONE))return{x:n,y:i};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(a));let o=r.mul(n,t),u=r.mul(i,t),c=r.mul(a,t);if(s)return{x:r.ZERO,y:r.ZERO};
vendor: 8,694 bytes, line 3
3if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:o,y:u}}),v=R(e=>{if(e.is0()){if(n.allowInfinityPoint&&!r.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:i}=e.toAffine();if(!r.isValid(t)||!r.isValid(i))throw Error("bad point: x or y not FE");if(!f(t,i))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class x{static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof x)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?x.ZERO:new x(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=W(r,e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(x.fromAffine)}static fromHex(e){let t=x.fromAffine(s(A("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return x.BASE.multiply(m(e))}static msm(e,t){return function(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+n)})}(r,t);let i=n.length,a=r.length;if(i!==a)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,c=function(e){let t;for(t=0;e>o;e>>=u,t+=1);return t}(BigInt(i)),l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);let d=O(l),f=Array(Number(d)+1).fill(s),h=Math.floor((t.BITS-1)/l)*l,p=s;for(let e=h;e>=0;e-=l){f.fill(s);for(let t=0;t<a;t++){let i=Number(r[t]>>BigInt(e)&d);f[i]=f[i].add(n[t])}let t=s;for(let e=f.length-1,n=s;e>0;e--)n=n.add(f[e]),t=t.add(n);if(p=p.add(t),0!==e)for(let e=0;e<l;e++)p=p.double()}return p}(x,i,e,t)}_setWindowSize(e){T.setWindowSize(this,e)}assertValidity(){v(this)}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){g(e);let{px:t,py:n,pz:i}=this,{px:a,py:s,pz:o}=e,u=r.eql(r.mul(t,o),r.mul(a,i)),c=r.eql(r.mul(n,o),r.mul(s,i));return u&&c}negate(){return new x(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:t}=n,i=r.mul(t,em),{px:a,py:s,pz:o}=this,u=r.ZERO,c=r.ZERO,l=r.ZERO,d=r.mul(a,a),f=r.mul(s,s),h=r.mul(o,o),p=r.mul(a,s);return p=r.add(p,p),l=r.mul(a,o),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,h),c=r.add(u,c),u=r.sub(f,c),c=r.add(f,c),c=r.mul(u,c),u=r.mul(p,u),l=r.mul(i,l),h=r.mul(e,h),p=r.sub(d,h),p=r.mul(e,p),p=r.add(p,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,h),d=r.mul(d,p),c=r.add(c,d),h=r.mul(s,o),h=r.add(h,h),d=r.mul(h,p),u=r.sub(u,d),l=r.mul(h,f),l=r.add(l,l),new x(u,c,l=r.add(l,l))}add(e){g(e);let{px:t,py:i,pz:a}=this,{px:s,py:o,pz:u}=e,c=r.ZERO,l=r.ZERO,d=r.ZERO,f=n.a,h=r.mul(n.b,em),p=r.mul(t,s),m=r.mul(i,o),y=r.mul(a,u),b=r.add(t,i),v=r.add(s,o);b=r.mul(b,v),v=r.add(p,m),b=r.sub(b,v),v=r.add(t,a);let w=r.add(s,u);return v=r.mul(v,w),w=r.add(p,y),v=r.sub(v,w),w=r.add(i,a),c=r.add(o,u),w=r.mul(w,c),c=r.add(m,y),w=r.sub(w,c),d=r.mul(f,v),c=r.mul(h,y),d=r.add(c,d),c=r.sub(m,d),d=r.add(m,d),l=r.mul(c,d),m=r.add(p,p),m=r.add(m,p),y=r.mul(f,y),v=r.mul(h,v),m=r.add(m,y),y=r.sub(p,y),y=r.mul(f,y),v=r.add(v,y),p=r.mul(m,v),l=r.add(l,p),p=r.mul(w,v),c=r.mul(b,c),c=r.sub(c,p),p=r.mul(b,m),d=r.mul(w,d),new x(c,l,d=r.add(d,p))}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}wNAF(e){return T.wNAFCached(this,e,x.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:i}=n;P("scalar",e,eh,i);let a=x.ZERO;if(e===eh)return a;if(this.is0()||e===ep)return this;if(!t||T.hasPrecomputes(this))return T.wNAFCachedUnsafe(this,e,x.normalizeZ);let{k1neg:s,k1:o,k2neg:u,k2:c}=t.splitScalar(e),l=a,d=a,f=this;for(;o>eh||c>eh;)o&ep&&(l=l.add(f)),c&ep&&(d=d.add(f)),f=f.double(),o>>=ep,c>>=ep;return s&&(l=l.negate()),u&&(d=d.negate()),d=new x(r.mul(d.px,t.beta),d.py,d.pz),l.add(d)}multiply(e){let t,i;let{endo:a,n:s}=n;if(P("scalar",e,ep,s),a){let{k1neg:n,k1:s,k2neg:o,k2:u}=a.splitScalar(e),{p:c,f:l}=this.wNAF(s),{p:d,f:f}=this.wNAF(u);c=T.constTimeNegate(n,c),d=T.constTimeNegate(o,d),d=new x(r.mul(d.px,a.beta),d.py,d.pz),t=c.add(d),i=l.add(f)}else{let{p:n,f:r}=this.wNAF(e);t=n,i=r}return x.normalizeZ([t,i])[0]}multiplyAndAddUnsafe(e,t,n){let r=x.BASE,i=(e,t)=>t!==eh&&t!==ep&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),a=i(this,t).add(i(e,n));return a.is0()?void 0:a}toAffine(e){return b(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=n;if(e===ep)return!0;if(t)return t(x,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=n;return e===ep?this:t?t(x,this):this.multiplyUnsafe(n.h)}toRawBytes(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return d("isCompressed",e),this.assertValidity(),a(x,this,e)}toHex(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return d("isCompressed",e),y(this.toRawBytes(e))}constructor(e,t,n){if(null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t)||r.is0(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");this.px=e,this.py=t,this.pz=n,Object.freeze(this)}}x.BASE=new x(n.Gx,n.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO);let{endo:E,nBitLength:_}=n,T=(t=E?Math.ceil(_/2):_,{constTimeNegate:en,hasPrecomputes:e=>1!==eu(e),unsafeLadder(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x.ZERO,r=e;for(;t>ee;)t&et&&(n=n.add(r)),r=r.double(),t>>=et;return n},precomputeWindow(e,n){let{windows:r,windowSize:i}=ei(n,t),a=[],s=e,o=s;for(let e=0;e<r;e++){o=s,a.push(o);for(let e=1;e<i;e++)o=o.add(s),a.push(o);s=o.double()}return a},wNAF(e,n,r){let i=x.ZERO,a=x.BASE,s=ei(e,t);for(let e=0;e<s.windows;e++){let{nextN:t,offset:o,isZero:u,isNeg:c,isNegF:l,offsetF:d}=ea(r,e,s);r=t,u?a=a.add(en(l,n[d])):i=i.add(en(c,n[o]))}return{p:i,f:a}},wNAFUnsafe(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:x.ZERO,a=ei(e,t);for(let e=0;e<a.windows&&r!==ee;e++){let{nextN:t,offset:s,isZero:o,isNeg:u}=ea(r,e,a);if(r=t,!o){let e=n[s];i=i.add(u?e.negate():e)}}return i},getPrecomputes(e,t,n){let r=es.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&es.set(t,n(r))),r},wNAFCached(e,t,n){let r=eu(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)},wNAFCachedUnsafe(e,t,n,r){let i=eu(e);return 1===i?this.unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)},setWindowSize(e,n){er(n,t),eo.set(e,n),es.delete(e)}});return{CURVE:n,ProjectivePoint:x,normPrivateKeyToScalar:m,weierstrassEquation:l,isWithinCurveOrder:function(e){return k(e,ep,n.n)}}}({...t,toBytes(e,t,r){let i=t.toAffine(),a=n.toBytes(i.x);return(d("isCompressed",r),r)?I(Uint8Array.from([t.hasEvenY()?2:3]),a):I(Uint8Array.from([4]),a,n.toBytes(i.y))},fromBytes(e){let t=e.length,r=e[0],i=e.subarray(1);if(t===s&&(2===r||3===r)){let e;let t=w(i);if(!k(t,ep,n.ORDER))throw Error("Point is not on curve");let a=m(t);try{e=n.sqrt(a)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&ep)===ep)&&(e=n.neg(e)),{x:t,y:e}}if(t===l&&4===r)return{x:n.fromBytes(i.subarray(0,n.BYTES)),y:n.fromBytes(i.subarray(n.BYTES,2*n.BYTES))};throw Error("invalid Point, expected length of "+s+", or uncompressed "+l+", got "+t)}}),b=(e,t,n)=>w(e.slice(t,n));class T{static fromCompact(e){return new T(b(e=A("compactSignature",e,2*i),0,i),b(e,i,2*i))}static fromDER(e){let{r:t,s:n}=ef.toSig(A("DER",e));return new T(t,n)}assertValidity(){}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:a,recovery:s}=this,o=j(A("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");let u=2===s||3===s?i+t.n:i;if(u>=n.ORDER)throw Error("recovery id 2 or 3 invalid");let c=(1&s)==0?"02":"03",l=h.fromHex(c+y(E(u,n.BYTES))),d=Z(u,r),p=f(-o*d),m=f(a*d),g=h.BASE.multiplyAndAddUnsafe(l,p,m);if(!g)throw Error("point at infinify");return g.assertValidity(),g}hasHighS(){return this.s>r>>ep}normalizeS(){return this.hasHighS()?new T(this.r,f(-this.s),this.recovery):this}toDERRawBytes(){return v(this.toDERHex())}toDERHex(){return ef.hexFromSig(this)}toCompactRawBytes(){return v(this.toCompactHex())}toCompactHex(){return y(E(this.r,i))+y(E(this.s,i))}constructor(e,t,n){P("r",e,ep,r),P("s",t,ep,r),this.r=e,this.s=t,null!=n&&(this.recovery=n),Object.freeze(this)}}function N(e){if("bigint"==typeof e)return!1;if(e instanceof h)return!0;let r=A("key",e).length,a=n.BYTES,s=a+1;if(!t.allowedPrivateKeyLengths&&i!==s)return r===s||r===2*a+1}let M=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=w(e),n=8*e.length-a;return n>0?t>>BigInt(n):t}
3,j=t.bits2int_modN||function(e){return f(M(e))},U=O(a);function $(e){return P("num < 2^"+a,e,eh,U),E(e,i)}let z={lowS:t.lowS,prehash:!1},G={lowS:t.lowS,prehash:!1};return h.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return h.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!0===N(e))throw Error("first arg must be private key");if(!1===N(t))throw Error("second arg must be public key");return h.fromHex(t).multiply(p(e)).toRawBytes(n)},sign:function(e,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z,{seed:s,k2sig:o}=function(e,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;if(["recovered","canonical"].some(e=>e in a))throw Error("sign() legacy options not supported");let{hash:s,randomBytes:o}=t,{lowS:u,prehash:c,extraEntropy:l}=a;null==u&&(u=!0),e=A("msgHash",e),el(a),c&&(e=A("prehashed msgHash",s(e)));let d=j(e),m=p(i),y=[$(m),$(d)];if(null!=l&&!1!==l){let e=!0===l?o(n.BYTES):l;y.push(A("extraEntropy",e))}return{seed:I(...y),k2sig:function(e){let t=M(e);if(!g(t))return;let n=Z(t,r),i=h.BASE.multiply(t).toAffine(),a=f(i.x);if(a===eh)return;let s=f(n*f(d+a*m));if(s===eh)return;let o=(i.x===a?0:2)|Number(i.y&ep),c=s;if(u&&s>r>>ep)c=s>r>>ep?f(-s):s,o^=1;return new T(a,c,o)}}}(e,i,a);return(function(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=S(e),i=S(e),a=0,s=()=>{r.fill(1),i.fill(0),a=0},o=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return n(i,r,...t)},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S(0);i=o(C([0]),e),r=o(),0!==e.length&&(i=o(C([1]),e),r=o())},c=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e<t;){let t=(r=o()).slice();n.push(t),e+=r.length}return I(...n)};return(e,t)=>{let n;for(s(),u(e);!(n=t(c()));)u();return s(),n}})(t.hash.outputLen,t.nByteLength,t.hmac)(s,o)},verify:function(e,n,i){var a;let s;let o,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:G;n=A("msgHash",n),i=A("publicKey",i);let{lowS:l,prehash:d,format:p}=u;if(el(u),"strict"in u)throw Error("options.strict was renamed to lowS");if(void 0!==p&&"compact"!==p&&"der"!==p)throw Error("format must be compact or der");let m="string"==typeof e||c(e),y=!m&&!p&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!m&&!y)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(y&&(s=new T(e.r,e.s)),m){try{"compact"!==p&&(s=T.fromDER(e))}catch(e){if(!(e instanceof ef.Err))throw e}s||"der"===p||(s=T.fromCompact(e))}o=h.fromHex(i)}catch(e){return!1}if(!s||l&&s.hasHighS())return!1;d&&(n=t.hash(n));let{r:g,s:b}=s,v=j(n),w=Z(b,r),x=f(v*w),E=f(g*w),_=null===(a=h.BASE.multiplyAndAddUnsafe(o,x,E))||void 0===a?void 0:a.toAffine();return!!_&&f(_.x)===g},ProjectivePoint:h,Signature:T,utils:{isValidPrivateKey(e){try{return p(e),!0}catch(e){return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{let e=X(t.n);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.length,i=J(t),a=X(t);if(r<16||r<a||r>1024)throw Error("expected "+a+"-1024 bytes of input, got "+r);let s=L(n?x(e):w(e),t-F)+F;return n?_(s,i):E(s,i)}(t.randomBytes(e),t.n)},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}}}})({...e,hash:t,hmac:function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return s(t,e,(0,i.eV)(...r))},randomBytes:i.O6});return{...n(t),create:n}}({a:ev,b:BigInt(7),Fp:e_,n:eb,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-ew*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),r=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=eE(t*e,eb),s=eE(-n*e,eb),o=L(e-a*t-s*r,eb),u=L(-a*n-s*t,eb),c=o>i,l=u>i;
3if(c&&(o=eb-o),l&&(u=eb-u),o>i||u>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:o,k2neg:l,k2:u}}}},r.JQ)},43452:function(e,t,n){n.d(t,{$p:function(){return d},EP:function(){return f},FL:function(){return l},Fn:function(){return b},IH:function(){return y},Iq:function(){return o},NI:function(){return s},Ou:function(){return c},SD:function(){return p},Vl:function(){return a},Xb:function(){return v},ac:function(){return g},gm:function(){return h},m_:function(){return u},mk:function(){return m},pp:function(){return E},u8:function(){return w},zP:function(){return x}});let r=BigInt(4294967296-1),i=BigInt(32);function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,a=new Uint32Array(n),s=new Uint32Array(n);for(let o=0;o<n;o++){let{h:n,l:u}=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}(e[o],t);[a[o],s[o]]=[n,u]}return[a,s]}let s=(e,t,n)=>e>>>n,o=(e,t,n)=>e<<32-n|t>>>n,u=(e,t,n)=>e>>>n|t<<32-n,c=(e,t,n)=>e<<32-n|t>>>n,l=(e,t,n)=>e<<64-n|t>>>n-32,d=(e,t,n)=>e>>>n-32|t<<64-n,f=(e,t,n)=>e<<n|t>>>32-n,h=(e,t,n)=>t<<n|e>>>32-n,p=(e,t,n)=>t<<n-32|e>>>64-n,m=(e,t,n)=>e<<n-32|t>>>64-n;function y(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/4294967296|0)|0,l:0|i}}let g=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),b=(e,t,n,r)=>t+n+r+(e/4294967296|0)|0,v=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),w=(e,t,n,r,i)=>t+n+r+i+(e/4294967296|0)|0,x=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),E=(e,t,n,r,i,a)=>t+n+r+i+a+(e/4294967296|0)|0},89860:function(e,t,n){n.d(t,{JQ:function(){return d}});var r=n(12403);class i extends r.kb{update(e){(0,r.$h)(this),e=(0,r.O0)(e),(0,r.gk)(e);let{view:t,buffer:n,blockLen:i}=this,a=e.length;for(let s=0;s<a;){let o=Math.min(i-this.pos,a-s);if(o===i){let t=(0,r.GL)(e);for(;i<=a-s;s+=i)this.process(t,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.$h)(this),(0,r.eB)(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:i,isLE:a}=this,{pos:s}=this;t[s++]=128,(0,r.ru)(this.buffer.subarray(s)),this.padOffset>i-s&&(this.process(n,0),s=0);for(let e=s;e<i;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),u=r?4:0,c=r?0:4;e.setUint32(t+u,s,r),e.setUint32(t+c,o,r)}(n,i-8,BigInt(8*this.length),a),this.process(n,0);let o=(0,r.GL)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=u/4,l=this.get();if(c>l.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)o.setUint32(4*e,l[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:s}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}constructor(e,t,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,r.GL)(this.buffer)}}let a=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var s=n(43452);let o=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
vendor: 2,085 bytes, line 3
3734187,3204031479,3329325298]),u=new Uint32Array(64);class c extends i{get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:s,H:o}=this;return[e,t,n,r,i,a,s,o]}set(e,t,n,r,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)u[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],n=u[e-2],i=(0,r.np)(t,7)^(0,r.np)(t,18)^t>>>3,a=(0,r.np)(n,17)^(0,r.np)(n,19)^n>>>10;u[e]=a+u[e-7]+i+u[e-16]|0}let{A:n,B:i,C:a,D:s,E:c,F:l,G:d,H:f}=this;for(let e=0;e<64;e++){var h,p,m,y;let t=f+((0,r.np)(c,6)^(0,r.np)(c,11)^(0,r.np)(c,25))+((h=c)&l^~h&d)+o[e]+u[e]|0,g=((0,r.np)(n,2)^(0,r.np)(n,13)^(0,r.np)(n,22))+((p=n)&(m=i)^p&(y=a)^m&y)|0;f=d,d=l,l=c,c=s+t|0,s=a,a=i,i=n,n=t+g|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,c=c+this.E|0,l=l+this.F|0,d=d+this.G|0,f=f+this.H|0,this.set(n,i,a,s,c,l,d,f)}roundClean(){(0,r.ru)(u)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,r.ru)(this.buffer)}constructor(e=32){super(64,e,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}}let l=s.Vl(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
35771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));l[0],l[1];let d=(0,r.V1)(()=>new c)},12403:function(e,t,n){n.d(t,{kb:function(){return y},gk:function(){return a},$h:function(){return o},z3:function(){return s},k8:function(){return i},eB:function(){return u},ru:function(){return l},eV:function(){return m},V1:function(){return g},GL:function(){return d},O6:function(){return b},np:function(){return f},Ux:function(){return h},O0:function(){return p},Jq:function(){return c}});let r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function i(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw Error("Uint8Array expected of length "+n+", got length="+e.length)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");i(e.outputLen),i(e.blockLen)}function o(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function u(e,t){a(e);let n=t.outputLen;if(e.length<n)throw Error("digestInto() expects output buffer of length at least "+n)}function c(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e=0;e<t.length;e++)t[e].fill(0)}function d(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function f(e,t){return e<<32-t|e>>>t}let h=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]?e=>e:function(e){for(let n=0;n<e.length;n++){var t;e[n]=(t=e[n])<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}return e};function p(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),a(e),e}function m(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=0;for(let e=0;e<t.length;e++){let n=t[e];a(n),r+=n.length}let i=new Uint8Array(r);for(let e=0,n=0;e<t.length;e++){let r=t[e];i.set(r,n),n+=r.length}return i}class y{}function g(e){let t=t=>e().update(p(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));if(r&&"function"==typeof r.randomBytes)return Uint8Array.from(r.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}},87688:function(e,t,n){n.d(t,{useBlockNumber:function(){return d}});var r=n(93191),i=n(75304),a=n(61954),s=n(34954),o=n(53206),u=n(98286),c=n(94956),l=n(5850);function d(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{query:d={},watch:f}=n,h=(0,c.useConfig)(n),p=(0,r.NL)(),m=(0,u.useChainId)({config:h}),y=null!==(e=n.chainId)&&void 0!==e?e:m,g=function(e,t={}){return{gcTime:0,async queryFn({queryKey:t}){let{scopeKey:n,...r}=t[1];return await function(e,t={}){let{chainId:n,...r}=t,s=e.getClient({chainId:n});return(0,a.s)(s,i.z,"getBlockNumber")(r)}(e,r)??null},queryKey:function(e={}){return["blockNumber",(0,s.OP)(e)]}(t)}}(h,{...n,chainId:y});return(0,l.useWatchBlockNumber)({...{config:n.config,chainId:n.chainId,..."object"==typeof f?f:{}},enabled:!!((null===(t=d.enabled)||void 0===t||t)&&("object"==typeof f?f.enabled:f)),onBlockNumber(e){p.setQueryData(g.queryKey,e)}}),(0,o.aM)({...d,...g})}},98286:function(e,t,n){function r(e){return e.state.chainId}n.d(t,{useChainId:function(){return s}});var i=n(2265),a=n(94956);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},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))}},7027:function(e,t,n){n.d(t,{usePublicClient:function(){return u}});var r=n(72418),i=n(80660);function a(e,t={}){let n=(0,i.s)(e,t);return n?.extend(r.I)}var s=n(35006),o=n(94956);function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.useConfig)(e);
3return(0,s.useSyncExternalStoreWithSelector)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>a(e),n,{equalityFn:(e,t)=>e?.uid===t?.uid})})(t,{onChange:e}),()=>a(t,e),()=>a(t,e),e=>e,(e,t)=>(null==e?void 0:e.uid)===(null==t?void 0:t.uid))}},53507:function(e,t,n){n.d(t,{useReadContract:function(){return u}});var r=n(42467),i=n(34954),a=n(53206),s=n(98286),o=n(94956);function u(){var e,t,n;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{abi:c,address:l,functionName:d,query:f={}}=u,h=u.code,p=(0,o.useConfig)(u),m=(0,s.useChainId)({config:p}),y=function(e,t={}){return{async queryFn({queryKey:n}){let i=t.abi;if(!i)throw Error("abi is required");let{functionName:a,scopeKey:s,...o}=n[1],u=(()=>{let e=n[1];if(e.address)return{address:e.address};if(e.code)return{code:e.code};throw Error("address or code is required")})();if(!a)throw Error("functionName is required");return(0,r.L)(e,{abi:i,functionName:a,args:o.args,...u,...o})},queryKey:function(e={}){let{abi:t,...n}=e;return["readContract",(0,i.OP)(n)]}(t)}}(p,{...u,chainId:null!==(e=u.chainId)&&void 0!==e?e:m}),g=!!((l||h)&&c&&d&&(null===(t=f.enabled)||void 0===t||t));return(0,a.aM)({...f,...y,enabled:g,structuralSharing:null!==(n=f.structuralSharing)&&void 0!==n?n:i.if})}},5850:function(e,t,n){n.d(t,{useWatchBlockNumber:function(){return u}});var r=n(38128),i=n(61954),a=n(2265),s=n(98286),o=n(94956);function u(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{enabled:n=!0,onBlockNumber:u,config:c,...l}=t,d=(0,o.useConfig)(t),f=(0,s.useChainId)({config:d}),h=null!==(e=t.chainId)&&void 0!==e?e:f;(0,a.useEffect)(()=>{if(n&&u)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});return n=(0,i.s)(a,r.q,"watchBlockNumber")(o)},c=u(t.chainId);return s&&!t.chainId&&(a=e.subscribe(({chainId:e})=>e,async e=>u(e))),()=>{c?.(),a?.()}}(d,{...l,chainId:h,onBlockNumber:u})},[h,d,n,u,l.onError,l.emitMissed,l.emitOnBegin,l.poll,l.pollingInterval,l.syncConnectedChain])}},53206:function(e,t,n){let r;n.d(t,{NS:function(){return N},aM:function(){return C}});var i=n(56298),a=n(69948),s=n(34939),o=n(49010),u=n(2459),c=class extends o.l{constructor(e,t){super(),this.options=t,this.#o=e,this.#u=null,this.bindMethods(),this.setOptions(t)}#o;#c=void 0;#l=void 0;#d=void 0;#f;#h;#u;#p;#m;#y;#g;#b;#v;#w=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#c.addObserver(this),l(this.#c,this.options)?this.#x():this.updateResult(),this.#E())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#c,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#c,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#A(),this.#c.removeObserver(this)}setOptions(e,t){let n=this.options,r=this.#c;if(this.options=this.#o.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.#I(),this.#c.setOptions(this.options),n._defaulted&&!(0,i.VS)(this.options,n)&&this.#o.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#c,observer:this});let a=this.hasListeners();a&&f(this.#c,r,this.options,n)&&this.#x(),this.updateResult(t),a&&(this.#c!==r||this.options.enabled!==n.enabled||(0,i.KC)(this.options.staleTime,this.#c)!==(0,i.KC)(n.staleTime,this.#c))&&this.#T();let s=this.#k();a&&(this.#c!==r||this.options.enabled!==n.enabled||s!==this.#v)&&this.#P(s)}getOptimisticResult(e){let t=this.#o.getQueryCache().build(this.#o,e),n=this.createResult(t,e);return(0,i.VS)(this.getCurrentResult(),n)||(this.#d=n,this.#h=this.options,this.#f=this.#c.state),n}getCurrentResult(){return this.#d}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.#w.add(e)}getCurrentQuery(){return this.#c}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#o.defaultQueryOptions(e),n=this.#o.getQueryCache().build(this.#o,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#x({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#d))}#x(e){this.#I();let t=this.#c.fetch(this.options,e);return e?.throwOnError||(t=t.catch(i.ZT)),t}#T(){this.#_();let e=(0,i.KC)(this.options.staleTime,this.#c);if(i.sk||this.#d.isStale||!(0,i.PN)(e))return;let t=(0,i.Kp)(this.#d.dataUpdatedAt,e);this.#g=setTimeout(()=>{this.#d.isStale||this.updateResult()},t+1)}#k(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#c):this.options.refetchInterval)??!1}#P(e){this.#A(),this.#v=e,!i.sk&&!1!==this.options.enabled&&(0,i.PN)(this.#v)&&0!==this.#v&&(this.#b=setInterval(()=>
3{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#x()},this.#v))}#E(){this.#T(),this.#P(this.#k())}#_(){this.#g&&(clearTimeout(this.#g),this.#g=void 0)}#A(){this.#b&&(clearInterval(this.#b),this.#b=void 0)}createResult(e,t){let n;let r=this.#c,a=this.options,s=this.#d,o=this.#f,c=this.#h,d=e!==r?e.state:this.#l,{state:p}=e,m={...p},y=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&l(e,t),s=n&&f(e,r,t,a);(i||s)&&(m={...m,...(0,u.z)(p.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:v}=m;if(t.select&&void 0!==m.data){if(s&&m.data===o?.data&&t.select===this.#p)n=this.#m;else try{this.#p=t.select,n=t.select(m.data),n=(0,i.oE)(s?.data,n,t),this.#m=n,this.#u=null}catch(e){this.#u=e}}else n=m.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.#y?.state.data,this.#y):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#u=null}catch(e){this.#u=e}void 0!==e&&(v="success",n=(0,i.oE)(s?.data,e,t),y=!0)}this.#u&&(g=this.#u,n=this.#m,b=Date.now(),v="error");let w="fetching"===m.fetchStatus,x="pending"===v,E="error"===v,_=x&&w,A=void 0!==n;return{status:v,fetchStatus:m.fetchStatus,isPending:x,isSuccess:"success"===v,isError:E,isInitialLoading:_,isLoading:_,data:n,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:E&&!A,isPaused:"paused"===m.fetchStatus,isPlaceholderData:y,isRefetchError:E&&A,isStale:h(e,t),refetch:this.refetch}}updateResult(e){let t=this.#d,n=this.createResult(this.#c,this.options);if(this.#f=this.#c.state,this.#h=this.options,void 0!==this.#f.data&&(this.#y=this.#c),(0,i.VS)(n,t))return;this.#d=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.#w.size)return!0;let r=new Set(n??this.#w);return this.options.throwOnError&&r.add("error"),Object.keys(this.#d).some(e=>this.#d[e]!==t[e]&&r.has(e))})()&&(r.listeners=!0),this.#O({...r,...e})}#I(){let e=this.#o.getQueryCache().build(this.#o,this.options);if(e===this.#c)return;let t=this.#c;this.#c=e,this.#l=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#E()}#O(e){a.V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#d)}),this.#o.getQueryCache().notify({query:this.#c,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(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return!1!==t.enabled&&e.isStaleByTime((0,i.KC)(t.staleTime,e))}var p=n(2265);n(57437);var m=p.createContext((r=!1,{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r})),y=()=>p.useContext(m),g=n(93191),b=p.createContext(!1),v=()=>p.useContext(b);b.Provider;var w=n(37832),x=(e,t)=>{(e.suspense||e.throwOnError)&&!t.isReset()&&(e.retryOnMount=!1)},E=e=>{p.useEffect(()=>{e.clearReset()},[e])},_=e=>{let{result:t,errorResetBoundary:n,throwOnError:r,query:i}=e;return t.isError&&!n.isReset()&&!t.isFetching&&i&&(0,w.L)(r,[t.error,i])},A=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},I=(e,t)=>e?.suspense&&t.isPending,T=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function k(e,t,n){let r=(0,g.NL)(n),i=v(),s=y(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",A(o),x(o,s),E(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})}
3,[o,u]),I(o,c))throw T(o,u,s);if(_({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return o.notifyOnChangeProps?c:u.trackResult(c)}var P=n(50836),O=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,P.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,P.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,isError:s,isRefetchError:o}=r,u=n.fetchMeta?.fetchMore?.direction,c=s&&"forward"===u,l=i&&"forward"===u,d=s&&"backward"===u,f=i&&"backward"===u;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,P.Qy)(t,n.data),hasPreviousPage:(0,P.ZF)(t,n.data),isFetchNextPageError:c,isFetchingNextPage:l,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:o&&!c&&!d,isRefetching:a&&!l&&!f}}},S=n(34954);function C(e){let t=k({...e,queryKeyHashFn:S.kq},c,void 0);return t.queryKey=e.queryKey,t}function N(e){let t=k({...e,queryKeyHashFn:S.kq},O,void 0);return t.queryKey=e.queryKey,t}},64654:function(e,t,n){let r;n.d(t,{Q_:function(){return rs},r0:function(){return ra}});var i,a,s,o,u,c,l,d,f,h,p,m,y,g,b,v,w,x={};function E(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function _(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function A(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}n.r(x),n.d(x,{abiSchemaToJsonSchema:function(){return nk},codePointToInt:function(){return nC},ensureIfUint8Array:function(){return n$},ethAbiToJsonSchema:function(){return nP},fetchArrayElement:function(){return nO},hexToNumber:function(){return nN},hexToUint8Array:function(){return nU},numberToHex:function(){return nB},padLeft:function(){return nR},parseBaseType:function(){return nI},transformJsonDataToAbiFormat:function(){return nS},uint8ArrayToHexString:function(){return nM}});let I=BigInt(4294967296-1),T=BigInt(32),k=(e,t,n)=>e<<n|t>>>32-n,P=(e,t,n)=>t<<n|e>>>32-n,O=(e,t,n)=>t<<n-32|e>>>64-n,S=(e,t,n)=>e<<n-32|t>>>64-n,C=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),N=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],B=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function R(e){for(let t=0;t<e.length;t++)e[t]=B(e[t])}function M(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function F(e){return"string"==typeof e&&(e=M(e)),_(e),e}class j{clone(){return this._cloneInto()}}let U=[],$=[],z=[],G=BigInt(0),L=BigInt(1),D=BigInt(2),Z=BigInt(7),q=BigInt(256),H=BigInt(113);for(let e=0,t=L,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],U.push(2*(5*r+n)),$.push((e+1)*(e+2)/2%64);let i=G;for(let e=0;e<7;e++)(t=(t<<L^(t>>Z)*H)%q)&D&&(i^=L<<(L<<BigInt(e))-L);z.push(i)}let[V,W]=function(e,t=!1){let n=new Uint32Array(e.length),r=new
3Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:a,l:s}=function(e,t=!1){return t?{h:Number(e&I),l:Number(e>>T&I)}:{h:0|Number(e>>T&I),l:0|Number(e&I)}}(e[i],t);[n[i],r[i]]=[a,s]}return[n,r]}(z,!0),K=(e,t,n)=>n>32?O(e,t,n):k(e,t,n),Y=(e,t,n)=>n>32?S(e,t,n):P(e,t,n);class Q extends j{constructor(e,t,n,r=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,E(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=C(this.state)}keccak(){N||R(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],s=n[i+1],o=K(a,s,1)^n[r],u=Y(a,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=o,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=$[n],a=K(t,i,r),s=Y(t,i,r),o=U[n];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=V[r],e[1]^=W[r]}n.fill(0)}(this.state32,this.rounds),N||R(this.state32),this.posOut=0,this.pos=0}update(e){A(this);let{blockLen:t,state:n}=this,r=(e=F(e)).length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){A(this,!1),_(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return E(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(function(e,t){_(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return e||(e=new Q(t,n,r,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}let J=(e,t,n)=>(function(e){let t=t=>e().update(F(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t})(()=>new Q(t,e,n)),X=J(1,144,28),ee=J(1,136,32),et=J(1,104,48),en=J(1,72,64);function er(e){return t=>(_(t),e(t))}(()=>{let e="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,t="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);return t&&!e?t("crypto"):void 0})(),er(X);let ei=(()=>{let e=er(ee);return e.create=ee.create,e})();er(et),er(en);
3class ea extends Error{get innerError(){return this.cause instanceof es?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new es(e):this.cause=e}constructor(e,t){super(e),Array.isArray(t)?this.cause=new es(t):this.cause=t,this.name=this.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(new.target.constructor):this.stack=Error().stack}static convertToString(e,t=!1){if(null==e)return"undefined";let n=JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t);return t&&["bigint","string"].includes(typeof e)?n.replace(/['\\"]+/g,""):n}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}class es extends ea{constructor(e){super(`Multiple errors occurred: [${e.map(e=>e.message).join("], [")}]`),this.code=208,this.errors=e}}class eo extends ea{constructor(e,t){super(`Invalid value given "${ea.convertToString(e,!0)}". Error: ${t}.`),this.name=this.constructor.name}}class eu extends eo{constructor(e){super(e,"can not parse as byte data"),this.code=1002}}class ec extends eo{constructor(e){super(e,"can not parse as number data"),this.code=1003}}class el extends eo{constructor(e){super(e,"invalid unit"),this.code=1004}}class ed extends eo{constructor(e){super(e,"not a valid unit. Must be a positive integer"),this.code=1015}}let ef={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},4001:{name:"User Rejected Request",message:"The user rejected the request."},4100:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},4200:{name:"Unsupported Method",message:"The Provider does not support the requested method."},4900:{name:"Disconnected",message:"The Provider is disconnected from all chains."},4901:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invali
3d response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class eh extends ea{constructor(e,t){super(null!=t?t:"An Rpc error has occured with a code of *code*".replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class ep extends eh{constructor(e){super(e,ef[-32700].message),this.code=-32700}}class em extends eh{constructor(e){super(e,ef[-32600].message),this.code=-32600}}class ey extends eh{constructor(e){super(e,ef[-32601].message),this.code=-32601}}class eg extends eh{constructor(e){super(e,ef[-32602].message),this.code=-32602}}class eb extends eh{constructor(e){super(e,ef[-32603].message),this.code=-32603}}class ev extends eh{constructor(e){super(e,ef[-32e3].message),this.code=-32e3}}class ew extends eh{constructor(e){super(e,ef[-32004].message),this.code=-32004}}class ex extends eh{constructor(e){super(e,ef[-32002].message),this.code=-32002}}class eE extends eh{constructor(e){super(e,ef[-32001].message),this.code=-32001}}class e_ extends eh{constructor(e){super(e,ef[-32006].message),this.code=-32006}}class eA extends eh{constructor(e){super(e,ef[-32003].message),this.code=-32003}}class eI extends eh{constructor(e){super(e,ef[-32005].message),this.code=-32005}}let eT=new Map;eT.set(-32700,{error:ep}),eT.set(-32600,{error:em}),eT.set(-32601,{error:ey}),eT.set(-32602,{error:eg}),eT.set(-32603,{error:eb}),eT.set(-32e3,{error:ev}),eT.set(-32004,{error:ew}),eT.set(-32002,{error:ex}),eT.set(-32003,{error:eA}),eT.set(-32001,{error:eE}),eT.set(-32006,{error:e_}),eT.set(-32005,{error:eI});class ek extends ea{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=1200}toJSON(){return Object.assign(Object.assign({}
3,super.toJSON()),{type:this.type})}}(i=d||(d={})).assertEqual=e=>e,i.assertIs=function(e){},i.assertNever=function(e){throw Error()},i.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},i.getValidEnumValues=e=>{let t=i.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return i.objectValues(n)},i.objectValues=e=>i.objectKeys(e).map(function(t){return e[t]}),i.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},i.find=(e,t)=>{for(let n of e)if(t(n))return n},i.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,i.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},i.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(f||(f={})).mergeShapes=(e,t)=>({...e,...t});let eP=d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),eO=e=>{switch(typeof e){case"undefined":return eP.undefined;case"string":return eP.string;case"number":return isNaN(e)?eP.nan:eP.number;case"boolean":return eP.boolean;case"function":return eP.function;case"bigint":return eP.bigint;case"symbol":return eP.symbol;case"object":if(Array.isArray(e))return eP.array;if(null===e)return eP.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return eP.promise;if("undefined"!=typeof Map&&e instanceof Map)return eP.map;if("undefined"!=typeof Set&&e instanceof Set)return eP.set;if("undefined"!=typeof Date&&e instanceof Date)return eP.date;return eP.object;default:return eP.unknown}}
vendor: 4,512 bytes, line 3
3,eS=d.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class eC extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof eC))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,d.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}eC.create=e=>new eC(e);let eN=(e,t)=>{let n;switch(e.code){case eS.invalid_type:n=e.received===eP.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case eS.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,d.jsonStringifyReplacer)}`;break;case eS.unrecognized_keys:n=`Unrecognized key(s) in object: ${d.joinValues(e.keys,", ")}`;break;case eS.invalid_union:n="Invalid input";break;case eS.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${d.joinValues(e.options)}`;break;case eS.invalid_enum_value:n=`Invalid enum value. Expected ${d.joinValues(e.options)}, received '${e.received}'`;break;case eS.invalid_arguments:n="Invalid function arguments";break;case eS.invalid_return_type:n="Invalid function return type";break;case eS.invalid_date:n="Invalid date";break;case eS.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:d.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case eS.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case eS.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case eS.custom:n="Invalid input";break;case eS.invalid_intersection_types:n="Intersection results could not be merged";break;case eS.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case eS.not_finite:n="Number must be finite";break;default:n=t.defaultError,d.assertNever(e)}return{message:n}},eB=eN;function eR(){return eB}let eM=e=>
3{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of r.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function eF(e,t){let n=eR(),r=eM({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===eN?void 0:eN].filter(e=>!!e)});e.common.issues.push(r)}class ej{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return eU;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return ej.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return eU;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let eU=Object.freeze({status:"aborted"}),e$=e=>({status:"dirty",value:e}),ez=e=>({status:"valid",value:e}),eG=e=>"aborted"===e.status,eL=e=>"dirty"===e.status,eD=e=>"valid"===e.status,eZ=e=>"undefined"!=typeof Promise&&e instanceof Promise;function eq(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)}function eH(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError,(a=h||(h={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},a.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class eV{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let eW=(e,t)=>{if(eD(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new eC(e.common.issues);return this._error=t,this._error}}};function eK(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var a,s;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:i.defaultError}:void 0===i.data?{message:null!==(a=null!=o?o:r)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(s=null!=o?o:n)&&void 0!==s?s:i.defaultError}},description:i}}class eY{get description(){return this._def.description}_getType(e){return eO(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:eO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ej,ctx:{common:e.parent.common,data:e.data,parsedType:eO(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(eZ(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:eO(e)},i=this._parseSync({data:e,path:r.path,parent:r});return eW(r,i)}"~validate"(e){var t,n;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:eO(e)};if(!this["~standard"].async)try{let t=this._parseSync({data:e,path:[],parent:r});return eD(t)?{value:t.value}:{issues:r.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(e=>eD(e)?{value:e.value}:{issues:r.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:eO(e)},r=this._parse({data:e,path:n.path,parent:n});return eW(n,await (eZ(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:eS.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new tR({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return tM.create(this,this._def)}nullable(){return tF.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tg.create(this)}promise(){return tB.create(this,this._def)}or(e){return tv.create([this,e],this._def)}and(e){return tE.create(this,e,this._def)}transform(e){return new tR({...eK(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new tj({...eK(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:y.ZodDefault})}brand(){return new tG({typeName:y.ZodBranded,type:this,...eK(this._def)})}catch(e){return new tU({...eK(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:y.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return tL.create(this,e)}readonly(){return tD.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let eQ=/^c[^\s-]{8,}
vendor: 6,837 bytes, line 3
3$/i,eJ=/^[0-9a-z]+$/,eX=/^[0-9A-HJKMNP-TV-Z]{26}$/i,e0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,e1=/^[a-z0-9_-]{21}$/i,e2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,e6=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,e5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,e3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,e8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,e9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,e7=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,te=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",tn=RegExp(`^${tt}$`);function tr(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ti(e){let t=`${tt}T${tr(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)}class ta extends eY{_parse(e){var t,n,i,a;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==eP.string){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.string,received:t.parsedType}),eU}let o=new ej;for(let u of this._def.checks)if("min"===u.kind)e.data.length<u.value&&(eF(s=this._getOrReturnCtx(e,s),{code:eS.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),o.dirty());else if("max"===u.kind)e.data.length>u.value&&(eF(s=this._getOrReturnCtx(e,s),{code:eS.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),o.dirty());else if("length"===u.kind){let t=e.data.length>u.value,n=e.data.length<u.value;(t||n)&&(s=this._getOrReturnCtx(e,s),t?eF(s,{code:eS.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):n&&eF(s,{code:eS.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),o.dirty())}else if("email"===u.kind)e5.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"email",code:eS.invalid_string,message:u.message}),o.dirty());else if("emoji"===u.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:eS.invalid_string,message:u.message}),o.dirty());else if("uuid"===u.kind)e0.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:eS.invalid_string,message:u.message}),o.dirty());else if("nanoid"===u.kind)e1.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:eS.invalid_string,message:u.message}),o.dirty());else if("cuid"===u.kind)eQ.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:eS.invalid_string,message:u.message}),o.dirty());else if("cuid2"===u.kind)eJ.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:eS.invalid_string,message:u.message}),o.dirty());else if("ulid"===u.kind)eX.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:eS.invalid_string,message:u.message}),o.dirty());else if("url"===u.kind)try{new URL(e.data)}catch(t){eF(s=this._getOrReturnCtx(e,s),{validation:"url",code:eS.invalid_string,message:u.message}),o.dirty()}else"regex"===u.kind?(u.regex.lastIndex=0,u.regex.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"regex",code:eS.invalid_string,message:u.message}),o.dirty())):"trim"===u.kind?e.data=e.data.trim():"includes"===u.kind?e.data.includes(u.value,u.position)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),o.dirty()):"toLowerCase"===u.kind?e.data=e.data.toLowerCase():"toUpperCase"===u.kind?e.data=e.data.toUpperCase():"startsWith"===u.kind?e.data.startsWith(u.value)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:{startsWith:u.value},message:u.message}),o.dirty()):"endsWith"===u.kind?e.data.endsWith(u.value)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:{endsWith:u.value},message:u.message}),o.dirty()):"datetime"===u.kind?ti(u).test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:"datetime",message:u.message}),o.dirty()):"date"===u.kind?tn.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:"date",message:u.message}),o.dirty()):"time"===u.kind?RegExp(`^${tr(u)}$`).test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{code:eS.invalid_string,validation:"time",message:u.message}),o.dirty()):"duration"===u.kind?e6.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"duration",code:eS.invalid_string,message:u.message}),o.dirty()):"ip"===u.kind?(t=e.data,("v4"===(n=u.version)||!n)&&e3.test(t)||("v6"===n||!n)&&e8.test(t)||(eF(s=this._getOrReturnCtx(e,s),{validation:"ip",code:eS.invalid_string,message:u.message}),o.dirty())):"jwt"===u.kind?!function(e,t){if(!e2.test(e))return!1;
3try{let[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));if("object"!=typeof i||null===i||!i.typ||!i.alg||t&&i.alg!==t)return!1;return!0}catch(e){return!1}}(e.data,u.alg)&&(eF(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:eS.invalid_string,message:u.message}),o.dirty()):"cidr"===u.kind?(i=e.data,("v4"===(a=u.version)||!a)&&e4.test(i)||("v6"===a||!a)&&e9.test(i)||(eF(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:eS.invalid_string,message:u.message}),o.dirty())):"base64"===u.kind?e7.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"base64",code:eS.invalid_string,message:u.message}),o.dirty()):"base64url"===u.kind?te.test(e.data)||(eF(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:eS.invalid_string,message:u.message}),o.dirty()):d.assertNever(u);return{status:o.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:eS.invalid_string,...h.errToObj(n)})}_addCheck(e){return new ta({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...h.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...h.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...h.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new ta({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ta({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ta({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ta.create=e=>{var t;return new ta({checks:[],typeName:y.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...eK(e)})};class ts extends eY{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==eP.number){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.number,received:t.parsedType}),eU}let n=new ej;for(let r of this._def.checks)"int"===r.kind?d.isInteger(e.data)||(eF(t=this._getOrReturnCtx(e,t),{code:eS.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,r.value)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(eF(t=this._getOrReturnCtx(e,t),{code:eS.not_finite,message:r.message}),n.dirty()):d.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,r){return new ts({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(r)}]})}_addCheck(e){return new ts({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&d.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ts.create=e=>new ts({checks:[],typeName:y.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...eK(e)});class to extends eY{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==eP.bigint)return this._getInvalidInput(e);let n=new ej;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):d.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.bigint,received:t.parsedType}),eU}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,r){return new to({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(r)}]})}_addCheck(e){return new to({...this._def,checks:[...this._def.checks,e]})}
3positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}to.create=e=>{var t;return new to({checks:[],typeName:y.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...eK(e)})};class tu extends eY{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==eP.boolean){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.boolean,received:t.parsedType}),eU}return ez(e.data)}}tu.create=e=>new tu({typeName:y.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...eK(e)});class tc extends eY{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==eP.date){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.date,received:t.parsedType}),eU}if(isNaN(e.data.getTime()))return eF(this._getOrReturnCtx(e),{code:eS.invalid_date}),eU;let n=new ej;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(eF(t=this._getOrReturnCtx(e,t),{code:eS.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):d.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new tc({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}tc.create=e=>new tc({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:y.ZodDate,...eK(e)});class tl extends eY{_parse(e){if(this._getType(e)!==eP.symbol){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.symbol,received:t.parsedType}),eU}return ez(e.data)}}tl.create=e=>new tl({typeName:y.ZodSymbol,...eK(e)});class td extends eY{_parse(e){if(this._getType(e)!==eP.undefined){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.undefined,received:t.parsedType}),eU}return ez(e.data)}}td.create=e=>new td({typeName:y.ZodUndefined,...eK(e)});class tf extends eY{_parse(e){if(this._getType(e)!==eP.null){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.null,received:t.parsedType}),eU}return ez(e.data)}}tf.create=e=>new tf({typeName:y.ZodNull,...eK(e)});class th extends eY{constructor(){super(...arguments),this._any=!0}_parse(e){return ez(e.data)}}th.create=e=>new th({typeName:y.ZodAny,...eK(e)});class tp extends eY{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ez(e.data)}}tp.create=e=>new tp({typeName:y.ZodUnknown,...eK(e)});class tm extends eY{_parse(e){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.never,received:t.parsedType}),eU}}tm.create=e=>new tm({typeName:y.ZodNever,...eK(e)});class ty extends eY{_parse(e){if(this._getType(e)!==eP.undefined){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.void,received:t.parsedType}),eU}return ez(e.data)}}ty.create=e=>new ty({typeName:y.ZodVoid,...eK(e)});class tg extends eY{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==eP.array)return eF(t,{code:eS.invalid_type,expected:eP.array,received:t.parsedType}),eU;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(eF(t,{code:e?eS.too_big:eS.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(eF(t,{code:eS.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(eF(t,{code:eS.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new eV(t,e,t.path,n)))).then(e=>ej.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new eV(t,e,t.path,n)));return ej.mergeArray(n,i)}
3get element(){return this._def.type}min(e,t){return new tg({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new tg({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new tg({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}tg.create=(e,t)=>new tg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...eK(t)});class tb extends eY{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=d.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==eP.object){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.object,received:t.parsedType}),eU}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof tm&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=r[e],i=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new eV(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof tm){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(eF(n,{code:eS.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new eV(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>ej.mergeObjectSync(t,e)):ej.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new tb({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,a,s;let o=null!==(a=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==a?a:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=h.errToObj(e).message)&&void 0!==s?s:o}:{message:o}}}:{}})}strip(){return new tb({...this._def,unknownKeys:"strip"})}passthrough(){return new tb({...this._def,unknownKeys:"passthrough"})}extend(e){return new tb({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new tb({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new tb({...this._def,catchall:e})}pick(e){let t={};return d.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new tb({...this._def,shape:()=>t})}omit(e){let t={};return d.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new tb({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof tb){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=tM.create(e(i))}return new tb({...t._def,shape:()=>n})}return t instanceof tg?new tg({...t._def,type:e(t.element)}):t instanceof tM?tM.create(e(t.unwrap())):t instanceof tF?tF.create(e(t.unwrap())):t instanceof t_?t_.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return d.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new tb({...this._def,shape:()=>t})}required(e){let t={};return d.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof tM;)e=e._def.innerType;t[n]=e}}),new tb({...this._def,shape:()=>t})}keyof(){return tS(d.objectKeys(this.shape))}}tb.create=(e,t)=>new tb({shape:()=>e,unknownKeys:"strip",catchall:tm.create(),typeName:y.ZodObject,...eK(t)}),tb.strictCreate=(e,t)=>new tb({shape:()=>e,unknownKeys:"strict",catchall:tm.create(),typeName:y.ZodObject,...eK(t)}),tb.lazycreate=(e,t)=>new tb({shape:e,unknownKeys:"strip",catchall:tm.create(),typeName:y.ZodObject,...eK(t)});class tv extends eY{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new eC(e.ctx.common.issues));return eF(t,{code:eS.invalid_union,unionErrors:n}),eU});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new eC(e));return eF(t,{code:eS.invalid_union,unionErrors:i}),eU}}get options(){return this._def.options}}tv.create=(e,t)=>
3new tv({options:e,typeName:y.ZodUnion,...eK(t)});let tw=e=>{if(e instanceof tP)return tw(e.schema);if(e instanceof tR)return tw(e.innerType());if(e instanceof tO)return[e.value];if(e instanceof tC)return e.options;if(e instanceof tN)return d.objectValues(e.enum);if(e instanceof tj)return tw(e._def.innerType);if(e instanceof td)return[void 0];else if(e instanceof tf)return[null];else if(e instanceof tM)return[void 0,...tw(e.unwrap())];else if(e instanceof tF)return[null,...tw(e.unwrap())];else if(e instanceof tG)return tw(e.unwrap());else if(e instanceof tD)return tw(e.unwrap());else if(e instanceof tU)return tw(e._def.innerType);else return[]};class tx extends eY{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==eP.object)return eF(t,{code:eS.invalid_type,expected:eP.object,received:t.parsedType}),eU;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(eF(t,{code:eS.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),eU)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=tw(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new tx({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...eK(n)})}}class tE extends eY{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(eG(e)||eG(r))return eU;let i=function e(t,n){let r=eO(t),i=eO(n);if(t===n)return{valid:!0,data:t};if(r===eP.object&&i===eP.object){let r=d.objectKeys(n),i=d.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===eP.array&&i===eP.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1};r.push(a.data)}return{valid:!0,data:r}}return r===eP.date&&i===eP.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,r.value);return i.valid?((eL(e)||eL(r))&&t.dirty(),{status:t.value,value:i.data}):(eF(n,{code:eS.invalid_intersection_types}),eU)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}tE.create=(e,t,n)=>new tE({left:e,right:t,typeName:y.ZodIntersection,...eK(n)});class t_ extends eY{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==eP.array)return eF(n,{code:eS.invalid_type,expected:eP.array,received:n.parsedType}),eU;if(n.data.length<this._def.items.length)return eF(n,{code:eS.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),eU;!this._def.rest&&n.data.length>this._def.items.length&&(eF(n,{code:eS.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new eV(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>ej.mergeArray(t,e)):ej.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new t_({...this._def,rest:e})}}t_.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new t_({items:e,typeName:y.ZodTuple,rest:null,...eK(t)})};class tA extends eY{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==eP.object)return eF(n,{code:eS.invalid_type,expected:eP.object,received:n.parsedType}),eU;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new eV(n,e,n.path,e)),value:a._parse(new eV(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?ej.mergeObjectAsync(t,r):ej.mergeObjectSync(t,r)}
3get element(){return this._def.valueType}static create(e,t,n){return new tA(t instanceof eY?{keyType:e,valueType:t,typeName:y.ZodRecord,...eK(n)}:{keyType:ta.create(),valueType:e,typeName:y.ZodRecord,...eK(t)})}}class tI extends eY{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==eP.map)return eF(n,{code:eS.invalid_type,expected:eP.map,received:n.parsedType}),eU;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new eV(n,e,n.path,[a,"key"])),value:i._parse(new eV(n,t,n.path,[a,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return eU;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return eU;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}tI.create=(e,t,n)=>new tI({valueType:t,keyType:e,typeName:y.ZodMap,...eK(n)});class tT extends eY{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==eP.set)return eF(n,{code:eS.invalid_type,expected:eP.set,received:n.parsedType}),eU;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(eF(n,{code:eS.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(eF(n,{code:eS.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return eU;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let s=[...n.data.values()].map((e,t)=>i._parse(new eV(n,e,n.path,t)));return n.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new tT({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new tT({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}tT.create=(e,t)=>new tT({valueType:e,minSize:null,maxSize:null,typeName:y.ZodSet,...eK(t)});class tk extends eY{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==eP.function)return eF(t,{code:eS.invalid_type,expected:eP.function,received:t.parsedType}),eU;function n(e,n){return eM({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,eR(),eN].filter(e=>!!e),issueData:{code:eS.invalid_arguments,argumentsError:n}})}function r(e,n){return eM({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,eR(),eN].filter(e=>!!e),issueData:{code:eS.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof tB){let e=this;return ez(async function(...t){let s=new eC([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(n(t,e)),s}),u=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw s.addIssue(r(u,e)),s})})}{let e=this;return ez(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new eC([n(t,s.error)]);let o=Reflect.apply(a,this,s.data),u=e._def.returns.safeParse(o,i);if(!u.success)throw new eC([r(o,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new tk({...this._def,args:t_.create(e).rest(tp.create())})}returns(e){return new tk({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new tk({args:e||t_.create([]).rest(tp.create()),returns:t||tp.create(),typeName:y.ZodFunction,...eK(n)})}}class tP extends eY{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}tP.create=(e,t)=>
3new tP({getter:e,typeName:y.ZodLazy,...eK(t)});class tO extends eY{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return eF(t,{received:t.data,code:eS.invalid_literal,expected:this._def.value}),eU}return{status:"valid",value:e.data}}get value(){return this._def.value}}function tS(e,t){return new tC({values:e,typeName:y.ZodEnum,...eK(t)})}tO.create=(e,t)=>new tO({value:e,typeName:y.ZodLiteral,...eK(t)});class tC extends eY{constructor(){super(...arguments),p.set(this,void 0)}_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return eF(t,{expected:d.joinValues(n),received:t.parsedType,code:eS.invalid_type}),eU}if(eq(this,p,"f")||eH(this,p,new Set(this._def.values),"f"),!eq(this,p,"f").has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return eF(t,{received:t.data,code:eS.invalid_enum_value,options:n}),eU}return ez(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return tC.create(e,{...this._def,...t})}exclude(e,t=this._def){return tC.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}p=new WeakMap,tC.create=tS;class tN extends eY{constructor(){super(...arguments),m.set(this,void 0)}_parse(e){let t=d.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==eP.string&&n.parsedType!==eP.number){let e=d.objectValues(t);return eF(n,{expected:d.joinValues(e),received:n.parsedType,code:eS.invalid_type}),eU}if(eq(this,m,"f")||eH(this,m,new Set(d.getValidEnumValues(this._def.values)),"f"),!eq(this,m,"f").has(e.data)){let e=d.objectValues(t);return eF(n,{received:n.data,code:eS.invalid_enum_value,options:e}),eU}return ez(e.data)}get enum(){return this._def.values}}m=new WeakMap,tN.create=(e,t)=>new tN({values:e,typeName:y.ZodNativeEnum,...eK(t)});class tB extends eY{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==eP.promise&&!1===t.common.async?(eF(t,{code:eS.invalid_type,expected:eP.promise,received:t.parsedType}),eU):ez((t.parsedType===eP.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}tB.create=(e,t)=>new tB({type:e,typeName:y.ZodPromise,...eK(t)});class tR extends eY{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{eF(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return eU;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?eU:"dirty"===r.status||"dirty"===t.value?e$(r.value):r});{if("aborted"===t.value)return eU;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?eU:"dirty"===r.status||"dirty"===t.value?e$(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?eU:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?eU:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>eD(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!eD(e))return e;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}d.assertNever(r)}}
3tR.create=(e,t,n)=>new tR({schema:e,typeName:y.ZodEffects,effect:t,...eK(n)}),tR.createWithPreprocess=(e,t,n)=>new tR({schema:t,effect:{type:"preprocess",transform:e},typeName:y.ZodEffects,...eK(n)});class tM extends eY{_parse(e){return this._getType(e)===eP.undefined?ez(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}tM.create=(e,t)=>new tM({innerType:e,typeName:y.ZodOptional,...eK(t)});class tF extends eY{_parse(e){return this._getType(e)===eP.null?ez(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}tF.create=(e,t)=>new tF({innerType:e,typeName:y.ZodNullable,...eK(t)});class tj extends eY{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===eP.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}tj.create=(e,t)=>new tj({innerType:e,typeName:y.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...eK(t)});class tU extends eY{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return eZ(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new eC(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new eC(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}tU.create=(e,t)=>new tU({innerType:e,typeName:y.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...eK(t)});class t$ extends eY{_parse(e){if(this._getType(e)!==eP.nan){let t=this._getOrReturnCtx(e);return eF(t,{code:eS.invalid_type,expected:eP.nan,received:t.parsedType}),eU}return{status:"valid",value:e.data}}}t$.create=e=>new t$({typeName:y.ZodNaN,...eK(e)});let tz=Symbol("zod_brand");class tG extends eY{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class tL extends eY{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?eU:"dirty"===e.status?(t.dirty(),e$(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?eU:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new tL({in:e,out:t,typeName:y.ZodPipeline})}}class tD extends eY{_parse(e){let t=this._def.innerType._parse(e),n=e=>(eD(e)&&(e.value=Object.freeze(e.value)),e);return eZ(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}function tZ(e,t){let n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function tq(e,t={},n){return e?th.create().superRefine((r,i)=>{var a,s;let o=e(r);if(o instanceof Promise)return o.then(e=>{var a,s;if(!e){let e=tZ(t,r),o=null===(s=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===s||s;i.addIssue({code:"custom",...e,fatal:o})}});if(!o){let e=tZ(t,r),o=null===(s=null!==(a=e.fatal)&&void 0!==a?a:n)||void 0===s||s;i.addIssue({code:"custom",...e,fatal:o})}}):th.create()}tD.create=(e,t)=>new tD({innerType:e,typeName:y.ZodReadonly,...eK(t)});let tH={object:tb.lazycreate};(s=y||(y={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly";let tV=ta.create,tW=ts.create,tK=t$.create,tY=to.create,tQ=tu.create,tJ=tc.create,tX=tl.create,t0=td.create,t1=tf.create,t2=th.create,t6=tp.create,t5=tm.create,t3=ty.create,t4=tg.create,t8=tb.create,t9=tb.strictCreate,t7=tv.create,ne=tx.create,nt=tE.create,nn=t_.create,nr=tA.create,ni=tI.create,na=tT.create,ns=tk.create,no=tP.create,nu=tO.create,nc=tC.create,nl=tN.create,nd=tB.create,nf=tR.create,nh=tM.create,np=tF.create,nm=tR.createWithPreprocess,ny=tL.create;var ng=Object.freeze({__proto__:null,defaultErrorMap:eN,setErrorMap:function(e){eB=e},getErrorMap:eR,makeIssue:eM,EMPTY_PATH:[],addIssueToContext:eF,ParseStatus:ej,INVALID:eU,DIRTY:e$,OK:ez,isAborted:eG,isDirty:eL,isValid:eD,isAsync:eZ,get util(){return d},get objectUtil(){return f},ZodParsedType:eP,getParsedType:eO,ZodType:eY,datetimeRegex:ti,ZodString:ta,ZodNumber:ts,ZodBigInt:to,ZodBoolean:tu,ZodDate:tc,ZodSymbol:tl,ZodUndefined:td,ZodNull:tf,ZodAny:th,ZodUnknown:tp,ZodNever:tm,ZodVoid:ty,ZodArray:tg,ZodObject:tb,ZodUnion:tv,ZodDiscriminatedUnion:tx,ZodIntersection:tE,ZodTuple:t_,ZodRecord:tA,ZodMap:tI,ZodSet:tT,ZodFunction:tk,ZodLazy:tP,ZodLiteral:tO,ZodEnum:tC,ZodNativeEnum:tN,ZodPromise:tB,ZodEffects:tR,ZodTransformer:tR,ZodOptional:tM,ZodNullable:tF,ZodDefault:tj,ZodCatch:tU,ZodNaN:t$,BRAND:tz,ZodBranded:tG,ZodPipeline:tL,ZodReadonly:tD,custom:tq,Schema:eY,ZodSchema:eY,late:tH,get ZodFirstPartyTypeKind(){return y},coerce:{string:e=>ta.create({...e,coerce:!0}),number:e=>ts.create({...e,coerce:!0}),boolean:e=>tu.create({...e,coerce:!0}),bigint:e=>to.create({...e,coerce:!0}),date:e=>tc.create({...e,coerce:!0})},any:t2,array:t4,bigint:tY,boolean:tQ,date:tJ,discriminatedUnion:ne,effect:nf,enum:nc,function:ns,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>tq(t=>t instanceof e,t),intersection:nt,lazy:no,literal:nu,map:ni,nan:tK,nativeEnum:nl,never:t5,null:t1,nullable:np,number:tW,object:t8,oboolean:()=>tQ().optional(),onumber:()=>tW().optional(),optional:nh,ostring:()=>tV().optional(),pipeline:ny,preprocess:nm,promise:nd,record:nr,set:na,str
3ictObject:t9,string:tV,symbol:tX,transformer:nf,tuple:nn,undefined:t0,union:t7,unknown:t6,void:t3,NEVER:eU,ZodIssueCode:eS,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:eC});let nb=e=>e.message?e.message:"unspecified error";class nv extends ea{constructor(e){super(),this.code=1100,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]: 4${this._compileErrors().join("\n")}`}_compileErrors(){return this.errors.map(nb)}}let nw=["bool","int","uint","bytes","string","address","tuple"],nx=e=>"object"==typeof e&&"type"in e&&"name"in e,nE=e=>"string"==typeof e,n_=e=>"string"==typeof e&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e),nA=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],nI=e=>{let t,n=e.replace(/ /,""),r=!1,i=[];if(e.includes("[")&&(n=n.slice(0,n.indexOf("[")),r=(i=[...e.matchAll(/(?:\[(\d*)\])/g)].map(e=>parseInt(e[1],10)).map(e=>Number.isNaN(e)?-1:e)).length>0),nw.includes(n))return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i};if(n.startsWith("int"))t=parseInt(n.substring(3),10),n="int";else if(n.startsWith("uint"))t=parseInt(e.substring(4),10),n="uint";else{if(!n.startsWith("bytes"))return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};t=parseInt(n.substring(5),10),n="bytes"}return{baseType:n,isArray:r,baseTypeSize:t,arraySizes:i}},nT=(e,t={})=>{if(Object.keys(t).includes("type"))throw new nv([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);let{baseType:n,baseTypeSize:r}=nI(e);if(!n&&!nA.includes(e))throw new nv([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(n){if("tuple"===n)throw Error('"tuple" type is not implemented directly.');return{format:`${n}${null!=r?r:""}`,required:!0}}return e?{format:e,required:!0}:{}},nk=(e,t="/0")=>{let n={type:"array",items:[],maxItems:e.length,minItems:e.length};for(let[r,i]of e.entries()){let e,a,s;let o=[];nx(i)?(e=i.type,a=i.name||`${t}/${r}`,o=i.components):"string"==typeof i?(e=i,a=`${t}/${r}`):Array.isArray(i)&&(i[0]&&"string"==typeof i[0]&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(e=i[0],a=`${t}/${r}`,o=i[1]):(e="tuple",a=`${t}/${r}`,o=i));let{baseType:u,isArray:c,arraySizes:l}=nI(e),d=n;for(let e=l.length-1;e>0;e-=1)s={type:"array",$id:a,items:[],maxItems:l[e],minItems:l[e]},l[e]<0&&(delete s.maxItems,delete s.minItems),Array.isArray(d.items)?0===d.items.length?d.items=[s]:d.items.push(s):d.items=[d.items,s],d=s;if("tuple"!==u||c){if("tuple"===u&&c){let e=l[0],t=Object.assign({type:"array",$id:a,items:nk(o,a)},e>=0&&{minItems:e,maxItems:e});d.items.push(t)}else if(c){let t=l[0],n=Object.assign({type:"array",$id:a,items:nT(e)},t>=0&&{minItems:t,maxItems:t});d.items.push(n)}else Array.isArray(d.items),d.items.push(Object.assign({$id:a},nT(e)))}else{let e=nk(o,a);e.$id=a,d.items.push(e)}d=n}return n},nP=e=>nk(e),nO=(e,t)=>
41===t?e:nO(e[0],t-1),nS=(e,t,n)=>{let r=[];for(let[i,a]of e.entries()){let e,s;let o=[];nx(a)?(e=a.type,s=a.name,o=a.components):"string"==typeof a?e=a:Array.isArray(a)&&(a[1]&&Array.isArray(a[1])?(e=a[0],o=a[1]):(e="tuple",o=a));let{baseType:u,isArray:c,arraySizes:l}=nI(e),d=Array.isArray(t)?t[i]:t[s];if("tuple"!==u||c){if("tuple"===u&&c){let e=[];for(let t of d)if(l.length>1){let r=nO(t,l.length-1),i=[];for(let e of r)i.push(nS(o,e,n));e.push(i)}else e.push(nS(o,t,n));r.push(e)}else r.push(d)}else r.push(nS(o,d,n))}return(n=null!=n?n:[]).push(...r),n},nC=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw Error(`Invalid code point: ${e}`)},nN=e=>{if(!n_(e))throw Error("Invalid hex string");let[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=BigInt(n);return r>Number.MAX_SAFE_INTEGER?t?-r:r:r<Number.MIN_SAFE_INTEGER?r:t?-1*Number(r):Number(r)},nB=e=>{if(("number"==typeof e||"bigint"==typeof e)&&e<0)return`-0x${e.toString(16).slice(1)}`;if(("number"==typeof e||"bigint"==typeof e)&&e>=0)return`0x${e.toString(16)}`;if("string"==typeof e&&n_(e)){let[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=n.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${r.replace(/^0+/,"").toLowerCase()}`}if("string"==typeof e&&!n_(e))return nB(BigInt(e));throw new ec(e)},nR=(e,t,n="0")=>{if("string"==typeof e&&!n_(e))return e.padStart(t,n);let r="string"==typeof e&&n_(e)?e:nB(e),[i,a]=r.startsWith("-")?["-0x",r.slice(3)]:["0x",r.slice(2)];return`${i}${a.padStart(t,n)}`};function nM(e){let t="0x";for(let n of e){let e=n.toString(16);t+=1===e.length?`0${e}`:e}return t}let nF={zero:48,nine:57,A:65,F:70,a:97,f:102};function nj(e){return e>=nF.zero&&e<=nF.nine?e-nF.zero:e>=nF.A&&e<=nF.F?e-(nF.A-10):e>=nF.a&&e<=nF.f?e-(nF.a-10):void 0}function nU(e){let t=0;if(e.startsWith("0")&&("x"===e[1]||"X"===e[1])&&(t=2),e.length%2!=0)throw new eu(`hex string has odd length: ${e}`);let n=(e.length-t)/2,r=new Uint8Array(n);for(let i=0,a=t;i<n;i+=1){let t=nj(e.charCodeAt(a++)),n=nj(e.charCodeAt(a++));if(void 0===t||void 0===n)throw new eu(`Invalid byte sequence ("${e[a-2]}${e[a-1]}" in "${e}").`);r[i]=16*t+n}return r}function n$(e){var t;return e instanceof Uint8Array||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)!=="Uint8Array"?e:Uint8Array.from(e)}let nz=e=>{var t,n;return e instanceof Uint8Array||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)==="Uint8Array"||(null===(n=null==e?void 0:e.constructor)||void 0===n?void 0:n.name)==="Buffer"},nG=(e,t={abiType:"bytes"})=>{let n;if("string"!=typeof e&&!Array.isArray(e)&&!nz(e)||"string"==typeof e&&n_(e)&&e.startsWith("-")||"string"==typeof e&&!n_(e))return!1;if("string"==typeof e){if(e.length%2!=0)return!1;n=nU(e)}else if(Array.isArray(e)){if(e.some(e=>e<0||e>255||!Number.isInteger(e)))return!1;n=new Uint8Array(e)}else n=e;if(null==t?void 0:t.abiType){let{baseTypeSize:e}=nI(t.abiType);return!e||n.length===e}return null==t||!t.size||n.length===(null==t?void 0:t.size)},nL=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;let t=e.slice(2),n=nM(ei(n$(M(t.toLowerCase())))).slice(2);for(let e=0;e<40;e+=1)if(parseInt(n[e],16)>7&&t[e].toUpperCase()!==t[e]||7>=parseInt(n[e],16)&&t[e].toLowerCase()!==t[e])return!1;return!0},nD=(e,t=!0)=>{let n;return!!("string"==typeof e||nz(e))&&(n=nz(e)?nM(e):"string"!=typeof e||n_(e)?e:e.toLowerCase().startsWith("0x")?e:`0x${e}`,!!/^(0x)?[0-9a-f]{40}$/i.test(n)&&(!!(/^(0x|0X)?[0-9a-f]{40}$/.test(n)||/^(0x|0X)?[0-9A-F]{40}$/.test(n))||!t||nL(n)))};(o=g||(g={})).NUMBER="NUMBER_NUMBER",o.HEX="NUMBER_HEX",o.STR="NUMBER_STR",o.BIGINT="NUMBER_BIGINT",(u=b||(b={})).HEX="BYTES_HEX",u.UINT8ARRAY="BYTES_UINT8ARRAY",g.BIGINT,b.HEX,g.HEX,b.HEX,(c=v||(v={})).EARLIEST="earliest",c.LATEST="latest",c.PENDING="pending",c.SAFE="safe",c.FINALIZED="finalized",c.COMMITTED="committed",(l=w||(w={})).chainstart="chainstart",l.frontier="frontier",l.homestead="homestead",l.dao="dao",l.tangerineWhistle="tangerineWhistle",l.spuriousDragon="spuriousDragon",l.byzantium="byzantium",l.constantinople="constantinople",l.petersburg="petersburg",l.istanbul="istanbul",l.muirGlacier="muirGlacier",l.berlin="berlin",l.london="london",l.altair="altair",l.arrowGlacier="arrowGlacier",l.grayGlacier="grayGlacier",l.bellatrix="bellatrix",l.merge="merge",l.capella="capella",l.shanghai="shanghai",Object.getPrototypeOf(Uint8Array);
4var nZ=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}u((r=r.apply(e,t||[])).next())})};let nq=Symbol.for("web3/base-provider");class nH{static isWeb3Provider(e){return e instanceof nH||!!(e&&e[nq])}get[nq](){return!0}send(e,t){this.request(e).then(e=>{t(null,e)}).catch(e=>{t(e)})}sendAsync(e){return nZ(this,void 0,void 0,function*(){return this.request(e)})}asEIP1193Provider(){let e=Object.create(this),t=e.request;return e.request=function(e){return nZ(this,void 0,void 0,function*(){return(yield t(e)).result})},e.asEIP1193Provider=void 0,e}}let nV=(e,t)=>{if(t===BigInt(0))return BigInt(1);let n=e;for(let r=1;r<t;r+=1)n*=e;return n},nW=(e,t={abiType:"uint"})=>{let n;if(!["number","string","bigint"].includes(typeof e)||"string"==typeof e&&0===e.length)return!1;if(null==t?void 0:t.abiType){let{baseTypeSize:e}=nI(t.abiType);e&&(n=e)}else t.bitSize&&(n=t.bitSize);let r=nV(BigInt(2),BigInt(null!=n?n:256))-BigInt(1);try{let t="string"==typeof e&&n_(e)?BigInt(nN(e)):BigInt(e);return t>=0&&t<=r}catch(e){return!1}},nK=(e,t={abiType:"int"})=>{let n;if(!["number","string","bigint"].includes(typeof e)||"number"==typeof e&&e>Number.MAX_SAFE_INTEGER)return!1;if(null==t?void 0:t.abiType){let{baseTypeSize:e,baseType:r}=nI(t.abiType);if("int"!==r)return!1;e&&(n=e)}else t.bitSize&&(n=t.bitSize);let r=nV(BigInt(2),BigInt((null!=n?n:256)-1)),i=BigInt(-1)*nV(BigInt(2),BigInt((null!=n?n:256)-1));try{let t="string"==typeof e&&n_(e)?BigInt(nN(e)):BigInt(e);return t>=i&&t<=r}catch(e){return!1}},nY=e=>!!(nK(e)||"string"==typeof e&&/[0-9.]/.test(e)&&e.indexOf(".")===e.lastIndexOf("."))||"number"==typeof e,nQ=e=>nW(e),nJ=e=>Object.values(v).includes(e),nX=e=>nJ(e)||nQ(e),n0=e=>!!("string"==typeof e&&/^(0x)?[0-9a-f]{512}$/i.test(e))&&!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e)),n1=e=>!!["number","string","boolean"].includes(typeof e)&&("boolean"==typeof e||("string"!=typeof e||n_(e)?"string"==typeof e&&n_(e)?"0x1"===e||"0x0"===e:1===e||0===e:"1"===e||"0"===e)),n2=e=>null==e,n6=e=>!!("string"==typeof e&&/^(0x)?[0-9a-f]{64}$/i.test(e))&&!!(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e)),n5=e=>{let t=["fromBlock","toBlock","address","topics","blockHash"];if(n2(e)||"object"!=typeof e||!Object.keys(e).every(e=>t.includes(e))||!n2(e.fromBlock)&&!nX(e.fromBlock)||!n2(e.toBlock)&&!nX(e.toBlock))return!1;if(!n2(e.address)){if(Array.isArray(e.address)){if(!e.address.every(e=>nD(e)))return!1}else if(!nD(e.address))return!1}return!!(n2(e.topics)||e.topics.every(e=>!!n2(e)||(Array.isArray(e)?e.every(e=>n6(e)):!!n6(e))))},n3={address:e=>nD(e),bloom:e=>n0(e),blockNumber:e=>nQ(e),blockTag:e=>nJ(e),blockNumberOrTag:e=>nX(e),bool:e=>n1(e),bytes:e=>nG(e),filter:e=>n5(e),hex:e=>n_(e),uint:e=>nW(e),int:e=>nK(e),number:e=>nY(e),string:e=>nE(e)};for(let e=8;e<=256;e+=8)n3[`int${e}`]=t=>nK(t,{bitSize:e}),n3[`uint${e}`]=t=>nW(t,{bitSize:e});for(let e=1;e<=32;e+=1)n3[`bytes${e}`]=t=>nG(t,{size:e});n3.bytes256=n3.bytes;let n4=e=>{if((!(null==e?void 0:e.type)||(null==e?void 0:e.type)==="object")&&(null==e?void 0:e.properties)){let t={};for(let n of Object.keys(e.properties)){let r=n4(e.properties[n]);r&&(t[n]=r)}return Array.isArray(e.required)?ng.object(t).partial().required(e.required.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:!0}),{})):ng.object(t).partial()}if((null==e?void 0:e.type)==="array"&&(null==e?void 0:e.items)){if(Array.isArray(e.items)&&e.items.length>1&&void 0!==e.maxItems&&new Set(e.items.map(e=>e.$id)).size===e.items.length){let t=[];for(let n of e.items){let e=n4(n);e&&t.push(e)}return ng.tuple(t)}let t=Array.isArray(e.items)?e.items[0]:e.items,n=ng.array(n4(t));return n=void 0!==e.minItems?n.min(e.minItems):n,n=void 0!==e.maxItems?n.max(e.maxItems):n}if(e.oneOf&&Array.isArray(e.oneOf))return ng.union(e.oneOf.map(e=>n4(e)));if(null==e?void 0:e.format){if(!n3[e.format])throw new ek(e.format);return ng.any().refine(n3[e.format],t=>({params:{value:t,format:e.format}}))}return(null==e?void 0:e.type)&&(null==e?void 0:e.type)!=="object"&&"function"==typeof ng[String(e.type)]?ng[String(e.type)]():ng.object({data:ng.any()}).partial()};
4class n8{static factory(){return n8.validatorInstance||(n8.validatorInstance=new n8),n8.validatorInstance}validate(e,t,n){var r,i;let a=n4(e).safeParse(t);if(!a.success){let e=this.convertErrors(null!==(i=null===(r=a.error)||void 0===r?void 0:r.issues)&&void 0!==i?i:[]);if(e){if(null==n?void 0:n.silent)return e;throw new nv(e)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map(e=>{var t;let n,r,i,a;a=e.path.join("/");let s=String(e.path[e.path.length-1]),o=e.path.join("/");if(e.code===eS.too_big)r="maxItems",a=`${o}/maxItems`,i={limit:e.maximum},n=`must NOT have more than ${e.maximum} items`;else if(e.code===eS.too_small)r="minItems",a=`${o}/minItems`,i={limit:e.minimum},n=`must NOT have fewer than ${e.minimum} items`;else if(e.code===eS.custom){let{value:r,format:s}=null!==(t=e.params)&&void 0!==t?t:{};n=void 0===r?`value at "/${a}" is required`:`value "${"object"==typeof r?JSON.stringify(r):r}" at "/${a}" must pass "${s}" validation`,i={value:r}}return{keyword:null!=r?r:s,instancePath:o?`/${o}`:"",schemaPath:a?`#${a}`:"#",params:null!=i?i:{value:e.message},message:null!=n?n:e.message}})}}class n9{constructor(){this._validator=n8.factory()}validateJSONSchema(e,t,n){return this._validator.validate(e,t,n)}validate(e,t,n={silent:!1}){var r,i;let a=nP(e);if(!Array.isArray(a.items)||(null===(r=a.items)||void 0===r?void 0:r.length)!==0||0!==t.length){if(Array.isArray(a.items)&&(null===(i=a.items)||void 0===i?void 0:i.length)===0&&0!==t.length)throw new nv([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:t}]);return this._validator.validate(a,t,n)}}}let n7=new n9,re={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},rt="Warning: Using type `number` with values that are large or contain many decimals may cause loss of precision, it is recommended to use type `string` or `BigInt` when using conversion methods",{uint8ArrayToHexString:rn}=x,rr=e=>(n7.validate(["hex"],[e]),nN(e)),ri=e=>{if("number"==typeof e)return e>1e20?(console.warn(rt),BigInt(e)):e;if("bigint"==typeof e)return e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER?Number(e):e;if("string"==typeof e&&n_(e))return rr(e);try{return ri(BigInt(e))}catch(t){throw new ec(e)}},ra=(e,t)=>{let n;if(n7.validate(["number"],[e]),"string"==typeof t){if(!(n=re[t]))throw new el(t)}else{if(t<0||!Number.isInteger(t))throw new ed(t);n=nV(BigInt(10),BigInt(t))}let r=e;"number"==typeof r&&(r<1e-15&&console.warn(rt),r>1e20?(console.warn(rt),r=BigInt(r)):r=r.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20}));let[i,a]=String("string"!=typeof r||n_(r)?ri(r):r).split(".").concat(""),s=BigInt(`${i}${a}`)*n,o=a.length;return 0===o?s.toString():s.toString().slice(0,-o)};n(36393);let rs=(e,t,n="0")=>"string"==typeof e?n_(e)?nR(e,t,n):e.padStart(t,n):(n7.validate(["int"],[e]),nR(e,t,n)),{parseBaseType:ro}=x,ru=(e,t,n=[])=>{let r,i=Object.assign({},e);for(let e of t){if(i.oneOf&&r){let e=r,t=n.find(([t])=>t===e);t&&t[0]===r&&(i=i.oneOf[t[1]])}if(!i.properties&&!i.items)return;i.properties?i=i.properties[e]:i.items&&i.items.properties?i=i.items.properties[e]:i.items&&isObject(i.items)?i=i.items:i.items&&Array.isArray(i.items)&&(i=i.items[parseInt(e,10)]),i&&e&&(r=e)}return i},rc=(e,t,n)=>{try{let{baseType:r,baseTypeSize:i}=ro(t);if("int"===r||"uint"===r)switch(n.number){case FMT_NUMBER.NUMBER:return Number(toBigInt(e));case FMT_NUMBER.HEX:return numberToHex(toBigInt(e));case FMT_NUMBER.STR:return toBigInt(e).toString();case FMT_NUMBER.BIGINT:return toBigInt(e);default:throw new FormatterError(`Invalid format: ${String(n.number)}`)}if("bytes"===r){let t;
4switch(i?"string"==typeof e?t=padLeft(e,2*i):isUint8Array(e)&&(t=uint8ArrayConcat(new Uint8Array(i-e.length),e)):t=e,n.bytes){case FMT_BYTES.HEX:return bytesToHex(bytesToUint8Array(t));case FMT_BYTES.UINT8ARRAY:return bytesToUint8Array(t);default:throw new FormatterError(`Invalid format: ${String(n.bytes)}`)}}if("string"===r)return String(e)}catch(e){}return e},rl=({value:e,schemaProp:t,schema:n,object:r,key:i,dataPath:a,format:s,oneOfPath:o=[]})=>{var u,c;if(Array.isArray(e)){let l=t;if((null==t?void 0:t.oneOf)!==void 0&&t.oneOf.forEach((n,r)=>{var a,s;Array.isArray(null==t?void 0:t.items)||("object"!=typeof e[0]||(null===(a=null==n?void 0:n.items)||void 0===a?void 0:a.type)!=="object")&&("string"!=typeof e[0]||(null===(s=null==n?void 0:n.items)||void 0===s?void 0:s.type)==="object")||(l=n,o.push([i,r]))}),isNullish(null==l?void 0:l.items))return delete r[i],a.pop(),!0;if(isObject(l.items)&&!isNullish(l.items.format)){for(let t=0;t<e.length;t+=1)r[i][t]=rc(e[t],null===(u=null==l?void 0:l.items)||void 0===u?void 0:u.format,s);return a.pop(),!0}if(!Array.isArray(null==l?void 0:l.items)&&(null===(c=null==l?void 0:l.items)||void 0===c?void 0:c.type)==="object"){for(let t of e)rd(t,n,a,s,o);return a.pop(),!0}if(Array.isArray(null==l?void 0:l.items)){for(let t=0;t<e.length;t+=1)r[i][t]=rc(e[t],l.items[t].format,s);return a.pop(),!0}}return!1},rd=(e,t,n,r,i=[])=>{var a;if(!isObject(e)&&!Array.isArray(e))return rc(e,null==t?void 0:t.format,r);if(Array.isArray(e)&&(null==t?void 0:t.type)==="array"&&(null===(a=null==t?void 0:t.items)||void 0===a?void 0:a.type)==="object")rl({value:e,schemaProp:t,schema:t,object:e,key:"",dataPath:n,format:r,oneOfPath:i});else for(let[a,s]of Object.entries(e)){n.push(a);let o=ru(t,n,i);if(isNullish(o)){delete e[a],n.pop();continue}if(isObject(s)){rd(s,t,n,r,i),n.pop();continue}if(!rl({value:s,schemaProp:o,schema:t,object:e,key:a,dataPath:n,format:r,oneOfPath:i})){if((null==o?void 0:o.format)===void 0&&(null==o?void 0:o.oneOf)!==void 0){for(let[e,t]of o.oneOf.entries())if((null==t?void 0:t.format)!==void 0){o=t;break}}e[a]=rc(s,o.format,r),n.pop()}}return e}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.