@orbs-network/spot-react 0.0.69 → 0.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,7 +61,7 @@
61
61
  dollarValueOut
62
62
  }
63
63
  }
64
- `,extractResults:d=>{var f;return(((f=d.data)==null?void 0:f.orderFilleds)||[]).map(h=>({...h,timestamp:new Date(h.timestamp).getTime()}))}})};class Tw extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const Aw=async({chainId:e,signal:t,page:r,limit:n,filters:s})=>{try{const a=await Ew({chainId:e,signal:t,page:r,limit:n,filters:s}),[o,i]=await Promise.all([Cw({chainId:e,orders:a,signal:t}),kw({chainId:e,orders:a,signal:t})]);return a.map(l=>{const u=o==null?void 0:o.filter(d=>d.TWAP_id===Number(l.Contract_id)&&Ps(d.exchange,l.exchange)&&Ps(d.twapAddress,l.twapAddress));return ww(l,e,u,Sw(l,u||[],i))}).sort((l,u)=>u.createdAt-l.createdAt)}catch{return[]}},Sw=(e,t,r)=>{var i;const n=(i=r==null?void 0:r.find(c=>c.twapId===e.Contract_id.toString()&&Ps(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Um(t).reduce((c,l)=>c.plus(l.inAmount),new j(0)).toFixed(),o=Dm(e.ask_srcAmount,a);return Pw(o,e.ask_deadline*1e3,n)},Dm=(e,t)=>{if(!t||!e)return 0;const r=j(t).dividedBy(e).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Pw=(e,t,r)=>e===100?ct.Completed:r==="CANCELED"?ct.Canceled:r==="COMPLETED"?ct.Completed:t>Date.now()?ct.Open:ct.Expired,_m=async({signal:e,page:t,chainId:r,limit:n,config:s,account:a})=>(await Promise.all([s?Aw({chainId:r,signal:e,page:t,limit:n,filters:{accounts:[a],configs:s.twapConfig?[s.twapConfig]:[]}}):Promise.resolve([]),gw({chainId:r,signal:e,account:a,exchange:s==null?void 0:s.adapter})]).then(([c,l])=>[...c,...l])).sort((c,l)=>l.createdAt-c.createdAt),Iw={version:"0.0.69"};var Aa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fw=(g5=class{constructor(){le(this,pn,Bw);le(this,pa,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,pa)&&e!==N(this,pn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,pn),provider:e}),J(this,pn,e),process.env.NODE_ENV!=="production"&&J(this,pa,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&J(this,pa,!0),N(this,pn).setTimeout(e,t)}clearTimeout(e){N(this,pn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&J(this,pa,!0),N(this,pn).setInterval(e,t)}clearInterval(e){N(this,pn).clearInterval(e)}},pn=new WeakMap,pa=new WeakMap,g5),Fs=new Fw;function Uw(e){setTimeout(e,0)}var Us=typeof window>"u"||"Deno"in globalThis;function jt(){}function Ow(e,t){return typeof e=="function"?e(t):e}function md(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zn(e,t){return typeof e=="function"?e(t):e}function wr(e,t){return typeof e=="function"?e(t):e}function Nm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==bd(o,t.options))return!1}else if(!Oo(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function Lm(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Os(t.options.mutationKey)!==Os(a))return!1}else if(!Oo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function bd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Os)(e)}function Os(e){return JSON.stringify(e,(t,r)=>gd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Oo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Oo(e[r],t[r])):!1}var Dw=Object.prototype.hasOwnProperty;function yd(e,t){if(e===t)return e;const r=zm(e)&&zm(t);if(!r&&!(gd(e)&&gd(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,i=r?new Array(o):{};let c=0;for(let l=0;l<o;l++){const u=r?l:a[l],d=e[u],f=t[u];if(d===f){i[u]=d,(r?l<s:Dw.call(e,u))&&c++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){i[u]=f;continue}const h=yd(d,f);i[u]=h,h===d&&c++}return s===o&&c===s?e:i}function Uc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function zm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gd(e){if(!Rm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Rm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Rm(e){return Object.prototype.toString.call(e)==="[object Object]"}function _w(e){return new Promise(t=>{Fs.setTimeout(t,e)})}function xd(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return yd(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return yd(e,t)}return t}function Mw(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Nw(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Oc=Symbol();function Hm(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Oc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Oc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $m(e,t){return typeof e=="function"?e(...t):!!e}var Lw=(x5=class extends Aa{constructor(){super();le(this,fa);le(this,ys);le(this,xo);J(this,xo,t=>{if(!Us&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,ys)||this.setEventListener(N(this,xo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,ys))==null||t.call(this),J(this,ys,void 0))}setEventListener(t){var r;J(this,xo,t),(r=N(this,ys))==null||r.call(this),J(this,ys,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,fa)!==t&&(J(this,fa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,fa)=="boolean"?N(this,fa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fa=new WeakMap,ys=new WeakMap,xo=new WeakMap,x5),wd=new Lw;function vd(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var zw=Uw;function Rw(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=zw;const a=i=>{t?e.push(i):s(()=>{r(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{r(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{r=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}var kt=Rw(),Hw=(w5=class extends Aa{constructor(){super();le(this,wo,!0);le(this,gs);le(this,vo);J(this,vo,t=>{if(!Us&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,gs)||this.setEventListener(N(this,vo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,gs))==null||t.call(this),J(this,gs,void 0))}setEventListener(t){var r;J(this,vo,t),(r=N(this,gs))==null||r.call(this),J(this,gs,t(this.setOnline.bind(this)))}setOnline(t){N(this,wo)!==t&&(J(this,wo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,wo)}},wo=new WeakMap,gs=new WeakMap,vo=new WeakMap,w5),Dc=new Hw;function $w(e){return Math.min(1e3*2**e,3e4)}function Gm(e){return(e??"online")==="online"?Dc.isOnline():!0}var Ed=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jm(e){let t=!1,r=0,n;const s=vd(),a=()=>s.status!=="pending",o=g=>{var E;if(!a()){const v=new Ed(g);f(v),(E=e.onCancel)==null||E.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>wd.isFocused()&&(e.networkMode==="always"||Dc.isOnline())&&e.canRun(),u=()=>Gm(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},f=g=>{a()||(n==null||n(),s.reject(g))},h=()=>new Promise(g=>{var E;n=v=>{(a()||l())&&g(v)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const E=r===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var z;if(a())return;const w=e.retry??(Us?0:3),A=e.retryDelay??$w,C=typeof A=="function"?A(r,v):A,D=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!D){f(v);return}r++,(z=e.onFail)==null||z.call(e,r,v),_w(C).then(()=>l()?void 0:h()).then(()=>{t?f(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():h().then(y),s)}}var Vm=(v5=class{constructor(){le(this,ha)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),md(this.gcTime)&&J(this,ha,Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Us?1/0:300*1e3))}clearGcTimeout(){N(this,ha)&&(Fs.clearTimeout(N(this,ha)),J(this,ha,void 0))}},ha=new WeakMap,v5),Gw=(E5=class extends Vm{constructor(t){super();le(this,Kr);le(this,ma);le(this,Eo);le(this,Ir);le(this,ba);le(this,Bt);le(this,vc);le(this,ya);J(this,ya,!1),J(this,vc,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,ba,t.client),J(this,Ir,N(this,ba).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,ma,Km(this.options)),this.state=t.state??N(this,ma),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Bt))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,vc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Km(this.options);r.data!==void 0&&(this.setState(qm(r.data,r.dataUpdatedAt)),J(this,ma,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Ir).remove(this)}setData(t,r){const n=xd(this.state.data,t,this.options);return Se(this,Kr,qn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Se(this,Kr,qn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Bt))==null?void 0:n.promise;return(s=N(this,Bt))==null||s.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ma))}isActive(){return this.observers.some(t=>wr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Mm(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Ir).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,Bt)&&(N(this,ya)?N(this,Bt).cancel({revert:!0}):N(this,Bt).cancelRetry()),this.scheduleGc()),N(this,Ir).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Kr,qn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,f,h,y,g,E,v,w,A;if(this.state.fetchStatus!=="idle"&&((c=N(this,Bt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Bt))return N(this,Bt).continueRetry(),N(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(D=>D.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(J(this,ya,!0),n.signal)})},a=()=>{const C=Hm(this.options,r),z=(()=>{const T={client:N(this,ba),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return J(this,ya,!1),this.options.persister?this.options.persister(C,z,this):C(z)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ba),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),J(this,Eo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Se(this,Kr,qn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),J(this,Bt,jm({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof Ed&&C.revert&&this.setState({...N(this,Eo),fetchStatus:"idle"}),n.abort()},onFail:(C,D)=>{Se(this,Kr,qn).call(this,{type:"failed",failureCount:C,error:D})},onPause:()=>{Se(this,Kr,qn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Kr,qn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,Bt).start();if(C===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(C),(h=(f=N(this,Ir).config).onSuccess)==null||h.call(f,C,this),(g=(y=N(this,Ir).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof Ed){if(C.silent)return N(this,Bt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Se(this,Kr,qn).call(this,{type:"error",error:C}),(v=(E=N(this,Ir).config).onError)==null||v.call(E,C,this),(A=(w=N(this,Ir).config).onSettled)==null||A.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ma=new WeakMap,Eo=new WeakMap,Ir=new WeakMap,ba=new WeakMap,Bt=new WeakMap,vc=new WeakMap,ya=new WeakMap,Kr=new WeakSet,qn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Wm(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...qm(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,Eo,t.manual?s:void 0),s;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Ir).notify({query:this,type:"updated",action:t})})},E5);function Wm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gm(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Km(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jw=(k5=class extends Aa{constructor(t,r){super();le(this,Ve);le(this,sr);le(this,Oe);le(this,Ec);le(this,qt);le(this,ga);le(this,ko);le(this,$n);le(this,xs);le(this,kc);le(this,Co);le(this,To);le(this,xa);le(this,wa);le(this,ws);le(this,Ao,new Set);this.options=r,J(this,sr,t),J(this,xs,null),J(this,$n,vd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Oe).addObserver(this),Ym(N(this,Oe),this.options)?Se(this,Ve,Ac).call(this):this.updateResult(),Se(this,Ve,Ih).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kd(N(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kd(N(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ve,Bh).call(this),Se(this,Ve,Fh).call(this),N(this,Oe).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,Oe);if(this.options=N(this,sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wr(this.options.enabled,N(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ve,Uh).call(this),N(this,Oe).setOptions(this.options),r._defaulted&&!Uc(this.options,r)&&N(this,sr).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Oe),observer:this});const s=this.hasListeners();s&&Zm(N(this,Oe),n,this.options,r)&&Se(this,Ve,Ac).call(this),this.updateResult(),s&&(N(this,Oe)!==n||wr(this.options.enabled,N(this,Oe))!==wr(r.enabled,N(this,Oe))||Zn(this.options.staleTime,N(this,Oe))!==Zn(r.staleTime,N(this,Oe)))&&Se(this,Ve,Ah).call(this);const a=Se(this,Ve,Sh).call(this);s&&(N(this,Oe)!==n||wr(this.options.enabled,N(this,Oe))!==wr(r.enabled,N(this,Oe))||a!==N(this,ws))&&Se(this,Ve,Ph).call(this,a)}getOptimisticResult(t){const r=N(this,sr).getQueryCache().build(N(this,sr),t),n=this.createResult(r,t);return Ww(this,n)&&(J(this,qt,n),J(this,ko,this.options),J(this,ga,N(this,Oe).state)),n}getCurrentResult(){return N(this,qt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,$n).status==="pending"&&N(this,$n).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,Ao).add(t)}getCurrentQuery(){return N(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,sr).defaultQueryOptions(t),n=N(this,sr).getQueryCache().build(N(this,sr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Se(this,Ve,Ac).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,qt)))}createResult(t,r){var b;const n=N(this,Oe),s=this.options,a=N(this,qt),o=N(this,ga),i=N(this,ko),l=t!==n?t.state:N(this,Ec),{state:u}=t;let d={...u},f=!1,h;if(r._optimisticResults){const x=this.hasListeners(),S=!x&&Ym(t,r),I=x&&Zm(t,n,r,s);(S||I)&&(d={...d,...Wm(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:E}=d;h=d.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&E==="pending"){let x;a!=null&&a.isPlaceholderData&&r.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,v=!0):x=typeof r.placeholderData=="function"?r.placeholderData((b=N(this,To))==null?void 0:b.state.data,N(this,To)):r.placeholderData,x!==void 0&&(E="success",h=xd(a==null?void 0:a.data,x,r),f=!0)}if(r.select&&h!==void 0&&!v)if(a&&h===(o==null?void 0:o.data)&&r.select===N(this,kc))h=N(this,Co);else try{J(this,kc,r.select),h=r.select(h),h=xd(a==null?void 0:a.data,h,r),J(this,Co,h),J(this,xs,null)}catch(x){J(this,xs,x)}N(this,xs)&&(y=N(this,xs),h=N(this,Co),g=Date.now(),E="error");const w=d.fetchStatus==="fetching",A=E==="pending",C=E==="error",D=A&&w,z=h!==void 0,m={status:E,fetchStatus:d.fetchStatus,isPending:A,isSuccess:E==="success",isError:C,isInitialLoading:D,isLoading:D,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!A,isLoadingError:C&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&z,isStale:Cd(t,r),refetch:this.refetch,promise:N(this,$n),isEnabled:wr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=F=>{m.status==="error"?F.reject(m.error):m.data!==void 0&&F.resolve(m.data)},S=()=>{const F=J(this,$n,m.promise=vd());x(F)},I=N(this,$n);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(m.status==="error"||m.data!==I.value)&&S();break;case"rejected":(m.status!=="error"||m.error!==I.reason)&&S();break}}return m}updateResult(){const t=N(this,qt),r=this.createResult(N(this,Oe),this.options);if(J(this,ga,N(this,Oe).state),J(this,ko,this.options),N(this,ga).data!==void 0&&J(this,To,N(this,Oe)),Uc(r,t))return;J(this,qt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,Ao).size)return!0;const o=new Set(a??N(this,Ao));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,qt)).some(i=>{const c=i;return N(this,qt)[c]!==t[c]&&o.has(c)})};Se(this,Ve,M5).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ve,Ih).call(this)}},sr=new WeakMap,Oe=new WeakMap,Ec=new WeakMap,qt=new WeakMap,ga=new WeakMap,ko=new WeakMap,$n=new WeakMap,xs=new WeakMap,kc=new WeakMap,Co=new WeakMap,To=new WeakMap,xa=new WeakMap,wa=new WeakMap,ws=new WeakMap,Ao=new WeakMap,Ve=new WeakSet,Ac=function(t){Se(this,Ve,Uh).call(this);let r=N(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Ah=function(){Se(this,Ve,Bh).call(this);const t=Zn(this.options.staleTime,N(this,Oe));if(Us||N(this,qt).isStale||!md(t))return;const n=Mm(N(this,qt).dataUpdatedAt,t)+1;J(this,xa,Fs.setTimeout(()=>{N(this,qt).isStale||this.updateResult()},n))},Sh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Oe)):this.options.refetchInterval)??!1},Ph=function(t){Se(this,Ve,Fh).call(this),J(this,ws,t),!(Us||wr(this.options.enabled,N(this,Oe))===!1||!md(N(this,ws))||N(this,ws)===0)&&J(this,wa,Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||wd.isFocused())&&Se(this,Ve,Ac).call(this)},N(this,ws)))},Ih=function(){Se(this,Ve,Ah).call(this),Se(this,Ve,Ph).call(this,Se(this,Ve,Sh).call(this))},Bh=function(){N(this,xa)&&(Fs.clearTimeout(N(this,xa)),J(this,xa,void 0))},Fh=function(){N(this,wa)&&(Fs.clearInterval(N(this,wa)),J(this,wa,void 0))},Uh=function(){const t=N(this,sr).getQueryCache().build(N(this,sr),this.options);if(t===N(this,Oe))return;const r=N(this,Oe);J(this,Oe,t),J(this,Ec,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},M5=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,qt))}),N(this,sr).getQueryCache().notify({query:N(this,Oe),type:"observerResultsUpdated"})})},k5);function Vw(e,t){return wr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ym(e,t){return Vw(e,t)||e.state.data!==void 0&&kd(e,t,t.refetchOnMount)}function kd(e,t,r){if(wr(t.enabled,e)!==!1&&Zn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Cd(e,t)}return!1}function Zm(e,t,r,n){return(e!==t||wr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Cd(e,r)}function Cd(e,t){return wr(t.enabled,e)!==!1&&e.isStaleByTime(Zn(t.staleTime,e))}function Ww(e,t){return!Uc(e.getCurrentResult(),t)}function Xm(e){return{onFetch:(t,r)=>{var u,d,f,h,y;const n=t.options,s=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const E=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=Hm(t.options,t.fetchOptions),w=async(A,C,D)=>{if(g)return Promise.reject();if(C==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:D?"backward":"forward",meta:t.options.meta};return E(S),S})(),m=await v(T),{maxPages:b}=t.options,x=D?Nw:Mw;return{pages:x(A.pages,m,b),pageParams:x(A.pageParams,C,b)}};if(s&&a.length){const A=s==="backward",C=A?qw:Qm,D={pages:a,pageParams:o},z=C(n,D);i=await w(D,z,A)}else{const A=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:Qm(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<A)}return i};t.options.persister?t.fetchFn=()=>{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Qm(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function qw(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Kw=(C5=class extends Vm{constructor(t){super();le(this,hn);le(this,Cc);le(this,fn);le(this,Kt);le(this,va);J(this,Cc,t.client),this.mutationId=t.mutationId,J(this,Kt,t.mutationCache),J(this,fn,[]),this.state=t.state||Jm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,fn).includes(t)||(N(this,fn).push(t),this.clearGcTimeout(),N(this,Kt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,fn,N(this,fn).filter(r=>r!==t)),this.scheduleGc(),N(this,Kt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,fn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Kt).remove(this))}continue(){var t;return((t=N(this,va))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,f,h,y,g,E,v,w,A,C,D,z,T,m,b;const r=()=>{Se(this,hn,Ts).call(this,{type:"continue"})},n={client:N(this,Cc),meta:this.options.meta,mutationKey:this.options.mutationKey};J(this,va,jm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,S)=>{Se(this,hn,Ts).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{Se(this,hn,Ts).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Kt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,va).canStart();try{if(s)r();else{Se(this,hn,Ts).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Kt).config).onMutate)==null?void 0:i.call(o,t,this,n));const S=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));S!==this.state.context&&Se(this,hn,Ts).call(this,{type:"pending",context:S,variables:t,isPaused:a})}const x=await N(this,va).start();return await((d=(u=N(this,Kt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,x,t,this.state.context,n)),await((g=(y=N(this,Kt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,x,null,t,this.state.context,n)),Se(this,hn,Ts).call(this,{type:"success",data:x}),x}catch(x){try{throw await((A=(w=N(this,Kt).config).onError)==null?void 0:A.call(w,x,t,this.state.context,this,n)),await((D=(C=this.options).onError)==null?void 0:D.call(C,x,t,this.state.context,n)),await((T=(z=N(this,Kt).config).onSettled)==null?void 0:T.call(z,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,void 0,x,t,this.state.context,n)),x}finally{Se(this,hn,Ts).call(this,{type:"error",error:x})}}finally{N(this,Kt).runNext(this)}}},Cc=new WeakMap,fn=new WeakMap,Kt=new WeakMap,va=new WeakMap,hn=new WeakSet,Ts=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),kt.batch(()=>{N(this,fn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Kt).notify({mutation:this,type:"updated",action:t})})},C5);function Jm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yw=(T5=class extends Aa{constructor(t={}){super();le(this,Gn);le(this,Yr);le(this,Tc);this.config=t,J(this,Gn,new Set),J(this,Yr,new Map),J(this,Tc,0)}build(t,r,n){const s=new Kw({client:t,mutationCache:this,mutationId:++Yu(this,Tc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,Gn).add(t);const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r);n?n.push(t):N(this,Yr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Gn).delete(t)){const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&N(this,Yr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=_c(t);if(typeof r=="string"){const s=(n=N(this,Yr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{N(this,Gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Gn).clear(),N(this,Yr).clear()})}getAll(){return Array.from(N(this,Gn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Lm(r,n))}findAll(t={}){return this.getAll().filter(r=>Lm(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jt))))}},Gn=new WeakMap,Yr=new WeakMap,Tc=new WeakMap,T5);function _c(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Zw=(A5=class extends Aa{constructor(t,r){super();le(this,Wn);le(this,jn);le(this,vs);le(this,ar);le(this,Vn);J(this,jn,t),this.setOptions(r),this.bindMethods(),Se(this,Wn,Zu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,jn).defaultMutationOptions(t),Uc(this.options,r)||N(this,jn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,ar),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Os(r.mutationKey)!==Os(this.options.mutationKey)?this.reset():((n=N(this,ar))==null?void 0:n.state.status)==="pending"&&N(this,ar).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,ar))==null||t.removeObserver(this)}onMutationUpdate(t){Se(this,Wn,Zu).call(this),Se(this,Wn,Oh).call(this,t)}getCurrentResult(){return N(this,vs)}reset(){var t;(t=N(this,ar))==null||t.removeObserver(this),J(this,ar,void 0),Se(this,Wn,Zu).call(this),Se(this,Wn,Oh).call(this)}mutate(t,r){var n;return J(this,Vn,r),(n=N(this,ar))==null||n.removeObserver(this),J(this,ar,N(this,jn).getMutationCache().build(N(this,jn),this.options)),N(this,ar).addObserver(this),N(this,ar).execute(t)}},jn=new WeakMap,vs=new WeakMap,ar=new WeakMap,Vn=new WeakMap,Wn=new WeakSet,Zu=function(){var r;const t=((r=N(this,ar))==null?void 0:r.state)??Jm();J(this,vs,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Oh=function(t){kt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Vn)&&this.hasListeners()){const u=N(this,vs).variables,d=N(this,vs).context,f={client:N(this,jn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Vn)).onSuccess)==null||n.call(r,t.data,u,d,f),(a=(s=N(this,Vn)).onSettled)==null||a.call(s,t.data,null,u,d,f)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Vn)).onError)==null||i.call(o,t.error,u,d,f),(l=(c=N(this,Vn)).onSettled)==null||l.call(c,void 0,t.error,u,d,f))}this.listeners.forEach(u=>{u(N(this,vs))})})},A5),Xw=(S5=class extends Aa{constructor(t={}){super();le(this,mn);this.config=t,J(this,mn,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??bd(s,r);let o=this.get(a);return o||(o=new Gw({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,mn).has(t.queryHash)||(N(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,mn).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,mn).get(t)}getAll(){return[...N(this,mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Nm(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,S5),Qw=(P5=class{constructor(e={}){le(this,ft);le(this,Es);le(this,ks);le(this,So);le(this,Po);le(this,Cs);le(this,Io);le(this,Bo);J(this,ft,e.queryCache||new Xw),J(this,Es,e.mutationCache||new Yw),J(this,ks,e.defaultOptions||{}),J(this,So,new Map),J(this,Po,new Map),J(this,Cs,0)}mount(){Yu(this,Cs)._++,N(this,Cs)===1&&(J(this,Io,wd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onFocus())})),J(this,Bo,Dc.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onOnline())})))}unmount(){var e,t;Yu(this,Cs)._--,N(this,Cs)===0&&((e=N(this,Io))==null||e.call(this),J(this,Io,void 0),(t=N(this,Bo))==null||t.call(this),J(this,Bo,void 0))}isFetching(e){return N(this,ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Es).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ft).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Zn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ft).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=N(this,ft).get(n.queryHash),a=s==null?void 0:s.state.data,o=Ow(t,a);if(o!==void 0)return N(this,ft).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>N(this,ft).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ft);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ft);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>N(this,ft).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e,t={}){return kt.batch(()=>(N(this,ft).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=kt.batch(()=>N(this,ft).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(jt)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ft).build(this,t);return r.isStaleByTime(Zn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=Xm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}ensureInfiniteQueryData(e){return e.behavior=Xm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dc.isOnline()?N(this,Es).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ft)}getMutationCache(){return N(this,Es)}getDefaultOptions(){return N(this,ks)}setDefaultOptions(e){J(this,ks,e)}setQueryDefaults(e,t){N(this,So).set(Os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,So).values()],r={};return t.forEach(n=>{Oo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,Po).set(Os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Po).values()],r={};return t.forEach(n=>{Oo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,ks).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Oc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,ks).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ft).clear(),N(this,Es).clear()}},ft=new WeakMap,Es=new WeakMap,ks=new WeakMap,So=new WeakMap,Po=new WeakMap,Cs=new WeakMap,Io=new WeakMap,Bo=new WeakMap,P5),e1=xt.createContext(void 0),Td=e=>{const t=xt.useContext(e1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jw=({client:e,children:t})=>(xt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),B.jsx(e1.Provider,{value:e,children:t})),t1=xt.createContext(!1),e3=()=>xt.useContext(t1);t1.Provider;function t3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var r3=xt.createContext(t3()),n3=()=>xt.useContext(r3),s3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},a3=e=>{xt.useEffect(()=>{e.clearReset()},[e])},o3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||$m(r,[e.error,n])),i3=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},c3=(e,t)=>e.isLoading&&e.isFetching&&!t,l3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,r1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function u3(e,t,r){var d,f,h,y,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=e3(),s=n3(),a=Td(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",i3(o),s3(o,s),a3(s);const i=!a.getQueryCache().get(o.queryHash),[c]=xt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(xt.useSyncExternalStore(xt.useCallback(E=>{const v=u?c.subscribe(kt.batchCalls(E)):jt;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),xt.useEffect(()=>{c.setOptions(o)},[o,c]),l3(o,l))throw r1(o,c,s);if(o3({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,l),o.experimental_prefetchInRender&&!Us&&c3(l,n)){const E=i?r1(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;E==null||E.catch(jt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function d3(e,t){return u3(e,jw)}function Zr(e,t){const r=Td(),[n]=xt.useState(()=>new Zw(r,e));xt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=xt.useSyncExternalStore(xt.useCallback(o=>n.subscribe(kt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=xt.useCallback((o,i)=>{n.mutate(o,i).catch(jt)},[n]);if(s.error&&$m(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const p3=M.createContext(null),Ad={didCatch:!1,error:null};class f3 extends M.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ad}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(Ad)}}componentDidCatch(t,r){var n,s;(n=(s=this.props).onError)===null||n===void 0||n.call(s,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:s}=this.props;if(n&&r.error!==null&&h3(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(Ad)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")i=r(c);else if(n)i=M.createElement(n,c);else if(s!==void 0)i=s;else throw o}return M.createElement(p3.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function h3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const n1=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,f))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,s,i);return i},m3=(e=>e?n1(e):n1),b3=e=>e;function y3(e,t=b3){const r=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(r),r}const s1=e=>{const t=m3(e),r=n=>y3(t,n);return Object.assign(r,t),r},g3=(e=>e?s1(e):s1),a1={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},te=g3((e,t)=>({state:a1,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...a1,currentTime:Date.now(),swapExecution:t().state.swapExecution,isMarketOrder:t().state.isMarketOrder}})}}));(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".orbs_OrbsLogo{object-fit:contain;display:inline}.orbs_PoweredBy{border-radius:8px;margin-left:auto;margin-right:auto}.orbs_PoweredBy a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}.orbs_PoweredBy span{font-size:14px}.orbs_PoweredBy .orbs_OrbsLogo{margin-left:6px;margin-right:6px;width:18px;height:18px}.orbs_Text{margin:0;padding:0}.orbs_Spinner{width:var(--size, 38px);height:var(--size, 38px);border:var(--border-width, 3px) solid var(--border-color, white);border-bottom-color:var(--bottom-border-color, rgba(255, 255, 255, .2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:orbs_rotation 1s linear infinite}@keyframes orbs_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.orbs_TradeStepLayout{--layout-min-height: 220px;--layout-width: 100%;--layout-display: flex;--layout-direction: column;--layout-align: center;--layout-overflow: visible;display:var(--layout-display);flex-direction:var(--layout-direction);align-items:var(--layout-align);width:var(--layout-width);min-height:var(--layout-min-height);overflow:var(--layout-overflow)}.orbs_TradeStepLayoutBody{--body-gap: 20px;--body-margin-top: 30px;--body-width: 100%;--body-display: flex;--body-direction: column;--body-align: center;--body-overflow: visible;gap:var(--body-gap);align-items:var(--body-align);display:var(--body-display);flex-direction:var(--body-direction);width:var(--body-width);margin-top:var(--body-margin-top);overflow:var(--body-overflow)}.orbs_TradeStepLayoutHeader{--header-gap: 30px;--header-display: flex;--header-direction: column;--header-align: center;--header-justify: center;--header-overflow: visible;display:var(--header-display);flex-direction:var(--header-direction);align-items:var(--header-align);justify-content:var(--header-justify);gap:var(--header-gap);overflow:var(--header-overflow)}.orbs_TradeStepLayoutTitle{--title-font-size: 18px;--title-font-weight: 500;--title-line-height: normal;--title-color: inherit;--title-text-align: center;--title-margin: 0;--title-padding: 0;font-size:var(--title-font-size);font-weight:var(--title-font-weight);line-height:var(--title-line-height);color:var(--title-color);text-align:var(--title-text-align);margin:var(--title-margin);padding:var(--title-padding)}.orbs_StepIndicator{--indicator-display: flex;--indicator-align: center;--indicator-justify: flex-start;--indicator-height: 7px;--indicator-width: 120px;--indicator-border-radius: 999px;--indicator-bg-color: white;--indicator-margin-bottom: 20px;--indicator-position: relative;--indicator-overflow: hidden;--indicator-border: none;--indicator-box-shadow: none;display:var(--indicator-display);align-items:var(--indicator-align);justify-content:var(--indicator-justify);height:var(--indicator-height);width:var(--indicator-width);border-radius:var(--indicator-border-radius);overflow:var(--indicator-overflow);background-color:var(--indicator-bg-color);margin-bottom:var(--indicator-margin-bottom);position:var(--indicator-position);border:var(--indicator-border);box-shadow:var(--indicator-box-shadow)}.orbs_StepIndicatorLine{--line-height: 100%;--line-bg-color: black;--line-position: absolute;--line-top: 0;--line-left: 0;--line-right: 0;--line-bottom: 0;--line-transition: all .3s ease;--line-border-radius: inherit;--line-box-shadow: none;height:var(--line-height);background-color:var(--line-bg-color);position:var(--line-position);top:var(--line-top);left:var(--line-left);right:var(--line-right);bottom:var(--line-bottom);transition:var(--line-transition);border-radius:var(--line-border-radius);box-shadow:var(--line-box-shadow)}.orbs_TradeStepLayoutFooter{--footer-display: flex;--footer-align: center;--footer-justify: center;--footer-direction: column;--footer-margin-top: auto;--footer-padding-top: 30px;--footer-width: 100%;--footer-overflow: visible;--footer-border-top: none;display:var(--footer-display);align-items:var(--footer-align);justify-content:var(--footer-justify);flex-direction:var(--footer-direction);margin-top:var(--footer-margin-top);padding-top:var(--footer-padding-top);width:var(--footer-width);overflow:var(--footer-overflow);border-top:var(--footer-border-top)}.orbs_TradeStepLayoutFooter p{--footer-text-font-size: 15px;--footer-text-line-height: normal;--footer-text-color: inherit;--footer-text-margin: 0;--footer-text-padding: 0;font-size:var(--footer-text-font-size);line-height:var(--footer-text-line-height);color:var(--footer-text-color);margin:var(--footer-text-margin);padding:var(--footer-text-padding)}.orbs_TradeStepLayoutFooterLink{--link-color: inherit;--link-text-decoration: none;--link-font-size: 15px;--link-text-align: center;--link-margin: auto;--link-outline: none;--link-line-height: normal;--link-padding: 0;--link-transition: color .2s ease;--link-hover-color: inherit;--link-hover-text-decoration: underline;color:var(--link-color);text-decoration:var(--link-text-decoration);font-size:var(--link-font-size);text-align:var(--link-text-align);margin-left:var(--link-margin);margin-right:var(--link-margin);outline:var(--link-outline);line-height:var(--link-line-height);padding:var(--link-padding);transition:var(--link-transition)}.orbs_TradeStepLayoutFooterLink:hover{color:var(--link-hover-color);text-decoration:var(--link-hover-text-decoration)}.orbs_TradeStepLayoutSuccessIcon{--success-icon-display: flex;--success-icon-justify: center;--success-icon-align: center;--success-icon-width: 60px;--success-icon-height: 60px;--success-icon-border-radius: 50%;--success-icon-overflow: visible;--success-icon-bg-color: transparent;--success-icon-border: none;--success-icon-box-shadow: none;display:var(--success-icon-display);justify-content:var(--success-icon-justify);align-items:var(--success-icon-align);width:var(--success-icon-width);height:var(--success-icon-height);border-radius:var(--success-icon-border-radius);overflow:var(--success-icon-overflow);background-color:var(--success-icon-bg-color);border:var(--success-icon-border);box-shadow:var(--success-icon-box-shadow)}.orbs_TradeStepLayoutErrorIcon{--error-icon-width: 80px;--error-icon-height: 80px;--error-icon-display: flex;--error-icon-justify: center;--error-icon-align: center;--error-icon-overflow: visible;--error-icon-bg-color: transparent;--error-icon-border: none;--error-icon-box-shadow: none;width:var(--error-icon-width);height:var(--error-icon-height);display:var(--error-icon-display);justify-content:var(--error-icon-justify);align-items:var(--error-icon-align);overflow:var(--error-icon-overflow);background-color:var(--error-icon-bg-color);border:var(--error-icon-border);box-shadow:var(--error-icon-box-shadow)}.orbs_FailedContentMsg{font-size:22px;font-weight:500}.orbs_TradePreview{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.orbs_TradePreviewToken{display:flex;align-items:center;gap:6px;max-width:calc(50% - 30px)}.orbs_TradePreviewToken p{--token-font-size: 15px;--token-white-space: nowrap;--token-overflow: hidden;--token-text-overflow: ellipsis;--token-flex: 1;--token-margin: 0;--token-padding: 0;font-size:var(--token-font-size);white-space:var(--token-white-space);overflow:var(--token-overflow);text-overflow:var(--token-text-overflow);flex:var(--token-flex);margin:var(--token-margin)}.orbs_TradepPreviewIcon{width:22px;height:22px}.orbs_TradepPreviewLogo{width:24px;height:24px;border-radius:50%;overflow:hidden}.orbs_FlexRow{display:flex;flex-direction:row}.orbs_FlexColumn{display:flex;flex-direction:column}@keyframes orbs_skeletonAnimation{0%{opacity:.2}to{opacity:.4}}.orbs_SkeletonLoader{animation:orbs_skeletonAnimation 1s linear infinite alternate;background-color:#fff}.orbs_Main-wrapper{width:100%}.orbs_Main{width:100%;display:flex;flex-direction:column;gap:28px}.orbs_MainToken{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:8px}.orbs_MainTokenLeft{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orbs_MainTokenUsd{display:flex;align-items:center;gap:5px}.orbs_MainTokenUsd small{font-size:12px;opacity:.6}.orbs_MainContentLoader{width:100%;display:flex;gap:15px;align-items:center;margin-top:20px}.orbs_MainContentRectengularLoader{flex:1;height:20px;max-width:250px;border-radius:20px}.orbs_MainContentCircleLoader{width:30px;height:30px;border-radius:50%}.orbs_MainTokenLogo{--width: 40px;--height: 40px;width:var(--width);height:var(--height)}.orbs_MainTokenLogo img{width:100%;height:100%;object-fit:cover}.orbs_SwapFlow{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.orbs_SwapFlow *{box-sizing:border-box}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Ne=e=>`orbs_${e}`;function Do({children:e,className:t=""}){return B.jsx("p",{className:`${t} ${Ne("Text")}`,children:e})}const o1=M.createContext({});function x3({children:e,...t}){return B.jsx(o1.Provider,{value:t,children:e})}const Xr=()=>M.useContext(o1);var ht=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(ht||{});const w3=({className:e="",size:t=38,borderWidth:r=3,borderColor:n="white",bottomBorderColor:s="rgba(255, 255, 255, 0.2)"})=>{const a={"--size":`${t}px`,"--border-width":`${r}px`,"--border-color":n,"--bottom-border-color":s};return B.jsx("div",{className:`${Ne("Spinner")} ${e}`,style:a})};function Mc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return B.jsxs("div",{className:`${Ne("TradeStepLayout")} ${e}`,children:[B.jsxs("div",{className:Ne("TradeStepLayoutHeader"),children:[B.jsx(T3,{}),s&&B.jsx(Do,{className:Ne("TradeStepLayoutTitle"),children:s})]}),t&&B.jsx("div",{className:Ne("TradeStepLayoutBody"),children:t}),B.jsx(v3,{link:r,text:n}),a]})}const v3=({link:e,text:t})=>{const{swapStatus:r}=Xr();return!e&&!t?null:B.jsxs("div",{className:Ne("TradeStepLayoutFooter"),children:[B.jsx(S3,{}),e?B.jsx(E3,{link:e,text:t}):r===ht.FAILED?void 0:B.jsx(Do,{children:t})]})},E3=({link:e,text:t})=>B.jsx("a",{target:"_blank",className:Ne("TradeStepLayoutFooterLink"),href:e,children:t});function k3(){const{components:e}=Xr();return e.SuccessIcon?e.SuccessIcon:B.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Ne("TradeStepLayoutSuccessIcon"),children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#00C853"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#00C853",d:"M5 8l2 2 4-4"})]})}function C3(){const{components:e}=Xr();return e.FailedIcon?e.FailedIcon:B.jsxs("svg",{className:Ne("TradeStepLayoutErrorIcon"),viewBox:"0 0 16 16",fill:"none",children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#FF3D00"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#FF3D00",d:"M8 4v5M8 11h.01"})]})}const T3=()=>{const{swapStatus:e}=Xr();return e===ht.SUCCESS?B.jsx(k3,{}):e===ht.FAILED?B.jsx(C3,{}):B.jsx(A3,{})},A3=()=>{const{components:e}=Xr();return e.Loader?e.Loader:B.jsx(w3,{size:60,borderWidth:5,className:Ne("TradeStepLayoutSpinner")})},S3=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=Xr();return r!==ht.LOADING||e===1?null:B.jsx("div",{className:Ne("StepIndicator"),children:B.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Ne("StepIndicatorLine")})})},P3=({error:e,footerLink:t,footerText:r})=>B.jsx(Mc,{footerLink:t,footerText:r,body:e||B.jsx("p",{className:Ne("FailedContentMsg"),children:"Something went wrong"}),className:Ne("FailedContent")});function I3(){return B.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Ne("TradepPreviewIcon"),children:B.jsx("path",{fillRule:"evenodd",d:"M4 8a.5.5 0 01.5-.5h5.793L8.146 5.354a.5.5 0 11.708-.708l3 3a.5.5 0 010 .708l-3 3a.5.5 0 01-.708-.708L10.293 8.5H4.5A.5.5 0 014 8z"})})}const i1=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=Xr();return B.jsxs("div",{className:Ne("TradePreview"),children:[B.jsx(c1,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&B.jsxs(B.Fragment,{children:[B.jsx(I3,{}),B.jsx(c1,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},c1=({token:e,amount:t,Logo:r})=>B.jsxs("div",{className:Ne("TradePreviewToken"),children:[r||B.jsx("img",{src:e==null?void 0:e.logoUrl,className:Ne("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),B.jsxs(Do,{children:[t," ",e==null?void 0:e.symbol]})]});function B3({title:e,footerLink:t,footerText:r,hideTokens:n}){return B.jsx(Mc,{title:e,className:Ne("Success"),body:!n&&B.jsx(i1,{}),footerLink:t,footerText:r})}const l1=({$gap:e=10,$alignItems:t="flex-start",children:r,className:n="",customStyles:s={}})=>{const a={gap:`${e}px`,alignItems:t,width:"100%",...s};return B.jsx("div",{className:`${Ne("FlexColumn")} ${n}`,style:a,children:r})};function u1({styles:e={},className:t=""}){return B.jsx("div",{style:e,className:`${Ne("SkeletonLoader")} ${t}`})}const F3=()=>B.jsxs("div",{className:`${Ne("MainContentLoader")}`,children:[B.jsx(u1,{className:`${Ne("MainContentCircleLoader")}`}),B.jsx(u1,{className:`${Ne("MainContentRectengularLoader")}`})]}),U3=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=Xr(),d=B.jsx(p1,{fromTitle:e,inUsd:r,inToken:i,toTitle:t,outUsd:n,outToken:c,inAmount:o,outAmount:a,SrcTokenLogo:l.SrcTokenLogo,DstTokenLogo:l.DstTokenLogo});return s?u?B.jsx(O3,{}):B.jsxs(l1,{children:[d,B.jsx(F3,{})]}):B.jsx(l1,{children:d})},d1=({amount:e,token:t,usd:r,title:n,Logo:s})=>B.jsxs("div",{className:`${Ne("MainToken")}`,children:[B.jsxs("div",{className:`${Ne("MainTokenLeft")}`,children:[B.jsx(Do,{className:`${Ne("MainTokenTitle")}`,children:n}),B.jsx(Do,{className:` ${Ne("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&B.jsx("div",{className:` ${Ne("MainTokenUsd")}`,children:r})]}),s||B.jsx("div",{className:` ${Ne("MainTokenLogo")}`,children:t!=null&&t.logoUrl?B.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function O3(){const{currentStep:e}=Xr();return e?B.jsx(Mc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:B.jsx(i1,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const p1=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>B.jsxs("div",{className:`${Ne("Main")}`,children:[B.jsx(d1,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),B.jsx(d1,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),Xn=e=>B.jsx(x3,{...e,children:B.jsx(D3,{})}),D3=()=>{const{swapStatus:e,components:t,className:r}=Xr();return B.jsx("div",{className:`${Ne("SwapFlow")} ${r}`,children:e===ht.SUCCESS?t==null?void 0:t.Success:e===ht.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};Xn.Success=B3,Xn.Failed=P3,Xn.Main=U3,Xn.StepLayout=Mc;var Ds=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ds||{});const _3="1.2.3";let Zt=class Dh extends Error{constructor(t,r={}){var o;const n=r.cause instanceof Dh?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,s=r.cause instanceof Dh&&r.cause.docsPath||r.docsPath,a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${_3}`].join(`
64
+ `,extractResults:d=>{var f;return(((f=d.data)==null?void 0:f.orderFilleds)||[]).map(h=>({...h,timestamp:new Date(h.timestamp).getTime()}))}})};class Tw extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const Aw=async({chainId:e,signal:t,page:r,limit:n,filters:s})=>{try{const a=await Ew({chainId:e,signal:t,page:r,limit:n,filters:s}),[o,i]=await Promise.all([Cw({chainId:e,orders:a,signal:t}),kw({chainId:e,orders:a,signal:t})]);return a.map(l=>{const u=o==null?void 0:o.filter(d=>d.TWAP_id===Number(l.Contract_id)&&Ps(d.exchange,l.exchange)&&Ps(d.twapAddress,l.twapAddress));return ww(l,e,u,Sw(l,u||[],i))}).sort((l,u)=>u.createdAt-l.createdAt)}catch{return[]}},Sw=(e,t,r)=>{var i;const n=(i=r==null?void 0:r.find(c=>c.twapId===e.Contract_id.toString()&&Ps(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Um(t).reduce((c,l)=>c.plus(l.inAmount),new j(0)).toFixed(),o=Dm(e.ask_srcAmount,a);return Pw(o,e.ask_deadline*1e3,n)},Dm=(e,t)=>{if(!t||!e)return 0;const r=j(t).dividedBy(e).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Pw=(e,t,r)=>e===100?ct.Completed:r==="CANCELED"?ct.Canceled:r==="COMPLETED"?ct.Completed:t>Date.now()?ct.Open:ct.Expired,_m=async({signal:e,page:t,chainId:r,limit:n,config:s,account:a})=>(await Promise.all([s?Aw({chainId:r,signal:e,page:t,limit:n,filters:{accounts:[a],configs:s.twapConfig?[s.twapConfig]:[]}}):Promise.resolve([]),gw({chainId:r,signal:e,account:a,exchange:s==null?void 0:s.adapter})]).then(([c,l])=>[...c,...l])).sort((c,l)=>l.createdAt-c.createdAt),Iw={version:"0.0.70"};var Aa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fw=(g5=class{constructor(){le(this,pn,Bw);le(this,pa,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,pa)&&e!==N(this,pn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,pn),provider:e}),J(this,pn,e),process.env.NODE_ENV!=="production"&&J(this,pa,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&J(this,pa,!0),N(this,pn).setTimeout(e,t)}clearTimeout(e){N(this,pn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&J(this,pa,!0),N(this,pn).setInterval(e,t)}clearInterval(e){N(this,pn).clearInterval(e)}},pn=new WeakMap,pa=new WeakMap,g5),Fs=new Fw;function Uw(e){setTimeout(e,0)}var Us=typeof window>"u"||"Deno"in globalThis;function jt(){}function Ow(e,t){return typeof e=="function"?e(t):e}function md(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zn(e,t){return typeof e=="function"?e(t):e}function wr(e,t){return typeof e=="function"?e(t):e}function Nm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==bd(o,t.options))return!1}else if(!Oo(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function Lm(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Os(t.options.mutationKey)!==Os(a))return!1}else if(!Oo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function bd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Os)(e)}function Os(e){return JSON.stringify(e,(t,r)=>gd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Oo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Oo(e[r],t[r])):!1}var Dw=Object.prototype.hasOwnProperty;function yd(e,t){if(e===t)return e;const r=zm(e)&&zm(t);if(!r&&!(gd(e)&&gd(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,i=r?new Array(o):{};let c=0;for(let l=0;l<o;l++){const u=r?l:a[l],d=e[u],f=t[u];if(d===f){i[u]=d,(r?l<s:Dw.call(e,u))&&c++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){i[u]=f;continue}const h=yd(d,f);i[u]=h,h===d&&c++}return s===o&&c===s?e:i}function Uc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function zm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gd(e){if(!Rm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Rm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Rm(e){return Object.prototype.toString.call(e)==="[object Object]"}function _w(e){return new Promise(t=>{Fs.setTimeout(t,e)})}function xd(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return yd(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return yd(e,t)}return t}function Mw(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Nw(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Oc=Symbol();function Hm(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Oc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Oc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $m(e,t){return typeof e=="function"?e(...t):!!e}var Lw=(x5=class extends Aa{constructor(){super();le(this,fa);le(this,ys);le(this,xo);J(this,xo,t=>{if(!Us&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,ys)||this.setEventListener(N(this,xo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,ys))==null||t.call(this),J(this,ys,void 0))}setEventListener(t){var r;J(this,xo,t),(r=N(this,ys))==null||r.call(this),J(this,ys,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,fa)!==t&&(J(this,fa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,fa)=="boolean"?N(this,fa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fa=new WeakMap,ys=new WeakMap,xo=new WeakMap,x5),wd=new Lw;function vd(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var zw=Uw;function Rw(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=zw;const a=i=>{t?e.push(i):s(()=>{r(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{r(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{r=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}var kt=Rw(),Hw=(w5=class extends Aa{constructor(){super();le(this,wo,!0);le(this,gs);le(this,vo);J(this,vo,t=>{if(!Us&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,gs)||this.setEventListener(N(this,vo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,gs))==null||t.call(this),J(this,gs,void 0))}setEventListener(t){var r;J(this,vo,t),(r=N(this,gs))==null||r.call(this),J(this,gs,t(this.setOnline.bind(this)))}setOnline(t){N(this,wo)!==t&&(J(this,wo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,wo)}},wo=new WeakMap,gs=new WeakMap,vo=new WeakMap,w5),Dc=new Hw;function $w(e){return Math.min(1e3*2**e,3e4)}function Gm(e){return(e??"online")==="online"?Dc.isOnline():!0}var Ed=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jm(e){let t=!1,r=0,n;const s=vd(),a=()=>s.status!=="pending",o=g=>{var E;if(!a()){const v=new Ed(g);f(v),(E=e.onCancel)==null||E.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>wd.isFocused()&&(e.networkMode==="always"||Dc.isOnline())&&e.canRun(),u=()=>Gm(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},f=g=>{a()||(n==null||n(),s.reject(g))},h=()=>new Promise(g=>{var E;n=v=>{(a()||l())&&g(v)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const E=r===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var z;if(a())return;const w=e.retry??(Us?0:3),A=e.retryDelay??$w,C=typeof A=="function"?A(r,v):A,D=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!D){f(v);return}r++,(z=e.onFail)==null||z.call(e,r,v),_w(C).then(()=>l()?void 0:h()).then(()=>{t?f(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():h().then(y),s)}}var Vm=(v5=class{constructor(){le(this,ha)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),md(this.gcTime)&&J(this,ha,Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Us?1/0:300*1e3))}clearGcTimeout(){N(this,ha)&&(Fs.clearTimeout(N(this,ha)),J(this,ha,void 0))}},ha=new WeakMap,v5),Gw=(E5=class extends Vm{constructor(t){super();le(this,Kr);le(this,ma);le(this,Eo);le(this,Ir);le(this,ba);le(this,Bt);le(this,vc);le(this,ya);J(this,ya,!1),J(this,vc,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,ba,t.client),J(this,Ir,N(this,ba).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,ma,Km(this.options)),this.state=t.state??N(this,ma),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Bt))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,vc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Km(this.options);r.data!==void 0&&(this.setState(qm(r.data,r.dataUpdatedAt)),J(this,ma,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Ir).remove(this)}setData(t,r){const n=xd(this.state.data,t,this.options);return Se(this,Kr,qn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Se(this,Kr,qn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Bt))==null?void 0:n.promise;return(s=N(this,Bt))==null||s.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ma))}isActive(){return this.observers.some(t=>wr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Mm(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Ir).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,Bt)&&(N(this,ya)?N(this,Bt).cancel({revert:!0}):N(this,Bt).cancelRetry()),this.scheduleGc()),N(this,Ir).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Kr,qn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,f,h,y,g,E,v,w,A;if(this.state.fetchStatus!=="idle"&&((c=N(this,Bt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Bt))return N(this,Bt).continueRetry(),N(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(D=>D.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(J(this,ya,!0),n.signal)})},a=()=>{const C=Hm(this.options,r),z=(()=>{const T={client:N(this,ba),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return J(this,ya,!1),this.options.persister?this.options.persister(C,z,this):C(z)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ba),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),J(this,Eo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Se(this,Kr,qn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),J(this,Bt,jm({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof Ed&&C.revert&&this.setState({...N(this,Eo),fetchStatus:"idle"}),n.abort()},onFail:(C,D)=>{Se(this,Kr,qn).call(this,{type:"failed",failureCount:C,error:D})},onPause:()=>{Se(this,Kr,qn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Kr,qn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,Bt).start();if(C===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(C),(h=(f=N(this,Ir).config).onSuccess)==null||h.call(f,C,this),(g=(y=N(this,Ir).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof Ed){if(C.silent)return N(this,Bt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Se(this,Kr,qn).call(this,{type:"error",error:C}),(v=(E=N(this,Ir).config).onError)==null||v.call(E,C,this),(A=(w=N(this,Ir).config).onSettled)==null||A.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ma=new WeakMap,Eo=new WeakMap,Ir=new WeakMap,ba=new WeakMap,Bt=new WeakMap,vc=new WeakMap,ya=new WeakMap,Kr=new WeakSet,qn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Wm(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...qm(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,Eo,t.manual?s:void 0),s;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Ir).notify({query:this,type:"updated",action:t})})},E5);function Wm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gm(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Km(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jw=(k5=class extends Aa{constructor(t,r){super();le(this,Ve);le(this,sr);le(this,Oe);le(this,Ec);le(this,qt);le(this,ga);le(this,ko);le(this,$n);le(this,xs);le(this,kc);le(this,Co);le(this,To);le(this,xa);le(this,wa);le(this,ws);le(this,Ao,new Set);this.options=r,J(this,sr,t),J(this,xs,null),J(this,$n,vd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Oe).addObserver(this),Ym(N(this,Oe),this.options)?Se(this,Ve,Ac).call(this):this.updateResult(),Se(this,Ve,Ih).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kd(N(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kd(N(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ve,Bh).call(this),Se(this,Ve,Fh).call(this),N(this,Oe).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,Oe);if(this.options=N(this,sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wr(this.options.enabled,N(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ve,Uh).call(this),N(this,Oe).setOptions(this.options),r._defaulted&&!Uc(this.options,r)&&N(this,sr).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Oe),observer:this});const s=this.hasListeners();s&&Zm(N(this,Oe),n,this.options,r)&&Se(this,Ve,Ac).call(this),this.updateResult(),s&&(N(this,Oe)!==n||wr(this.options.enabled,N(this,Oe))!==wr(r.enabled,N(this,Oe))||Zn(this.options.staleTime,N(this,Oe))!==Zn(r.staleTime,N(this,Oe)))&&Se(this,Ve,Ah).call(this);const a=Se(this,Ve,Sh).call(this);s&&(N(this,Oe)!==n||wr(this.options.enabled,N(this,Oe))!==wr(r.enabled,N(this,Oe))||a!==N(this,ws))&&Se(this,Ve,Ph).call(this,a)}getOptimisticResult(t){const r=N(this,sr).getQueryCache().build(N(this,sr),t),n=this.createResult(r,t);return Ww(this,n)&&(J(this,qt,n),J(this,ko,this.options),J(this,ga,N(this,Oe).state)),n}getCurrentResult(){return N(this,qt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,$n).status==="pending"&&N(this,$n).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,Ao).add(t)}getCurrentQuery(){return N(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,sr).defaultQueryOptions(t),n=N(this,sr).getQueryCache().build(N(this,sr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Se(this,Ve,Ac).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,qt)))}createResult(t,r){var b;const n=N(this,Oe),s=this.options,a=N(this,qt),o=N(this,ga),i=N(this,ko),l=t!==n?t.state:N(this,Ec),{state:u}=t;let d={...u},f=!1,h;if(r._optimisticResults){const x=this.hasListeners(),S=!x&&Ym(t,r),I=x&&Zm(t,n,r,s);(S||I)&&(d={...d,...Wm(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:E}=d;h=d.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&E==="pending"){let x;a!=null&&a.isPlaceholderData&&r.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,v=!0):x=typeof r.placeholderData=="function"?r.placeholderData((b=N(this,To))==null?void 0:b.state.data,N(this,To)):r.placeholderData,x!==void 0&&(E="success",h=xd(a==null?void 0:a.data,x,r),f=!0)}if(r.select&&h!==void 0&&!v)if(a&&h===(o==null?void 0:o.data)&&r.select===N(this,kc))h=N(this,Co);else try{J(this,kc,r.select),h=r.select(h),h=xd(a==null?void 0:a.data,h,r),J(this,Co,h),J(this,xs,null)}catch(x){J(this,xs,x)}N(this,xs)&&(y=N(this,xs),h=N(this,Co),g=Date.now(),E="error");const w=d.fetchStatus==="fetching",A=E==="pending",C=E==="error",D=A&&w,z=h!==void 0,m={status:E,fetchStatus:d.fetchStatus,isPending:A,isSuccess:E==="success",isError:C,isInitialLoading:D,isLoading:D,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!A,isLoadingError:C&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&z,isStale:Cd(t,r),refetch:this.refetch,promise:N(this,$n),isEnabled:wr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=F=>{m.status==="error"?F.reject(m.error):m.data!==void 0&&F.resolve(m.data)},S=()=>{const F=J(this,$n,m.promise=vd());x(F)},I=N(this,$n);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(m.status==="error"||m.data!==I.value)&&S();break;case"rejected":(m.status!=="error"||m.error!==I.reason)&&S();break}}return m}updateResult(){const t=N(this,qt),r=this.createResult(N(this,Oe),this.options);if(J(this,ga,N(this,Oe).state),J(this,ko,this.options),N(this,ga).data!==void 0&&J(this,To,N(this,Oe)),Uc(r,t))return;J(this,qt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,Ao).size)return!0;const o=new Set(a??N(this,Ao));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,qt)).some(i=>{const c=i;return N(this,qt)[c]!==t[c]&&o.has(c)})};Se(this,Ve,M5).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ve,Ih).call(this)}},sr=new WeakMap,Oe=new WeakMap,Ec=new WeakMap,qt=new WeakMap,ga=new WeakMap,ko=new WeakMap,$n=new WeakMap,xs=new WeakMap,kc=new WeakMap,Co=new WeakMap,To=new WeakMap,xa=new WeakMap,wa=new WeakMap,ws=new WeakMap,Ao=new WeakMap,Ve=new WeakSet,Ac=function(t){Se(this,Ve,Uh).call(this);let r=N(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Ah=function(){Se(this,Ve,Bh).call(this);const t=Zn(this.options.staleTime,N(this,Oe));if(Us||N(this,qt).isStale||!md(t))return;const n=Mm(N(this,qt).dataUpdatedAt,t)+1;J(this,xa,Fs.setTimeout(()=>{N(this,qt).isStale||this.updateResult()},n))},Sh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Oe)):this.options.refetchInterval)??!1},Ph=function(t){Se(this,Ve,Fh).call(this),J(this,ws,t),!(Us||wr(this.options.enabled,N(this,Oe))===!1||!md(N(this,ws))||N(this,ws)===0)&&J(this,wa,Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||wd.isFocused())&&Se(this,Ve,Ac).call(this)},N(this,ws)))},Ih=function(){Se(this,Ve,Ah).call(this),Se(this,Ve,Ph).call(this,Se(this,Ve,Sh).call(this))},Bh=function(){N(this,xa)&&(Fs.clearTimeout(N(this,xa)),J(this,xa,void 0))},Fh=function(){N(this,wa)&&(Fs.clearInterval(N(this,wa)),J(this,wa,void 0))},Uh=function(){const t=N(this,sr).getQueryCache().build(N(this,sr),this.options);if(t===N(this,Oe))return;const r=N(this,Oe);J(this,Oe,t),J(this,Ec,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},M5=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,qt))}),N(this,sr).getQueryCache().notify({query:N(this,Oe),type:"observerResultsUpdated"})})},k5);function Vw(e,t){return wr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ym(e,t){return Vw(e,t)||e.state.data!==void 0&&kd(e,t,t.refetchOnMount)}function kd(e,t,r){if(wr(t.enabled,e)!==!1&&Zn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Cd(e,t)}return!1}function Zm(e,t,r,n){return(e!==t||wr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Cd(e,r)}function Cd(e,t){return wr(t.enabled,e)!==!1&&e.isStaleByTime(Zn(t.staleTime,e))}function Ww(e,t){return!Uc(e.getCurrentResult(),t)}function Xm(e){return{onFetch:(t,r)=>{var u,d,f,h,y;const n=t.options,s=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const E=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=Hm(t.options,t.fetchOptions),w=async(A,C,D)=>{if(g)return Promise.reject();if(C==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:D?"backward":"forward",meta:t.options.meta};return E(S),S})(),m=await v(T),{maxPages:b}=t.options,x=D?Nw:Mw;return{pages:x(A.pages,m,b),pageParams:x(A.pageParams,C,b)}};if(s&&a.length){const A=s==="backward",C=A?qw:Qm,D={pages:a,pageParams:o},z=C(n,D);i=await w(D,z,A)}else{const A=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:Qm(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<A)}return i};t.options.persister?t.fetchFn=()=>{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Qm(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function qw(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Kw=(C5=class extends Vm{constructor(t){super();le(this,hn);le(this,Cc);le(this,fn);le(this,Kt);le(this,va);J(this,Cc,t.client),this.mutationId=t.mutationId,J(this,Kt,t.mutationCache),J(this,fn,[]),this.state=t.state||Jm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,fn).includes(t)||(N(this,fn).push(t),this.clearGcTimeout(),N(this,Kt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,fn,N(this,fn).filter(r=>r!==t)),this.scheduleGc(),N(this,Kt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,fn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Kt).remove(this))}continue(){var t;return((t=N(this,va))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,f,h,y,g,E,v,w,A,C,D,z,T,m,b;const r=()=>{Se(this,hn,Ts).call(this,{type:"continue"})},n={client:N(this,Cc),meta:this.options.meta,mutationKey:this.options.mutationKey};J(this,va,jm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,S)=>{Se(this,hn,Ts).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{Se(this,hn,Ts).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Kt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,va).canStart();try{if(s)r();else{Se(this,hn,Ts).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Kt).config).onMutate)==null?void 0:i.call(o,t,this,n));const S=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));S!==this.state.context&&Se(this,hn,Ts).call(this,{type:"pending",context:S,variables:t,isPaused:a})}const x=await N(this,va).start();return await((d=(u=N(this,Kt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,x,t,this.state.context,n)),await((g=(y=N(this,Kt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,x,null,t,this.state.context,n)),Se(this,hn,Ts).call(this,{type:"success",data:x}),x}catch(x){try{throw await((A=(w=N(this,Kt).config).onError)==null?void 0:A.call(w,x,t,this.state.context,this,n)),await((D=(C=this.options).onError)==null?void 0:D.call(C,x,t,this.state.context,n)),await((T=(z=N(this,Kt).config).onSettled)==null?void 0:T.call(z,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,void 0,x,t,this.state.context,n)),x}finally{Se(this,hn,Ts).call(this,{type:"error",error:x})}}finally{N(this,Kt).runNext(this)}}},Cc=new WeakMap,fn=new WeakMap,Kt=new WeakMap,va=new WeakMap,hn=new WeakSet,Ts=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),kt.batch(()=>{N(this,fn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Kt).notify({mutation:this,type:"updated",action:t})})},C5);function Jm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yw=(T5=class extends Aa{constructor(t={}){super();le(this,Gn);le(this,Yr);le(this,Tc);this.config=t,J(this,Gn,new Set),J(this,Yr,new Map),J(this,Tc,0)}build(t,r,n){const s=new Kw({client:t,mutationCache:this,mutationId:++Yu(this,Tc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,Gn).add(t);const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r);n?n.push(t):N(this,Yr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Gn).delete(t)){const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&N(this,Yr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=_c(t);if(typeof r=="string"){const n=N(this,Yr).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=_c(t);if(typeof r=="string"){const s=(n=N(this,Yr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{N(this,Gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Gn).clear(),N(this,Yr).clear()})}getAll(){return Array.from(N(this,Gn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Lm(r,n))}findAll(t={}){return this.getAll().filter(r=>Lm(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jt))))}},Gn=new WeakMap,Yr=new WeakMap,Tc=new WeakMap,T5);function _c(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Zw=(A5=class extends Aa{constructor(t,r){super();le(this,Wn);le(this,jn);le(this,vs);le(this,ar);le(this,Vn);J(this,jn,t),this.setOptions(r),this.bindMethods(),Se(this,Wn,Zu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,jn).defaultMutationOptions(t),Uc(this.options,r)||N(this,jn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,ar),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Os(r.mutationKey)!==Os(this.options.mutationKey)?this.reset():((n=N(this,ar))==null?void 0:n.state.status)==="pending"&&N(this,ar).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,ar))==null||t.removeObserver(this)}onMutationUpdate(t){Se(this,Wn,Zu).call(this),Se(this,Wn,Oh).call(this,t)}getCurrentResult(){return N(this,vs)}reset(){var t;(t=N(this,ar))==null||t.removeObserver(this),J(this,ar,void 0),Se(this,Wn,Zu).call(this),Se(this,Wn,Oh).call(this)}mutate(t,r){var n;return J(this,Vn,r),(n=N(this,ar))==null||n.removeObserver(this),J(this,ar,N(this,jn).getMutationCache().build(N(this,jn),this.options)),N(this,ar).addObserver(this),N(this,ar).execute(t)}},jn=new WeakMap,vs=new WeakMap,ar=new WeakMap,Vn=new WeakMap,Wn=new WeakSet,Zu=function(){var r;const t=((r=N(this,ar))==null?void 0:r.state)??Jm();J(this,vs,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Oh=function(t){kt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Vn)&&this.hasListeners()){const u=N(this,vs).variables,d=N(this,vs).context,f={client:N(this,jn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Vn)).onSuccess)==null||n.call(r,t.data,u,d,f),(a=(s=N(this,Vn)).onSettled)==null||a.call(s,t.data,null,u,d,f)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Vn)).onError)==null||i.call(o,t.error,u,d,f),(l=(c=N(this,Vn)).onSettled)==null||l.call(c,void 0,t.error,u,d,f))}this.listeners.forEach(u=>{u(N(this,vs))})})},A5),Xw=(S5=class extends Aa{constructor(t={}){super();le(this,mn);this.config=t,J(this,mn,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??bd(s,r);let o=this.get(a);return o||(o=new Gw({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,mn).has(t.queryHash)||(N(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,mn).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,mn).get(t)}getAll(){return[...N(this,mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Nm(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,S5),Qw=(P5=class{constructor(e={}){le(this,ft);le(this,Es);le(this,ks);le(this,So);le(this,Po);le(this,Cs);le(this,Io);le(this,Bo);J(this,ft,e.queryCache||new Xw),J(this,Es,e.mutationCache||new Yw),J(this,ks,e.defaultOptions||{}),J(this,So,new Map),J(this,Po,new Map),J(this,Cs,0)}mount(){Yu(this,Cs)._++,N(this,Cs)===1&&(J(this,Io,wd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onFocus())})),J(this,Bo,Dc.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ft).onOnline())})))}unmount(){var e,t;Yu(this,Cs)._--,N(this,Cs)===0&&((e=N(this,Io))==null||e.call(this),J(this,Io,void 0),(t=N(this,Bo))==null||t.call(this),J(this,Bo,void 0))}isFetching(e){return N(this,ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Es).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ft).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Zn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ft).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=N(this,ft).get(n.queryHash),a=s==null?void 0:s.state.data,o=Ow(t,a);if(o!==void 0)return N(this,ft).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>N(this,ft).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ft).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ft);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ft);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>N(this,ft).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e,t={}){return kt.batch(()=>(N(this,ft).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=kt.batch(()=>N(this,ft).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(jt)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ft).build(this,t);return r.isStaleByTime(Zn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=Xm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}ensureInfiniteQueryData(e){return e.behavior=Xm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dc.isOnline()?N(this,Es).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ft)}getMutationCache(){return N(this,Es)}getDefaultOptions(){return N(this,ks)}setDefaultOptions(e){J(this,ks,e)}setQueryDefaults(e,t){N(this,So).set(Os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,So).values()],r={};return t.forEach(n=>{Oo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,Po).set(Os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Po).values()],r={};return t.forEach(n=>{Oo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,ks).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Oc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,ks).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ft).clear(),N(this,Es).clear()}},ft=new WeakMap,Es=new WeakMap,ks=new WeakMap,So=new WeakMap,Po=new WeakMap,Cs=new WeakMap,Io=new WeakMap,Bo=new WeakMap,P5),e1=xt.createContext(void 0),Td=e=>{const t=xt.useContext(e1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jw=({client:e,children:t})=>(xt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),B.jsx(e1.Provider,{value:e,children:t})),t1=xt.createContext(!1),e3=()=>xt.useContext(t1);t1.Provider;function t3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var r3=xt.createContext(t3()),n3=()=>xt.useContext(r3),s3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},a3=e=>{xt.useEffect(()=>{e.clearReset()},[e])},o3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||$m(r,[e.error,n])),i3=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},c3=(e,t)=>e.isLoading&&e.isFetching&&!t,l3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,r1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function u3(e,t,r){var d,f,h,y,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=e3(),s=n3(),a=Td(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",i3(o),s3(o,s),a3(s);const i=!a.getQueryCache().get(o.queryHash),[c]=xt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(xt.useSyncExternalStore(xt.useCallback(E=>{const v=u?c.subscribe(kt.batchCalls(E)):jt;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),xt.useEffect(()=>{c.setOptions(o)},[o,c]),l3(o,l))throw r1(o,c,s);if(o3({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,l),o.experimental_prefetchInRender&&!Us&&c3(l,n)){const E=i?r1(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;E==null||E.catch(jt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function d3(e,t){return u3(e,jw)}function Zr(e,t){const r=Td(),[n]=xt.useState(()=>new Zw(r,e));xt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=xt.useSyncExternalStore(xt.useCallback(o=>n.subscribe(kt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=xt.useCallback((o,i)=>{n.mutate(o,i).catch(jt)},[n]);if(s.error&&$m(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const p3=M.createContext(null),Ad={didCatch:!1,error:null};class f3 extends M.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ad}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(Ad)}}componentDidCatch(t,r){var n,s;(n=(s=this.props).onError)===null||n===void 0||n.call(s,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:s}=this.props;if(n&&r.error!==null&&h3(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(Ad)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")i=r(c);else if(n)i=M.createElement(n,c);else if(s!==void 0)i=s;else throw o}return M.createElement(p3.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function h3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const n1=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,f))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,s,i);return i},m3=(e=>e?n1(e):n1),b3=e=>e;function y3(e,t=b3){const r=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(r),r}const s1=e=>{const t=m3(e),r=n=>y3(t,n);return Object.assign(r,t),r},g3=(e=>e?s1(e):s1),a1={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},te=g3((e,t)=>({state:a1,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...a1,currentTime:Date.now(),swapExecution:t().state.swapExecution,isMarketOrder:t().state.isMarketOrder}})}}));(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".orbs_OrbsLogo{object-fit:contain;display:inline}.orbs_PoweredBy{border-radius:8px;margin-left:auto;margin-right:auto}.orbs_PoweredBy a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}.orbs_PoweredBy span{font-size:14px}.orbs_PoweredBy .orbs_OrbsLogo{margin-left:6px;margin-right:6px;width:18px;height:18px}.orbs_Text{margin:0;padding:0}.orbs_Spinner{width:var(--size, 38px);height:var(--size, 38px);border:var(--border-width, 3px) solid var(--border-color, white);border-bottom-color:var(--bottom-border-color, rgba(255, 255, 255, .2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:orbs_rotation 1s linear infinite}@keyframes orbs_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.orbs_TradeStepLayout{--layout-min-height: 220px;--layout-width: 100%;--layout-display: flex;--layout-direction: column;--layout-align: center;--layout-overflow: visible;display:var(--layout-display);flex-direction:var(--layout-direction);align-items:var(--layout-align);width:var(--layout-width);min-height:var(--layout-min-height);overflow:var(--layout-overflow)}.orbs_TradeStepLayoutBody{--body-gap: 20px;--body-margin-top: 30px;--body-width: 100%;--body-display: flex;--body-direction: column;--body-align: center;--body-overflow: visible;gap:var(--body-gap);align-items:var(--body-align);display:var(--body-display);flex-direction:var(--body-direction);width:var(--body-width);margin-top:var(--body-margin-top);overflow:var(--body-overflow)}.orbs_TradeStepLayoutHeader{--header-gap: 30px;--header-display: flex;--header-direction: column;--header-align: center;--header-justify: center;--header-overflow: visible;display:var(--header-display);flex-direction:var(--header-direction);align-items:var(--header-align);justify-content:var(--header-justify);gap:var(--header-gap);overflow:var(--header-overflow)}.orbs_TradeStepLayoutTitle{--title-font-size: 18px;--title-font-weight: 500;--title-line-height: normal;--title-color: inherit;--title-text-align: center;--title-margin: 0;--title-padding: 0;font-size:var(--title-font-size);font-weight:var(--title-font-weight);line-height:var(--title-line-height);color:var(--title-color);text-align:var(--title-text-align);margin:var(--title-margin);padding:var(--title-padding)}.orbs_StepIndicator{--indicator-display: flex;--indicator-align: center;--indicator-justify: flex-start;--indicator-height: 7px;--indicator-width: 120px;--indicator-border-radius: 999px;--indicator-bg-color: white;--indicator-margin-bottom: 20px;--indicator-position: relative;--indicator-overflow: hidden;--indicator-border: none;--indicator-box-shadow: none;display:var(--indicator-display);align-items:var(--indicator-align);justify-content:var(--indicator-justify);height:var(--indicator-height);width:var(--indicator-width);border-radius:var(--indicator-border-radius);overflow:var(--indicator-overflow);background-color:var(--indicator-bg-color);margin-bottom:var(--indicator-margin-bottom);position:var(--indicator-position);border:var(--indicator-border);box-shadow:var(--indicator-box-shadow)}.orbs_StepIndicatorLine{--line-height: 100%;--line-bg-color: black;--line-position: absolute;--line-top: 0;--line-left: 0;--line-right: 0;--line-bottom: 0;--line-transition: all .3s ease;--line-border-radius: inherit;--line-box-shadow: none;height:var(--line-height);background-color:var(--line-bg-color);position:var(--line-position);top:var(--line-top);left:var(--line-left);right:var(--line-right);bottom:var(--line-bottom);transition:var(--line-transition);border-radius:var(--line-border-radius);box-shadow:var(--line-box-shadow)}.orbs_TradeStepLayoutFooter{--footer-display: flex;--footer-align: center;--footer-justify: center;--footer-direction: column;--footer-margin-top: auto;--footer-padding-top: 30px;--footer-width: 100%;--footer-overflow: visible;--footer-border-top: none;display:var(--footer-display);align-items:var(--footer-align);justify-content:var(--footer-justify);flex-direction:var(--footer-direction);margin-top:var(--footer-margin-top);padding-top:var(--footer-padding-top);width:var(--footer-width);overflow:var(--footer-overflow);border-top:var(--footer-border-top)}.orbs_TradeStepLayoutFooter p{--footer-text-font-size: 15px;--footer-text-line-height: normal;--footer-text-color: inherit;--footer-text-margin: 0;--footer-text-padding: 0;font-size:var(--footer-text-font-size);line-height:var(--footer-text-line-height);color:var(--footer-text-color);margin:var(--footer-text-margin);padding:var(--footer-text-padding)}.orbs_TradeStepLayoutFooterLink{--link-color: inherit;--link-text-decoration: none;--link-font-size: 15px;--link-text-align: center;--link-margin: auto;--link-outline: none;--link-line-height: normal;--link-padding: 0;--link-transition: color .2s ease;--link-hover-color: inherit;--link-hover-text-decoration: underline;color:var(--link-color);text-decoration:var(--link-text-decoration);font-size:var(--link-font-size);text-align:var(--link-text-align);margin-left:var(--link-margin);margin-right:var(--link-margin);outline:var(--link-outline);line-height:var(--link-line-height);padding:var(--link-padding);transition:var(--link-transition)}.orbs_TradeStepLayoutFooterLink:hover{color:var(--link-hover-color);text-decoration:var(--link-hover-text-decoration)}.orbs_TradeStepLayoutSuccessIcon{--success-icon-display: flex;--success-icon-justify: center;--success-icon-align: center;--success-icon-width: 60px;--success-icon-height: 60px;--success-icon-border-radius: 50%;--success-icon-overflow: visible;--success-icon-bg-color: transparent;--success-icon-border: none;--success-icon-box-shadow: none;display:var(--success-icon-display);justify-content:var(--success-icon-justify);align-items:var(--success-icon-align);width:var(--success-icon-width);height:var(--success-icon-height);border-radius:var(--success-icon-border-radius);overflow:var(--success-icon-overflow);background-color:var(--success-icon-bg-color);border:var(--success-icon-border);box-shadow:var(--success-icon-box-shadow)}.orbs_TradeStepLayoutErrorIcon{--error-icon-width: 80px;--error-icon-height: 80px;--error-icon-display: flex;--error-icon-justify: center;--error-icon-align: center;--error-icon-overflow: visible;--error-icon-bg-color: transparent;--error-icon-border: none;--error-icon-box-shadow: none;width:var(--error-icon-width);height:var(--error-icon-height);display:var(--error-icon-display);justify-content:var(--error-icon-justify);align-items:var(--error-icon-align);overflow:var(--error-icon-overflow);background-color:var(--error-icon-bg-color);border:var(--error-icon-border);box-shadow:var(--error-icon-box-shadow)}.orbs_FailedContentMsg{font-size:22px;font-weight:500}.orbs_TradePreview{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.orbs_TradePreviewToken{display:flex;align-items:center;gap:6px;max-width:calc(50% - 30px)}.orbs_TradePreviewToken p{--token-font-size: 15px;--token-white-space: nowrap;--token-overflow: hidden;--token-text-overflow: ellipsis;--token-flex: 1;--token-margin: 0;--token-padding: 0;font-size:var(--token-font-size);white-space:var(--token-white-space);overflow:var(--token-overflow);text-overflow:var(--token-text-overflow);flex:var(--token-flex);margin:var(--token-margin)}.orbs_TradepPreviewIcon{width:22px;height:22px}.orbs_TradepPreviewLogo{width:24px;height:24px;border-radius:50%;overflow:hidden}.orbs_FlexRow{display:flex;flex-direction:row}.orbs_FlexColumn{display:flex;flex-direction:column}@keyframes orbs_skeletonAnimation{0%{opacity:.2}to{opacity:.4}}.orbs_SkeletonLoader{animation:orbs_skeletonAnimation 1s linear infinite alternate;background-color:#fff}.orbs_Main-wrapper{width:100%}.orbs_Main{width:100%;display:flex;flex-direction:column;gap:28px}.orbs_MainToken{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:8px}.orbs_MainTokenLeft{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orbs_MainTokenUsd{display:flex;align-items:center;gap:5px}.orbs_MainTokenUsd small{font-size:12px;opacity:.6}.orbs_MainContentLoader{width:100%;display:flex;gap:15px;align-items:center;margin-top:20px}.orbs_MainContentRectengularLoader{flex:1;height:20px;max-width:250px;border-radius:20px}.orbs_MainContentCircleLoader{width:30px;height:30px;border-radius:50%}.orbs_MainTokenLogo{--width: 40px;--height: 40px;width:var(--width);height:var(--height)}.orbs_MainTokenLogo img{width:100%;height:100%;object-fit:cover}.orbs_SwapFlow{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.orbs_SwapFlow *{box-sizing:border-box}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Ne=e=>`orbs_${e}`;function Do({children:e,className:t=""}){return B.jsx("p",{className:`${t} ${Ne("Text")}`,children:e})}const o1=M.createContext({});function x3({children:e,...t}){return B.jsx(o1.Provider,{value:t,children:e})}const Xr=()=>M.useContext(o1);var ht=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(ht||{});const w3=({className:e="",size:t=38,borderWidth:r=3,borderColor:n="white",bottomBorderColor:s="rgba(255, 255, 255, 0.2)"})=>{const a={"--size":`${t}px`,"--border-width":`${r}px`,"--border-color":n,"--bottom-border-color":s};return B.jsx("div",{className:`${Ne("Spinner")} ${e}`,style:a})};function Mc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return B.jsxs("div",{className:`${Ne("TradeStepLayout")} ${e}`,children:[B.jsxs("div",{className:Ne("TradeStepLayoutHeader"),children:[B.jsx(T3,{}),s&&B.jsx(Do,{className:Ne("TradeStepLayoutTitle"),children:s})]}),t&&B.jsx("div",{className:Ne("TradeStepLayoutBody"),children:t}),B.jsx(v3,{link:r,text:n}),a]})}const v3=({link:e,text:t})=>{const{swapStatus:r}=Xr();return!e&&!t?null:B.jsxs("div",{className:Ne("TradeStepLayoutFooter"),children:[B.jsx(S3,{}),e?B.jsx(E3,{link:e,text:t}):r===ht.FAILED?void 0:B.jsx(Do,{children:t})]})},E3=({link:e,text:t})=>B.jsx("a",{target:"_blank",className:Ne("TradeStepLayoutFooterLink"),href:e,children:t});function k3(){const{components:e}=Xr();return e.SuccessIcon?e.SuccessIcon:B.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Ne("TradeStepLayoutSuccessIcon"),children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#00C853"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#00C853",d:"M5 8l2 2 4-4"})]})}function C3(){const{components:e}=Xr();return e.FailedIcon?e.FailedIcon:B.jsxs("svg",{className:Ne("TradeStepLayoutErrorIcon"),viewBox:"0 0 16 16",fill:"none",children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#FF3D00"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#FF3D00",d:"M8 4v5M8 11h.01"})]})}const T3=()=>{const{swapStatus:e}=Xr();return e===ht.SUCCESS?B.jsx(k3,{}):e===ht.FAILED?B.jsx(C3,{}):B.jsx(A3,{})},A3=()=>{const{components:e}=Xr();return e.Loader?e.Loader:B.jsx(w3,{size:60,borderWidth:5,className:Ne("TradeStepLayoutSpinner")})},S3=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=Xr();return r!==ht.LOADING||e===1?null:B.jsx("div",{className:Ne("StepIndicator"),children:B.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Ne("StepIndicatorLine")})})},P3=({error:e,footerLink:t,footerText:r})=>B.jsx(Mc,{footerLink:t,footerText:r,body:e||B.jsx("p",{className:Ne("FailedContentMsg"),children:"Something went wrong"}),className:Ne("FailedContent")});function I3(){return B.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Ne("TradepPreviewIcon"),children:B.jsx("path",{fillRule:"evenodd",d:"M4 8a.5.5 0 01.5-.5h5.793L8.146 5.354a.5.5 0 11.708-.708l3 3a.5.5 0 010 .708l-3 3a.5.5 0 01-.708-.708L10.293 8.5H4.5A.5.5 0 014 8z"})})}const i1=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=Xr();return B.jsxs("div",{className:Ne("TradePreview"),children:[B.jsx(c1,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&B.jsxs(B.Fragment,{children:[B.jsx(I3,{}),B.jsx(c1,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},c1=({token:e,amount:t,Logo:r})=>B.jsxs("div",{className:Ne("TradePreviewToken"),children:[r||B.jsx("img",{src:e==null?void 0:e.logoUrl,className:Ne("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),B.jsxs(Do,{children:[t," ",e==null?void 0:e.symbol]})]});function B3({title:e,footerLink:t,footerText:r,hideTokens:n}){return B.jsx(Mc,{title:e,className:Ne("Success"),body:!n&&B.jsx(i1,{}),footerLink:t,footerText:r})}const l1=({$gap:e=10,$alignItems:t="flex-start",children:r,className:n="",customStyles:s={}})=>{const a={gap:`${e}px`,alignItems:t,width:"100%",...s};return B.jsx("div",{className:`${Ne("FlexColumn")} ${n}`,style:a,children:r})};function u1({styles:e={},className:t=""}){return B.jsx("div",{style:e,className:`${Ne("SkeletonLoader")} ${t}`})}const F3=()=>B.jsxs("div",{className:`${Ne("MainContentLoader")}`,children:[B.jsx(u1,{className:`${Ne("MainContentCircleLoader")}`}),B.jsx(u1,{className:`${Ne("MainContentRectengularLoader")}`})]}),U3=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=Xr(),d=B.jsx(p1,{fromTitle:e,inUsd:r,inToken:i,toTitle:t,outUsd:n,outToken:c,inAmount:o,outAmount:a,SrcTokenLogo:l.SrcTokenLogo,DstTokenLogo:l.DstTokenLogo});return s?u?B.jsx(O3,{}):B.jsxs(l1,{children:[d,B.jsx(F3,{})]}):B.jsx(l1,{children:d})},d1=({amount:e,token:t,usd:r,title:n,Logo:s})=>B.jsxs("div",{className:`${Ne("MainToken")}`,children:[B.jsxs("div",{className:`${Ne("MainTokenLeft")}`,children:[B.jsx(Do,{className:`${Ne("MainTokenTitle")}`,children:n}),B.jsx(Do,{className:` ${Ne("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&B.jsx("div",{className:` ${Ne("MainTokenUsd")}`,children:r})]}),s||B.jsx("div",{className:` ${Ne("MainTokenLogo")}`,children:t!=null&&t.logoUrl?B.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function O3(){const{currentStep:e}=Xr();return e?B.jsx(Mc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:B.jsx(i1,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const p1=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>B.jsxs("div",{className:`${Ne("Main")}`,children:[B.jsx(d1,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),B.jsx(d1,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),Xn=e=>B.jsx(x3,{...e,children:B.jsx(D3,{})}),D3=()=>{const{swapStatus:e,components:t,className:r}=Xr();return B.jsx("div",{className:`${Ne("SwapFlow")} ${r}`,children:e===ht.SUCCESS?t==null?void 0:t.Success:e===ht.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};Xn.Success=B3,Xn.Failed=P3,Xn.Main=U3,Xn.StepLayout=Mc;var Ds=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ds||{});const _3="1.2.3";let Zt=class Dh extends Error{constructor(t,r={}){var o;const n=r.cause instanceof Dh?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,s=r.cause instanceof Dh&&r.cause.docsPath||r.docsPath,a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${_3}`].join(`
65
65
  `);super(a),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"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=t}};function gn(e,t){const r=e.exec(t);return r==null?void 0:r.groups}const f1=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,h1=/^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)?$/,m1=/^\(.+?\).*?$/,b1=/^tuple(?<array>(\[(\d*)\])*)$/;function Sd(e){let t=e.type;if(b1.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let s=0;s<r;s++){const a=e.components[s];t+=Sd(a),s<r-1&&(t+=", ")}const n=gn(b1,e.type);return t+=`)${(n==null?void 0:n.array)||""}`,Sd({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Sa(e){let t="";const r=e.length;for(let n=0;n<r;n++){const s=e[n];t+=Sd(s),n!==r-1&&(t+=", ")}return t}function Nc(e){var t;return e.type==="function"?`function ${e.name}(${Sa(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Sa(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Sa(e.inputs)})`:e.type==="error"?`error ${e.name}(${Sa(e.inputs)})`:e.type==="constructor"?`constructor(${Sa(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const y1=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function M3(e){return y1.test(e)}function N3(e){return gn(y1,e)}const g1=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function L3(e){return g1.test(e)}function z3(e){return gn(g1,e)}const x1=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function R3(e){return x1.test(e)}function H3(e){return gn(x1,e)}const w1=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Lc(e){return w1.test(e)}function $3(e){return gn(w1,e)}const v1=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function G3(e){return v1.test(e)}function j3(e){return gn(v1,e)}const E1=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function V3(e){return E1.test(e)}function W3(e){return gn(E1,e)}const q3=/^receive\(\) external payable$/;function K3(e){return q3.test(e)}const k1=new Set(["memory","indexed","storage","calldata"]),Y3=new Set(["indexed"]),Pd=new Set(["calldata","memory","storage"]);class Z3 extends Zt{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class X3 extends Zt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" 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 Q3 extends Zt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class J3 extends Zt{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class e8 extends Zt{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class t8 extends Zt{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" 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 r8 extends Zt{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class n8 extends Zt{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" 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 s8 extends Zt{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Pa extends Zt{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class a8 extends Zt{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class o8 extends Zt{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class i8 extends Zt{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class c8 extends Zt{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function l8(e,t,r){let n="";if(r)for(const s of Object.entries(r)){if(!s)continue;let a="";for(const o of s[1])a+=`[${o.type}${o.name?`:${o.name}`:""}]`;n+=`(${s[0]}{${a}})`}return t?`${t}:${e}${n}`:`${e}${n}`}const Id=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}]]);function Bd(e,t={}){if(R3(e))return u8(e,t);if(L3(e))return d8(e,t);if(M3(e))return p8(e,t);if(G3(e))return f8(e,t);if(V3(e))return h8(e);if(K3(e))return{type:"receive",stateMutability:"payable"};throw new a8({signature:e})}function u8(e,t={}){const r=H3(e);if(!r)throw new Pa({signature:e,type:"function"});const n=or(r.parameters),s=[],a=n.length;for(let i=0;i<a;i++)s.push(xn(n[i],{modifiers:Pd,structs:t,type:"function"}));const o=[];if(r.returns){const i=or(r.returns),c=i.length;for(let l=0;l<c;l++)o.push(xn(i[l],{modifiers:Pd,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:o}}function d8(e,t={}){const r=z3(e);if(!r)throw new Pa({signature:e,type:"event"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(xn(n[o],{modifiers:Y3,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:s}}function p8(e,t={}){const r=N3(e);if(!r)throw new Pa({signature:e,type:"error"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(xn(n[o],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:s}}function f8(e,t={}){const r=j3(e);if(!r)throw new Pa({signature:e,type:"constructor"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(xn(n[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}function h8(e){const t=W3(e);if(!t)throw new Pa({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const m8=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b8=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,y8=/^u?int$/;function xn(e,t){var d,f;const r=l8(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Id.has(r))return Id.get(r);const n=m1.test(e),s=gn(n?b8:m8,e);if(!s)throw new e8({param:e});if(s.name&&x8(s.name))throw new t8({param:e,name:s.name});const a=s.name?{name:s.name}:{},o=s.modifier==="indexed"?{indexed:!0}:{},i=(t==null?void 0:t.structs)??{};let c,l={};if(n){c="tuple";const h=or(s.type),y=[],g=h.length;for(let E=0;E<g;E++)y.push(xn(h[E],{structs:i}));l={components:y}}else if(s.type in i)c="tuple",l={components:i[s.type]};else if(y8.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!C1(c))throw new Q3({type:c});if(s.modifier){if(!((f=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&f.call(d,s.modifier)))throw new r8({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(Pd.has(s.modifier)&&!w8(c,!!s.array))throw new n8({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const u={type:`${c}${s.array??""}`,...a,...o,...l};return Id.set(r,u),u}function or(e,t=[],r="",n=0){const s=e.trim().length;for(let a=0;a<s;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return n===0?or(i,[...t,r.trim()]):or(i,t,`${r}${o}`,n);case"(":return or(i,t,`${r}${o}`,n+1);case")":return or(i,t,`${r}${o}`,n-1);default:return or(i,t,`${r}${o}`,n)}}if(r==="")return t;if(n!==0)throw new c8({current:r,depth:n});return t.push(r.trim()),t}function C1(e){return e==="address"||e==="bool"||e==="function"||e==="string"||f1.test(e)||h1.test(e)}const g8=/^(?: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)$/;function x8(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||f1.test(e)||h1.test(e)||g8.test(e)}function w8(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function Fd(e){const t={},r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!Lc(i))continue;const c=$3(i);if(!c)throw new Pa({signature:i,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let f=0;f<d;f++){const y=l[f].trim();if(!y)continue;const g=xn(y,{type:"struct"});u.push(g)}if(!u.length)throw new o8({signature:i});t[c.name]=u}const n={},s=Object.entries(t),a=s.length;for(let o=0;o<a;o++){const[i,c]=s[o];n[i]=T1(c,t)}return n}const v8=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function T1(e=[],t={},r=new Set){const n=[],s=e.length;for(let a=0;a<s;a++){const o=e[a];if(m1.test(o.type))n.push(o);else{const c=gn(v8,o.type);if(!(c!=null&&c.type))throw new s8({abiParameter:o});const{array:l,type:u}=c;if(u in t){if(r.has(u))throw new i8({type:u});n.push({...o,type:`tuple${l??""}`,components:T1(t[u],t,new Set([...r,u]))})}else if(C1(u))n.push(o);else throw new X3({type:u})}}return n}function A1(e){const t=Fd(e),r=[],n=e.length;for(let s=0;s<n;s++){const a=e[s];Lc(a)||r.push(Bd(a,t))}return r}function S1(e){let t;if(typeof e=="string")t=Bd(e);else{const r=Fd(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(!Lc(a)){t=Bd(a,r);break}}}if(!t)throw new Z3({signature:e});return t}function P1(e){const t=[];if(typeof e=="string"){const r=or(e),n=r.length;for(let s=0;s<n;s++)t.push(xn(r[s],{modifiers:k1}))}else{const r=Fd(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(Lc(a))continue;const o=or(a),i=o.length;for(let c=0;c<i;c++)t.push(xn(o[c],{modifiers:k1,structs:r}))}}if(t.length===0)throw new J3({params:e});return t}function ne(e,t,r){const n=e[t.name];if(typeof n=="function")return n;const s=e[r];return typeof s=="function"?s:a=>t(e,a)}function Or(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new _8(e.type);return`${e.name}(${zc(e.inputs,{includeName:t})})`}function zc(e,{includeName:t=!1}={}){return e?e.map(r=>E8(r,{includeName:t})).join(t?", ":","):""}function E8(e,{includeName:t}){return e.type.startsWith("tuple")?`(${zc(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Dr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function ut(e){return Dr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const I1="2.43.3";let _o={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${I1}`},$=class _h extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof _h?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof _h&&r.cause.docsPath||r.docsPath,a=(i=_o.getDocsUrl)==null?void 0:i.call(_o,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],..._o.version?[`Version: ${_o.version}`]:[]].join(`
66
66
  `);super(o,r.cause?{cause:r.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=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=I1}walk(t){return B1(this,t)}};function B1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?B1(e.cause,t):t?null:e}class k8 extends ${constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
67
67
  `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class F1 extends ${constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
@@ -104,7 +104,7 @@ ${rE(h)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessa
104
104
  `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Xs extends ${constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}}function Hp({chain:e,currentChainId:t}){if(!e)throw new Fk;if(t!==e.id)throw new Bk({chain:e,currentChainId:t})}async function $p(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Gp=new _a(128);async function fl(e,t){var w,A,C,D;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,type:y,value:g,...E}=t;if(typeof r>"u")throw new Pn({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ye(r):null;try{en(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Yc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((v==null?void 0:v.type)==="json-rpc"||v===null){let T;n!==null&&(T=await ne(e,is,"getChainId")({}),Hp({currentChainId:T,chain:n}));const m=(C=(A=(w=e.chain)==null?void 0:w.formatters)==null?void 0:A.transactionRequest)==null?void 0:C.format,x=(m||Mr)({...js(E,{format:m}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:T,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,to:z,type:y,value:g},"sendTransaction"),S=Gp.get(e.uid),I=S?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[x]},{retryCount:0})}catch(F){if(S===!1)throw F;const _=F;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(k=>(Gp.set(e.uid,!0),k)).catch(k=>{const P=k;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(Gp.set(e.uid,!1),_):P});throw _}}if((v==null?void 0:v.type)==="local"){const T=await ne(e,di,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,nonceManager:v.nonceManager,parameters:[...gp,"sidecars"],type:y,value:g,...E,to:z}),m=(D=n==null?void 0:n.serializers)==null?void 0:D.transaction,b=await v.signTransaction(T,{serializer:m});return await ne(e,$p,"sendRawTransaction")({serializedTransaction:b})}throw(v==null?void 0:v.type)==="smart"?new Xs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Xs({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(z){throw z instanceof Xs?z:Jc(z,{...t,account:v,chain:t.chain||void 0})}}async function vi(e,t){return vi.internal(e,fl,"sendTransaction",t)}(function(e){async function t(r,n,s,a){const{abi:o,account:i=r.account,address:c,args:l,dataSuffix:u,functionName:d,...f}=a;if(typeof i>"u")throw new Pn({docsPath:"/docs/contract/writeContract"});const h=i?Ye(i):null,y=dr({abi:o,args:l,functionName:d});try{return await ne(r,n,s)({data:`${y}${u?u.replace("0x",""):""}`,to:c,account:h,...f})}catch(g){throw Gs(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:h==null?void 0:h.address})}}e.internal=t})(vi||(vi={}));class jk extends ${constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function hl(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,a)=>{const o=async({count:i=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:i,error:l}):t;u&&await Rp(u),o({count:i+1})};try{const l=await e();s(l)}catch(l){if(i<r&&await n({count:i,error:l}))return c({error:l});a(l)}};o()})}const Fy={"0x0":"reverted","0x1":"success"};function ml(e,t){const r={...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(n=>tn(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ir(e.transactionIndex):null,status:e.status?Fy[e.status]:null,type:e.type?Ob[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const jp=Xc("transactionReceipt",ml),Uy="0x5792579257925792579257925792579257925792579257925792579257925792",Oy=q(0,{size:32});async function Dy(e,t){const{account:r=e.account,capabilities:n,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:o=32,forceAtomic:i=!1,id:c,version:l="2.0.0"}=t,u=r?Ye(r):null,d=t.calls.map(f=>{const h=f,y=h.abi?dr({abi:h.abi,functionName:h.functionName,args:h.args}):h.data;return{data:h.dataSuffix&&y?lr([y,h.dataSuffix]):y,to:h.to,value:h.value?q(h.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:q(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const h=f;if(a&&(h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"||h.name==="UnknownRpcError"||h.details.toLowerCase().includes("does not exist / is not available")||h.details.toLowerCase().includes("missing or invalid. request()")||h.details.toLowerCase().includes("did not match any variant of untagged enum")||h.details.toLowerCase().includes("account upgraded to unsupported contract")||h.details.toLowerCase().includes("eip-7702 not supported")||h.details.toLowerCase().includes("unsupported wc_ method")||h.details.toLowerCase().includes("feature toggled misconfigured")||h.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(n&&Object.values(n).some(w=>!w.optional)){const w="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new za(new $(w,{details:w}))}if(i&&d.length>1){const v="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Ra(new $(v,{details:v}))}const y=[];for(const v of d){const w=fl(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?Le(v.value):void 0});y.push(w),o>0&&await new Promise(A=>setTimeout(A,o))}const g=await Promise.allSettled(y);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const E=g.map(v=>v.status==="fulfilled"?v.value:Oy);return{id:lr([...E,q(s.id,{size:32}),Uy])}}throw Jc(f,{...t,account:u,chain:t.chain})}}async function _y(e,t){async function r(u){if(u.endsWith(Uy.slice(2))){const f=Xt(zd(u,-64,-32)),h=zd(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(h.map(E=>Oy.slice(2)!==E?e.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),g=y.some(E=>E===null)?100:y.every(E=>(E==null?void 0:E.status)==="0x1")?200:y.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:ir(f),receipts:y.filter(Boolean),status:g,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:n=!1,chainId:s,receipts:a,version:o="2.0.0",...i}=await r(t.id),[c,l]=(()=>{const u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:n,chainId:s?ir(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:Le(u.blockNumber),gasUsed:Le(u.gasUsed),status:Fy[u.status]})))??[],statusCode:l,status:c,version:o}}async function My(e,t){const{id:r,pollingInterval:n=e.pollingInterval,status:s=({statusCode:g})=>g===200||g>=300,retryCount:a=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:i=6e4,throwOnFailure:c=!1}=t,l=mt(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:f}=Np();let h;const y=Sn(l,{resolve:d,reject:f},g=>{const E=Ya(async()=>{const v=w=>{clearTimeout(h),E(),w(),y()};try{const w=await hl(async()=>{const A=await ne(e,_y,"getCallsStatus")({id:r});if(c&&A.status==="failure")throw new jk(A);return A},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return E});return h=i?setTimeout(()=>{y(),clearTimeout(h),f(new Vk({id:r}))},i):void 0,await u}class Vk extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Vp=256;let bl=Vp,yl;function Ny(e=11){if(!yl||bl+e>Vp*2){yl="",bl=0;for(let t=0;t<Vp;t++)yl+=(256+Math.random()*256|0).toString(16).substring(1)}return yl.substring(bl,bl+++e)}function Ly(e){const{batch:t,chain:r,ccipRead:n,key:s="base",name:a="Base Client",type:o="base"}=e,i=e.experimental_blockTag??(typeof(r==null?void 0:r.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(r==null?void 0:r.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),u=e.pollingInterval??l,d=e.cacheTime??u,f=e.account?Ye(e.account):void 0,{config:h,request:y,value:g}=e.transport({account:f,chain:r,pollingInterval:u}),E={...h,...g},v={account:f,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:y,transport:E,type:o,uid:Ny(),...i?{experimental_blockTag:i}:{}};function w(A){return C=>{const D=C(A);for(const T in v)delete D[T];const z={...A,...D};return Object.assign(z,{extend:w(z)})}}return Object.assign(v,{extend:w(v)})}function Wp(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof Kd);return t instanceof Kd?((r=t.data)==null?void 0:r.errorName)==="HttpError"||((n=t.data)==null?void 0:n.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotFound"||((o=t.data)==null?void 0:o.errorName)==="ReverseAddressMismatch"||((i=t.data)==null?void 0:i.errorName)==="UnsupportedResolverProfile":!1}function Wk(e){const{abi:t,data:r}=e,n=Ls(r,0,4),s=t.find(a=>a.type==="function"&&n===Ro(Or(a)));if(!s)throw new B8(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?$o(s.inputs,Ls(r,4)):void 0}}const qp="/docs/contract/encodeErrorResult";function zy(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=zs({abi:t,args:n,name:r});if(!c)throw new O1(r,{docsPath:qp});s=c}if(s.type!=="error")throw new O1(void 0,{docsPath:qp});const a=Or(s),o=Ro(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new S8(s.name,{docsPath:qp});i=es(s.inputs,n)}return ur([o,i])}const Kp="/docs/contract/encodeFunctionResult";function qk(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=zs({abi:t,name:r});if(!o)throw new Ia(r,{docsPath:Kp});s=o}if(s.type!=="function")throw new Ia(void 0,{docsPath:Kp});if(!s.outputs)throw new M1(s.name,{docsPath:Kp});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new N1(n)})();return es(s.outputs,a)}const Ei="x-batch-gateway:true";async function Ry(e){const{data:t,ccipRequest:r}=e,{args:[n]}=Wk({abi:Up,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(Ei)?await Ry({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=Kk(c)}})),qk({abi:Up,functionName:"query",result:[s,a]})}function Kk(e){return e.name==="HttpRequestError"&&e.status?zy({abi:Up,errorName:"HttpError",args:[e.status,e.shortMessage]}):zy({abi:[fb],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function Hy(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Dr(t)?t:null}function Yp(e){let t=new Uint8Array(32).fill(0);if(!e)return vt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=Hy(r[n]),a=s?wn(s):Ut(Ms(r[n]),"bytes");t=Ut(lr([t,a]),"bytes")}return vt(t)}function Yk(e){return`[${e.slice(2)}]`}function Zk(e){const t=new Uint8Array(32).fill(0);return e?Hy(e)||Ut(Ms(e)):vt(t)}function Zp(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(Ms(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=Ms(s[a]);o.byteLength>255&&(o=Ms(Yk(Zk(s[a])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Xk(e,t){const{blockNumber:r,blockTag:n,coinType:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ka({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>a.endsWith(f)))return null;const d=s!=null?[Yp(a),BigInt(s)]:[Yp(a)];try{const f=dr({abi:Ey,functionName:"addr",args:d}),h={address:l,abi:wy,functionName:"resolveWithGateways",args:[Fe(Zp(a)),f,o??[Ei]],blockNumber:r,blockTag:n},g=await ne(e,zr,"readContract")(h);if(g[0]==="0x")return null;const E=qs({abi:Ey,args:d,functionName:"addr",data:g[0]});return E==="0x"||Xt(E)==="0x00"?null:E}catch(f){if(i)throw f;if(Wp(f))return null;throw f}}class Qk extends ${constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class ki extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Xp extends ${constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class Jk extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const e7=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t7=/^(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>\/.*)?$/,r7=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,n7=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function s7(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const r=t.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function $y(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Gy({uri:e,gatewayUrls:t}){const r=r7.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=$y(t==null?void 0:t.ipfs,"https://ipfs.io"),s=$y(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(e7),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||t7.test(e);if(e.startsWith("http")&&!u&&!d){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(n7,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Xp({uri:e})}function jy(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new Qk({data:e});return e.image||e.image_url||e.image_data}async function a7({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await Qp({gatewayUrls:e,uri:jy(r)})}catch{throw new Xp({uri:t})}}async function Qp({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=Gy({uri:t,gatewayUrls:e});if(n||await s7(r))return r;throw new Xp({uri:t})}function o7(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=t.split("/"),[a,o]=r.split(":"),[i,c]=n.split(":");if(!a||a.toLowerCase()!=="eip155")throw new ki({reason:"Only EIP-155 supported"});if(!o)throw new ki({reason:"Chain ID not found"});if(!c)throw new ki({reason:"Contract address not found"});if(!s)throw new ki({reason:"Token ID not found"});if(!i)throw new ki({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function i7(e,{nft:t}){if(t.namespace==="erc721")return zr(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return zr(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new Jk({namespace:t.namespace})}async function c7(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l7(e,{gatewayUrls:t,record:r}):Qp({uri:r,gatewayUrls:t})}async function l7(e,{gatewayUrls:t,record:r}){const n=o7(r),s=await i7(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=Gy({uri:s,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const l=i?atob(a.replace("data:application/json;base64,","")):a,u=JSON.parse(l);return Qp({uri:jy(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),a7({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function Vy(e,t){const{blockNumber:r,blockTag:n,key:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ka({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>a.endsWith(d)))return null;try{const d={address:l,abi:wy,args:[Fe(Zp(a)),dr({abi:vy,functionName:"text",args:[Yp(a),s]}),o??[Ei]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},h=await ne(e,zr,"readContract")(d);if(h[0]==="0x")return null;const y=qs({abi:vy,functionName:"text",data:h[0]});return y===""?null:y}catch(d){if(i)throw d;if(Wp(d))return null;throw d}}async function u7(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await ne(e,Vy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await c7(e,{record:c,gatewayUrls:n})}catch{return null}}async function d7(e,t){const{address:r,blockNumber:n,blockTag:s,coinType:a=60n,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ka({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:Ak,args:[r,a,o??[Ei]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=ne(e,zr,"readContract"),[f]=await d(u);return f||null}catch(u){if(i)throw u;if(Wp(u))return null;throw u}}async function p7(e,t){const{blockNumber:r,blockTag:n,name:s}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return Ka({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),i=a==null?void 0:a.ensTlds;if(i&&!i.some(l=>s.endsWith(l)))throw new Error(`${s} is not a valid ENS TLD (${i==null?void 0:i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);const[c]=await ne(e,zr,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Fe(Zp(s))],blockNumber:r,blockTag:n});return c}async function Wy(e,t){var E,v,w;const{account:r=e.account,blockNumber:n,blockTag:s="latest",blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:h,...y}=t,g=r?Ye(r):void 0;try{en(t);const C=(typeof n=="bigint"?q(n):void 0)||s,D=(w=(v=(E=e.chain)==null?void 0:E.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,T=(D||Mr)({...js(y,{format:D}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:h},"createAccessList"),m=await e.request({method:"eth_createAccessList",params:[T,C]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(A){throw Mp(A,{...t,account:g,chain:e.chain})}}async function f7(e){const t=qc(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function qy(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=qc(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>Ho({abi:[h],eventName:h.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?q(a):a,toBlock:typeof i=="bigint"?q(i):i,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:d,request:l(d),strict:!!o,toBlock:i,type:"event"}}async function Ky(e){const t=qc(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function h7(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?q(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function m7(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function b7(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?q(r):void 0;let a;return t?a=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):a=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),ir(a)}async function gl(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?q(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}class y7 extends ${constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function g7(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await ne(e,zr,"readContract")({abi:x7,address:r,functionName:"eip712Domain",factory:n,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:a}}catch(a){const o=a;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new y7({address:r}):o}}const x7=[{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"}];function w7(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(r=>r.map(n=>BigInt(n)))}}async function v7(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?q(r):void 0,o=await e.request({method:"eth_feeHistory",params:[q(t),a||n,s]},{dedupe:!!a});return w7(o)}async function E7(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>tn(a));return t.abi?vp({abi:t.abi,logs:s,strict:r}):s}function k7(e){const{authorizationList:t}=e;if(t)for(const r of t){const{chainId:n}=r,s=r.address;if(!nt(s))throw new Ct({address:s});if(n<0)throw new qa({chainId:n})}Jp(e)}function C7(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Wb;for(const r of t){const n=ut(r),s=ir(Ls(r,0,1));if(n!==32)throw new HE({hash:r,size:n});if(s!==Vb)throw new $E({hash:r,version:s})}}Jp(e)}function Jp(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new qa({chainId:t});if(s&&!nt(s))throw new Ct({address:s});if(n&&n>Vs)throw new rs({maxFeePerGas:n});if(r&&n&&r>n)throw new $a({maxFeePerGas:n,maxPriorityFeePerGas:r})}function T7(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(t<=0)throw new qa({chainId:t});if(a&&!nt(a))throw new Ct({address:a});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Vs)throw new rs({maxFeePerGas:n})}function A7(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(a&&!nt(a))throw new Ct({address:a});if(typeof t<"u"&&t<=0)throw new qa({chainId:t});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Vs)throw new rs({maxFeePerGas:n})}function Ci(e){if(!e||e.length===0)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:s}=e[r];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new aE({storageKey:s[a]});if(!nt(n,{strict:!1}))throw new Ct({address:n});t.push([n,s])}return t}function xl(e,t){const r=bp(e);return r==="eip1559"?I7(e,t):r==="eip2930"?B7(e,t):r==="eip4844"?P7(e,t):r==="eip7702"?S7(e,t):F7(e,t)}function S7(e,t){const{authorizationList:r,chainId:n,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;k7(e);const f=Ci(u),h=U7(r);return ur(["0x04",Jr([q(n),a?q(a):"0x",l?q(l):"0x",c?q(c):"0x",s?q(s):"0x",o??"0x",i?q(i):"0x",d??"0x",f,h,...Za(e,t)])])}function P7(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;C7(e);let f=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof f>"u"||typeof h>"u")){const A=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>vt(z)),C=e.kzg,D=pp({blobs:A,kzg:C});if(typeof f>"u"&&(f=Rb({commitments:D})),typeof h>"u"){const z=fp({blobs:A,commitments:D,kzg:C});h=qb({blobs:A,commitments:D,proofs:z})}}const y=Ci(u),g=[q(r),s?q(s):"0x",l?q(l):"0x",c?q(c):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",d??"0x",y,i?q(i):"0x",f??[],...Za(e,t)],E=[],v=[],w=[];if(h)for(let A=0;A<h.length;A++){const{blob:C,commitment:D,proof:z}=h[A];E.push(C),v.push(D),w.push(z)}return ur(["0x03",Jr(h?[g,E,v,w]:g)])}function I7(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:u}=e;Jp(e);const d=Ci(l),f=[q(r),s?q(s):"0x",c?q(c):"0x",i?q(i):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",u??"0x",d,...Za(e,t)];return ur(["0x02",Jr(f)])}function B7(e,t){const{chainId:r,gas:n,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;T7(e);const u=Ci(c),d=[q(r),a?q(a):"0x",l?q(l):"0x",n?q(n):"0x",o??"0x",i?q(i):"0x",s??"0x",u,...Za(e,t)];return ur(["0x01",Jr(d)])}function F7(e,t){const{chainId:r=0,gas:n,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;A7(e);let l=[a?q(a):"0x",c?q(c):"0x",n?q(n):"0x",o??"0x",i?q(i):"0x",s??"0x"];if(t){const u=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new nE({v:t.v});return h})(),d=Xt(t.r),f=Xt(t.s);l=[...l,q(u),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else r>0&&(l=[...l,q(r),"0x","0x"]);return Jr(l)}function Za(e,t){const r=t??e,{v:n,yParity:s}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof s>"u")return[];const a=Xt(r.r),o=Xt(r.s);return[typeof s=="number"?s?q(1):"0x":n===0n?"0x":n===1n?q(1):n===27n?"0x":q(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}function U7(e){if(!e||e.length===0)return[];const t=[];for(const r of e){const{chainId:n,nonce:s,...a}=r,o=r.address;t.push([n?Fe(n):"0x",o,s?Fe(s):"0x",...Za({},a)])}return t}async function O7({address:e,authorization:t,signature:r}){return Ga(Nd(e),await Yc({authorization:t,signature:r}))}const wl=new _a(8192);function D7(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(wl.get(r))return wl.get(r);const n=e().finally(()=>wl.delete(r));return wl.set(r,n),n}function _7(e,t={}){return async(r,n={})=>{var d;const{dedupe:s=!1,methods:a,retryDelay:o=150,retryCount:i=3,uid:c}={...t,...n},{method:l}=r;if((d=a==null?void 0:a.exclude)!=null&&d.includes(l))throw new $s(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new $s(new Error("method not supported"),{method:l});const u=s?Ba(`${c}.${mt(r)}`):void 0;return D7(()=>hl(async()=>{try{return await e(r)}catch(f){const h=f;switch(h.code){case Wo.code:throw new Wo(h);case qo.code:throw new qo(h);case Ko.code:throw new Ko(h,{method:r.method});case Yo.code:throw new Yo(h);case Hs.code:throw new Hs(h);case ts.code:throw new ts(h);case Zo.code:throw new Zo(h);case Xo.code:throw new Xo(h);case Qo.code:throw new Qo(h);case $s.code:throw new $s(h,{method:r.method});case Na.code:throw new Na(h);case Jo.code:throw new Jo(h);case La.code:throw new La(h);case ei.code:throw new ei(h);case ti.code:throw new ti(h);case ri.code:throw new ri(h);case ni.code:throw new ni(h);case si.code:throw new si(h);case za.code:throw new za(h);case ai.code:throw new ai(h);case oi.code:throw new oi(h);case ii.code:throw new ii(h);case ci.code:throw new ci(h);case li.code:throw new li(h);case Ra.code:throw new Ra(h);case 5e3:throw new La(h);default:throw f instanceof $?f:new pE(h)}}},{delay:({count:f,error:h})=>{var y;if(h&&h instanceof Rs){const g=(y=h==null?void 0:h.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<f)*o},retryCount:i,shouldRetry:({error:f})=>M7(f)}),{enabled:s,id:u})}}function M7(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Na.code||e.code===Hs.code:e instanceof Rs&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}class N7 extends ${constructor({callbackSelector:t,cause:r,data:n,extraData:s,sender:a,urls:o}){var i;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(i=r.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(c=>` ${Vo(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class L7 extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Vo(r)}`,`Response: ${mt(t)}`],name:"OffchainLookupResponseMalformedError"})}}class z7 extends ${constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}const R7="0x556f1830",Yy={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function H7(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=yb({data:n,abi:[Yy]}),[o,i,c,l,u]=a,{ccipRead:d}=e,f=d&&typeof(d==null?void 0:d.request)=="function"?d.request:Zy;try{if(!Ga(s,o))throw new z7({sender:o,to:s});const h=i.includes(Ei)?await Ry({data:c,ccipRequest:f}):await f({data:c,sender:o,urls:i}),{data:y}=await xi(e,{blockNumber:t,blockTag:r,data:lr([l,es([{type:"bytes"},{type:"bytes"}],[h,u])]),to:s});return y}catch(h){throw new N7({callbackSelector:l,cause:h,data:n,extraData:u,sender:o,urls:i})}}async function Zy({data:e,sender:t,urls:r}){var s;let n=new Error("An unknown error occurred.");for(let a=0;a<r.length;a++){const o=r[a],i=o.includes("{data}")?"GET":"POST",c=i==="POST"?{data:e,sender:t}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const u=await fetch(o.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:l,method:i});let d;if((s=u.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?d=(await u.json()).data:d=await u.text(),!u.ok){n=new Rs({body:c,details:d!=null&&d.error?mt(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Dr(d)){n=new L7({result:d,url:o});continue}return d}catch(u){n=new Rs({body:c,details:u.message,url:o})}}throw n}const $7=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:Zy,offchainLookup:H7,offchainLookupAbiItem:Yy,offchainLookupSignature:R7},Symbol.toStringTag,{value:"Module"}));function p(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(n){return s=>{const a=typeof s=="function"?s(n):s,o={...n,...a};return Object.assign(o,{extend:r(o)})}}return Object.assign(t,{extend:r(t)})}function G7(){return{}}function j7(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((s,a)=>{(async()=>{let o;try{const i=new AbortController;r>0&&(o=setTimeout(()=>{n&&i.abort()},r)),s(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}function V7(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Xy=V7();function W7(e,t={}){return{async request(r){var f;const{body:n,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:o=t.onResponse,timeout:i=t.timeout??1e4}=r,c={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:d}=c;try{const h=await j7(async({signal:g})=>{const E={...c,body:Array.isArray(n)?mt(n.map(C=>({jsonrpc:"2.0",id:C.id??Xy.take(),...C}))):mt({jsonrpc:"2.0",id:n.id??Xy.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,E),w=await(a==null?void 0:a(v,E))??{...E,url:e};return await s(w.url??e,w)},{errorInstance:new Tb({body:n,url:e}),timeout:i,signal:!0});o&&await o(h);let y;if((f=h.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))y=await h.json();else{y=await h.text();try{y=JSON.parse(y||"{}")}catch(g){if(h.ok)throw g;y={error:y}}}if(!h.ok)throw new Rs({body:n,details:mt(y.error)||h.statusText,headers:h.headers,status:h.status,url:e});return y}catch(h){throw h instanceof Rs||h instanceof Tb?h:new Rs({body:n,cause:h,url:e})}}}}const q7=`Ethereum Signed Message:
105
105
  `;function K7(e){const t=typeof e=="string"?Ba(e):typeof e.raw=="string"?e.raw:vt(e.raw),r=Ba(`${q7}${ut(t)}`);return lr([r,t])}function Qy(e,t){return Ut(K7(e),t)}class Y7 extends ${constructor({domain:t}){super(`Invalid domain "${mt(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Z7 extends ${constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class X7 extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Q7(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:f,type:h}=d;h==="address"&&(u[f]=u[f].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return mt({domain:o,message:i,primaryType:n,types:s})}function Jy(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(o,i)=>{for(const c of o){const{name:l,type:u}=c,d=i[l],f=u.match(ib);if(f&&(typeof d=="number"||typeof d=="bigint")){const[g,E,v]=f;q(d,{signed:E==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!nt(d))throw new Ct({address:d});const h=u.match(Pv);if(h){const[g,E]=h;if(E&&ut(d)!==Number.parseInt(E,10))throw new U8({expectedSize:Number.parseInt(E,10),givenSize:ut(d)})}const y=s[u];y&&(J7(u),a(y,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new Y7({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new Z7({primaryType:n,types:s})}function eg({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function J7(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new X7({type:e})}function eC(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:eg({domain:t}),...e.types};Jy({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(tC({domain:t,types:s})),n!=="EIP712Domain"&&a.push(tg({data:r,primaryType:n,types:s})),Ut(lr(a))}function tC({domain:e,types:t}){return tg({data:e,primaryType:"EIP712Domain",types:t})}function tg({data:e,primaryType:t,types:r}){const n=rg({data:e,primaryType:t,types:r});return Ut(n)}function rg({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[rC({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=sg({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return es(n,s)}function rC({primaryType:e,types:t}){const r=Fe(nC({primaryType:e,types:t}));return Ut(r)}function nC({primaryType:e,types:t}){let r="";const n=ng({primaryType:e,types:t});n.delete(e);const s=[e,...Array.from(n).sort()];for(const a of s)r+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return r}function ng({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||t[s]===void 0)return r;r.add(s);for(const a of t[s])ng({primaryType:a.type,types:t},r);return r}function sg({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},Ut(rg({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},Ut(n)];if(r==="string")return[{type:"bytes32"},Ut(Fe(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>sg({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},Ut(es(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}class sC extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const ef={checksum:new sC(8192)}.checksum;function Ti(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=rb(Bp(e));return r==="Bytes"?n:Pt(n)}function aC(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=Lb(Bp(e));return r==="Bytes"?n:Pt(n)}function oC(e){return Lr(e)&&bt(e)===32}function ag(e,t={}){const{compressed:r}=t,{prefix:n,x:s,y:a}=e;if(r===!1||typeof s=="bigint"&&typeof a=="bigint"){if(n!==4)throw new ig({prefix:n,cause:new pC});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new ig({prefix:n,cause:new dC});return}throw new uC({publicKey:e})}function iC(e){const t=(()=>{if(Lr(e))return og(e);if(mk(e))return cC(e);const{prefix:r,x:n,y:s}=e;return typeof n=="bigint"&&typeof s=="bigint"?{prefix:r??4,x:n,y:s}:{prefix:r,x:n}})();return ag(t),t}function cC(e){return og(Pt(e))}function og(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new fC({publicKey:e});if(e.length===130){const n=BigInt(Pe(e,0,32)),s=BigInt(Pe(e,32,64));return{prefix:4,x:n,y:s}}if(e.length===132){const n=Number(Pe(e,0,1)),s=BigInt(Pe(e,1,33)),a=BigInt(Pe(e,33,65));return{prefix:n,x:s,y:a}}const t=Number(Pe(e,0,1)),r=BigInt(Pe(e,1,33));return{prefix:t,x:r}}function lC(e,t={}){return cs(tf(e,t))}function tf(e,t={}){ag(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return pt(a?Z(r,{size:1}):"0x",Z(n,{size:32}),typeof s=="bigint"?Z(s,{size:32}):"0x")}class uC extends ae{constructor({publicKey:t}){super(`Value \`${bi(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class ig extends ae{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class dC extends ae{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class pC extends ae{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let fC=class extends ae{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${bt(cl(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const hC=/^0x[a-fA-F0-9]{40}$/;function Rr(e,t={}){const{strict:r=!0}=t;if(!hC.test(e))throw new cg({address:e,cause:new bC});if(r){if(e.toLowerCase()===e)return;if(rf(e)!==e)throw new cg({address:e,cause:new yC})}}function rf(e){if(ef.has(e))return ef.get(e);Rr(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=Ti(cy(t),{as:"Bytes"}),n=t.split("");for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&n[a]&&(n[a]=n[a].toUpperCase()),(r[a>>1]&15)>=8&&n[a+1]&&(n[a+1]=n[a+1].toUpperCase());const s=`0x${n.join("")}`;return ef.set(e,s),s}function mC(e,t={}){const{checksum:r=!1}=t;return Rr(e),r?rf(e):e}function vl(e,t={}){const r=Ti(`0x${tf(e).slice(4)}`).substring(26);return mC(`0x${r}`,t)}function nf(e,t){return Rr(e,{strict:!1}),Rr(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function El(e,t={}){const{strict:r=!0}=t??{};try{return Rr(e,{strict:r}),!0}catch{return!1}}class cg extends ae{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class bC extends ae{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 yC extends ae{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const gC=/^(.*)\[([0-9]*)\]$/,xC=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,lg=/^(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)?$/,ug=2n**256n-1n;function Xa(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=cf(t.type);if(a){const[o,i]=a;return vC(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return TC(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return wC(e,{checksum:n});if(t.type==="bool")return EC(e);if(t.type.startsWith("bytes"))return kC(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return CC(e,t);if(t.type==="string")return AC(e,{staticPosition:s});throw new pf(t.type)}const dg=32,sf=32;function wC(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?rf(a):a)(Pt(dk(n,-20))),32]}function vC(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=An(e.readBytes(sf)),l=a+c,u=l+dg;e.setPosition(l);const d=An(e.readBytes(dg)),f=Ai(t);let h=0;const y=[];for(let g=0;g<d;++g){e.setPosition(u+(f?g*32:h));const[E,v]=Xa(e,t,{checksumAddress:n,staticPosition:u});h+=v,y.push(E)}return e.setPosition(a+32),[y,32]}if(Ai(t)){const c=An(e.readBytes(sf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[f]=Xa(e,t,{checksumAddress:n,staticPosition:l});u.push(f)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=Xa(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function EC(e){return[fk(e.readBytes(32),{size:32}),32]}function kC(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=An(e.readBytes(32));e.setPosition(r+o);const i=An(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[Pt(c),32]}return[Pt(e.readBytes(Number.parseInt(s,10),32)),32]}function CC(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?pk(s,{signed:r}):An(s,{signed:r}),32]}function TC(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=t.components.length===0||t.components.some(({name:c})=>!c),o=a?[]:{};let i=0;if(Ai(t)){const c=An(e.readBytes(sf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[f,h]=Xa(e,d,{checksumAddress:n,staticPosition:l});i+=h,o[a?u:d==null?void 0:d.name]=f}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=Xa(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function AC(e,{staticPosition:t}){const r=An(e.readBytes(32)),n=t+r;e.setPosition(n);const s=An(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=hk(ly(a));return e.setPosition(t+32),[o,32]}function SC({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(af({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function af({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=cf(n.type);if(s){const[a,o]=s;return IC(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return DC(r,{checksumAddress:e,parameter:n});if(n.type==="address")return PC(r,{checksum:e});if(n.type==="bool")return FC(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=lg.exec(n.type)??[];return UC(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return BC(r,{type:n.type});if(n.type==="string")return OC(r);throw new pf(n.type)}function of(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=bt(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(Z(t+s,{size:32})),n.push(i),s+=bt(i)):r.push(i)}return pt(...r,...n)}function PC(e,t){const{checksum:r=!1}=t;return Rr(e,{strict:r}),{dynamic:!1,encoded:Ys(e.toLowerCase())}}function IC(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new $C(e);if(!a&&e.length!==n)throw new HC({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=af({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=of(i);if(a){const l=Z(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?pt(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:pt(...i.map(({encoded:c})=>c))}}function BC(e,{type:t}){const[,r]=t.split("bytes"),n=bt(e);if(!r){let s=e;return n%32!==0&&(s=Zs(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:pt(Ys(Z(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new hg({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Zs(e)}}function FC(e){if(typeof e!="boolean")throw new ae(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ys(dy(e))}}function UC(e,{signed:t,size:r}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new hy({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:Z(e,{size:32,signed:t})}}function OC(e){const t=yi(e),r=Math.ceil(bt(t)/32),n=[];for(let s=0;s<r;s++)n.push(Zs(Pe(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:pt(Zs(Z(bt(t),{size:32})),...n)}}function DC(e,t){const{checksumAddress:r,parameter:n}=t;let s=!1;const a=[];for(let o=0;o<n.components.length;o++){const i=n.components[o],c=Array.isArray(e)?o:i.name,l=af({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?of(a):pt(...a.map(({encoded:o})=>o))}}function cf(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ai(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(Ai);const r=cf(e.type);return!!(r&&Ai({...e,type:r[1]}))}const _C={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 NC({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new MC({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new pg({offset:e});const 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 pg({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function lf(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(_C);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class pg extends ae{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class MC extends ae{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class NC extends ae{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function LC(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?cs(t):t,o=lf(a);if(Wa(a)===0&&e.length>0)throw new RC;if(Wa(a)&&Wa(a)<32)throw new zC({data:typeof t=="string"?t:Pt(t),parameters:e,size:Wa(a)});let i=0;const c=n==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];o.setPosition(i);const[d,f]=Xa(o,u,{checksumAddress:s,staticPosition:0});i+=f,n==="Array"?c.push(d):c[u.name??l]=d}return c}function uf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new mg({expectedLength:e.length,givenLength:t.length});const s=SC({checksumAddress:n,parameters:e,values:t}),a=of(s);return a.length===0?"0x":a}function df(e,t){if(e.length!==t.length)throw new mg({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const s=e[n],a=t[n];r.push(df.encode(s,a))}return pt(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return Rr(c),Ys(c.toLowerCase(),s?32:0)}if(r==="string")return yi(n);if(r==="bytes")return n;if(r==="bool")return Ys(dy(n),s?32:1);const a=r.match(lg);if(a){const[c,l,u="256"]=a,d=Number.parseInt(u,10)/8;return Z(n,{size:s?32:d,signed:l==="int"})}const o=r.match(xC);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new hg({expectedSize:Number.parseInt(l,10),value:n});return Zs(n,s?32:0)}const i=r.match(gC);if(i&&Array.isArray(n)){const[c,l]=i,u=[];for(let d=0;d<n.length;d++)u.push(t(l,n[d],!0));return u.length===0?"0x":pt(...u)}throw new pf(r)}e.encode=t})(df||(df={}));function fg(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?P1(e):e}class zC extends ae{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Sa(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class RC extends ae{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class HC extends ae{constructor({expectedLength:t,givenLength:r,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class hg extends ae{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${bt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class mg extends ae{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
106
106
  `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class $C extends ae{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class pf extends ae{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function GC(e){return jC(e,"Hex")}function jC(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new Ek(e);return cs(e)}return e})(),s=lf(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return bg(s,r)}function bg(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Pt(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=yg(e,r,128),a=e.readBytes(s);return t==="Hex"?Pt(a):a}const n=yg(e,r,192);return VC(e,n,t)}function yg(e,t,r){if(r===128&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new ae("Invalid RLP prefix")}function VC(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(bg(e,r));return s}function WC(e,t){const{as:r}=t,n=gg(e),s=lf(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Pt(s.bytes):s.bytes}function qC(e,t={}){const{as:r="Hex"}=t;return WC(e,{as:r})}function gg(e){return Array.isArray(e)?KC(e.map(t=>gg(t))):YC(e)}function KC(e){const t=e.reduce((s,a)=>s+a.length,0),r=xg(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function YC(e){const t=typeof e=="string"?cs(e):e,r=xg(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function xg(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new ae("Length is too large.")}class wg extends Dd{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,av(t);const n=jc(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,a=new Uint8Array(s);a.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=t.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),Jn(a)}update(t){return Da(this),this.iHash.update(t),this}digestInto(t){Da(this),Ns(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:a,blockLen:o,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=o,t.outputLen=i,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const vg=(e,t,r)=>new wg(e,t).update(r).digest();vg.create=(e,t)=>new wg(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const er=BigInt(0),Vt=BigInt(1),Qs=BigInt(2),ZC=BigInt(3),Eg=BigInt(4),kg=BigInt(5),Cg=BigInt(8);function tr(e,t){const r=e%t;return r>=er?r:t+r}function Er(e,t,r){let n=e;for(;t-- >er;)n*=n,n%=r;return n}function ff(e,t){if(e===er)throw new Error("invert: expected non-zero number");if(t<=er)throw new Error("invert: expected positive modulus, got "+t);let r=tr(e,t),n=t,s=er,a=Vt;for(;r!==er;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==Vt)throw new Error("invert: does not exist");return tr(s,t)}function Tg(e,t){const r=(e.ORDER+Vt)/Eg,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function XC(e,t){const r=(e.ORDER-kg)/Cg,n=e.mul(t,Qs),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,Qs),s),i=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function QC(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Vt,r=0;for(;t%Qs===er;)t/=Qs,r++;let n=Qs;const s=Qa(e);for(;Sg(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Tg;let a=s.pow(n,t);const o=(t+Vt)/Qs;return function(c,l){if(c.is0(l))return l;if(Sg(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),f=c.pow(l,t),h=c.pow(l,o);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let y=1,g=c.sqr(f);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===u)throw new Error("Cannot find square root");const E=Vt<<BigInt(u-y-1),v=c.pow(d,E);u=y,d=c.sqr(v),f=c.mul(f,d),h=c.mul(h,v)}return h}}function JC(e){return e%Eg===ZC?Tg:e%Cg===kg?XC:QC(e)}const e9=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function t9(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=e9.reduce((n,s)=>(n[s]="function",n),t);return al(e,r)}function r9(e,t,r){if(r<er)throw new Error("invalid exponent, negatives unsupported");if(r===er)return e.ONE;if(r===Vt)return t;let n=e.ONE,s=t;for(;r>er;)r&Vt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=Vt;return n}function Ag(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),s=t.reduce((o,i,c)=>e.is0(i)?o:(n[c]=o,e.mul(o,i)),e.ONE),a=e.inv(s);return t.reduceRight((o,i,c)=>e.is0(i)?o:(n[c]=e.mul(o,n[c]),e.mul(o,i)),a),n}function Sg(e,t){const r=(e.ORDER-Vt)/Qs,n=e.pow(t,r),s=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!s&&!a&&!o)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function Pg(e,t){t!==void 0&&No(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Qa(e,t,r=!1,n={}){if(e<=er)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=Pg(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const i=Object.freeze({ORDER:e,isLE:r,BITS:s,BYTES:a,MASK:sl(s),ZERO:er,ONE:Vt,create:c=>tr(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return er<=c&&c<e},is0:c=>c===er,isOdd:c=>(c&Vt)===Vt,neg:c=>tr(-c,e),eql:(c,l)=>c===l,sqr:c=>tr(c*c,e),add:(c,l)=>tr(c+l,e),sub:(c,l)=>tr(c-l,e),mul:(c,l)=>tr(c*l,e),pow:(c,l)=>r9(i,c,l),div:(c,l)=>tr(c*ff(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>ff(c,e),sqrt:n.sqrt||(c=>(o||(o=JC(e)),o(i,c))),toBytes:c=>r?ty(c,a):mi(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?ey(c):Ks(c)},invertBatch:c=>Ag(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function Ig(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Bg(e){const t=Ig(e);return t+Math.ceil(t/2)}function n9(e,t,r=!1){const n=e.length,s=Ig(t),a=Bg(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?ey(e):Ks(e),i=tr(o,t-Vt)+Vt;return r?ty(i,s):mi(i,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fg=BigInt(0),hf=BigInt(1);function mf(e,t){const r=t.negate();return e?r:t}function Ug(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function bf(e,t){Ug(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=sl(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function Og(e,t,r){const{windowSize:n,mask:s,maxNumber:a,shiftBy:o}=r;let i=Number(e&s),c=e>>o;i>n&&(i-=a,c+=hf);const l=t*n,u=l+Math.abs(i)-1,d=i===0,f=i<0,h=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:h,offsetF:l}}function s9(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function a9(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const yf=new WeakMap,Dg=new WeakMap;function gf(e){return Dg.get(e)||1}function o9(e,t){return{constTimeNegate:mf,hasPrecomputes(r){return gf(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>Fg;)n&hf&&(s=s.add(a)),a=a.double(),n>>=hf;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=bf(n,t),o=[];let i=r,c=i;for(let l=0;l<s;l++){c=i,o.push(c);for(let u=1;u<a;u++)c=c.add(i),o.push(c);i=c.double()}return o},wNAF(r,n,s){let a=e.ZERO,o=e.BASE;const i=bf(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:f,isNegF:h,offsetF:y}=Og(s,c,i);s=l,d?o=o.add(mf(h,n[y])):a=a.add(mf(f,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=bf(r,t);for(let i=0;i<o.windows&&s!==Fg;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=Og(s,i,o);if(s=c,!u){const f=n[l];a=a.add(d?f.negate():f)}}return a},getPrecomputes(r,n,s){let a=yf.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&yf.set(n,s(a))),a},wNAFCached(r,n,s){const a=gf(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=gf(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Ug(n,t),Dg.set(r,n),yf.delete(r)}}}function i9(e,t,r,n){s9(r,e),a9(n,t);const s=r.length,a=n.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=KE(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=sl(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let f=o;for(let h=d;h>=0;h-=c){u.fill(o);for(let g=0;g<a;g++){const E=n[g],v=Number(E>>BigInt(h)&l);u[v]=u[v].add(r[g])}let y=o;for(let g=u.length-1,E=o;g>0;g--)E=E.add(u[g]),y=y.add(E);if(f=f.add(y),h!==0)for(let g=0;g<c;g++)f=f.double()}return f}function _g(e){return t9(e.Fp),al(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Pg(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Mg(e){e.lowS!==void 0&&fi("lowS",e.lowS),e.prehash!==void 0&&fi("prehash",e.prehash)}function c9(e){const t=_g(e);al(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class l9 extends Error{constructor(t=""){super(t)}}const In={Err:l9,_tlv:{encode:(e,t)=>{const{Err:r}=In;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,s=tl(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?tl(s.length/2|128):"";return tl(e)+a+s+t},decode(e,t){const{Err:r}=In;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[n++],a=!!(s&128);let o=0;if(!a)o=s;else{const c=s&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=t.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const i=t.subarray(n,n+o);if(i.length!==o)throw new r("tlv.decode: wrong value length");return{v:i,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=In;if(e<Bn)throw new t("integer: negative integers are not allowed");let r=tl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=In;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Ks(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=In,s=vr("signature",e),{v:a,l:o}=n.decode(48,s);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:i,l:c}=n.decode(2,a),{v:l,l:u}=n.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(i),s:r.decode(l)}},hexFromSig(e){const{_tlv:t,_int:r}=In,n=t.encode(2,r.encode(e.r)),s=t.encode(2,r.encode(e.s)),a=n+s;return t.encode(48,a)}};function xf(e,t){return hi(mi(e,t))}const Bn=BigInt(0),It=BigInt(1);BigInt(2);const wf=BigInt(3),u9=BigInt(4);function d9(e){const t=c9(e),{Fp:r}=t,n=Qa(t.n,t.nBitLength),s=t.toBytes||((A,C,D)=>{const z=C.toAffine();return nl(Uint8Array.from([4]),r.toBytes(z.x),r.toBytes(z.y))}),a=t.fromBytes||(A=>{const C=A.subarray(1),D=r.fromBytes(C.subarray(0,r.BYTES)),z=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:D,y:z}});function o(A){const{a:C,b:D}=t,z=r.sqr(A),T=r.mul(z,A);return r.add(r.add(T,r.mul(A,C)),D)}function i(A,C){const D=r.sqr(C),z=o(A);return r.eql(D,z)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,wf),u9),l=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error("bad curve params: a or b");function u(A){return Pp(A,It,t.n)}function d(A){const{allowedPrivateKeyLengths:C,nByteLength:D,wrapPrivateKey:z,n:T}=t;if(C&&typeof A!="bigint"){if(pi(A)&&(A=hi(A)),typeof A!="string"||!C.includes(A.length))throw new Error("invalid private key");A=A.padStart(D*2,"0")}let m;try{m=typeof A=="bigint"?A:Ks(vr("private key",A,D))}catch{throw new Error("invalid private key, expected hex or "+D+" bytes, got "+typeof A)}return z&&(m=tr(m,T)),ja("private key",m,It,T),m}function f(A){if(!(A instanceof g))throw new Error("ProjectivePoint expected")}const h=ny((A,C)=>{const{px:D,py:z,pz:T}=A;if(r.eql(T,r.ONE))return{x:D,y:z};const m=A.is0();C==null&&(C=m?r.ONE:r.inv(T));const b=r.mul(D,C),x=r.mul(z,C),S=r.mul(T,C);if(m)return{x:r.ZERO,y:r.ZERO};if(!r.eql(S,r.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=ny(A=>{if(A.is0()){if(t.allowInfinityPoint&&!r.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:C,y:D}=A.toAffine();if(!r.isValid(C)||!r.isValid(D))throw new Error("bad point: x or y not FE");if(!i(C,D))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(C,D,z){if(C==null||!r.isValid(C))throw new Error("x required");if(D==null||!r.isValid(D)||r.is0(D))throw new Error("y required");if(z==null||!r.isValid(z))throw new Error("z required");this.px=C,this.py=D,this.pz=z,Object.freeze(this)}static fromAffine(C){const{x:D,y:z}=C||{};if(!C||!r.isValid(D)||!r.isValid(z))throw new Error("invalid affine point");if(C instanceof g)throw new Error("projective point not allowed");const T=m=>r.eql(m,r.ZERO);return T(D)&&T(z)?g.ZERO:new g(D,z,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const D=Ag(r,C.map(z=>z.pz));return C.map((z,T)=>z.toAffine(D[T])).map(g.fromAffine)}static fromHex(C){const D=g.fromAffine(a(vr("pointHex",C)));return D.assertValidity(),D}static fromPrivateKey(C){return g.BASE.multiply(d(C))}static msm(C,D){return i9(g,n,C,D)}_setWindowSize(C){w.setWindowSize(this,C)}assertValidity(){y(this)}hasEvenY(){const{y:C}=this.toAffine();if(r.isOdd)return!r.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){f(C);const{px:D,py:z,pz:T}=this,{px:m,py:b,pz:x}=C,S=r.eql(r.mul(D,x),r.mul(m,T)),I=r.eql(r.mul(z,x),r.mul(b,T));return S&&I}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:C,b:D}=t,z=r.mul(D,wf),{px:T,py:m,pz:b}=this;let x=r.ZERO,S=r.ZERO,I=r.ZERO,F=r.mul(T,T),_=r.mul(m,m),k=r.mul(b,b),P=r.mul(T,m);return P=r.add(P,P),I=r.mul(T,b),I=r.add(I,I),x=r.mul(C,I),S=r.mul(z,k),S=r.add(x,S),x=r.sub(_,S),S=r.add(_,S),S=r.mul(x,S),x=r.mul(P,x),I=r.mul(z,I),k=r.mul(C,k),P=r.sub(F,k),P=r.mul(C,P),P=r.add(P,I),I=r.add(F,F),F=r.add(I,F),F=r.add(F,k),F=r.mul(F,P),S=r.add(S,F),k=r.mul(m,b),k=r.add(k,k),F=r.mul(k,P),x=r.sub(x,F),I=r.mul(k,_),I=r.add(I,I),I=r.add(I,I),new g(x,S,I)}add(C){f(C);const{px:D,py:z,pz:T}=this,{px:m,py:b,pz:x}=C;let S=r.ZERO,I=r.ZERO,F=r.ZERO;const _=t.a,k=r.mul(t.b,wf);let P=r.mul(D,m),O=r.mul(z,b),U=r.mul(T,x),L=r.add(D,z),H=r.add(m,b);L=r.mul(L,H),H=r.add(P,O),L=r.sub(L,H),H=r.add(D,T);let G=r.add(m,x);return H=r.mul(H,G),G=r.add(P,U),H=r.sub(H,G),G=r.add(z,T),S=r.add(b,x),G=r.mul(G,S),S=r.add(O,U),G=r.sub(G,S),F=r.mul(_,H),S=r.mul(k,U),F=r.add(S,F),S=r.sub(O,F),F=r.add(O,F),I=r.mul(S,F),O=r.add(P,P),O=r.add(O,P),U=r.mul(_,U),H=r.mul(k,H),O=r.add(O,U),U=r.sub(P,U),U=r.mul(_,U),H=r.add(H,U),P=r.mul(O,H),I=r.add(I,P),P=r.mul(G,H),S=r.mul(L,S),S=r.sub(S,P),P=r.mul(L,O),F=r.mul(G,F),F=r.add(F,P),new g(S,I,F)}subtract(C){return this.add(C.negate())}is0(){return this.equals(g.ZERO)}wNAF(C){return w.wNAFCached(this,C,g.normalizeZ)}multiplyUnsafe(C){const{endo:D,n:z}=t;ja("scalar",C,Bn,z);const T=g.ZERO;if(C===Bn)return T;if(this.is0()||C===It)return this;if(!D||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,C,g.normalizeZ);let{k1neg:m,k1:b,k2neg:x,k2:S}=D.splitScalar(C),I=T,F=T,_=this;for(;b>Bn||S>Bn;)b&It&&(I=I.add(_)),S&It&&(F=F.add(_)),_=_.double(),b>>=It,S>>=It;return m&&(I=I.negate()),x&&(F=F.negate()),F=new g(r.mul(F.px,D.beta),F.py,F.pz),I.add(F)}multiply(C){const{endo:D,n:z}=t;ja("scalar",C,It,z);let T,m;if(D){const{k1neg:b,k1:x,k2neg:S,k2:I}=D.splitScalar(C);let{p:F,f:_}=this.wNAF(x),{p:k,f:P}=this.wNAF(I);F=w.constTimeNegate(b,F),k=w.constTimeNegate(S,k),k=new g(r.mul(k.px,D.beta),k.py,k.pz),T=F.add(k),m=_.add(P)}else{const{p:b,f:x}=this.wNAF(C);T=b,m=x}return g.normalizeZ([T,m])[0]}multiplyAndAddUnsafe(C,D,z){const T=g.BASE,m=(x,S)=>S===Bn||S===It||!x.equals(T)?x.multiplyUnsafe(S):x.multiply(S),b=m(this,D).add(m(C,z));return b.is0()?void 0:b}toAffine(C){return h(this,C)}isTorsionFree(){const{h:C,isTorsionFree:D}=t;if(C===It)return!0;if(D)return D(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:D}=t;return C===It?this:D?D(g,this):this.multiplyUnsafe(t.h)}toRawBytes(C=!0){return fi("isCompressed",C),this.assertValidity(),s(g,this,C)}toHex(C=!0){return fi("isCompressed",C),hi(this.toRawBytes(C))}}g.BASE=new g(t.Gx,t.Gy,r.ONE),g.ZERO=new g(r.ZERO,r.ONE,r.ZERO);const{endo:E,nBitLength:v}=t,w=o9(g,E?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function p9(e){const t=_g(e);return al(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function f9(e){const t=p9(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(k){return tr(k,n)}function l(k){return ff(k,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:h}=d9({...t,toBytes(k,P,O){const U=P.toAffine(),L=r.toBytes(U.x),H=nl;return fi("isCompressed",O),O?H(Uint8Array.from([P.hasEvenY()?2:3]),L):H(Uint8Array.from([4]),L,r.toBytes(U.y))},fromBytes(k){const P=k.length,O=k[0],U=k.subarray(1);if(P===o&&(O===2||O===3)){const L=Ks(U);if(!Pp(L,It,r.ORDER))throw new Error("Point is not on curve");const H=f(L);let G;try{G=r.sqrt(H)}catch(me){const ie=me instanceof Error?": "+me.message:"";throw new Error("Point is not on curve"+ie)}const Q=(G&It)===It;return(O&1)===1!==Q&&(G=r.neg(G)),{x:L,y:G}}else if(P===i&&O===4){const L=r.fromBytes(U.subarray(0,r.BYTES)),H=r.fromBytes(U.subarray(r.BYTES,2*r.BYTES));return{x:L,y:H}}else{const L=o,H=i;throw new Error("invalid Point, expected length of "+L+", or uncompressed "+H+", got "+P)}}});function y(k){const P=n>>It;return k>P}function g(k){return y(k)?c(-k):k}const E=(k,P,O)=>Ks(k.slice(P,O));class v{constructor(P,O,U){ja("r",P,It,n),ja("s",O,It,n),this.r=P,this.s=O,U!=null&&(this.recovery=U),Object.freeze(this)}static fromCompact(P){const O=s;return P=vr("compactSignature",P,O*2),new v(E(P,0,O),E(P,O,2*O))}static fromDER(P){const{r:O,s:U}=In.toSig(vr("DER",P));return new v(O,U)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:O,s:U,recovery:L}=this,H=T(vr("msgHash",P));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const G=L===2||L===3?O+t.n:O;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const Q=(L&1)===0?"02":"03",pe=u.fromHex(Q+xf(G,r.BYTES)),me=l(G),ie=c(-H*me),de=c(U*me),Be=u.BASE.multiplyAndAddUnsafe(pe,ie,de);if(!Be)throw new Error("point at infinify");return Be.assertValidity(),Be}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return rl(this.toDERHex())}toDERHex(){return In.hexFromSig(this)}toCompactRawBytes(){return rl(this.toCompactHex())}toCompactHex(){const P=s;return xf(this.r,P)+xf(this.s,P)}}const w={isValidPrivateKey(k){try{return d(k),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const k=Bg(t.n);return n9(t.randomBytes(k),t.n)},precompute(k=8,P=u.BASE){return P._setWindowSize(k),P.multiply(BigInt(3)),P}};function A(k,P=!0){return u.fromPrivateKey(k).toRawBytes(P)}function C(k){if(typeof k=="bigint")return!1;if(k instanceof u)return!0;const O=vr("key",k).length,U=r.BYTES,L=U+1,H=2*U+1;if(!(t.allowedPrivateKeyLengths||s===L))return O===L||O===H}function D(k,P,O=!0){if(C(k)===!0)throw new Error("first arg must be private key");if(C(P)===!1)throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(k)).toRawBytes(O)}const z=t.bits2int||function(k){if(k.length>8192)throw new Error("input is too large");const P=Ks(k),O=k.length*8-a;return O>0?P>>BigInt(O):P},T=t.bits2int_modN||function(k){return c(z(k))},m=sl(a);function b(k){return ja("num < 2^"+a,k,Bn,m),mi(k,s)}function x(k,P,O=S){if(["recovered","canonical"].some(we=>we in O))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:L}=t;let{lowS:H,prehash:G,extraEntropy:Q}=O;H==null&&(H=!0),k=vr("msgHash",k),Mg(O),G&&(k=vr("prehashed msgHash",U(k)));const pe=T(k),me=d(P),ie=[b(me),b(pe)];if(Q!=null&&Q!==!1){const we=Q===!0?L(r.BYTES):Q;ie.push(vr("extraEntropy",we))}const de=nl(...ie),Be=pe;function X(we){const De=z(we);if(!h(De))return;const Ge=l(De),it=u.BASE.multiply(De).toAffine(),Ae=c(it.x);if(Ae===Bn)return;const ve=c(Ge*c(Be+Ae*me));if(ve===Bn)return;let be=(it.x===Ae?0:2)|Number(it.y&It),Xe=ve;return H&&y(ve)&&(Xe=g(ve),be^=1),new v(Ae,Xe,be)}return{seed:de,k2sig:X}}const S={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function F(k,P,O=S){const{seed:U,k2sig:L}=x(k,P,O),H=t;return YE(H.hash.outputLen,H.nByteLength,H.hmac)(U,L)}u.BASE._setWindowSize(8);function _(k,P,O,U=I){var be;const L=k;P=vr("msgHash",P),O=vr("publicKey",O);const{lowS:H,prehash:G,format:Q}=U;if(Mg(U),"strict"in U)throw new Error("options.strict was renamed to lowS");if(Q!==void 0&&Q!=="compact"&&Q!=="der")throw new Error("format must be compact or der");const pe=typeof L=="string"||pi(L),me=!pe&&!Q&&typeof L=="object"&&L!==null&&typeof L.r=="bigint"&&typeof L.s=="bigint";if(!pe&&!me)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,de;try{if(me&&(ie=new v(L.r,L.s)),pe){try{Q!=="compact"&&(ie=v.fromDER(L))}catch(Xe){if(!(Xe instanceof In.Err))throw Xe}!ie&&Q!=="der"&&(ie=v.fromCompact(L))}de=u.fromHex(O)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;G&&(P=t.hash(P));const{r:Be,s:X}=ie,we=T(P),De=l(X),Ge=c(we*De),it=c(Be*De),Ae=(be=u.BASE.multiplyAndAddUnsafe(de,Ge,it))==null?void 0:be.toAffine();return Ae?c(Ae.x)===Be:!1}return{CURVE:t,getPublicKey:A,getSharedSecret:D,sign:F,verify:_,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function h9(e){return{hash:e,hmac:(t,...r)=>vg(e,t,dv(...r)),randomBytes:pv}}function kl(e,t){const r=n=>f9({...e,...h9(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ng=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Lg=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m9=BigInt(0),b9=BigInt(1),vf=BigInt(2),zg=(e,t)=>(e+t/vf)/t;function y9(e){const t=Ng,r=BigInt(3),n=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),i=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=Er(u,r,t)*u%t,f=Er(d,r,t)*u%t,h=Er(f,vf,t)*l%t,y=Er(h,s,t)*h%t,g=Er(y,a,t)*y%t,E=Er(g,i,t)*g%t,v=Er(E,c,t)*E%t,w=Er(v,i,t)*g%t,A=Er(w,r,t)*u%t,C=Er(A,o,t)*y%t,D=Er(C,n,t)*l%t,z=Er(D,vf,t);if(!Ef.eql(Ef.sqr(z),e))throw new Error("Cannot find square root");return z}const Ef=Qa(Ng,void 0,void 0,{sqrt:y9}),Si=kl({a:m9,b:BigInt(7),Fp:Ef,n:Lg,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Lg,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-b9*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=zg(a*e,t),c=zg(-n*e,t);let l=tr(e-i*r-c*s,t),u=tr(-i*n-c*a,t);const d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},hp),g9=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Si},Symbol.toStringTag,{value:"Module"}));function Cl(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new Sf({signature:e});if(typeof e.s>"u")throw new Sf({signature:e});if(r&&typeof e.yParity>"u")throw new Sf({signature:e});if(e.r<0n||e.r>ug)throw new T9({value:e.r});if(e.s<0n||e.s>ug)throw new A9({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Al({value:e.yParity})}function x9(e){return kf(Pt(e))}function kf(e){if(e.length!==130&&e.length!==132)throw new C9({signature:e});const t=BigInt(Pe(e,0,32)),r=BigInt(Pe(e,32,64)),n=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return Tf(s)}catch{throw new Al({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function Rg(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Tl(e)}function Tl(e){const t=typeof e=="string"?kf(e):e instanceof Uint8Array?x9(e):typeof e.r=="string"?Cf(e):e.v?w9(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Cl(t),t}function w9(e){return{r:e.r,s:e.s,yParity:Tf(e.v)}}function Cf(e){const t=(()=>{const r=e.v?Number(e.v):void 0;let n=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof n!="number"&&(n=Tf(r)),typeof n!="number")throw new Al({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function v9(e){const[t,r,n]=e;return Tl({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function E9(e){Cl(e);const t=e.r,r=e.s;return pt(Z(t,{size:32}),Z(r,{size:32}),typeof e.yParity=="number"?Z(Af(e.yParity),{size:1}):"0x")}function Hg(e){const{r:t,s:r,yParity:n}=e;return{r:Z(t,{size:32}),s:Z(r,{size:32}),yParity:n===0?"0x0":"0x1"}}function k9(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":Fp(Z(t)),r===0n?"0x":Fp(Z(r))]}function Tf(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new S9({value:e})}function Af(e){if(e===0)return 27;if(e===1)return 28;throw new Al({value:e})}class C9 extends ae{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${bt(cl(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Sf extends ae{constructor({signature:t}){super(`Signature \`${bi(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class T9 extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class A9 extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Al extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class S9 extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function P9(e,t={}){return typeof e.chainId=="string"?$g(e):{...e,...t.signature}}function $g(e){const{address:t,chainId:r,nonce:n}=e,s=Rg(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function I9(e){return e.map($g)}function B9(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:Z(r),nonce:Z(n),...Hg(s)}}function F9(e){return e.map(B9)}function Gg(e){return vl(U9(e))}function U9(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new Si.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(cl(t).substring(2));return iC(i)}function O9(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?nf(t,Gg({payload:n,signature:a})):Si.verify(a,Bp(n),lC(s),...r?[{prehash:!0,lowS:!0}]:[])}const D9="0x8010801080108010801080108010801080108010801080108010801080108010",_9=fg("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function jg(e){if(typeof e=="string"){if(Pe(e,-32)!==D9)throw new L9(e)}else Cl(e.authorization)}function M9(e){jg(e);const t=gi(Pe(e,-64,-32)),r=Pe(e,-t-64,-64),n=Pe(e,0,-t-64),[s,a,o]=LC(_9,r);return{authorization:P9({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:n,...o&&o!=="0x"?{data:o,to:a}:{}}}function N9(e){try{return jg(e),!0}catch{return!1}}let L9=class extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};class z9 extends ${constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function R9(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new z9({value:e});let[r,n="0"]=e.split(".");const s=r.startsWith("-");if(s&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),t===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){const[a,o,i]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],c=Math.round(+`${o}.${i}`);c>9?n=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):n=`${a}${c}`,n.length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${s?"-":""}${r}${n}`)}function H9(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function $9(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?ir(e.nonce):void 0,storageProof:e.storageProof?H9(e.storageProof):void 0}}async function G9(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?q(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return $9(i)}async function j9(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?q(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function Pf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var f,h,y;const c=n||"latest",l=r!==void 0?q(r):void 0;let u=null;if(s?u=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,q(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,q(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,q(i)]},{dedupe:!0})),!u)throw new wb({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((y=(h=(f=e.chain)==null?void 0:f.formatters)==null?void 0:h.transaction)==null?void 0:y.format)||Ws)(u,"getTransaction")}async function V9(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([ne(e,wi,"getBlockNumber")({}),t?ne(e,Pf,"getTransaction")({hash:t}):void 0]),a=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return a?n-a+1n:0n}async function Sl(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new vb({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||ml)(r,"getTransactionReceipt")}async function W9(e,t){var w;const{account:r,authorizationList:n,allowFailure:s=!0,blockNumber:a,blockOverrides:o,blockTag:i,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:d=t.deployless??!1}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},f=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Ka({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let y=0,g=0;for(let A=0;A<l.length;A++){const{abi:C,address:D,args:z,functionName:T}=l[A];try{const m=dr({abi:C,args:z,functionName:T});g+=(m.length-2)/2,u>0&&g>u&&h[y].length>0&&(y++,g=(m.length-2)/2,h[y]=[]),h[y]=[...h[y],{allowFailure:!0,callData:m,target:D}]}catch(m){const b=Gs(m,{abi:C,address:D,args:z,docsPath:"/docs/contract/multicall",functionName:T,sender:r});if(!s)throw b;h[y]=[...h[y],{allowFailure:!0,callData:"0x",target:D}]}}const E=await Promise.allSettled(h.map(A=>ne(e,zr,"readContract")({...f===null?{code:Op}:{address:f},abi:ll,account:r,args:[A],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let A=0;A<E.length;A++){const C=E[A];if(C.status==="rejected"){if(!s)throw C.reason;for(let z=0;z<h[A].length;z++)v.push({status:"failure",error:C.reason,result:void 0});continue}const D=C.value;for(let z=0;z<D.length;z++){const{returnData:T,success:m}=D[z],{callData:b}=h[A][z],{abi:x,address:S,functionName:I,args:F}=l[v.length];try{if(b==="0x")throw new Mo;if(!m)throw new Kc({data:T});const _=qs({abi:x,args:F,data:T,functionName:I});v.push(s?{result:_,status:"success"}:_)}catch(_){const k=Gs(_,{abi:x,address:S,args:F,docsPath:"/docs/contract/multicall",functionName:I});if(!s)throw k;v.push({error:k,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function If(e,t){const{blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:o,validation:i}=t;try{const c=[];for(const f of s){const h=f.blockOverrides?gy(f.blockOverrides):void 0,y=f.calls.map(E=>{const v=E,w=v.account?Ye(v.account):void 0,A=v.abi?dr(v):v.data,C={...v,account:w,data:v.dataSuffix?lr([A||"0x",v.dataSuffix]):A,from:v.from??(w==null?void 0:w.address)};return en(C),Mr(C)}),g=f.stateOverrides?ap(f.stateOverrides):void 0;c.push({blockOverrides:h,calls:y,stateOverrides:g})}const u=(typeof r=="bigint"?q(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((f,h)=>({...ip(f),calls:f.calls.map((y,g)=>{var x,S;const{abi:E,args:v,functionName:w,to:A}=s[h].calls[g],C=((x=y.error)==null?void 0:x.data)??y.returnData,D=BigInt(y.gasUsed),z=(S=y.logs)==null?void 0:S.map(I=>tn(I)),T=y.status==="0x1"?"success":"failure",m=E&&T==="success"&&C!=="0x"?qs({abi:E,data:C,functionName:w}):null,b=(()=>{var F;if(T==="success")return;let I;if(((F=y.error)==null?void 0:F.data)==="0x"?I=new Mo:y.error&&(I=new Kc(y.error)),!!I)return Gs(I,{abi:E??[],address:A??"0x",args:v,functionName:w??"<unknown>"})})();return{data:C,gasUsed:D,logs:z,status:T,...T==="success"?{result:m}:{error:b}}})}))}catch(c){const l=c,u=Zc(l,{});throw u instanceof ui?l:u}}function Bf(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new ae("Unable to normalize signature.");return s}function Ff(e,t){const r=typeof e,n=t.type;switch(n){case"address":return El(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>Ff(Object.values(e)[a],s)):/^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(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>Ff(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Vg(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return Vg(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?El(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?El(r[n],{strict:!1}):!1)return o}}function Wg(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?S1(e):e;return{...n,...r?{hash:Ja(n)}:{}}}function Pl(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Lr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?qg(l)===Pe(t,0,4):l.type==="event"?Ja(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new Il({name:t});if(o.length===1)return{...o[0],...s?{hash:Ja(o[0])}:{}};let i;for(const l of o){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...s?{hash:Ja(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,f)=>{const h="inputs"in l&&l.inputs[f];return h?Ff(d,h):!1})){if(i&&"inputs"in i&&i.inputs){const d=Vg(l.inputs,i.inputs,n);if(d)throw new K9({abiItem:l,type:d[0]},{abiItem:i,type:d[1]})}i=l}}const c=(()=>{if(i)return i;const[l,...u]=o;return{...l,overloads:u}})();if(!c)throw new Il({name:t});return{...c,...s?{hash:Ja(c)}:{}}}function qg(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return Pl(r,n)}return e[0]})();return Pe(Ja(t),0,4)}function q9(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return Pl(n,s)}return e[0]})(),r=typeof t=="string"?t:Nc(t);return Bf(r)}function Ja(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return Pl(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Ti(yi(q9(t)))}class K9 extends ae{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Bf(Nc(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Bf(Nc(r.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 Il extends ae{constructor({name:t,data:r,type:n="item"}){const s=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function Y9(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[X9(o),i]}return e})(),{bytecode:n,args:s}=r;return pt(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?uf(t.inputs,s):"0x")}function Z9(e){return Wg(e)}function X9(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new Il({name:"constructor"});return t}function Q9(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[Kg(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?Kg([t,...n],t.name,{args:r}):t,a=J9(s),o=r.length>0?uf(s.inputs,r):void 0;return o?pt(a,o):a}function eo(e,t={}){return Wg(e,t)}function Kg(e,t,r){const n=Pl(e,t,r);if(n.type!=="function")throw new Il({name:t,type:"function"});return n}function J9(e){return qg(e)}const eT="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",rn="0x0000000000000000000000000000000000000000",tT="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function rT(e,t){const{blockNumber:r,blockTag:n,calls:s,stateOverrides:a,traceAssetChanges:o,traceTransfers:i,validation:c}=t,l=t.account?Ye(t.account):void 0;if(o&&!l)throw new $("`account` is required when `traceAssetChanges` is true");const u=l?Y9(Z9("constructor(bytes, bytes)"),{bytecode:Ay,args:[tT,Q9(eo("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async U=>{if(!U.data&&!U.abi)return;const{accessList:L}=await Wy(e,{account:l.address,...U,data:U.abi?dr(U):U.data});return L.map(({address:H,storageKeys:G})=>G.length>0?H:null)})).then(U=>U.flat().filter(Boolean)):[],f=await If(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((U,L)=>({abi:[eo("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:rn,nonce:L})),stateOverrides:[{address:rn,nonce:0}]}]:[],{calls:[...s,{}].map(U=>({...U,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((U,L)=>({abi:[eo("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:rn,nonce:L})),stateOverrides:[{address:rn,nonce:0}]},{calls:d.map((U,L)=>({to:U,abi:[eo("function decimals() returns (uint256)")],functionName:"decimals",from:rn,nonce:L})),stateOverrides:[{address:rn,nonce:0}]},{calls:d.map((U,L)=>({to:U,abi:[eo("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:rn,nonce:L})),stateOverrides:[{address:rn,nonce:0}]},{calls:d.map((U,L)=>({to:U,abi:[eo("function symbol() returns (string)")],functionName:"symbol",from:rn,nonce:L})),stateOverrides:[{address:rn,nonce:0}]}]:[]],traceTransfers:i,validation:c}),h=o?f[2]:f[0],[y,g,,E,v,w,A,C]=o?f:[],{calls:D,...z}=h,T=D.slice(0,-1)??[],m=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...m,...b].map(U=>U.status==="success"?Le(U.data):null),S=(E==null?void 0:E.calls)??[],I=(v==null?void 0:v.calls)??[],F=[...S,...I].map(U=>U.status==="success"?Le(U.data):null),_=((w==null?void 0:w.calls)??[]).map(U=>U.status==="success"?U.result:null),k=((C==null?void 0:C.calls)??[]).map(U=>U.status==="success"?U.result:null),P=((A==null?void 0:A.calls)??[]).map(U=>U.status==="success"?U.result:null),O=[];for(const[U,L]of F.entries()){const H=x[U];if(typeof L!="bigint"||typeof H!="bigint")continue;const G=_[U-1],Q=k[U-1],pe=P[U-1],me=U===0?{address:eT,decimals:18,symbol:"ETH"}:{address:d[U-1],decimals:pe||G?Number(G??1):void 0,symbol:Q??void 0};O.some(ie=>ie.token.address===me.address)||O.push({token:me,value:{pre:H,post:L,diff:L-H}})}return{assetChanges:O,block:z,results:T}}const Yg="0x6492649264926492649264926492649264926492649264926492649264926492";function nT(e){if(Pe(e,-32)!==Yg)throw new oT(e)}function sT(e){const{data:t,signature:r,to:n}=e;return pt(uf(fg("address, bytes, bytes"),[n,t,r]),Yg)}function aT(e){try{return nT(e),!0}catch{return!1}}class oT extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function iT({r:e,s:t,to:r="hex",v:n,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new Si.Signature(Le(e),Le(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:cr(o)}async function Pi(e,t){var c,l,u,d;const{address:r,chain:n=e.chain,hash:s,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((l=(c=n==null?void 0:n.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:o=t.multicallAddress??((d=(u=n==null?void 0:n.contracts)==null?void 0:u.multicall3)==null?void 0:d.address)}=t;if(n!=null&&n.verifyHash)return await n.verifyHash(e,t);const i=(()=>{const f=t.signature;return Dr(f)?f:typeof f=="object"&&"r"in f&&"s"in f?iT(f):vt(f)})();try{return N9(i)?await cT(e,{...t,multicallAddress:o,signature:i}):await lT(e,{...t,verifierAddress:a,signature:i})}catch(f){try{if(Ga(Nd(r),await Sb({hash:s,signature:i})))return!0}catch{}if(f instanceof Js)return!1;throw f}}async function cT(e,t){var E;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=M9(t.signature);if(await gl(e,{address:r,blockNumber:n,blockTag:s})===ur(["0xef0100",i.address]))return await uT(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const f={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:q(i.r,{size:32}),s:q(i.s,{size:32}),yParity:i.yParity};if(!await O7({address:r,authorization:f}))throw new Js;const y=await ne(e,zr,"readContract")({...o?{address:o}:{code:Op},authorizationList:[f],abi:ll,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:dr({abi:ky,functionName:"isValidSignature",args:[a,l]})}]]}),g=(E=y[y.length-1])==null?void 0:E.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new Js}async function lT(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||aT(o)?o:sT({data:s,signature:o,to:n}))(),u=i?{to:i,data:dr({abi:Cy,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:ul({abi:Cy,args:[r,a,l],bytecode:Ik}),...c},{data:d}=await ne(e,xi,"call")(u).catch(f=>{throw f instanceof kb?new Js:f});if(H8(d??"0x0"))return!0;throw new Js}async function uT(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await ne(e,zr,"readContract")({address:r,abi:ky,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Cb?new Js:c})).startsWith("0x1626ba7e"))return!0;throw new Js}let Js=class extends Error{};async function dT(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=Qy(r);return ne(e,Pi,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function pT(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=eC({message:o,primaryType:i,types:c,domain:l});return ne(e,Pi,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function Zg(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:s,poll:a,pollingInterval:o=e.pollingInterval}){const i=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return i?(()=>{const d=mt(["watchBlockNumber",e.uid,t,r,o]);return Sn(d,{onBlockNumber:n,onError:s},f=>Ya(async()=>{var h;try{const y=await ne(e,wi,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&r)for(let g=c+1n;g<y;g++)f.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(f.onBlockNumber(y,c),c=y)}catch(y){(h=f.onError)==null||h.call(f,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=mt(["watchBlockNumber",e.uid,t,r]);return Sn(d,{onBlockNumber:n,onError:s},f=>{let h=!0,y=()=>h=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:E}=await g.subscribe({params:["newHeads"],onData(v){var A;if(!h)return;const w=Le((A=v.result)==null?void 0:A.number);f.onBlockNumber(w,c),c=w},onError(v){var w;(w=f.onError)==null||w.call(f,v)}});y=E,h||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function Xg(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:D})=>~~(1<<D)*200,timeout:c=18e4}=t,l=mt(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var D;return t.pollingInterval?t.pollingInterval:(D=e.chain)!=null&&D.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,f,h,y=!1,g,E;const{promise:v,resolve:w,reject:A}=Np(),C=c?setTimeout(()=>{E==null||E(),g==null||g(),A(new iE({hash:s}))},c):void 0;return g=Sn(l,{onReplaced:a,resolve:w,reject:A},async D=>{if(h=await ne(e,Sl,"getTransactionReceipt")({hash:s}).catch(()=>{}),h&&n<=1){clearTimeout(C),D.resolve(h),g==null||g();return}E=ne(e,Zg,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(z){const T=b=>{clearTimeout(C),E==null||E(),b(),g==null||g()};let m=z;if(!y)try{if(h){if(n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>D.resolve(h));return}if(r&&!d&&(y=!0,await hl(async()=>{d=await ne(e,Pf,"getTransaction")({hash:s}),d.blockNumber&&(m=d.blockNumber)},{delay:i,retryCount:o}),y=!1),h=await ne(e,Sl,"getTransactionReceipt")({hash:s}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>D.resolve(h))}catch(b){if(b instanceof wb||b instanceof vb){if(!d){y=!1;return}try{f=d,y=!0;const x=await hl(()=>ne(e,Nr,"getBlock")({blockNumber:m,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:F})=>F instanceof Ub});y=!1;const S=x.transactions.find(({from:F,nonce:_})=>F===f.from&&_===f.nonce);if(!S||(h=await ne(e,Sl,"getTransactionReceipt")({hash:S.hash}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n)))return;let I="replaced";S.to===f.to&&S.value===f.value&&S.input===f.input?I="repriced":S.from===S.to&&S.value===0n&&(I="cancelled"),T(()=>{var F;(F=D.onReplaced)==null||F.call(D,{reason:I,replacedTransaction:f,transaction:S,transactionReceipt:h}),D.resolve(h)})}catch(x){T(()=>D.reject(x))}}else T(()=>D.reject(b))}}})}),v}function fT(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:a,includeTransactions:o,poll:i,pollingInterval:c=e.pollingInterval}){const l=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=o??!1;let d;return l?(()=>{const y=mt(["watchBlocks",e.uid,t,r,n,u,c]);return Sn(y,{onBlock:s,onError:a},g=>Ya(async()=>{var E;try{const v=await ne(e,Nr,"getBlock")({blockTag:t,includeTransactions:u});if(v.number!==null&&(d==null?void 0:d.number)!=null){if(v.number===d.number)return;if(v.number-d.number>1&&r)for(let w=(d==null?void 0:d.number)+1n;w<v.number;w++){const A=await ne(e,Nr,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(A,d),d=A}}((d==null?void 0:d.number)==null||t==="pending"&&(v==null?void 0:v.number)==null||v.number!==null&&v.number>d.number)&&(g.onBlock(v,d),d=v)}catch(v){(E=g.onError)==null||E.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,g=!0,E=()=>y=!1;return(async()=>{try{n&&ne(e,Nr,"getBlock")({blockTag:t,includeTransactions:u}).then(A=>{y&&g&&(s(A,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(A){var D;if(!y)return;const C=await ne(e,Nr,"getBlock")({blockNumber:(D=A.result)==null?void 0:D.number,includeTransactions:u}).catch(()=>{});y&&(s(C,d),g=!1,d=C)},onError(A){a==null||a(A)}});E=w,y||E()}catch(v){a==null||a(v)}})(),()=>E()})()}function hT(e,{address:t,args:r,batch:n=!0,event:s,events:a,fromBlock:o,onError:i,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:d}){const f=typeof l<"u"?l:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??!1;return f?(()=>{const E=mt(["watchEvent",t,r,n,e.uid,s,u,o]);return Sn(E,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let A,C=!1;const D=Ya(async()=>{var z;if(!C){try{A=await ne(e,qy,"createEventFilter")({address:t,args:r,event:s,events:a,strict:h,fromBlock:o})}catch{}C=!0;return}try{let T;if(A)T=await ne(e,dl,"getFilterChanges")({filter:A});else{const m=await ne(e,wi,"getBlockNumber")({});w&&w!==m?T=await ne(e,Ep,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:m}):T=[],w=m}if(T.length===0)return;if(n)v.onLogs(T);else for(const m of T)v.onLogs([m])}catch(T){A&&T instanceof ts&&(C=!1),(z=v.onError)==null||z.call(v,T)}},{emitOnBegin:!0,interval:u});return async()=>{A&&await ne(e,pl,"uninstallFilter")({filter:A}),D()}})})():(()=>{let E=!0,v=()=>E=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const z=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return z?z.value:e.transport}return e.transport})(),A=a??(s?[s]:void 0);let C=[];A&&(C=[A.flatMap(T=>Ho({abi:[T],eventName:T.name,args:r}))],s&&(C=C[0]));const{unsubscribe:D}=await w.subscribe({params:["logs",{address:t,topics:C}],onData(z){var m;if(!E)return;const T=z.result;try{const{eventName:b,args:x}=el({abi:A??[],data:T.data,topics:T.topics,strict:h}),S=tn(T,{args:x,eventName:b});c([S])}catch(b){let x,S;if(b instanceof Rc||b instanceof Ud){if(d)return;x=b.abiItem.name,S=(m=b.abiItem.inputs)==null?void 0:m.some(F=>!("name"in F&&F.name))}const I=tn(T,{args:S?[]:{},eventName:x});c([I])}},onError(z){i==null||i(z)}});v=D,E||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function mT(e,{batch:t=!0,onError:r,onTransactions:n,poll:s,pollingInterval:a=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=mt(["watchPendingTransactions",e.uid,t,a]);return Sn(l,{onTransactions:n,onError:r},u=>{let d;const f=Ya(async()=>{var h;try{if(!d)try{d=await ne(e,Ky,"createPendingTransactionFilter")({});return}catch(g){throw f(),g}const y=await ne(e,dl,"getFilterChanges")({filter:d});if(y.length===0)return;if(t)u.onTransactions(y);else for(const g of y)u.onTransactions([g])}catch(y){(h=u.onError)==null||h.call(u,y)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await ne(e,pl,"uninstallFilter")({filter:d}),f()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!l)return;const h=f.result;n([h])},onError(f){r==null||r(f)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function bT(e){var d,f,h;const{scheme:t,statement:r,...n}=((d=e.match(yT))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((f=e.match(gT))==null?void 0:f.groups)??{},u=(h=e.split("Resources:")[1])==null?void 0:h.split(`
107
- - `).slice(1);return{...n,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}const yT=/^(?:(?<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)?/,gT=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function xT(e){const{address:t,domain:r,message:n,nonce:s,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||s&&n.nonce!==s||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!nt(n.address,{strict:!1})||t&&!Ga(n.address,t))return!1}catch{return!1}return!0}async function wT(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=bT(s);if(!u.address||!xT({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const f=Qy(s);return Pi(e,{address:u.address,hash:f,signature:i,...l})}async function Uf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,q(n)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||ml)(s);if(o.status==="reverted"&&r)throw new Eb({receipt:o});return o}function vT(e){return{call:t=>xi(e,t),createAccessList:t=>Wy(e,t),createBlockFilter:()=>f7(e),createContractEventFilter:t=>db(e,t),createEventFilter:t=>qy(e,t),createPendingTransactionFilter:()=>Ky(e),estimateContractGas:t=>jE(e,t),estimateGas:t=>wp(e,t),getBalance:t=>h7(e,t),getBlobBaseFee:()=>m7(e),getBlock:t=>Nr(e,t),getBlockNumber:t=>wi(e,t),getBlockTransactionCount:t=>b7(e,t),getBytecode:t=>gl(e,t),getChainId:()=>is(e),getCode:t=>gl(e,t),getContractEvents:t=>Zb(e,t),getEip712Domain:t=>g7(e,t),getEnsAddress:t=>Xk(e,t),getEnsAvatar:t=>u7(e,t),getEnsName:t=>d7(e,t),getEnsResolver:t=>p7(e,t),getEnsText:t=>Vy(e,t),getFeeHistory:t=>v7(e,t),estimateFeesPerGas:t=>PE(e,t),getFilterChanges:t=>dl(e,t),getFilterLogs:t=>E7(e,t),getGasPrice:()=>lp(e),getLogs:t=>Ep(e,t),getProof:t=>G9(e,t),estimateMaxPriorityFeePerGas:t=>SE(e,t),fillTransaction:t=>yp(e,t),getStorageAt:t=>j9(e,t),getTransaction:t=>Pf(e,t),getTransactionConfirmations:t=>V9(e,t),getTransactionCount:t=>dp(e,t),getTransactionReceipt:t=>Sl(e,t),multicall:t=>W9(e,t),prepareTransactionRequest:t=>di(e,t),readContract:t=>zr(e,t),sendRawTransaction:t=>$p(e,t),sendRawTransactionSync:t=>Uf(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>rT(e,t),simulateContract:t=>Mk(e,t),verifyHash:t=>Pi(e,t),verifyMessage:t=>dT(e,t),verifySiweMessage:t=>wT(e,t),verifyTypedData:t=>pT(e,t),uninstallFilter:t=>pl(e,t),waitForTransactionReceipt:t=>Xg(e,t),watchBlocks:t=>fT(e,t),watchBlockNumber:t=>Zg(e,t),watchContractEvent:t=>Gk(e,t),watchEvent:t=>hT(e,t),watchPendingTransactions:t=>mT(e,t)}}function ET(e){const{key:t="public",name:r="Public Client"}=e;return Ly({...e,key:t,name:r,type:"publicClient"}).extend(vT)}async function kT(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:q(r),chainName:n,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function CT(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=ul({abi:r,args:n,bytecode:s});return fl(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function TT(e){var r;return((r=e.account)==null?void 0:r.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(n=>zo(n))}async function AT(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ye(r):void 0,a=n?[s==null?void 0:s.address,[q(n)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),i[Number(c)][u]=d}return typeof n=="number"?i[n]:i}async function ST(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Qg(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new Pn({docsPath:"/docs/eip7702/prepareAuthorization"});const a=Ye(r),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:Ye(t.executor)})(),i={address:t.contractAddress??t.address,chainId:n,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await ne(e,is,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await ne(e,dp,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ga(o.address,a.address))&&(i.nonce+=1)),i}async function PT(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Nd(r))}async function IT(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function BT(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await Dy(e,t);return await My(e,{...t,id:s.id,timeout:n})}const Of=new _a(128);async function Jg(e,t){var D,z,T,m;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,pollingInterval:y,throwOnReceiptRevert:g,type:E,value:v,...w}=t,A=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new Pn({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ye(r):null;try{en(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Yc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((C==null?void 0:C.type)==="json-rpc"||C===null){let x;n!==null&&(x=await ne(e,is,"getChainId")({}),Hp({currentChainId:x,chain:n}));const S=(T=(z=(D=e.chain)==null?void 0:D.formatters)==null?void 0:z.transactionRequest)==null?void 0:T.format,F=(S||Mr)({...js(w,{format:S}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,to:b,type:E,value:v},"sendTransaction"),_=Of.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:k,params:[F]},{retryCount:0})}catch(U){if(_===!1)throw U;const L=U;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(H=>(Of.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Of.set(e.uid,!1),L):G});throw L}})(),O=await ne(e,Xg,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:A});if(g&&O.status==="reverted")throw new Eb({receipt:O});return O}if((C==null?void 0:C.type)==="local"){const x=await ne(e,di,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,nonceManager:C.nonceManager,parameters:[...gp,"sidecars"],type:E,value:v,...w,to:b}),S=(m=n==null?void 0:n.serializers)==null?void 0:m.transaction,I=await C.signTransaction(x,{serializer:S});return await ne(e,Uf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new Xs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Xs({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof Xs?b:Jc(b,{...t,account:C,chain:t.chain||void 0})}}async function FT(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function UT(e,t){const{account:r=e.account}=t;if(!r)throw new Pn({docsPath:"/docs/eip7702/signAuthorization"});const n=Ye(r);if(!n.signAuthorization)throw new Xs({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await Qg(e,t);return n.signAuthorization(s)}async function OT(e,{account:t=e.account,message:r}){if(!t)throw new Pn({docsPath:"/docs/actions/wallet/signMessage"});const n=Ye(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?Ba(r):r.raw instanceof Uint8Array?Fe(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function DT(e,t){var l,u,d,f;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new Pn({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ye(r);en({account:a,...t});const o=await ne(e,is,"getChainId")({});n!==null&&Hp({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=i==null?void 0:i.transactionRequest)==null?void 0:u.format)||Mr;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:q(o),from:a.address}]},{retryCount:0})}async function _T(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new Pn({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ye(r),i={EIP712Domain:eg({domain:n}),...t.types};if(Jy({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=Q7({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function MT(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:q(t)}]},{retryCount:0})}async function NT(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function LT(e,t){return vi.internal(e,Jg,"sendTransactionSync",t)}function zT(e){return{addChain:t=>kT(e,t),deployContract:t=>CT(e,t),fillTransaction:t=>yp(e,t),getAddresses:()=>TT(e),getCallsStatus:t=>_y(e,t),getCapabilities:t=>AT(e,t),getChainId:()=>is(e),getPermissions:()=>ST(e),prepareAuthorization:t=>Qg(e,t),prepareTransactionRequest:t=>di(e,t),requestAddresses:()=>PT(e),requestPermissions:t=>IT(e,t),sendCalls:t=>Dy(e,t),sendCallsSync:t=>BT(e,t),sendRawTransaction:t=>$p(e,t),sendRawTransactionSync:t=>Uf(e,t),sendTransaction:t=>fl(e,t),sendTransactionSync:t=>Jg(e,t),showCallsStatus:t=>FT(e,t),signAuthorization:t=>UT(e,t),signMessage:t=>OT(e,t),signTransaction:t=>DT(e,t),signTypedData:t=>_T(e,t),switchChain:t=>MT(e,t),waitForCallsStatus:t=>My(e,t),watchAsset:t=>NT(e,t),writeContract:t=>vi(e,t),writeContractSync:t=>LT(e,t)}}function RT(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return Ly({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(zT)}function e6({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=Ny();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:_7(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function HT(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>e6({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class $T extends ${constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function GT(e,t={}){const{batch:r,fetchFn:n,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return({chain:f,retryCount:h,timeout:y})=>{const{batchSize:g=1e3,wait:E=0}=typeof r=="object"?r:{},v=t.retryCount??h,w=y??t.timeout??1e4,A=f==null?void 0:f.rpcUrls.default.http[0];if(!A)throw new $T;const C=W7(A,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return e6({key:a,methods:o,name:i,async request({method:D,params:z}){const T={method:D,params:z},{schedule:m}=Py({id:A,wait:E,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,F)=>I.id-F.id}),b=async I=>r?m(I):[await C.request({body:I})],[{error:x,result:S}]=await b(T);if(d)return{error:x,result:S};if(x)throw new Yd({body:T,error:x,url:A});return S},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:A})}}function jT(e){const{r:t,s:r}=Si.Signature.fromCompact(e.slice(2,130)),n=+`0x${e.slice(130)}`,[s,a]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:q(t,{size:32}),s:q(r,{size:32}),v:s,yParity:a}:{r:q(t,{size:32}),s:q(r,{size:32}),yParity:a}}const VT=e=>e.replace(/,/g,""),Bl=(e,t)=>!t||!e||j(e).isNaN()?"0":R9(e,t).toString(),Ii=(e,t)=>{try{if(!t||!e||j(e).isNaN())return"0";const r=j(e).toFixed();return Wd(BigInt(r),t)}catch(r){return console.error(r),"0"}},WT=async e=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy failed",t),!1}},t6=e=>{if(!e)return"";const t=Math.floor(e/1e3),r=Math.floor(t/(1440*60)),n=Math.floor(t%(1440*60)/3600),s=Math.floor(t%3600/60),a=t%60,o=[];return r&&o.push(`${r} days `),n&&o.push(`${n} hours `),s&&o.push(`${s} minutes`),a&&o.push(`${a} seconds`),o.join(" ")},Df=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",qT=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().indexOf("rejected")?"Transaction Rejected":t}catch{return t}};function _f(e,t=6,r=8){if(!e)return"";const n=e.startsWith("-")?"-":"",s=n?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return n+a;if(a!=="0"){const f=o.slice(0,t).replace(/0+$/,""),h=f?"."+f:"";return n+a+h}const i=o.search(/[^0]/);if(i===-1||i+1>r)return"0";const c=o.slice(0,i),u=o.slice(i).slice(0,t).replace(/0+$/,"");return u?n+"0."+c+u:"0"}const Mf=e=>{var t,r,n,s;if(e!=null&&e.message)return((r=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:r.includes("rejected"))||((s=(n=e.message)==null?void 0:n.toLowerCase())==null?void 0:s.includes("denied"))},KT=e=>{switch(e){case Ft.base.id:return 1e-4;default:return .01}},r6=(e,t)=>{const r=Bs(t);return r&&Is(e.address)?r.wToken:e};function n6(e){return e?e/864e5:0}function Nf(e){return e?e/6e4:0}const YT=(e,t)=>e?ze.TWAP_MARKET:t===1?ze.LIMIT:ze.TWAP_LIMIT,Lf=(e,t,r)=>{const n=Bs(r);return Is((e==null?void 0:e.address)||"")&&Ps((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},zf=(e,t,r)=>{const n=Bs(r);return Ps((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&Is((t==null?void 0:t.address)||"")},Bi=(e,t)=>{if(!t)return"";const r=Bs(t);return`${r==null?void 0:r.explorer}/tx/${e}`},ZT=p({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),XT=p({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),QT=p({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),JT=p({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),e4=p({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),t4=p({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),Rf=50000n,s6=CE*32n,a6={block:cp({format(e){var r;const t=(r=e.transactions)==null?void 0:r.map(n=>{var a;if(typeof n=="string")return n;const s=(a=a6.transaction)==null?void 0:a.format(n);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?Le(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Qc({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null}}}),transactionReceipt:jp({format(e){return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...tn(t),l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionLogIndex:ir(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:Le(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionIndex:Le(t.transactionIndex),shardId:Le(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:Le(t.logIndex)}))}}}),transactionRequest:sp({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Fe(e.gasPerPubdata)}:{gasPerPubdata:Fe(Rf)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(cr(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(cr(t)))}:{},...e.customSignature?{customSignature:Array.from(cr(e.customSignature))}:{}},type:"0x71"}:{}}})};class r4 extends ${constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
107
+ - `).slice(1);return{...n,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}const yT=/^(?:(?<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)?/,gT=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function xT(e){const{address:t,domain:r,message:n,nonce:s,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||s&&n.nonce!==s||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!nt(n.address,{strict:!1})||t&&!Ga(n.address,t))return!1}catch{return!1}return!0}async function wT(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=bT(s);if(!u.address||!xT({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const f=Qy(s);return Pi(e,{address:u.address,hash:f,signature:i,...l})}async function Uf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,q(n)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||ml)(s);if(o.status==="reverted"&&r)throw new Eb({receipt:o});return o}function vT(e){return{call:t=>xi(e,t),createAccessList:t=>Wy(e,t),createBlockFilter:()=>f7(e),createContractEventFilter:t=>db(e,t),createEventFilter:t=>qy(e,t),createPendingTransactionFilter:()=>Ky(e),estimateContractGas:t=>jE(e,t),estimateGas:t=>wp(e,t),getBalance:t=>h7(e,t),getBlobBaseFee:()=>m7(e),getBlock:t=>Nr(e,t),getBlockNumber:t=>wi(e,t),getBlockTransactionCount:t=>b7(e,t),getBytecode:t=>gl(e,t),getChainId:()=>is(e),getCode:t=>gl(e,t),getContractEvents:t=>Zb(e,t),getEip712Domain:t=>g7(e,t),getEnsAddress:t=>Xk(e,t),getEnsAvatar:t=>u7(e,t),getEnsName:t=>d7(e,t),getEnsResolver:t=>p7(e,t),getEnsText:t=>Vy(e,t),getFeeHistory:t=>v7(e,t),estimateFeesPerGas:t=>PE(e,t),getFilterChanges:t=>dl(e,t),getFilterLogs:t=>E7(e,t),getGasPrice:()=>lp(e),getLogs:t=>Ep(e,t),getProof:t=>G9(e,t),estimateMaxPriorityFeePerGas:t=>SE(e,t),fillTransaction:t=>yp(e,t),getStorageAt:t=>j9(e,t),getTransaction:t=>Pf(e,t),getTransactionConfirmations:t=>V9(e,t),getTransactionCount:t=>dp(e,t),getTransactionReceipt:t=>Sl(e,t),multicall:t=>W9(e,t),prepareTransactionRequest:t=>di(e,t),readContract:t=>zr(e,t),sendRawTransaction:t=>$p(e,t),sendRawTransactionSync:t=>Uf(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>rT(e,t),simulateContract:t=>Mk(e,t),verifyHash:t=>Pi(e,t),verifyMessage:t=>dT(e,t),verifySiweMessage:t=>wT(e,t),verifyTypedData:t=>pT(e,t),uninstallFilter:t=>pl(e,t),waitForTransactionReceipt:t=>Xg(e,t),watchBlocks:t=>fT(e,t),watchBlockNumber:t=>Zg(e,t),watchContractEvent:t=>Gk(e,t),watchEvent:t=>hT(e,t),watchPendingTransactions:t=>mT(e,t)}}function ET(e){const{key:t="public",name:r="Public Client"}=e;return Ly({...e,key:t,name:r,type:"publicClient"}).extend(vT)}async function kT(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:q(r),chainName:n,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function CT(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=ul({abi:r,args:n,bytecode:s});return fl(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function TT(e){var r;return((r=e.account)==null?void 0:r.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(n=>zo(n))}async function AT(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ye(r):void 0,a=n?[s==null?void 0:s.address,[q(n)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),i[Number(c)][u]=d}return typeof n=="number"?i[n]:i}async function ST(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Qg(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new Pn({docsPath:"/docs/eip7702/prepareAuthorization"});const a=Ye(r),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:Ye(t.executor)})(),i={address:t.contractAddress??t.address,chainId:n,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await ne(e,is,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await ne(e,dp,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ga(o.address,a.address))&&(i.nonce+=1)),i}async function PT(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Nd(r))}async function IT(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function BT(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await Dy(e,t);return await My(e,{...t,id:s.id,timeout:n})}const Of=new _a(128);async function Jg(e,t){var D,z,T,m;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,pollingInterval:y,throwOnReceiptRevert:g,type:E,value:v,...w}=t,A=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new Pn({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ye(r):null;try{en(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Yc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((C==null?void 0:C.type)==="json-rpc"||C===null){let x;n!==null&&(x=await ne(e,is,"getChainId")({}),Hp({currentChainId:x,chain:n}));const S=(T=(z=(D=e.chain)==null?void 0:D.formatters)==null?void 0:z.transactionRequest)==null?void 0:T.format,F=(S||Mr)({...js(w,{format:S}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,to:b,type:E,value:v},"sendTransaction"),_=Of.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:k,params:[F]},{retryCount:0})}catch(U){if(_===!1)throw U;const L=U;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(H=>(Of.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Of.set(e.uid,!1),L):G});throw L}})(),O=await ne(e,Xg,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:A});if(g&&O.status==="reverted")throw new Eb({receipt:O});return O}if((C==null?void 0:C.type)==="local"){const x=await ne(e,di,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:h,nonceManager:C.nonceManager,parameters:[...gp,"sidecars"],type:E,value:v,...w,to:b}),S=(m=n==null?void 0:n.serializers)==null?void 0:m.transaction,I=await C.signTransaction(x,{serializer:S});return await ne(e,Uf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new Xs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Xs({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof Xs?b:Jc(b,{...t,account:C,chain:t.chain||void 0})}}async function FT(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function UT(e,t){const{account:r=e.account}=t;if(!r)throw new Pn({docsPath:"/docs/eip7702/signAuthorization"});const n=Ye(r);if(!n.signAuthorization)throw new Xs({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await Qg(e,t);return n.signAuthorization(s)}async function OT(e,{account:t=e.account,message:r}){if(!t)throw new Pn({docsPath:"/docs/actions/wallet/signMessage"});const n=Ye(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?Ba(r):r.raw instanceof Uint8Array?Fe(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function DT(e,t){var l,u,d,f;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new Pn({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ye(r);en({account:a,...t});const o=await ne(e,is,"getChainId")({});n!==null&&Hp({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=i==null?void 0:i.transactionRequest)==null?void 0:u.format)||Mr;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:q(o),from:a.address}]},{retryCount:0})}async function _T(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new Pn({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ye(r),i={EIP712Domain:eg({domain:n}),...t.types};if(Jy({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=Q7({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function MT(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:q(t)}]},{retryCount:0})}async function NT(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function LT(e,t){return vi.internal(e,Jg,"sendTransactionSync",t)}function zT(e){return{addChain:t=>kT(e,t),deployContract:t=>CT(e,t),fillTransaction:t=>yp(e,t),getAddresses:()=>TT(e),getCallsStatus:t=>_y(e,t),getCapabilities:t=>AT(e,t),getChainId:()=>is(e),getPermissions:()=>ST(e),prepareAuthorization:t=>Qg(e,t),prepareTransactionRequest:t=>di(e,t),requestAddresses:()=>PT(e),requestPermissions:t=>IT(e,t),sendCalls:t=>Dy(e,t),sendCallsSync:t=>BT(e,t),sendRawTransaction:t=>$p(e,t),sendRawTransactionSync:t=>Uf(e,t),sendTransaction:t=>fl(e,t),sendTransactionSync:t=>Jg(e,t),showCallsStatus:t=>FT(e,t),signAuthorization:t=>UT(e,t),signMessage:t=>OT(e,t),signTransaction:t=>DT(e,t),signTypedData:t=>_T(e,t),switchChain:t=>MT(e,t),waitForCallsStatus:t=>My(e,t),watchAsset:t=>NT(e,t),writeContract:t=>vi(e,t),writeContractSync:t=>LT(e,t)}}function RT(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return Ly({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(zT)}function e6({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=Ny();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:_7(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function HT(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>e6({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class $T extends ${constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function GT(e,t={}){const{batch:r,fetchFn:n,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return({chain:f,retryCount:h,timeout:y})=>{const{batchSize:g=1e3,wait:E=0}=typeof r=="object"?r:{},v=t.retryCount??h,w=y??t.timeout??1e4,A=f==null?void 0:f.rpcUrls.default.http[0];if(!A)throw new $T;const C=W7(A,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return e6({key:a,methods:o,name:i,async request({method:D,params:z}){const T={method:D,params:z},{schedule:m}=Py({id:A,wait:E,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,F)=>I.id-F.id}),b=async I=>r?m(I):[await C.request({body:I})],[{error:x,result:S}]=await b(T);if(d)return{error:x,result:S};if(x)throw new Yd({body:T,error:x,url:A});return S},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:A})}}function jT(e){const{r:t,s:r}=Si.Signature.fromCompact(e.slice(2,130)),n=+`0x${e.slice(130)}`,[s,a]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:q(t,{size:32}),s:q(r,{size:32}),v:s,yParity:a}:{r:q(t,{size:32}),s:q(r,{size:32}),yParity:a}}const VT=e=>e.replace(/,/g,""),Bl=(e,t)=>!t||!e||j(e).isNaN()?"0":R9(e,t).toString(),Ii=(e,t)=>{try{if(!t||!e||j(e).isNaN())return"0";const r=j(e).toFixed();return Wd(BigInt(r),t)}catch(r){return console.error(r),"0"}},WT=async e=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy failed",t),!1}},t6=e=>{if(!e)return"";const t=Math.floor(e/1e3),r=Math.floor(t/(1440*60)),n=Math.floor(t%(1440*60)/3600),s=Math.floor(t%3600/60),a=t%60,o=[];return r&&o.push(`${r} days `),n&&o.push(`${n} hours `),s&&o.push(`${s} minutes`),a&&o.push(`${a} seconds`),o.join(" ")},Df=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",qT=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().indexOf("rejected")?"Transaction Rejected":t}catch{return t}};function _f(e,t=6,r=8){try{if(!e)return"";const n=e.startsWith("-")?"-":"",s=n?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return n+a;if(a!=="0"){const h=o.slice(0,t).replace(/0+$/,""),y=h?"."+h:"";return n+a+y}const i=o.search(/[^0]/);if(i===-1||i+1>r)return n+"0";const c=o.slice(0,i),l=Math.max(0,r-i),d=o.slice(i).slice(0,Math.min(t,l)).replace(/0+$/,"");return d?n+"0."+c+d:n+"0"}catch{return e||""}}const Mf=e=>{var t,r,n,s;if(e!=null&&e.message)return((r=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:r.includes("rejected"))||((s=(n=e.message)==null?void 0:n.toLowerCase())==null?void 0:s.includes("denied"))},KT=e=>{switch(e){case Ft.base.id:return 1e-4;default:return .01}},r6=(e,t)=>{const r=Bs(t);return r&&Is(e.address)?r.wToken:e};function n6(e){return e?e/864e5:0}function Nf(e){return e?e/6e4:0}const YT=(e,t)=>e?ze.TWAP_MARKET:t===1?ze.LIMIT:ze.TWAP_LIMIT,Lf=(e,t,r)=>{const n=Bs(r);return Is((e==null?void 0:e.address)||"")&&Ps((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},zf=(e,t,r)=>{const n=Bs(r);return Ps((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&Is((t==null?void 0:t.address)||"")},Bi=(e,t)=>{if(!t)return"";const r=Bs(t);return`${r==null?void 0:r.explorer}/tx/${e}`},ZT=p({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),XT=p({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),QT=p({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),JT=p({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),e4=p({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),t4=p({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),Rf=50000n,s6=CE*32n,a6={block:cp({format(e){var r;const t=(r=e.transactions)==null?void 0:r.map(n=>{var a;if(typeof n=="string")return n;const s=(a=a6.transaction)==null?void 0:a.format(n);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?Le(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Qc({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null}}}),transactionReceipt:jp({format(e){return{l1BatchNumber:e.l1BatchNumber?Le(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Le(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...tn(t),l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionLogIndex:ir(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:Le(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?Le(t.l1BatchNumber):null,transactionIndex:Le(t.transactionIndex),shardId:Le(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:Le(t.logIndex)}))}}}),transactionRequest:sp({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Fe(e.gasPerPubdata)}:{gasPerPubdata:Fe(Rf)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(cr(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(cr(t)))}:{},...e.customSignature?{customSignature:Array.from(cr(e.customSignature))}:{}},type:"0x71"}:{}}})};class r4 extends ${constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
108
108
  `),{name:"InvalidEip712TransactionError"})}}function o6(e){return!!(e.type==="eip712"||"customSignature"in e&&e.customSignature||"paymaster"in e&&e.paymaster||"paymasterInput"in e&&e.paymasterInput||"gasPerPubdata"in e&&typeof e.gasPerPubdata=="bigint"||"factoryDeps"in e&&e.factoryDeps)}function i6(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!o6(e))throw new r4;if(!t||t<=0)throw new qa({chainId:t});if(r&&!nt(r))throw new Ct({address:r});if(n&&!nt(n))throw new Ct({address:n});if(s&&!nt(s))throw new Ct({address:s});if(s&&!a)throw new $("`paymasterInput` must be provided when `paymaster` is defined");if(!s&&a)throw new $("`paymaster` must be provided when `paymasterInput` is defined")}function n4(e,t){return o6(e)?a4(e):xl(e,t)}const s4={transaction:n4};function a4(e){const{chainId:t,gas:r,nonce:n,to:s,from:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:u,paymaster:d,paymasterInput:f,gasPerPubdata:h,data:y}=e;i6(e);const g=[n?Fe(n):"0x",c?Fe(c):"0x",i?Fe(i):"0x",r?Fe(r):"0x",s??"0x",o?Fe(o):"0x",y??"0x",Fe(t),Fe(""),Fe(""),Fe(t),a??"0x",Fe(h||Rf),u??[],l??"0x",d&&f?[d,f]:[]];return ur(["0x71",Jr(g)])}class o4 extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class i4 extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class c4 extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function l4(e){const t=wn(e);if(t.length%32!==0)throw new c4({givenLength:t.length});if(t.length>s6)throw new o4({givenLength:t.length,maxBytecodeSize:s6});const r=zb(t),n=wn(r),s=t.length/32;if(s%2===0)throw new i4({givenLengthInWords:s});const a=wn(s),o=_s(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const u4=e=>{i6(e);const t=d4(e);return{domain:{name:"zkSync",version:"2",chainId:e.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:t}};function d4(e){const{gas:t,nonce:r,to:n,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:i,factoryDeps:c,paymaster:l,paymasterInput:u,gasPerPubdata:d,data:f}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??Rf,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:f??"0x",factoryDeps:(c==null?void 0:c.map(h=>Fe(l4(h))))??[],paymasterInput:u||"0x"}}const fr={blockTime:1e3,formatters:a6,serializers:s4,custom:{getEip712Domain:u4}},p4=p({...fr,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}),f4=p({...fr,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),h4=p({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),m4=p({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),b4=p({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),y4=p({id:9990,name:"Agung Network",nativeCurrency:{decimals:18,name:"Agung",symbol:"AGNG"},rpcUrls:{default:{http:["https://wss-async.agung.peaq.network"],webSocket:["wss://wss-async.agung.peaq.network"]}},blockExplorers:{default:{name:"Subscan",url:"https://agung-testnet.subscan.io"}},testnet:!0}),g4=p({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),x4=p({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),w4=p({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),v4=p({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),E4=p({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),c6={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Hf={block:cp({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Ws(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?Le(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:Qc({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Le(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:jp({format(e){return{l1GasPrice:e.l1GasPrice?Le(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Le(e.l1GasUsed):null,l1Fee:e.l1Fee?Le(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function l6(e,t){return T4(e)?C4(e):xl(e,t)}const k4={transaction:l6};function C4(e){A4(e);const{sourceHash:t,data:r,from:n,gas:s,isSystemTx:a,mint:o,to:i,value:c}=e,l=[t,n,i??"0x",o?Fe(o):"0x",c?Fe(c):"0x",s?Fe(s):"0x",a?"0x1":"0x",r??"0x"];return ur(["0x7e",Jr(l)])}function T4(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function A4(e){const{from:t,to:r}=e;if(t&&!nt(t))throw new Ct({address:t});if(r&&!nt(r))throw new Ct({address:r})}const V={blockTime:2e3,contracts:c6,formatters:Hf,serializers:k4},Fl=1,S4=p({...V,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...V.contracts,l2OutputOracle:{[Fl]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[Fl]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[Fl]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:Fl}),Ul=11155111,P4=p({...V,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...V.contracts,l2OutputOracle:{[Ul]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[Ul]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[Ul]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:Ul}),I4=p({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),B4=p({id:33139,name:"ApeChain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),F4=p({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),U4=p({id:62606,name:"Apollo",nativeCurrency:{decimals:18,name:"Apollo",symbol:"APOLLO"},rpcUrls:{default:{http:["https://mainnet-rpc.apolloscan.io"]}},blockExplorers:{default:{name:"Apollo Explorer",url:"https://apolloscan.io"}}}),O4=p({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),D4=p({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),_4=p({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),M4=p({id:421614,name:"Arbitrum Sepolia",blockTime:250,nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),N4=p({id:5042002,name:"Arc Testnet",nativeCurrency:{name:"USDC",symbol:"USDC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.arc.network","https://rpc.quicknode.testnet.arc.network","https://rpc.blockdaemon.testnet.arc.network"],webSocket:["wss://rpc.testnet.arc.network","wss://rpc.quicknode.testnet.arc.network"]}},blockExplorers:{default:{name:"ArcScan",url:"https://testnet.arcscan.app",apiUrl:"https://testnet.arcscan.app/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),L4=p({id:7897,name:"Arena-Z",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.arena-z.gg"]}},blockExplorers:{default:{name:"Arena-Z Explorer",url:"https://explorer.arena-z.gg",apiUrl:"https://explorer.arena-z.gg"}}}),z4=p({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),R4=p({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),H4=p({id:463,name:"Areum",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areum.network"],webSocket:["wss://mainnet-ws.areum.network"]}},blockExplorers:{default:{name:"Areum Explorer",url:"https://explorer.areum.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),$4=p({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),G4=p({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),j4=p({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),V4=p({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),W4=p({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),q4=p({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),K4=p({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),Y4=p({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),Z4=p({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),X4=p({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),Q4=p({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),J4=p({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),eA=p({id:785,name:"Autheo Testnet",nativeCurrency:{decimals:18,name:"Autheo",symbol:"THEO"},rpcUrls:{default:{http:["https://testnet-rpc1.autheo.com","https://testnet-rpc2.autheo.com"]}},blockExplorers:{default:{name:"Autheo Testnet Block Explorer",url:"https://testnet-explorer.autheo.com/"}}}),tA=p({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),rA=p({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),nA=p({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},sourceId:8453}),sA=p({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},testnet:!0,sourceId:168587773}),aA=p({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),Fi=1,u6=p({...V,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...V.contracts,disputeGameFactory:{[Fi]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Fi]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Fi]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Fi]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Fi}),oA=p({...u6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),iA=p({id:123420001114,name:"Basecamp Testnet",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"basecamp",url:"https://basecamp.cloud.blockscout.com"}},testnet:!0}),Ol=5,cA=p({...V,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...V.contracts,l2OutputOracle:{[Ol]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[Ol]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[Ol]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:Ol}),Ui=11155111,d6=p({...V,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...V.contracts,disputeGameFactory:{[Ui]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Ui]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Ui]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Ui]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:Ui}),lA=p({...d6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),uA=p({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),dA=p({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),pA=p({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),fA=p({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),hA=p({id:80094,name:"Berachain",blockTime:2e3,nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:9310021}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},ensTlds:[".bera"],testnet:!1}),mA=p({id:80069,blockTime:2e3,name:"Berachain Bepolia",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},rpcUrls:{default:{http:["https://bepolia.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://bepolia.beratrail.io"}},testnet:!0}),bA=p({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:866924}},testnet:!0}),yA=p({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},ensTlds:[".bera"],rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),gA=p({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),xA=p({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),wA=p({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),vA=p({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),EA=p({id:96,name:"KUB Mainnet",nativeCurrency:{name:"KUB Coin",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"KUB Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),kA=p({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),CA=p({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),TA=p({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),AA=p({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),SA=p({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),PA=p({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),Dl=1,IA=p({...V,id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[Dl]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[Dl]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[Dl]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:Dl}),BA=p({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:11155111}),$f=1,FA=p({...V,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[$f]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[$f]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:$f}),UA=p({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),OA=p({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),Gf=11155111,DA=p({...V,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[Gf]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[Gf]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:Gf}),_A=p({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}),MA=p({id:3637,name:"Botanix",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.botanixlabs.com"],webSocket:["wss://rpc.botanixlabs.com/ws"]}},blockExplorers:{default:{name:"Botanixscan",url:"https://botanixscan.io"}}}),NA=p({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),LA=p({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),zA=p({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),RA=p({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),HA=p({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),$A=p({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),GA=p({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),jA=p({id:97,name:"BNB Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),VA=p({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),WA=p({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),qA=p({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),KA=p({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),YA=p({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),ZA=p({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),XA=p({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),QA=p({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),JA={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([eS(e.client,e.request.feeCurrency),tS(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function eS(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function tS(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function p6(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Xt(e).toLowerCase()==="0x"||Xt(e).toLowerCase()==="0x00")}function Oi(e){return!p6(e)}function rS(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function f6(e){return e.type==="cip64"?!0:rS(e)&&Oi(e.feeCurrency)}const nS={block:cp({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Ws(n),...n.gatewayFee?{gatewayFee:Le(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Qc({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?Le(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?Le(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:sp({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),f6(e)&&(t.type="0x7b"),t}})};function sS(e,t){return f6(e)?oS(e,t):l6(e,t)}const aS={transaction:sS};function oS(e,t){cS(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,f=[Fe(r),s?Fe(s):"0x",c?Fe(c):"0x",i?Fe(i):"0x",n?Fe(n):"0x",a??"0x",o?Fe(o):"0x",d??"0x",Ci(l),u,...Za(e,t)];return ur(["0x7b",Jr(f)])}const iS=Vs;function cS(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new qa({chainId:t});if(a&&!nt(a))throw new Ct({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Oi(s)&&s>iS)throw new rs({maxFeePerGas:s});if(Oi(r)&&Oi(s)&&r>s)throw new $a({maxFeePerGas:s,maxPriorityFeePerGas:r});if(Oi(o)&&!nt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(p6(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const Di={blockTime:1e3,contracts:c6,formatters:nS,serializers:aS,fees:JA},lS=p({...Di,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),_l=17e3,uS=p({...Di,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...Di.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[_l]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[_l]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[_l]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[_l]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),jf=11155111,dS=p({...Di,id:11142220,name:"Celo Sepolia Testnet",nativeCurrency:{decimals:18,name:"CELO",symbol:"S-CELO"},rpcUrls:{default:{http:["https://forno.celo-sepolia.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Sepolia Explorer",url:"https://celo-sepolia.blockscout.com/",apiUrl:"https://celo-sepolia.blockscout.com/api"}},contracts:{...Di.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[jf]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[jf]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[jf]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),pS=p({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),fS=p({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.chiliz.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8080847}}}),hS=p({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),mS=p({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),bS=p({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),yS=p({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),gS=p({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),xS=p({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),wS=p({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),vS=p({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),ES=p({id:1115,name:"Core Testnet",nativeCurrency:{decimals:18,name:"tCore",symbol:"TCORE"},rpcUrls:{default:{http:["https://rpc.test.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet",url:"https://scan.test.btcs.network",apiUrl:"https://api.test.btcs.network/api"}},contracts:{multicall3:{address:"0xCcddF20A1932537123C2E48Bd8e00b108B8f7569",blockCreated:29350509}},testnet:!0}),kS=p({id:1114,name:"Core Testnet2",nativeCurrency:{decimals:18,name:"tCore2",symbol:"TCORE2"},rpcUrls:{default:{http:["https://rpc.test2.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet2",url:"https://scan.test2.btcs.network",apiUrl:"https://api.test2.btcs.network/api"}},contracts:{multicall3:{address:"0x3CB285ff3Cd5C7C7e570b1E7DE3De17A0f985e56",blockCreated:3838600}},testnet:!0}),CS=p({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),TS=p({id:21000001,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:11155111}),AS=p({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),SS=p({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),PS=p({id:102032,name:"Creditcoin Devnet",nativeCurrency:{name:"Devnet CTC",symbol:"devCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-devnet.creditcoin.network"],webSocket:["wss://rpc.cc3-devnet.creditcoin.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-devnet.blockscout.com",apiUrl:"https://creditcoin3-dev.subscan.io"}},testnet:!0}),IS=p({id:102030,name:"Creditcoin",nativeCurrency:{name:"Creditcoin",symbol:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),BS=p({id:102031,name:"Creditcoin Testnet",nativeCurrency:{name:"Creditcoin Testnet",symbol:"tCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),FS=p({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),US=p({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer (Testnet)",url:"https://explorer.cronos.org/testnet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),OS=p({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),DS=p({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),_S=p({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),MS=p({id:4158,name:"CrossFi Mainnet",nativeCurrency:{decimals:18,name:"CrossFi",symbol:"XFI"},rpcUrls:{default:{http:["https://rpc.mainnet.ms"]}},blockExplorers:{default:{name:"CrossFi Blockchain Explorer",url:"https://xfiscan.com"}},testnet:!1}),NS=p({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),LS=p({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),zS=p({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),RS=p({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),HS=p({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),$S=p({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),GS=p({id:55931,name:"Datahaven Testnet",nativeCurrency:{decimals:18,name:"MOCK",symbol:"MOCK"},rpcUrls:{default:{http:["https://services.datahaven-testnet.network/testnet"],webSocket:["wss://services.datahaven-testnet.network/testnet"]}},blockExplorers:{default:{name:"DhScan",url:"https://testnet.dhscan.io/",apiUrl:"https://testnet.dhscan.io/api-docs"}},contracts:{},testnet:!0}),jS=p({id:20240603,name:"DBK chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.dbkchain.io"]}},blockExplorers:{default:{name:"DBK Chain Explorer",url:"https://scan.dbkchain.io"}},testnet:!1}),VS=p({...V,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...V.contracts}}),WS=p({...V,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...V.contracts}}),qS=p({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),KS=p({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),YS=p({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),ZS=p({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),XS=p({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),QS=p({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),JS=p({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),eP=p({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),tP=p({id:97476,name:"Doma Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc-testnet.doma.xyz"]}},blockExplorers:{default:{name:"Doma Testnet Explorer",url:"https://explorer-testnet.doma.xyz"}},testnet:!0}),rP=p({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),nP=p({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),sP=p({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),aP=p({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),oP=p({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),iP=p({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),cP=p({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),lP=p({id:5424,name:"edeXa",nativeCurrency:{name:"edeXa",symbol:"EDX",decimals:18},rpcUrls:{default:{http:["https://rpc.edexa.network"]}},blockExplorers:{default:{name:"edeXa Explorer",url:"https://explorer.edexa.network",apiUrl:"https://explorer.edexa.network/api/v2"}}}),uP=p({id:1995,name:"edeXa Testnet",nativeCurrency:{name:"edeXa",symbol:"tEDX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.edexa.network"]}},blockExplorers:{default:{name:"edeXa Testnet Explorer",url:"https://explorer.testnet.edexa.network",apiUrl:"https://explorer.testnet.edexa.network/api/v2"}},testnet:!0}),dP=p({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),pP=p({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),fP=p({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),hP=p({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),mP=p({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1}),bP=p({id:656476,name:"EDU Chain Testnet",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.open-campus-codex.gelato.digital/"],webSocket:["wss://ws.open-campus-codex.gelato.digital"]}},blockExplorers:{default:{name:"EDU Chain Testnet Explorer",url:"https://opencampus-codex.blockscout.com",apiUrl:"https://opencampus-codex.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15514133}},testnet:!0}),yP=p({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),gP=p({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),xP=p({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),wP=p({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),vP=p({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),EP=p({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),kP=p({...V,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),CP=p({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),TP=p({id:173,name:"ENI Mainnet",nativeCurrency:{decimals:18,name:"ENI",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc.eniac.network"]}},blockExplorers:{default:{name:"ENI Explorer",url:"https://scan.eniac.network"}},testnet:!1}),AP=p({id:6912115,name:"ENI Testnet",nativeCurrency:{decimals:18,name:"ENI Testnet Token",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc-testnet.eniac.network"]}},blockExplorers:{default:{name:"ENI Testnet Explorer",url:"https://scan-testnet.eniac.network"}},testnet:!0}),SP=p({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),PP=p({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),IP=p({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),BP=p({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),FP=p({id:140,name:"Eteria",nativeCurrency:{name:"Eteria",symbol:"ERA",decimals:18},rpcUrls:{default:{http:["https://mainnet.eteria.io/v1"]}},blockExplorers:{default:{name:"Eteria Explorer",url:"https://explorer.eteria.io",apiUrl:"https://explorer.eteria.io/api"}}}),UP=p({id:42793,name:"Etherlink",blockTime:4830,nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),OP=p({id:127823,name:"Etherlink Shadownet Testnet",nativeCurrency:{decimals:18,name:"tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.shadownet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Shadownet Testnet Explorer",url:"https://shadownet.explorer.etherlink.com"}},testnet:!0}),DP=p({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet.explorer.etherlink.com"}},testnet:!0}),_P=p({id:183,name:"Ethernity",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.ethernitychain.io"]}},blockExplorers:{default:{name:"Ethernity Explorer",url:"https://ernscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),MP=p({id:20256789,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),NP=p({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),LP=p({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),zP=p({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),RP=p({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),HP=p({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),$P=p({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),GP=p({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://250.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),jP=p({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),VP=p({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}},testnet:!0}),WP=p({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),qP=p({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),KP=p({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),YP=p({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),ZP=p({id:253368190,name:"Flame",network:"flame",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.flame.astria.org"],webSocket:["wss://ws.flame.astria.org"]}},blockExplorers:{default:{name:"Flame Explorer",url:"https://explorer.flame.astria.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6829148}}}),XP=p({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"Flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),QP=p({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),JP=p({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}},blockTime:800}),eI=p({id:646,name:"Flow EVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),tI=p({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0,blockTime:800}),rI=p({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),nI=p({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),sI=p({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),aI=p({id:20993,name:"Fluent Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.dev.gblend.xyz"]}},blockExplorers:{default:{name:"Fluent Explorer",url:"https://blockscout.dev.gblend.xyz"}},testnet:!0}),to=1,oI=p({id:478,name:"Form Network",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.form.network/http"],webSocket:["wss://rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Explorer",url:"https://explorer.form.network"}},contracts:{...V.contracts,addressManager:{[to]:{address:"0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B"}},l1CrossDomainMessenger:{[to]:{address:"0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c"}},l2OutputOracle:{[to]:{address:"0x4ccAAF69F41c5810cA875183648B577CaCf1F67E"}},portal:{[to]:{address:"0x4E259Ee5F4136408908160dD32295A5031Fa426F"}},l1StandardBridge:{[to]:{address:"0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:to}),iI=p({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),ro=11155111,cI=p({id:132902,name:"Form Testnet",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia-rpc.form.network/http"],webSocket:["wss://sepolia-rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Testnet Explorer",url:"https://sepolia-explorer.form.network"}},contracts:{...V.contracts,addressManager:{[ro]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[ro]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[ro]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[ro]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[ro]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:ro}),lI=p({id:80931,name:"Forta Chain",nativeCurrency:{symbol:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),uI=p({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),Ml=1,dI=p({...V,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...V.contracts,l2OutputOracle:{[Ml]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ml]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[Ml]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:Ml}),Nl=17e3,pI=p({...V,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...V.contracts,l2OutputOracle:{[Nl]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Nl]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[Nl]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:Nl}),fI=p({...V,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...V.contracts},sourceId:1}),hI=p({...V,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),mI=p({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),bI=p({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),yI=p({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),gI=p({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),Ll=17e3,xI=p({...V,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:Ll,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ll]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[Ll]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[Ll]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),wI=p({id:86,name:"GateChain Mainnet",nativeCurrency:{name:"GateChainToken",symbol:"GT",decimals:18},rpcUrls:{default:{http:["https://evm.nodeinfo.cc"],webSocket:["wss://evm-ws.gatenode.cc"]}},blockExplorers:{default:{name:"Gate Scan",url:"https://www.gatescan.org",apiUrl:"https://gatescan.org/api"}},testnet:!1}),vI=p({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),EI=p({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),zl=11155111,h6=p({...V,id:91342,network:"giwa-sepolia",name:"GIWA Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia-rpc.giwa.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.giwa.io",apiUrl:"https://sepolia-explorer.giwa.io/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[zl]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[zl]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[zl]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:zl}),kI=p({...h6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),CI=p({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),TI=p({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),AI=p({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),SI=p({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),PI=p({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),II=p({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),BI=p({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),FI=p({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),UI=p({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),OI=p({id:440017,name:"Graphite Network",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Spectre",url:"https://main.atgraphite.com",apiUrl:"https://api.main.atgraphite.com/api"}},testnet:!1}),DI=p({id:54170,name:"Graphite Network Testnet",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-test-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-test-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Testnet Spectre",url:"https://test.atgraphite.com",apiUrl:"https://api.test.atgraphite.com/api"}},testnet:!0}),_I=p({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),MI=p({id:43419,name:"Gunz Mainnet",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:70502}}}),NI=p({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc-main.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),LI=p({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc-test.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),zI=p({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),RI=p({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.happy.tech/http"],webSocket:["wss://rpc.testnet.happy.tech/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://explorer.testnet.happy.tech"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),HI=p({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),$I=p({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),GI=p({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),jI=p({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://1666600000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),VI=p({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),WI=p({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://testnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Testnet explorer",url:"https://testnet-explorer.hsk.xyz"}},testnet:!0}),qI=p({id:1523903251,name:"Haust Network Testnet",nativeCurrency:{decimals:18,name:"HAUST",symbol:"HAUST"},rpcUrls:{default:{http:["https://rpc-testnet.haust.app"]}},blockExplorers:{default:{name:"Haust Network Testnet Explorer",url:"https://explorer-testnet.haust.app"}},testnet:!0}),KI=p({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),YI=p({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),ZI=p({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),XI=p({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),QI=p({id:42e3,name:"Helios Testnet",network:"helios-testnet",nativeCurrency:{symbol:"HLS",name:"Helios",decimals:18},rpcUrls:{default:{http:["https://testnet1.helioschainlabs.org"]}},blockExplorers:{default:{name:"Helios Testnet Explorer",url:"https://explorer.helioschainlabs.org/"}},testnet:!0}),JI=p({id:43111,name:"Hemi",network:"Hemi",blockTime:12e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),eB=p({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),tB=p({id:68414,name:"Henesys",nativeCurrency:{name:"NEXPACE",symbol:"NXPC",decimals:18},rpcUrls:{default:{http:["https://henesys-rpc.msu.io"]}},blockExplorers:{default:{name:"Avalanche Explorer",url:"https://subnets.avax.network/henesys"}}}),rB=p({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:4295055}},testnet:!0}),nB=p({id:560048,name:"Hoodi",nativeCurrency:{name:"Hoodi Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.ethpandaops.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.etherscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2589}},testnet:!0}),sB=p({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),aB=p({id:190415,name:"HPP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.hpp.io"],webSocket:["wss://mainnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Mainnet Explorer",url:"https://explorer.hpp.io"}},testnet:!1}),oB=p({id:181228,name:"HPP Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.hpp.io"],webSocket:["wss://testnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Sepolia Explorer",url:"https://sepolia-explorer.hpp.io"}},testnet:!0}),iB=p({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),cB=p({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),lB=p({id:6985385,name:"Humanity",nativeCurrency:{name:"H",symbol:"H",decimals:18},rpcUrls:{default:{http:["https://humanity-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Humanity Mainnet Explorer",url:"https://humanity-mainnet.explorer.alchemy.com",apiUrl:"https://humanity-mainnet.explorer.alchemy.com/api"}},testnet:!1}),uB=p({id:7080969,name:"Humanity Testnet",nativeCurrency:{name:"tHP",symbol:"tHP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.humanity.org"]}},blockExplorers:{default:{name:"Humanity Testnet Explorer",url:"https://humanity-testnet.explorer.alchemy.com",apiUrl:"https://humanity-testnet.explorer.alchemy.com/api"}},testnet:!0}),dB=p({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),pB=p({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),fB=p({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),hB=p({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),m6=p({id:999,name:"HyperEVM",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},blockExplorers:{default:{name:"HyperEVMScan",url:"https://hyperevmscan.io"}},rpcUrls:{default:{http:["https://rpc.hyperliquid.xyz/evm"]}},testnet:!1}),mB=p({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),bB=p({id:73115,name:"ICB Network",nativeCurrency:{decimals:18,name:"ICB Native Token",symbol:"ICBX"},rpcUrls:{default:{http:["https://rpc1-mainnet.icbnetwork.info"]}},blockExplorers:{default:{name:"ICB Explorer",url:"https://icbscan.io",apiUrl:"https://icbscan.io/api"}},testnet:!1}),yB=p({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),gB=p({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),xB=p({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),wB=p({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),vB=p({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),EB=p({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),kB=p({id:1776,name:"Injective",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://sentry.evm-rpc.injective.network"],webSocket:["wss://sentry.evm-ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://blockscout.injective.network",apiUrl:"https://blockscout.injective.network/api"}},testnet:!1}),CB=p({id:1439,name:"Injective Testnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://k8s.testnet.json-rpc.injective.network"],webSocket:["wss://k8s.testnet.ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://testnet.blockscout.injective.network",apiUrl:"https://testnet.blockscout.injective.network/api"}},testnet:!0}),Rl=1,TB=p({...V,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...V.contracts,disputeGameFactory:{[Rl]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[Rl]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[Rl]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:Rl}),Hl=11155111,AB=p({...V,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[Hl]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[Hl]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[Hl]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:Hl}),SB=p({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),PB=p({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),IB=p({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),BB=p({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),FB=p({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),UB=p({id:680,name:"Jasmy Chain",network:"jasmyChain",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc.jasmychain.io"],webSocket:["wss://rpc.jasmychain.io"]}},testnet:!1}),OB=p({id:681,name:"Jasmy Chain Testnet",network:"jasmyChainTestnet",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc_testnet.jasmychain.io"],webSocket:["wss://rpc_testnet.jasmychain.io"]}},testnet:!0}),DB=p({id:8899,name:"JB Chain",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),_B=p({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),MB=p({id:81,name:"Japan Open Chain Mainnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Token",symbol:"JOC"},rpcUrls:{default:{http:["https://rpc-1.japanopenchain.org:8545","https://rpc-2.japanopenchain.org:8545","https://rpc-3.japanopenchain.org"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.japanopenchain.org"}},testnet:!1}),NB=p({id:10081,name:"Japan Open Chain Testnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Testnet Token",symbol:"JOCT"},rpcUrls:{default:{http:["https://rpc-1.testnet.japanopenchain.org:8545","https://rpc-2.testnet.japanopenchain.org:8545","https://rpc-3.testnet.japanopenchain.org"]}},blockExplorers:{default:{name:"Testnet Block Explorer",url:"https://explorer.testnet.japanopenchain.org"}},testnet:!0}),LB=p({id:5734951,name:"Jovay Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.jovay.io"]}},blockExplorers:{default:{name:"Jovay Explorer",url:"https://explorer.jovay.io/l2"}},testnet:!1}),zB=p({id:2019775,name:"Jovay Sepolia Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://api.zan.top/public/jovay-testnet"]}},blockExplorers:{default:{name:"Jovay Testnet Explorer",url:"https://sepolia-explorer.jovay.io/l2"}},testnet:!0}),RB=p({id:45003,name:"Juneo JUNE-Chain",nativeCurrency:{decimals:18,name:"JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/2",apiUrl:"https://juneoscan.io/chain/2/api"}}}),HB=p({id:45013,name:"Juneo BCH1-Chain",nativeCurrency:{decimals:18,name:"Juneo BCH1-Chain",symbol:"BCH1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/BCH1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/12",apiUrl:"https://juneoscan.io/chain/12/api"}}}),$B=p({id:45004,name:"Juneo DAI1-Chain",nativeCurrency:{decimals:18,name:"Juneo DAI1-Chain",symbol:"DAI1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DAI1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/5",apiUrl:"https://juneoscan.io/chain/5/api"}}}),GB=p({id:45010,name:"Juneo DOGE1-Chain",nativeCurrency:{decimals:18,name:"Juneo DOGE1-Chain",symbol:"DOGE1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DOGE1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/10",apiUrl:"https://juneoscan.io/chain/10/api"}}}),jB=p({id:45011,name:"Juneo EUR1-Chain",nativeCurrency:{decimals:18,name:"Juneo EUR1-Chain",symbol:"EUR1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/EUR1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/6",apiUrl:"https://juneoscan.io/chain/6/api"}}}),VB=p({id:45008,name:"Juneo GLD1-Chain",nativeCurrency:{decimals:18,name:"Juneo GLD1-Chain",symbol:"GLD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/GLD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/8",apiUrl:"https://juneoscan.io/chain/8/api"}}}),WB=p({id:45014,name:"Juneo LINK1-Chain",nativeCurrency:{decimals:18,name:"Juneo LINK1-Chain",symbol:"LINK1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LINK1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/13",apiUrl:"https://juneoscan.io/chain/13/api"}}}),qB=p({id:45009,name:"Juneo LTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo LTC1-Chain",symbol:"LTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/11",apiUrl:"https://juneoscan.io/chain/11/api"}}}),KB=p({id:45007,name:"Juneo mBTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo mBTC1-Chain",symbol:"mBTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/mBTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/9",apiUrl:"https://juneoscan.io/chain/9/api"}}}),YB=p({id:45012,name:"Juneo SGD1-Chain",nativeCurrency:{decimals:18,name:"Juneo SGD1-Chain",symbol:"SGD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/SGD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/7",apiUrl:"https://juneoscan.io/chain/7/api"}}}),ZB=p({id:101003,name:"Socotra JUNE-Chain",nativeCurrency:{decimals:18,name:"Socotra JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.socotra-testnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://socotra.juneoscan.io/chain/2",apiUrl:"https://socotra.juneoscan.io/chain/2/api"}},testnet:!0}),XB=p({id:45006,name:"Juneo USD1-Chain",nativeCurrency:{decimals:18,name:"Juneo USD1-Chain",symbol:"USD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/4",apiUrl:"https://juneoscan.io/chain/4/api"}}}),QB=p({id:45005,name:"Juneo USDT1-Chain",nativeCurrency:{decimals:18,name:"Juneo USDT1-Chain",symbol:"USDT1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USDT1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/3",apiUrl:"https://juneoscan.io/chain/3/api"}}}),JB=p({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),eF=p({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),tF=p({id:1802203764,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),rF=p({id:920637907288165,name:"Kakarot Starknet Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),nF=p({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),sF=p({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),aF=p({id:747474,name:"Katana",network:"katana",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katana.network"]}},blockExplorers:{default:{name:"katana explorer",url:"https://katanascan.com"}},testnet:!1}),oF=p({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),iF=p({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),cF=p({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),lF=p({id:1336,name:"Kii Testnet Oro",network:"kii-testnet-oro",nativeCurrency:{name:"Kii",symbol:"KII",decimals:18},rpcUrls:{default:{http:["https://json-rpc.uno.sentry.testnet.v3.kiivalidator.com"]}},blockExplorers:{default:{name:"KiiExplorer",url:"https://explorer.kiichain.io/testnet"}},testnet:!0}),uF=p({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),dF=p({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),pF=p({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),fF=p({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),hF=p({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:16054868}},testnet:!1}),mF=p({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),bF=p({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),yF=p({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),gF=p({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),xF=p({id:232,name:"Lens",nativeCurrency:{name:"GHO",symbol:"GHO",decimals:18},rpcUrls:{default:{http:["https://rpc.lens.xyz"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://explorer.lens.xyz",apiUrl:"https://explorer.lens.xyz/api"}}}),wF=p({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),vF=p({id:21363,name:"Lestnet",nativeCurrency:{name:"Lestnet Ether",symbol:"LETH",decimals:18},rpcUrls:{default:{http:["https://service.lestnet.org"]}},blockExplorers:{default:{name:"Lestnet Explorer",url:"https://explore.lestnet.org"}},testnet:!0}),EF=p({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:127188532}},testnet:!0}),kF=p({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:125499184}},testnet:!1});async function CF(e,t){var s,a,o;const{account:r=e.account}=t;if(!r)throw new Pn;const n=Ye(r);try{const{accessList:i,blockNumber:c,blockTag:l,data:u,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:E,value:v,...w}=t,C=(typeof c=="bigint"?q(c):void 0)||l;en(t);const D=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,T=(D||Mr)({...js(w,{format:D}),account:n,accessList:i,data:u,gas:d,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:E,value:v},"estimateGas"),{baseFeePerGas:m,gasLimit:b,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:C?[T,C]:[T]});return{baseFeePerGas:BigInt(m),gasLimit:BigInt(b),priorityFeePerGas:BigInt(x)}}catch(i){throw Mp(i,{...t,account:n,chain:e.chain})}}const Vf={fees:{estimateFeesPerGas:b6,async maxPriorityFeePerGas({block:e,client:t,request:r}){const n=await b6({block:e,client:t,multiply:s=>s,request:r,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function b6({client:e,multiply:t,request:r,type:n}){try{const s=await CF(e,{...r,account:r==null?void 0:r.account}),{priorityFeePerGas:a}=s,i=t(BigInt(s.baseFeePerGas))+a;return n==="legacy"?{gasPrice:i}:{maxFeePerGas:i,maxPriorityFeePerGas:a}}catch{return null}}const TF=p({...Vf,id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),AF=p({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),SF=p({...Vf,id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427},ensRegistry:{address:"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7",blockCreated:2395094},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:17168484}},ensTlds:[".linea.eth"],testnet:!0}),PF=p({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),$l=1,IF=p({...V,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[$l]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[$l]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[$l]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:$l}),Gl=11155111,BF=p({...V,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...V.contracts,l2OutputOracle:{[Gl]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Gl]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[Gl]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:Gl}),FF=p({id:9496,name:"Load Alphanet",nativeCurrency:{name:"Testnet LOAD",symbol:"tLOAD",decimals:18},rpcUrls:{default:{http:["https://alphanet.load.network"]}},blockExplorers:{default:{name:"Load Alphanet Explorer",url:"https://explorer.load.network"}},testnet:!0}),UF=p({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),OF=p({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),DF=p({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),_F=p({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),MF=p({id:994873017,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),NF=p({id:1952959480,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),LF=p({id:96370,name:"Lumoz",nativeCurrency:{decimals:18,name:"Lumoz Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://rpc.lumoz.org"]}},blockExplorers:{default:{name:"Lumoz Scan",url:"https://scan.lumoz.info"}},testnet:!1}),zF=p({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),RF=p({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),HF=p({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),$F=p({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),GF=p({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),jF=p({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),VF=p({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),WF=p({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),qF=p({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),KF=p({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),YF=p({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),ZF=p({id:5887,name:"MANTRA DuKong EVM Testnet",nativeCurrency:{decimals:18,name:"MANTRA",symbol:"MANTRA"},rpcUrls:{default:{http:["https://evm.dukong.mantrachain.io"]}},blockExplorers:{default:{name:"MANTRAScan",url:"https://mantrascan.io/dukong"}},testnet:!0}),XF=p({id:5888,name:"MANTRA EVM",nativeCurrency:{decimals:18,name:"OM",symbol:"OM"},rpcUrls:{default:{http:["https://evm.mantrachain.io"],webSocket:["https://evm.mantrachain.io/ws"]}},blockExplorers:{default:{name:"MANTRA Scan",url:"https://mantrascan.io/mainnet"}}}),QF=p({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),JF=p({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),eU=p({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),tU=p({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),rU=p({id:6342,blockTime:1e3,name:"MegaETH Testnet",nativeCurrency:{name:"MegaETH Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://carrot.megaeth.com/rpc"],webSocket:["wss://carrot.megaeth.com/ws"]}},blockExplorers:{default:{name:"MegaETH Testnet Explorer",url:"https://www.megaexplorer.xyz/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),nU=p({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),sU=p({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),aU=p({id:4352,name:"MemeCore",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.memecore.net"],webSocket:["wss://ws.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Explorer",url:"https://memecorescan.io",apiUrl:"https://api.memecorescan.io/api"},okx:{name:"MemeCore Explorer",url:"https://web3.okx.com/explorer/memecore"},memecore:{name:"MemeCore Explorer",url:"https://blockscout.memecore.com",apiUrl:"https://blockscout.memecore.com/api"}}}),oU=p({id:43521,name:"Formicarium",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.formicarium.memecore.net"],webSocket:["wss://ws.formicarium.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Testnet Explorer",url:"https://formicarium.memecorescan.io"},okx:{name:"MemeCore Testnet Explorer",url:"https://web3.okx.com/explorer/formicarium-testnet"},memecore:{name:"MemeCore Testnet Explorer",url:"https://formicarium.blockscout.memecore.com",apiUrl:"https://formicarium.blockscout.memecore.com/api"}},testnet:!0}),iU=p({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),cU=p({id:4203,name:"Merlin Erigon Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-erigon-rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-erigon-scan.merlinchain.io",apiUrl:"https://testnet-erigon-scan.merlinchain.io/api"}},testnet:!0}),lU=p({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),uU=p({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),dU=p({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),jl=1,pU=p({...V,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...V.contracts,l2OutputOracle:{[jl]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[jl]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[jl]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:jl}),fU=p({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),hU=p({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),mU=p({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"],webSocket:["wss://metis-rpc.publicnode.com","wss://metis.drpc.org"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),bU=p({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),yU=p({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"],webSocket:["wss://metis-sepolia-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),gU=p({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),xU=p({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),wU=p({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),vU=p({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),EU=p({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),Vl=1,kU=p({...V,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[Vl]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[Vl]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[Vl]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:Vl}),Wl=11155111,CU=p({...V,id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{...V.contracts,l2OutputOracle:{[Wl]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[Wl]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[Wl]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:Wl}),TU=p({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),AU=p({id:10143,name:"Monad Testnet",blockTime:400,nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),SU=p({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),PU=p({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://rpc.api.moonbeam.network"],webSocket:["wss://wss.api.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),IU=p({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),BU=p({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://rpc.api.moonriver.moonbeam.network"],webSocket:["wss://wss.api.moonriver.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),FU=p({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3654913}},testnet:!1}),UU=p({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),OU=p({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),DU=p({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),_U=p({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),MU=p({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),NU=p({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),LU=p({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),zU=p({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),RU=p({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),HU=p({id:12227332,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),$U=p({id:1012,name:"Newton",nativeCurrency:{name:"Newton",symbol:"NEW",decimals:18},rpcUrls:{default:{http:["https://global.rpc.mainnet.newtonproject.org"]}},blockExplorers:{default:{name:"NewFi explorer",url:"https://explorer.newtonproject.org/"}},testnet:!1}),GU=p({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),jU=p({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),VU=p({id:6900,name:"Nibiru",nativeCurrency:{decimals:18,name:"NIBI",symbol:"NIBI"},rpcUrls:{default:{http:["https://evm-rpc.nibiru.fi"]}},blockExplorers:{default:{name:"NibiScan",url:"https://nibiscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:19587573}}}),WU=p({id:200024,name:"Nitrograph Testnet",testnet:!0,rpcUrls:{default:{http:["https://rpc-testnet.nitrograph.foundation"]}},nativeCurrency:{name:"Nitro",symbol:"NOS",decimals:18},blockExplorers:{default:{url:"https://explorer-testnet.nitrograph.foundation",name:"Nitrograph Explorer"}}}),qU=p({id:166,name:"Nomina",nativeCurrency:{name:"Nomina",symbol:"NOM",decimals:18},rpcUrls:{default:{http:["https://mainnet.nomina.io"],webSocket:["wss://mainnet.nomina.io"]}},blockExplorers:{default:{name:"Nomina Explorer",url:"https://nomscan.io"}},testnet:!1}),KU=p({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),YU=p({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),ZU=p({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),XU=p({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),QU=p({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),JU=p({id:166,name:"Omni",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://mainnet.omni.network"],webSocket:["wss://mainnet.omni.network"]}},blockExplorers:{default:{name:"OmniScan",url:"https://omniscan.network"}},testnet:!1}),eO=p({id:164,name:"Omni Omega",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://omega.omni.network"],webSocket:["wss://omega.omni.network"]}},blockExplorers:{default:{name:"Omega OmniScan",url:"https://omega.omniscan.network/"}},testnet:!0}),tO=p({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),rO=p({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),ql=56,nO=p({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[ql]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[ql]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[ql]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:ql}),Kl=97,sO=p({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[Kl]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[Kl]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[Kl]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:Kl}),aO=p({id:1612,name:"OpenLedger",nativeCurrency:{name:"Open",symbol:"OPEN",decimals:18},rpcUrls:{default:{http:["https://rpc.openledger.xyz"]}},blockExplorers:{default:{name:"OpenLedger Explorer",url:"https://scan.openledger.xyz"}},testnet:!1}),_i=1,oO=p({...V,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...V.contracts,disputeGameFactory:{[_i]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[_i]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[_i]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[_i]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:_i}),Yl=5,iO=p({...V,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...V.contracts,l2OutputOracle:{[Yl]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[Yl]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[Yl]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:Yl}),Mi=11155111,cO=p({...V,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...V.contracts,disputeGameFactory:{[Mi]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[Mi]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[Mi]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[Mi]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:Mi}),lO=p({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),uO=p({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),dO=p({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),pO=p({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),fO=p({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),hO=p({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),mO=p({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),bO=p({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}}),Zl=1,yO=p({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Zl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[Zl]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[Zl]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Hf,sourceId:Zl}),Xl=11155111,gO=p({id:58008,network:"pgn-testnet",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Xl]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[Xl]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[Xl]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Hf,sourceId:Xl,testnet:!0}),xO=p({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),wO=p({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://planq-rpc.nodies.app","https://evm-rpc.planq.network","https://jsonrpc.planq.nodestake.top"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8470015}},testnet:!1}),vO=p({id:9745,name:"Plasma",blockTime:1e3,nativeCurrency:{name:"Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://rpc.plasma.to"]}},blockExplorers:{default:{name:"PlasmaScan",url:"https://plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),EO=p({id:9747,name:"Plasma Devnet",nativeCurrency:{name:"Devnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://devnet-rpc.plasma.to"]}},testnet:!0,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),kO=p({id:9746,name:"Plasma Testnet",nativeCurrency:{name:"Testnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plasma.to"]}},blockExplorers:{default:{name:"RouteScan",url:"https://testnet.plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),CO=p({...fr,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),TO=p({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),AO=p({id:98865,name:"Plume (Legacy)",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:48577}},sourceId:1}),SO=p({id:98864,name:"Plume Devnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:481948}},testnet:!0,sourceId:11155111}),PO=p({id:98866,name:"Plume",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://rpc.plume.org"],webSocket:["wss://rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plume.org",apiUrl:"https://explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39679}},sourceId:1}),IO=p({id:98867,name:"Plume Testnet",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plume.org"],webSocket:["wss://testnet-rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plume.org",apiUrl:"https://testnet-explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:199712}},testnet:!0,sourceId:11155111}),BO=p({id:161221135,name:"Plume Testnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6022332}},testnet:!0,sourceId:11155111}),FO=p({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),UO=p({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),OO=p({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),DO=p({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),_O=p({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),MO=p({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),NO=p({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),LO=p({id:8008,name:"Polynomial",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://polynomialscan.io"}},testnet:!1,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),zO=p({id:80008,name:"Polynomia Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sepolia.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://sepolia.polynomialscan.io"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),RO=p({id:60603,name:"POTOS Mainnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc.potos.hk"]}},blockExplorers:{default:{name:"POTOS Mainnet explorer",url:"https://scan.potos.hk"}},testnet:!1}),HO=p({id:60600,name:"POTOS Testnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc-testnet.potos.hk"]}},blockExplorers:{default:{name:"POTOS Testnet explorer",url:"https://scan-testnet.potos.hk"}},testnet:!0}),$O=p({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),GO=p({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,blockTime:1e4,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://ipfs.scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),jO=p({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},blockTime:1e4,rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),VO=p({id:490092,name:"Pumpfi Testnet",nativeCurrency:{decimals:18,name:"PMPT",symbol:"PMPT"},rpcUrls:{default:{http:["https://rpc1testnet.pumpfi.me"]}},blockExplorers:{default:{name:"Pumpfi Testnet Scan",url:"https://testnetscan.pumpfi.me"}},testnet:!0}),y6=11155111,WO=p({...V,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:y6,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...V.contracts,l1StandardBridge:{[y6]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),qO=p({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),KO=p({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),YO=p({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),ZO=p({id:9,name:"Quai Network Mainnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Quaiscan",url:"https://quaiscan.io",apiUrl:"https://quaiscan.io/api"}},testnet:!1}),XO=p({id:15e3,name:"Quai Network Testnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://orchard.rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Orchard Quaiscan",url:"https://orchard.quaiscan.io",apiUrl:"https://orchard.quaiscan.io/api"}},testnet:!0}),QO=p({id:5318007,name:"Reactive Lasna Testnet",nativeCurrency:{decimals:18,name:"Lasna React",symbol:"lREACT"},rpcUrls:{default:{http:["https://lasna-rpc.rnk.dev"]}},blockExplorers:{default:{name:"Reactscan",url:"https://lasna.reactscan.net"}},testnet:!0}),JO=p({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.realforreal.gelato.digital"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),eD=p({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),tD=p({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),rD=p({id:50342,name:"Reddio",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://mainnet.reddio.com/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://reddio.cloud.blockscout.com",apiUrl:"https://reddio.cloud.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:848849}},testnet:!1}),nD=p({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}),Ql=1,sD=p({...V,name:"Redstone",id:690,sourceId:Ql,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ql]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[Ql]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[Ql]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),aD=p({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),oD=p({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),iD=p({id:11155931,name:"RISE Testnet",nativeCurrency:{name:"RISE Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.riselabs.xyz"],webSocket:["wss://testnet.riselabs.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.testnet.riselabs.xyz/",apiUrl:"https://explorer.testnet.riselabs.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}},testnet:!0}),cD=p({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),lD=p({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),uD=p({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),dD=p({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),pD=p({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),fD=p({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),hD=p({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),mD=p({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),Jl=1,bD=p({...V,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...V.contracts,l2OutputOracle:{[Jl]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[Jl]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[Jl]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:Jl}),eu=11155111,yD=p({...V,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...V.contracts,l2OutputOracle:{[eu]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[eu]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[eu]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:eu}),gD=p({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),xD=p({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["https://sagaevm.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}),wD=p({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),vD=p({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),ED=p({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),kD=p({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}},testnet:!0}),CD=p({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),TD=p({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),AD=p({id:534352,name:"Scroll",blockTime:3e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),SD=p({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),PD=p({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),ID=p({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),BD=p({id:5124,name:"Seismic Devnet",nativeCurrency:{name:"Seismic Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://node-2.seismicdev.net/rpc"]}},blockExplorers:{default:{name:"Seismic Devnet Explorer",url:"https://explorer-2.seismicdev.net"}},testnet:!0}),FD=p({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0}),UD=p({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),tu=1,OD=p({...V,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...V.contracts,l2OutputOracle:{[tu]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[tu]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[tu]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:tu}),DD=p({...V,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),_D=p({id:8118,name:"Shardeum",nativeCurrency:{name:"Shardeum",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://api.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer.shardeum.org"}},testnet:!1}),MD=p({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),ND=p({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),LD=p({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),zD=p({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),RD=p({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),HD=p({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),$D=p({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),GD=p({id:380929,name:"Silent Data Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.silentdata.com"]}},blockExplorers:{default:{name:"Silent Data Mainnet Explorer",url:"https://explorer-mainnet.rollup.silentdata.com"}},testnet:!1}),jD=p({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),VD=p({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),WD=p({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),qD=p({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),KD=p({id:1564830818,name:"SKALE Calypso Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),YD=p({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),ZD=p({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),XD=p({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),QD=p({id:2046399126,name:"SKALE Europa Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),JD=p({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),e_=p({id:2139927552,name:"Exorde Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),t_=p({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),r_=p({id:1482601649,name:"SKALE Nebula Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),n_=p({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),s_=p({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),a_=p({id:1187947933,name:"SKALE Base",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://skale-base.skalenodes.com/v1/base"],webSocket:["wss://skale-base.skalenodes.com/v1/ws/base"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://skale-base-explorer.skalenodes.com/"}},testnet:!0}),o_=p({id:324705682,name:"SKALE Base Sepolia Testnet",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/base-testnet"],webSocket:["wss://base-sepolia-testnet.skalenodes.com/v1/ws/base-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://base-sepolia-testnet-explorer.skalenodes.com/"}},testnet:!0}),i_=p({id:1350216234,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),c_=p({id:1020352220,name:"SKALE Titan Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),l_=p({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),Ni=1,u_=p({...V,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...V.contracts,disputeGameFactory:{[Ni]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[Ni]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ni]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[Ni]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:Ni}),Li=11155111,d_=p({...V,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...V.contracts,disputeGameFactory:{[Li]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[Li]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Li]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[Li]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:Li}),p_=p({id:5031,name:"Somnia",nativeCurrency:{name:"Somnia",symbol:"SOMI",decimals:18},rpcUrls:{default:{http:["https://api.infra.mainnet.somnia.network"]}},blockExplorers:{default:{name:"Somnia Explorer",url:"https://explorer.somnia.network",apiUrl:"https://explorer.somnia.network/api"}},testnet:!1}),f_=p({id:50312,name:"Somnia Testnet",nativeCurrency:{name:"STT",symbol:"STT",decimals:18},rpcUrls:{default:{http:["https://dream-rpc.somnia.network"]}},blockExplorers:{default:{name:"Somnia Testnet Explorer",url:"https://shannon-explorer.somnia.network/",apiUrl:"https://shannon-explorer.somnia.network/api"}},contracts:{multicall3:{address:"0x841b8199E6d3Db3C6f264f6C2bd8848b3cA64223",blockCreated:71314235}},testnet:!0}),zi=1,h_=p({...V,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...V.contracts,disputeGameFactory:{[zi]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[zi]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[zi]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[zi]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:zi}),Ri=11155111,m_=p({...V,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...V.contracts,disputeGameFactory:{[Ri]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[Ri]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[Ri]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[Ri]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:Ri}),b_=p({id:19,name:"Songbird Canary-Network",nativeCurrency:{decimals:18,name:"Songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13382504}}}),y_=p({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),g_=p({id:146,name:"Sonic",blockTime:630,nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),x_=p({id:57054,name:"Sonic Blaze Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.blaze.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Blaze Testnet Explorer",url:"https://testnet.sonicscan.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1100}},testnet:!0}),w_=p({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),v_=p({...fr,blockTime:200,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),E_=p({...fr,blockTime:200,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),k_=p({id:100021,name:"Sova",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sova.io"]}},blockExplorers:{default:{name:"Sova Block Explorer",url:"hhttps://explorer.sova.io"}},testnet:!1}),C_=p({id:120893,name:"Sova Network Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.testnet.sova.io"]}},blockExplorers:{default:{name:"Sova Sepolia Explorer",url:"https://explorer.testnet.sova.io"}},testnet:!0}),T_=p({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),A_=p({id:2201,name:"Stable Testnet",nativeCurrency:{decimals:18,name:"gUSDT",symbol:"gUSDT"},rpcUrls:{default:{http:["https://rpc.testnet.stable.xyz"],webSocket:["wss://rpc.testnet.stable.xyz"]}},blockExplorers:{default:{name:"Stablescan",url:"https://testnet.stablescan.xyz",apiUrl:"https://testnet.stablescan.xyz/api"}},testnet:!0}),g6=p({...Vf,id:1660990954,name:"Status Network Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://public.sepolia.rpc.status.network"],webSocket:["wss://public.sepolia.rpc.status.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepoliascan.status.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1578364}},testnet:!0}),S_=p({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),P_=p({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1}),I_=p({id:1315,name:"Story Aeneid",network:"story-aeneid",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1792},ensRegistry:{address:"0x5dC881dDA4e4a8d312be3544AD13118D1a04Cb17",blockCreated:1322033},ensUniversalResolver:{address:"0x6D3B3F99177FB2A5de7F9E928a9BD807bF7b5BAD",blockCreated:1322097}},rpcUrls:{default:{http:["https://aeneid.storyrpc.io"]}},blockExplorers:{default:{name:"Story Aeneid Explorer",url:"https://aeneid.storyscan.io",apiUrl:"https://aeneid.storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!0}),B_=p({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),F_=p({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),U_=p({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),O_=p({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),D_=p({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),Hi=1,__=p({...V,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...V.contracts,disputeGameFactory:{[Hi]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[Hi]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[Hi]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[Hi]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Hi}),Wf=11155111,M_=p({...V,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Wf]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Wf]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Wf}),N_=p({id:763375,name:"Surge Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-rpc.hoodi.surge.wtf"],webSocket:["wss://l2-ws.hoodi.surge.wtf"]}},blockExplorers:{default:{name:"Surge Testnet Blockscout",url:"https://explorer.hoodi.surge.wtf"}},testnet:!0}),L_=p({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),z_=p({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),R_=p({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),H_=p({...V,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),$_=p({...V,id:1924,name:"Swellchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-testnet.alt.technology"]}},blockExplorers:{default:{name:"Swellchain Testnet Explorer",url:"https://swell-testnet-explorer.alt.technology",apiUrl:"https://swell-testnet-explorer.alt.technology/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),G_=p({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}),j_=p({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),V_=p({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),W_=p({id:239,name:"TAC",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/tac"]}},blockExplorers:{default:{name:"Blockscout",url:"https://tac.blockscout.com",apiUrl:"https://tac.blockscout.com/api"},native:{name:"TAC Explorer",url:"https://explorer.tac.build",apiUrl:"https://explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),q_=p({id:2391,name:"TAC SPB Testnet",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://spb.rpc.tac.build"]}},blockExplorers:{default:{name:"TAC",url:"https://spb.explorer.tac.build",apiUrl:"https://spb.explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:471429}},testnet:!0}),K_=p({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://taikoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11269}}}),Y_=p({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),Z_=p({id:167013,name:"Taiko Hoodi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.taiko.xyz"],webSocket:["wss://ws.hoodi.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.taikoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:581116}},testnet:!0}),X_=p({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),Q_=p({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),J_=p({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),eM=p({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),tM=p({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),rM=p({id:10218,name:"Tea Sepolia",nativeCurrency:{name:"Sepolia Tea",symbol:"TEA",decimals:18},rpcUrls:{default:{http:["https://tea-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Tea Sepolia Explorer",url:"https://sepolia.tea.xyz"}},testnet:!0}),nM=p({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),sM=p({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.telos.net"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),aM=p({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.testnet.telos.net"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const x6=Qa(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),oM=x6.create(BigInt("-3")),iM=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),cM=kl({a:oM,b:iM,Fp:x6,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},hp),w6=Qa(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),lM=w6.create(BigInt("-3")),uM=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");kl({a:lM,b:uM,Fp:w6,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},LE);const v6=Qa(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),dM=v6.create(BigInt("-3")),pM=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");kl({a:dM,b:pM,Fp:v6,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},NE);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const fM=cM;function E6(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return fM.verify(s,r instanceof Uint8Array?r:cs(r),tf(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}const hM=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const ru={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function mM(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);hM.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(ru[n[a]]<<18)+(ru[n[a+1]]<<12)+(ru[n[a+2]]<<6)+ru[n[a+3]];n[o]=i>>16,n[o+1]=i>>8&255,n[o+2]=i&255}const s=(r>>2)*3+(r%4&&r%4-1);return new Uint8Array(n.buffer,0,s)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);function bM(e){const{challenge:t,hash:r=!0,metadata:n,publicKey:s,signature:a}=e,{authenticatorData:o,challengeIndex:i,clientDataJSON:c,typeIndex:l,userVerificationRequired:u}=n,d=cs(o);if(d.length<37)return!1;const f=d[32];if((f&1)!==1||u&&(f&4)!==4||(f&8)!==8&&(f&16)===16)return!1;if(l!==void 0){const w='"type":"webauthn.get"';if(w!==c.slice(Number(l),w.length+1))return!1}const h=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!h)return!1;const[y,g]=h;if(Pt(mM(g))!==t)return!1;const E=aC(cy(c),{as:"Bytes"}),v=ik(d,E);return E6({hash:r,payload:v,publicKey:s,signature:a})}const qf="0x01",Kf="0x02",k6="0x03",ea="0x7777777777777777777777777777777777777777777777777777777777777777";function no(e){const t=e.endsWith(ea.slice(2))?Pe(e,0,-bt(ea)):e;if(bt(t)===65){const o=kf(t);return Cl(o),{signature:o,type:"secp256k1"}}const n=Pe(t,0,1),s=Pe(t,1),a=bt(s);if(n===qf){if(a!==129)throw new ji({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,64,96)),y:yt(Pe(s,96,128))},prehash:gi(Pe(s,128,129))!==0,signature:{r:yt(Pe(s,0,32)),s:yt(Pe(s,32,64))},type:"p256"}}if(n===Kf){if(a<128)throw new ji({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const o=a-128,i=Pe(s,0,o);let c,l;for(let u=37;u<o;u++){const d=fy(Pe(i,u));if(d.startsWith("{")&&d.endsWith("}"))try{JSON.parse(d),c=Pe(i,0,u),l=d;break}catch{}}if(!c||!l)throw new ji({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:yt(Pe(s,o+64,o+96)),y:yt(Pe(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:yt(Pe(s,o,o+32)),s:yt(Pe(s,o+32,o+64))},type:"webAuthn"}}if(n===k6){const o=Pe(s,0,20),i=no(Pe(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new ji({reason:`Unknown signature type identifier: ${n}. Expected ${qf} (P256) or ${Kf} (WebAuthn)`,serialized:t})}function $i(e){if(typeof e=="string")return no(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=Yf(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function nu(e){if(e.type==="secp256k1")return{signature:Cf(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=bt(t);let n,s;for(let a=37;a<r;a++){const o=fy(Pe(t,a));if(o.startsWith("{")&&o.endsWith("}"))try{JSON.parse(o),n=Pe(t,0,a),s=o;break}catch{}}if(!n||!s)throw new ji({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:n,clientDataJSON:s},publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:nu(e.signature)};throw new Gi({envelope:e})}function Yf(e){if(typeof e!="object"||e===null)throw new Gi({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";throw new Gi({envelope:e})}function su(e,t={}){const r=Yf(e);if(r==="secp256k1")return pt(E9(e.signature),t.magic?ea:"0x");if(r==="p256"){const n=e;return pt(qf,Z(n.signature.r,{size:32}),Z(n.signature.s,{size:32}),Z(n.publicKey.x,{size:32}),Z(n.publicKey.y,{size:32}),Z(n.prehash?1:0,{size:1}),t.magic?ea:"0x")}if(r==="webAuthn"){const n=e,s=pt(n.metadata.authenticatorData,yi(n.metadata.clientDataJSON));return pt(Kf,s,Z(n.signature.r,{size:32}),Z(n.signature.s,{size:32}),Z(n.publicKey.x,{size:32}),Z(n.publicKey.y,{size:32}),t.magic?ea:"0x")}if(r==="keychain"){const n=e;return pt(k6,n.userAddress,su(n.inner),t.magic?ea:"0x")}throw new Gi({envelope:e})}function Zf(e){const t=Yf(e);if(t==="secp256k1")return{...Hg(e.signature),type:"secp256k1"};if(t==="p256"){const r=e;return{preHash:r.prehash,pubKeyX:Z(r.publicKey.x,{size:32}),pubKeyY:Z(r.publicKey.y,{size:32}),r:Z(r.signature.r,{size:32}),s:Z(r.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const r=e,n=pt(r.metadata.authenticatorData,yi(r.metadata.clientDataJSON));return{pubKeyX:Z(r.publicKey.x,{size:32}),pubKeyY:Z(r.publicKey.y,{size:32}),r:Z(r.signature.r,{size:32}),s:Z(r.signature.s,{size:32}),type:"webAuthn",webauthnData:n}}if(t==="keychain"){const r=e;return{type:"keychain",userAddress:r.userAddress,signature:Zf(r.inner)}}throw new Gi({envelope:e})}function yM(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return vl(t.publicKey)})();if(!n)return!1;const s=$i(e);if(s.type==="secp256k1")return n?O9({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=vl(s.publicKey);return nf(a,n)?E6({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=vl(s.publicKey);return nf(a,n)?bM({challenge:cl(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new gM(`Unable to verify signature envelope of type "${s.type}".`)}class Gi extends ae{constructor({envelope:t}){super(`Unable to coerce value (\`${bi(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let ji=class extends ae{constructor({reason:t,serialized:r}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class gM extends ae{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function xM(e,t={}){return typeof e.chainId=="string"?C6(e):t.signature?{...e,signature:t.signature}:e}function C6(e){const{address:t,chainId:r,nonce:n}=e,s=nu(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function wM(e){return e.map(t=>C6(t))}function vM(e){const[t,r,n,s]=e,a={address:r,chainId:t==="0x"?0:Number(t),nonce:n==="0x"?0n:BigInt(n)};return s&&(a.signature=no(s)),xM(a)}function EM(e){const t=[];for(const r of e)t.push(vM(r));return t}function kM(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:Z(r),nonce:Z(n),signature:Zf(s)}}function CM(e){return e.map(t=>kM(t))}function TM(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?su(e.signature):void 0;return[r?Z(r):"0x",t,n?Z(n):"0x",...s?[s]:[]]}function AM(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(TM(r));return t}function SM(e,t={}){return typeof e.expiry=="string"?T6(e):t.signature?{...e,signature:$i(t.signature)}:e}function T6(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=nu(e.signature);return{address:r,chainId:t==="0x"?0n:yt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function PM(e){const[t,r]=e,[n,s,a,o,i]=t,c=(()=>{switch(s){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";default:throw new Error(`Invalid key type: ${s}`)}})(),l={address:a,expiry:typeof o<"u"?gi(o):void 0,type:c,...n!=="0x"?{chainId:yt(n)}:{},...typeof o<"u"?{expiry:gi(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=no(r)),SM(l)}function IM(e){const{address:t,chainId:r=0n,expiry:n,limits:s,type:a,signature:o}=e;return{chainId:r===0n?"0x":Z(r),expiry:typeof n=="number"?Z(n):null,limits:s==null?void 0:s.map(({token:i,limit:c})=>({token:i,limit:Z(c)})),keyId:t,signature:Zf(o),keyType:a}}function BM(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?su(e.signature):void 0,o=(()=>{switch(e.type){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";default:throw new Error(`Invalid key type: ${e.type}`)}})();return[[r===0n?"0x":Z(r),o,t,typeof n=="number"?Z(n):void 0,(s==null?void 0:s.map(c=>[c.token,Z(c.limit)]))??void 0].filter(Boolean),...a?[a]:[]]}const FM="0x20c0";function A6(e){if(typeof e=="string")return Rr(e),e;const t=Z(e,{size:18});return pt(FM,t)}const S6={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},P6={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function UM(e,t={}){if(!e)return null;const r=Rg(e),n={...e,...r};return n.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,n.data=e.input,n.gas=BigInt(e.gas??0n),n.nonce=BigInt(e.nonce??0n),n.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,n.value=BigInt(e.value??0n),e.authorizationList&&(n.authorizationList=I9(e.authorizationList)),e.chainId&&(n.chainId=Number(e.chainId)),e.gasPrice&&(n.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(n.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(n.type=P6[e.type]??e.type),r&&(n.v=Af(r.yParity)),n}const I6={...S6,tempo:"0x76"},OM={...P6,"0x76":"tempo"};function DM(e,t={}){if(!e)return null;const r=UM(e);return r.type=OM[e.type],e.aaAuthorizationList&&(r.authorizationList=wM(e.aaAuthorizationList),delete r.aaAuthorizationList),e.calls&&(r.calls=e.calls.map(n=>({to:n.to,value:n.value&&n.value!=="0x"?BigInt(n.value):void 0,data:n.input||n.data||"0x"}))),e.feeToken&&(r.feeToken=e.feeToken),e.nonceKey&&(r.nonceKey=BigInt(e.nonceKey)),e.signature&&(r.signature=nu(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=T6(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Cf(e.feePayerSignature),r.feePayerSignature.v=Af(r.feePayerSignature.yParity)),r}function _M(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=F9(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=Z(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=Z(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=Z(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=Z(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=Z(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Z(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Z(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=Z(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=S6[e.type]||e.type),typeof e.value<"u"&&(t.value=Z(e.value)),t}function MM(e){const t=_M({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=CM(e.authorizationList)),e.calls&&(t.calls=e.calls.map(n=>({to:n.to,value:n.value?Z(n.value):"0x",data:n.data??"0x"}))),typeof e.feeToken<"u"&&(t.feeToken=A6(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=IM(e.keyAuthorization)),typeof e.validBefore<"u"&&(t.validBefore=Z(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=Z(e.validAfter));const r=(()=>{if(e.nonceKey==="random")return py(6);if(typeof e.nonceKey=="bigint")return Z(e.nonceKey)})();return r&&(t.nonceKey=r),(typeof e.calls<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=I6.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function NM(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&Rr(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>oC(a)?a:Fp(a))})}return t}function LM(e){if(!e||e.length===0)return[];const t=[];for(const{address:r,storageKeys:n}of e){for(let s=0;s<n.length;s++)if(bt(n[s])!==32)throw new zM({storageKey:n[s]});r&&Rr(r,{strict:!1}),t.push([r,n])}return t}class zM extends ae{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${bt(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const B6={wei:0,gwei:9,szabo:12,finney:15,ether:18};function RM(e,t=0){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function Xf(e,t="wei"){return RM(e,B6.gwei-B6[t])}class HM extends ae{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${Xf(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class $M extends ae{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class GM extends ae{constructor({attributes:t,serialized:r,type:n}){const s=Object.entries(t).map(([a,o])=>typeof o>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class jM extends ae{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Xf(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Xf(r)} gwei`:""}).`].join(`
109
109
  `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const VM="0x78",WM="0x76",F6="tempo";function Qf(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new QM;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new JM({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Rr(i.to,{strict:!1});if(r<=0)throw new $M({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new HM({feeCap:n});if(s&&n&&s>n)throw new jM({maxFeePerGas:n,maxPriorityFeePerGas:s})}function qM(e){const t=GC(Pe(e,1)),[r,n,s,a,o,i,c,l,u,d,f,h,y,g,E]=t,v=Array.isArray(g)?g:void 0,w=v?E:g;if(!(t.length===13||t.length===14||t.length===15))throw new GM({attributes:{authorizationList:y,chainId:r,maxPriorityFeePerGas:n,maxFeePerGas:s,gas:a,calls:o,accessList:i,keyAuthorization:v,nonceKey:c,nonce:l,validBefore:u,validAfter:d,feeToken:f,feePayerSignatureOrSender:h,...t.length>12?{signature:w}:{}},serialized:e,type:F6});let A={chainId:Number(r),type:F6};if(Lr(a)&&a!=="0x"&&(A.gas=BigInt(a)),Lr(l)&&(A.nonce=l==="0x"?0n:BigInt(l)),Lr(s)&&s!=="0x"&&(A.maxFeePerGas=BigInt(s)),Lr(n)&&n!=="0x"&&(A.maxPriorityFeePerGas=BigInt(n)),Lr(c)&&(A.nonceKey=c==="0x"?0n:BigInt(c)),Lr(u)&&u!=="0x"&&(A.validBefore=Number(u)),Lr(d)&&d!=="0x"&&(A.validAfter=Number(d)),Lr(f)&&f!=="0x"&&(A.feeToken=f),o&&o!=="0x"){const D=o;A.calls=D.map(z=>{const[T,m,b]=z,x={};return T&&T!=="0x"&&(x.to=T),m&&m!=="0x"&&(x.value=BigInt(m)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(A.accessList=NM(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(A.authorizationList=EM(y)),h!=="0x"&&h!==void 0&&(h==="0x00"||El(h)?A.feePayerSignature=null:A.feePayerSignature=v9(h)),v&&(A.keyAuthorization=PM(v));const C=w?no(w):void 0;return C&&(A={...A,signature:C}),Qf(A),A}function KM(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?qM(e):e;return Qf(s),{...s,...n?{signature:$i(n)}:{},...r?{feePayerSignature:Tl(r)}:{},type:"tempo"}}function Vi(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:f,validBefore:h,validAfter:y}=e;Qf(e);const g=LM(r),E=t.signature||e.signature,v=AM(n),w=s.map(D=>[D.to??"0x",D.value?Z(D.value):"0x",D.data??"0x"]),A=(()=>{if(t.sender)return t.sender;const D=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return D===null?"0x00":D?k9(D):"0x"})(),C=[Z(a),f?Z(f):"0x",d?Z(d):"0x",i?Z(i):"0x",w,g,u?Z(u):"0x",l?Z(l):"0x",typeof h=="number"?Z(h):"0x",typeof y=="number"?Z(y):"0x",typeof o=="bigint"||typeof o=="string"?A6(o):"0x",A,v,...c?[BM(c)]:[],...E?[su($i(E))]:[]];return pt(t.format==="feePayer"?VM:WM,qC(C))}function YM(e){return ZM(e,{presign:!0})}function ZM(e,t={}){const r=Vi({...e,...t.presign?{signature:void 0}:{}});return Ti(r)}function XM(e,t){const{sender:r}=t,n=Vi({...e,signature:void 0},{sender:r,format:"feePayer"});return Ti(n)}class QM extends ae{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class JM extends ae{constructor({validBefore:t,validAfter:r}){super(`validBefore (${t}) must be greater than validAfter (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function U6(e){const t=e.account;return t!=null&&t.keyType&&t.keyType!=="secp256k1"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.signature<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:bp(e)}function Jf(e){try{return U6(e)==="tempo"}catch{return!1}}async function eN(e,t){if(!Jf(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r:n,s,yParity:a}=t==null?void 0:t.signature;return xl(e,{r:Z(n,{size:32}),s:Z(s,{size:32}),yParity:a})}return xl(e,t)}if(U6(e)==="tempo")return tN(e,t);throw new Error("Unsupported transaction type")}async function tN(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return $i({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:n,feePayer:s,feePayerSignature:a,nonce:o,...i}=e,c={...i,calls:(l=i.calls)!=null&&l.length?i.calls:[{to:i.to||(!i.data||i.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:i.value,data:i.data}],chainId:Number(n),feePayerSignature:a?{r:BigInt(a.r),s:BigInt(a.s),yParity:Number(a.yParity)}:s?null:void 0,type:"tempo",...o?{nonce:BigInt(o)}:{}};if(s===!0&&delete c.feeToken,r&&typeof e.feePayer=="object"){const u=KM(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return Gg({payload:YM(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),f=XM(u,{sender:d}),h=await e.feePayer.sign({hash:f});return Vi(u,{feePayerSignature:Tl(h)})}if(s===!0){const u=Vi(c,{feePayerSignature:null,signature:r});return e.from&&r?pt(u,e.from,"0xfeefeefeefee"):u}return Vi({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function rN(e){if(!Jf(e))return Ws(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=DM(e);return{...s,accessList:s.accessList,feePayerSignature:t?{r:Z(t.r,{size:32}),s:Z(t.s,{size:32}),v:BigInt(t.v??27),yParity:t.yParity}:void 0,nonce:Number(n),typeHex:I6[s.type],type:s.type}}function nN(e){return ml(e)}function sN(e,t){const r=e,n=r.account?Ye(r.account):void 0;if(!Jf(r))return Mr(e);t&&(r.calls=r.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),r.feePayer===!0&&delete r.feeToken;const s=MM({...r,type:"tempo"});t==="estimateGas"&&(s.maxFeePerGas=void 0,s.maxPriorityFeePerGas=void 0),s.to=void 0,s.data=void 0,s.value=void 0;const[a,o]=(()=>{const c=n&&"keyType"in n?n.keyType:n==null?void 0:n.source;return c?c==="webAuthn"?["webAuthn",`0x${"ff".repeat(1400)}`]:["p256","secp256k1"].includes(c)?[c,void 0]:[void 0,void 0]:[void 0,void 0]})(),i=n&&"accessKeyAddress"in n?n.accessKeyAddress:void 0;return{...s,...o?{keyData:o}:{},...i?{keyId:i}:{},...a?{keyType:a}:{},...r.feePayer?{feePayer:typeof r.feePayer=="object"?Ye(r.feePayer):r.feePayer}:{}}}const aN=oN();function oN(){return new Map}function iN(e){return`${e.address.toLowerCase()}-${e.chainId}`}function O6(e,t){const r=iN(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function cN(e,t){const r=O6(e,t);r.counter=0,r.resetScheduled=!1}function lN(e,t){const r=O6(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>cN(e,t)));const n=r.counter;return r.counter++,n===0?0n:yt(py(6))}const e0={blockTime:1e3,extendSchema:G7(),formatters:{transaction:Qc({exclude:["aaAuthorizationList"],format:rN}),transactionReceipt:jp({format:nN}),transactionRequest:sp({format:sN})},prepareTransactionRequest:[async(e,{phase:t})=>{var n;const r=e;return t==="afterFillParameters"?(typeof r.nonceKey=="bigint"&&r.nonceKey>0n&&(r.gas=(r.gas??0n)+40000n),r):(r.nonceKey=(()=>{var o;if(typeof r.nonceKey<"u"&&r.nonceKey!=="random")return r.nonceKey;const s=((o=r.account)==null?void 0:o.address)??r.from;if(!s||!r.chain)return;const a=lN(aN,{address:s,chainId:r.chain.id});if(a!==0n)return a})(),r.nonce=(()=>{if(typeof r.nonce=="number")return r.nonce;if(r.nonceKey)return 0})(),!r.feeToken&&((n=r.chain)!=null&&n.feeToken)&&(r.feeToken=r.chain.feeToken),r)},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:((e,t)=>eN(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(ea.slice(2))){const a=no(s);if(a.type!=="keychain"){const o=await gl(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return yM(a,{address:r,payload:n})}}return await ne(e,Pi,"verifyHash")({...t,chain:null})}},uN=p({...e0,id:42429,name:"Tempo Devnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.devnet.tempoxyz.dev"],webSocket:["wss://rpc.devnet.tempoxyz.dev"]}}}),dN=p({...e0,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),pN=p({...e0,id:42429,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},name:"Tempo Testnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.testnet.tempo.xyz"],webSocket:["wss://rpc.testnet.tempo.xyz"]}}}),fN=p({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),hN=p({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),mN=p({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),bN=p({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),yN=p({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),gN=p({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),xN=p({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),wN=p({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),vN=p({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),EN=p({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),kN=p({...fr,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),CN=p({...fr,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),TN=p({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),AN=p({id:3448148188,name:"Tron Nile",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://nile.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0}),SN=p({id:2494104990,name:"Tron Shasta",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.shasta.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0}),PN=p({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),IN=p({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),BN=p({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),FN=p({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),UN=p({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),au=1,ON=p({...V,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[au]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[au]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[au]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:au}),ou=11155111,DN=p({...V,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[ou]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[ou]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[ou]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:ou}),_N=p({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),MN=p({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),NN=p({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),LN=p({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),zN=p({id:1480,name:"Vana",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.vana.org/"]}},blockExplorers:{default:{name:"Vana Block Explorer",url:"https://vanascan.io",apiUrl:"https://vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:716763}}}),RN=p({id:14800,name:"Vana Moksha Testnet",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.moksha.vana.org"]}},blockExplorers:{default:{name:"Vana Moksha Testnet",url:"https://moksha.vanascan.io",apiUrl:"https://moksha.vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:732283}},testnet:!0}),HN=p({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),$N=p({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),GN=p({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:55883577}},testnet:!1}),jN=p({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),VN=p({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),WN=p({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),qN=p({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),KN=p({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),YN=p({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),ZN=p({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),XN=p({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),QN=p({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),JN=p({id:420420421,name:"Westend Asset Hub",nativeCurrency:{decimals:18,name:"Westies",symbol:"WND"},rpcUrls:{default:{http:["https://westend-asset-hub-eth-rpc.polkadot.io"]}},blockExplorers:{default:{name:"subscan",url:"https://westend-asset-hub-eth-explorer.parity.io"}},testnet:!0}),eL=p({testnet:!1,name:"Whitechain",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://explorer.whitechain.io"}},id:1875,rpcUrls:{default:{http:["https://rpc.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25212237}}}),tL=p({testnet:!0,name:"Whitechain Testnet",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://testnet.whitechain.io"}},id:2625,rpcUrls:{default:{http:["https://rpc-testnet.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"}}),rL=p({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),Wi=1,nL=p({...V,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Wi]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[Wi]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[Wi]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[Wi]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:Wi}),qi=11155111,sL=p({...V,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[qi]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[qi]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[qi]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[qi]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:qi}),aL=p({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),oL=p({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),iL=p({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),cL=p({id:50,name:"XDC Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),lL=p({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),uL=p({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),D6=p({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),dL=p({id:3721,name:"Xone Chain Mainnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc.xone.org"]}},blockExplorers:{default:{name:"Xone Mainnet Explorer",url:"https://xonescan.com",apiUrl:"http://api.xonescan.com/api"}},testnet:!1}),pL=p({id:33772211,name:"Xone Chain Testnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc-testnet.xone.org","https://rpc-testnet.xone.plus","https://rpc-testnet.knight.center"]}},blockExplorers:{default:{name:"Xone Testnet Explorer",url:"https://testnet.xonescan.com",apiUrl:"http://api.testnet.xonescan.com/api"}},testnet:!0}),fL=p({id:20250217,name:"Xphere Mainnet",nativeCurrency:{decimals:18,name:"XP",symbol:"XP"},rpcUrls:{default:{http:["https://en-bkk.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xp.tamsa.io"}},testnet:!1}),hL=p({id:1998991,name:"Xphere Testnet",nativeCurrency:{decimals:18,name:"XPT",symbol:"XPT"},rpcUrls:{default:{http:["http://testnet.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xpt.tamsa.io"}},testnet:!0}),mL=p({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),bL=p({id:144e4,name:"XRPL EVM",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.xrplevm.org",apiUrl:"https://explorer.xrplevm.org/api/v2"}},testnet:!1}),yL=p({id:1440002,name:"XRPL EVM Devnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org/"]},public:{http:["https://rpc.xrplevm.org/"]}},blockExplorers:{default:{name:"XRPLEVM Devnet Explorer",url:"https://explorer.xrplevm.org/"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:15237286}},testnet:!0}),gL=p({id:1449e3,name:"XRPL EVM Testnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.testnet.xrplevm.org",apiUrl:"https://explorer.testnet.xrplevm.org/api/v2"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:492302}},testnet:!0}),xL=p({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),wL=p({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),vL=p({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),EL=p({id:8408,name:"ZenChain Testnet",nativeCurrency:{decimals:18,name:"ZTC",symbol:"ZTC"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),kL=p({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),CL=p({id:543210,name:"Zero Network",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zerion.io/v1/zero"]}},blockExplorers:{default:{name:"Zero Network Explorer",url:"https://explorer.zero.network"}},testnet:!1}),TL=p({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://zetascan.com"}},testnet:!1}),AL=p({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://testnet.zetascan.com"}},testnet:!0}),SL=p({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),PL=p({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),IL=p({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),t0=1,BL=p({...V,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.zircuit.com","https://zircuit1-mainnet.liquify.com","https://zircuit1-mainnet.p2pify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[t0]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[t0]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[t0]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),r0=11155111,FL=p({...V,id:48898,name:"Zircuit Garfield Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://garfield-testnet.zircuit.com/"]}},blockExplorers:{default:{name:"Zircuit Garfield Testnet Explorer",url:"https://explorer.garfield-testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[r0]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[r0]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[r0]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),n0=11155111,UL=p({...V,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.zircuit.com","https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{[n0]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[n0]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[n0]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),OL=p({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),DL=p({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),_L=p({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),ML=p({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),_6=p({...fr,blockTime:200,id:324,name:"ZKsync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),M6=p({...fr,id:260,name:"ZKsync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),NL=p({...fr,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),LL=p({...fr,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),zL=p({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),N6=p({...fr,id:270,name:"ZKsync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),L6=p({...fr,blockTime:200,id:300,name:"ZKsync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),iu=1,RL=p({...V,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...V.contracts,l2OutputOracle:{[iu]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[iu]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[iu]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:iu}),cu=11155111,HL=p({...V,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...V.contracts,l2OutputOracle:{[cu]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[cu]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[cu]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:cu,testnet:!0}),z6=5,$L=p({...V,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[z6]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:z6,testnet:!0}),GL=Object.freeze(Object.defineProperty({__proto__:null,abey:t4,abstract:p4,abstractTestnet:f4,acala:h4,acria:m4,adf:b4,agungTestnet:y4,aioz:g4,alephZero:x4,alephZeroTestnet:w4,alienx:v4,alienxHalTestnet:E4,ancient8:S4,ancient8Sepolia:P4,anvil:I4,apeChain:B4,apexTestnet:F4,apollo:U4,arbitrum:O4,arbitrumGoerli:D4,arbitrumNova:_4,arbitrumSepolia:M4,arcTestnet:N4,arenaz:L4,areonNetwork:z4,areonNetworkTestnet:R4,areum:H4,artelaTestnet:$4,arthera:G4,artheraTestnet:j4,assetChain:V4,assetChainTestnet:W4,astar:q4,astarZkEVM:K4,astarZkyoto:Y4,atletaOlympia:Z4,aurora:X4,auroraTestnet:Q4,auroria:J4,autheoTestnet:eA,avalanche:tA,avalancheFuji:rA,b3:nA,b3Sepolia:sA,bahamut:aA,base:u6,baseGoerli:cA,basePreconf:oA,baseSepolia:d6,baseSepoliaPreconf:lA,basecampTestnet:iA,beam:uA,beamTestnet:dA,bearNetworkChainMainnet:pA,bearNetworkChainTestnet:fA,berachain:hA,berachainBepolia:mA,berachainTestnet:bA,berachainTestnetbArtio:yA,bevmMainnet:gA,bifrost:xA,birdlayer:wA,bitTorrent:SA,bitTorrentTestnet:PA,bitgert:vA,bitkub:EA,bitkubTestnet:kA,bitlayer:CA,bitlayerTestnet:TA,bitrock:AA,blast:IA,blastSepolia:BA,bob:FA,bobSepolia:DA,boba:UA,bobaSepolia:OA,boolBetaMainnet:_A,botanix:MA,botanixTestnet:NA,bounceBit:LA,bounceBitTestnet:zA,bronos:RA,bronosTestnet:HA,bsc:$A,bscGreenfield:GA,bscTestnet:jA,bsquared:VA,bsquaredTestnet:WA,btr:qA,btrTestnet:KA,bxn:YA,bxnTestnet:ZA,cannon:XA,canto:QA,celo:lS,celoAlfajores:uS,celoSepolia:dS,chang:pS,chiliz:fS,chips:hS,citreaTestnet:mS,classic:bS,coinbit:yS,coinex:gS,confluxESpace:xS,confluxESpaceTestnet:wS,coreDao:vS,coreTestnet1:ES,coreTestnet2:kS,corn:CS,cornTestnet:TS,crab:AS,creatorTestnet:SS,creditCoin3Devnet:PS,creditCoin3Mainnet:IS,creditCoin3Testnet:BS,cronos:FS,cronosTestnet:US,cronoszkEVM:OS,cronoszkEVMTestnet:DS,crossbell:_S,crossfi:MS,curtis:NS,cyber:LS,cyberTestnet:zS,dailyNetwork:RS,dailyNetworkTestnet:HS,darwinia:$S,datahavenTestnet:GS,dbkchain:jS,dchain:VS,dchainTestnet:WS,defichainEvm:qS,defichainEvmTestnet:KS,degen:YS,dfk:ZS,diode:XS,disChain:QS,dodochainTestnet:JS,dogechain:eP,domaTestnet:tP,donatuz:rP,dosChain:nP,dosChainTestnet:sP,dreyerxMainnet:aP,dreyerxTestnet:oP,dustboyIoT:iP,dymension:cP,edexa:lP,edexaTestnet:uP,edgeless:dP,edgelessTestnet:pP,edgeware:fP,edgewareTestnet:hP,eduChain:mP,eduChainTestnet:bP,ekta:yP,ektaTestnet:gP,elastos:xP,elastosTestnet:wP,electroneum:vP,electroneumTestnet:EP,elysiumTestnet:kP,energy:CP,eni:TP,eniTestnet:AP,enuls:SP,eon:PP,eos:IP,eosTestnet:BP,eteria:FP,etherlink:UP,etherlinkShadownetTestnet:OP,etherlinkTestnet:DP,ethernity:_P,etp:MP,evmos:NP,evmosTestnet:LP,excelonMainnet:zP,expanse:RP,exsat:HP,exsatTestnet:$P,fantom:GP,fantomSonicTestnet:jP,fantomTestnet:VP,fibo:WP,filecoin:qP,filecoinCalibration:KP,filecoinHyperspace:YP,fireChain:e4,flame:ZP,flare:XP,flareTestnet:QP,flowMainnet:JP,flowPreviewnet:eI,flowTestnet:tI,fluence:rI,fluenceStage:nI,fluenceTestnet:sI,fluentTestnet:aI,form:oI,formTestnet:cI,forma:iI,formicarium:oU,forta:lI,foundry:uI,fraxtal:dI,fraxtalTestnet:pI,funkiMainnet:fI,funkiSepolia:hI,fuse:mI,fuseSparknet:bI,fusion:yI,fusionTestnet:gI,garnet:xI,gatechain:wI,geist:vI,genesys:EI,giwaSepolia:h6,giwaSepoliaPreconf:kI,glideL1Protocol:CI,glideL2Protocol:TI,gnosis:AI,gnosisChiado:SI,goChain:BI,goat:PI,gobi:II,godwoken:FI,goerli:UI,graphite:OI,graphiteTestnet:DI,gravity:_I,gunz:MI,guruNetwork:NI,guruTestnet:LI,ham:zI,happychainTestnet:RI,haqqMainnet:HI,haqqTestedge2:$I,hardhat:GI,harmonyOne:jI,hashkey:VI,hashkeyTestnet:WI,haustTestnet:qI,hedera:KI,hederaPreviewnet:YI,hederaTestnet:ZI,hela:XI,heliosTestnet:QI,hemi:JI,hemiSepolia:eB,henesys:tB,holesky:rB,hoodi:nB,hpb:sB,hpp:aB,hppSepolia:oB,huddle01Mainnet:iB,huddle01Testnet:cB,humanity:lB,humanityTestnet:uB,humanode:dB,humanodeTestnet5:pB,hychain:fB,hychainTestnet:hB,hyperEvm:m6,hyperliquid:m6,hyperliquidEvmTestnet:mB,iSunCoin:FB,icbNetwork:bB,idchain:yB,immutableZkEvm:gB,immutableZkEvmTestnet:xB,inEVM:wB,initVerse:vB,initVerseGenesis:EB,injective:kB,injectiveTestnet:CB,ink:TB,inkSepolia:AB,iota:SB,iotaTestnet:PB,iotex:IB,iotexTestnet:BB,jasmyChain:UB,jasmyChainTestnet:OB,jbc:DB,jbcTestnet:_B,jocMainnet:MB,jocTestnet:NB,jovay:LB,jovaySepolia:zB,juneo:RB,juneoBCH1Chain:HB,juneoDAI1Chain:$B,juneoDOGE1Chain:GB,juneoEUR1Chain:jB,juneoGLD1Chain:VB,juneoLINK1Chain:WB,juneoLTC1Chain:qB,juneoSGD1Chain:YB,juneoSocotraTestnet:ZB,juneoUSD1Chain:XB,juneoUSDT1Chain:QB,juneomBTC1Chain:KB,kaia:JB,kairos:eF,kakarotSepolia:tF,kakarotStarknetSepolia:rF,kardiaChain:nF,karura:sF,katana:aF,kava:oF,kavaTestnet:iF,kcc:cF,kiiTestnetOro:lF,kinto:uF,klaytn:dF,klaytnBaobab:pF,koi:fF,kroma:hF,kromaSepolia:mF,l3x:bF,l3xTestnet:yF,lavita:gF,lens:xF,lensTestnet:wF,lestnet:vF,lightlinkPegasus:EF,lightlinkPhoenix:kF,linea:TF,lineaGoerli:AF,lineaSepolia:SF,lineaTestnet:PF,lisk:IF,liskSepolia:BF,loadAlphanet:FF,localhost:UF,loop:OF,lukso:DF,luksoTestnet:_F,lumiaMainnet:MF,lumiaTestnet:NF,lumoz:LF,lumozTestnet:zF,lycan:RF,lyra:HF,mainnet:$F,mandala:GF,manta:jF,mantaSepoliaTestnet:VF,mantaTestnet:WF,mantle:qF,mantleSepoliaTestnet:KF,mantleTestnet:YF,mantraDuKongEVMTestnet:ZF,mantraEVM:XF,mapProtocol:QF,matchain:JF,matchainTestnet:eU,mchVerse:tU,megaethTestnet:rU,mekong:nU,meld:sU,memecore:aU,merlin:iU,merlinErigonTestnet:cU,metachain:lU,metachainIstanbul:uU,metadium:dU,metalL2:pU,meter:fU,meterTestnet:hU,metis:mU,metisGoerli:bU,metisSepolia:yU,mev:gU,mevTestnet:xU,mint:wU,mintSepoliaTestnet:vU,mitosisTestnet:EU,mode:kU,modeTestnet:CU,monad:TU,monadTestnet:AU,moonbaseAlpha:SU,moonbeam:PU,moonbeamDev:IU,moonriver:BU,morph:FU,morphHolesky:UU,morphSepolia:OU,nahmii:DU,nautilus:_U,near:MU,nearTestnet:NU,neonDevnet:LU,neonMainnet:zU,neoxMainnet:RU,neoxT4:HU,newton:$U,nexi:GU,nexilix:jU,nibiru:VU,nitrographTestnet:WU,nomina:qU,oasisTestnet:KU,oasys:YU,odysseyTestnet:ZU,okc:XU,omax:QU,omni:JU,omniOmega:eO,oneWorld:tO,oortMainnetDev:rO,opBNB:nO,opBNBTestnet:sO,openledger:aO,optimism:oO,optimismGoerli:iO,optimismSepolia:cO,optopia:lO,optopiaTestnet:uO,orderly:dO,orderlySepolia:pO,otimDevnet:fO,palm:hO,palmTestnet:mO,peaq:bO,pgn:yO,pgnTestnet:gO,phoenix:xO,planq:wO,plasma:vO,plasmaDevnet:EO,plasmaTestnet:kO,playfiAlbireo:CO,plinga:TO,plume:AO,plumeDevnet:SO,plumeMainnet:PO,plumeSepolia:IO,plumeTestnet:BO,polterTestnet:FO,polygon:UO,polygonAmoy:OO,polygonMumbai:DO,polygonZkEvm:_O,polygonZkEvmCardona:MO,polygonZkEvmTestnet:NO,polynomial:LO,polynomialSepolia:zO,potos:RO,potosTestnet:HO,premiumBlockTestnet:$O,pulsechain:GO,pulsechainV4:jO,pumpfiTestnet:VO,pyrope:WO,qMainnet:KO,qTestnet:YO,ql1:qO,quai:ZO,quaiTestnet:XO,reactiveTestnet:QO,real:JO,redbellyMainnet:eD,redbellyTestnet:tD,reddio:rD,reddioSepolia:nD,redstone:sD,rei:aD,reyaNetwork:oD,riseTestnet:iD,rivalz:cD,rollux:lD,rolluxTestnet:uD,ronin:dD,root:pD,rootPorcini:fD,rootstock:hD,rootstockTestnet:mD,rss3:bD,rss3Sepolia:yD,saakuru:gD,saga:xD,saigon:wD,sanko:vD,sapphire:ED,sapphireTestnet:kD,satoshiVM:CD,satoshiVMTestnet:TD,scroll:AD,scrollSepolia:SD,sei:PD,seiDevnet:ID,seiTestnet:FD,seismicDevnet:BD,sepolia:UD,shape:OD,shapeSepolia:DD,shardeum:_D,shardeumSphinx:MD,shibarium:ND,shibariumTestnet:LD,shiden:zD,shimmer:RD,shimmerTestnet:HD,sidraChain:$D,silentData:GD,silicon:jD,siliconSepolia:VD,sixProtocol:WD,skaleBase:a_,skaleBaseSepoliaTestnet:o_,skaleBlockBrawlers:qD,skaleCalypso:KD,skaleCalypsoTestnet:YD,skaleCryptoBlades:ZD,skaleCryptoColosseum:XD,skaleEuropa:QD,skaleEuropaTestnet:JD,skaleExorde:e_,skaleHumanProtocol:t_,skaleNebula:r_,skaleNebulaTestnet:n_,skaleRazor:s_,skaleTitan:i_,skaleTitanTestnet:c_,sketchpad:l_,snax:u_,snaxTestnet:d_,somnia:p_,somniaTestnet:f_,soneium:h_,soneiumMinato:m_,songbird:b_,songbirdTestnet:y_,sonic:g_,sonicBlazeTestnet:x_,sonicTestnet:w_,sophon:v_,sophonTestnet:E_,sova:k_,sovaSepolia:C_,spicy:T_,stableTestnet:A_,statusNetworkSepolia:g6,statusSepolia:g6,step:S_,story:P_,storyAeneid:I_,storyOdyssey:B_,storyTestnet:F_,stratis:U_,superlumio:O_,superposition:D_,superseed:__,superseedSepolia:M_,surgeTestnet:N_,swan:L_,swanProximaTestnet:z_,swanSaturnTestnet:R_,swellchain:H_,swellchainTestnet:$_,swissdlt:G_,syscoin:j_,syscoinTestnet:V_,tac:W_,tacSPB:q_,taiko:K_,taikoHekla:Y_,taikoHoodi:Z_,taikoJolnir:X_,taikoKatla:Q_,taikoTestnetSepolia:J_,taraxa:eM,taraxaTestnet:tM,teaSepolia:rM,telcoinTestnet:nM,telos:sM,telosTestnet:aM,tempoDevnet:uN,tempoLocalnet:dN,tempoTestnet:pN,tenet:fN,ternoa:hN,thaiChain:mN,that:bN,theta:yN,thetaTestnet:gN,thunderCore:xN,thunderTestnet:wN,tiktrixTestnet:vN,tomb:EN,treasure:kN,treasureTopaz:CN,tron:TN,tronNile:AN,tronShasta:SN,ubiq:PN,ultra:IN,ultraTestnet:BN,ultron:FN,ultronTestnet:UN,unichain:ON,unichainSepolia:DN,unique:_N,uniqueOpal:MN,uniqueQuartz:NN,unreal:LN,vana:zN,vanaMoksha:RN,vanar:HN,vechain:$N,velas:GN,viction:jN,victionTestnet:VN,vision:WN,visionTestnet:qN,wanchain:KN,wanchainTestnet:YN,weaveVMAlphanet:ZN,wemix:XN,wemixTestnet:QN,westendAssetHub:JN,whitechain:eL,whitechainTestnet:tL,wmcTestnet:rL,worldLand:aL,worldchain:nL,worldchainSepolia:sL,x1Testnet:D6,xLayer:uL,xLayerTestnet:D6,xai:oL,xaiTestnet:iL,xdc:cL,xdcTestnet:lL,xoneMainnet:dL,xoneTestnet:pL,xphereMainnet:fL,xphereTestnet:hL,xrOne:mL,xrSepolia:xL,xrplevm:bL,xrplevmDevnet:yL,xrplevmTestnet:gL,yooldoVerse:wL,yooldoVerseTestnet:vL,zenchainTestnet:EL,zeniq:kL,zeroG:ZT,zeroGGalileoTestnet:XT,zeroGMainnet:QT,zeroGTestnet:JT,zeroNetwork:CL,zetachain:TL,zetachainAthensTestnet:AL,zhejiang:SL,zilliqa:PL,zilliqaTestnet:IL,zircuit:BL,zircuitGarfieldTestnet:FL,zircuitTestnet:UL,zkFair:OL,zkFairTestnet:DL,zkLinkNova:_L,zkLinkNovaSepoliaTestnet:ML,zkSync:_6,zkSyncInMemoryNode:M6,zkSyncLocalNode:N6,zkSyncSepoliaTestnet:L6,zksync:_6,zksyncInMemoryNode:M6,zksyncLocalCustomHyperchain:NL,zksyncLocalHyperchain:LL,zksyncLocalHyperchainL1:zL,zksyncLocalNode:N6,zksyncSepoliaTestnet:L6,zora:RL,zoraSepolia:HL,zoraTestnet:$L},Symbol.toStringTag,{value:"Module"})),jL=(e,t)=>{const r=Object.values(GL).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?HT(t):void 0,s=n?RT({chain:r,transport:n}):void 0,a=ET({chain:r,transport:n||GT()});return{walletClient:s,publicClient:a}},VL=()=>B.jsx("div",{className:"twap-error-fallback",children:B.jsx("p",{style:{fontSize:20,fontWeight:600,textAlign:"center",width:"100%",marginTop:40},children:"Something went wrong"})});function WL({children:e}){return B.jsx(f3,{FallbackComponent:VL,onError:t=>dt.onCrash(t),children:B.jsx(B.Fragment,{children:e})})}const s0=M.createContext({}),qL=new Qw({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),KL=e=>{var n,s,a;const t=te(o=>o.updateState),r=te(o=>o.state.isMarketOrder);return M.useEffect(()=>{setInterval(()=>{t({currentTime:Date.now()})},6e4)},[t]),M.useEffect(()=>{var o,i,c,l,u,d,f,h,y,g,E,v;t({isMarketOrder:e.module!==ye.LIMIT?!1:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.isMarketOrder,typedChunks:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.chunks,typedFillDelay:(d=(u=e.overrides)==null?void 0:u.state)==null?void 0:d.fillDelay,typedDuration:(h=(f=e.overrides)==null?void 0:f.state)==null?void 0:h.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(E=e.overrides)==null?void 0:E.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),M.useEffect(()=>{var o,i,c,l;t({typedLimitPrice:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.limitPrice,typedTriggerPrice:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(s=e.srcToken)==null?void 0:s.address,(a=e.dstToken)==null?void 0:a.address]),M.useEffect(()=>{e.module===ye.LIMIT&&t({isMarketOrder:!1}),e.module===ye.TAKE_PROFIT&&t({isMarketOrder:!0})},[e.module]),M.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},YL=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n,typedInputAmount:s})=>M.useMemo(()=>{if(Lf(t,r,n)||zf(t,r,n))return{isLoading:!1,noLiquidity:!1,value:Bl(s||"0",t==null?void 0:t.decimals)};if(j(e.value||0).isZero()||j(s||0).isZero())return e;const a=j(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n]),ZL=e=>{const t=te(l=>l.state.acceptedMarketPrice),{walletClient:r,publicClient:n}=M.useMemo(()=>jL(e.chainId,e.provider),[e.chainId,e.provider]),s=M.useMemo(()=>$h(e.partner),[e.partner]),a=M.useMemo(()=>{const l=s[0];return e.chainId&&s.includes(e.chainId)?e.chainId:l},[e.chainId,s]),o=M.useMemo(()=>ld(e.partner,a),[e.partner,a]),i=YL(e),c=M.useMemo(()=>Tm(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return M.useEffect(()=>{dt.init(o,c,a)},[o,a,c]),B.jsxs(s0.Provider,{value:{typedInputAmount:e.typedInputAmount,resetTypedInputAmount:e.resetTypedInputAmount,minChunkSizeUsd:c,account:e.account,walletClient:r,publicClient:n,marketPrice:t||i.value,marketPriceLoading:!t&&i.isLoading,noLiquidity:!t&&i.noLiquidity,config:o,slippage:e.priceProtection,supportedChains:s,chainId:a,partner:e.partner,module:e.module,fees:e.fees||0,components:e.components,overrides:e.overrides,callbacks:e.callbacks,getTranslation:e.getTranslation,translations:e.translations,useToken:e.useToken,refetchBalances:e.refetchBalances,srcUsd1Token:e.srcUsd1Token,dstUsd1Token:e.dstUsd1Token,srcBalance:e.srcBalance,dstBalance:e.dstBalance,srcToken:e.srcToken,dstToken:e.dstToken},children:[B.jsx(KL,{...e}),B.jsx(WL,{children:e.children})]})},XL=e=>B.jsx(Jw,{client:qL,children:B.jsx(ZL,{...e})}),oe=()=>{if(!s0)throw new Error("useSpotContext must be used within a WidgetProvider");return M.useContext(s0)},QL=2e4,JL=[{text:"Minutes",value:$t.Minutes},{text:"Hours",value:$t.Hours},{text:"Days",value:$t.Days}],ez="The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";var a0={},tz=[{id:"fa",name:"Font Awesome",projectUrl:"https://fontawesome.com/",license:"CC BY 4.0 License",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"},{id:"io",name:"Ionicons 4",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"io5",name:"Ionicons 5",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"md",name:"Material Design icons",projectUrl:"http://google.github.io/material-design-icons/",license:"Apache License Version 2.0",licenseUrl:"https://github.com/google/material-design-icons/blob/master/LICENSE"},{id:"ti",name:"Typicons",projectUrl:"http://s-ings.com/typicons/",license:"CC BY-SA 3.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/3.0/"},{id:"go",name:"Github Octicons icons",projectUrl:"https://octicons.github.com/",license:"MIT",licenseUrl:"https://github.com/primer/octicons/blob/master/LICENSE"},{id:"fi",name:"Feather",projectUrl:"https://feathericons.com/",license:"MIT",licenseUrl:"https://github.com/feathericons/feather/blob/master/LICENSE"},{id:"gi",name:"Game Icons",projectUrl:"https://game-icons.net/",license:"CC BY 3.0",licenseUrl:"https://creativecommons.org/licenses/by/3.0/"},{id:"wi",name:"Weather Icons",projectUrl:"https://erikflowers.github.io/weather-icons/",license:"SIL OFL 1.1",licenseUrl:"http://scripts.sil.org/OFL"},{id:"di",name:"Devicons",projectUrl:"https://vorillaz.github.io/devicons/",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ai",name:"Ant Design Icons",projectUrl:"https://github.com/ant-design/ant-design-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"bs",name:"Bootstrap Icons",projectUrl:"https://github.com/twbs/icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ri",name:"Remix Icon",projectUrl:"https://github.com/Remix-Design/RemixIcon",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"fc",name:"Flat Color Icons",projectUrl:"https://github.com/icons8/flat-color-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"gr",name:"Grommet-Icons",projectUrl:"https://github.com/grommet/grommet-icons",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"hi",name:"Heroicons",projectUrl:"https://github.com/refactoringui/heroicons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"si",name:"Simple Icons",projectUrl:"https://simpleicons.org/",license:"CC0 1.0 Universal",licenseUrl:"https://creativecommons.org/publicdomain/zero/1.0/"},{id:"im",name:"IcoMoon Free",projectUrl:"https://github.com/Keyamoon/IcoMoon-Free",license:"CC BY 4.0 License"},{id:"bi",name:"BoxIcons",projectUrl:"https://github.com/atisawd/boxicons",license:"CC BY 4.0 License"},{id:"cg",name:"css.gg",projectUrl:"https://github.com/astrit/css.gg",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"vsc",name:"VS Code Icons",projectUrl:"https://github.com/microsoft/vscode-codicons",license:"CC BY 4.0",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"}],o0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i0=M.createContext&&M.createContext(o0),ls=function(){return ls=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},ls.apply(this,arguments)},rz=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};function R6(e){return e&&e.map(function(t,r){return M.createElement(t.tag,ls({key:r},t.attr),R6(t.child))})}function nz(e){return function(t){return M.createElement(H6,ls({attr:ls({},e.attr)},t),R6(e.child))}}function H6(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=rz(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),M.createElement("svg",ls({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:ls(ls({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&M.createElement("title",null,a),e.children)};return i0!==void 0?M.createElement(i0.Consumer,null,function(r){return t(r)}):t(o0)}const lu=nw(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:o0,GenIcon:nz,IconBase:H6,IconContext:i0,IconsManifest:tz},Symbol.toStringTag,{value:"Module"})));var $6;function sz(){if($6)return a0;$6=1;var e=lu.GenIcon;return a0.IoIosArrowDown=function(r){return e({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"}}]})(r)},a0}var az=sz(),c0={},G6;function oz(){if(G6)return c0;G6=1;var e=lu.GenIcon;return c0.AiOutlineCopy=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]})(r)},c0}var iz=oz();//! moment.js
110
110
  //! version : 2.30.1
@@ -123,4 +123,4 @@ ee.version="2.30.1",cz(et),ee.fn=K,ee.min=ZR,ee.max=XR,ee.now=QR,ee.utc=nn,ee.un
123
123
  Prefix can't start with '-' when allowNegative is true.
124
124
  prefix: `+s+`
125
125
  allowNegative: `+a+`
126
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function CG(e){e=kG(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=G0);var a=e.onBlur;a===void 0&&(a=G0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,h=e.onValueChange,y=cG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Fu(e),E=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return K2(P,e)},A=function(P,O){return vG(P,O,e)},C=ho(d)?u:d,D=f??wG(C,l,t);ho(d)?ho(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var z=function(P){return $2(P)?P:(typeof P=="number"&&(P=W2(P)),D&&typeof i=="number"?q2(P,i,!!c):P)},T=yG(z(d),z(u),!!D,w,A,h),m=T[0],b=m.numAsString,x=m.formattedValue,S=T[1],I=function(P){var O=P.target,U=P.key,L=O.selectionStart,H=O.selectionEnd,G=O.value;if(G===void 0&&(G=""),(U==="Backspace"||U==="Delete")&&H<l.length){P.preventDefault();return}if(L!==H){s(P);return}U==="Backspace"&&G[0]==="-"&&L===l.length+1&&r&&ac(O,1),i&&c&&(U==="Backspace"&&G[L-1]===E?(ac(O,L-1),P.preventDefault()):U==="Delete"&&G[L]===E&&P.preventDefault()),v!=null&&v.includes(U)&&G[L]===E&&ac(O,L+1);var Q=o===!0?",":o;U==="Backspace"&&G[L-1]===Q&&ac(O,L-1),U==="Delete"&&G[L]===Q&&ac(O,L+1),s(P)},F=function(P){var O=b;if(O.match(/\d/g)||(O=""),n||(O=hG(O)),c&&i&&(O=q2(O,i,c)),O!==b){var U=K2(O,e);S({formattedValue:U,value:O,floatValue:parseFloat(O)},{event:P,source:$0.event})}a(P)},_=function(P){return P===E?!0:H2(P)},k=function(P){var O=P.currentValue,U=P.lastValue,L=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,Q=O[H],pe=L[G],me=mG(U,O),ie=me.to,de=function(Be){return A(Be).indexOf(".")+l.length};return d===0&&c&&i&&O[ie.start]===E&&de(O)<H&&de(L)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(Q)&&pe===E?!0:Q===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:_,isCharacterSame:k,onValueChange:S,format:w,removeFormatting:A,getCaretBoundary:function(P){return EG(P,e)},onKeyDown:I,onBlur:F})}const Y2=(e,t)=>M.useMemo(()=>Bl(t,e),[e,t]),Rn=(e,t)=>M.useMemo(()=>Ii(t,e),[e,t]),oc=()=>{const{chainId:e}=oe();return M.useMemo(()=>Bs(e),[e])},V0=e=>{const t=oc();return M.useMemo(()=>{if(!(!e||!t))return Bi(e,t.id)},[e,t])},aa=(e,t)=>M.useMemo(()=>!e||!t||j(e||"0").isZero()||j(t||"0").isZero()?"":j(e||"0").times(t).toFixed(),[e,t]),TG=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return M.useMemo(()=>Lf(e,t,r),[e,t,r])},AG=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return M.useMemo(()=>zf(e,t,r),[e,t,r])},SG=()=>{const e=TG(),t=AG();return e||t},W0=e=>{const{overrides:t}=oe();return M.useMemo(()=>t!=null&&t.dateFormat?t.dateFormat(e||0):ee(e).format("DD/MM/YYYY HH:mm"),[e,t==null?void 0:t.dateFormat])};function PG(){const{callbacks:e}=oe();return M.useCallback(async t=>{var r;try{await navigator.clipboard.writeText(t),(r=e==null?void 0:e.onCopy)==null||r.call(e)}catch(n){console.error("Copy failed:",n)}},[e==null?void 0:e.onCopy])}const Z2=(e,t)=>M.useMemo(()=>_f(e==null?void 0:e.toString(),t),[e,t]),Ze=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=Z2(e,t),{overrides:a}=oe(),o=a==null?void 0:a.numberFormat,i=CG({allowLeadingZeros:!0,thousandSeparator:",",displayType:"text",value:s||"",decimalScale:18,prefix:r,suffix:n});return o?o(e||""):(c=i.value)==null?void 0:c.toString()},IG={expirationTooltip:"This is the date and time marking the end of the period which you have selected for your order to be executed.",tradeSizeTooltip:"The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.",totalTradesTooltip:"The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.",minDstAmountTooltip:" This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",limitPriceTooltip:"Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.",maxDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.",tradeIntervalTooltip:"The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.",triggerPriceTooltip:"The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.",placeOrder:"Place order",enterAmount:"Enter an amount",emptyLimitPrice:"Limit price is required",insufficientFunds:"Insufficient Balance",tradeIntervalLabel:"Trade interval",expirationLabel:"Expiration",limitPrice:"Limit Price",finalExcecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To (estimated)",Open:"Open",Completed:"Completed",Expired:"Expired",Canceled:"Canceled",cancelOrder:"Cancel Order",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is {minChunks}",minTradeSizeError:"Min. trade size is ${minTradeSize}",allOrders:"All",minFillDelayError:"Min. trade interval is {fillDelay}",maxFillDelayError:"Max. trade interval is {fillDelay}",recipient:"Recipient",marketOrderWarning:"Each individual trade in this order will be filled at the current market price at the time of execution.",limitPriceMessage:"Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.",limit:"Limit",maxDurationError:"Max. expiry is {duration}",minDurationError:"Min. expiry is {duration}",expiry:"Expiry",individualTradeSize:"Individual trade size",numberOfTrades:"No. of trades",averageExecutionPrice:"Avg. execution price",twapMarket:"TWAP-market",twapLimit:"TWAP-limit",stopLoss:"Stop-loss",stopLossMarket:"Stop-loss market",stopLossLimit:"Stop-loss limit",takeProfit:"Take-profit",minReceived:"Min. received",noOrders:"No {status} Orders",noLiquidity:"No liquidity for this pair",excecutionSummary:"Execution summary",orderInfo:"Order info",wrapAction:"Wrap {symbol}",approveAction:"Approve {symbol}",createOrderAction:"Create {name} order",amountReceived:"Amount received",createdAt:"Created at",amountOut:"Amount out",status:"Status",progress:"Progress",minutes:"minutes",days:"days",tradeIntervalTitle:"Every",tradesAmountTitle:"Over",stopLossTooltip:"The trigger price at which your stop-loss order will be activated.",takeProfitTooltip:"The trigger price at which your take-profit order will be activated.",stopLossLabel:"Trigger Price",StopLossTriggerPriceError:"Trigger price must be less than market price",TakeProfitTriggerPriceError:"Trigger price must be greater than market price",triggerLimitPriceError:"Limit price must be less than trigger price",triggerPrice:"Trigger Price",tradePrice:"Trade Price",triggerMarketPriceDisclaimer:" In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.",stopLossLimitPriceTooltip:"The stop loss order will execute at the specified limit price or better, once the stop price is triggered.",stopLossDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.",emptyTriggerPrice:"Trigger price is required",id:"ID",fees:"Fees {value}",version:"Version",maxOrderSizeError:"Max. trade size is {maxOrderSize} USD",viewOnExplorer:"View on explorer",proceedInWallet:"Proceed in wallet",wrapMsg:"Note: {symbol} was wrapped to {wSymbol}",createOrderActionSuccess:"{name} order placed"};function BG(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Me=()=>{const e=oe();return M.useCallback((r,n)=>{var o,i;const s=(o=e.getTranslation)==null?void 0:o.call(e,r,n);if(s&&s!==r)return s;const a=((i=e.translations)==null?void 0:i[r])||IG[r];return BG(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},Uu=({value:e})=>{const t=Ze({value:e,decimalScale:2});return t?B.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},FG=({deadline:e,label:t,tooltip:r})=>{const n=W0(e);return B.jsx(Ar,{title:t,tooltip:r,children:n})},UG=({price:e,dstToken:t,label:r,tooltip:n,usd:s,srcToken:a})=>{const o=Ze({value:e});return j(e||0).isZero()?null:B.jsx(Ar,{title:r,tooltip:n,children:B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["1 ",a==null?void 0:a.symbol," = ",`${o||"-"} ${t==null?void 0:t.symbol}`,B.jsx(Uu,{value:s})]})})},OG=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:B.jsx(Ar,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),DG=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=Ze({value:t});return j(t||0).isZero()?null:B.jsxs(Ar,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,B.jsx(Uu,{value:s})]})},_G=({trades:e,label:t,tooltip:r})=>e===1?null:B.jsx(Ar,{title:t,tooltip:r,children:e}),MG=()=>{var s;const e=Me(),{account:t}=oe(),r=(s=oc())==null?void 0:s.explorer,n=Df(t);return B.jsx(Ar,{title:e("recipient")||"",children:r?B.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},NG=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=M.useMemo(()=>t6(e),[e]);return t===1?null:B.jsx(Ar,{title:r,tooltip:n,children:s})},Ar=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=oe(),i=o.Tooltip;return B.jsxs("div",{className:`${n} twap-order-details__detail-row`,onClick:s,style:a,children:[B.jsxs("div",{className:"twap-order-details__detail-row-label",children:[B.jsx("p",{className:"twap-order-details__detail-row-label-value",children:e}),t&&i&&B.jsx(i,{tooltipText:t})]}),B.jsx("div",{className:"twap-order-details__detail-row-value",children:r})]})},LG=({id:e})=>{const{components:t}=oe(),r=t==null?void 0:t.Tooltip,n=PG();return e.startsWith("0x")?B.jsx(Ar,{title:"ID",onClick:()=>n(e),style:{cursor:"pointer"},children:r&&B.jsx(r,{tooltipText:e,children:B.jsxs("div",{className:"twap-order-details__detail-row-value-id",children:[B.jsx("p",{children:Df(e)}),B.jsx(iz.AiOutlineCopy,{})]})})}):B.jsx(Ar,{title:"ID",children:e})},zG=({version:e})=>B.jsx(Ar,{title:"Version",children:e});function Ee({children:e,className:t=""}){return B.jsx("div",{className:`${t} twap-order-details`,children:e})}const RG=({children:e})=>e,HG=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=Ze({value:e});return B.jsxs(Ar,{title:t,children:[`${e?s:"-"} ${n}`,B.jsx(Uu,{value:r})]})};Ee.Deadline=FG,Ee.Fees=HG,Ee.TradeSize=OG,Ee.MinDestAmount=DG,Ee.TradesAmount=_G,Ee.Recipient=MG,Ee.TradeInterval=NG,Ee.DetailRow=Ar,Ee.Price=UG,Ee.OrderID=LG,Ee.Container=RG,Ee.OrderVersion=zG,Ee.USD=Uu;const q0=()=>{const{publicClient:e}=oe();return Zr({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const r=10;let n=0,s=1e3;for(;n<r;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(n++,n>=r)throw new Error(`Failed after ${r} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},X2=e=>{const t=Me(),r=Ze({value:e.srcAmount}),n=Ze({value:e.limitPrice}),s=Ze({value:e.limitPriceUsd}),a=Ze({value:e.srcAmountPerTrade}),o=Ze({value:e.srcAmountPerTradeUsd,decimalScale:2}),i=Ze({value:e.minDestAmountPerTrade}),c=Ze({value:e.minDestAmountPerTradeUsd,decimalScale:2}),l=Ze({value:e.triggerPrice}),u=Ze({value:e.triggerPriceUsd,decimalScale:2}),d=Ze({value:e.srcUsd,decimalScale:2}),f=Ze({value:e.dstUsd,decimalScale:2}),h=Ze({value:e.dstAmount});return M.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,srcUsd:d||"",dstUsd:f||"",limitPrice:{label:t("limitPrice"),tooltip:t("limitPriceTooltip"),value:n||"",usd:s||""},deadline:{tooltip:t("expirationTooltip"),label:t("expirationLabel"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",usd:d||""},dstAmount:{value:h||"",usd:f||""},sizePerTrade:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:a||"",usd:o},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"minReceivedPerTrade":"minReceived"),value:i||"",usd:c},tradeInterval:{tooltip:t("tradeIntervalTooltip"),label:t("tradeIntervalLabel"),value:e.tradeInterval||0},triggerPrice:{tooltip:t("triggerPriceTooltip"),label:t("triggerPrice"),value:l||"",usd:u},recipient:{label:t("recipient"),value:e.account||""}}),[d,f,n,r,a,o,i,l,u,n,s,h,f,c])},Q2=e=>{const{orders:t}=Ou(),{useToken:r,config:n}=oe(),s=Me(),a=M.useMemo(()=>t==null?void 0:t.all.find(C=>C.id===e),[t,e])||{},o=tx(a),i=r==null?void 0:r(a==null?void 0:a.srcTokenAddress),c=r==null?void 0:r(a==null?void 0:a.dstTokenAddress),l=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmount),u=jG(i,c,a),d=VG(i,c,a),f=WG(i,c,a),h=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled),y=Rn(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled),g=a==null?void 0:a.progress,E=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountPerTrade),v=Rn(c==null?void 0:c.decimals,a==null?void 0:a.dstMinAmountPerTrade),w=M.useMemo(()=>a?a.version===2?a.fillDelay:n.twapConfig?td(a,n.twapConfig):0:0,[a,n]),A=X2({srcToken:i,dstToken:c,account:a==null?void 0:a.maker,limitPrice:u,deadline:a==null?void 0:a.deadline,tradeInterval:w,srcAmount:l,totalTrades:a==null?void 0:a.totalTradesAmount,srcAmountPerTrade:E,minDestAmountPerTrade:v,triggerPrice:d});return M.useMemo(()=>({original:a,title:o,...A,createdAt:{label:s("createdAt"),value:a==null?void 0:a.createdAt},id:{label:s("id"),value:a==null?void 0:a.id},amountInFilled:{label:s("amountOut"),value:h},amountOutFilled:{label:s("amountReceived"),value:y,token:c},progress:{label:s("progress"),value:g},excecutionPrice:{label:s((a==null?void 0:a.totalTradesAmount)===1?"finalExcecutionPrice":"averageExecutionPrice"),value:f},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,f,h,y,g,o,i,c,A])},J2=e=>{const t=Me();return M.useMemo(()=>{switch(e){case ze.TWAP_MARKET:return t("twapMarket");case ze.TWAP_LIMIT:return t("twapLimit");case ze.STOP_LOSS_MARKET:return t("stopLossMarket");case ze.STOP_LOSS_LIMIT:return t("stopLossLimit");case ze.TAKE_PROFIT:return t("takeProfit");default:return t("twapMarket")}},[t,e])},$G=()=>{const{module:e}=oe(),t=te(r=>r.state.isMarketOrder);return M.useMemo(()=>e===ye.TWAP?t?ze.TWAP_MARKET:ze.TWAP_LIMIT:e===ye.LIMIT?t?ze.LIMIT:ze.TWAP_LIMIT:e===ye.STOP_LOSS?t?ze.STOP_LOSS_MARKET:ze.STOP_LOSS_LIMIT:e===ye.TAKE_PROFIT?ze.TAKE_PROFIT:ze.TWAP_MARKET,[e,t])},ex=()=>{const e=$G();return J2(e)},tx=e=>J2(e==null?void 0:e.type),rx=()=>{const{account:e,config:t,chainId:r}=oe();return M.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.adapter,r],[e,t,r])},GG=()=>{const{callbacks:e,refetchBalances:t}=oe(),r=Td(),n=rx();return M.useCallback(s=>{var c;const a=r.getQueryData(n);let o=!1;const i=[];a&&a.forEach(l=>{var d;const u=s.find(f=>f.id===l.id);!(u!=null&&u.twapAddress)&&l.twapAddress&&u&&u.progress!==l.progress&&(o=!0,i.push(u),u.status===ct.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,u)))}),o&&((c=e==null?void 0:e.onOrdersProgressUpdate)==null||c.call(e,i),t==null||t())},[r,n,e,t])},K0=()=>{const{account:e,config:t,chainId:r}=oe(),n=rx(),s=GG();return d3({refetchInterval:QL,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:n,queryFn:async({signal:o})=>{if(!e||!r||!t)return[];const i=await _m({signal:o,chainId:r,config:t,account:e});return s(i),i.map(c=>t!=null&&t.twapConfig?{...c,fillDelayMillis:td(c,t.twapConfig)}:c)}})},Ou=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=K0(),{mutateAsync:a}=Y0();return M.useMemo(()=>({orders:{all:e??[],open:Du(e??[],ct.Open),completed:Du(e??[],ct.Completed),expired:Du(e??[],ct.Expired),canceled:Du(e??[],ct.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},nx=()=>{const e=te(r=>r.state.orderHistoryStatusFilter),{orders:t}=Ou();return M.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},Du=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),jG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return jh(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),VG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return Vh(r,e.decimals,t.decimals)},[r,e,t]),WG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return Gh(r,e.decimals,t.decimals)},[r,e,t]),sx=()=>{const e=te(r=>r.updateState),t=te(r=>r.state.orderIdsToCancel);return M.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},qG=()=>{var T,m;const e=Me(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=Ou(),{mutateAsync:a,isPending:o}=Y0(),i=nx(),c=te(b=>b.updateState),l=te(b=>b.state.orderHistoryStatusFilter),u=te(b=>b.state.cancelOrdersMode),d=te(b=>b.state.orderIdsToCancel),f=M.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),h=M.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=M.useCallback(b=>a({orders:b}),[a]),g=M.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),E=M.useMemo(()=>{const b=Object.keys(ct).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=sx(),w=te(b=>b.state.selectedOrderID),A=Q2(w),C=M.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),D=M.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),z=M.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:h,onCancelOrders:y,onCancelOrder:z,onSelectStatus:g,onToggleCancelOrdersMode:f,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?A:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((m=E[0])==null?void 0:m.value)||"",statuses:E,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:D}},KG=()=>{const{refetch:e}=K0();return Zr({mutationFn:async t=>{var r;for(;;){const n=(r=await e())==null?void 0:r.data;if(!n)throw new Error("orders not found");if(t.every(a=>{const o=n.find(i=>i.id===a);return(o==null?void 0:o.status)===ct.Canceled}))break;await new Promise(a=>setTimeout(a,1e3))}}})},Y0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=oe(),o=q0(),i=KG().mutateAsync,c=te(d=>d.updateState),l=async d=>{dt.onCancelOrderRequest(d.map(f=>f.id.toString()),1);try{return(await Promise.all(d.map(h=>t.writeContract({account:e,address:h.twapAddress,abi:Lh,functionName:"cancel",args:[h.id],chain:t.chain}))))[0]}catch(f){throw dt.onCancelOrderError(f),f}},u=async d=>{var f;try{dt.onCancelOrderRequest(d.map(g=>g.hash),2);const h=await t.writeContract({account:e,address:n.repermit,abi:Nh,functionName:"cancel",args:[d.map(g=>g.hash)],chain:t.chain}),y=await o(h);if(!y)throw new Error("failed to get transaction receipt");if(y.status==="reverted")throw new Error("failed to cancel order");return dt.onCancelOrderSuccess(h),(f=s==null?void 0:s.onCancelOrderSuccess)==null||f.call(s,{orders:d,txHash:h,explorerUrl:Bi(h,a)}),y.transactionHash}catch(h){throw dt.onCancelOrderError(h),h}};return Zr({mutationFn:async({orders:d})=>{var f,h;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(f=s==null?void 0:s.onCancelOrderRequest)==null||f.call(s,d),c({cancelOrderStatus:ht.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const y=d.filter(w=>w.version===1),g=d.filter(w=>w.version===2),[E,v]=await Promise.all([y.length?l(y):Promise.resolve(""),g.length?u(g):Promise.resolve("")]);return await i(d.map(w=>w.id)),c({cancelOrderStatus:ht.SUCCESS,orderIdsToCancel:[]}),[...E||[],v]}catch(y){console.error("cancel order error",y),(h=s==null?void 0:s.onCancelOrderFailed)==null||h.call(s,y),Mf(y)?c({cancelOrderStatus:void 0}):(c({cancelOrderStatus:ht.FAILED}),dt.onCancelOrderError(y))}}})},ax=M.createContext({}),zt=()=>M.useContext(ax),YG=()=>{const e=te(c=>c.state.selectedOrderID),t=Q2(e),r=Me(),[n,s]=M.useState("panel1"),{components:a}=oe(),o=a.TokenLogo;M.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?B.jsx(ax.Provider,{value:{order:t},children:B.jsxs("div",{className:"twap-orders__selected-order",children:[B.jsx(p1,{SrcTokenLogo:o&&B.jsx(o,{token:t.srcToken}),DstTokenLogo:o&&B.jsx(o,{token:t.dstToken}),fromTitle:r("from"),inToken:t.srcToken,toTitle:r("to"),outToken:t.dstToken}),B.jsx(Ee.Container,{children:B.jsxs("div",{className:"twap-orders__selected-order-bottom",children:[B.jsxs("div",{className:"twap-orders__selected-order-accordions",children:[B.jsx(ox,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:B.jsx(sj,{})}),B.jsx(ox,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:B.jsx(ZG,{})})]}),B.jsx(oj,{})]})})]})}):null},ox=({expanded:e,onClick:t,children:r,title:n})=>B.jsxs("div",{className:"twap-orders__selected-order-accordion",children:[B.jsxs("div",{onClick:t,className:"twap-orders__selected-order-accordion-trigger",children:[B.jsx("p",{children:n}),B.jsx(az.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&B.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),ZG=()=>B.jsxs(Ee,{children:[B.jsx(nj,{}),B.jsx(ij,{}),B.jsx(ej,{}),B.jsx(cj,{}),B.jsx(XG,{}),B.jsx(QG,{}),B.jsx(JG,{}),B.jsx(tj,{}),B.jsx(rj,{}),B.jsx(fj,{}),B.jsx(Ee.Recipient,{})]}),XG=()=>{const{order:e}=zt();return B.jsx(Ee.TradeSize,{tradeSize:e.sizePerTrade.value,srcToken:e.srcToken,label:e.sizePerTrade.label,tooltip:e.sizePerTrade.tooltip,trades:e.totalTrades.value})},QG=()=>{const{order:e}=zt();return B.jsx(Ee.TradesAmount,{trades:e.totalTrades.value,label:e.totalTrades.label,tooltip:e.totalTrades.tooltip})},JG=()=>{const{order:e}=zt();return B.jsx(Ee.MinDestAmount,{dstToken:e.dstToken,dstMinAmountOut:e.minDestAmountPerTrade.value,label:e.minDestAmountPerTrade.label,tooltip:e.minDestAmountPerTrade.tooltip})},ej=()=>{const{order:e}=zt();return B.jsx(Ee.Deadline,{deadline:e.deadline.value,label:e.deadline.label,tooltip:e.deadline.tooltip})},tj=()=>{const{order:e}=zt();return B.jsx(Ee.TradeInterval,{fillDelayMillis:e.tradeInterval.value,chunks:e.totalTrades.value,label:e.tradeInterval.label,tooltip:e.tradeInterval.tooltip})},rj=()=>{const{order:e}=zt();return B.jsx(Ee.Price,{srcToken:e.srcToken,dstToken:e.dstToken,price:e.triggerPrice.value,label:e.triggerPrice.label,tooltip:e.triggerPrice.tooltip})},nj=()=>{const{order:e}=zt();return B.jsx(Ee.OrderID,{id:e.id.value||""})},sj=()=>B.jsxs(Ee,{children:[B.jsx(dj,{}),B.jsx(lj,{}),B.jsx(aj,{}),B.jsx(pj,{}),B.jsx(hj,{})]}),aj=()=>{var r;const{order:e}=zt(),t=Ze({value:e.amountOutFilled.value,decimalScale:3});return e.amountOutFilled.value?B.jsx(Ee.DetailRow,{title:e.amountOutFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.dstToken)==null?void 0:r.symbol]})}):null},oj=()=>{const{order:e}=zt(),t=Me(),{mutateAsync:r,isPending:n}=Y0(),{components:s}=oe(),a=s.Button,o=M.useCallback(async()=>r({orders:[e.original]}),[r,e]);return!e||e.original.status!==ct.Open||!a?null:B.jsx(a,{loading:n,onClick:o,disabled:n,className:"twap-cancel-order",text:t("cancelOrder"),children:t("cancelOrder")})},ij=()=>{const{order:e}=zt(),t=Me(),r=W0(e.createdAt.value);return B.jsx(Ee.DetailRow,{title:t("createdAt")||"",children:B.jsx("p",{children:r})})},cj=()=>{var n;const{order:e}=zt(),t=Me(),r=Ze({value:e.srcAmount.value,decimalScale:3});return B.jsx(Ee.DetailRow,{title:t("amountOut")||"",children:B.jsxs("p",{children:[r||0," ",(n=e.srcToken)==null?void 0:n.symbol]})})},lj=()=>{var r;const{order:e}=zt(),t=Ze({value:e.amountInFilled.value,decimalScale:3});return B.jsx(Ee.DetailRow,{title:e.amountInFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.srcToken)==null?void 0:r.symbol]})})},uj=()=>{const{order:e}=zt(),t=Me();return M.useMemo(()=>{switch(e.original.status){case ct.Open:return t("Open")||"";case ct.Completed:return t("Completed")||"";case ct.Expired:return t("Expired")||"";case ct.Canceled:return t("Canceled")||""}},[e.original.status,t])},dj=()=>{const e=Me(),t=uj();return B.jsx(Ee.DetailRow,{title:e("status")||"",children:B.jsx("p",{children:t})})},pj=()=>{const{order:e}=zt(),t=Ze({value:e.progress.value,decimalScale:2});return B.jsx(Ee.DetailRow,{title:e.progress.label,children:B.jsxs("p",{children:[t||0,"%"]})})},fj=()=>{const{order:e}=zt(),t=Me();return e.limitPrice.value?B.jsx(Ee.Price,{label:t("limitPrice")||"",price:e.limitPrice.value,srcToken:e.srcToken,dstToken:e.dstToken,tooltip:e.limitPrice.tooltip}):null},hj=()=>{const{order:e}=zt();return e.excecutionPrice.value?B.jsx(Ee.Price,{label:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null};var Z0={},ix;function mj(){if(ix)return Z0;ix=1;var e=lu.GenIcon;return Z0.HiArrowRight=function(r){return e({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(r)},Z0}var bj=mj();const _u=0,fs=1,mo=2,cx=4;function lx(e){return()=>e}function yj(e){e()}function ux(e,t){return r=>e(t(r))}function dx(e,t){return()=>e(t)}function gj(e,t){return r=>e(t,r)}function X0(e){return e!==void 0}function xj(...e){return()=>{e.map(yj)}}function bo(){}function Mu(e,t){return t(e),e}function wj(e,t){return t(e)}function tt(...e){return e}function je(e,t){return e(fs,t)}function Ce(e,t){e(_u,t)}function Q0(e){e(mo)}function at(e){return e(cx)}function ce(e,t){return je(e,gj(t,_u))}function Vr(e,t){const r=e(fs,n=>{r(),t(n)});return r}function px(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function fx(e,t){return e===t}function rt(e=fx){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function fe(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>ux(t,e)}function cn(e){return t=>()=>{t(e)}}function W(e,...t){const r=vj(...t);return(n,s)=>{switch(n){case mo:Q0(e);return;case fs:return je(e,r(s))}}}function ln(e,t){return r=>n=>{r(t=e(t,n))}}function oa(e){return t=>r=>{e>0?e--:t(r)}}function Hn(e){let t=null,r;return n=>s=>{t=s,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Te(...e){const t=new Array(e.length);let r=0,n=null;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{const l=r;r=r|i,t[o]=c,l!==s&&r===s&&n&&(n(),n=null)})}),a=>o=>{const i=()=>{a([o].concat(t))};r===s?i():n=i}}function vj(...e){return t=>e.reduceRight(wj,t)}function Ej(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case fs:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),bo);case mo:n(),r=null;return}}}function Y(e){let t=e;const r=Ue();return(n,s)=>{switch(n){case _u:t=s;break;case fs:{s(t);break}case cx:return t}return r(n,s)}}function Rt(e,t){return Mu(Y(t),r=>ce(e,r))}function Ue(){const e=[];return(t,r)=>{switch(t){case _u:e.slice().forEach(n=>{n(r)});return;case mo:e.splice(0,e.length);return;case fs:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function mr(e){return Mu(Ue(),t=>ce(e,t))}function $e(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:kj(),singleton:r}}const kj=()=>Symbol();function Cj(e){const t=new Map,r=({constructor:n,dependencies:s,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const i=n(s.map(c=>r(c)));return o&&t.set(a,i),i};return r(e)}function Et(...e){const t=Ue(),r=new Array(e.length);let n=0;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{r[o]=c,n=n|i,n===s&&Ce(t,r)})}),function(a,o){switch(a){case mo:{Q0(t);return}case fs:return n===s&&o(r),je(t,o)}}}function he(e,t=fx){return W(e,rt(t))}function J0(...e){return function(t,r){switch(t){case mo:return;case fs:return xj(...e.map(n=>je(n,r)))}}}var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const Tj={0:"debug",3:"error",1:"log",2:"warn"},Aj=()=>typeof globalThis>"u"?window:globalThis,hs=$e(()=>{const e=Y(3);return{log:Y((t,r,n=1)=>{var s;const a=(s=Aj().VIRTUOSO_LOG_LEVEL)!=null?s:at(e);n>=a&&console[Tj[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function ia(e,t,r){return eh(e,t,r).callbackRef}function eh(e,t,r){const n=M.useRef(null);let s=o=>{};const a=M.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const i=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};r?i():requestAnimationFrame(i)}):null,[e,r]);return s=o=>{o&&t?(a==null||a.observe(o),n.current=o):(n.current&&(a==null||a.unobserve(n.current)),n.current=null)},{callbackRef:s,ref:n}}function Sj(e,t,r,n,s,a,o,i,c){const l=M.useCallback(u=>{const d=Pj(u.children,t,i?"offsetWidth":"offsetHeight",s);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window";let y;h&&(y=f.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:h?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?f.scrollLeft:f.scrollTop,E=o?i?o.scrollWidth:o.scrollHeight:h?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?f.scrollWidth:f.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:h?i?y.innerWidth:y.innerHeight:i?f.offsetWidth:f.offsetHeight;n({scrollHeight:E,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?hx("column-gap",getComputedStyle(u).columnGap,s):hx("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return eh(l,r,c)}function Pj(e,t,r,n){const s=e.length;if(s===0)return null;const a=[];for(let o=0;o<s;o++){const i=e.item(o);if(i.dataset.index===void 0)continue;const c=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,r);if(u===0&&n("Zero-sized element, this should not happen",{child:i},nr.ERROR),u===l)continue;const d=a[a.length-1];a.length===0||d.size!==u||d.endIndex!==c-1?a.push({endIndex:c,size:u,startIndex:c}):a[a.length-1].endIndex++}return a}function hx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function mx(e,t,r){const n=M.useRef(null),s=M.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,f;if(t){const h=t.getBoundingClientRect(),y=l.top-h.top;f=h.height-Math.max(0,y),d=y+t.scrollTop}else{const h=o.current.ownerDocument.defaultView;f=h.innerHeight-Math.max(0,l.top),d=l.top+h.scrollY}n.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=eh(s,!0,r),i=M.useCallback(()=>{s(o.current)},[s,o]);return M.useEffect(()=>{var c;if(t){t.addEventListener("scroll",i);const l=new ResizeObserver(()=>{requestAnimationFrame(i)});return l.observe(t),()=>{t.removeEventListener("scroll",i),l.unobserve(t)}}else{const l=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",i),l==null||l.addEventListener("resize",i),()=>{l==null||l.removeEventListener("scroll",i),l==null||l.removeEventListener("resize",i)}}},[i,t,o]),a}const Wt=$e(()=>{const e=Ue(),t=Ue(),r=Y(0),n=Ue(),s=Y(0),a=Ue(),o=Ue(),i=Y(0),c=Y(0),l=Y(0),u=Y(0),d=Ue(),f=Ue(),h=Y(!1),y=Y(!1),g=Y(!1);return ce(W(e,re(({scrollTop:E})=>E)),t),ce(W(e,re(({scrollHeight:E})=>E)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),ic={lvl:0};function bx(e,t){const r=e.length;if(r===0)return[];let{index:n,value:s}=t(e[0]);const a=[];for(let o=1;o<r;o++){const{index:i,value:c}=t(e[o]);a.push({end:i-1,start:n,value:s}),n=i,s=c}return a.push({end:1/0,start:n,value:s}),a}function qe(e){return e===ic}function cc(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?cc(e.l,t):cc(e.r,t)}function Wr(e,t,r="k"){if(qe(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=Wr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return Wr(e.l,t,r)}function br(e,t,r){return qe(e)?xx(t,r,1):t===e.k?At(e,{k:t,v:r}):t<e.k?wx(At(e,{l:br(e.l,t,r)})):wx(At(e,{r:br(e.r,t,r)}))}function yo(){return ic}function go(e,t,r){if(qe(e))return[];const n=Wr(e,t)[0];return Ij(rh(e,n,r))}function th(e,t){if(qe(e))return ic;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=gx(n);return Nu(At(e,{k:a,l:yx(n),v:o}))}}else return t<r?Nu(At(e,{l:th(n,t)})):Nu(At(e,{r:th(s,t)}))}function ca(e){return qe(e)?[]:[...ca(e.l),{k:e.k,v:e.v},...ca(e.r)]}function rh(e,t,r){if(qe(e))return[];const{k:n,l:s,r:a,v:o}=e;let i=[];return n>t&&(i=i.concat(rh(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(rh(a,t,r))),i}function Nu(e){const{l:t,lvl:r,r:n}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(nh(t))return vx(At(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return At(t.r,{l:At(t,{r:t.r.l}),lvl:r,r:At(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(nh(e))return sh(At(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=nh(s)?n.lvl-1:n.lvl;return At(s,{l:At(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:sh(At(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function At(e,t){return xx(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function yx(e){return qe(e.r)?e.l:Nu(At(e,{r:yx(e.r)}))}function nh(e){return qe(e)||e.lvl>e.r.lvl}function gx(e){return qe(e.r)?[e.k,e.v]:gx(e.r)}function xx(e,t,r,n=ic,s=ic){return{k:e,l:n,lvl:r,r:s,v:t}}function wx(e){return sh(vx(e))}function vx(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?At(t,{r:At(e,{l:t.r})}):e}function sh(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?At(r,{l:At(e,{r:r.l}),lvl:t+1}):e}function Ij(e){return bx(e,({k:t,v:r})=>({index:t,value:r}))}function Ex(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function lc(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const ah=$e(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function kx(e,t,r){return e[Lu(e,t,r)]}function Lu(e,t,r,n=0){let s=e.length-1;for(;n<=s;){const a=Math.floor((n+s)/2),o=e[a],i=r(o,t);if(i===0)return a;if(i===-1){if(s-n<2)return a-1;s=a-1}else{if(s===n)return a;n=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Bj(e,t,r,n){const s=Lu(e,t,n),a=Lu(e,r,n,s);return e.slice(s,a+1)}function ms(e,t){return Math.round(e.getBoundingClientRect()[t])}function zu(e){return!qe(e.groupOffsetTree)}function oh({index:e},t){return t===e?0:t<e?-1:1}function Fj(){return{groupIndices:[],groupOffsetTree:yo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:yo()}}function Uj(e,t){let r=qe(e)?0:1/0;for(const n of t){const{endIndex:s,size:a,startIndex:o}=n;if(r=Math.min(r,o),qe(e)){e=br(e,0,a);continue}const i=go(e,o-1,s+1);if(i.some(zj(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:f}of i)c?(s>=d||a===f)&&(e=th(e,d)):(l=f!==a,c=!0),u>s&&s>=d&&f!==a&&(e=br(e,s+1,f));l&&(e=br(e,o,a))}return[e,r]}function Oj(e){return typeof e.groupIndex<"u"}function Dj({offset:e},t){return t===e?0:t<e?-1:1}function uc(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=kx(t,e,oh),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function Cx(e,t){if(!zu(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function Tx(e,t,r){if(Oj(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=Cx(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function _j(e,t,r,n=0){return n>0&&(t=Math.max(t,kx(e,n,oh).offset)),bx(Bj(e,t,r,Dj),Lj)}function Mj(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const f=t[0].size,h=t[1].size;o=r.reduce((y,g)=>br(br(y,g,f),g+1,h),o)}else[o,i]=Uj(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=ih(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((f,h)=>br(f,h,uc(h,d,s)),yo()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function Nj(e){return ca(e).map(({k:t,v:r},n,s)=>{const a=s[n+1];return{endIndex:a?a.k-1:1/0,size:r,startIndex:t}})}function Ax(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function ih(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=Lu(s,t-1,oh),i=s[c].offset;const l=Wr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===Wr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of go(r,t,1/0)){const d=l-a,f=d*o+i+d*n;s.push({index:l,offset:f,size:u}),a=l,i=f,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function Lj(e){return{index:e.index,value:e}}function zj(e){const{endIndex:t,size:r,startIndex:n}=e;return s=>s.start===n&&(s.end===t||s.end===1/0)&&s.value===r}const Rj={offsetHeight:"height",offsetWidth:"width"},un=$e(([{log:e},{recalcInProgress:t}])=>{const r=Ue(),n=Ue(),s=Rt(n,0),a=Ue(),o=Ue(),i=Y(0),c=Y([]),l=Y(void 0),u=Y(void 0),d=Y(void 0),f=Y(void 0),h=Y((T,m)=>ms(T,Rj[m])),y=Y(void 0),g=Y(0),E=Fj(),v=Rt(W(r,Te(c,e,g),ln(Mj,E),rt()),E),w=Rt(W(c,rt(),ln((T,m)=>({current:m,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(W(c,fe(T=>T.length>0),Te(v,g),re(([T,m,b])=>{const x=T.reduce((S,I,F)=>br(S,I,uc(I,m.offsetTree,b)||F),yo());return{...m,groupIndices:T,groupOffsetTree:x}})),v),ce(W(n,Te(v),fe(([T,{lastIndex:m}])=>T<m),re(([T,{lastIndex:m,lastSize:b}])=>[{endIndex:m,size:b,startIndex:T}])),r),ce(l,u);const A=Rt(W(l,re(T=>T===void 0)),!0);ce(W(u,fe(T=>T!==void 0&&qe(at(v).sizeTree)),re(T=>{const m=at(d),b=at(c).length>0;return m?b?[{endIndex:0,size:m,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(W(f,fe(T=>T!==void 0&&T.length>0&&qe(at(v).sizeTree)),re(T=>{const m=[];let b=T[0],x=0;for(let S=1;S<T.length;S++){const I=T[S];I!==b&&(m.push({endIndex:S-1,size:b,startIndex:x}),b=I,x=S)}return m.push({endIndex:T.length-1,size:b,startIndex:x}),m})),r),ce(W(c,Te(d,u),fe(([,T,m])=>T!==void 0&&m!==void 0),re(([T,m,b])=>{const x=[];for(let S=0;S<T.length;S++){const I=T[S],F=T[S+1];x.push({startIndex:I,endIndex:I,size:m}),F!==void 0&&x.push({startIndex:I+1,endIndex:F-1,size:b})}return x})),r);const C=mr(W(r,Te(v),ln(({sizes:T},[m,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:E}),re(T=>T.changed)));je(W(i,ln((T,m)=>({diff:T.prev-m,prev:m}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:m}=at(v);if(T>0)Ce(t,!0),Ce(a,T+Ax(T,m));else if(T<0){const b=at(w);b.length>0&&(T-=Ax(-T,b)),Ce(o,T)}}),je(W(i,Te(e)),([T,m])=>{T<0&&m("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:i},nr.ERROR)});const D=mr(a);ce(W(a,Te(v),re(([T,m])=>{const b=m.groupIndices.length>0,x=[],S=m.lastSize;if(b){const I=cc(m.sizeTree,0);let F=0,_=0;for(;F<T;){const P=m.groupIndices[_],O=m.groupIndices.length===_+1?1/0:m.groupIndices[_+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+O-1,size:S,startIndex:P+1}),_++,F+=O+1}const k=ca(m.sizeTree);return F!==T&&k.shift(),k.reduce((P,{k:O,v:U})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:U,ranges:L}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return ca(m.sizeTree).reduce((I,{k:F,v:_})=>({prevIndex:F+T,prevSize:_,ranges:[...I.ranges,{endIndex:F+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:S,ranges:[]}).ranges})),r);const z=mr(W(o,Te(v,g),re(([T,{offsetTree:m},b])=>{const x=-T;return uc(x,m,b)})));return ce(W(o,Te(v,g),re(([T,m,b])=>{if(m.groupIndices.length>0){if(qe(m.sizeTree))return m;let x=yo();const S=at(w);let I=0,F=0,_=0;for(;I<-T;){_=S[F];const k=S[F+1]-_-1;F++,I+=k+1}if(x=ca(m.sizeTree).reduce((k,{k:P,v:O})=>br(k,Math.max(0,P+T),O),x),I!==-T){const k=cc(m.sizeTree,_);x=br(x,0,k);const P=Wr(m.sizeTree,-T+1)[1];x=br(x,1,P)}return{...m,sizeTree:x,...ih(m.offsetTree,0,x,b)}}else{const x=ca(m.sizeTree).reduce((S,{k:I,v:F})=>br(S,Math.max(0,I+T),F),yo());return{...m,sizeTree:x,...ih(m.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:D,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:f,itemSize:h,listRefresh:C,shiftWith:o,shiftWithOffset:z,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:A,unshiftWith:a}},tt(hs,ah),{singleton:!0});function Hj(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const Sx=$e(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Ue(),o=Ue(),i=mr(W(a,re(Hj)));return ce(W(i,re(c=>c.totalCount)),r),ce(W(i,re(c=>c.groupIndices)),e),ce(W(Et(s,t,n),fe(([c,l])=>zu(l)),re(([c,l,u])=>Wr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),rt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},tt(un,Wt)),bs=$e(([{log:e}])=>{const t=Y(!1),r=mr(W(t,fe(n=>n),rt()));return je(t,n=>{n&&at(e)("props updated",{},nr.DEBUG)}),{didMount:r,propsReady:t}},tt(hs),{singleton:!0}),$j=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Px(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!$j)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const dc=$e(([{gap:e,listRefresh:t,sizes:r,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:a,footerHeight:o,headerHeight:i,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const h=Ue(),y=Ue(),g=Y(0);let E=null,v=null,w=null;function A(){E&&(E(),E=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(W(h,Te(r,d,n,g,i,o,f),Te(e,a,s),re(([[C,D,z,T,m,b,x,S],I,F,_])=>{const k=Px(C),{align:P,behavior:O,offset:U}=k,L=T-1,H=Tx(k,D,L);let G=uc(H,D.offsetTree,I)+b;P==="end"?(G+=F+Wr(D.sizeTree,H)[1]-z+_,H===L&&(G+=x)):P==="center"?G+=(F+Wr(D.sizeTree,H)[1]-z+_)/2:G-=m,U&&(G+=U);const Q=pe=>{A(),pe?(S("retrying to scroll to",{location:C},nr.DEBUG),Ce(h,C)):(Ce(y,!0),S("list did not change, scroll successful",{},nr.DEBUG))};if(A(),O==="smooth"){let pe=!1;w=je(t,me=>{pe=pe||me}),E=Vr(u,()=>{Q(pe)})}else E=Vr(W(t,Gj(150)),Q);return v=setTimeout(()=>{A()},1200),Ce(c,!0),S("scrolling from index to",{behavior:O,index:H,top:G},nr.DEBUG),{behavior:O,top:G}})),l),{scrollTargetReached:y,scrollToIndex:h,topListHeight:g}},tt(un,Wt,hs),{singleton:!0});function Gj(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function ch(e,t){e==0?t():requestAnimationFrame(()=>{ch(e-1,t)})}function lh(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const pc=$e(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=Y(!0),c=Y(0),l=Y(!0);return ce(W(o,Te(c),fe(([u,d])=>!!d),cn(!1)),i),ce(W(o,Te(c),fe(([u,d])=>!!d),cn(!1)),l),je(W(Et(t,o),Te(i,r,e,l),fe(([[,u],d,{sizeTree:f},h,y])=>u&&(!qe(f)||X0(h))&&!d&&!y),Te(c)),([,u])=>{Vr(s,()=>{Ce(l,!0)}),ch(4,()=>{Vr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},tt(un,Wt,dc,bs),{singleton:!0});function Ix(e,t){return Math.abs(e-t)<1.01}const fc="up",hc="down",jj="none",Vj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Wj=0,mc=$e(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=Y(!1),i=Y(!0),c=Ue(),l=Ue(),u=Y(4),d=Y(Wj),f=Rt(W(J0(W(he(s),oa(1),cn(!0)),W(he(s),oa(1),cn(!1),px(100))),rt()),!1),h=Rt(W(J0(W(r,cn(!0)),W(r,cn(!1),px(200))),rt()),!1);ce(W(Et(he(s),he(d)),re(([w,A])=>w<=A),rt()),i),ce(W(i,Hn(50)),l);const y=mr(W(Et(n,he(a),he(t),he(e),he(u)),ln((w,[{scrollHeight:A,scrollTop:C},D,z,T,m])=>{const b=C+D-A>-m,x={scrollHeight:A,scrollTop:C,viewportHeight:D};if(b){let I,F;return C>w.state.scrollTop?(I="SCROLLED_DOWN",F=w.state.scrollTop-C):(I="SIZE_DECREASED",F=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:F,state:x}}let S;return x.scrollHeight>w.state.scrollHeight?S="SIZE_INCREASED":D<w.state.viewportHeight?S="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?S="SCROLLING_UPWARDS":S="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:S,state:x}},Vj),rt((w,A)=>w&&w.atBottom===A.atBottom))),g=Rt(W(n,ln((w,{scrollHeight:A,scrollTop:C,viewportHeight:D})=>{if(Ix(w.scrollHeight,A))return{changed:!1,jump:0,scrollHeight:A,scrollTop:C};{const z=A-(C+D)<1;return w.scrollTop!==C&&z?{changed:!0,jump:w.scrollTop-C,scrollHeight:A,scrollTop:C}:{changed:!0,jump:0,scrollHeight:A,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fe(w=>w.changed),re(w=>w.jump)),0);ce(W(y,re(w=>w.atBottom)),o),ce(W(o,Hn(50)),c);const E=Y(hc);ce(W(n,re(({scrollTop:w})=>w),rt(),ln((w,A)=>at(h)?{direction:w.direction,prevScrollTop:A}:{direction:A<w.prevScrollTop?fc:hc,prevScrollTop:A},{direction:hc,prevScrollTop:0}),re(w=>w.direction)),E),ce(W(n,Hn(50),cn(jj)),E);const v=Y(0);return ce(W(f,fe(w=>!w),cn(0)),v),ce(W(s,Hn(100),Te(f),fe(([w,A])=>!!A),ln(([w,A],[C])=>[A,C],[0,0]),re(([w,A])=>A-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:E,scrollVelocity:v}},tt(Wt)),bc="top",yc="bottom",Bx="none";function Fx(e,t,r){return typeof e=="number"?r===fc&&t===bc||r===hc&&t===yc?e:0:r===fc?t===bc?e.main:e.reverse:t===yc?e.main:e.reverse}function Ux(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const uh=$e(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Ue(),o=Y(0),i=Y(0),c=Y(0),l=Rt(W(Et(he(n),he(s),he(r),he(a,lc),he(c),he(o),he(t),he(e),he(i)),re(([u,d,f,[h,y],g,E,v,w,A])=>{const C=u-w,D=E+v,z=Math.max(f-C,0);let T=Bx;const m=Ux(A,bc),b=Ux(A,yc);return h-=w,h+=f+v,y+=f+v,y-=w,h>u+D-m&&(T=fc),y<u-z+d+b&&(T=hc),T!==Bx?[Math.max(C-f-Fx(g,bc,T)-m,0),C-z-v+d+Fx(g,yc,T)+b]:null}),fe(u=>u!=null),rt(lc)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},tt(Wt),{singleton:!0});function qj(e,t,r){if(zu(t)){const n=Cx(e,t);return[{index:Wr(t.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:e,offset:0,size:0}]}const dh={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ru(e,t,r,n,s,a){const{lastIndex:o,lastOffset:i,lastSize:c}=s;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=r-o,f=i+d*c+(d-1)*n,h=l,y=f-u;return{bottom:u,firstItemIndex:a,items:Dx(e,s,a),offsetBottom:y,offsetTop:l,top:h,topItems:Dx(t,s,a),topListHeight:t.reduce((g,E)=>E.size+g,0),totalCount:r}}function Ox(e,t,r,n,s,a){let o=0;if(r.groupIndices.length>0)for(const u of r.groupIndices){if(u-o>=e)break;o++}const i=e+o,c=lh(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return Ru(l,[],i,s,r,n)}function Dx(e,t,r){if(e.length===0)return[];if(!zu(t))return e.map(l=>({...l,index:l.index+r,originalIndex:l.index}));const n=e[0].index,s=e[e.length-1].index,a=[],o=go(t.groupOffsetTree,n,s);let i,c=0;for(const l of e){(!i||i.end<l.index)&&(i=o.shift(),c=t.groupIndices.indexOf(i.start));let u;l.index===i.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+r},a.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return a}function _x(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const la=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:y}])=>{const g=Y([]),E=Y(0),v=Ue(),w=Y(0);ce(a.topItemsIndexes,g);const A=Rt(W(Et(h,y,he(c,lc),he(s),he(n),he(l),u,he(g),he(t),he(r),he(w),e),fe(([T,m,,b,,,,,,,,x])=>{const S=x&&x.length!==b;return T&&!m&&!S}),re(([,,[T,m],b,x,S,I,F,_,k,P,O])=>{var U,L,H,G;const Q=x,{offsetTree:pe,sizeTree:me}=Q,ie=at(E);if(b===0)return{...dh,totalCount:b};if(T===0&&m===0)return ie===0?{...dh,totalCount:b}:Ox(ie,S,x,_,k,O||[]);if(qe(me))return ie>0?null:Ru(qj(lh(S,b),Q,O),[],b,k,Q,_);const de=[];if(F.length>0){const Ae=F[0],ve=F[F.length-1];let be=0;for(const Xe of go(me,Ae,ve)){const Ke=Xe.value,Qe=Math.max(Xe.start,Ae),Br=Math.min(Xe.end,ve);for(let Ot=Qe;Ot<=Br;Ot++)de.push({data:O==null?void 0:O[Ot],index:Ot,offset:be,size:Ke}),be+=Ke}}if(!I)return Ru([],de,b,k,Q,_);const Be=F.length>0?F[F.length-1]+1:0,X=_j(pe,T,m,Be);if(X.length===0)return null;const we=b-1,De=Mu([],Ae=>{for(const ve of X){const be=ve.value;let Xe=be.offset,Ke=ve.start;const Qe=be.size;if(be.offset<T){Ke+=Math.floor((T-be.offset+k)/(Qe+k));const Ot=Ke-ve.start;Xe+=Ot*Qe+Ot*k}Ke<Be&&(Xe+=(Be-Ke)*Qe,Ke=Be);const Br=Math.min(ve.end,we);for(let Ot=Ke;Ot<=Br&&!(Xe>=m);Ot++)Ae.push({data:O==null?void 0:O[Ot],index:Ot,offset:Xe,size:Qe}),Xe+=Qe+k}}),Ge=_x(P,bc),it=_x(P,yc);if(De.length>0&&(Ge>0||it>0)){const Ae=De[0],ve=De[De.length-1];if(Ge>0&&Ae.index>Be){const be=Math.min(Ge,Ae.index-Be),Xe=[];let Ke=Ae.offset;for(let Qe=Ae.index-1;Qe>=Ae.index-be;Qe--){const Br=(L=(U=go(me,Qe,Qe)[0])==null?void 0:U.value)!=null?L:Ae.size;Ke-=Br+k,Xe.unshift({data:O==null?void 0:O[Qe],index:Qe,offset:Ke,size:Br})}De.unshift(...Xe)}if(it>0&&ve.index<we){const be=Math.min(it,we-ve.index);let Xe=ve.offset+ve.size+k;for(let Ke=ve.index+1;Ke<=ve.index+be;Ke++){const Qe=(G=(H=go(me,Ke,Ke)[0])==null?void 0:H.value)!=null?G:ve.size;De.push({data:O==null?void 0:O[Ke],index:Ke,offset:Xe,size:Qe}),Xe+=Qe+k}}}return Ru(De,de,b,k,Q,_)}),fe(T=>T!==null),rt()),dh);ce(W(e,fe(X0),re(T=>T==null?void 0:T.length)),s),ce(W(A,re(T=>T.topListHeight)),d),ce(d,i),ce(W(A,re(T=>[T.top,T.bottom])),o),ce(W(A,re(T=>T.items)),v);const C=mr(W(A,fe(({items:T})=>T.length>0),Te(s,e),fe(([{items:T},m])=>T[T.length-1].originalIndex===m-1),re(([,T,m])=>[T-1,m]),rt(lc),re(([T])=>T))),D=mr(W(A,Hn(200),fe(({items:T,topItems:m})=>T.length>0&&T[0].originalIndex===m.length),re(({items:T})=>T[0].index),rt())),z=mr(W(A,fe(({items:T})=>T.length>0),re(({items:T})=>{let m=0,b=T.length-1;for(;T[m].type==="group"&&m<b;)m++;for(;T[b].type==="group"&&b>m;)b--;return{endIndex:T[b].index,startIndex:T[m].index}}),rt(Ex)));return{endReached:C,initialItemCount:E,itemsRendered:v,listState:A,minOverscanItemCount:w,rangeChanged:z,startReached:D,topItemsIndexes:g,...f}},tt(un,Sx,uh,pc,dc,mc,bs,ah),{singleton:!0}),Mx=$e(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Ue(),o=Rt(W(Et(r,e,n,t,s),re(([i,c,l,u,d])=>i+c+l+u+d.offsetBottom+d.bottom)),0);return ce(he(o),a),{totalListHeight:o,totalListHeightChanged:a}},tt(Wt,la),{singleton:!0}),Kj=$e(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Y(!1),n=Rt(W(Et(r,e,t),fe(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),Hn(0),rt()),0);return{alignToBottom:r,paddingTopAddition:n}},tt(Wt,Mx),{singleton:!0}),Nx=$e(()=>({context:Y(null)})),Yj=({itemBottom:e,itemTop:t,locationParams:{align:r,behavior:n,...s},viewportBottom:a,viewportTop:o})=>t<o?{...s,align:r??"start",behavior:n}:e>a?{...s,align:r??"end",behavior:n}:null,Lx=$e(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Ue();return ce(W(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,f,h,y,g,E,v,w],A])=>{const{align:C,behavior:D,calculateViewLocation:z=Yj,done:T,...m}=d,b=Tx(d,f,y-1),x=uc(b,f.offsetTree,A)+g+E,S=x+Wr(f.sizeTree,b)[1],I=w+E,F=w+h-v,_=z({itemBottom:S,itemTop:x,locationParams:{align:C,behavior:D,...m},viewportBottom:F,viewportTop:I});return _?T&&Vr(W(o,fe(k=>!k),oa(at(o)?1:2)),T):T&&T(),_}),fe(d=>d!==null)),l),{scrollIntoView:u}},tt(un,Wt,dc,la,hs),{singleton:!0});function zx(e){return e?e==="smooth"?"smooth":"auto":!1}const Zj=(e,t)=>typeof e=="function"?zx(e(t)):t&&zx(e),Xj=$e(([{listRefresh:e,totalCount:t,fixedItemSize:r,data:n},{atBottomState:s,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:h}])=>{const y=Y(!1),g=Ue();let E=null;function v(D){Ce(o,{align:"end",behavior:D,index:"LAST"})}je(W(Et(W(he(t),oa(1)),c),Te(he(y),a,i,d),re(([[D,z],T,m,b,x])=>{let S=z&&b,I="auto";return S&&(I=Zj(T,m||x),S=S&&!!I),{followOutputBehavior:I,shouldFollow:S,totalCount:D}}),fe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:z})=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("following output to ",{totalCount:z},nr.DEBUG),v(D)}):E=Vr(e,()=>{at(u)("following output to ",{totalCount:z},nr.DEBUG),v(D),E=null})});function w(D){const z=Vr(s,T=>{D&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!E&&(at(u)("scrolling to bottom due to increased size",{},nr.DEBUG),v("auto"))});setTimeout(z,100)}je(W(Et(he(y),t,l),fe(([D,,z])=>D&&z),ln(({value:D},[,z])=>({refreshed:D===z,value:z}),{refreshed:!1,value:0}),fe(({refreshed:D})=>D),Te(y,t)),([,D])=>{at(i)&&w(D!==!1)}),je(g,()=>{w(at(y)!==!1)}),je(Et(he(y),s),([D,z])=>{D&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const A=Y(null),C=Ue();return ce(J0(W(he(n),re(D=>{var z;return(z=D==null?void 0:D.length)!=null?z:0})),W(he(t))),C),je(W(Et(W(C,oa(1)),c),Te(he(A),i,d,f),re(([[D,z],T,m,b,x])=>z&&m&&(T==null?void 0:T({context:x,totalCount:D,scrollingInProgress:b}))),fe(D=>!!D),Hn(0)),D=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("scrolling into view",{}),Ce(h,D)}):E=Vr(e,()=>{at(u)("scrolling into view",{}),Ce(h,D),E=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:A}},tt(un,mc,dc,pc,bs,hs,Wt,Nx,Lx)),Qj=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(W(i,Te(a),fe(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,f,h=[]])=>Ox(c,l,u,d,f,h))),o),{}),tt(un,pc,la,bs),{singleton:!0}),Jj=$e(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Y(0);return je(W(e,Te(n),fe(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{Vr(W(r,oa(1),fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},tt(bs,Wt,la),{singleton:!0}),Rx=$e(([{scrollVelocity:e}])=>{const t=Y(!1),r=Ue(),n=Y(!1);return ce(W(e,Te(n,t,r),fe(([s,a])=>!!a),re(([s,a,o,i])=>{const{enter:c,exit:l}=a;if(o){if(l(s,i))return!1}else if(c(s,i))return!0;return o}),rt()),t),je(W(Et(t,e,r),Te(n)),([[s,a,o],i])=>{s&&i&&i.change&&i.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:e}},tt(mc),{singleton:!0}),ph=$e(([{scrollContainerState:e,scrollTo:t}])=>{const r=Ue(),n=Ue(),s=Ue(),a=Y(!1),o=Y(void 0);return ce(W(Et(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(W(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},tt(Wt)),eV=$e(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Ue(),u=Y(void 0),d=Y(null),f=Y(null);return ce(i,d),ce(c,f),je(W(l,Te(t,n,o,d,f,r)),([h,y,g,E,v,w,A])=>{const C=Nj(y.sizeTree);E&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=A,h({ranges:C,scrollTop:g})}),ce(W(u,fe(X0),re(tV)),s),ce(W(a,Te(u),fe(([,h])=>h!==void 0),rt(),re(([,h])=>h.ranges)),e),{getState:l,restoreStateFrom:u}},tt(un,Wt,pc,bs,ph));function tV(e){return{align:"start",index:0,offset:e.scrollTop}}const rV=$e(([{topItemsIndexes:e}])=>{const t=Y(0);return ce(W(t,fe(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},tt(la));function Hx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const nV=Hx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),sV=$e(([{deviation:e,scrollBy:t,scrollingInProgress:r,scrollTop:n},{isAtBottom:s,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:i},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:h},{recalcInProgress:y}])=>{const g=mr(W(c,Te(o),ln(([,v,w,A],[{bottom:C,items:D,offsetBottom:z,totalCount:T},m])=>{const b=C+z;let x=0;return w===T&&v.length>0&&D.length>0&&(D[0].originalIndex===0&&v[0].originalIndex===0||(x=b-A,x!==0&&(x+=m))),[x,D,T,b]},[0,[],0,0]),fe(([v])=>v!==0),Te(n,i,r,s,h,y),fe(([,v,w,A,,,C])=>!C&&!A&&v!==0&&w===fc),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},nr.DEBUG),v))));function E(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(W(g,Te(e,a)),([v,w,A])=>{A&&nV()?Ce(e,w-v):E(-v)}),je(W(Et(Rt(a,!1),e,y),fe(([v,w,A])=>!v&&!A&&w!==0),re(([v,w])=>w),Hn(1)),E),ce(W(d,re(v=>({top:-v}))),t),je(W(l,Te(f,u),re(([v,{groupIndices:w,lastSize:A,sizeTree:C},D])=>{function z(T){return T*(A+D)}if(w.length===0)return z(v);{let T=0;const m=cc(C,0);let b=0,x=0;for(;b<v;){b++,T+=m;let S=w.length===x+1?1/0:w[x+1]-w[x]-1;b+S>v&&(T-=m,S=v-b+1),b+=S,T+=z(S),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},tt(Wt,mc,la,un,hs,ah)),aV=$e(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),tt(uh,Qj,bs,Rx,Mx,Jj,Kj,ph,Lx,hs,Nx)),$x=$e(([{data:e,defaultItemSize:t,firstItemIndex:r,fixedItemSize:n,fixedGroupSize:s,gap:a,groupIndices:o,heightEstimates:i,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E},v,w,A,C,{scrollToIndex:D},z,{topItemCount:T},{groupCounts:m},b])=>{const{listState:x,minOverscanItemCount:S,topItemsIndexes:I,rangeChanged:F,..._}=C;return ce(F,b.scrollSeekRangeChanged),ce(W(b.windowViewportRect,re(k=>k.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:m,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:f,...A,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:S,scrollToIndex:D,statefulTotalCount:d,trackItemSizes:h,rangeChanged:F,..._,...b,...v,sizes:u,...w}},tt(un,pc,Wt,eV,Xj,la,dc,sV,rV,Sx,aV));function oV(e,t){const r={},n={};let s=0;const a=e.length;for(;s<a;)n[e[s]]=1,s+=1;for(const o in t)Object.hasOwn(n,o)||(r[o]=t[o]);return r}const Hu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Gx(e,t,r){const n=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),i=M.createContext({});function c(E,v){E.propsReady&&Ce(E.propsReady,!1);for(const w of n){const A=E[t.required[w]];Ce(A,v[w])}for(const w of s)if(w in v){const A=E[t.optional[w]];Ce(A,v[w])}E.propsReady&&Ce(E.propsReady,!0)}function l(E){return a.reduce((v,w)=>(v[w]=A=>{const C=E[t.methods[w]];Ce(C,A)},v),{})}function u(E){return o.reduce((v,w)=>(v[w]=Ej(E[t.events[w]]),v),{})}const d=M.forwardRef((E,v)=>{const{children:w,...A}=E,[C]=M.useState(()=>Mu(Cj(e),T=>{c(T,A)})),[D]=M.useState(dx(u,C));Hu(()=>{for(const T of o)T in A&&je(D[T],A[T]);return()=>{Object.values(D).map(Q0)}},[A,D,C]),Hu(()=>{c(C,A)}),M.useImperativeHandle(v,lx(l(C)));const z=r;return B.jsx(i.Provider,{value:C,children:r?B.jsx(z,{...oV([...n,...s,...o],A),children:w}):w})}),f=E=>{const v=M.useContext(i);return M.useCallback(w=>{Ce(v[E],w)},[v,E])},h=E=>{const v=M.useContext(i)[E],w=M.useCallback(A=>je(v,A),[v]);return M.useSyncExternalStore(w,()=>at(v),()=>at(v))},y=E=>{const v=M.useContext(i)[E],[w,A]=M.useState(dx(at,v));return Hu(()=>je(v,C=>{C!==w&&A(lx(C))}),[v,w]),w},g=M.version.startsWith("18")?h:y;return{Component:d,useEmitter:(E,v)=>{const w=M.useContext(i)[E];Hu(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:f}}const jx=M.createContext(void 0),Vx=M.createContext(void 0),Wx=typeof document<"u"?M.useLayoutEffect:M.useEffect;function fh(e){return"self"in e}function iV(e){return"body"in e}function qx(e,t,r,n=bo,s,a){const o=M.useRef(null),i=M.useRef(null),c=M.useRef(null),l=M.useCallback(f=>{let h,y,g;const E=f.target;if(iV(E)||fh(E)){const w=fh(E)?E:E.defaultView;g=a?w.scrollX:w.scrollY,h=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?E.scrollLeft:E.scrollTop,h=a?E.scrollWidth:E.scrollHeight,y=a?E.offsetWidth:E.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y})};f.suppressFlushSync?v():As.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===h-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);M.useEffect(()=>{const f=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",l,{passive:!0}),()=>{n(null),f.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(f){const h=o.current;if(!h||(a?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const y=f.behavior==="smooth";let g,E,v;fh(h)?(E=Math.max(ms(h.document.documentElement,a?"width":"height"),a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),g=a?h.innerWidth:h.innerHeight,v=a?window.scrollX:window.scrollY):(E=h[a?"scrollWidth":"scrollHeight"],g=ms(h,a?"width":"height"),v=h[a?"scrollLeft":"scrollTop"]);const w=E-g;if(f.top=Math.ceil(Math.max(Math.min(w,f.top),0)),Ix(g,E)||f.top===v){e({scrollHeight:E,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=f.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(f={behavior:f.behavior,left:f.top}),h.scrollTo(f)}function d(f){a&&(f={behavior:f.behavior,left:f.top}),o.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const hh="-webkit-sticky",Kx="sticky",mh=Hx(()=>{if(typeof document>"u")return Kx;const e=document.createElement("div");return e.style.position=hh,e.style.position===hh?hh:Kx});function bh(e){return e}const cV=$e(()=>{const e=Y(i=>`Item ${i}`),t=Y(i=>`Group ${i}`),r=Y({}),n=Y(bh),s=Y("div"),a=Y(bo),o=(i,c=null)=>Rt(W(r,re(l=>l[i]),rt()),c);return{components:r,computeItemKey:n,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:s,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),lV=$e(([e,t])=>({...e,...t}),tt($x,cV)),uV=({height:e})=>B.jsx("div",{style:{height:e}}),dV={overflowAnchor:"none",position:mh(),zIndex:1},Yx={overflowAnchor:"none"},pV={...Yx,display:"inline-block",height:"100%"},Zx=M.memo(function({showTopList:e=!1}){const t=ge("listState"),r=Sr("sizeRanges"),n=ge("useWindowScroll"),s=ge("customScrollParent"),a=Sr("windowScrollContainerState"),o=Sr("scrollContainerState"),i=s||n?a:o,c=ge("itemContent"),l=ge("context"),u=ge("groupContent"),d=ge("trackItemSizes"),f=ge("itemSize"),h=ge("log"),y=Sr("gap"),g=ge("horizontalDirection"),{callbackRef:E}=Sj(r,f,d,e?bo:i,h,y,s,g,ge("skipAnimationFrameInResizeObserver")),[v,w]=M.useState(0);yh("deviation",_=>{v!==_&&w(_)});const A=ge("EmptyPlaceholder"),C=ge("ScrollSeekPlaceholder")||uV,D=ge("ListComponent"),z=ge("ItemComponent"),T=ge("GroupComponent"),m=ge("computeItemKey"),b=ge("isSeeking"),x=ge("groupIndices").length>0,S=ge("alignToBottom"),I=ge("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:S?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:S?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&A?B.jsx(A,{...Ht(A,l)}):B.jsx(D,{...Ht(D,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:E,style:F,children:(e?t.topItems:t.items).map(_=>{const k=_.originalIndex,P=m(k+t.firstItemIndex,_.data,l);return b?M.createElement(C,{...Ht(C,l),height:_.size,index:_.index,key:P,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?M.createElement(T,{...Ht(T,l),"data-index":k,"data-item-index":_.index,"data-known-size":_.size,key:P,style:dV},u(_.index,l)):M.createElement(z,{...Ht(z,l),...bV(z,_.data),"data-index":k,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:P,style:g?pV:Yx},x?c(_.index,_.groupIndex,_.data,l):c(_.index,_.data,l))})})}),fV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hV={outline:"none",overflowX:"auto",position:"relative"},$u=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),mV={position:mh(),top:0,width:"100%",zIndex:1};function Ht(e,t){if(typeof e!="string")return{context:t}}function bV(e,t){return{item:typeof e=="string"?void 0:t}}const yV=M.memo(function(){const e=ge("HeaderComponent"),t=Sr("headerHeight"),r=ge("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),gV=M.memo(function(){const e=ge("FooterComponent"),t=Sr("footerHeight"),r=ge("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null});function Xx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("scrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:h,scrollToCallback:y}=qx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",f),B.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?hV:fV,...s},tabIndex:0,...o,...Ht(c,a),children:n})})}function Qx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("windowScrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),h=M.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:E,scrollToCallback:v}=qx(i,l,c,y,f);return Wx(()=>{var w;return E.current=f||((w=h.current)==null?void 0:w.ownerDocument.defaultView),()=>{E.current=null}},[E,f]),e("windowScrollTo",v),e("scrollBy",g),B.jsx(c,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...Ht(c,a),children:n})})}const xV=({children:e})=>{const t=M.useContext(jx),r=Sr("viewportHeight"),n=Sr("fixedItemHeight"),s=ge("alignToBottom"),a=ge("horizontalDirection"),o=M.useMemo(()=>ux(r,c=>ms(c,a?"width":"height")),[r,a]),i=ia(o,!0,ge("skipAnimationFrameInResizeObserver"));return M.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:$u(s),children:e})},wV=({children:e})=>{const t=M.useContext(jx),r=Sr("windowViewportRect"),n=Sr("fixedItemHeight"),s=ge("customScrollParent"),a=mx(r,s,ge("skipAnimationFrameInResizeObserver")),o=ge("alignToBottom");return M.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),B.jsx("div",{"data-viewport-type":"window",ref:a,style:$u(o),children:e})},vV=({children:e})=>{const t=ge("TopItemListComponent")||"div",r=ge("headerHeight"),n={...mV,marginTop:`${r}px`},s=ge("context");return B.jsx(t,{style:n,...Ht(t,s),children:e})},EV=M.memo(function(e){const t=ge("useWindowScroll"),r=ge("topItemsIndexes").length>0,n=ge("customScrollParent"),s=ge("context");return B.jsxs(n||t?TV:CV,{...e,context:s,children:[r&&B.jsx(vV,{children:B.jsx(Zx,{showTopList:!0})}),B.jsxs(n||t?wV:xV,{children:[B.jsx(yV,{}),B.jsx(Zx,{}),B.jsx(gV,{})]})]})}),{Component:kV,useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}=Gx(lV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},EV),CV=Xx({useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}),TV=Qx({useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}),AV=kV;tt($x,$e(()=>{const e=Y(l=>B.jsxs("td",{children:["Item $",l]})),t=Y(null),r=Y(l=>B.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=Y(null),s=Y(null),a=Y({}),o=Y(bh),i=Y(bo),c=(l,u=null)=>Rt(W(a,re(d=>d[l]),rt()),u);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:s,fixedHeaderContent:n,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}})),mh();const Jx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},SV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:e5,floor:Gu,max:gc,min:gh,round:t5}=Math;function r5(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function PV(e){return{...SV,items:e}}function ju(e,t){return e&&e.width===t.width&&e.height===t.height}function IV(e,t){return e&&e.column===t.column&&e.row===t.row}const BV=$e(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,h,{didMount:y,propsReady:g},{customScrollParent:E,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C},D])=>{const z=Y(0),T=Y(0),m=Y(Jx),b=Y({height:0,width:0}),x=Y({height:0,width:0}),S=Ue(),I=Ue(),F=Y(0),_=Y(null),k=Y({column:0,row:0}),P=Ue(),O=Ue(),U=Y(!1),L=Y(0),H=Y(!0),G=Y(!1),Q=Y(!1);je(W(y,Te(L),fe(([X,we])=>!!we)),()=>{Ce(H,!1)}),je(W(Et(y,H,x,b,L,G),fe(([X,we,De,Ge,,it])=>X&&!we&&De.height!==0&&Ge.height!==0&&!it)),([,,,,X])=>{Ce(G,!0),ch(1,()=>{Ce(S,X)}),Vr(W(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(W(O,fe(X=>X!=null&&X.scrollTop>0),cn(0)),T),je(W(y,Te(O),fe(([,X])=>X!=null)),([,X])=>{X&&(Ce(b,X.viewport),Ce(x,X.item),Ce(k,X.gap),X.scrollTop>0&&(Ce(U,!0),Vr(W(l,oa(1)),we=>{Ce(U,!1)}),Ce(c,{top:X.scrollTop})))}),ce(W(b,re(({height:X})=>X)),d),ce(W(Et(he(b,ju),he(x,ju),he(k,(X,we)=>X&&X.column===we.column&&X.row===we.row),he(l)),re(([X,we,De,Ge])=>({gap:De,item:we,scrollTop:Ge,viewport:X}))),P),ce(W(Et(he(z),n,he(k,IV),he(x,ju),he(b,ju),he(_),he(T),he(U),he(H),he(L)),fe(([,,,,,,,X])=>!X),re(([X,[we,De],Ge,it,Ae,ve,be,,Xe,Ke])=>{const{column:Qe,row:Br}=Ge,{height:Ot,width:Ch}=it,{width:I5}=Ae;if(be===0&&(X===0||I5===0))return Jx;if(Ch===0){const D5=lh(Ke,X),MW=D5+Math.max(be-1,0);return PV(r5(D5,MW,ve))}const qu=n5(I5,Ch,Qe);let Fo,Ea;Xe?we===0&&De===0&&be>0?(Fo=0,Ea=be-1):(Fo=qu*Gu((we+Br)/(Ot+Br)),Ea=qu*e5((De+Br)/(Ot+Br))-1,Ea=gh(X-1,gc(Ea,qu-1)),Fo=gh(Ea,gc(0,Fo))):(Fo=0,Ea=-1);const B5=r5(Fo,Ea,ve),{bottom:F5,top:U5}=s5(Ae,Ge,it,B5),O5=e5(X/qu),_W=O5*Ot+(O5-1)*Br-F5;return{bottom:F5,itemHeight:Ot,items:B5,itemWidth:Ch,offsetBottom:_W,offsetTop:U5,top:U5}})),m),ce(W(_,fe(X=>X!==null),re(X=>X.length)),z),ce(W(Et(b,x,m,k),fe(([X,we,{items:De}])=>De.length>0&&we.height!==0&&X.height!==0),re(([X,we,{items:De},Ge])=>{const{bottom:it,top:Ae}=s5(X,Ge,we,De);return[Ae,it]}),rt(lc)),t);const pe=Y(!1);ce(W(l,Te(pe),re(([X,we])=>we||X!==0)),pe);const me=mr(W(Et(m,z),fe(([{items:X}])=>X.length>0),Te(pe),fe(([[X,we],De])=>{const Ge=X.items[X.items.length-1].index===we-1;return(De||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===we)&&Ge}),re(([[,X]])=>X-1),rt())),ie=mr(W(he(m),fe(({items:X})=>X.length>0&&X[0].index===0),cn(0),rt())),de=mr(W(he(m),Te(U),fe(([{items:X},we])=>X.length>0&&!we),re(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),rt(Ex),Hn(0)));ce(de,h.scrollSeekRangeChanged),ce(W(S,Te(b,x,z,k),re(([X,we,De,Ge,it])=>{const Ae=Px(X),{align:ve,behavior:be,offset:Xe}=Ae;let Ke=Ae.index;Ke==="LAST"&&(Ke=Ge-1),Ke=gc(0,Ke,gh(Ge-1,Ke));let Qe=xh(we,it,De,Ke);return ve==="end"?Qe=t5(Qe-we.height+De.height):ve==="center"&&(Qe=t5(Qe-we.height/2+De.height/2)),Xe&&(Qe+=Xe),{behavior:be,top:Qe}})),c);const Be=Rt(W(m,re(X=>X.offsetBottom+X.bottom)),0);return ce(W(C,re(X=>({height:X.visibleHeight,width:X.visibleWidth}))),b),{customScrollParent:E,data:_,deviation:F,footerHeight:s,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:O,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:S,scrollTop:l,smoothScrollTargetReached:u,totalCount:z,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C,...h,gridState:m,horizontalDirection:Q,initialTopMostItemIndex:L,totalListHeight:Be,...f,endReached:me,propsReady:g,rangeChanged:de,startReached:ie,stateChanged:P,stateRestoreInProgress:U,...D}},tt(uh,Wt,mc,Rx,bs,ph,hs));function n5(e,t,r){return gc(1,Gu((e+r)/(Gu(t)+r)))}function s5(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=xh(e,t,r,n[0].index);return{bottom:xh(e,t,r,n[n.length-1].index)+s,top:a}}function xh(e,t,r,n){const s=n5(e.width,r.width,t.column),a=Gu(n/s),o=a*r.height+gc(0,a-1)*t.row;return o>0?o+t.row:o}const FV=$e(()=>{const e=Y(d=>`Item ${d}`),t=Y({}),r=Y(null),n=Y("virtuoso-grid-item"),s=Y("virtuoso-grid-list"),a=Y(bh),o=Y("div"),i=Y(bo),c=(d,f=null)=>Rt(W(t,re(h=>h[d]),rt()),f),l=Y(!1),u=Y(!1);return ce(he(u),l),{components:t,computeItemKey:a,context:r,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:s,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),UV=$e(([e,t])=>({...e,...t}),tt(BV,FV)),OV=M.memo(function(){const e=ot("gridState"),t=ot("listClassName"),r=ot("itemClassName"),n=ot("itemContent"),s=ot("computeItemKey"),a=ot("isSeeking"),o=Pr("scrollHeight"),i=ot("ItemComponent"),c=ot("ListComponent"),l=ot("ScrollSeekPlaceholder"),u=ot("context"),d=Pr("itemDimensions"),f=Pr("gap"),h=ot("log"),y=ot("stateRestoreInProgress"),g=Pr("reportReadyState"),E=ia(M.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const A=v.firstChild;if(A){const{height:C,width:D}=A.getBoundingClientRect();d({height:C,width:D})}f({column:o5("column-gap",getComputedStyle(v).columnGap,h),row:o5("row-gap",getComputedStyle(v).rowGap,h)})},[o,d,f,h]),!0,!1);return Wx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:B.jsx(c,{className:t,ref:E,...Ht(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const w=s(v.index,v.data,u);return a?B.jsx(l,{...Ht(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):M.createElement(i,{...Ht(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),DV=M.memo(function(){const e=ot("HeaderComponent"),t=Pr("headerHeight"),r=ot("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,!1),s=ot("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),_V=M.memo(function(){const e=ot("FooterComponent"),t=Pr("footerHeight"),r=ot("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,!1),s=ot("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),MV=({children:e})=>{const t=M.useContext(Vx),r=Pr("itemDimensions"),n=Pr("viewportDimensions"),s=ia(M.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return M.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),B.jsx("div",{ref:s,style:$u(!1),children:e})},NV=({children:e})=>{const t=M.useContext(Vx),r=Pr("windowViewportRect"),n=Pr("itemDimensions"),s=ot("customScrollParent"),a=mx(r,s,!1);return M.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),B.jsx("div",{ref:a,style:$u(!1),children:e})},LV=M.memo(function({...e}){const t=ot("useWindowScroll"),r=ot("customScrollParent"),n=r||t?RV:zV,s=r||t?NV:MV,a=ot("context");return B.jsx(n,{...e,...Ht(n,a),children:B.jsxs(s,{children:[B.jsx(DV,{}),B.jsx(OV,{}),B.jsx(_V,{})]})})}),{useEmitter:a5,useEmitterValue:ot,usePublisher:Pr}=Gx(UV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},LV),zV=Xx({useEmitter:a5,useEmitterValue:ot,usePublisher:Pr}),RV=Qx({useEmitter:a5,useEmitterValue:ot,usePublisher:Pr});function o5(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}var wh={},i5;function HV(){if(i5)return wh;i5=1;var e=lu.GenIcon;return wh.AiFillQuestionCircle=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]})(r)},wh}var $V=HV();function GV({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=M.useState(!1);return M.useEffect(()=>{a(!1)},[e]),e&&!s?B.jsx("img",{alt:n,style:r,onError:()=>a(!0),className:`twap-token-logo ${t}`,src:e}):B.jsx($V.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const jV=()=>B.jsx("div",{className:"twap-orders__loader",children:B.jsx("p",{children:"Loading..."})}),VV=()=>{const{isLoading:e}=Ou(),t=nx(),r=te(a=>a.state.orderIdsToCancel),n=te(a=>a.state.cancelOrdersMode),s=sx();return B.jsx(B.Fragment,{children:e?B.jsx(jV,{}):t!=null&&t.length?B.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:B.jsx(AV,{style:{height:"100%"},data:t,itemContent:(a,o)=>B.jsx(WV,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):B.jsx(qV,{})})},WV=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=te(i=>i.updateState),a=xt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=xt.useCallback(()=>{n?t(e==null?void 0:e.id):a()},[n,t,a,e==null?void 0:e.id]);return B.jsx("div",{className:`twap-orders__list-item twap-orders__list-item-${e.status} ${n?"twap-orders__list-item-select-mode":""} ${r?"twap-orders__list-item-selected":""}`,onClick:o,children:B.jsxs("div",{className:"twap-orders__list-item-content",children:[B.jsx(KV,{order:e}),B.jsx(YV,{value:e.progress||0}),B.jsxs("div",{className:"twap-orders__list-item-tokens",children:[B.jsx(c5,{address:e.srcTokenAddress}),B.jsx(bj.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),B.jsx(c5,{address:e.dstTokenAddress})]})]})})},qV=()=>{const e=te(n=>n.state.orderHistoryStatusFilter),t=Me(),r=xt.useMemo(()=>e||"",[e]);return B.jsx("div",{className:"twap-orders__list-empty",children:B.jsx("p",{children:t("noOrders",{status:r})})})},KV=({order:e})=>{const t=e&&e.status,r=tx(e),n=W0(e.createdAt);return B.jsxs("div",{className:"twap-orders__list-item-header",children:[B.jsxs("p",{className:"twap-orders__list-item-header-title",children:[r," ",B.jsx("span",{children:`(${n})`})]}),B.jsx("p",{className:"twap-orders__list-item-header-status",children:t})]})},c5=e=>{const{useToken:t,components:r}=oe(),n=t==null?void 0:t(e.address);return B.jsx("div",{className:"twap-orders__list-item-token",children:n?B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"twap-orders__list-item-token-logo",children:r.TokenLogo?B.jsx(r.TokenLogo,{token:n}):B.jsx(GV,{logo:n==null?void 0:n.logoUrl})}),B.jsx("p",{className:"twap-orders__list-item-token-symbol",children:n==null?void 0:n.symbol})]}):B.jsx("div",{})})};function YV(e){return B.jsxs("div",{className:"twap-orders__list-item-progress",children:[B.jsx("div",{className:"twap-orders__list-item-progress-bar",children:B.jsx("div",{className:"twap-orders__list-item-progress-bar-filled",style:{width:`${e.value}%`}})}),B.jsx("div",{className:"twap-orders__list-item-token-progress-label",children:B.jsx("p",{children:`${Math.round(e.value)}%`})})]})}const ZV=()=>{const e=te(r=>r.state.selectedOrderID),t=e!==void 0;return B.jsx("div",{className:`twap-orders ${e!==void 0?"twap-orders__show-selected":""}`,children:t?B.jsx(YG,{}):B.jsx(VV,{})})},XV=e=>{const t=Me(),{marketPrice:r,typedInputAmount:n}=oe();return M.useMemo(()=>{const{isError:a,value:o}=vm(e);if(!(!a||j(n||"0").isZero()||!r))return{type:Gt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${Nf(o)} ${t("minutes")}`})}},[e,t,n,r])},ua=()=>{const{callbacks:e}=oe(),t=te(a=>a.state.typedFillDelay),r=te(a=>a.updateState),n=M.useMemo(()=>t||Fc,[t]),s=XV(n);return{fillDelay:n,onChange:M.useCallback(a=>{var o;r({typedFillDelay:a}),(o=e==null?void 0:e.onFillDelayChange)==null||o.call(e,a)},[r,e]),error:s,milliseconds:n.unit*n.value}},QV=()=>{const{onChange:e,fillDelay:t,error:r}=ua(),n=Me(),s=M.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=M.useCallback(o=>e({unit:o,value:t.value}),[e,t]);return{onInputChange:s,onUnitSelect:a,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:r,label:n("tradeIntervalTitle"),tooltip:n("tradeIntervalTooltip")}},dn=()=>{const{srcToken:e,typedInputAmount:t}=oe(),r=Me(),s=te(a=>a.state.acceptedSrcAmount)||t;return{amountWei:Y2(e==null?void 0:e.decimals,s),amountUI:s,error:j(s||0).isZero()?r("enterAmount"):void 0}},JV=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a,typedInputAmount:o}=oe(),i=Me();return M.useMemo(()=>{if(j(o||"0").isZero()||!s||j(n||"0").isZero())return;if(!e)return{type:Gt.MIN_CHUNKS,value:1,message:i("minChunksError",{minChunks:"1"})};const{isError:c}=km(e,t,r);if(c)return{type:Gt.MAX_CHUNKS,value:t,message:i("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=Em(o||"",n||"",a||0);if(l)return{type:Gt.MIN_TRADE_SIZE,value:u,message:i("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,o,n,a,i,s])},qr=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=oe(),s=te(g=>g.state.typedChunks),a=ua().fillDelay,o=te(g=>g.updateState),{amountWei:i,amountUI:c}=dn(),l=M.useMemo(()=>dm(a,c||"",t||"",n||0),[c,t,n,a]),u=M.useMemo(()=>um(l,r,s),[l,s,r]),d=M.useCallback(g=>o({typedChunks:g}),[o]),f=M.useMemo(()=>hm(i||"",u),[i,u]),h=Rn(e==null?void 0:e.decimals,f),y=M.useMemo(()=>t?j(h||"0").times(t||0).toString():"0",[h,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:h,amountPerTradeWei:f,amountPerTradeUsd:y,onChange:d,error:JV(u,l)}},eW=()=>{const{srcToken:e,dstToken:t}=oe(),r=Me(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=qr(),u=Ze({value:o}),d=Ze({value:a});return{error:i,maxTrades:c,totalTrades:s,amountPerTrade:u,amountPerTradeWei:l,onChange:n,label:r("tradesAmountTitle"),tooltip:r("totalTradesTooltip"),amountPerTradeUsd:d,fromToken:e,toToken:t}},tW=e=>{const{module:t,marketPrice:r}=oe(),n=Me();return M.useMemo(()=>{const s=xm(t,e),a=wm(e);if(r){if(s.isError)return{type:Gt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(n6(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Gt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(Nf(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},vh=()=>{const{module:e,callbacks:t}=oe(),r=te(c=>c.state.typedDuration),n=te(c=>c.updateState),s=qr().totalTrades,a=ua().fillDelay,o=M.useMemo(()=>lm(e,s,a,r),[s,a,r,e]),i=tW(o);return{duration:o,setDuration:M.useCallback(c=>{var l;n({typedDuration:c}),(l=t==null?void 0:t.onDurationChange)==null||l.call(t,c)},[n,t]),error:i}},rW=()=>{const{module:e}=oe(),t=Me(),{duration:r,setDuration:n,error:s}=vh(),a=M.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=M.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=M.useMemo(()=>e===ye.STOP_LOSS?t("stopLossDurationTooltip"):t("maxDurationTooltip"),[t,e]);return{duration:r,onChange:n,milliseconds:r.unit*r.value,onInputChange:a,onUnitSelect:o,label:t("expiry"),tooltip:i,error:s}},nW=()=>{const e=te(a=>a.state.isMarketOrder),{module:t}=oe(),r=Me(),n=M.useMemo(()=>{if(e&&t===ye.STOP_LOSS)return{text:r("triggerMarketPriceDisclaimer"),url:id}},[e,r,t]),s=M.useMemo(()=>{if(!(t!==ye.LIMIT&&t!==ye.TWAP))return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,t]);return n||s},Vu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=oe(),n=te(l=>l.updateState),s=te(l=>l.state.isInvertedTrade),a=te(l=>l.state.typedTriggerPrice),o=te(l=>l.state.typedLimitPrice),i=te(l=>l.state.isMarketOrder);return{onInvert:M.useCallback(()=>{a!==void 0&&n({typedTriggerPrice:j(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:j(1).div(o).toFixed()}),n({isInvertedTrade:!s})},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},l5=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=oe(),{isInverted:c}=Vu(),l=M.useMemo(()=>j((()=>{if(e!==void 0){const E=c?j(e).isZero()?j(0):j(1).div(e):j(e);return Bl(E.toFixed(),t)}if(n!==void 0&&j(r||"0").gt(0)&&!j(r||"0").isNaN()){const E=j(r||"0"),v=j(n||0).div(100);return E.plus(E.multipliedBy(v)).decimalPlaces(0).toFixed()}return j(r).gt(0)?r:""})()).decimalPlaces(0).toFixed(),[e,n,t,r,c]),u=M.useCallback(g=>{s(g),a(null)},[s,a]),d=M.useCallback(g=>{s(void 0),a(g)},[s,a]),f=M.useMemo(()=>{if(!r||j(r).isZero())return"";if(n!=null)return n;if(l){const g=j(r),v=j(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return j(v||"0").isZero()?"":v}return""},[l,r,n]),h=M.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const E=Ii(l,t);if(j(E||"0").isZero())return"";g=c?j(1).div(E).toFixed():E}return _f(g,6,10)},[e,t,l,c]),y=aa(c?o:i,h||"0");return{amountWei:j(l).isNaN()?"":l,amountUI:j(h).isNaN()?"":h,selectedPercentage:f,onChange:u,onPercentageChange:d,isInverted:c,usd:j(y).isNaN()?"":y}},sW=()=>{const{module:e}=oe();return M.useMemo(()=>e===ye.STOP_LOSS?em:tm,[e])},Eh=()=>{const{module:e}=oe(),t=te(r=>r.state.isMarketOrder);return M.useMemo(()=>e!==ye.STOP_LOSS&&e!==ye.TAKE_PROFIT||t?void 0:e===ye.STOP_LOSS?rm:nm,[e,t])},aW=(e="")=>{const{module:t,marketPrice:r,typedInputAmount:n}=oe(),s=Me();return M.useMemo(()=>{if(j(n||"0").isZero()||!r||t!==ye.STOP_LOSS&&t!==ye.TAKE_PROFIT)return;const a=mm(r||"",e||"",t);if(a!=null&&a.isError)return{type:Gt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:s("StopLossTriggerPriceError")||""};const o=bm(r||"",e||"",t);if(o!=null&&o.isError)return{type:Gt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:s("TakeProfitTriggerPriceError")||""};if(!e||j(e||0).isZero())return{type:Gt.EMPTY_TRIGGER_PRICE,value:e,message:s("emptyTriggerPrice")||""}},[r,e,t,s,n])},oW=e=>{const{srcToken:t,dstToken:r,module:n,dstUsd1Token:s}=oe(),a=qr().amountPerTradeWei,o=te(l=>l.state.isMarketOrder),i=M.useMemo(()=>cm(n,a,e,(t==null?void 0:t.decimals)||0),[e,a,o,t==null?void 0:t.decimals,n]),c=Rn((r==null?void 0:r.decimals)||0,i);return{amountWei:i,amountUI:c,usd:aa(c,s)}},da=()=>{const{dstToken:e,marketPrice:t,module:r,callbacks:n}=oe(),s=te(y=>y.updateState),a=sW(),o=te(y=>y.state.triggerPricePercent),i=o===void 0?a:o,c=r===ye.STOP_LOSS||r===ye.TAKE_PROFIT,l=l5({typedValue:te(y=>y.state.typedTriggerPrice),percentage:i,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:c?t:void 0,setValue:M.useCallback(y=>{var g;s({typedTriggerPrice:y}),(g=n==null?void 0:n.onTriggerPriceChange)==null||g.call(n,y||"")},[s,n]),setPercentage:M.useCallback(y=>{var g;s({triggerPricePercent:y}),(g=n==null?void 0:n.onTriggerPricePercentChange)==null||g.call(n,y||"")},[s,n])}),u=aW(l.amountWei),{amountWei:d,amountUI:f,usd:h}=oW(l.amountWei);return M.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:f,pricePerChunkUsd:h}),[l,u,d,f,h])},iW=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=oe(),n=Me(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l,pricePerChunkUI:u,pricePerChunkUsd:d}=da(),f=te(C=>C.state.isMarketOrder),h=te(C=>C.updateState),{isInverted:y,onInvert:g,fromToken:E,toToken:v}=Vu(),w=M.useCallback(()=>{h({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[h]),A=e!==ye.STOP_LOSS&&e!==ye.TAKE_PROFIT;return{price:s,amountPerChunk:u,amountPerChunkUsd:d,error:l,label:n("stopLossLabel"),tooltip:e===ye.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!f,onReset:w,usd:i,fromToken:E,toToken:v,prefix:"",isLoading:r||!t,isInverted:y,hide:A,onInvert:g,totalTrades:qr().totalTrades}},cW=e=>{const{module:t,marketPrice:r,typedInputAmount:n}=oe(),s=Me(),{amountWei:a}=da(),o=te(i=>i.state.isMarketOrder);return M.useMemo(()=>{if(j(n||"0").isZero()||!a||!r)return;const i=ym(a,e,o,t),c=gm(a,e,o,t);if(i!=null&&i.isError)return{type:Gt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Gt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:c.value};if(e&&j(e||0).isZero())return{type:Gt.MISSING_LIMIT_PRICE,message:s("emptyLimitPrice")||"",value:e||""}},[e,s,a,t,o,n,r])},xc=()=>{const{dstToken:e,marketPrice:t,callbacks:r}=oe(),n=te(l=>l.updateState),s=Eh(),a=te(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=l5({typedValue:te(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:t,setValue:M.useCallback(l=>{var u;n({typedLimitPrice:l}),(u=r==null?void 0:r.onLimitPriceChange)==null||u.call(r,l||"")},[n,r]),setPercentage:M.useCallback(l=>{var u;n({limitPricePercent:l}),(u=r==null?void 0:r.onLimitPricePercentChange)==null||u.call(r,l||"")},[n,r])}),c=cW(i.amountWei);return M.useMemo(()=>({...i,error:c}),[i,c])},lW=()=>{const{module:e}=oe(),t=te(i=>i.updateState),r=te(i=>i.state.isMarketOrder),n=Eh(),s=te(i=>i.state.triggerPricePercent)||0,a=e===ye.LIMIT,o=M.useCallback(()=>{!r&&e===ye.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},u5=()=>{const{module:e,marketPrice:t}=oe(),r=xc().amountWei,n=da().amountWei,s=te(a=>a.state.isMarketOrder);return e===ye.LIMIT||!s?r||"":e===ye.STOP_LOSS||e===ye.TAKE_PROFIT?n||"":t||""},wc=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=u5(),s=dn().amountWei,a=M.useMemo(()=>om(s||"",n,(e==null?void 0:e.decimals)||0),[s,n,e==null?void 0:e.decimals]),o=Rn(t==null?void 0:t.decimals,a);return{amountWei:a,amountUI:o,usd:aa(o,r)}},Wu=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=u5(),s=qr().amountPerTradeWei,a=te(c=>c.state.isMarketOrder),o=M.useMemo(()=>im(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Rn(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:aa(i,r)}},uW=()=>{const{typedInputAmount:e,marketPriceLoading:t,dstToken:r}=oe(),{amountUI:n,usd:s}=wc(),o=SG()?e:n;return{value:Z2(o,7),valueWei:Y2(r==null?void 0:r.decimals,o),isLoading:t,usd:s}},dW=()=>{const{module:e,marketPriceLoading:t}=oe(),r=Me(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=xc(),{amountUI:l,usd:u}=Wu(),d=te(D=>D.updateState),f=Eh(),{isLimitPrice:h,toggleLimitPrice:y}=lW(),{isInverted:g,onInvert:E,fromToken:v,toToken:w}=Vu(),A=M.useCallback(()=>{d({typedLimitPrice:void 0}),d({limitPricePercent:f})},[d,e,f]),C=M.useMemo(()=>e===ye.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,amountPerChunk:l,amountPerChunkUsd:u,error:c,label:r("limitPrice"),tooltip:C,onChange:s,onPercentageChange:a,onReset:A,usd:o,fromToken:v,tradesAmount:qr().totalTrades,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:h,toggleLimitPrice:y,onInvert:E}};function d5(){const{marketPrice:e,marketPriceLoading:t,typedInputAmount:r,srcUsd1Token:n,srcBalance:s,chainId:a}=oe(),o=te(g=>g.state.swapExecution.status),i=Me(),{error:c}=da(),{error:l}=xc(),{error:u}=qr(),{error:d}=ua(),{error:f}=vh(),h=dn().amountWei,y=M.useMemo(()=>{if(s&&j(h).gt(s))return{type:Gt.INSUFFICIENT_BALANCE,message:i("insufficientFunds"),value:s||""}},[s,h,i,a]);return M.useMemo(()=>Am({marketPrice:e,typedInputAmount:r,srcUsd1Token:n,marketPriceLoading:t,triggerPriceError:c,limitPriceError:l,tradesError:u,fillDelayError:d,durationError:f,balanceError:y}),[e,t,r,c,l,u,d,f,y,o,n])}const pW=()=>{const e=te(n=>n.state.isMarketOrder),t=te(n=>n.updateState),r=M.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},kh=()=>{const e=te(r=>r.state.currentTime),t=vh().duration;return M.useMemo(()=>pm(e,t),[e,t])},fW=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=oe(),r=dn().amountUI,n=wc().amountUI,s=aa(r,e),a=aa(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},hW=()=>{const{fees:e,dstUsd1Token:t}=oe(),{amountUI:r}=wc(),n=M.useMemo(()=>!e||!r?"":j(r).multipliedBy(e).dividedBy(100).toFixed(),[r,e]);return{amount:n,percent:e,usd:aa(n,t)}},p5=()=>{const{srcToken:e,dstToken:t,account:r,chainId:n,slippage:s,config:a,module:o}=oe(),{amountWei:i}=dn(),{amountWei:c}=xc(),{amountPerTradeWei:l,totalTrades:u}=qr(),d=kh(),{amountWei:f}=Wu(),{pricePerChunkWei:h}=da(),{milliseconds:y}=ua();return M.useMemo(()=>{var g;return{srcToken:e,dstToken:t,limitPrice:c,deadline:d,srcAmount:i,srcAmountPerTrade:l,totalTrades:u,minDestAmountPerTrade:f,tradeInterval:y,triggerPricePerTrade:h,maker:r,rePermitData:Sm({chainId:n,srcToken:Is((e==null?void 0:e.address)||"")?((g=Bs(n))==null?void 0:g.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:i,deadlineMillis:d,fillDelayMillis:!u||u===1?0:y,slippage:s*100,account:r,srcAmountPerTrade:l,dstMinAmountPerTrade:f,triggerAmountPerTrade:h,config:a,module:o})}},[e,t,c,d,i,l,u,f,h,r,y,s,n,a,o])},f5=()=>{const{srcToken:e,dstToken:t,account:r}=oe(),n=Me(),{amountUI:s,usd:a}=Wu(),{amountPerTradeUI:o,amountPerTradeUsd:i,totalTrades:c}=qr(),{amountUI:l,usd:u}=da(),d=kh(),{amountUI:f,usd:h}=xc(),{amount:y,percent:g,usd:E}=hW(),{milliseconds:v}=ua(),{amountUI:w}=wc(),{srcAmountUsd:A,dstAmountUsd:C}=fW(),D=dn().amountUI,z=te(x=>x.state.isMarketOrder),T=X2({srcToken:e,dstToken:t,account:r,limitPrice:z?void 0:f,limitPriceUsd:z?void 0:h,deadline:d,tradeInterval:v,srcAmount:D,totalTrades:c,srcAmountPerTrade:o,srcAmountPerTradeUsd:i,minDestAmountPerTrade:s,minDestAmountPerTradeUsd:a,triggerPrice:l,triggerPriceUsd:u,srcUsd:A,dstUsd:C,dstAmount:w}),m=Ze({value:y}),b=Ze({value:E});return M.useMemo(()=>({...T,fees:{label:n("fees",{value:`${g}%`}),amount:m,usd:b||"",percentage:g}}),[T,m,b,g])},h5=M.createContext({}),mW=({children:e,...t})=>B.jsx(h5.Provider,{value:t,children:e}),bW=()=>M.useContext(h5),m5=()=>{var s,a;const e=Me(),{wrapTxHash:t,srcToken:r}=te(o=>o.state.swapExecution),n=(a=(s=oc())==null?void 0:s.wToken)==null?void 0:a.symbol;return t?B.jsx("p",{className:"twap-error-wrap-msg",children:e("wrapMsg",{symbol:(r==null?void 0:r.symbol)||"",wSymbol:n||""})}):null},b5=()=>{const e=Me(),t=te(n=>n.state.swapExecution.status),r=ex();return t===ht.SUCCESS?e("createOrderActionSuccess",{name:r}):e("createOrderAction",{name:r})},yW=()=>{const e=te(y=>y.state.swapExecution.srcToken),t=Me(),{step:r,wrapTxHash:n,approveTxHash:s}=te(y=>y.state.swapExecution),a=oc(),o=V0(n),i=V0(n),c=V0(s),l=te(y=>y.state.swapExecution.status),d=Is((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",f=a==null?void 0:a.wToken.symbol,h=b5();return M.useMemo(()=>r===Ds.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ds.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:h,footerText:l===ht.LOADING?t("proceedInWallet"):void 0},[r,c,d,h,t,o,i,f,l])},gW=({error:e})=>B.jsxs("div",{className:"twap-error",children:[B.jsx("h2",{className:"twap-error-title",children:"Transaction failed"}),(e==null?void 0:e.code)&&B.jsxs("p",{className:"twap-error-code",children:["Error code: ",e==null?void 0:e.code]}),B.jsx(m5,{})]});function xW({error:e}){const{components:t}=oe(),r=Me(),n=te(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=B.jsx(Xn.Failed,{error:B.jsx(gW,{error:e}),footerLink:id,footerText:r("viewOnExplorer")});return s?B.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const wW=()=>{const{components:e}=oe(),t=te(u=>u.state.swapExecution.srcToken),r=te(u=>u.state.swapExecution.dstToken),{reviewDetails:n}=bW(),s=Me(),a=te(u=>{var d;return!!((d=u.state.swapExecution)!=null&&d.status)}),o=f5(),i=e.USD,c=e.SubmitOrderMainView,l=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:i?B.jsx(i,{value:o.srcUsd,isLoading:!1}):`$${o.srcUsd}`,outUsd:i?B.jsx(i,{value:o.dstUsd,isLoading:!1}):`$${o.dstUsd}`}),!a&&B.jsxs("div",{className:"twap-create-order-bottom",children:[B.jsx(Ee.Container,{children:B.jsxs("div",{className:"twap-create-order-details",children:[B.jsx(Ee.Deadline,{deadline:o.deadline.value,label:o.deadline.label,tooltip:o.deadline.tooltip||""}),B.jsx(Ee.Price,{srcToken:t,price:o.triggerPrice.value,dstToken:r,label:o.triggerPrice.label,tooltip:o.triggerPrice.tooltip,usd:o.triggerPrice.usd}),B.jsx(Ee.Price,{srcToken:t,price:o.limitPrice.value,dstToken:r,label:o.limitPrice.label,usd:o.limitPrice.usd,tooltip:o.limitPrice.tooltip}),B.jsx(Ee.MinDestAmount,{dstToken:r,dstMinAmountOut:o.minDestAmountPerTrade.value,label:o.minDestAmountPerTrade.label,tooltip:o.minDestAmountPerTrade.tooltip||"",usd:o.minDestAmountPerTrade.usd}),B.jsx(Ee.TradeSize,{tradeSize:o.sizePerTrade.value,trades:o.totalTrades.value,srcToken:t,label:o.sizePerTrade.label,tooltip:o.sizePerTrade.tooltip}),B.jsx(Ee.TradesAmount,{trades:o.totalTrades.value,label:o.totalTrades.label,tooltip:o.totalTrades.tooltip}),B.jsx(Ee.TradeInterval,{chunks:o.totalTrades.value,fillDelayMillis:o.tradeInterval.value,label:o.tradeInterval.label,tooltip:o.tradeInterval.tooltip}),B.jsx(Ee.Recipient,{}),o.fees.amount&&B.jsx(Ee.Fees,{fees:o.fees.amount,label:o.fees.label,usd:o.fees.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return c?B.jsx(c,{children:l}):l},vW=e=>{const{status:t,stepIndex:r,totalSteps:n,parsedError:s}=te(w=>w.state.swapExecution),{components:a}=oe(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=oe(),f=dn().amountUI,h=wc().amountUI,y=Ze({value:f,decimalScale:2}),g=Ze({value:h,decimalScale:2}),E=M.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=M.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return B.jsx(mW,{...e,children:B.jsx(Xn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:yW(),currentStepIndex:r,inToken:E,outToken:v,components:{SrcTokenLogo:l&&B.jsx(l,{token:u}),DstTokenLogo:l&&B.jsx(l,{token:d}),Failed:B.jsx(xW,{error:s}),Success:B.jsx(EW,{}),Main:B.jsx(wW,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},EW=()=>{const e=b5(),{components:t}=oe(),r=te(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Success,{title:e}),B.jsx(m5,{})]});return n?B.jsx(n,{newOrderId:r,children:s}):s},kW=()=>{const{supportedChains:e}=oe();return M.useMemo(()=>e,[e])},CW=()=>{const{config:e}=oe();return M.useMemo(()=>({spender:e.repermit}),[e])},TW=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=oe(),o=(c=oc())==null?void 0:c.wToken,i=q0();return Zr({mutationFn:async({onHash:l,srcAmountWei:u})=>{var h,y;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!o)throw new Error("tokenAddress is not defined");let d;dt.onWrapRequest(),(h=s==null?void 0:s.onWrapRequest)==null||h.call(s),r!=null&&r.wrap?d=await r.wrap(u):d=await t.writeContract({abi:Mh,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const f=await i(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to wrap token");return dt.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:f.transactionHash,explorerUrl:Bi(f.transactionHash,a),amount:Ii(u,o.decimals)}),n==null||n(),f},onError:l=>{throw dt.onWrapError(l),l}})},AW=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=oe(),s=p5().rePermitData,{refetch:a}=K0();return Zr({mutationFn:async()=>{var y,g,E,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;dt.onSignOrderRequest(o),(y=n==null?void 0:n.onSignOrderRequest)==null||y.call(n),console.log({domain:i,types:c,primaryType:l,message:o,account:e}),console.log("Using domain:",i),console.log("Using types:",c),console.log("Order data to sign:",JSON.stringify(o,null,2)),console.log(`Account address: ${e}`);let u;try{u=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(w){throw(g=n==null?void 0:n.onSignOrderError)==null||g.call(n,w),dt.onSignOrderError(w),w}dt.onSignOrderSuccess(u),(E=n==null?void 0:n.onSignOrderSuccess)==null||E.call(n,u);const d=jT(u),f={v:q(d.v||0),r:d.r,s:d.s},h=await Fm(o,f);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,h),await a(),h}})},y5=()=>{const{account:e,publicClient:t,config:r}=oe();return Zr({mutationFn:async({tokenAddress:n,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!r)throw new Error("missing config");const a=await t.readContract({address:n,abi:Ty,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=j(a||"0").lt(j(s).toString());return{allowance:a,approvalRequired:o}}})},SW=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=oe(),o=q0(),{mutateAsync:i}=y5();return Zr({onError:c=>{dt.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:u})=>{var y,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing config");(y=a==null?void 0:a.onApproveRequest)==null||y.call(a),dt.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Vs}):d=await t.writeContract({abi:Ty,functionName:"approve",account:e,address:c.address,args:[n.repermit,Vs],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const f=await o(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let h=!1;for(let E=0;E<3;E++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){h=!0;break}E<2&&await new Promise(w=>setTimeout(w,3e3))}if(!h)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return dt.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:Bi(f.transactionHash,s),token:c,amount:Ii(u,c.decimals)}),f}})},PW=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=oe(),o=da(),i=dn().amountWei,c=qr().amountPerTradeWei,l=kh(),u=qr().totalTrades,d=ua().fillDelay,f=Wu().amountWei,h=te(y=>y.state.isMarketOrder);return Zr({mutationFn:async()=>{dt.onRequestOrder({account:e,chainId:t,module:s,srcToken:r,dstToken:n,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:d.unit*d.value,minDstAmountOutPerTrade:f,slippage:a,isMarketOrder:h||!1,chunksAmount:u})}})};function IW(e){const t=e.message,r=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:r?Number(r[1]):0}}const BW=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=oe(),s=SW().mutateAsync,a=TW().mutateAsync,o=AW().mutateAsync,{mutateAsync:i}=y5(),c=te(d=>d.updateSwapExecution),{amountWei:l}=dn(),u=PW().mutate;return Zr({mutationFn:async()=>{var f,h;const d=Is((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!r)throw new Error("missing chainId");const y=r6(e,r);c({allowanceLoading:!0,wrapTxHash:void 0,approveTxHash:void 0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let E=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:E,allowanceLoading:!1,status:ht.LOADING}),u(),d&&(c({step:Ds.WRAP}),await a({onHash:A=>c({wrapTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),g&&(c({step:Ds.APPROVE}),await s({token:y,onHash:A=>c({approveTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),c({step:Ds.CREATE});const w=await o();return c({status:ht.SUCCESS,orderId:w.id}),w}catch(y){if(Mf(y))(f=n==null?void 0:n.onSubmitOrderRejected)==null||f.call(n),c({step:void 0,status:void 0,stepIndex:void 0,error:y});else{const g=IW(y);(h=n==null?void 0:n.onSubmitOrderFailed)==null||h.call(n,g),c({status:ht.FAILED,parsedError:g,error:y})}throw y}}})},FW=()=>{const{marketPrice:e,srcToken:t,dstToken:r,resetTypedInputAmount:n}=oe(),s=BW(),a=te(g=>g.updateState),{amountUI:o}=dn(),i=te(g=>g.resetState),c=te(g=>g.state.swapExecution),l=te(g=>g.updateSwapExecution),u=ex(),d=M.useCallback(()=>{(c==null?void 0:c.status)===ht.SUCCESS&&(n(),i())},[c==null?void 0:c.status,i,n]),f=M.useCallback(()=>{(c==null?void 0:c.status)!==ht.LOADING&&(a({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0}),l({srcToken:t,dstToken:r,error:void 0,parsedError:void 0,status:void 0,orderId:void 0}))},[a,t,r]),h=Zr({mutationFn:async()=>(a({acceptedSrcAmount:o,acceptedMarketPrice:e}),await s.mutateAsync())}),y=M.useCallback(()=>h.mutateAsync(),[h]);return M.useMemo(()=>({reset:i,onCloseModal:d,onOpenModal:f,onSubmit:y,orderTitle:u,...c,isLoading:(c==null?void 0:c.status)===ht.LOADING,isSuccess:(c==null?void 0:c.status)===ht.SUCCESS,isFailed:(c==null?void 0:c.status)===ht.FAILED}),[i,d,y,c,u])},UW=()=>{const e=Me(),{marketPrice:t,srcToken:r,dstToken:n,marketPriceLoading:s,srcBalance:a,srcUsd1Token:o,noLiquidity:i,typedInputAmount:c}=oe(),l=s||j(o||"0").isZero()||a===void 0||j(t||"0").isZero(),u=!!(r&&n&&c&&l),d=d5(),f=M.useMemo(()=>i?e("noLiquidity"):j(c||"0").isZero()?e("enterAmount"):e("placeOrder"),[d,e,c,i]),h=!!(d||i||u||j(c||"0").isZero()||!r||!n);return M.useMemo(()=>({disabled:h,text:f,loading:u}),[h,f,u])},OW=({children:e,container:t})=>{const[r,n]=M.useState(!1),s=M.useRef(null);if(M.useLayoutEffect(()=>(n(!0),s.current=t??document.body,()=>{s.current=null}),[]),typeof document>"u"||!r)return null;const a=s.current;return a?As.createPortal(e,a):null};Im(Iw.version);const DW={SubmitOrderPanel:vW,Orders:ZV,Portal:OW};R.CRASH_ERROR_MESSAGE=rw,R.Components=DW,R.Configs=Dt,R.DEFAULT_DURATION_OPTIONS=JL,R.DEFAULT_FILL_DELAY=Fc,R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE=rm,R.DEFAULT_STOP_LOSS_PERCENTAGE=em,R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE=nm,R.DEFAULT_TAKE_PROFIT_PERCENTAGE=tm,R.DISCLAIMER_URL=tw,R.EIP712_TYPES=Jh,R.ERC20_ABI=H5,R.EXCLUSIVITY_OVERRIDE_BPS=Z5,R.FEES=Y5,R.IWETH_ABI=Mh,R.InputErrors=Gt,R.LEGACY_EXCHANGES_MAP=Xh,R.MAX_ORDER_DURATION_MILLIS=Ca,R.MIN_CHUNKS=K5,R.MIN_FILL_DELAY_MILLIS=Ic,R.MIN_FILL_DELAY_MINUTES=qh,R.MIN_ORDER_DURATION_MILLIS=ad,R.Module=ye,R.ORBS_LOGO=Q5,R.ORBS_LOGO_FALLBACK=J5,R.ORBS_SLTP_FAQ_URL=X5,R.ORBS_TWAP_FAQ_URL=id,R.ORBS_WEBSITE_URL=ew,R.OrderStatus=ct,R.OrderType=ze,R.PRICE_PROTECTION_SETTINGS=ez,R.Partners=zh,R.QUERY_PARAMS=Ta,R.REPERMIT_ABI=Nh,R.REPERMIT_PRIMARY_TYPE=Qh,R.SUGGEST_CHUNK_VALUE=q5,R.SpotProvider=XL,R.Steps=Ds,R.SwapStatus=ht,R.THE_GRAPH_ORDERS_API=Kh,R.TWAP_ABI=Lh,R.TimeUnit=$t,R.analytics=dt,R.buildRePermitOrderData=Sm,R.buildV2Order=pd,R.copy=WT,R.ensureWrappedToken=r6,R.eqIgnoreCase=Ps,R.fillDelayText=t6,R.formatDecimals=_f,R.getAccountOrders=_m,R.getApiEndpoint=sd,R.getChunks=um,R.getConfig=ld,R.getDeadline=pm,R.getDestTokenAmount=om,R.getDestTokenMinAmountPerChunk=im,R.getDuration=lm,R.getErrors=Am,R.getEstimatedDelayBetweenChunksMillis=fm,R.getExplorerUrl=Bi,R.getMaxChunksError=km,R.getMaxFillDelayError=iw,R.getMaxOrderDurationError=xm,R.getMaxPossibleChunks=dm,R.getMinChunkSizeUsd=Tm,R.getMinFillDelayError=vm,R.getMinNativeBalance=KT,R.getMinOrderDurationError=wm,R.getMinTradeSizeError=Em,R.getNetwork=Bs,R.getOrderExcecutionRate=Gh,R.getOrderFillDelayMillis=td,R.getOrderLimitPriceRate=jh,R.getOrderType=YT,R.getPartnerChains=$h,R.getPartnerIdentifier=_t,R.getPartners=Cm,R.getSrcTokenChunkAmount=hm,R.getStopLossLimitPriceError=ym,R.getStopLossPriceError=mm,R.getTakeProfitLimitPriceError=gm,R.getTakeProfitPriceError=bm,R.getTriggerPricePerChunk=cm,R.getTriggerPricePerTrade=Vh,R.isNativeAddress=Is,R.isTxRejected=Mf,R.makeElipsisAddress=Df,R.maxUint256=Bc,R.millisToDays=n6,R.millisToMinutes=Nf,R.nativeTokenAddresses=Zh,R.networks=Ft,R.parseError=qT,R.removeCommas=VT,R.setApiMode=W5,R.setUIVersion=Im,R.shouldUnwrapOnly=zf,R.shouldWrapOnly=Lf,R.submitOrder=Fm,R.toAmountUi=Ii,R.toAmountWei=Bl,R.useAddresses=CW,R.useDisclaimerPanel=nW,R.useDstTokenPanel=uW,R.useDurationPanel=rW,R.useFillDelayPanel=QV,R.useFormatNumber=Ze,R.useInputErrors=d5,R.useInvertTradePanel=Vu,R.useLimitPricePanel=dW,R.useOrder=p5,R.useOrderHistoryPanel=qG,R.useOrderInfo=f5,R.usePartnerChains=kW,R.useSubmitOrderButton=UW,R.useSubmitOrderPanel=FW,R.useTogglePricePanel=pW,R.useTradesPanel=eW,R.useTranslations=Me,R.useTriggerPricePanel=iW,R.zeroAddress=Yh,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
126
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function CG(e){e=kG(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=G0);var a=e.onBlur;a===void 0&&(a=G0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,h=e.onValueChange,y=cG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Fu(e),E=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return K2(P,e)},A=function(P,O){return vG(P,O,e)},C=ho(d)?u:d,D=f??wG(C,l,t);ho(d)?ho(u)||(D=D||typeof u=="number"):D=D||typeof d=="number";var z=function(P){return $2(P)?P:(typeof P=="number"&&(P=W2(P)),D&&typeof i=="number"?q2(P,i,!!c):P)},T=yG(z(d),z(u),!!D,w,A,h),m=T[0],b=m.numAsString,x=m.formattedValue,S=T[1],I=function(P){var O=P.target,U=P.key,L=O.selectionStart,H=O.selectionEnd,G=O.value;if(G===void 0&&(G=""),(U==="Backspace"||U==="Delete")&&H<l.length){P.preventDefault();return}if(L!==H){s(P);return}U==="Backspace"&&G[0]==="-"&&L===l.length+1&&r&&ac(O,1),i&&c&&(U==="Backspace"&&G[L-1]===E?(ac(O,L-1),P.preventDefault()):U==="Delete"&&G[L]===E&&P.preventDefault()),v!=null&&v.includes(U)&&G[L]===E&&ac(O,L+1);var Q=o===!0?",":o;U==="Backspace"&&G[L-1]===Q&&ac(O,L-1),U==="Delete"&&G[L]===Q&&ac(O,L+1),s(P)},F=function(P){var O=b;if(O.match(/\d/g)||(O=""),n||(O=hG(O)),c&&i&&(O=q2(O,i,c)),O!==b){var U=K2(O,e);S({formattedValue:U,value:O,floatValue:parseFloat(O)},{event:P,source:$0.event})}a(P)},_=function(P){return P===E?!0:H2(P)},k=function(P){var O=P.currentValue,U=P.lastValue,L=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,Q=O[H],pe=L[G],me=mG(U,O),ie=me.to,de=function(Be){return A(Be).indexOf(".")+l.length};return d===0&&c&&i&&O[ie.start]===E&&de(O)<H&&de(L)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(Q)&&pe===E?!0:Q===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:_,isCharacterSame:k,onValueChange:S,format:w,removeFormatting:A,getCaretBoundary:function(P){return EG(P,e)},onKeyDown:I,onBlur:F})}const Y2=(e,t)=>M.useMemo(()=>Bl(t,e),[e,t]),Rn=(e,t)=>M.useMemo(()=>Ii(t,e),[e,t]),oc=()=>{const{chainId:e}=oe();return M.useMemo(()=>Bs(e),[e])},V0=e=>{const t=oc();return M.useMemo(()=>{if(!(!e||!t))return Bi(e,t.id)},[e,t])},aa=(e,t)=>M.useMemo(()=>!e||!t||j(e||"0").isZero()||j(t||"0").isZero()?"":j(e||"0").times(t).toFixed(),[e,t]),TG=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return M.useMemo(()=>Lf(e,t,r),[e,t,r])},AG=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return M.useMemo(()=>zf(e,t,r),[e,t,r])},SG=()=>{const e=TG(),t=AG();return e||t},W0=e=>{const{overrides:t}=oe();return M.useMemo(()=>t!=null&&t.dateFormat?t.dateFormat(e||0):ee(e).format("DD/MM/YYYY HH:mm"),[e,t==null?void 0:t.dateFormat])};function PG(){const{callbacks:e}=oe();return M.useCallback(async t=>{var r;try{await navigator.clipboard.writeText(t),(r=e==null?void 0:e.onCopy)==null||r.call(e)}catch(n){console.error("Copy failed:",n)}},[e==null?void 0:e.onCopy])}const Z2=(e,t)=>M.useMemo(()=>_f(e==null?void 0:e.toString(),t),[e,t]),Ze=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=Z2(e,t),{overrides:a}=oe(),o=a==null?void 0:a.numberFormat,i=CG({allowLeadingZeros:!0,thousandSeparator:",",displayType:"text",value:s||"",decimalScale:18,prefix:r,suffix:n});return o?o(e||""):(c=i.value)==null?void 0:c.toString()},IG={expirationTooltip:"This is the date and time marking the end of the period which you have selected for your order to be executed.",tradeSizeTooltip:"The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.",totalTradesTooltip:"The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.",minDstAmountTooltip:" This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",limitPriceTooltip:"Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.",maxDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.",tradeIntervalTooltip:"The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.",triggerPriceTooltip:"The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.",placeOrder:"Place order",enterAmount:"Enter an amount",emptyLimitPrice:"Limit price is required",insufficientFunds:"Insufficient Balance",tradeIntervalLabel:"Trade interval",expirationLabel:"Expiration",limitPrice:"Limit Price",finalExcecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To (estimated)",Open:"Open",Completed:"Completed",Expired:"Expired",Canceled:"Canceled",cancelOrder:"Cancel Order",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is {minChunks}",minTradeSizeError:"Min. trade size is ${minTradeSize}",allOrders:"All",minFillDelayError:"Min. trade interval is {fillDelay}",maxFillDelayError:"Max. trade interval is {fillDelay}",recipient:"Recipient",marketOrderWarning:"Each individual trade in this order will be filled at the current market price at the time of execution.",limitPriceMessage:"Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.",limit:"Limit",maxDurationError:"Max. expiry is {duration}",minDurationError:"Min. expiry is {duration}",expiry:"Expiry",individualTradeSize:"Individual trade size",numberOfTrades:"No. of trades",averageExecutionPrice:"Avg. execution price",twapMarket:"TWAP-market",twapLimit:"TWAP-limit",stopLoss:"Stop-loss",stopLossMarket:"Stop-loss market",stopLossLimit:"Stop-loss limit",takeProfit:"Take-profit",minReceived:"Min. received",noOrders:"No {status} Orders",noLiquidity:"No liquidity for this pair",excecutionSummary:"Execution summary",orderInfo:"Order info",wrapAction:"Wrap {symbol}",approveAction:"Approve {symbol}",createOrderAction:"Create {name} order",amountReceived:"Amount received",createdAt:"Created at",amountOut:"Amount out",status:"Status",progress:"Progress",minutes:"minutes",days:"days",tradeIntervalTitle:"Every",tradesAmountTitle:"Over",stopLossTooltip:"The trigger price at which your stop-loss order will be activated.",takeProfitTooltip:"The trigger price at which your take-profit order will be activated.",stopLossLabel:"Trigger Price",StopLossTriggerPriceError:"Trigger price must be less than market price",TakeProfitTriggerPriceError:"Trigger price must be greater than market price",triggerLimitPriceError:"Limit price must be less than trigger price",triggerPrice:"Trigger Price",tradePrice:"Trade Price",triggerMarketPriceDisclaimer:" In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.",stopLossLimitPriceTooltip:"The stop loss order will execute at the specified limit price or better, once the stop price is triggered.",stopLossDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.",emptyTriggerPrice:"Trigger price is required",id:"ID",fees:"Fees {value}",version:"Version",maxOrderSizeError:"Max. trade size is {maxOrderSize} USD",viewOnExplorer:"View on explorer",proceedInWallet:"Proceed in wallet",wrapMsg:"Note: {symbol} was wrapped to {wSymbol}",createOrderActionSuccess:"{name} order placed"};function BG(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Me=()=>{const e=oe();return M.useCallback((r,n)=>{var o,i;const s=(o=e.getTranslation)==null?void 0:o.call(e,r,n);if(s&&s!==r)return s;const a=((i=e.translations)==null?void 0:i[r])||IG[r];return BG(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},Uu=({value:e})=>{const t=Ze({value:e,decimalScale:2});return t?B.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},FG=({deadline:e,label:t,tooltip:r})=>{const n=W0(e);return B.jsx(Ar,{title:t,tooltip:r,children:n})},UG=({price:e,dstToken:t,label:r,tooltip:n,usd:s,srcToken:a})=>{const o=Ze({value:e});return j(e||0).isZero()?null:B.jsx(Ar,{title:r,tooltip:n,children:B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["1 ",a==null?void 0:a.symbol," = ",`${o||"-"} ${t==null?void 0:t.symbol}`,B.jsx(Uu,{value:s})]})})},OG=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:B.jsx(Ar,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),DG=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=Ze({value:t});return j(t||0).isZero()?null:B.jsxs(Ar,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,B.jsx(Uu,{value:s})]})},_G=({trades:e,label:t,tooltip:r})=>e===1?null:B.jsx(Ar,{title:t,tooltip:r,children:e}),MG=()=>{var s;const e=Me(),{account:t}=oe(),r=(s=oc())==null?void 0:s.explorer,n=Df(t);return B.jsx(Ar,{title:e("recipient")||"",children:r?B.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},NG=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=M.useMemo(()=>t6(e),[e]);return t===1?null:B.jsx(Ar,{title:r,tooltip:n,children:s})},Ar=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=oe(),i=o.Tooltip;return B.jsxs("div",{className:`${n} twap-order-details__detail-row`,onClick:s,style:a,children:[B.jsxs("div",{className:"twap-order-details__detail-row-label",children:[B.jsx("p",{className:"twap-order-details__detail-row-label-value",children:e}),t&&i&&B.jsx(i,{tooltipText:t})]}),B.jsx("div",{className:"twap-order-details__detail-row-value",children:r})]})},LG=({id:e})=>{const{components:t}=oe(),r=t==null?void 0:t.Tooltip,n=PG();return e.startsWith("0x")?B.jsx(Ar,{title:"ID",onClick:()=>n(e),style:{cursor:"pointer"},children:r&&B.jsx(r,{tooltipText:e,children:B.jsxs("div",{className:"twap-order-details__detail-row-value-id",children:[B.jsx("p",{children:Df(e)}),B.jsx(iz.AiOutlineCopy,{})]})})}):B.jsx(Ar,{title:"ID",children:e})},zG=({version:e})=>B.jsx(Ar,{title:"Version",children:e});function Ee({children:e,className:t=""}){return B.jsx("div",{className:`${t} twap-order-details`,children:e})}const RG=({children:e})=>e,HG=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=Ze({value:e});return B.jsxs(Ar,{title:t,children:[`${e?s:"-"} ${n}`,B.jsx(Uu,{value:r})]})};Ee.Deadline=FG,Ee.Fees=HG,Ee.TradeSize=OG,Ee.MinDestAmount=DG,Ee.TradesAmount=_G,Ee.Recipient=MG,Ee.TradeInterval=NG,Ee.DetailRow=Ar,Ee.Price=UG,Ee.OrderID=LG,Ee.Container=RG,Ee.OrderVersion=zG,Ee.USD=Uu;const q0=()=>{const{publicClient:e}=oe();return Zr({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const r=10;let n=0,s=1e3;for(;n<r;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(n++,n>=r)throw new Error(`Failed after ${r} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},X2=e=>{const t=Me(),r=Ze({value:e.srcAmount}),n=Ze({value:e.limitPrice}),s=Ze({value:e.limitPriceUsd}),a=Ze({value:e.srcAmountPerTrade}),o=Ze({value:e.srcAmountPerTradeUsd,decimalScale:2}),i=Ze({value:e.minDestAmountPerTrade}),c=Ze({value:e.minDestAmountPerTradeUsd,decimalScale:2}),l=Ze({value:e.triggerPrice}),u=Ze({value:e.triggerPriceUsd,decimalScale:2}),d=Ze({value:e.srcUsd,decimalScale:2}),f=Ze({value:e.dstUsd,decimalScale:2}),h=Ze({value:e.dstAmount});return M.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,srcUsd:d||"",dstUsd:f||"",limitPrice:{label:t("limitPrice"),tooltip:t("limitPriceTooltip"),value:n||"",usd:s||""},deadline:{tooltip:t("expirationTooltip"),label:t("expirationLabel"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",usd:d||""},dstAmount:{value:h||"",usd:f||""},sizePerTrade:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:a||"",usd:o},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"minReceivedPerTrade":"minReceived"),value:i||"",usd:c},tradeInterval:{tooltip:t("tradeIntervalTooltip"),label:t("tradeIntervalLabel"),value:e.tradeInterval||0},triggerPrice:{tooltip:t("triggerPriceTooltip"),label:t("triggerPrice"),value:l||"",usd:u},recipient:{label:t("recipient"),value:e.account||""}}),[d,f,n,r,a,o,i,l,u,n,s,h,f,c])},Q2=e=>{const{orders:t}=Ou(),{useToken:r,config:n}=oe(),s=Me(),a=M.useMemo(()=>t==null?void 0:t.all.find(C=>C.id===e),[t,e])||{},o=tx(a),i=r==null?void 0:r(a==null?void 0:a.srcTokenAddress),c=r==null?void 0:r(a==null?void 0:a.dstTokenAddress),l=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmount),u=jG(i,c,a),d=VG(i,c,a),f=WG(i,c,a),h=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled),y=Rn(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled),g=a==null?void 0:a.progress,E=Rn(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountPerTrade),v=Rn(c==null?void 0:c.decimals,a==null?void 0:a.dstMinAmountPerTrade),w=M.useMemo(()=>a?a.version===2?a.fillDelay:n.twapConfig?td(a,n.twapConfig):0:0,[a,n]),A=X2({srcToken:i,dstToken:c,account:a==null?void 0:a.maker,limitPrice:u,deadline:a==null?void 0:a.deadline,tradeInterval:w,srcAmount:l,totalTrades:a==null?void 0:a.totalTradesAmount,srcAmountPerTrade:E,minDestAmountPerTrade:v,triggerPrice:d});return M.useMemo(()=>({original:a,title:o,...A,createdAt:{label:s("createdAt"),value:a==null?void 0:a.createdAt},id:{label:s("id"),value:a==null?void 0:a.id},amountInFilled:{label:s("amountOut"),value:h},amountOutFilled:{label:s("amountReceived"),value:y,token:c},progress:{label:s("progress"),value:g},excecutionPrice:{label:s((a==null?void 0:a.totalTradesAmount)===1?"finalExcecutionPrice":"averageExecutionPrice"),value:f},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,f,h,y,g,o,i,c,A])},J2=e=>{const t=Me();return M.useMemo(()=>{switch(e){case ze.TWAP_MARKET:return t("twapMarket");case ze.TWAP_LIMIT:return t("twapLimit");case ze.STOP_LOSS_MARKET:return t("stopLossMarket");case ze.STOP_LOSS_LIMIT:return t("stopLossLimit");case ze.TAKE_PROFIT:return t("takeProfit");default:return t("twapMarket")}},[t,e])},$G=()=>{const{module:e}=oe(),t=te(r=>r.state.isMarketOrder);return M.useMemo(()=>e===ye.TWAP?t?ze.TWAP_MARKET:ze.TWAP_LIMIT:e===ye.LIMIT?t?ze.LIMIT:ze.TWAP_LIMIT:e===ye.STOP_LOSS?t?ze.STOP_LOSS_MARKET:ze.STOP_LOSS_LIMIT:e===ye.TAKE_PROFIT?ze.TAKE_PROFIT:ze.TWAP_MARKET,[e,t])},ex=()=>{const e=$G();return J2(e)},tx=e=>J2(e==null?void 0:e.type),rx=()=>{const{account:e,config:t,chainId:r}=oe();return M.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.adapter,r],[e,t,r])},GG=()=>{const{callbacks:e,refetchBalances:t}=oe(),r=Td(),n=rx();return M.useCallback(s=>{var c;const a=r.getQueryData(n);let o=!1;const i=[];a&&a.forEach(l=>{var d;const u=s.find(f=>f.id===l.id);!(u!=null&&u.twapAddress)&&l.twapAddress&&u&&u.progress!==l.progress&&(o=!0,i.push(u),u.status===ct.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,u)))}),o&&((c=e==null?void 0:e.onOrdersProgressUpdate)==null||c.call(e,i),t==null||t())},[r,n,e,t])},K0=()=>{const{account:e,config:t,chainId:r}=oe(),n=rx(),s=GG();return d3({refetchInterval:QL,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:n,queryFn:async({signal:o})=>{if(!e||!r||!t)return[];const i=await _m({signal:o,chainId:r,config:t,account:e});return s(i),i.map(c=>t!=null&&t.twapConfig?{...c,fillDelayMillis:td(c,t.twapConfig)}:c)}})},Ou=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=K0(),{mutateAsync:a}=Y0();return M.useMemo(()=>({orders:{all:e??[],open:Du(e??[],ct.Open),completed:Du(e??[],ct.Completed),expired:Du(e??[],ct.Expired),canceled:Du(e??[],ct.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},nx=()=>{const e=te(r=>r.state.orderHistoryStatusFilter),{orders:t}=Ou();return M.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},Du=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),jG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return jh(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),VG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return Vh(r,e.decimals,t.decimals)},[r,e,t]),WG=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return Gh(r,e.decimals,t.decimals)},[r,e,t]),sx=()=>{const e=te(r=>r.updateState),t=te(r=>r.state.orderIdsToCancel);return M.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},qG=()=>{var T,m;const e=Me(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=Ou(),{mutateAsync:a,isPending:o}=Y0(),i=nx(),c=te(b=>b.updateState),l=te(b=>b.state.orderHistoryStatusFilter),u=te(b=>b.state.cancelOrdersMode),d=te(b=>b.state.orderIdsToCancel),f=M.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),h=M.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=M.useCallback(b=>a({orders:b}),[a]),g=M.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),E=M.useMemo(()=>{const b=Object.keys(ct).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=sx(),w=te(b=>b.state.selectedOrderID),A=Q2(w),C=M.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),D=M.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),z=M.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:h,onCancelOrders:y,onCancelOrder:z,onSelectStatus:g,onToggleCancelOrdersMode:f,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?A:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((m=E[0])==null?void 0:m.value)||"",statuses:E,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:D}},KG=()=>{const{refetch:e}=K0();return Zr({mutationFn:async t=>{var r;for(;;){const n=(r=await e())==null?void 0:r.data;if(!n)throw new Error("orders not found");if(t.every(a=>{const o=n.find(i=>i.id===a);return(o==null?void 0:o.status)===ct.Canceled}))break;await new Promise(a=>setTimeout(a,1e3))}}})},Y0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=oe(),o=q0(),i=KG().mutateAsync,c=te(d=>d.updateState),l=async d=>{dt.onCancelOrderRequest(d.map(f=>f.id.toString()),1);try{return(await Promise.all(d.map(h=>t.writeContract({account:e,address:h.twapAddress,abi:Lh,functionName:"cancel",args:[h.id],chain:t.chain}))))[0]}catch(f){throw dt.onCancelOrderError(f),f}},u=async d=>{var f;try{dt.onCancelOrderRequest(d.map(g=>g.hash),2);const h=await t.writeContract({account:e,address:n.repermit,abi:Nh,functionName:"cancel",args:[d.map(g=>g.hash)],chain:t.chain}),y=await o(h);if(!y)throw new Error("failed to get transaction receipt");if(y.status==="reverted")throw new Error("failed to cancel order");return dt.onCancelOrderSuccess(h),(f=s==null?void 0:s.onCancelOrderSuccess)==null||f.call(s,{orders:d,txHash:h,explorerUrl:Bi(h,a)}),y.transactionHash}catch(h){throw dt.onCancelOrderError(h),h}};return Zr({mutationFn:async({orders:d})=>{var f,h;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(f=s==null?void 0:s.onCancelOrderRequest)==null||f.call(s,d),c({cancelOrderStatus:ht.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const y=d.filter(w=>w.version===1),g=d.filter(w=>w.version===2),[E,v]=await Promise.all([y.length?l(y):Promise.resolve(""),g.length?u(g):Promise.resolve("")]);return await i(d.map(w=>w.id)),c({cancelOrderStatus:ht.SUCCESS,orderIdsToCancel:[]}),[...E||[],v]}catch(y){console.error("cancel order error",y),(h=s==null?void 0:s.onCancelOrderFailed)==null||h.call(s,y),Mf(y)?c({cancelOrderStatus:void 0}):(c({cancelOrderStatus:ht.FAILED}),dt.onCancelOrderError(y))}}})},ax=M.createContext({}),zt=()=>M.useContext(ax),YG=()=>{const e=te(c=>c.state.selectedOrderID),t=Q2(e),r=Me(),[n,s]=M.useState("panel1"),{components:a}=oe(),o=a.TokenLogo;M.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?B.jsx(ax.Provider,{value:{order:t},children:B.jsxs("div",{className:"twap-orders__selected-order",children:[B.jsx(p1,{SrcTokenLogo:o&&B.jsx(o,{token:t.srcToken}),DstTokenLogo:o&&B.jsx(o,{token:t.dstToken}),fromTitle:r("from"),inToken:t.srcToken,toTitle:r("to"),outToken:t.dstToken}),B.jsx(Ee.Container,{children:B.jsxs("div",{className:"twap-orders__selected-order-bottom",children:[B.jsxs("div",{className:"twap-orders__selected-order-accordions",children:[B.jsx(ox,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:B.jsx(sj,{})}),B.jsx(ox,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:B.jsx(ZG,{})})]}),B.jsx(oj,{})]})})]})}):null},ox=({expanded:e,onClick:t,children:r,title:n})=>B.jsxs("div",{className:"twap-orders__selected-order-accordion",children:[B.jsxs("div",{onClick:t,className:"twap-orders__selected-order-accordion-trigger",children:[B.jsx("p",{children:n}),B.jsx(az.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&B.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),ZG=()=>B.jsxs(Ee,{children:[B.jsx(nj,{}),B.jsx(ij,{}),B.jsx(ej,{}),B.jsx(cj,{}),B.jsx(XG,{}),B.jsx(QG,{}),B.jsx(JG,{}),B.jsx(tj,{}),B.jsx(rj,{}),B.jsx(fj,{}),B.jsx(Ee.Recipient,{})]}),XG=()=>{const{order:e}=zt();return B.jsx(Ee.TradeSize,{tradeSize:e.sizePerTrade.value,srcToken:e.srcToken,label:e.sizePerTrade.label,tooltip:e.sizePerTrade.tooltip,trades:e.totalTrades.value})},QG=()=>{const{order:e}=zt();return B.jsx(Ee.TradesAmount,{trades:e.totalTrades.value,label:e.totalTrades.label,tooltip:e.totalTrades.tooltip})},JG=()=>{const{order:e}=zt();return B.jsx(Ee.MinDestAmount,{dstToken:e.dstToken,dstMinAmountOut:e.minDestAmountPerTrade.value,label:e.minDestAmountPerTrade.label,tooltip:e.minDestAmountPerTrade.tooltip})},ej=()=>{const{order:e}=zt();return B.jsx(Ee.Deadline,{deadline:e.deadline.value,label:e.deadline.label,tooltip:e.deadline.tooltip})},tj=()=>{const{order:e}=zt();return B.jsx(Ee.TradeInterval,{fillDelayMillis:e.tradeInterval.value,chunks:e.totalTrades.value,label:e.tradeInterval.label,tooltip:e.tradeInterval.tooltip})},rj=()=>{const{order:e}=zt();return B.jsx(Ee.Price,{srcToken:e.srcToken,dstToken:e.dstToken,price:e.triggerPrice.value,label:e.triggerPrice.label,tooltip:e.triggerPrice.tooltip})},nj=()=>{const{order:e}=zt();return B.jsx(Ee.OrderID,{id:e.id.value||""})},sj=()=>B.jsxs(Ee,{children:[B.jsx(dj,{}),B.jsx(lj,{}),B.jsx(aj,{}),B.jsx(pj,{}),B.jsx(hj,{})]}),aj=()=>{var r;const{order:e}=zt(),t=Ze({value:e.amountOutFilled.value,decimalScale:3});return e.amountOutFilled.value?B.jsx(Ee.DetailRow,{title:e.amountOutFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.dstToken)==null?void 0:r.symbol]})}):null},oj=()=>{const{order:e}=zt(),t=Me(),{mutateAsync:r,isPending:n}=Y0(),{components:s}=oe(),a=s.Button,o=M.useCallback(async()=>r({orders:[e.original]}),[r,e]);return!e||e.original.status!==ct.Open||!a?null:B.jsx(a,{loading:n,onClick:o,disabled:n,className:"twap-cancel-order",text:t("cancelOrder"),children:t("cancelOrder")})},ij=()=>{const{order:e}=zt(),t=Me(),r=W0(e.createdAt.value);return B.jsx(Ee.DetailRow,{title:t("createdAt")||"",children:B.jsx("p",{children:r})})},cj=()=>{var n;const{order:e}=zt(),t=Me(),r=Ze({value:e.srcAmount.value,decimalScale:3});return B.jsx(Ee.DetailRow,{title:t("amountOut")||"",children:B.jsxs("p",{children:[r||0," ",(n=e.srcToken)==null?void 0:n.symbol]})})},lj=()=>{var r;const{order:e}=zt(),t=Ze({value:e.amountInFilled.value,decimalScale:3});return B.jsx(Ee.DetailRow,{title:e.amountInFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.srcToken)==null?void 0:r.symbol]})})},uj=()=>{const{order:e}=zt(),t=Me();return M.useMemo(()=>{switch(e.original.status){case ct.Open:return t("Open")||"";case ct.Completed:return t("Completed")||"";case ct.Expired:return t("Expired")||"";case ct.Canceled:return t("Canceled")||""}},[e.original.status,t])},dj=()=>{const e=Me(),t=uj();return B.jsx(Ee.DetailRow,{title:e("status")||"",children:B.jsx("p",{children:t})})},pj=()=>{const{order:e}=zt(),t=Ze({value:e.progress.value,decimalScale:2});return B.jsx(Ee.DetailRow,{title:e.progress.label,children:B.jsxs("p",{children:[t||0,"%"]})})},fj=()=>{const{order:e}=zt(),t=Me();return e.limitPrice.value?B.jsx(Ee.Price,{label:t("limitPrice")||"",price:e.limitPrice.value,srcToken:e.srcToken,dstToken:e.dstToken,tooltip:e.limitPrice.tooltip}):null},hj=()=>{const{order:e}=zt();return e.excecutionPrice.value?B.jsx(Ee.Price,{label:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null};var Z0={},ix;function mj(){if(ix)return Z0;ix=1;var e=lu.GenIcon;return Z0.HiArrowRight=function(r){return e({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(r)},Z0}var bj=mj();const _u=0,fs=1,mo=2,cx=4;function lx(e){return()=>e}function yj(e){e()}function ux(e,t){return r=>e(t(r))}function dx(e,t){return()=>e(t)}function gj(e,t){return r=>e(t,r)}function X0(e){return e!==void 0}function xj(...e){return()=>{e.map(yj)}}function bo(){}function Mu(e,t){return t(e),e}function wj(e,t){return t(e)}function tt(...e){return e}function je(e,t){return e(fs,t)}function Ce(e,t){e(_u,t)}function Q0(e){e(mo)}function at(e){return e(cx)}function ce(e,t){return je(e,gj(t,_u))}function Vr(e,t){const r=e(fs,n=>{r(),t(n)});return r}function px(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function fx(e,t){return e===t}function rt(e=fx){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function fe(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>ux(t,e)}function cn(e){return t=>()=>{t(e)}}function W(e,...t){const r=vj(...t);return(n,s)=>{switch(n){case mo:Q0(e);return;case fs:return je(e,r(s))}}}function ln(e,t){return r=>n=>{r(t=e(t,n))}}function oa(e){return t=>r=>{e>0?e--:t(r)}}function Hn(e){let t=null,r;return n=>s=>{t=s,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Te(...e){const t=new Array(e.length);let r=0,n=null;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{const l=r;r=r|i,t[o]=c,l!==s&&r===s&&n&&(n(),n=null)})}),a=>o=>{const i=()=>{a([o].concat(t))};r===s?i():n=i}}function vj(...e){return t=>e.reduceRight(wj,t)}function Ej(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case fs:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),bo);case mo:n(),r=null;return}}}function Y(e){let t=e;const r=Ue();return(n,s)=>{switch(n){case _u:t=s;break;case fs:{s(t);break}case cx:return t}return r(n,s)}}function Rt(e,t){return Mu(Y(t),r=>ce(e,r))}function Ue(){const e=[];return(t,r)=>{switch(t){case _u:e.slice().forEach(n=>{n(r)});return;case mo:e.splice(0,e.length);return;case fs:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function mr(e){return Mu(Ue(),t=>ce(e,t))}function $e(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:kj(),singleton:r}}const kj=()=>Symbol();function Cj(e){const t=new Map,r=({constructor:n,dependencies:s,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const i=n(s.map(c=>r(c)));return o&&t.set(a,i),i};return r(e)}function Et(...e){const t=Ue(),r=new Array(e.length);let n=0;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{r[o]=c,n=n|i,n===s&&Ce(t,r)})}),function(a,o){switch(a){case mo:{Q0(t);return}case fs:return n===s&&o(r),je(t,o)}}}function he(e,t=fx){return W(e,rt(t))}function J0(...e){return function(t,r){switch(t){case mo:return;case fs:return xj(...e.map(n=>je(n,r)))}}}var nr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(nr||{});const Tj={0:"debug",3:"error",1:"log",2:"warn"},Aj=()=>typeof globalThis>"u"?window:globalThis,hs=$e(()=>{const e=Y(3);return{log:Y((t,r,n=1)=>{var s;const a=(s=Aj().VIRTUOSO_LOG_LEVEL)!=null?s:at(e);n>=a&&console[Tj[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function ia(e,t,r){return eh(e,t,r).callbackRef}function eh(e,t,r){const n=M.useRef(null);let s=o=>{};const a=M.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const i=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};r?i():requestAnimationFrame(i)}):null,[e,r]);return s=o=>{o&&t?(a==null||a.observe(o),n.current=o):(n.current&&(a==null||a.unobserve(n.current)),n.current=null)},{callbackRef:s,ref:n}}function Sj(e,t,r,n,s,a,o,i,c){const l=M.useCallback(u=>{const d=Pj(u.children,t,i?"offsetWidth":"offsetHeight",s);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window";let y;h&&(y=f.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:h?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?f.scrollLeft:f.scrollTop,E=o?i?o.scrollWidth:o.scrollHeight:h?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?f.scrollWidth:f.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:h?i?y.innerWidth:y.innerHeight:i?f.offsetWidth:f.offsetHeight;n({scrollHeight:E,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?hx("column-gap",getComputedStyle(u).columnGap,s):hx("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return eh(l,r,c)}function Pj(e,t,r,n){const s=e.length;if(s===0)return null;const a=[];for(let o=0;o<s;o++){const i=e.item(o);if(i.dataset.index===void 0)continue;const c=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,r);if(u===0&&n("Zero-sized element, this should not happen",{child:i},nr.ERROR),u===l)continue;const d=a[a.length-1];a.length===0||d.size!==u||d.endIndex!==c-1?a.push({endIndex:c,size:u,startIndex:c}):a[a.length-1].endIndex++}return a}function hx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}function mx(e,t,r){const n=M.useRef(null),s=M.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,f;if(t){const h=t.getBoundingClientRect(),y=l.top-h.top;f=h.height-Math.max(0,y),d=y+t.scrollTop}else{const h=o.current.ownerDocument.defaultView;f=h.innerHeight-Math.max(0,l.top),d=l.top+h.scrollY}n.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=eh(s,!0,r),i=M.useCallback(()=>{s(o.current)},[s,o]);return M.useEffect(()=>{var c;if(t){t.addEventListener("scroll",i);const l=new ResizeObserver(()=>{requestAnimationFrame(i)});return l.observe(t),()=>{t.removeEventListener("scroll",i),l.unobserve(t)}}else{const l=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",i),l==null||l.addEventListener("resize",i),()=>{l==null||l.removeEventListener("scroll",i),l==null||l.removeEventListener("resize",i)}}},[i,t,o]),a}const Wt=$e(()=>{const e=Ue(),t=Ue(),r=Y(0),n=Ue(),s=Y(0),a=Ue(),o=Ue(),i=Y(0),c=Y(0),l=Y(0),u=Y(0),d=Ue(),f=Ue(),h=Y(!1),y=Y(!1),g=Y(!1);return ce(W(e,re(({scrollTop:E})=>E)),t),ce(W(e,re(({scrollHeight:E})=>E)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),ic={lvl:0};function bx(e,t){const r=e.length;if(r===0)return[];let{index:n,value:s}=t(e[0]);const a=[];for(let o=1;o<r;o++){const{index:i,value:c}=t(e[o]);a.push({end:i-1,start:n,value:s}),n=i,s=c}return a.push({end:1/0,start:n,value:s}),a}function qe(e){return e===ic}function cc(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?cc(e.l,t):cc(e.r,t)}function Wr(e,t,r="k"){if(qe(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=Wr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return Wr(e.l,t,r)}function br(e,t,r){return qe(e)?xx(t,r,1):t===e.k?At(e,{k:t,v:r}):t<e.k?wx(At(e,{l:br(e.l,t,r)})):wx(At(e,{r:br(e.r,t,r)}))}function yo(){return ic}function go(e,t,r){if(qe(e))return[];const n=Wr(e,t)[0];return Ij(rh(e,n,r))}function th(e,t){if(qe(e))return ic;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=gx(n);return Nu(At(e,{k:a,l:yx(n),v:o}))}}else return t<r?Nu(At(e,{l:th(n,t)})):Nu(At(e,{r:th(s,t)}))}function ca(e){return qe(e)?[]:[...ca(e.l),{k:e.k,v:e.v},...ca(e.r)]}function rh(e,t,r){if(qe(e))return[];const{k:n,l:s,r:a,v:o}=e;let i=[];return n>t&&(i=i.concat(rh(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(rh(a,t,r))),i}function Nu(e){const{l:t,lvl:r,r:n}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(nh(t))return vx(At(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return At(t.r,{l:At(t,{r:t.r.l}),lvl:r,r:At(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(nh(e))return sh(At(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=nh(s)?n.lvl-1:n.lvl;return At(s,{l:At(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:sh(At(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function At(e,t){return xx(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function yx(e){return qe(e.r)?e.l:Nu(At(e,{r:yx(e.r)}))}function nh(e){return qe(e)||e.lvl>e.r.lvl}function gx(e){return qe(e.r)?[e.k,e.v]:gx(e.r)}function xx(e,t,r,n=ic,s=ic){return{k:e,l:n,lvl:r,r:s,v:t}}function wx(e){return sh(vx(e))}function vx(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?At(t,{r:At(e,{l:t.r})}):e}function sh(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?At(r,{l:At(e,{r:r.l}),lvl:t+1}):e}function Ij(e){return bx(e,({k:t,v:r})=>({index:t,value:r}))}function Ex(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function lc(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const ah=$e(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function kx(e,t,r){return e[Lu(e,t,r)]}function Lu(e,t,r,n=0){let s=e.length-1;for(;n<=s;){const a=Math.floor((n+s)/2),o=e[a],i=r(o,t);if(i===0)return a;if(i===-1){if(s-n<2)return a-1;s=a-1}else{if(s===n)return a;n=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Bj(e,t,r,n){const s=Lu(e,t,n),a=Lu(e,r,n,s);return e.slice(s,a+1)}function ms(e,t){return Math.round(e.getBoundingClientRect()[t])}function zu(e){return!qe(e.groupOffsetTree)}function oh({index:e},t){return t===e?0:t<e?-1:1}function Fj(){return{groupIndices:[],groupOffsetTree:yo(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:yo()}}function Uj(e,t){let r=qe(e)?0:1/0;for(const n of t){const{endIndex:s,size:a,startIndex:o}=n;if(r=Math.min(r,o),qe(e)){e=br(e,0,a);continue}const i=go(e,o-1,s+1);if(i.some(zj(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:f}of i)c?(s>=d||a===f)&&(e=th(e,d)):(l=f!==a,c=!0),u>s&&s>=d&&f!==a&&(e=br(e,s+1,f));l&&(e=br(e,o,a))}return[e,r]}function Oj(e){return typeof e.groupIndex<"u"}function Dj({offset:e},t){return t===e?0:t<e?-1:1}function uc(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=kx(t,e,oh),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function Cx(e,t){if(!zu(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function Tx(e,t,r){if(Oj(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=Cx(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function _j(e,t,r,n=0){return n>0&&(t=Math.max(t,kx(e,n,oh).offset)),bx(Bj(e,t,r,Dj),Lj)}function Mj(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,nr.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const f=t[0].size,h=t[1].size;o=r.reduce((y,g)=>br(br(y,g,f),g+1,h),o)}else[o,i]=Uj(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=ih(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((f,h)=>br(f,h,uc(h,d,s)),yo()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function Nj(e){return ca(e).map(({k:t,v:r},n,s)=>{const a=s[n+1];return{endIndex:a?a.k-1:1/0,size:r,startIndex:t}})}function Ax(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function ih(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=Lu(s,t-1,oh),i=s[c].offset;const l=Wr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===Wr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of go(r,t,1/0)){const d=l-a,f=d*o+i+d*n;s.push({index:l,offset:f,size:u}),a=l,i=f,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function Lj(e){return{index:e.index,value:e}}function zj(e){const{endIndex:t,size:r,startIndex:n}=e;return s=>s.start===n&&(s.end===t||s.end===1/0)&&s.value===r}const Rj={offsetHeight:"height",offsetWidth:"width"},un=$e(([{log:e},{recalcInProgress:t}])=>{const r=Ue(),n=Ue(),s=Rt(n,0),a=Ue(),o=Ue(),i=Y(0),c=Y([]),l=Y(void 0),u=Y(void 0),d=Y(void 0),f=Y(void 0),h=Y((T,m)=>ms(T,Rj[m])),y=Y(void 0),g=Y(0),E=Fj(),v=Rt(W(r,Te(c,e,g),ln(Mj,E),rt()),E),w=Rt(W(c,rt(),ln((T,m)=>({current:m,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(W(c,fe(T=>T.length>0),Te(v,g),re(([T,m,b])=>{const x=T.reduce((S,I,F)=>br(S,I,uc(I,m.offsetTree,b)||F),yo());return{...m,groupIndices:T,groupOffsetTree:x}})),v),ce(W(n,Te(v),fe(([T,{lastIndex:m}])=>T<m),re(([T,{lastIndex:m,lastSize:b}])=>[{endIndex:m,size:b,startIndex:T}])),r),ce(l,u);const A=Rt(W(l,re(T=>T===void 0)),!0);ce(W(u,fe(T=>T!==void 0&&qe(at(v).sizeTree)),re(T=>{const m=at(d),b=at(c).length>0;return m?b?[{endIndex:0,size:m,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(W(f,fe(T=>T!==void 0&&T.length>0&&qe(at(v).sizeTree)),re(T=>{const m=[];let b=T[0],x=0;for(let S=1;S<T.length;S++){const I=T[S];I!==b&&(m.push({endIndex:S-1,size:b,startIndex:x}),b=I,x=S)}return m.push({endIndex:T.length-1,size:b,startIndex:x}),m})),r),ce(W(c,Te(d,u),fe(([,T,m])=>T!==void 0&&m!==void 0),re(([T,m,b])=>{const x=[];for(let S=0;S<T.length;S++){const I=T[S],F=T[S+1];x.push({startIndex:I,endIndex:I,size:m}),F!==void 0&&x.push({startIndex:I+1,endIndex:F-1,size:b})}return x})),r);const C=mr(W(r,Te(v),ln(({sizes:T},[m,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:E}),re(T=>T.changed)));je(W(i,ln((T,m)=>({diff:T.prev-m,prev:m}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:m}=at(v);if(T>0)Ce(t,!0),Ce(a,T+Ax(T,m));else if(T<0){const b=at(w);b.length>0&&(T-=Ax(-T,b)),Ce(o,T)}}),je(W(i,Te(e)),([T,m])=>{T<0&&m("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:i},nr.ERROR)});const D=mr(a);ce(W(a,Te(v),re(([T,m])=>{const b=m.groupIndices.length>0,x=[],S=m.lastSize;if(b){const I=cc(m.sizeTree,0);let F=0,_=0;for(;F<T;){const P=m.groupIndices[_],O=m.groupIndices.length===_+1?1/0:m.groupIndices[_+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+O-1,size:S,startIndex:P+1}),_++,F+=O+1}const k=ca(m.sizeTree);return F!==T&&k.shift(),k.reduce((P,{k:O,v:U})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:O+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:O+T,prevSize:U,ranges:L}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return ca(m.sizeTree).reduce((I,{k:F,v:_})=>({prevIndex:F+T,prevSize:_,ranges:[...I.ranges,{endIndex:F+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:S,ranges:[]}).ranges})),r);const z=mr(W(o,Te(v,g),re(([T,{offsetTree:m},b])=>{const x=-T;return uc(x,m,b)})));return ce(W(o,Te(v,g),re(([T,m,b])=>{if(m.groupIndices.length>0){if(qe(m.sizeTree))return m;let x=yo();const S=at(w);let I=0,F=0,_=0;for(;I<-T;){_=S[F];const k=S[F+1]-_-1;F++,I+=k+1}if(x=ca(m.sizeTree).reduce((k,{k:P,v:O})=>br(k,Math.max(0,P+T),O),x),I!==-T){const k=cc(m.sizeTree,_);x=br(x,0,k);const P=Wr(m.sizeTree,-T+1)[1];x=br(x,1,P)}return{...m,sizeTree:x,...ih(m.offsetTree,0,x,b)}}else{const x=ca(m.sizeTree).reduce((S,{k:I,v:F})=>br(S,Math.max(0,I+T),F),yo());return{...m,sizeTree:x,...ih(m.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:D,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:f,itemSize:h,listRefresh:C,shiftWith:o,shiftWithOffset:z,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:A,unshiftWith:a}},tt(hs,ah),{singleton:!0});function Hj(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const Sx=$e(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Ue(),o=Ue(),i=mr(W(a,re(Hj)));return ce(W(i,re(c=>c.totalCount)),r),ce(W(i,re(c=>c.groupIndices)),e),ce(W(Et(s,t,n),fe(([c,l])=>zu(l)),re(([c,l,u])=>Wr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),rt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},tt(un,Wt)),bs=$e(([{log:e}])=>{const t=Y(!1),r=mr(W(t,fe(n=>n),rt()));return je(t,n=>{n&&at(e)("props updated",{},nr.DEBUG)}),{didMount:r,propsReady:t}},tt(hs),{singleton:!0}),$j=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Px(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!$j)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const dc=$e(([{gap:e,listRefresh:t,sizes:r,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:a,footerHeight:o,headerHeight:i,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const h=Ue(),y=Ue(),g=Y(0);let E=null,v=null,w=null;function A(){E&&(E(),E=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(W(h,Te(r,d,n,g,i,o,f),Te(e,a,s),re(([[C,D,z,T,m,b,x,S],I,F,_])=>{const k=Px(C),{align:P,behavior:O,offset:U}=k,L=T-1,H=Tx(k,D,L);let G=uc(H,D.offsetTree,I)+b;P==="end"?(G+=F+Wr(D.sizeTree,H)[1]-z+_,H===L&&(G+=x)):P==="center"?G+=(F+Wr(D.sizeTree,H)[1]-z+_)/2:G-=m,U&&(G+=U);const Q=pe=>{A(),pe?(S("retrying to scroll to",{location:C},nr.DEBUG),Ce(h,C)):(Ce(y,!0),S("list did not change, scroll successful",{},nr.DEBUG))};if(A(),O==="smooth"){let pe=!1;w=je(t,me=>{pe=pe||me}),E=Vr(u,()=>{Q(pe)})}else E=Vr(W(t,Gj(150)),Q);return v=setTimeout(()=>{A()},1200),Ce(c,!0),S("scrolling from index to",{behavior:O,index:H,top:G},nr.DEBUG),{behavior:O,top:G}})),l),{scrollTargetReached:y,scrollToIndex:h,topListHeight:g}},tt(un,Wt,hs),{singleton:!0});function Gj(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function ch(e,t){e==0?t():requestAnimationFrame(()=>{ch(e-1,t)})}function lh(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const pc=$e(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=Y(!0),c=Y(0),l=Y(!0);return ce(W(o,Te(c),fe(([u,d])=>!!d),cn(!1)),i),ce(W(o,Te(c),fe(([u,d])=>!!d),cn(!1)),l),je(W(Et(t,o),Te(i,r,e,l),fe(([[,u],d,{sizeTree:f},h,y])=>u&&(!qe(f)||X0(h))&&!d&&!y),Te(c)),([,u])=>{Vr(s,()=>{Ce(l,!0)}),ch(4,()=>{Vr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},tt(un,Wt,dc,bs),{singleton:!0});function Ix(e,t){return Math.abs(e-t)<1.01}const fc="up",hc="down",jj="none",Vj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Wj=0,mc=$e(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=Y(!1),i=Y(!0),c=Ue(),l=Ue(),u=Y(4),d=Y(Wj),f=Rt(W(J0(W(he(s),oa(1),cn(!0)),W(he(s),oa(1),cn(!1),px(100))),rt()),!1),h=Rt(W(J0(W(r,cn(!0)),W(r,cn(!1),px(200))),rt()),!1);ce(W(Et(he(s),he(d)),re(([w,A])=>w<=A),rt()),i),ce(W(i,Hn(50)),l);const y=mr(W(Et(n,he(a),he(t),he(e),he(u)),ln((w,[{scrollHeight:A,scrollTop:C},D,z,T,m])=>{const b=C+D-A>-m,x={scrollHeight:A,scrollTop:C,viewportHeight:D};if(b){let I,F;return C>w.state.scrollTop?(I="SCROLLED_DOWN",F=w.state.scrollTop-C):(I="SIZE_DECREASED",F=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:F,state:x}}let S;return x.scrollHeight>w.state.scrollHeight?S="SIZE_INCREASED":D<w.state.viewportHeight?S="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?S="SCROLLING_UPWARDS":S="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:S,state:x}},Vj),rt((w,A)=>w&&w.atBottom===A.atBottom))),g=Rt(W(n,ln((w,{scrollHeight:A,scrollTop:C,viewportHeight:D})=>{if(Ix(w.scrollHeight,A))return{changed:!1,jump:0,scrollHeight:A,scrollTop:C};{const z=A-(C+D)<1;return w.scrollTop!==C&&z?{changed:!0,jump:w.scrollTop-C,scrollHeight:A,scrollTop:C}:{changed:!0,jump:0,scrollHeight:A,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fe(w=>w.changed),re(w=>w.jump)),0);ce(W(y,re(w=>w.atBottom)),o),ce(W(o,Hn(50)),c);const E=Y(hc);ce(W(n,re(({scrollTop:w})=>w),rt(),ln((w,A)=>at(h)?{direction:w.direction,prevScrollTop:A}:{direction:A<w.prevScrollTop?fc:hc,prevScrollTop:A},{direction:hc,prevScrollTop:0}),re(w=>w.direction)),E),ce(W(n,Hn(50),cn(jj)),E);const v=Y(0);return ce(W(f,fe(w=>!w),cn(0)),v),ce(W(s,Hn(100),Te(f),fe(([w,A])=>!!A),ln(([w,A],[C])=>[A,C],[0,0]),re(([w,A])=>A-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:E,scrollVelocity:v}},tt(Wt)),bc="top",yc="bottom",Bx="none";function Fx(e,t,r){return typeof e=="number"?r===fc&&t===bc||r===hc&&t===yc?e:0:r===fc?t===bc?e.main:e.reverse:t===yc?e.main:e.reverse}function Ux(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const uh=$e(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Ue(),o=Y(0),i=Y(0),c=Y(0),l=Rt(W(Et(he(n),he(s),he(r),he(a,lc),he(c),he(o),he(t),he(e),he(i)),re(([u,d,f,[h,y],g,E,v,w,A])=>{const C=u-w,D=E+v,z=Math.max(f-C,0);let T=Bx;const m=Ux(A,bc),b=Ux(A,yc);return h-=w,h+=f+v,y+=f+v,y-=w,h>u+D-m&&(T=fc),y<u-z+d+b&&(T=hc),T!==Bx?[Math.max(C-f-Fx(g,bc,T)-m,0),C-z-v+d+Fx(g,yc,T)+b]:null}),fe(u=>u!=null),rt(lc)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},tt(Wt),{singleton:!0});function qj(e,t,r){if(zu(t)){const n=Cx(e,t);return[{index:Wr(t.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:e,offset:0,size:0}]}const dh={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ru(e,t,r,n,s,a){const{lastIndex:o,lastOffset:i,lastSize:c}=s;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=r-o,f=i+d*c+(d-1)*n,h=l,y=f-u;return{bottom:u,firstItemIndex:a,items:Dx(e,s,a),offsetBottom:y,offsetTop:l,top:h,topItems:Dx(t,s,a),topListHeight:t.reduce((g,E)=>E.size+g,0),totalCount:r}}function Ox(e,t,r,n,s,a){let o=0;if(r.groupIndices.length>0)for(const u of r.groupIndices){if(u-o>=e)break;o++}const i=e+o,c=lh(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return Ru(l,[],i,s,r,n)}function Dx(e,t,r){if(e.length===0)return[];if(!zu(t))return e.map(l=>({...l,index:l.index+r,originalIndex:l.index}));const n=e[0].index,s=e[e.length-1].index,a=[],o=go(t.groupOffsetTree,n,s);let i,c=0;for(const l of e){(!i||i.end<l.index)&&(i=o.shift(),c=t.groupIndices.indexOf(i.start));let u;l.index===i.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+r},a.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return a}function _x(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const la=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:y}])=>{const g=Y([]),E=Y(0),v=Ue(),w=Y(0);ce(a.topItemsIndexes,g);const A=Rt(W(Et(h,y,he(c,lc),he(s),he(n),he(l),u,he(g),he(t),he(r),he(w),e),fe(([T,m,,b,,,,,,,,x])=>{const S=x&&x.length!==b;return T&&!m&&!S}),re(([,,[T,m],b,x,S,I,F,_,k,P,O])=>{var U,L,H,G;const Q=x,{offsetTree:pe,sizeTree:me}=Q,ie=at(E);if(b===0)return{...dh,totalCount:b};if(T===0&&m===0)return ie===0?{...dh,totalCount:b}:Ox(ie,S,x,_,k,O||[]);if(qe(me))return ie>0?null:Ru(qj(lh(S,b),Q,O),[],b,k,Q,_);const de=[];if(F.length>0){const Ae=F[0],ve=F[F.length-1];let be=0;for(const Xe of go(me,Ae,ve)){const Ke=Xe.value,Qe=Math.max(Xe.start,Ae),Br=Math.min(Xe.end,ve);for(let Ot=Qe;Ot<=Br;Ot++)de.push({data:O==null?void 0:O[Ot],index:Ot,offset:be,size:Ke}),be+=Ke}}if(!I)return Ru([],de,b,k,Q,_);const Be=F.length>0?F[F.length-1]+1:0,X=_j(pe,T,m,Be);if(X.length===0)return null;const we=b-1,De=Mu([],Ae=>{for(const ve of X){const be=ve.value;let Xe=be.offset,Ke=ve.start;const Qe=be.size;if(be.offset<T){Ke+=Math.floor((T-be.offset+k)/(Qe+k));const Ot=Ke-ve.start;Xe+=Ot*Qe+Ot*k}Ke<Be&&(Xe+=(Be-Ke)*Qe,Ke=Be);const Br=Math.min(ve.end,we);for(let Ot=Ke;Ot<=Br&&!(Xe>=m);Ot++)Ae.push({data:O==null?void 0:O[Ot],index:Ot,offset:Xe,size:Qe}),Xe+=Qe+k}}),Ge=_x(P,bc),it=_x(P,yc);if(De.length>0&&(Ge>0||it>0)){const Ae=De[0],ve=De[De.length-1];if(Ge>0&&Ae.index>Be){const be=Math.min(Ge,Ae.index-Be),Xe=[];let Ke=Ae.offset;for(let Qe=Ae.index-1;Qe>=Ae.index-be;Qe--){const Br=(L=(U=go(me,Qe,Qe)[0])==null?void 0:U.value)!=null?L:Ae.size;Ke-=Br+k,Xe.unshift({data:O==null?void 0:O[Qe],index:Qe,offset:Ke,size:Br})}De.unshift(...Xe)}if(it>0&&ve.index<we){const be=Math.min(it,we-ve.index);let Xe=ve.offset+ve.size+k;for(let Ke=ve.index+1;Ke<=ve.index+be;Ke++){const Qe=(G=(H=go(me,Ke,Ke)[0])==null?void 0:H.value)!=null?G:ve.size;De.push({data:O==null?void 0:O[Ke],index:Ke,offset:Xe,size:Qe}),Xe+=Qe+k}}}return Ru(De,de,b,k,Q,_)}),fe(T=>T!==null),rt()),dh);ce(W(e,fe(X0),re(T=>T==null?void 0:T.length)),s),ce(W(A,re(T=>T.topListHeight)),d),ce(d,i),ce(W(A,re(T=>[T.top,T.bottom])),o),ce(W(A,re(T=>T.items)),v);const C=mr(W(A,fe(({items:T})=>T.length>0),Te(s,e),fe(([{items:T},m])=>T[T.length-1].originalIndex===m-1),re(([,T,m])=>[T-1,m]),rt(lc),re(([T])=>T))),D=mr(W(A,Hn(200),fe(({items:T,topItems:m})=>T.length>0&&T[0].originalIndex===m.length),re(({items:T})=>T[0].index),rt())),z=mr(W(A,fe(({items:T})=>T.length>0),re(({items:T})=>{let m=0,b=T.length-1;for(;T[m].type==="group"&&m<b;)m++;for(;T[b].type==="group"&&b>m;)b--;return{endIndex:T[b].index,startIndex:T[m].index}}),rt(Ex)));return{endReached:C,initialItemCount:E,itemsRendered:v,listState:A,minOverscanItemCount:w,rangeChanged:z,startReached:D,topItemsIndexes:g,...f}},tt(un,Sx,uh,pc,dc,mc,bs,ah),{singleton:!0}),Mx=$e(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Ue(),o=Rt(W(Et(r,e,n,t,s),re(([i,c,l,u,d])=>i+c+l+u+d.offsetBottom+d.bottom)),0);return ce(he(o),a),{totalListHeight:o,totalListHeightChanged:a}},tt(Wt,la),{singleton:!0}),Kj=$e(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Y(!1),n=Rt(W(Et(r,e,t),fe(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),Hn(0),rt()),0);return{alignToBottom:r,paddingTopAddition:n}},tt(Wt,Mx),{singleton:!0}),Nx=$e(()=>({context:Y(null)})),Yj=({itemBottom:e,itemTop:t,locationParams:{align:r,behavior:n,...s},viewportBottom:a,viewportTop:o})=>t<o?{...s,align:r??"start",behavior:n}:e>a?{...s,align:r??"end",behavior:n}:null,Lx=$e(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Ue();return ce(W(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,f,h,y,g,E,v,w],A])=>{const{align:C,behavior:D,calculateViewLocation:z=Yj,done:T,...m}=d,b=Tx(d,f,y-1),x=uc(b,f.offsetTree,A)+g+E,S=x+Wr(f.sizeTree,b)[1],I=w+E,F=w+h-v,_=z({itemBottom:S,itemTop:x,locationParams:{align:C,behavior:D,...m},viewportBottom:F,viewportTop:I});return _?T&&Vr(W(o,fe(k=>!k),oa(at(o)?1:2)),T):T&&T(),_}),fe(d=>d!==null)),l),{scrollIntoView:u}},tt(un,Wt,dc,la,hs),{singleton:!0});function zx(e){return e?e==="smooth"?"smooth":"auto":!1}const Zj=(e,t)=>typeof e=="function"?zx(e(t)):t&&zx(e),Xj=$e(([{listRefresh:e,totalCount:t,fixedItemSize:r,data:n},{atBottomState:s,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:h}])=>{const y=Y(!1),g=Ue();let E=null;function v(D){Ce(o,{align:"end",behavior:D,index:"LAST"})}je(W(Et(W(he(t),oa(1)),c),Te(he(y),a,i,d),re(([[D,z],T,m,b,x])=>{let S=z&&b,I="auto";return S&&(I=Zj(T,m||x),S=S&&!!I),{followOutputBehavior:I,shouldFollow:S,totalCount:D}}),fe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:z})=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("following output to ",{totalCount:z},nr.DEBUG),v(D)}):E=Vr(e,()=>{at(u)("following output to ",{totalCount:z},nr.DEBUG),v(D),E=null})});function w(D){const z=Vr(s,T=>{D&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!E&&(at(u)("scrolling to bottom due to increased size",{},nr.DEBUG),v("auto"))});setTimeout(z,100)}je(W(Et(he(y),t,l),fe(([D,,z])=>D&&z),ln(({value:D},[,z])=>({refreshed:D===z,value:z}),{refreshed:!1,value:0}),fe(({refreshed:D})=>D),Te(y,t)),([,D])=>{at(i)&&w(D!==!1)}),je(g,()=>{w(at(y)!==!1)}),je(Et(he(y),s),([D,z])=>{D&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const A=Y(null),C=Ue();return ce(J0(W(he(n),re(D=>{var z;return(z=D==null?void 0:D.length)!=null?z:0})),W(he(t))),C),je(W(Et(W(C,oa(1)),c),Te(he(A),i,d,f),re(([[D,z],T,m,b,x])=>z&&m&&(T==null?void 0:T({context:x,totalCount:D,scrollingInProgress:b}))),fe(D=>!!D),Hn(0)),D=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("scrolling into view",{}),Ce(h,D)}):E=Vr(e,()=>{at(u)("scrolling into view",{}),Ce(h,D),E=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:A}},tt(un,mc,dc,pc,bs,hs,Wt,Nx,Lx)),Qj=$e(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(W(i,Te(a),fe(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,f,h=[]])=>Ox(c,l,u,d,f,h))),o),{}),tt(un,pc,la,bs),{singleton:!0}),Jj=$e(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Y(0);return je(W(e,Te(n),fe(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{Vr(W(r,oa(1),fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},tt(bs,Wt,la),{singleton:!0}),Rx=$e(([{scrollVelocity:e}])=>{const t=Y(!1),r=Ue(),n=Y(!1);return ce(W(e,Te(n,t,r),fe(([s,a])=>!!a),re(([s,a,o,i])=>{const{enter:c,exit:l}=a;if(o){if(l(s,i))return!1}else if(c(s,i))return!0;return o}),rt()),t),je(W(Et(t,e,r),Te(n)),([[s,a,o],i])=>{s&&i&&i.change&&i.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:e}},tt(mc),{singleton:!0}),ph=$e(([{scrollContainerState:e,scrollTo:t}])=>{const r=Ue(),n=Ue(),s=Ue(),a=Y(!1),o=Y(void 0);return ce(W(Et(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(W(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},tt(Wt)),eV=$e(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Ue(),u=Y(void 0),d=Y(null),f=Y(null);return ce(i,d),ce(c,f),je(W(l,Te(t,n,o,d,f,r)),([h,y,g,E,v,w,A])=>{const C=Nj(y.sizeTree);E&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=A,h({ranges:C,scrollTop:g})}),ce(W(u,fe(X0),re(tV)),s),ce(W(a,Te(u),fe(([,h])=>h!==void 0),rt(),re(([,h])=>h.ranges)),e),{getState:l,restoreStateFrom:u}},tt(un,Wt,pc,bs,ph));function tV(e){return{align:"start",index:0,offset:e.scrollTop}}const rV=$e(([{topItemsIndexes:e}])=>{const t=Y(0);return ce(W(t,fe(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},tt(la));function Hx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const nV=Hx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),sV=$e(([{deviation:e,scrollBy:t,scrollingInProgress:r,scrollTop:n},{isAtBottom:s,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:i},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:h},{recalcInProgress:y}])=>{const g=mr(W(c,Te(o),ln(([,v,w,A],[{bottom:C,items:D,offsetBottom:z,totalCount:T},m])=>{const b=C+z;let x=0;return w===T&&v.length>0&&D.length>0&&(D[0].originalIndex===0&&v[0].originalIndex===0||(x=b-A,x!==0&&(x+=m))),[x,D,T,b]},[0,[],0,0]),fe(([v])=>v!==0),Te(n,i,r,s,h,y),fe(([,v,w,A,,,C])=>!C&&!A&&v!==0&&w===fc),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},nr.DEBUG),v))));function E(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(W(g,Te(e,a)),([v,w,A])=>{A&&nV()?Ce(e,w-v):E(-v)}),je(W(Et(Rt(a,!1),e,y),fe(([v,w,A])=>!v&&!A&&w!==0),re(([v,w])=>w),Hn(1)),E),ce(W(d,re(v=>({top:-v}))),t),je(W(l,Te(f,u),re(([v,{groupIndices:w,lastSize:A,sizeTree:C},D])=>{function z(T){return T*(A+D)}if(w.length===0)return z(v);{let T=0;const m=cc(C,0);let b=0,x=0;for(;b<v;){b++,T+=m;let S=w.length===x+1?1/0:w[x+1]-w[x]-1;b+S>v&&(T-=m,S=v-b+1),b+=S,T+=z(S),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},tt(Wt,mc,la,un,hs,ah)),aV=$e(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),tt(uh,Qj,bs,Rx,Mx,Jj,Kj,ph,Lx,hs,Nx)),$x=$e(([{data:e,defaultItemSize:t,firstItemIndex:r,fixedItemSize:n,fixedGroupSize:s,gap:a,groupIndices:o,heightEstimates:i,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E},v,w,A,C,{scrollToIndex:D},z,{topItemCount:T},{groupCounts:m},b])=>{const{listState:x,minOverscanItemCount:S,topItemsIndexes:I,rangeChanged:F,..._}=C;return ce(F,b.scrollSeekRangeChanged),ce(W(b.windowViewportRect,re(k=>k.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:m,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:E,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:f,...A,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:S,scrollToIndex:D,statefulTotalCount:d,trackItemSizes:h,rangeChanged:F,..._,...b,...v,sizes:u,...w}},tt(un,pc,Wt,eV,Xj,la,dc,sV,rV,Sx,aV));function oV(e,t){const r={},n={};let s=0;const a=e.length;for(;s<a;)n[e[s]]=1,s+=1;for(const o in t)Object.hasOwn(n,o)||(r[o]=t[o]);return r}const Hu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Gx(e,t,r){const n=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),i=M.createContext({});function c(E,v){E.propsReady&&Ce(E.propsReady,!1);for(const w of n){const A=E[t.required[w]];Ce(A,v[w])}for(const w of s)if(w in v){const A=E[t.optional[w]];Ce(A,v[w])}E.propsReady&&Ce(E.propsReady,!0)}function l(E){return a.reduce((v,w)=>(v[w]=A=>{const C=E[t.methods[w]];Ce(C,A)},v),{})}function u(E){return o.reduce((v,w)=>(v[w]=Ej(E[t.events[w]]),v),{})}const d=M.forwardRef((E,v)=>{const{children:w,...A}=E,[C]=M.useState(()=>Mu(Cj(e),T=>{c(T,A)})),[D]=M.useState(dx(u,C));Hu(()=>{for(const T of o)T in A&&je(D[T],A[T]);return()=>{Object.values(D).map(Q0)}},[A,D,C]),Hu(()=>{c(C,A)}),M.useImperativeHandle(v,lx(l(C)));const z=r;return B.jsx(i.Provider,{value:C,children:r?B.jsx(z,{...oV([...n,...s,...o],A),children:w}):w})}),f=E=>{const v=M.useContext(i);return M.useCallback(w=>{Ce(v[E],w)},[v,E])},h=E=>{const v=M.useContext(i)[E],w=M.useCallback(A=>je(v,A),[v]);return M.useSyncExternalStore(w,()=>at(v),()=>at(v))},y=E=>{const v=M.useContext(i)[E],[w,A]=M.useState(dx(at,v));return Hu(()=>je(v,C=>{C!==w&&A(lx(C))}),[v,w]),w},g=M.version.startsWith("18")?h:y;return{Component:d,useEmitter:(E,v)=>{const w=M.useContext(i)[E];Hu(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:f}}const jx=M.createContext(void 0),Vx=M.createContext(void 0),Wx=typeof document<"u"?M.useLayoutEffect:M.useEffect;function fh(e){return"self"in e}function iV(e){return"body"in e}function qx(e,t,r,n=bo,s,a){const o=M.useRef(null),i=M.useRef(null),c=M.useRef(null),l=M.useCallback(f=>{let h,y,g;const E=f.target;if(iV(E)||fh(E)){const w=fh(E)?E:E.defaultView;g=a?w.scrollX:w.scrollY,h=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?E.scrollLeft:E.scrollTop,h=a?E.scrollWidth:E.scrollHeight,y=a?E.offsetWidth:E.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y})};f.suppressFlushSync?v():As.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===h-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);M.useEffect(()=>{const f=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",l,{passive:!0}),()=>{n(null),f.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(f){const h=o.current;if(!h||(a?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const y=f.behavior==="smooth";let g,E,v;fh(h)?(E=Math.max(ms(h.document.documentElement,a?"width":"height"),a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),g=a?h.innerWidth:h.innerHeight,v=a?window.scrollX:window.scrollY):(E=h[a?"scrollWidth":"scrollHeight"],g=ms(h,a?"width":"height"),v=h[a?"scrollLeft":"scrollTop"]);const w=E-g;if(f.top=Math.ceil(Math.max(Math.min(w,f.top),0)),Ix(g,E)||f.top===v){e({scrollHeight:E,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=f.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(f={behavior:f.behavior,left:f.top}),h.scrollTo(f)}function d(f){a&&(f={behavior:f.behavior,left:f.top}),o.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const hh="-webkit-sticky",Kx="sticky",mh=Hx(()=>{if(typeof document>"u")return Kx;const e=document.createElement("div");return e.style.position=hh,e.style.position===hh?hh:Kx});function bh(e){return e}const cV=$e(()=>{const e=Y(i=>`Item ${i}`),t=Y(i=>`Group ${i}`),r=Y({}),n=Y(bh),s=Y("div"),a=Y(bo),o=(i,c=null)=>Rt(W(r,re(l=>l[i]),rt()),c);return{components:r,computeItemKey:n,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:s,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),lV=$e(([e,t])=>({...e,...t}),tt($x,cV)),uV=({height:e})=>B.jsx("div",{style:{height:e}}),dV={overflowAnchor:"none",position:mh(),zIndex:1},Yx={overflowAnchor:"none"},pV={...Yx,display:"inline-block",height:"100%"},Zx=M.memo(function({showTopList:e=!1}){const t=ge("listState"),r=Sr("sizeRanges"),n=ge("useWindowScroll"),s=ge("customScrollParent"),a=Sr("windowScrollContainerState"),o=Sr("scrollContainerState"),i=s||n?a:o,c=ge("itemContent"),l=ge("context"),u=ge("groupContent"),d=ge("trackItemSizes"),f=ge("itemSize"),h=ge("log"),y=Sr("gap"),g=ge("horizontalDirection"),{callbackRef:E}=Sj(r,f,d,e?bo:i,h,y,s,g,ge("skipAnimationFrameInResizeObserver")),[v,w]=M.useState(0);yh("deviation",_=>{v!==_&&w(_)});const A=ge("EmptyPlaceholder"),C=ge("ScrollSeekPlaceholder")||uV,D=ge("ListComponent"),z=ge("ItemComponent"),T=ge("GroupComponent"),m=ge("computeItemKey"),b=ge("isSeeking"),x=ge("groupIndices").length>0,S=ge("alignToBottom"),I=ge("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:S?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:S?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&A?B.jsx(A,{...Ht(A,l)}):B.jsx(D,{...Ht(D,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:E,style:F,children:(e?t.topItems:t.items).map(_=>{const k=_.originalIndex,P=m(k+t.firstItemIndex,_.data,l);return b?M.createElement(C,{...Ht(C,l),height:_.size,index:_.index,key:P,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?M.createElement(T,{...Ht(T,l),"data-index":k,"data-item-index":_.index,"data-known-size":_.size,key:P,style:dV},u(_.index,l)):M.createElement(z,{...Ht(z,l),...bV(z,_.data),"data-index":k,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:P,style:g?pV:Yx},x?c(_.index,_.groupIndex,_.data,l):c(_.index,_.data,l))})})}),fV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hV={outline:"none",overflowX:"auto",position:"relative"},$u=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),mV={position:mh(),top:0,width:"100%",zIndex:1};function Ht(e,t){if(typeof e!="string")return{context:t}}function bV(e,t){return{item:typeof e=="string"?void 0:t}}const yV=M.memo(function(){const e=ge("HeaderComponent"),t=Sr("headerHeight"),r=ge("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),gV=M.memo(function(){const e=ge("FooterComponent"),t=Sr("footerHeight"),r=ge("HeaderFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null});function Xx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("scrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:h,scrollToCallback:y}=qx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",f),B.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?hV:fV,...s},tabIndex:0,...o,...Ht(c,a),children:n})})}function Qx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("windowScrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),h=M.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:E,scrollToCallback:v}=qx(i,l,c,y,f);return Wx(()=>{var w;return E.current=f||((w=h.current)==null?void 0:w.ownerDocument.defaultView),()=>{E.current=null}},[E,f]),e("windowScrollTo",v),e("scrollBy",g),B.jsx(c,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...Ht(c,a),children:n})})}const xV=({children:e})=>{const t=M.useContext(jx),r=Sr("viewportHeight"),n=Sr("fixedItemHeight"),s=ge("alignToBottom"),a=ge("horizontalDirection"),o=M.useMemo(()=>ux(r,c=>ms(c,a?"width":"height")),[r,a]),i=ia(o,!0,ge("skipAnimationFrameInResizeObserver"));return M.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:$u(s),children:e})},wV=({children:e})=>{const t=M.useContext(jx),r=Sr("windowViewportRect"),n=Sr("fixedItemHeight"),s=ge("customScrollParent"),a=mx(r,s,ge("skipAnimationFrameInResizeObserver")),o=ge("alignToBottom");return M.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),B.jsx("div",{"data-viewport-type":"window",ref:a,style:$u(o),children:e})},vV=({children:e})=>{const t=ge("TopItemListComponent")||"div",r=ge("headerHeight"),n={...mV,marginTop:`${r}px`},s=ge("context");return B.jsx(t,{style:n,...Ht(t,s),children:e})},EV=M.memo(function(e){const t=ge("useWindowScroll"),r=ge("topItemsIndexes").length>0,n=ge("customScrollParent"),s=ge("context");return B.jsxs(n||t?TV:CV,{...e,context:s,children:[r&&B.jsx(vV,{children:B.jsx(Zx,{showTopList:!0})}),B.jsxs(n||t?wV:xV,{children:[B.jsx(yV,{}),B.jsx(Zx,{}),B.jsx(gV,{})]})]})}),{Component:kV,useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}=Gx(lV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},EV),CV=Xx({useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}),TV=Qx({useEmitter:yh,useEmitterValue:ge,usePublisher:Sr}),AV=kV;tt($x,$e(()=>{const e=Y(l=>B.jsxs("td",{children:["Item $",l]})),t=Y(null),r=Y(l=>B.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=Y(null),s=Y(null),a=Y({}),o=Y(bh),i=Y(bo),c=(l,u=null)=>Rt(W(a,re(d=>d[l]),rt()),u);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:s,fixedHeaderContent:n,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}})),mh();const Jx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},SV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:e5,floor:Gu,max:gc,min:gh,round:t5}=Math;function r5(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function PV(e){return{...SV,items:e}}function ju(e,t){return e&&e.width===t.width&&e.height===t.height}function IV(e,t){return e&&e.column===t.column&&e.row===t.row}const BV=$e(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,h,{didMount:y,propsReady:g},{customScrollParent:E,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C},D])=>{const z=Y(0),T=Y(0),m=Y(Jx),b=Y({height:0,width:0}),x=Y({height:0,width:0}),S=Ue(),I=Ue(),F=Y(0),_=Y(null),k=Y({column:0,row:0}),P=Ue(),O=Ue(),U=Y(!1),L=Y(0),H=Y(!0),G=Y(!1),Q=Y(!1);je(W(y,Te(L),fe(([X,we])=>!!we)),()=>{Ce(H,!1)}),je(W(Et(y,H,x,b,L,G),fe(([X,we,De,Ge,,it])=>X&&!we&&De.height!==0&&Ge.height!==0&&!it)),([,,,,X])=>{Ce(G,!0),ch(1,()=>{Ce(S,X)}),Vr(W(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(W(O,fe(X=>X!=null&&X.scrollTop>0),cn(0)),T),je(W(y,Te(O),fe(([,X])=>X!=null)),([,X])=>{X&&(Ce(b,X.viewport),Ce(x,X.item),Ce(k,X.gap),X.scrollTop>0&&(Ce(U,!0),Vr(W(l,oa(1)),we=>{Ce(U,!1)}),Ce(c,{top:X.scrollTop})))}),ce(W(b,re(({height:X})=>X)),d),ce(W(Et(he(b,ju),he(x,ju),he(k,(X,we)=>X&&X.column===we.column&&X.row===we.row),he(l)),re(([X,we,De,Ge])=>({gap:De,item:we,scrollTop:Ge,viewport:X}))),P),ce(W(Et(he(z),n,he(k,IV),he(x,ju),he(b,ju),he(_),he(T),he(U),he(H),he(L)),fe(([,,,,,,,X])=>!X),re(([X,[we,De],Ge,it,Ae,ve,be,,Xe,Ke])=>{const{column:Qe,row:Br}=Ge,{height:Ot,width:Ch}=it,{width:I5}=Ae;if(be===0&&(X===0||I5===0))return Jx;if(Ch===0){const D5=lh(Ke,X),MW=D5+Math.max(be-1,0);return PV(r5(D5,MW,ve))}const qu=n5(I5,Ch,Qe);let Fo,Ea;Xe?we===0&&De===0&&be>0?(Fo=0,Ea=be-1):(Fo=qu*Gu((we+Br)/(Ot+Br)),Ea=qu*e5((De+Br)/(Ot+Br))-1,Ea=gh(X-1,gc(Ea,qu-1)),Fo=gh(Ea,gc(0,Fo))):(Fo=0,Ea=-1);const B5=r5(Fo,Ea,ve),{bottom:F5,top:U5}=s5(Ae,Ge,it,B5),O5=e5(X/qu),_W=O5*Ot+(O5-1)*Br-F5;return{bottom:F5,itemHeight:Ot,items:B5,itemWidth:Ch,offsetBottom:_W,offsetTop:U5,top:U5}})),m),ce(W(_,fe(X=>X!==null),re(X=>X.length)),z),ce(W(Et(b,x,m,k),fe(([X,we,{items:De}])=>De.length>0&&we.height!==0&&X.height!==0),re(([X,we,{items:De},Ge])=>{const{bottom:it,top:Ae}=s5(X,Ge,we,De);return[Ae,it]}),rt(lc)),t);const pe=Y(!1);ce(W(l,Te(pe),re(([X,we])=>we||X!==0)),pe);const me=mr(W(Et(m,z),fe(([{items:X}])=>X.length>0),Te(pe),fe(([[X,we],De])=>{const Ge=X.items[X.items.length-1].index===we-1;return(De||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===we)&&Ge}),re(([[,X]])=>X-1),rt())),ie=mr(W(he(m),fe(({items:X})=>X.length>0&&X[0].index===0),cn(0),rt())),de=mr(W(he(m),Te(U),fe(([{items:X},we])=>X.length>0&&!we),re(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),rt(Ex),Hn(0)));ce(de,h.scrollSeekRangeChanged),ce(W(S,Te(b,x,z,k),re(([X,we,De,Ge,it])=>{const Ae=Px(X),{align:ve,behavior:be,offset:Xe}=Ae;let Ke=Ae.index;Ke==="LAST"&&(Ke=Ge-1),Ke=gc(0,Ke,gh(Ge-1,Ke));let Qe=xh(we,it,De,Ke);return ve==="end"?Qe=t5(Qe-we.height+De.height):ve==="center"&&(Qe=t5(Qe-we.height/2+De.height/2)),Xe&&(Qe+=Xe),{behavior:be,top:Qe}})),c);const Be=Rt(W(m,re(X=>X.offsetBottom+X.bottom)),0);return ce(W(C,re(X=>({height:X.visibleHeight,width:X.visibleWidth}))),b),{customScrollParent:E,data:_,deviation:F,footerHeight:s,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:O,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:S,scrollTop:l,smoothScrollTargetReached:u,totalCount:z,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:A,windowViewportRect:C,...h,gridState:m,horizontalDirection:Q,initialTopMostItemIndex:L,totalListHeight:Be,...f,endReached:me,propsReady:g,rangeChanged:de,startReached:ie,stateChanged:P,stateRestoreInProgress:U,...D}},tt(uh,Wt,mc,Rx,bs,ph,hs));function n5(e,t,r){return gc(1,Gu((e+r)/(Gu(t)+r)))}function s5(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=xh(e,t,r,n[0].index);return{bottom:xh(e,t,r,n[n.length-1].index)+s,top:a}}function xh(e,t,r,n){const s=n5(e.width,r.width,t.column),a=Gu(n/s),o=a*r.height+gc(0,a-1)*t.row;return o>0?o+t.row:o}const FV=$e(()=>{const e=Y(d=>`Item ${d}`),t=Y({}),r=Y(null),n=Y("virtuoso-grid-item"),s=Y("virtuoso-grid-list"),a=Y(bh),o=Y("div"),i=Y(bo),c=(d,f=null)=>Rt(W(t,re(h=>h[d]),rt()),f),l=Y(!1),u=Y(!1);return ce(he(u),l),{components:t,computeItemKey:a,context:r,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:s,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),UV=$e(([e,t])=>({...e,...t}),tt(BV,FV)),OV=M.memo(function(){const e=ot("gridState"),t=ot("listClassName"),r=ot("itemClassName"),n=ot("itemContent"),s=ot("computeItemKey"),a=ot("isSeeking"),o=Pr("scrollHeight"),i=ot("ItemComponent"),c=ot("ListComponent"),l=ot("ScrollSeekPlaceholder"),u=ot("context"),d=Pr("itemDimensions"),f=Pr("gap"),h=ot("log"),y=ot("stateRestoreInProgress"),g=Pr("reportReadyState"),E=ia(M.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const A=v.firstChild;if(A){const{height:C,width:D}=A.getBoundingClientRect();d({height:C,width:D})}f({column:o5("column-gap",getComputedStyle(v).columnGap,h),row:o5("row-gap",getComputedStyle(v).rowGap,h)})},[o,d,f,h]),!0,!1);return Wx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:B.jsx(c,{className:t,ref:E,...Ht(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const w=s(v.index,v.data,u);return a?B.jsx(l,{...Ht(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):M.createElement(i,{...Ht(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),DV=M.memo(function(){const e=ot("HeaderComponent"),t=Pr("headerHeight"),r=ot("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,!1),s=ot("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),_V=M.memo(function(){const e=ot("FooterComponent"),t=Pr("footerHeight"),r=ot("headerFooterTag"),n=ia(M.useMemo(()=>a=>{t(ms(a,"height"))},[t]),!0,!1),s=ot("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Ht(e,s)})}):null}),MV=({children:e})=>{const t=M.useContext(Vx),r=Pr("itemDimensions"),n=Pr("viewportDimensions"),s=ia(M.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return M.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),B.jsx("div",{ref:s,style:$u(!1),children:e})},NV=({children:e})=>{const t=M.useContext(Vx),r=Pr("windowViewportRect"),n=Pr("itemDimensions"),s=ot("customScrollParent"),a=mx(r,s,!1);return M.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),B.jsx("div",{ref:a,style:$u(!1),children:e})},LV=M.memo(function({...e}){const t=ot("useWindowScroll"),r=ot("customScrollParent"),n=r||t?RV:zV,s=r||t?NV:MV,a=ot("context");return B.jsx(n,{...e,...Ht(n,a),children:B.jsxs(s,{children:[B.jsx(DV,{}),B.jsx(OV,{}),B.jsx(_V,{})]})})}),{useEmitter:a5,useEmitterValue:ot,usePublisher:Pr}=Gx(UV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},LV),zV=Xx({useEmitter:a5,useEmitterValue:ot,usePublisher:Pr}),RV=Qx({useEmitter:a5,useEmitterValue:ot,usePublisher:Pr});function o5(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,nr.WARN),t==="normal"?0:parseInt(t??"0",10)}var wh={},i5;function HV(){if(i5)return wh;i5=1;var e=lu.GenIcon;return wh.AiFillQuestionCircle=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]})(r)},wh}var $V=HV();function GV({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=M.useState(!1);return M.useEffect(()=>{a(!1)},[e]),e&&!s?B.jsx("img",{alt:n,style:r,onError:()=>a(!0),className:`twap-token-logo ${t}`,src:e}):B.jsx($V.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const jV=()=>B.jsx("div",{className:"twap-orders__loader",children:B.jsx("p",{children:"Loading..."})}),VV=()=>{const{isLoading:e}=Ou(),t=nx(),r=te(a=>a.state.orderIdsToCancel),n=te(a=>a.state.cancelOrdersMode),s=sx();return B.jsx(B.Fragment,{children:e?B.jsx(jV,{}):t!=null&&t.length?B.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:B.jsx(AV,{style:{height:"100%"},data:t,itemContent:(a,o)=>B.jsx(WV,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):B.jsx(qV,{})})},WV=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=te(i=>i.updateState),a=xt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=xt.useCallback(()=>{n?t(e==null?void 0:e.id):a()},[n,t,a,e==null?void 0:e.id]);return B.jsx("div",{className:`twap-orders__list-item twap-orders__list-item-${e.status} ${n?"twap-orders__list-item-select-mode":""} ${r?"twap-orders__list-item-selected":""}`,onClick:o,children:B.jsxs("div",{className:"twap-orders__list-item-content",children:[B.jsx(KV,{order:e}),B.jsx(YV,{value:e.progress||0}),B.jsxs("div",{className:"twap-orders__list-item-tokens",children:[B.jsx(c5,{address:e.srcTokenAddress}),B.jsx(bj.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),B.jsx(c5,{address:e.dstTokenAddress})]})]})})},qV=()=>{const e=te(n=>n.state.orderHistoryStatusFilter),t=Me(),r=xt.useMemo(()=>e||"",[e]);return B.jsx("div",{className:"twap-orders__list-empty",children:B.jsx("p",{children:t("noOrders",{status:r})})})},KV=({order:e})=>{const t=e&&e.status,r=tx(e),n=W0(e.createdAt);return B.jsxs("div",{className:"twap-orders__list-item-header",children:[B.jsxs("p",{className:"twap-orders__list-item-header-title",children:[r," ",B.jsx("span",{children:`(${n})`})]}),B.jsx("p",{className:"twap-orders__list-item-header-status",children:t})]})},c5=e=>{const{useToken:t,components:r}=oe(),n=t==null?void 0:t(e.address);return B.jsx("div",{className:"twap-orders__list-item-token",children:n?B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"twap-orders__list-item-token-logo",children:r.TokenLogo?B.jsx(r.TokenLogo,{token:n}):B.jsx(GV,{logo:n==null?void 0:n.logoUrl})}),B.jsx("p",{className:"twap-orders__list-item-token-symbol",children:n==null?void 0:n.symbol})]}):B.jsx("div",{})})};function YV(e){return B.jsxs("div",{className:"twap-orders__list-item-progress",children:[B.jsx("div",{className:"twap-orders__list-item-progress-bar",children:B.jsx("div",{className:"twap-orders__list-item-progress-bar-filled",style:{width:`${e.value}%`}})}),B.jsx("div",{className:"twap-orders__list-item-token-progress-label",children:B.jsx("p",{children:`${Math.round(e.value)}%`})})]})}const ZV=()=>{const e=te(r=>r.state.selectedOrderID),t=e!==void 0;return B.jsx("div",{className:`twap-orders ${e!==void 0?"twap-orders__show-selected":""}`,children:t?B.jsx(YG,{}):B.jsx(VV,{})})},XV=e=>{const t=Me(),{marketPrice:r,typedInputAmount:n}=oe();return M.useMemo(()=>{const{isError:a,value:o}=vm(e);if(!(!a||j(n||"0").isZero()||!r))return{type:Gt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${Nf(o)} ${t("minutes")}`})}},[e,t,n,r])},ua=()=>{const{callbacks:e}=oe(),t=te(a=>a.state.typedFillDelay),r=te(a=>a.updateState),n=M.useMemo(()=>t||Fc,[t]),s=XV(n);return{fillDelay:n,onChange:M.useCallback(a=>{var o;r({typedFillDelay:a}),(o=e==null?void 0:e.onFillDelayChange)==null||o.call(e,a)},[r,e]),error:s,milliseconds:n.unit*n.value}},QV=()=>{const{onChange:e,fillDelay:t,error:r}=ua(),n=Me(),s=M.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=M.useCallback(o=>e({unit:o,value:t.value}),[e,t]);return{onInputChange:s,onUnitSelect:a,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:r,label:n("tradeIntervalTitle"),tooltip:n("tradeIntervalTooltip")}},dn=()=>{const{srcToken:e,typedInputAmount:t}=oe(),r=Me(),s=te(a=>a.state.acceptedSrcAmount)||t;return{amountWei:Y2(e==null?void 0:e.decimals,s),amountUI:s,error:j(s||0).isZero()?r("enterAmount"):void 0}},JV=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a,typedInputAmount:o}=oe(),i=Me();return M.useMemo(()=>{if(j(o||"0").isZero()||!s||j(n||"0").isZero())return;if(!e)return{type:Gt.MIN_CHUNKS,value:1,message:i("minChunksError",{minChunks:"1"})};const{isError:c}=km(e,t,r);if(c)return{type:Gt.MAX_CHUNKS,value:t,message:i("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=Em(o||"",n||"",a||0);if(l)return{type:Gt.MIN_TRADE_SIZE,value:u,message:i("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,o,n,a,i,s])},qr=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=oe(),s=te(g=>g.state.typedChunks),a=ua().fillDelay,o=te(g=>g.updateState),{amountWei:i,amountUI:c}=dn(),l=M.useMemo(()=>dm(a,c||"",t||"",n||0),[c,t,n,a]),u=M.useMemo(()=>um(l,r,s),[l,s,r]),d=M.useCallback(g=>o({typedChunks:g}),[o]),f=M.useMemo(()=>hm(i||"",u),[i,u]),h=Rn(e==null?void 0:e.decimals,f),y=M.useMemo(()=>t?j(h||"0").times(t||0).toString():"0",[h,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:h,amountPerTradeWei:f,amountPerTradeUsd:y,onChange:d,error:JV(u,l)}},eW=()=>{const{srcToken:e,dstToken:t}=oe(),r=Me(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=qr(),u=Ze({value:o}),d=Ze({value:a});return{error:i,maxTrades:c,totalTrades:s,amountPerTrade:u,amountPerTradeWei:l,onChange:n,label:r("tradesAmountTitle"),tooltip:r("totalTradesTooltip"),amountPerTradeUsd:d,fromToken:e,toToken:t}},tW=e=>{const{module:t,marketPrice:r}=oe(),n=Me();return M.useMemo(()=>{const s=xm(t,e),a=wm(e);if(r){if(s.isError)return{type:Gt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(n6(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Gt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(Nf(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},vh=()=>{const{module:e,callbacks:t}=oe(),r=te(c=>c.state.typedDuration),n=te(c=>c.updateState),s=qr().totalTrades,a=ua().fillDelay,o=M.useMemo(()=>lm(e,s,a,r),[s,a,r,e]),i=tW(o);return{duration:o,setDuration:M.useCallback(c=>{var l;n({typedDuration:c}),(l=t==null?void 0:t.onDurationChange)==null||l.call(t,c)},[n,t]),error:i}},rW=()=>{const{module:e}=oe(),t=Me(),{duration:r,setDuration:n,error:s}=vh(),a=M.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=M.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=M.useMemo(()=>e===ye.STOP_LOSS?t("stopLossDurationTooltip"):t("maxDurationTooltip"),[t,e]);return{duration:r,onChange:n,milliseconds:r.unit*r.value,onInputChange:a,onUnitSelect:o,label:t("expiry"),tooltip:i,error:s}},nW=()=>{const e=te(a=>a.state.isMarketOrder),{module:t}=oe(),r=Me(),n=M.useMemo(()=>{if(e&&t===ye.STOP_LOSS)return{text:r("triggerMarketPriceDisclaimer"),url:id}},[e,r,t]),s=M.useMemo(()=>{if(!(t!==ye.LIMIT&&t!==ye.TWAP))return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,t]);return n||s},Vu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=oe(),n=te(l=>l.updateState),s=te(l=>l.state.isInvertedTrade),a=te(l=>l.state.typedTriggerPrice),o=te(l=>l.state.typedLimitPrice),i=te(l=>l.state.isMarketOrder);return{onInvert:M.useCallback(()=>{a!==void 0&&n({typedTriggerPrice:j(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:j(1).div(o).toFixed()}),n({isInvertedTrade:!s})},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},l5=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=oe(),{isInverted:c}=Vu(),l=M.useMemo(()=>j((()=>{if(e!==void 0){const E=c?j(e).isZero()?j(0):j(1).div(e):j(e);return Bl(E.toFixed(),t)}if(n!==void 0&&j(r||"0").gt(0)&&!j(r||"0").isNaN()){const E=j(r||"0"),v=j(n||0).div(100);return E.plus(E.multipliedBy(v)).decimalPlaces(0).toFixed()}return j(r).gt(0)?r:""})()).decimalPlaces(0).toFixed(),[e,n,t,r,c]),u=M.useCallback(g=>{s(g),a(null)},[s,a]),d=M.useCallback(g=>{s(void 0),a(g)},[s,a]),f=M.useMemo(()=>{if(!r||j(r).isZero())return"";if(n!=null)return n;if(l){const g=j(r),v=j(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return j(v||"0").isZero()?"":v}return""},[l,r,n]),h=M.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const E=Ii(l,t);if(j(E||"0").isZero())return"";g=c?j(1).div(E).toFixed():E}return _f(g,6,t)},[e,t,l,c]),y=aa(c?o:i,h||"0");return{amountWei:j(l).isNaN()?"":l,amountUI:j(h).isNaN()?"":h,selectedPercentage:f,onChange:u,onPercentageChange:d,isInverted:c,usd:j(y).isNaN()?"":y}},sW=()=>{const{module:e}=oe();return M.useMemo(()=>e===ye.STOP_LOSS?em:tm,[e])},Eh=()=>{const{module:e}=oe(),t=te(r=>r.state.isMarketOrder);return M.useMemo(()=>e!==ye.STOP_LOSS&&e!==ye.TAKE_PROFIT||t?void 0:e===ye.STOP_LOSS?rm:nm,[e,t])},aW=(e="")=>{const{module:t,marketPrice:r,typedInputAmount:n}=oe(),s=Me();return M.useMemo(()=>{if(j(n||"0").isZero()||!r||t!==ye.STOP_LOSS&&t!==ye.TAKE_PROFIT)return;const a=mm(r||"",e||"",t);if(a!=null&&a.isError)return{type:Gt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:s("StopLossTriggerPriceError")||""};const o=bm(r||"",e||"",t);if(o!=null&&o.isError)return{type:Gt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:s("TakeProfitTriggerPriceError")||""};if(!e||j(e||0).isZero())return{type:Gt.EMPTY_TRIGGER_PRICE,value:e,message:s("emptyTriggerPrice")||""}},[r,e,t,s,n])},oW=e=>{const{srcToken:t,dstToken:r,module:n,dstUsd1Token:s}=oe(),a=qr().amountPerTradeWei,o=te(l=>l.state.isMarketOrder),i=M.useMemo(()=>cm(n,a,e,(t==null?void 0:t.decimals)||0),[e,a,o,t==null?void 0:t.decimals,n]),c=Rn((r==null?void 0:r.decimals)||0,i);return{amountWei:i,amountUI:c,usd:aa(c,s)}},da=()=>{const{dstToken:e,marketPrice:t,module:r,callbacks:n}=oe(),s=te(y=>y.updateState),a=sW(),o=te(y=>y.state.triggerPricePercent),i=o===void 0?a:o,c=r===ye.STOP_LOSS||r===ye.TAKE_PROFIT,l=l5({typedValue:te(y=>y.state.typedTriggerPrice),percentage:i,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:c?t:void 0,setValue:M.useCallback(y=>{var g;s({typedTriggerPrice:y}),(g=n==null?void 0:n.onTriggerPriceChange)==null||g.call(n,y||"")},[s,n]),setPercentage:M.useCallback(y=>{var g;s({triggerPricePercent:y}),(g=n==null?void 0:n.onTriggerPricePercentChange)==null||g.call(n,y||"")},[s,n])}),u=aW(l.amountWei),{amountWei:d,amountUI:f,usd:h}=oW(l.amountWei);return M.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:f,pricePerChunkUsd:h}),[l,u,d,f,h])},iW=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=oe(),n=Me(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l,pricePerChunkUI:u,pricePerChunkUsd:d}=da(),f=te(C=>C.state.isMarketOrder),h=te(C=>C.updateState),{isInverted:y,onInvert:g,fromToken:E,toToken:v}=Vu(),w=M.useCallback(()=>{h({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[h]),A=e!==ye.STOP_LOSS&&e!==ye.TAKE_PROFIT;return{price:s,amountPerChunk:u,amountPerChunkUsd:d,error:l,label:n("stopLossLabel"),tooltip:e===ye.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!f,onReset:w,usd:i,fromToken:E,toToken:v,prefix:"",isLoading:r||!t,isInverted:y,hide:A,onInvert:g,totalTrades:qr().totalTrades}},cW=e=>{const{module:t,marketPrice:r,typedInputAmount:n}=oe(),s=Me(),{amountWei:a}=da(),o=te(i=>i.state.isMarketOrder);return M.useMemo(()=>{if(j(n||"0").isZero()||!a||!r)return;const i=ym(a,e,o,t),c=gm(a,e,o,t);if(i!=null&&i.isError)return{type:Gt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Gt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:c.value};if(e&&j(e||0).isZero())return{type:Gt.MISSING_LIMIT_PRICE,message:s("emptyLimitPrice")||"",value:e||""}},[e,s,a,t,o,n,r])},xc=()=>{const{dstToken:e,marketPrice:t,callbacks:r}=oe(),n=te(l=>l.updateState),s=Eh(),a=te(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=l5({typedValue:te(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:t,setValue:M.useCallback(l=>{var u;n({typedLimitPrice:l}),(u=r==null?void 0:r.onLimitPriceChange)==null||u.call(r,l||"")},[n,r]),setPercentage:M.useCallback(l=>{var u;n({limitPricePercent:l}),(u=r==null?void 0:r.onLimitPricePercentChange)==null||u.call(r,l||"")},[n,r])}),c=cW(i.amountWei);return M.useMemo(()=>({...i,error:c}),[i,c])},lW=()=>{const{module:e}=oe(),t=te(i=>i.updateState),r=te(i=>i.state.isMarketOrder),n=Eh(),s=te(i=>i.state.triggerPricePercent)||0,a=e===ye.LIMIT,o=M.useCallback(()=>{!r&&e===ye.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},u5=()=>{const{module:e,marketPrice:t}=oe(),r=xc().amountWei,n=da().amountWei,s=te(a=>a.state.isMarketOrder);return e===ye.LIMIT||!s?r||"":e===ye.STOP_LOSS||e===ye.TAKE_PROFIT?n||"":t||""},wc=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=u5(),s=dn().amountWei,a=M.useMemo(()=>om(s||"",n,(e==null?void 0:e.decimals)||0),[s,n,e==null?void 0:e.decimals]),o=Rn(t==null?void 0:t.decimals,a);return{amountWei:a,amountUI:o,usd:aa(o,r)}},Wu=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=u5(),s=qr().amountPerTradeWei,a=te(c=>c.state.isMarketOrder),o=M.useMemo(()=>im(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Rn(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:aa(i,r)}},uW=()=>{const{typedInputAmount:e,marketPriceLoading:t,dstToken:r}=oe(),{amountUI:n,usd:s}=wc(),o=SG()?e:n;return{value:Z2(o,7),valueWei:Y2(r==null?void 0:r.decimals,o),isLoading:t,usd:s}},dW=()=>{const{module:e,marketPriceLoading:t}=oe(),r=Me(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=xc(),{amountUI:l,usd:u}=Wu(),d=te(D=>D.updateState),f=Eh(),{isLimitPrice:h,toggleLimitPrice:y}=lW(),{isInverted:g,onInvert:E,fromToken:v,toToken:w}=Vu(),A=M.useCallback(()=>{d({typedLimitPrice:void 0}),d({limitPricePercent:f})},[d,e,f]),C=M.useMemo(()=>e===ye.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,amountPerChunk:l,amountPerChunkUsd:u,error:c,label:r("limitPrice"),tooltip:C,onChange:s,onPercentageChange:a,onReset:A,usd:o,fromToken:v,tradesAmount:qr().totalTrades,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:h,toggleLimitPrice:y,onInvert:E}};function d5(){const{marketPrice:e,marketPriceLoading:t,typedInputAmount:r,srcUsd1Token:n,srcBalance:s,chainId:a}=oe(),o=te(g=>g.state.swapExecution.status),i=Me(),{error:c}=da(),{error:l}=xc(),{error:u}=qr(),{error:d}=ua(),{error:f}=vh(),h=dn().amountWei,y=M.useMemo(()=>{if(s&&j(h).gt(s))return{type:Gt.INSUFFICIENT_BALANCE,message:i("insufficientFunds"),value:s||""}},[s,h,i,a]);return M.useMemo(()=>Am({marketPrice:e,typedInputAmount:r,srcUsd1Token:n,marketPriceLoading:t,triggerPriceError:c,limitPriceError:l,tradesError:u,fillDelayError:d,durationError:f,balanceError:y}),[e,t,r,c,l,u,d,f,y,o,n])}const pW=()=>{const e=te(n=>n.state.isMarketOrder),t=te(n=>n.updateState),r=M.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},kh=()=>{const e=te(r=>r.state.currentTime),t=vh().duration;return M.useMemo(()=>pm(e,t),[e,t])},fW=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=oe(),r=dn().amountUI,n=wc().amountUI,s=aa(r,e),a=aa(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},hW=()=>{const{fees:e,dstUsd1Token:t}=oe(),{amountUI:r}=wc(),n=M.useMemo(()=>!e||!r?"":j(r).multipliedBy(e).dividedBy(100).toFixed(),[r,e]);return{amount:n,percent:e,usd:aa(n,t)}},p5=()=>{const{srcToken:e,dstToken:t,account:r,chainId:n,slippage:s,config:a,module:o}=oe(),{amountWei:i}=dn(),{amountWei:c}=xc(),{amountPerTradeWei:l,totalTrades:u}=qr(),d=kh(),{amountWei:f}=Wu(),{pricePerChunkWei:h}=da(),{milliseconds:y}=ua();return M.useMemo(()=>{var g;return{srcToken:e,dstToken:t,limitPrice:c,deadline:d,srcAmount:i,srcAmountPerTrade:l,totalTrades:u,minDestAmountPerTrade:f,tradeInterval:y,triggerPricePerTrade:h,maker:r,rePermitData:Sm({chainId:n,srcToken:Is((e==null?void 0:e.address)||"")?((g=Bs(n))==null?void 0:g.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:i,deadlineMillis:d,fillDelayMillis:!u||u===1?0:y,slippage:s*100,account:r,srcAmountPerTrade:l,dstMinAmountPerTrade:f,triggerAmountPerTrade:h,config:a,module:o})}},[e,t,c,d,i,l,u,f,h,r,y,s,n,a,o])},f5=()=>{const{srcToken:e,dstToken:t,account:r}=oe(),n=Me(),{amountUI:s,usd:a}=Wu(),{amountPerTradeUI:o,amountPerTradeUsd:i,totalTrades:c}=qr(),{amountUI:l,usd:u}=da(),d=kh(),{amountUI:f,usd:h}=xc(),{amount:y,percent:g,usd:E}=hW(),{milliseconds:v}=ua(),{amountUI:w}=wc(),{srcAmountUsd:A,dstAmountUsd:C}=fW(),D=dn().amountUI,z=te(x=>x.state.isMarketOrder),T=X2({srcToken:e,dstToken:t,account:r,limitPrice:z?void 0:f,limitPriceUsd:z?void 0:h,deadline:d,tradeInterval:v,srcAmount:D,totalTrades:c,srcAmountPerTrade:o,srcAmountPerTradeUsd:i,minDestAmountPerTrade:s,minDestAmountPerTradeUsd:a,triggerPrice:l,triggerPriceUsd:u,srcUsd:A,dstUsd:C,dstAmount:w}),m=Ze({value:y}),b=Ze({value:E});return M.useMemo(()=>({...T,fees:{label:n("fees",{value:`${g}%`}),amount:m,usd:b||"",percentage:g}}),[T,m,b,g])},h5=M.createContext({}),mW=({children:e,...t})=>B.jsx(h5.Provider,{value:t,children:e}),bW=()=>M.useContext(h5),m5=()=>{var s,a;const e=Me(),{wrapTxHash:t,srcToken:r}=te(o=>o.state.swapExecution),n=(a=(s=oc())==null?void 0:s.wToken)==null?void 0:a.symbol;return t?B.jsx("p",{className:"twap-error-wrap-msg",children:e("wrapMsg",{symbol:(r==null?void 0:r.symbol)||"",wSymbol:n||""})}):null},b5=()=>{const e=Me(),t=te(n=>n.state.swapExecution.status),r=ex();return t===ht.SUCCESS?e("createOrderActionSuccess",{name:r}):e("createOrderAction",{name:r})},yW=()=>{const e=te(y=>y.state.swapExecution.srcToken),t=Me(),{step:r,wrapTxHash:n,approveTxHash:s}=te(y=>y.state.swapExecution),a=oc(),o=V0(n),i=V0(n),c=V0(s),l=te(y=>y.state.swapExecution.status),d=Is((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",f=a==null?void 0:a.wToken.symbol,h=b5();return M.useMemo(()=>r===Ds.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ds.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:h,footerText:l===ht.LOADING?t("proceedInWallet"):void 0},[r,c,d,h,t,o,i,f,l])},gW=({error:e})=>B.jsxs("div",{className:"twap-error",children:[B.jsx("h2",{className:"twap-error-title",children:"Transaction failed"}),(e==null?void 0:e.code)&&B.jsxs("p",{className:"twap-error-code",children:["Error code: ",e==null?void 0:e.code]}),B.jsx(m5,{})]});function xW({error:e}){const{components:t}=oe(),r=Me(),n=te(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=B.jsx(Xn.Failed,{error:B.jsx(gW,{error:e}),footerLink:id,footerText:r("viewOnExplorer")});return s?B.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const wW=()=>{const{components:e}=oe(),t=te(u=>u.state.swapExecution.srcToken),r=te(u=>u.state.swapExecution.dstToken),{reviewDetails:n}=bW(),s=Me(),a=te(u=>{var d;return!!((d=u.state.swapExecution)!=null&&d.status)}),o=f5(),i=e.USD,c=e.SubmitOrderMainView,l=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:i?B.jsx(i,{value:o.srcUsd,isLoading:!1}):`$${o.srcUsd}`,outUsd:i?B.jsx(i,{value:o.dstUsd,isLoading:!1}):`$${o.dstUsd}`}),!a&&B.jsxs("div",{className:"twap-create-order-bottom",children:[B.jsx(Ee.Container,{children:B.jsxs("div",{className:"twap-create-order-details",children:[B.jsx(Ee.Deadline,{deadline:o.deadline.value,label:o.deadline.label,tooltip:o.deadline.tooltip||""}),B.jsx(Ee.Price,{srcToken:t,price:o.triggerPrice.value,dstToken:r,label:o.triggerPrice.label,tooltip:o.triggerPrice.tooltip,usd:o.triggerPrice.usd}),B.jsx(Ee.Price,{srcToken:t,price:o.limitPrice.value,dstToken:r,label:o.limitPrice.label,usd:o.limitPrice.usd,tooltip:o.limitPrice.tooltip}),B.jsx(Ee.MinDestAmount,{dstToken:r,dstMinAmountOut:o.minDestAmountPerTrade.value,label:o.minDestAmountPerTrade.label,tooltip:o.minDestAmountPerTrade.tooltip||"",usd:o.minDestAmountPerTrade.usd}),B.jsx(Ee.TradeSize,{tradeSize:o.sizePerTrade.value,trades:o.totalTrades.value,srcToken:t,label:o.sizePerTrade.label,tooltip:o.sizePerTrade.tooltip}),B.jsx(Ee.TradesAmount,{trades:o.totalTrades.value,label:o.totalTrades.label,tooltip:o.totalTrades.tooltip}),B.jsx(Ee.TradeInterval,{chunks:o.totalTrades.value,fillDelayMillis:o.tradeInterval.value,label:o.tradeInterval.label,tooltip:o.tradeInterval.tooltip}),B.jsx(Ee.Recipient,{}),o.fees.amount&&B.jsx(Ee.Fees,{fees:o.fees.amount,label:o.fees.label,usd:o.fees.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return c?B.jsx(c,{children:l}):l},vW=e=>{const{status:t,stepIndex:r,totalSteps:n,parsedError:s}=te(w=>w.state.swapExecution),{components:a}=oe(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=oe(),f=dn().amountUI,h=wc().amountUI,y=Ze({value:f,decimalScale:2}),g=Ze({value:h,decimalScale:2}),E=M.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=M.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return B.jsx(mW,{...e,children:B.jsx(Xn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:yW(),currentStepIndex:r,inToken:E,outToken:v,components:{SrcTokenLogo:l&&B.jsx(l,{token:u}),DstTokenLogo:l&&B.jsx(l,{token:d}),Failed:B.jsx(xW,{error:s}),Success:B.jsx(EW,{}),Main:B.jsx(wW,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},EW=()=>{const e=b5(),{components:t}=oe(),r=te(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Success,{title:e}),B.jsx(m5,{})]});return n?B.jsx(n,{newOrderId:r,children:s}):s},kW=()=>{const{supportedChains:e}=oe();return M.useMemo(()=>e,[e])},CW=()=>{const{config:e}=oe();return M.useMemo(()=>({spender:e.repermit}),[e])},TW=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=oe(),o=(c=oc())==null?void 0:c.wToken,i=q0();return Zr({mutationFn:async({onHash:l,srcAmountWei:u})=>{var h,y;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!o)throw new Error("tokenAddress is not defined");let d;dt.onWrapRequest(),(h=s==null?void 0:s.onWrapRequest)==null||h.call(s),r!=null&&r.wrap?d=await r.wrap(u):d=await t.writeContract({abi:Mh,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const f=await i(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to wrap token");return dt.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:f.transactionHash,explorerUrl:Bi(f.transactionHash,a),amount:Ii(u,o.decimals)}),n==null||n(),f},onError:l=>{throw dt.onWrapError(l),l}})},AW=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=oe(),s=p5().rePermitData,{refetch:a}=K0();return Zr({mutationFn:async()=>{var y,g,E,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;dt.onSignOrderRequest(o),(y=n==null?void 0:n.onSignOrderRequest)==null||y.call(n),console.log({domain:i,types:c,primaryType:l,message:o,account:e}),console.log("Using domain:",i),console.log("Using types:",c),console.log("Order data to sign:",JSON.stringify(o,null,2)),console.log(`Account address: ${e}`);let u;try{u=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(w){throw(g=n==null?void 0:n.onSignOrderError)==null||g.call(n,w),dt.onSignOrderError(w),w}dt.onSignOrderSuccess(u),(E=n==null?void 0:n.onSignOrderSuccess)==null||E.call(n,u);const d=jT(u),f={v:q(d.v||0),r:d.r,s:d.s},h=await Fm(o,f);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,h),await a(),h}})},y5=()=>{const{account:e,publicClient:t,config:r}=oe();return Zr({mutationFn:async({tokenAddress:n,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!r)throw new Error("missing config");const a=await t.readContract({address:n,abi:Ty,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=j(a||"0").lt(j(s).toString());return{allowance:a,approvalRequired:o}}})},SW=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=oe(),o=q0(),{mutateAsync:i}=y5();return Zr({onError:c=>{dt.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:u})=>{var y,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing config");(y=a==null?void 0:a.onApproveRequest)==null||y.call(a),dt.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Vs}):d=await t.writeContract({abi:Ty,functionName:"approve",account:e,address:c.address,args:[n.repermit,Vs],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const f=await o(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let h=!1;for(let E=0;E<3;E++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){h=!0;break}E<2&&await new Promise(w=>setTimeout(w,3e3))}if(!h)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return dt.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:Bi(f.transactionHash,s),token:c,amount:Ii(u,c.decimals)}),f}})},PW=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=oe(),o=da(),i=dn().amountWei,c=qr().amountPerTradeWei,l=kh(),u=qr().totalTrades,d=ua().fillDelay,f=Wu().amountWei,h=te(y=>y.state.isMarketOrder);return Zr({mutationFn:async()=>{dt.onRequestOrder({account:e,chainId:t,module:s,srcToken:r,dstToken:n,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:d.unit*d.value,minDstAmountOutPerTrade:f,slippage:a,isMarketOrder:h||!1,chunksAmount:u})}})};function IW(e){const t=e.message,r=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:r?Number(r[1]):0}}const BW=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=oe(),s=SW().mutateAsync,a=TW().mutateAsync,o=AW().mutateAsync,{mutateAsync:i}=y5(),c=te(d=>d.updateSwapExecution),{amountWei:l}=dn(),u=PW().mutate;return Zr({mutationFn:async()=>{var f,h;const d=Is((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!r)throw new Error("missing chainId");const y=r6(e,r);c({allowanceLoading:!0,wrapTxHash:void 0,approveTxHash:void 0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let E=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:E,allowanceLoading:!1,status:ht.LOADING}),u(),d&&(c({step:Ds.WRAP}),await a({onHash:A=>c({wrapTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),g&&(c({step:Ds.APPROVE}),await s({token:y,onHash:A=>c({approveTxHash:A}),srcAmountWei:l}),E++,c({stepIndex:E})),c({step:Ds.CREATE});const w=await o();return c({status:ht.SUCCESS,orderId:w.id}),w}catch(y){if(Mf(y))(f=n==null?void 0:n.onSubmitOrderRejected)==null||f.call(n),c({step:void 0,status:void 0,stepIndex:void 0,error:y});else{const g=IW(y);(h=n==null?void 0:n.onSubmitOrderFailed)==null||h.call(n,g),c({status:ht.FAILED,parsedError:g,error:y})}throw y}}})},FW=()=>{const{marketPrice:e,srcToken:t,dstToken:r,resetTypedInputAmount:n}=oe(),s=BW(),a=te(g=>g.updateState),{amountUI:o}=dn(),i=te(g=>g.resetState),c=te(g=>g.state.swapExecution),l=te(g=>g.updateSwapExecution),u=ex(),d=M.useCallback(()=>{(c==null?void 0:c.status)===ht.SUCCESS&&(n(),i())},[c==null?void 0:c.status,i,n]),f=M.useCallback(()=>{(c==null?void 0:c.status)!==ht.LOADING&&(a({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0}),l({srcToken:t,dstToken:r,error:void 0,parsedError:void 0,status:void 0,orderId:void 0}))},[a,t,r]),h=Zr({mutationFn:async()=>(a({acceptedSrcAmount:o,acceptedMarketPrice:e}),await s.mutateAsync())}),y=M.useCallback(()=>h.mutateAsync(),[h]);return M.useMemo(()=>({reset:i,onCloseModal:d,onOpenModal:f,onSubmit:y,orderTitle:u,...c,isLoading:(c==null?void 0:c.status)===ht.LOADING,isSuccess:(c==null?void 0:c.status)===ht.SUCCESS,isFailed:(c==null?void 0:c.status)===ht.FAILED}),[i,d,y,c,u])},UW=()=>{const e=Me(),{marketPrice:t,srcToken:r,dstToken:n,marketPriceLoading:s,srcBalance:a,srcUsd1Token:o,noLiquidity:i,typedInputAmount:c}=oe(),l=s||j(o||"0").isZero()||a===void 0||j(t||"0").isZero(),u=!!(r&&n&&c&&l),d=d5(),f=M.useMemo(()=>i?e("noLiquidity"):j(c||"0").isZero()?e("enterAmount"):e("placeOrder"),[d,e,c,i]),h=!!(d||i||u||j(c||"0").isZero()||!r||!n);return M.useMemo(()=>({disabled:h,text:f,loading:u}),[h,f,u])},OW=({children:e,container:t})=>{const[r,n]=M.useState(!1),s=M.useRef(null);if(M.useLayoutEffect(()=>(n(!0),s.current=t??document.body,()=>{s.current=null}),[]),typeof document>"u"||!r)return null;const a=s.current;return a?As.createPortal(e,a):null};Im(Iw.version);const DW={SubmitOrderPanel:vW,Orders:ZV,Portal:OW};R.CRASH_ERROR_MESSAGE=rw,R.Components=DW,R.Configs=Dt,R.DEFAULT_DURATION_OPTIONS=JL,R.DEFAULT_FILL_DELAY=Fc,R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE=rm,R.DEFAULT_STOP_LOSS_PERCENTAGE=em,R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE=nm,R.DEFAULT_TAKE_PROFIT_PERCENTAGE=tm,R.DISCLAIMER_URL=tw,R.EIP712_TYPES=Jh,R.ERC20_ABI=H5,R.EXCLUSIVITY_OVERRIDE_BPS=Z5,R.FEES=Y5,R.IWETH_ABI=Mh,R.InputErrors=Gt,R.LEGACY_EXCHANGES_MAP=Xh,R.MAX_ORDER_DURATION_MILLIS=Ca,R.MIN_CHUNKS=K5,R.MIN_FILL_DELAY_MILLIS=Ic,R.MIN_FILL_DELAY_MINUTES=qh,R.MIN_ORDER_DURATION_MILLIS=ad,R.Module=ye,R.ORBS_LOGO=Q5,R.ORBS_LOGO_FALLBACK=J5,R.ORBS_SLTP_FAQ_URL=X5,R.ORBS_TWAP_FAQ_URL=id,R.ORBS_WEBSITE_URL=ew,R.OrderStatus=ct,R.OrderType=ze,R.PRICE_PROTECTION_SETTINGS=ez,R.Partners=zh,R.QUERY_PARAMS=Ta,R.REPERMIT_ABI=Nh,R.REPERMIT_PRIMARY_TYPE=Qh,R.SUGGEST_CHUNK_VALUE=q5,R.SpotProvider=XL,R.Steps=Ds,R.SwapStatus=ht,R.THE_GRAPH_ORDERS_API=Kh,R.TWAP_ABI=Lh,R.TimeUnit=$t,R.analytics=dt,R.buildRePermitOrderData=Sm,R.buildV2Order=pd,R.copy=WT,R.ensureWrappedToken=r6,R.eqIgnoreCase=Ps,R.fillDelayText=t6,R.formatDecimals=_f,R.getAccountOrders=_m,R.getApiEndpoint=sd,R.getChunks=um,R.getConfig=ld,R.getDeadline=pm,R.getDestTokenAmount=om,R.getDestTokenMinAmountPerChunk=im,R.getDuration=lm,R.getErrors=Am,R.getEstimatedDelayBetweenChunksMillis=fm,R.getExplorerUrl=Bi,R.getMaxChunksError=km,R.getMaxFillDelayError=iw,R.getMaxOrderDurationError=xm,R.getMaxPossibleChunks=dm,R.getMinChunkSizeUsd=Tm,R.getMinFillDelayError=vm,R.getMinNativeBalance=KT,R.getMinOrderDurationError=wm,R.getMinTradeSizeError=Em,R.getNetwork=Bs,R.getOrderExcecutionRate=Gh,R.getOrderFillDelayMillis=td,R.getOrderLimitPriceRate=jh,R.getOrderType=YT,R.getPartnerChains=$h,R.getPartnerIdentifier=_t,R.getPartners=Cm,R.getSrcTokenChunkAmount=hm,R.getStopLossLimitPriceError=ym,R.getStopLossPriceError=mm,R.getTakeProfitLimitPriceError=gm,R.getTakeProfitPriceError=bm,R.getTriggerPricePerChunk=cm,R.getTriggerPricePerTrade=Vh,R.isNativeAddress=Is,R.isTxRejected=Mf,R.makeElipsisAddress=Df,R.maxUint256=Bc,R.millisToDays=n6,R.millisToMinutes=Nf,R.nativeTokenAddresses=Zh,R.networks=Ft,R.parseError=qT,R.removeCommas=VT,R.setApiMode=W5,R.setUIVersion=Im,R.shouldUnwrapOnly=zf,R.shouldWrapOnly=Lf,R.submitOrder=Fm,R.toAmountUi=Ii,R.toAmountWei=Bl,R.useAddresses=CW,R.useDisclaimerPanel=nW,R.useDstTokenPanel=uW,R.useDurationPanel=rW,R.useFillDelayPanel=QV,R.useFormatNumber=Ze,R.useInputErrors=d5,R.useInvertTradePanel=Vu,R.useLimitPricePanel=dW,R.useOrder=p5,R.useOrderHistoryPanel=qG,R.useOrderInfo=f5,R.usePartnerChains=kW,R.useSubmitOrderButton=UW,R.useSubmitOrderPanel=FW,R.useTogglePricePanel=pW,R.useTradesPanel=eW,R.useTranslations=Me,R.useTriggerPricePanel=iW,R.zeroAddress=Yh,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));