1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,982615,365087,909744,626338,t=>{"use strict";function e(t){let e=t.state.current,r=t.state.connections.get(e),s=r?.accounts,i=s?.[0],n=t.chains.find(t=>t.id===r?.chainId),o=t.state.status;switch(o){case"connected":return{address:i,addresses:s,chain:n,chainId:r?.chainId,connector:r?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case"reconnecting":return{address:i,addresses:s,chain:n,chainId:r?.chainId,connector:r?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case"connecting":return{address:i,addresses:s,chain:n,chainId:r?.chainId,connector:r?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}function r(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){let s,i;if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)&&Array.isArray(e)){if((s=t.length)!==e.length)return!1;for(i=s;0!=i--;)if(!r(t[i],e[i]))return!1;return!0}if("function"==typeof t.valueOf&&t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if("function"==typeof t.toString&&t.toString!==Object.prototype.toString)return t.toString()===e.toString();let n=Object.keys(t);if((s=n.length)!==Object.keys(e).length)return!1;for(i=s;0!=i--;)if(!Object.hasOwn(e,n[i]))return!1;for(i=s;0!=i--;){let s=n[i];if(s&&!r(t[s],e[s]))return!1}return!0}return t!=t&&e!=e}function s(t,s){let{onChange:i}=s;return t.subscribe(()=>e(t),i,{equalityFn(t,e){let{connector:s,...i}=t,{connector:n,...o}=e;return r(i,o)&&s?.id===n?.id&&s?.uid===n?.uid}})}t.s(["deepEqual",()=>r],365087),t.s(["watchAccount",()=>s],909744);var i=t.i(210920),n=t.i(271645),o=t.i(430224);let a=t=>"object"==typeof t&&!Array.isArray(t);function u(t={}){let c=(0,i.useConfig)(t);return function(t,e,s=e,i=r){let u=(0,n.useRef)([]),c=(0,o.useSyncExternalStoreWithSelector)(t,e,s,t=>t,(t,e)=>{if(a(t)&&a(e)&&u.current.length){for(let r of u.current)if(!i(t[r],e[r]))return!1;return!0}return i(t,e)});return(0,n.useMemo)(()=>{if(a(c)){let t={...c},e={};for(let[r,s]of Object.entries(t))e={...e,[r]:{configurable:!1,enumerable:!0,get:()=>(u.current.includes(r)||u.current.push(r),s)}};return Object.defineProperties(t,e),t}return c},[c])}(t=>s(c,{onChange:t}),()=>e(c))}t.s(["useAccount",()=>u],982615);var c=t.i(878023),h=t.i(804558),l=t.i(426254);async function d(t,e){let{allowFailure:r=!0,chainId:s,contracts:i,...n}=e,o=t.getClient({chainId:s});return(0,l.getAction)(o,h.multicall,"multicall")({allowFailure:r,contracts:i,...n})}var f=t.i(789594);async function p(t,e){let{allowFailure:r=!0,blockNumber:s,blockTag:i,...n}=e,o=e.contracts;try{let e={};for(let[r,s]of o.entries()){let i=s.chainId??t.state.chainId;e[i]||(e[i]=[]),e[i]?.push({contract:s,index:r})}let a=(await Promise.all(Object.entries(e).map(([e,o])=>d(t,{...n,allowFailure:r,blockNumber:s,blockTag:i,chainId:Number.parseInt(e,10),contracts:o.map(({contract:t})=>t)})))).flat(),u=Object.values(e).flatMap(t=>t.map(({index:t})=>t));return a.reduce((t,e,r)=>(t&&(t[u[r]]=e),t),[])}catch(n){if(n instanceof c.ContractFunctionExecutionError)throw n;let e=()=>
1o.map(e=>(0,f.readContract)(t,{...e,blockNumber:s,blockTag:i}));if(r)return(await Promise.allSettled(e())).map(t=>"fulfilled"===t.status?{result:t.value,status:"success"}:{error:t.reason,result:void 0,status:"failure"});return await Promise.all(e())}}t.s(["readContracts",()=>p],626338)},789594,426254,619273,789408,915823,175555,540143,814448,286491,912598,266027,114272,954616,348396,170778,t=>{"use strict";let e,r,s,i,n,o,a;var u=t.i(388750);function c(t,e,r){let s=t[e.name];if("function"==typeof s)return s;let i=t[r];return"function"==typeof i?i:r=>e(t,r)}function h(t,e){let{chainId:r,...s}=e;return c(t.getClient({chainId:r}),u.readContract,"readContract")(s)}t.s(["getAction",()=>c],426254),t.s(["readContract",()=>h],789594),t.i(247167);var l={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},d=new class{#t=l;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},f="undefined"==typeof window||"Deno"in globalThis;function p(){}function y(t,e){return"function"==typeof t?t(e):t}function m(t){return"number"==typeof t&&t>=0&&t!==1/0}function v(t,e){return Math.max(t+(e||0)-Date.now(),0)}function b(t,e){return"function"==typeof t?t(e):t}function g(t,e){return"function"==typeof t?t(e):t}function C(t,e){let{type:r="all",exact:s,fetchStatus:i,predicate:n,queryKey:o,stale:a}=t;if(o){if(s){if(e.queryHash!==O(o,e.options))return!1}else if(!w(e.queryKey,o))return!1}if("all"!==r){let t=e.isActive();if("active"===r&&!t||"inactive"===r&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&(!i||i===e.state.fetchStatus)&&(!n||!!n(e))}function R(t,e){let{exact:r,status:s,predicate:i,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(r){if(S(e.options.mutationKey)!==S(n))return!1}else if(!w(e.options.mutationKey,n))return!1}return(!s||e.state.status===s)&&(!i||!!i(e))}function O(t,e){return(e?.queryKeyHashFn||S)(t)}function S(t){return JSON.stringify(t,(t,e)=>Q(e)?Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}):e)}function w(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(r=>w(t[r],e[r]))}var E=Object.prototype.hasOwnProperty;function I(t,e){if(t===e)return t;let r=P(t)&&P(e);if(!r&&!(Q(t)&&Q(e)))return e;let s=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),n=i.length,o=r?Array(n):{},a=0;for(let u=0;u<n;u++){let n=r?u:i[u],c=t[n],h=e[n];if(c===h){o[n]=c,(r?u<s:E.call(t,n))&&a++;continue}if(null===c||null===h||"object"!=typeof c||"object"!=typeof h){o[n]=h;continue}let l=I(c,h);o[n]=l,l===c&&a++}return s===n&&a===s?t:o}function T(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function P(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Q(t){if(!F(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!!F(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function F(t){return"[object Object]"===Object.prototype.toString.call(t)}function j(t){return new Promise(e=>{d.setTimeout(e,t)})}function x(t,e,r){return"function"==typeof r.structuralSharing?r.structuralSharing(t,e):!1!==r.structuralSharing?I(t,e):e}function M(t,e,r=0){let s=[...t,e];return r&&s.length>r?s.slice(1):s}function A(t,e,r=0){let s=[e,...t];return r&&s.length>r?s.slice(0,-1):s}var U=Symbol();function D(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==U?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function q(t,e){return"function"==typeof t?t(...e):!!t}function k(t,e,r){let s,i=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),t}function K(t,e){return I(t,e)}function L(t){return JSON.stringify(t,(t,e)=>!function(t){if(!N(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!!N(r)&&!!r.hasOwnProperty("isPrototypeOf")}(e)?"bigint"==typeof e?e.toString():e:Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}))}function N(t){return"[object Object]"===Object.prototype.toString.call(t)}function G(t){let{_defaulted:e,behavior:r,gcTime:s,initialData:i,initialDataUpdatedAt:n,maxPages:o,meta:a,networkMode:u,queryFn:c,queryHash:h,queryKey:l,queryKeyHashFn:d,retry:f,retryDelay:p,structuralSharing:y,getPreviousPageParam:m,getNextPageParam:v,initialPageParam:b,_optimisticResults:g,enabled:C,notifyOnChangeProps:R,placeholderData:O,refetchInterval:S,refetchIntervalInBackgroun
1d:w,refetchOnMount:E,refetchOnReconnect:I,refetchOnWindowFocus:T,retryOnMount:P,select:Q,staleTime:F,suspense:j,throwOnError:x,config:M,connector:A,query:U,...D}=t;return D}t.s(["addConsumeAwareSignal",()=>k,"addToEnd",()=>M,"addToStart",()=>A,"ensureQueryFn",()=>D,"functionalUpdate",()=>y,"hashKey",()=>S,"hashQueryKeyByOptions",()=>O,"isServer",()=>f,"isValidTimeout",()=>m,"matchMutation",()=>R,"matchQuery",()=>C,"noop",()=>p,"partialMatchKey",()=>w,"replaceData",()=>x,"replaceEqualDeep",()=>I,"resolveEnabled",()=>g,"resolveStaleTime",()=>b,"shallowEqualObjects",()=>T,"shouldThrowError",()=>q,"skipToken",()=>U,"sleep",()=>j,"timeUntilStale",()=>v],619273),t.s(["filterQueryOptions",()=>G,"hashFn",()=>L,"structuralSharing",()=>K],789408);var B=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};t.s(["Subscribable",()=>B],915823);var _=new class extends B{#r;#s;#i;constructor(){super(),this.#i=t=>{if(!f&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#s||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(t){this.#i=t,this.#s?.(),this.#s=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#r!==t&&(this.#r=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#r?this.#r:globalThis.document?.visibilityState!=="hidden"}};t.s(["focusManager",()=>_],175555);var H=(e=[],r=0,s=t=>{t()},i=t=>{t()},n=function(t){setTimeout(t,0)},{batch:t=>{let o;r++;try{o=t()}finally{let t;--r||(t=e,e=[],t.length&&n(()=>{i(()=>{t.forEach(t=>{s(t)})})}))}return o},batchCalls:t=>(...e)=>{o(()=>{t(...e)})},schedule:o=t=>{r?e.push(t):n(()=>{s(t)})},setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{i=t},setScheduler:t=>{n=t}});t.s(["notifyManager",()=>H],540143);var $=new class extends B{#n=!0;#s;#i;constructor(){super(),this.#i=t=>{if(!f&&window.addEventListener){let e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#s||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(t){this.#i=t,this.#s?.(),this.#s=t(this.setOnline.bind(this))}setOnline(t){this.#n!==t&&(this.#n=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#n}};function W(){let t,e,r=new Promise((r,s)=>{t=r,e=s});function s(t){Object.assign(r,t),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=e=>{s({status:"fulfilled",value:e}),t(e)},r.reject=t=>{s({status:"rejected",reason:t}),e(t)},r}function V(t){return Math.min(1e3*2**t,3e4)}function z(t){return(t??"online")!=="online"||$.isOnline()}t.s(["onlineManager",()=>$],814448);var J=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function X(t){let e,r=!1,s=0,i=W(),n=()=>_.isFocused()&&("always"===t.networkMode||$.isOnline())&&t.canRun(),o=()=>z(t.networkMode)&&t.canRun(),a=t=>{"pending"===i.status&&(e?.(),i.resolve(t))},u=t=>{"pending"===i.status&&(e?.(),i.reject(t))},c=()=>new Promise(r=>{e=t=>{("pending"!==i.status||n())&&r(t)},t.onPause?.()}).then(()=>{e=void 0,"pending"===i.status&&t.onContinue?.()}),h=()=>{let e;if("pending"!==i.status)return;let o=0===s?t.initialPromise:void 0;try{e=o??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(a).catch(e=>{if("pending"!==i.status)return;let o=t.retry??3*!f,a=t.retryDelay??V,l="function"==typeof a?a(s,e):a,d=!0===o||"number"==typeof o&&s<o||"function"==typeof o&&o(s,e);r||!d?u(e):(s++,t.onFail?.(s,e),j(l).then(()=>n()?void 0:c()).then(()=>{r?u(e):h()}))})};return{promise:i,status:()=>i.status,cancel:e=>{if("pending"===i.status){let r=new J(e);u(r),t.onCancel?.(r)}},continue:()=>(e?.(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:o,start:()=>(o()?h():c().then(h),i)}}var Y=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#o=d.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(f?1/0:3e5))}clearGcTimeout(){this.#o&&(d.clearTimeout(this.#o),this.#o=void 0)}},Z=class extends Y{#a;#u;#c;#h;#l;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#h=t.client,this.#c=this.#h.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#a=tr(this.options),this.state=t.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=tr(this.options);void 0!==t.data&&(this.setState(te(t.data,t.dataUpdatedAt)),this.#a=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#c.remove(this)}setData(t,e){let r=x(this.state.data,t,this.options);return this.#p({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#l?.promise;return this.#l?.cancel(t),e?e.then(p).catch(p):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(t=>!1!==g(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===U||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 4,518 bytes, line 1
1Count===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===b(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!v(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#l&&(this.#f?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#c.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,e){let r;if("idle"!==this.state.fetchStatus&&this.#l?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let s=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,s.signal)})},n=()=>{let t,r=D(this.options,e),s=(i(t={client:this.#h,queryKey:this.queryKey,meta:this.meta}),t);return(this.#f=!1,this.options.persister)?this.options.persister(r,s,this):r(s)},o=(i(r={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#h,state:this.state,fetchFn:n}),r);this.options.behavior?.onFetch(o,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#p({type:"fetch",meta:o.fetchOptions?.meta}),this.#l=X({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:t=>{t instanceof J&&t.revert&&this.setState({...this.#u,fetchStatus:"idle"}),s.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let t=await this.#l.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#c.config.onSuccess?.(t,this),this.#c.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof J){if(t.silent)return this.#l.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#p({type:"error",error:t}),this.#c.config.onError?.(t,this),this.#c.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#p(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...tt(e.data,this.options),fetchMeta:t.meta??null};case"success":let r={...e,...te(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=t.manual?r:void 0,r;case"error":let s=t.error;return{...e,error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),H.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#c.notify({query:this,type:"updated",action:t})})}};function tt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function te(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function tr(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,r=void 0!==e,s=r?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}t.s(["Query",()=>Z,"fetchState",()=>tt],286491);var ts=class extends B{constructor(t,e){super(),this.options=e,this.#h=t,this.#y=null,this.#m=W(),this.bindMethods(),this.setOptions(e)}#h;#v=void 0;#b=void 0;#g=void 0;#C;#R;#m;#y;#O;#S;#w;#E;#I;#T;#P=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#v.addObserver(this),ti(this.#v,this.options)?this.#Q():this.updateResult(),this.#F())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tn(this.#v,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tn(this.#v,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#j(),this.#x(),this.#v.removeObserver(this)}setOptions(t){let e=this.options,r=this.#v;if(this.options=this.#h.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof g(this.options.enabled,this.#v))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#M(),this.#v.setOptions(this.options),e._defaulted&&!T(this.options,e)&&this.#h.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#v,observer:this});let s=this.hasListeners();s&&to(this.#v,r,this.options,e)&&this.#Q(),this.updateResult(),s&&(this.#v!==r||g(this.options.enabled,this.#v)!==g(e.enabled,this.#v)||b(this.options.staleTime,this.#v)!==b(e.staleTime,this.#v))&&this.#A();let i=this.#U();s&&(this.#v!==r||g(this.options.enabled,this.#v)!==g(e.enabled,this.#v)||i!==this.#T)&&this.#D(i)}getOptimisticResult(t){var e,r;let s=this.#h.getQueryCache().build(this.#h,t),i=this.createResult(s,t);return e=this,r=i,T(e.getCurrentResult(),r)||(this.#g=i,this.#R=this.options,this.#C=this.#v.state),i}getCurrentResult(){return this.#g}trackResult(t,e){return new Proxy(t,{get:(t,r)=>(this.trackProp(r),e?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#m.status||this.#m.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,r))})}trackProp(t){this.#P.add(t)}getCurrentQuery(){return this.#v}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#h.defaultQueryOptions(t),r=this.#h.getQueryCache().build(this.#h,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#Q({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#g))}#Q(t){this.#M();let e=this.#v.fetch(this.options,t);return t?.throwOnError||(e=e.catch(p)),e}#A(){this.#j();let t=b(this.options.staleTime,this.#v);if(f||this.#g.isStale||!m(t))return;let e=v(this.#g.dataUpdatedAt,t);this.#E=d.setTimeout(()=>{this.#g.isStale||this.updateResult()},e+1)}#U(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#v):this.options.refetchInterval)??!1}#D(t){this.#x(),this.#T=t,!f&&!1!==g(this.options.enabled,this.#v)&&m(this.#T)&&0!==this.#T&&(this.#I=d.setInterval(()=>{(this.options.refetchIntervalInBackground||_.isFocused())&&this.#Q()},this.#T))}#F(){this.#A(),this.#D(this.#U())}#j(){this.#E&&(d.clearTimeout(this.#E),this.#E=void 0)}#x(){this.#I&&(d.clearInterval(this.#I),this.#I=void 0)}createResult(t,e){let r,s=this.#v,i=this.options,n=this.#g,o=this.#C,a=this.#R,u=t!==s?t.state:this.#b,{state:c}=t,h={...c},l=!1;if(e._optimisticResults){let r=this.hasListeners(),n=!r&&ti(t,e),o=r&&to(t,s,e,i);(n||o)&&(h={...h,...tt(c.data,t.options)}),"isRestoring"===e._optimisticResults&&(h.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=h;r=h.data;let y=!1;if(void 0!==e.placeholderData&&void 0===r&&"pending"===p){let t;n?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(t=n.data,y=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#w?.state.data,this.#w):e.placeholderData,void 0!==t&&(p="success",r=x(n?.data,t,e),l=!0)}if(e.select&&void 0!==r&&!y)if(n&&r===o?.data&&e.select===this.#O)r=this.#S;else try{this.#O=e.select,r=e.select(r),r=x(n?.data,r,e),this.#S=r,this.#y=null}catch(t){this.#y=t}this.#y&&(d=this.#y,r=this.#S,f=Date.now(),p="error");let m="fetching"===h.fetchStatus,v="pending"===p,b="error"===p,C=v&&m,R=void 0!==r,O={status:p,fetchStatus:h.fetchStatus,isPending:v,isSuccess:"success"===p,isError:b,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:h.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
1Count:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:b&&!R,isPaused:"paused"===h.fetchStatus,isPlaceholderData:l,isRefetchError:b&&R,isStale:ta(t,e),refetch:this.refetch,promise:this.#m,isEnabled:!1!==g(e.enabled,t)};if(this.options.experimental_prefetchInRender){let e=t=>{"error"===O.status?t.reject(O.error):void 0!==O.data&&t.resolve(O.data)},r=()=>{e(this.#m=O.promise=W())},i=this.#m;switch(i.status){case"pending":t.queryHash===s.queryHash&&e(i);break;case"fulfilled":("error"===O.status||O.data!==i.value)&&r();break;case"rejected":("error"!==O.status||O.error!==i.reason)&&r()}}return O}updateResult(){let t=this.#g,e=this.createResult(this.#v,this.options);if(this.#C=this.#v.state,this.#R=this.options,void 0!==this.#C.data&&(this.#w=this.#v),T(e,t))return;this.#g=e;let r=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#P.size)return!0;let s=new Set(r??this.#P);return this.options.throwOnError&&s.add("error"),Object.keys(this.#g).some(e=>this.#g[e]!==t[e]&&s.has(e))};this.#q({listeners:r()})}#M(){let t=this.#h.getQueryCache().build(this.#h,this.options);if(t===this.#v)return;let e=this.#v;this.#v=t,this.#b=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#F()}#q(t){H.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#g)}),this.#h.getQueryCache().notify({query:this.#v,type:"observerResultsUpdated"})})}};function ti(t,e){return!1!==g(e.enabled,t)&&void 0===t.state.data&&("error"!==t.state.status||!1!==e.retryOnMount)||void 0!==t.state.data&&tn(t,e,e.refetchOnMount)}function tn(t,e,r){if(!1!==g(e.enabled,t)&&"static"!==b(e.staleTime,t)){let s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&ta(t,e)}return!1}function to(t,e,r,s){return(t!==e||!1===g(s.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&ta(t,r)}function ta(t,e){return!1!==g(e.enabled,t)&&t.isStaleByTime(b(e.staleTime,t))}var tu=t.i(271645),tc=t.i(843476),th=tu.createContext(void 0),tl=t=>{let e=tu.useContext(th);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},td=({client:t,children:e})=>(tu.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,tc.jsx)(th.Provider,{value:t,children:e}));t.s(["QueryClientProvider",()=>td,"useQueryClient",()=>tl],912598);var tf=tu.createContext((a=!1,{clearReset:()=>{a=!1},reset:()=>{a=!0},isReset:()=>a})),tp=tu.createContext(!1);tp.Provider;var ty=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function tm(t,e){return function(t,e,r){let s,i=tu.useContext(tp),n=tu.useContext(tf),o=tl(r),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);let u=o.getQueryCache().get(a.queryHash);if(a._optimisticResults=i?"isRestoring":"optimistic",a.suspense){let t=t=>"static"===t?t:Math.max(t??1e3,1e3),e=a.staleTime;a.staleTime="function"==typeof e?(...r)=>t(e(...r)):t(e),"number"==typeof a.gcTime&&(a.gcTime=Math.max(a.gcTime,1e3))}s=u?.state.error&&"function"==typeof a.throwOnError?q(a.throwOnError,[u.state.error,u]):a.throwOnError,(a.suspense||a.experimental_prefetchInRender||s)&&!n.isReset()&&(a.retryOnMount=!1),tu.useEffect(()=>{n.clearReset()},[n]);let c=!o.getQueryCache().get(a.queryHash),[h]=tu.useState(()=>new e(o,a)),l=h.getOptimisticResult(a),d=!i&&!1!==t.subscribed;if(tu.useSyncExternalStore(tu.useCallback(t=>{let e=d?h.subscribe(H.batchCalls(t)):p;return h.updateResult(),e},[h,d]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),tu.useEffect(()=>{h.setOptions(a)},[a,h]),a?.suspense&&l.isPending)throw ty(a,h,n);if((({result:t,errorResetBoundary:e,throwOnError:r,query:s,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(i&&void 0===t.data||q(r,[t.error,s])))({result:l,errorResetBoundary:n,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw l.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!f&&l.isLoading&&l.
1isFetching&&!i){let t=c?ty(a,h,n):u?.promise;t?.catch(p).finally(()=>{h.updateResult()})}return a.notifyOnChangeProps?l:h.trackResult(l)}(t,ts,e)}t.s(["useQuery",()=>tm],266027);var tv=class extends Y{#h;#k;#K;#l;constructor(t){super(),this.#h=t.client,this.mutationId=t.mutationId,this.#K=t.mutationCache,this.#k=[],this.state=t.state||tb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#k.includes(t)||(this.#k.push(t),this.clearGcTimeout(),this.#K.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#k=this.#k.filter(e=>e!==t),this.scheduleGc(),this.#K.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#k.length||("pending"===this.state.status?this.scheduleGc():this.#K.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#p({type:"continue"})},r={client:this.#h,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=X({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#K.canRun(this)});let s="pending"===this.state.status,i=!this.#l.canStart();try{if(s)e();else{this.#p({type:"pending",variables:t,isPaused:i}),await this.#K.config.onMutate?.(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#p({type:"pending",context:e,variables:t,isPaused:i})}let n=await this.#l.start();return await this.#K.config.onSuccess?.(n,t,this.state.context,this,r),await this.options.onSuccess?.(n,t,this.state.context,r),await this.#K.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,t,this.state.context,r),this.#p({type:"success",data:n}),n}catch(e){try{await this.#K.config.onError?.(e,t,this.state.context,this,r)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,r)}catch(t){Promise.reject(t)}try{await this.#K.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,r)}catch(t){Promise.reject(t)}throw this.#p({type:"error",error:e}),e}finally{this.#K.runNext(this)}}#p(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,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{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),H.batch(()=>{this.#k.forEach(e=>{e.onMutationUpdate(t)}),this.#K.notify({mutation:this,type:"updated",action:t})})}};function tb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}t.s(["Mutation",()=>tv,"getDefaultState",()=>tb],114272);var tg=class extends B{#h;#g=void 0;#L;#N;constructor(t,e){super(),this.#h=t,this.setOptions(e),this.bindMethods(),this.#G()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#h.defaultMutationOptions(t),T(this.options,e)||this.#h.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#L,observer:this}),e?.mutationKey&&this.options.mutationKey&&S(e.mutationKey)!==S(this.options.mutationKey)?this.reset():this.#L?.state.status==="pending"&&this.#L.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#L?.removeObserver(this)}onMutationUpdate(t){this.#G(),this.#q(t)}
1getCurrentResult(){return this.#g}reset(){this.#L?.removeObserver(this),this.#L=void 0,this.#G(),this.#q()}mutate(t,e){return this.#N=e,this.#L?.removeObserver(this),this.#L=this.#h.getMutationCache().build(this.#h,this.options),this.#L.addObserver(this),this.#L.execute(t)}#G(){let t=this.#L?.state??tb();this.#g={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#q(t){H.batch(()=>{if(this.#N&&this.hasListeners()){let e=this.#g.variables,r=this.#g.context,s={client:this.#h,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#N.onSuccess?.(t.data,e,r,s)}catch(t){Promise.reject(t)}try{this.#N.onSettled?.(t.data,null,e,r,s)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#N.onError?.(t.error,e,r,s)}catch(t){Promise.reject(t)}try{this.#N.onSettled?.(void 0,t.error,e,r,s)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#g)})})}};function tC(t,e){let r=tl(e),[s]=tu.useState(()=>new tg(r,t));tu.useEffect(()=>{s.setOptions(t)},[s,t]);let i=tu.useSyncExternalStore(tu.useCallback(t=>s.subscribe(H.batchCalls(t)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),n=tu.useCallback((t,e)=>{s.mutate(t,e).catch(p)},[s]);if(i.error&&q(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}function tR(t){let e=tm({...t,queryKeyHashFn:L});return e.queryKey=t.queryKey,e}function tO(t){return t.state.chainId}t.s(["useMutation",()=>tC],954616),t.s(["useQuery",()=>tR],348396);var tS=t.i(210920);function tw(t={}){let e=(0,tS.useConfig)(t);return(0,tu.useSyncExternalStore)(t=>(function(t,e){let{onChange:r}=e;return t.subscribe(t=>t.chainId,r)})(e,{onChange:t}),()=>tO(e),()=>tO(e))}t.s(["useChainId",()=>tw],170778)},206148,t=>{"use strict";var e=t.i(191346);class r extends e.BaseError{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class s extends e.BaseError{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class i extends e.BaseError{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}e.BaseError;class n extends e.BaseError{constructor({address:t,connector:e}){super(`Account "${t}" not found for connector "${e.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class o extends e.BaseError{constructor({connectionChainId:t,connectorChainId:e}){super(`The current chain of the connector (id: ${e}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${e}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class a extends e.BaseError{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`. All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored. This error commonly occurs for connectors that asynchronously inject after reconnection has already started."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}t.s(["ChainNotConfiguredError",()=>r,"ConnectorAccountNotFoundError",()=>n,"ConnectorAlreadyConnectedError",()=>s,"ConnectorChainMismatchError",()=>o,"ConnectorNotConnectedError",()=>i,"ConnectorUnavailableReconnectingError",()=>a])},911347,t=>{"use strict";var e=t.i(695331);function r(t,s={}){let{key:i="custom",methods:n,name:o="Custom Provider",retryDelay:a}=s;return({retryCount:r})=>(0,e.createTransport)({key:i,methods:n,name:o,request:t.request.bind(t),retryCount:s.retryCount??r,retryDelay:a,type:"custom"})}t.s(["custom",()=>r])},44563,t=>{"use strict";var e=t.i(363625),r=t.i(911347),s=t.i(823838),i=t.i(189991),n=t.i(206148);async function o(t,a={}){let u,{assertChainId:c=!0}=a;if(a.connector){let{connector:e}=a;if("reconnecting"===t.state.status&&!e.getAccounts&&!e.getChainId)throw new n.ConnectorUnavailableReconnectingError({connector:e});let[r,s]=await Promise.all([e.getAccounts().catch(t=>{if(null===a.account)return[];throw t}),e.getChainId()]);u={accounts:r,chainId:s,connector:e}}else u=t.state.connections.get(t.state.current);if(!u)throw new n.ConnectorNotConnectedError;let h=a.chainId??u.chainId,l=await u.connector.getChainId();if(c&&l!==h)throw new n.ConnectorChainMismatchError({connectionChainId:h,c
1onnectorChainId:l});let d=u.connector;if(d.getClient)return d.getClient({chainId:h});let f=(0,i.parseAccount)(a.account??u.accounts[0]);if(f&&(f.address=(0,s.getAddress)(f.address)),a.account&&!u.accounts.some(t=>t.toLowerCase()===f.address.toLowerCase()))throw new n.ConnectorAccountNotFoundError({address:f.address,connector:d});let p=t.chains.find(t=>t.id===h),y=await u.connector.getProvider({chainId:h});return(0,e.createClient)({account:f,chain:p,name:"Connector Client",transport:t=>(0,r.custom)(y)({...t,retryCount:0})})}t.s(["getConnectorClient",()=>o])},896137,t=>{"use strict";var e=t.i(789594),r=t.i(789408),s=t.i(348396),i=t.i(170778),n=t.i(210920);function o(t={}){let{abi:a,address:u,functionName:c,query:h={}}=t,l=t.code,d=(0,n.useConfig)(t),f=(0,i.useChainId)({config:d}),p=function(t,s={}){return{async queryFn({queryKey:r}){let i=s.abi;if(!i)throw Error("abi is required");let{functionName:n,scopeKey:o,...a}=r[1],u=(()=>{let t=r[1];if(t.address)return{address:t.address};if(t.code)return{code:t.code};throw Error("address or code is required")})();if(!n)throw Error("functionName is required");return(0,e.readContract)(t,{abi:i,functionName:n,args:a.args,...u,...a})},queryKey:function(t={}){let{abi:e,...s}=t;return["readContract",(0,r.filterQueryOptions)(s)]}(s)}}(d,{...t,chainId:t.chainId??f}),y=!!((u||l)&&a&&c&&(h.enabled??!0));return(0,s.useQuery)({...h,...p,enabled:y,structuralSharing:h.structuralSharing??r.structuralSharing})}t.s(["useReadContract",()=>o],896137)},238956,t=>{"use strict";var e=t.i(843476),r=t.i(271645);let s=(0,r.createContext)(void 0);function i({children:t}){let[i,n]=(0,r.useState)({isVisible:!1,status:"pending"}),o=(0,r.useCallback)(t=>{n({...t,isVisible:!0})},[]),a=(0,r.useCallback)(t=>{n(e=>({...e,...t}))},[]),u=(0,r.useCallback)(()=>{n(t=>({...t,isVisible:!1})),setTimeout(()=>{n({isVisible:!1,status:"pending"})},300)},[]);return(0,e.jsx)(s.Provider,{value:{transactionState:i,showTransaction:o,updateTransaction:a,hideTransaction:u},children:t})}function n(){let t=(0,r.useContext)(s);if(!t)throw Error("useTransactionProgress must be used within a TransactionProvider");return t}t.s(["TransactionProvider",()=>i,"useTransactionProgress",()=>n])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.