@nexus-cross/dapp-ui 1.5.0-beta.1 → 1.5.0-beta.2
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.
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
function Lc(e){try{return import.meta.env?.[e]}catch{return}}function Dc(e){if(!(typeof process>"u"))return process.env?.[e]}function it(e){if(e)return Pc(e);let t=Lc("VITE_CROSSX_ENVIRONMENT")??Lc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Dc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Dc("CROSSX_ENVIRONMENT");return Pc(t)}function Pc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as br from"react";var ba="eip155";function jn(e){return`${ba}:${e}`}function Oc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function Bc(e){let t=Oc(e);return t===void 0||t===ba}function gi(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),n=Oc(t);if(n!==void 0&&n!==ba)return;let r=n===ba?t.slice(ba.length+1):t;if(!/^\d+$/.test(r))return;let o=Number(r);return Number.isSafeInteger(o)&&o>0?o:void 0}function zc(e){let t=gi(e);return t===void 0?void 0:jn(t)}var ob={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},ab=3e3;function Wn(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Ml=new Map;function Ar(e,t){let n=`${ob[t]}/${e}`,r=Ml.get(n);return r||(r=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),ab);try{let i=await fetch(n,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Ml.delete(n),o)),Ml.set(n,r)),r}function ib(e){return typeof e=="string"&&e.startsWith("https://")}async function Ne(e,t){let n=await Ar("endpoints.json",t),r=Wn(n?.apis?.[e],t);if(!ib(r))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return r}var hi="apps.json";function bi(e,t){let n=Wn(e?.relay?.forwarderFactories,t),r=[n?.standingForwarderFactory,n?.depositorForwarderFactory].filter(o=>typeof o=="string");return r.length>0?r:void 0}var zo="chains.json";function Ll(e,t){return e?e[jn(t)]??e[String(t)]??{}:{}}async function sb(e,t){let n=await Ar(zo,t);return Ll(n?.chains,e)}function go(e,t){let[n,r]=br.useState({});return br.useEffect(()=>{if(e==null){r({});return}let o=!0;return Ar(zo,t).then(a=>{o&&r(Ll(a?.chains,e))}),()=>{o=!1}},[e,t]),n}function lb(e){let[t,n]=br.useState({});return br.useEffect(()=>{let r=!0;return Ar(zo,e).then(o=>{r&&n(o?.chains??{})}),()=>{r=!1}},[e]),t}function Ft(e,t,n){let[r,o]=br.useState(void 0),a=br.useRef(n);return a.current=n,br.useEffect(()=>{let i=!0;return Ar(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),r}var ho="1.5.0-beta.1";var wi="__nexusCrossAppLauncherRuntime";function db(){if(typeof window>"u")return null;let e=window;return e[wi]??(e[wi]={mode:"dapp-ui"}),e[wi]}function cb(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let n=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${n} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${ho}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${ho} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function Dl(e){let t=db();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),cb(t))}import{BrowserClient as pb,Scope as ub,defaultStackParser as fb,linkedErrorsIntegration as mb,makeFetchTransport as gb}from"@sentry/react";var hb="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",bb=`dapp-ui@${ho}`,Fo=null,Fc=.1;function Uc(){return Fc}function wb(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function wa(e){if(Fo)return Fo;if(typeof window>"u")return null;let t=wb(it(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Fc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let n=new pb({dsn:e?.dsn??hb,transport:gb,stackParser:fb,integrations:[mb()],environment:t,release:bb,enabled:e?.enabled??t==="prod"}),r=new ub;return r.setClient(n),r.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),n.init(),Fo=r,Fo}function yi(){return Fo}function xi(e,t){let n=Fo??wa();if(n)return n.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as yb}from"react";var vi=class extends yb{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){xi(n,{componentStack:r.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ye(...e){return e.filter(Boolean).join(" ")}var xb=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Uo(){return typeof window>"u"?!1:xb.test(window.navigator.userAgent)}var jc="__nexus_dapp_ui_uid",Pl=null;function vb(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function Ol(){if(Pl)return Pl;let e=null;try{e=window.localStorage.getItem(jc)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${vb()}`;try{window.localStorage.setItem(jc,e)}catch{}}return Pl=e,e}async function Wc(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),n=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(n),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function kb(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function _c(){return{host:window.location.hostname,device_type:kb(),is_cross_inapp:String(Uo())}}var Gc=!1;function Bl(){if(typeof window>"u")return null;let e=yi()??wa();return e?(Gc||(Gc=!0,e.setUser({id:Ol()})),e):null}function Qc(){return Math.random()>=Uc()}var Hc=0;function jo(e){let t=Bl();if(!t)return;let n=++Hc;if(!e){t.setUser({id:Ol()});return}Wc(e).then(r=>{r&&n===Hc&&t.setUser({id:r})})}function ki(e,t,n){let r=Bl();!r||Qc()||r.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{..._c(),feature:e,action:t,...n}}})}function Ye(e,t,n){let r=Bl();if(!r||Qc())return;let o=n?.status??"success";r.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{..._c(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:n?.reason??"unknown"}:{},...n?.tags}}})}function Dn(e){let t=e,n=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(n)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(n)?"insufficient-gas":/timeout|timed out|deadline/i.test(n)?"timeout":/revert|execution failed/i.test(n)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(n)?"network":"unknown"}import{useCallback as Cb}from"react";import{jsx as Rb}from"react/jsx-runtime";function ve({feature:e,children:t}){let n=Cb(r=>{let o=r.nativeEvent;if(o.__dappUiTracked)return;let i=r.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");ki(e,s,l?{item_id:l}:void 0)},[e]);return Rb("div",{style:{display:"contents"},onClick:n,children:t})}import*as Ho from"react";import*as qc from"@radix-ui/react-popover";import{Drawer as Db}from"vaul";import{createContext as Nb,useContext as Sb}from"react";var zl=Nb(null);function Ci(){let e=Sb(zl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as Ni from"react";var Tb="__dappUiOverlay",bo=[],Wo=0,Ul=0,Ri=!1,Fl=!1;function Vc(){if(Ul>0){Ul-=1;return}Wo=Math.max(0,Wo-1),bo.pop()?.close(),jl()}function Ib(){Ri||(window.addEventListener("popstate",Vc),Ri=!0)}function jl(){bo.length>0||!Ri||(window.removeEventListener("popstate",Vc),Ri=!1)}function Eb(){Fl||(Fl=!0,queueMicrotask(()=>{Fl=!1;let e=Wo-bo.length;if(e<=0){jl();return}Wo-=e,Ul+=1,window.history.go(-e),jl()}))}function or(e,t){let n=Ni.useRef(t);n.current=t,Ni.useEffect(()=>{if(!(!e||typeof window>"u"))return Ab(()=>n.current())},[e])}function Ab(e){let t={close:e};return bo.push(t),Wo<bo.length&&(window.history.pushState({[Tb]:!0},""),Wo+=1),Ib(),()=>{let n=bo.lastIndexOf(t);n!==-1&&(bo.splice(n,1),Eb())}}import{useState as Mb,useEffect as Lb}from"react";function Go(e){let[t,n]=Mb(!1);return Lb(()=>{let r=window.matchMedia(e);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),t}function ce(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ce(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
1
|
+
function Bc(e){try{return import.meta.env?.[e]}catch{return}}function zc(e){if(!(typeof process>"u"))return process.env?.[e]}function at(e){if(e)return Fc(e);let t=Bc("VITE_CROSSX_ENVIRONMENT")??Bc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??zc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??zc("CROSSX_ENVIRONMENT");return Fc(t)}function Fc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as wr from"react";var wa="eip155";function jn(e){return`${wa}:${e}`}function Uc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function jc(e){let t=Uc(e);return t===void 0||t===wa}function bi(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),n=Uc(t);if(n!==void 0&&n!==wa)return;let r=n===wa?t.slice(wa.length+1):t;if(!/^\d+$/.test(r))return;let o=Number(r);return Number.isSafeInteger(o)&&o>0?o:void 0}function Wc(e){let t=bi(e);return t===void 0?void 0:jn(t)}var gb={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},hb=3e3;function Wn(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Pl=new Map;function Mr(e,t){let n=`${gb[t]}/${e}`,r=Pl.get(n);return r||(r=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),hb);try{let i=await fetch(n,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Pl.delete(n),o)),Pl.set(n,r)),r}function bb(e){return typeof e=="string"&&e.startsWith("https://")}async function Se(e,t){let n=await Mr("endpoints.json",t),r=Wn(n?.apis?.[e],t);if(!bb(r))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return r}var wi="apps.json";function yi(e,t){let n=Wn(e?.relay?.forwarderFactories,t),r=[n?.standingForwarderFactory,n?.depositorForwarderFactory].filter(o=>typeof o=="string");return r.length>0?r:void 0}var Fo="chains.json";function Ol(e,t){return e?e[jn(t)]??e[String(t)]??{}:{}}async function wb(e,t){let n=await Mr(Fo,t);return Ol(n?.chains,e)}function bo(e,t){let[n,r]=wr.useState({});return wr.useEffect(()=>{if(e==null){r({});return}let o=!0;return Mr(Fo,t).then(a=>{o&&r(Ol(a?.chains,e))}),()=>{o=!1}},[e,t]),n}function yb(e){let[t,n]=wr.useState({});return wr.useEffect(()=>{let r=!0;return Mr(Fo,e).then(o=>{r&&n(o?.chains??{})}),()=>{r=!1}},[e]),t}function Ut(e,t,n){let[r,o]=wr.useState(void 0),a=wr.useRef(n);return a.current=n,wr.useEffect(()=>{let i=!0;return Mr(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),r}var wo="1.5.0-beta.2";var xi="__nexusCrossAppLauncherRuntime";function xb(){if(typeof window>"u")return null;let e=window;return e[xi]??(e[xi]={mode:"dapp-ui"}),e[xi]}function vb(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let n=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${n} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${wo}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${wo} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function Bl(e){let t=xb();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),vb(t))}import{BrowserClient as kb,Scope as Cb,defaultStackParser as Rb,linkedErrorsIntegration as Nb,makeFetchTransport as Sb}from"@sentry/react";var Tb="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Ib=`dapp-ui@${wo}`,Uo=null,Gc=.1;function Hc(){return Gc}function Eb(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function ya(e){if(Uo)return Uo;if(typeof window>"u")return null;let t=Eb(at(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Gc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let n=new kb({dsn:e?.dsn??Tb,transport:Sb,stackParser:Rb,integrations:[Nb()],environment:t,release:Ib,enabled:e?.enabled??t==="prod"}),r=new Cb;return r.setClient(n),r.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),n.init(),Uo=r,Uo}function vi(){return Uo}function ki(e,t){let n=Uo??ya();if(n)return n.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as Ab}from"react";var Ci=class extends Ab{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){ki(n,{componentStack:r.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function ye(...e){return e.filter(Boolean).join(" ")}var Mb=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function jo(){return typeof window>"u"?!1:Mb.test(window.navigator.userAgent)}var _c="__nexus_dapp_ui_uid",zl=null;function Lb(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function Fl(){if(zl)return zl;let e=null;try{e=window.localStorage.getItem(_c)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Lb()}`;try{window.localStorage.setItem(_c,e)}catch{}}return zl=e,e}async function Vc(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),n=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(n),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Db(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Yc(){return{host:window.location.hostname,device_type:Db(),is_cross_inapp:String(jo())}}var Qc=!1;function Ul(){if(typeof window>"u")return null;let e=vi()??ya();return e?(Qc||(Qc=!0,e.setUser({id:Fl()})),e):null}function Kc(){return Math.random()>=Hc()}var qc=0;function Wo(e){let t=Ul();if(!t)return;let n=++qc;if(!e){t.setUser({id:Fl()});return}Vc(e).then(r=>{r&&n===qc&&t.setUser({id:r})})}function Ri(e,t,n){let r=Ul();!r||Kc()||r.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Yc(),feature:e,action:t,...n}}})}function Ye(e,t,n){let r=Ul();if(!r||Kc())return;let o=n?.status??"success";r.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Yc(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:n?.reason??"unknown"}:{},...n?.tags}}})}function Dn(e){let t=e,n=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(n)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(n)?"insufficient-gas":/timeout|timed out|deadline/i.test(n)?"timeout":/revert|execution failed/i.test(n)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(n)?"network":"unknown"}import{useCallback as Pb}from"react";import{jsx as Ob}from"react/jsx-runtime";function xe({feature:e,children:t}){let n=Pb(r=>{let o=r.nativeEvent;if(o.__dappUiTracked)return;let i=r.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");Ri(e,s,l?{item_id:l}:void 0)},[e]);return Ob("div",{style:{display:"contents"},onClick:n,children:t})}import*as _o from"react";import*as Xc from"@radix-ui/react-popover";import{Drawer as _b}from"vaul";import{createContext as Bb,useContext as zb}from"react";var jl=Bb(null);function Ni(){let e=zb(jl);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import*as Ti from"react";var Fb="__dappUiOverlay",yo=[],Go=0,Gl=0,Si=!1,Wl=!1;function Zc(){if(Gl>0){Gl-=1;return}Go=Math.max(0,Go-1),yo.pop()?.close(),Hl()}function Ub(){Si||(window.addEventListener("popstate",Zc),Si=!0)}function Hl(){yo.length>0||!Si||(window.removeEventListener("popstate",Zc),Si=!1)}function jb(){Wl||(Wl=!0,queueMicrotask(()=>{Wl=!1;let e=Go-yo.length;if(e<=0){Hl();return}Go-=e,Gl+=1,window.history.go(-e),Hl()}))}function or(e,t){let n=Ti.useRef(t);n.current=t,Ti.useEffect(()=>{if(!(!e||typeof window>"u"))return Wb(()=>n.current())},[e])}function Wb(e){let t={close:e};return yo.push(t),Go<yo.length&&(window.history.pushState({[Fb]:!0},""),Go+=1),Ub(),()=>{let n=yo.lastIndexOf(t);n!==-1&&(yo.splice(n,1),jb())}}import{useState as Gb,useEffect as Hb}from"react";function Ho(e){let[t,n]=Gb(!1);return Hb(()=>{let r=window.matchMedia(e);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),t}function ce(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}ce(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #2e2854);--al-badge-text: var(--ds-accent-primary-default, #a392ff);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #f5f3ff);--al-badge-text: var(--ds-accent-primary-default, #7e54f4);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
2
2
|
`);ce(`.al-trigger-btn{--at-bg: transparent;--at-bg-hover: #eaedf1;--at-color: var(--ds-content-high, rgba(0, 0, 0, .85));--at-border: none;--at-border-radius: 8px;--at-size: 36px;--at-padding: 0;--at-press-scale: .95;--at-transition: background-color .15s ease;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--at-size);height:var(--at-size);padding:var(--at-padding);border:var(--at-border);background:var(--at-bg);border-radius:var(--at-border-radius);color:var(--at-color);cursor:pointer;transition:var(--at-transition)}.al-trigger-btn:hover,.al-trigger-btn[data-state=open]{background:var(--at-bg-hover)}.al-trigger-btn:active:not(:disabled){background:var(--at-bg-hover);transform:scale(var(--at-press-scale))}.al-trigger-btn[data-theme=dark]{--at-color: var(--ds-content-high, rgba(255, 255, 255, .85));--at-bg-hover: #252b39}.al-trigger-btn[data-theme=light]{--at-color: var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
3
3
|
`);ce(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
|
|
4
4
|
`);ce(`.al-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;border-radius:24px;background:var(--al-bg);border:1px solid var(--al-popover-border, var(--al-border));box-shadow:var(--al-popover-shadow, var(--al-shadow));animation:al-fade-in .15s ease-out;max-height:80vh;overflow-x:hidden;overflow-y:auto;padding:20px 4px;box-sizing:border-box}.al-popover-content .al-menu{display:flex;flex-direction:column;width:424px;max-width:calc(100vw - 32px);padding:0 12px;box-sizing:border-box}.al-popover-content .al-grid{display:grid;grid-template-columns:repeat(4,100px);row-gap:12px;column-gap:0;justify-content:center;align-items:start}.al-popover-content .al-grid-item{position:relative;flex-direction:column;justify-content:flex-start;align-items:center;gap:6px;padding:12px 0;width:100px;min-width:0;border-radius:10px}.al-popover-content .al-grid-item-left{flex-direction:column;align-items:center;gap:8px;width:100%;overflow:visible}.al-popover-content .al-grid-item-icon{width:50px;height:50px;border-radius:10.125px;overflow:visible}.al-popover-content .al-grid-item-icon img{object-fit:cover}.al-popover-content .al-grid-item-label{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:1.1;letter-spacing:0;text-align:center;color:var(--al-text);max-width:100%;white-space:normal;overflow-wrap:anywhere}.al-popover-content .al-grid-item-text{flex-direction:column;align-items:center;justify-content:center;gap:2px;max-width:100%;min-height:26px}.al-popover-content .al-grid-item-status-text{font-size:10px;line-height:1.1}.al-popover-content .al-badge-list{display:none}.al-drawer-overlay{position:fixed;inset:0;z-index:100000;background:var(--al-drawer-overlay)}.al-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;background:var(--al-bg);overflow-x:hidden;overflow-y:hidden;display:flex;flex-direction:column;box-sizing:border-box}.al-drawer-body{flex:1;overflow-y:auto;overscroll-behavior-y:contain;min-height:0}.al-drawer-content .al-menu{display:flex;flex-direction:column;min-height:0}.al-drawer-content .al-grid{display:flex;flex-direction:column;grid-template-columns:none;max-width:100%;overflow:hidden;flex-shrink:0;gap:0;row-gap:0;column-gap:0;padding:8px 16px}.al-drawer-content .al-grid-item{width:100%;max-width:100%;gap:8px;padding:16px 12px;border-radius:8px;overflow:hidden;background:transparent}.al-drawer-content .al-grid-item:hover,.al-drawer-content .al-grid-item[data-active=true]{background:var(--al-bg-hover)}.al-drawer-content .al-grid-item-left{gap:8px;flex:1 1 auto;min-width:0;overflow:visible}.al-drawer-content .al-grid-item-icon{width:32px;height:32px;border-radius:6.75px;overflow:visible}.al-drawer-content .al-grid-item-icon img{width:100%;height:100%;object-fit:cover;border-radius:6.75px}.al-drawer-content .al-grid-item-label{font-size:16px;line-height:1.35;letter-spacing:0;font-weight:400}.al-drawer-content .al-grid-item[data-active=true] .al-grid-item-label{font-weight:500}.al-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px;flex-shrink:0}.al-drawer-title{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--al-text);margin:0}.al-drawer-close{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;border-radius:4px;cursor:pointer;color:var(--al-text-secondary);transition:opacity .15s ease}.al-drawer-close:hover{opacity:.7}.al-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;padding:8px}.al-grid-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:16px 12px;border:none;background:var(--al-bg);border-radius:8px;cursor:pointer;transition:none;color:var(--al-text);text-align:left;font-family:Inter,sans-serif;flex-shrink:0}.al-grid-item:hover,.al-grid-item[data-active=true]{background:var(--al-bg-hover)!important}.al-grid-item-left{display:flex;align-items:center;gap:8px;min-width:0;overflow:visible}.al-grid-item-text{display:flex;flex-direction:column;align-items:flex-start;gap:1px;max-width:100%;min-width:0}.al-grid-item-icon{display:flex;align-items:center;justify-content:center;position:relative;width:24px;height:24px;overflow:visible;border-radius:5px;flex-shrink:0}.al-grid-item-icon img{width:100%;height:100%;object-fit:contain;border-radius:inherit}.al-grid-item-label{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:150%;letter-spacing:0;color:var(--al-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-grid-item-status-text{font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:1.15;letter-spacing:0;color:var(--al-text);white-space:nowrap}.al-status-ribbon{position:absolute;top:-6px;right:-6px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;box-sizing:border-box;border-radius:999px;color:#fff;font-family:Pretendard,Inter,sans-serif;font-size:12px;font-weight:800;line-height:1;pointer-events:none;box-shadow:0 1px 3px #0000002e}.al-status-ribbon-new{background:var(--al-new-ribbon-bg)}.al-badge{display:flex;padding:1px 4px 2px;justify-content:center;align-items:center;gap:2px;border-radius:3px;background:var(--al-badge-bg);color:var(--al-badge-text);font-family:Pretendard,Inter,sans-serif;font-size:10px;font-weight:600;line-height:150%;letter-spacing:0;white-space:nowrap;flex-shrink:0}
|
|
5
|
-
`);ce("");import{jsx as Wl}from"react/jsx-runtime";function Yc({env:e,theme:t="dark",mobileBreakpoint:n=768,domain:r,children:o}){let a=Go(`(max-width: ${n}px)`),[i,s]=Ho.useState(!1),l=Ho.useCallback(()=>s(!1),[]),d=it(e);or(i,l);let p=Ho.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:r,close:l}),[d,t,a,i,r,l]);return Wl(zl.Provider,{value:p,children:a?Wl(Db.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):Wl(qc.Root,{open:i,onOpenChange:s,children:o},"popover")})}import*as Jc from"@radix-ui/react-popover";import{Drawer as Ob}from"vaul";import{jsx as Pn,jsxs as Pb}from"react/jsx-runtime";function Kc({size:e=18}){return Pb("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Pn("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function Zc(){return Pn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Pn("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xc(){return Pn("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Pn("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as _o}from"react/jsx-runtime";function $c({asChild:e,children:t,className:n,style:r}){let{isMobile:o,theme:a}=Ci(),i=t!=null,s=e??!0,l=n?`al-trigger-btn ${n}`:"al-trigger-btn",d=i?t:_o("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:r,children:_o(Kc,{size:18})});return o?_o(ve,{feature:"app_launcher",children:_o(Ob.Trigger,{asChild:s,children:d})}):_o(ve,{feature:"app_launcher",children:_o(Jc.Trigger,{asChild:s,children:d})})}import*as wr from"react";import*as Ti from"@radix-ui/react-popover";import{Drawer as Qo}from"vaul";import{useQuery as Fb}from"@tanstack/react-query";var ep={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",production:"https://contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json"};var Bb="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",zb="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function ar(e,t){return`${e==="production"?zb:Bb}/${t}.png`}function tp(e){let t=e==="production"?"production":"stage";return{version:"0.0.1-fallback",items:[{id:"gametoken-cross",label:"Gametoken",description:"Trade game tokens easily using CROSS.",url:{dev:"https://stg.onechain.nexus/gametoken",stage:"https://stg.onechain.nexus/gametoken",production:"https://www.onechain.nexus/gametoken"},iconUrl:ar(t,"game-token"),order:1e3,type:"gametoken",badge:null,isNew:!1,serviceStatus:"available"},{id:"forge",label:"Forge",description:"Launch Your Game, Ignite the Market",url:{dev:"https://stg.onechain.nexus/forge",stage:"https://stg.onechain.nexus/forge",production:"https://onechain.nexus/forge"},iconUrl:ar(t,"forge"),order:4e3,type:"forge",badge:null,isNew:!0,serviceStatus:"available"},{id:"crossd",label:"Bridge",description:"The first decentralized exchange on the CROSS network.",url:{dev:"https://stg.crossdefi.io/swap-bridge",stage:"https://stg.crossdefi.io/swap-bridge",production:"https://www.crossdefi.io/swap-bridge"},iconUrl:ar(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"onepop",label:"ONEpop",description:"Send crypto with just an X handle.",url:{dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"},iconUrl:t==="production"?"https://contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png":"https://stg-contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png",order:5500,type:"onepop",badge:null,isNew:!0,serviceStatus:"available"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:ar(t,"prediction"),order:6e3,type:"prediction",badge:null,isNew:!0,serviceStatus:"available"},{id:"rewards",label:"Rewards",description:"Deposit CROSS and earn rewards. Grow together.",url:{dev:"https://stg.onechain.nexus/rewards",stage:"https://stg.onechain.nexus/rewards",production:"https://onechain.nexus/rewards"},iconUrl:ar(t,"reward"),order:7e3,type:"rewards",badge:null,isNew:!1,serviceStatus:"ending"},{id:"cross-staking",label:"Staking",description:"Stake CROSS and earn rewards.",url:{dev:"https://stg-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},iconUrl:ar(t,"cross-staking"),order:7500,type:"cross-staking",badge:null,isNew:!0,serviceStatus:"available"},{id:"nft",label:"NFT",description:"Trade and collect NFTs in the CROSS ecosystem.",url:{dev:"https://stg.crossnft.io/",stage:"https://stg.crossnft.io/",production:"https://www.crossnft.io/"},iconUrl:ar(t,"nft"),order:8e3,type:"nft",badge:null,isNew:!1,serviceStatus:"available"},{id:"play",label:"Quest",description:"Discover and play games on CROSS.",url:{dev:"https://stg.onechain.nexus/quest",stage:"https://stg.onechain.nexus/quest",production:"https://www.onechain.nexus/quest"},iconUrl:ar(t,"play"),order:8500,type:"play",badge:null,isNew:!0,serviceStatus:"available"},{id:"shop",label:"Shop",description:"Game Payment Platform & In-Game Currency Store.",url:{dev:"https://stg.onechain.nexus/shop",stage:"https://stg.onechain.nexus/shop",production:"https://www.onechain.nexus/shop"},iconUrl:ar(t,"shop"),order:9e3,type:"shop",badge:null,isNew:!1,serviceStatus:"available"},{id:"explorer",label:"Explorer",description:"View transactions, blocks, and token data on the CROSS network.",url:{dev:"https://stg-explorer.onechain.nexus",stage:"https://stg-explorer.onechain.nexus",production:"https://explorer.onechain.nexus"},iconUrl:ar(t,"explorer"),order:12e3,type:"explorer",badge:null,isNew:!1,serviceStatus:"available"},{id:"wave",label:"Wave",description:"Stream, support, and earn in the CROSS ecosystem.",url:{dev:"https://stg.onechain.nexus/wave",stage:"https://stg.onechain.nexus/wave",production:"https://www.onechain.nexus/wave"},iconUrl:ar(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Si(e){let t=it(e);return Fb({queryKey:["global-menu",t],queryFn:async()=>{try{let n=await fetch(ep[t],{cache:"no-store"});if(!n.ok)throw new Error(`Failed to fetch global menu: ${n.status}`);return n.json()}catch{return tp(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Gl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function rp(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function op(e){return[...e].sort((t,n)=>{let r=np(t)-np(n);return r!==0?r:t.order-n.order})}function np(e){let t=Gl(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as _t,jsxs as Vo}from"react/jsx-runtime";function Ub(e){return e.id==="cross-staking"||e.type==="cross-staking"}function ip({align:e="end",sideOffset:t=8,className:n}){let{env:r,theme:o,isMobile:a,domain:i,close:s}=Ci(),{data:l}=Si(r),d=wr.useMemo(()=>op(l?.items??[]),[l?.items]),p=24,b=wr.useRef(null),u=wr.useRef(!1),g=wr.useCallback(x=>{b.current={x:x.clientX,y:x.clientY},u.current=!1},[]),y=wr.useCallback(x=>{let k=b.current;b.current=null,k&&(u.current=Math.abs(x.clientX-k.x)>p||Math.abs(x.clientY-k.y)>p)},[]),w=wr.useCallback(()=>{b.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",c=wr.useCallback((x,k)=>{let R=u.current;if(u.current=!1,R&&x.detail!==0)return;let I=k.url[r]??k.url.production,C=ap(I,i);if(!C)try{let S=new URL(I);if(S.pathname===window.location.pathname&&S.search===window.location.search&&S.hash===window.location.hash){s();return}}catch{}if(C){let S=window.open(I,"_blank");if(S){S.opener=null,s();return}}window.location.href=I},[r,i,s]),h=x=>{let k=x.url[r]??x.url.production,R=ap(k,i),I=Gl(x),C=I==="ending",S=rp(x.iconUrl,r),E=!1;if(!R)try{let M=new URL(k).pathname;E=f===M||f.startsWith(M+"/")}catch{E=!1}return _t("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":x.id,"data-active":E||void 0,"data-service-status":I,onPointerDown:g,onPointerUp:y,onPointerCancel:w,onClick:M=>c(M,x),children:Vo("div",{className:"al-grid-item-left",children:[Vo("div",{className:"al-grid-item-icon",children:[_t("img",{src:S,alt:x.label,width:24,height:24,loading:"lazy"}),x.isNew&&_t("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),Vo("span",{className:"al-grid-item-text",children:[_t("span",{className:"al-grid-item-label",children:x.label}),C&&_t("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),x.badge&&!Ub(x)&&_t("span",{className:"al-badge al-badge-list",children:x.badge})]})]})},x.id)},m=_t("div",{className:"al-menu","data-theme":o,children:_t("div",{className:"al-grid",children:d.map(h)})});return a?_t(ve,{feature:"app_launcher",children:Vo(Qo.Portal,{children:[_t(Qo.Overlay,{className:"al-drawer-overlay"}),Vo(Qo.Content,{className:ye("al-drawer-content",n),"data-theme":o,children:[Vo("div",{className:"al-drawer-header",children:[_t(Qo.Close,{className:"al-drawer-close","data-track":"close",children:_t(Zc,{})}),_t(Qo.Title,{className:"al-drawer-title",children:"ONE Services"}),_t(Qo.Close,{className:"al-drawer-close","data-track":"close",children:_t(Xc,{})})]}),_t("div",{className:"al-drawer-body",children:m})]})]})}):_t(ve,{feature:"app_launcher",children:_t(Ti.Portal,{children:_t(Ti.Content,{align:e,sideOffset:t,className:ye("al-popover-content",n),"data-theme":o,children:m})})})}function ap(e,t){try{let n=new URL(e).hostname;return typeof window>"u"?!0:n!==(t??window.location.hostname)}catch{return!1}}import*as ja from"react";import*as yg from"@radix-ui/react-popover";import{Drawer as Yv}from"vaul";import{createContext as jb,useContext as Wb}from"react";var ya=jb(null);function Hr(){let e=Wb(ya);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import*as rn from"react";import{WALLET_LABELS as Gb}from"@nexus-cross/crossx-design-system";var Hl=(r=>(r.CROSSx="crossx",r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r))(Hl||{}),Ii={crossx:{name:Gb.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};import*as $p from"react";import{jsx as Me,jsxs as wo}from"react/jsx-runtime";function sp({size:e=16,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("path",{d:"M12.6667 4.66667V2.66667C12.6667 2.48986 12.5964 2.32029 12.4714 2.19526C12.3464 2.07024 12.1768 2 12 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333C2 3.68696 2.14048 4.02609 2.39052 4.27614C2.64057 4.52619 2.97971 4.66667 3.33333 4.66667H13.3333C13.5101 4.66667 13.6797 4.7369 13.8047 4.86193C13.9298 4.98695 14 5.15652 14 5.33333V8M14 8H12C11.6464 8 11.3072 8.14048 11.0572 8.39052C10.8071 8.64057 10.6667 8.97971 10.6667 9.33333C10.6667 9.68696 10.8071 10.0261 11.0572 10.2761C11.3072 10.5262 11.6464 10.6667 12 10.6667H14C14.1768 10.6667 14.3464 10.5964 14.4714 10.4714C14.5964 10.3464 14.6667 10.1768 14.6667 10V8.66667C14.6667 8.48986 14.5964 8.32029 14.4714 8.19526C14.3464 8.07024 14.1768 8 14 8Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),Me("path",{d:"M2 3.33325V12.6666C2 13.0202 2.14048 13.3593 2.39052 13.6094C2.64057 13.8594 2.97971 13.9999 3.33333 13.9999H13.3333C13.5101 13.9999 13.6797 13.9297 13.8047 13.8047C13.9298 13.6796 14 13.5101 14 13.3333V10.6666",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Mr({size:e=16,className:t}){return Me("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M9.40284 17.0647H4.85156V4.84656H17.0697V9.39783H15.4407V6.47565H6.48066V15.4356H9.40284V17.0647ZM21.5192 12.5644H12.5592V21.5244H21.5192V12.5644ZM23.1483 10.9353V23.1535H10.9301V10.9353H23.1483Z",fill:"currentColor"})})}function ir({size:e=16,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function hn({size:e=24,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function lp({size:e=20,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("path",{d:"M7.5 17.5H4.167A1.667 1.667 0 012.5 15.833V4.167A1.667 1.667 0 014.167 2.5H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),Me("path",{d:"M13.333 14.167L17.5 10l-4.167-4.167M17.5 10H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ei({size:e=20,className:t}){return Me("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:Me("path",{d:"M7.91305 10.8327C8.60341 10.8327 9.16305 11.3924 9.16305 12.0827V16.2458C9.16305 16.9361 8.60341 17.4958 7.91305 17.4958H3.75C3.05964 17.4958 2.5 16.9361 2.5 16.2458L2.5 12.0827C2.5 11.3924 3.05964 10.8327 3.75 10.8327H7.91305ZM14.1685 17.4958H12.5027V15.83H14.1685V17.4958ZM17.5 17.4958H15.8342V15.83H17.5V17.4958ZM4.16576 12.4985V15.83H7.49729V12.4985H4.16576ZM12.5027 15.83H10.8369V14.1642H12.5027V15.83ZM15.8342 15.83H14.1685V14.1642H15.8342V15.83ZM14.1685 14.1642H12.5027V12.4985H14.1685V14.1642ZM17.5 14.1642H15.8342V12.4985H17.5V14.1642ZM12.5027 12.4985H10.8369V10.8327H12.5027V12.4985ZM15.8342 12.4985H14.1685V10.8327H15.8342V12.4985ZM7.91305 2.50391C8.60341 2.50391 9.16305 3.06355 9.16305 3.75391V7.91696C9.16305 8.60731 8.60341 9.16696 7.91305 9.16696H3.75C3.05964 9.16696 2.5 8.60731 2.5 7.91696L2.5 3.75391C2.5 3.06355 3.05964 2.50391 3.75 2.50391L7.91305 2.50391ZM16.2419 2.50391C16.9322 2.50391 17.4919 3.06355 17.4919 3.75391V7.91696C17.4919 8.60731 16.9322 9.16696 16.2419 9.16696H12.0788C11.3885 9.16696 10.8288 8.60731 10.8288 7.91696V3.75391C10.8288 3.06355 11.3885 2.50391 12.0788 2.50391L16.2419 2.50391ZM4.16576 4.16967L4.16576 7.50119L7.49729 7.50119L7.49729 4.16967L4.16576 4.16967ZM12.4946 4.16967V7.50119H15.8261V4.16967H12.4946Z",fill:"currentColor",fillOpacity:1})})}function On({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Gn({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function dp({size:e=16,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("path",{d:"M1.667 10S4.167 4.167 10 4.167 18.333 10 18.333 10 15.833 15.833 10 15.833 1.667 10 1.667 10z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),Me("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function cp({size:e=16,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("path",{d:"M14.95 14.95A8.283 8.283 0 0110 16.667c-5.833 0-8.333-5.833-8.333-5.833a15.238 15.238 0 014.183-4.884m3.267-1.55A7.55 7.55 0 0110 4.167c5.833 0 8.333 5.833 8.333 5.833a15.28 15.28 0 01-1.783 2.633M11.767 11.767a2.5 2.5 0 11-3.534-3.534",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),Me("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Hb='<svg width="100%" height="100%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',_b=`data:image/svg+xml,${encodeURIComponent(Hb)}`;function pp({size:e=42,className:t}){return Me("img",{src:_b,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function up({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M9.19133 10.8077C9.04905 10.6657 8.87947 10.554 8.69283 10.4792L2.78881 8.11167C2.71832 8.08338 2.65816 8.03421 2.61642 7.97075C2.57468 7.90729 2.55335 7.83258 2.5553 7.75665C2.55724 7.68072 2.58237 7.6072 2.6273 7.54596C2.67224 7.48472 2.73483 7.4387 2.80668 7.41406L16.9525 2.5747C17.0185 2.55087 17.0899 2.54632 17.1583 2.56159C17.2268 2.57685 17.2895 2.6113 17.3391 2.66089C17.3887 2.71049 17.4231 2.77319 17.4384 2.84165C17.4536 2.9101 17.4491 2.9815 17.4253 3.04746L12.5859 17.1933C12.5613 17.2651 12.5152 17.3277 12.454 17.3727C12.3928 17.4176 12.3192 17.4427 12.2433 17.4447C12.1674 17.4466 12.0927 17.4253 12.0292 17.3835C11.9658 17.3418 11.9166 17.2817 11.8883 17.2112L9.52073 11.3056C9.44567 11.1191 9.33362 10.9498 9.19133 10.8077ZM9.19133 10.8077L17.3367 2.66404",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function fp({size:e=24,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("defs",{children:wo("linearGradient",{id:"wi-send-solid-grad",x1:"3",y1:"21",x2:"21",y2:"3",gradientUnits:"userSpaceOnUse",children:[Me("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),Me("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),Me("path",{d:"M20.98 3.02a1.2 1.2 0 0 0-1.28-.28L3.6 8.9a1.2 1.2 0 0 0 .07 2.26l6.06 1.9a.6.6 0 0 1 .39.4l1.9 6.06a1.2 1.2 0 0 0 2.26.07l6.16-16.1a1.2 1.2 0 0 0-.46-1.47Z",fill:"url(#wi-send-solid-grad)"})]})}function mp({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M10.8333 14.1667V7.5M15 14.1667V4.16667M2.5 2.5V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H17.5M6.66667 14.1667V11.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function gp({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M6.6665 9.99984H13.3332M9.99984 6.6665V13.3332M18.3332 9.99984C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39746 18.3332 1.6665 14.6022 1.6665 9.99984C1.6665 5.39746 5.39746 1.6665 9.99984 1.6665C14.6022 1.6665 18.3332 5.39746 18.3332 9.99984Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function hp({size:e=20,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Me("path",{d:"M6.667 2.5 3.333 5.833 6.667 9.167M3.333 5.833h13.334M13.333 17.5l3.334-3.333-3.334-3.334M16.667 14.167H3.333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function bp({size:e=20,className:t}){return wo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Me("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),Me("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}function xa({size:e=14,className:t}){return Me("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:Me("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}import*as pe from"react";import yo from"bignumber.js";function Qb(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return t>0&&e.charCodeAt(t-1)===46&&t--,e.slice(0,t)}function Lr(e,t){if(!e||e==="0")return"0.00";let n=new yo(e).shiftedBy(-t),r=n.isGreaterThanOrEqualTo(1)?2:4;return n.toFormat(r,yo.ROUND_DOWN)}function Xt(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function xo(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let n=t>=1?2:4,r=Math.pow(10,n);return`$${(Math.floor(t*r)/r).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}`}function Ai(e,t,n){let o=new yo(e).shiftedBy(-t).multipliedBy(new yo(n));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(yo.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,yo.ROUND_DOWN):o.decimalPlaces(4,yo.ROUND_DOWN)).toFormat()}`}function wp(e){if(e===""||e===null||e===void 0)return{displayValue:"0",isLowerBound:!1};let t=typeof e=="number"?e.toString():e;if(t==="0"||t==="0.0")return{displayValue:"0",isLowerBound:!1};let n=t;if(n.includes("e")||n.includes("E")){let i=Number(n);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};n=Qb(i.toFixed(18))}let[r="0",o=""]=n.split(".");if(Number(r)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(r).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${r}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}import{useMemo as vp}from"react";import{useQuery as Vb}from"@tanstack/react-query";var Ct={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},yp={dev:[jn(612044),jn(97),jn(998)],stage:[jn(612044),jn(97),jn(998)],production:[jn(612055),jn(56)]};function _l(e){return yp[e]}var Mi="https://terms.onechain.nexus/docs/terms-july-23-2026",Li="https://terms.onechain.nexus/docs/pp-july-23-2026",xp="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var qb="send:chain-info";function Yb(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let n=t[0];if(!n)throw new Error("Chain info payload is empty.");return n}return t}return e}function Ql(e,...t){let n=e.replace(/\/+$/,""),r=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[n,...r].join("/")}function kp(e,t,n,r){if(r)return t===Ct[e].cross?Cp(t,r):n?.explorer_url?Ql(n.explorer_url,n.explorer_postfix?.transaction??"tx",r):Kb(e,t,r)}function Cp(e,t){return Ql("https://explorer.onechain.nexus",String(e),"tx",t)}function Kb(e,t,n){let r=Ct[e];if(t===r.cross)return Cp(t,n);if(t===r.bsc)return Ql(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",n)}function va(e,t,n,r=!0){let o=Vb({queryKey:[qb,e,t],queryFn:async({signal:s})=>{let l=await Ne("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return Yb(p)},enabled:r,staleTime:3e5}),a=o.data;return{transactionUrl:vp(()=>kp(e,t,a,n),[t,a,e,n]),chainInfo:a,...o}}function Di(e,t,n=!0){let{chainInfo:r}=va(e,t,void 0,n);return{buildTxUrl:vp(()=>a=>kp(e,t,r,a),[e,t,r]),chainInfo:r}}var Rp="0x0000000000000000000000000000000000000001";var Zb="0xa9059cbb",Xb=/^0x[a-fA-F0-9]{40}$/,Jb="nexus-cross:dapp-ui:send:recent:",Np=10;function $b(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function ka(e){return e.toLowerCase()}function yr(e){return Xb.test(e)}function _r(e){return ka(e.address)===Rp}function Vl(e){return`${Jb}${e.toLowerCase()}`}function qo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Vl(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>r!==null&&typeof r=="object"&&yr(r.address)&&typeof r.updatedAt=="number").slice(0,Np):[]}catch{return[]}}function ql(e,t){if(typeof window>"u")return[];let n=ka(t),r=[{address:n,updatedAt:Date.now()},...qo(e).filter(o=>o.address!==n)].slice(0,Np);try{window.localStorage.setItem(Vl(e),JSON.stringify(r))}catch{return qo(e)}return r}function Yl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Vl(e))}catch{}}function Dr(e,t){let n=e.trim();if(!n)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(n))return{error:"Enter a valid amount."};let[r="0",o=""]=n.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(r||"0"),i=o.padEnd(t,"0"),s=i?BigInt(i):0n,l=10n**BigInt(t),d=a*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function Yo(e,t){let n=BigInt(e||"0"),r=10n**BigInt(t),o=n/r,a=n%r;if(a===0n)return o.toString();let i=$b(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Kl(e,t){let n=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),r=t.toString(16).padStart(64,"0");return`${Zb}${n}${r}`}function xr(e,t,n=10){if(t<=0)return e.toString();let r=10n**BigInt(t),o=e/r,a=e%r;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(n,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function Zl(e,t){return xr(e,t,6)}function Sp(e){return xr(e,9,2)}function Tp(e){return e.toLocaleString("en-US")}function Pi(e){return e===56||e===97}function Oi(e){return e.gasPrice??e.maxFeePerGas}function Ip(e,t=!1){return t?Oi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Bi(e,t=!1){if(t){let n=Oi(e);return n!==void 0?e.gasLimit*n:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function zi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Ep(e,t=0){if(t>4||e===null||e===void 0)return"";if(typeof e=="string")return e.toLowerCase();if(typeof e!="object")return"";let n=e,r=[];return typeof n.name=="string"&&r.push(n.name),typeof n.shortMessage=="string"&&r.push(n.shortMessage),typeof n.message=="string"&&r.push(n.message),typeof n.details=="string"&&r.push(n.details),n.cause!==void 0&&r.push(Ep(n.cause,t+1)),r.join(`
|
|
6
|
-
`).toLowerCase()}function ew(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e&&typeof e=="object"){let t=e;if(typeof t.shortMessage=="string")return t.shortMessage;if(typeof t.message=="string")return t.message}return""}function Xl(e,t={},n="Failed to send transaction."){let r=Ep(e);if(!r)return n;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(r.includes("user rejected")||r.includes("userrejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")||r.includes("action_rejected")||r.includes("rejected by user"))return"Transaction was cancelled.";if(r.includes("insufficientfunds")||r.includes("insufficient funds")||r.includes("exceeds the balance of the account")||r.includes("insufficient balance for transfer")){let i=a?` on ${a}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return r.includes("transaction underpriced")||r.includes("replacement transaction underpriced")||r.includes("fee too low")?"Gas fee was too low for the network. Please try again.":r.includes("nonce too low")||r.includes("nonce has already been used")||r.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":r.includes("execution reverted")||r.includes("contractfunctionrevertederror")||r.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":r.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":r.includes("http request failed")||r.includes("failed to fetch")||r.includes("network request failed")||r.includes("timeout")||r.includes("econnreset")||r.includes("rpc error")||r.includes("429")?"Network connection failed. Check your internet and try again.":r.includes("estimategas")||r.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":ew(e)||n}var tw=2000000000n,nw=1000000000n;async function Fi(e,t,n){let r=new AbortController,o=setTimeout(()=>r.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:r.signal}).finally(()=>clearTimeout(o));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let i=await a.json();if(i.error)throw new Error(`RPC ${t}: ${i.error.message}`);if(i.result===void 0)throw new Error(`RPC ${t}: empty result`);return i.result}function Ui(e){return BigInt(e)}function rw(e){return`0x${e.toString(16)}`}function ow(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=rw(e.value)),e.data&&(t.data=e.data),t}function aw(e){return e===56||e===97}async function Ap(e){try{let t=await Fi(e,"eth_gasPrice",[]);return{gasPrice:Ui(t)}}catch{return{gasPrice:tw}}}async function iw(e,t){let n=nw;try{let r=await Fi(e,"eth_maxPriorityFeePerGas",[]);n=Ui(r)}catch{}return{maxFeePerGas:t+n,maxPriorityFeePerGas:n}}async function sw(e,t){if(t)return Ap(e);let n;try{n=(await Fi(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return n?iw(e,Ui(n)):Ap(e)}async function Mp(e,t){let n=aw(t.chainId),r=ow(t),[o,a]=await Promise.all([Fi(e,"eth_estimateGas",[r]),sw(e,n)]);return{gasLimit:Ui(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function Lp(e){let{estimateGas:t,sendTransaction:n,getTransactionReceipt:r}=e;return{canSend:!!n,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return Mp(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!n)throw new Error("Sending is not available for this wallet.");return n(o)},getTransactionReceipt:r}}var lw=1500,dw=120;function Dp(e){return!!(e.token||e.recipient||e.amount)}function Jl({recipient:e,amount:t,token:n,balanceRaw:r}){let o={},a=e.trim(),i=Dr(t,n.quantity.decimals),s;return a?yr(a)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in i?o.amount=i.error:(s=i.value,s>r&&(o.amount="Amount exceeds available balance.")),!_r(n)&&!yr(n.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&yr(a)?a:void 0}}function $l({token:e,walletAddress:t,recipient:n,rawAmount:r}){let o=t;return _r(e)?{to:n,value:r,chainId:e.chainId,from:o}:{to:ka(e.address),data:Kl(n,r),value:0n,chainId:e.chainId,from:o}}function cw(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var pw=e=>new Promise(t=>setTimeout(t,e));async function Pp({repository:e,args:t,chainId:n,onSubmitted:r,pollIntervalMs:o=lw,pollMaxAttempts:a=dw}){let i=await e.sendTransaction(t);r(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:n}).catch(()=>null);if(d)return cw(d)?"reverted":"success";await pw(o)}return"timeout"}var Op=["token","recipient","amount","review"];function Bp(e){let{env:t,walletAddress:n,accountName:r,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:b,getTokenPriceUsd:u,onSubmitted:g,onSuccess:y,onFailed:w,onExit:f,onOutlink:c}=e,h=pe.useMemo(()=>Lp({sendTransaction:d,getTransactionReceipt:p,estimateGas:b}),[d,p,b]),[m,x]=pe.useState(i);pe.useEffect(()=>{x(i)},[i.address,i.chainId]);let[k,R]=pe.useState(a),[I,C]=pe.useState(""),[S,E]=pe.useState(""),[M,O]=pe.useState({}),[L,U]=pe.useState("idle"),[A,F]=pe.useState(""),[ne,ee]=pe.useState(""),[Z,W]=pe.useState(null),[q,B]=pe.useState(!1),[G,te]=pe.useState(""),_=pe.useRef(0),[le,me]=pe.useState(null),[Te,de]=pe.useState(""),[he,ge]=pe.useState(()=>qo(n)),Ze=pe.useRef(new Set),xe=pe.useCallback((j,ue)=>{Ze.current.has(j)||(Ze.current.add(j),Ye("send",j,ue))},[]);pe.useEffect(()=>{xe("opened"),a!=="token"&&xe("token_selected",{tags:{item_id:i.symbol}})},[xe,a,i.symbol]);let Ue=pe.useMemo(()=>it(t),[t]),{transactionUrl:ot,chainInfo:De}=va(Ue,m.chainId,A||void 0,!0),je=go(m.chainId,Ue),Be=je.nativeSymbol??De?.currency_symbol??"",Nt=je.name??De?.name??`Chain ID ${m.chainId}`,Gt=pe.useRef({nativeSymbol:Be||void 0,networkName:Nt,tokenSymbol:m.symbol});Gt.current={nativeSymbol:Be||void 0,networkName:Nt,tokenSymbol:m.symbol};let ut=pe.useMemo(()=>BigInt(m.quantity.numeric||"0"),[m.quantity.numeric]),St=pe.useMemo(()=>Lr(m.quantity.numeric,m.quantity.decimals),[m.quantity.numeric,m.quantity.decimals]),xt=u?.(m),Ht=pe.useMemo(()=>{if(xt===void 0)return;let j=parseFloat(S.replace(/,/g,""));return Number.isFinite(j)?j*xt:0},[S,xt]);pe.useEffect(()=>{E(""),O({})},[m.address,m.chainId]),pe.useEffect(()=>{_.current+=1,W(null),te(""),B(!1)},[m.address,m.chainId,I,S]),pe.useEffect(()=>{ge(qo(n))},[n]);let vt=pe.useCallback(j=>{C(j),O(ue=>({...ue,recipient:void 0}))},[]),st=pe.useCallback(j=>{E(j),O(ue=>({...ue,amount:void 0}))},[]),Tt=pe.useCallback(()=>{E(St.replace(/,/g,"")),O(j=>({...j,amount:void 0}))},[St]),$e=pe.useCallback(j=>{x(j),l?.(j),xe("token_selected",{tags:{item_id:j.symbol}}),R("recipient")},[l,xe]),qt=pe.useCallback(()=>R("token"),[]),lt=pe.useCallback(()=>{R(j=>{if(j==="result")return"review";if(j===a)return f?.(),j;let ue=Op.indexOf(j);return ue<=0?(f?.(),j):Op[ue-1]})},[a,f]),nn=pe.useCallback(()=>{let{errors:j}=Jl({recipient:I,amount:"1",token:m,balanceRaw:ut});if(j.recipient){O(ue=>({...ue,recipient:j.recipient}));return}O(ue=>({...ue,recipient:void 0})),xe("recipient_entered"),R("amount")},[I,m,ut,xe]),Qe=pe.useCallback(j=>{C(j),O(ue=>({...ue,recipient:void 0})),xe("recipient_entered"),R("amount")},[xe]),at=pe.useCallback(()=>{let j=Jl({recipient:I,amount:S,token:m,balanceRaw:ut});O(j.errors),!(Dp(j.errors)||j.rawAmount===void 0||!j.recipient)&&(me(j.rawAmount),de(j.recipient),W(null),te(""),U("idle"),xe("amount_entered"),R("review"))},[I,S,m,ut,xe]);pe.useEffect(()=>{if(k!=="review"||!Te||le===null||Z!==null||q||G||!h.canEstimateGas(De?.rpc))return;let j=++_.current;B(!0),te(""),(async()=>{try{let ue=$l({token:m,walletAddress:n,recipient:Te,rawAmount:le}),be=await h.estimateGas(ue,De?.rpc);if(_.current!==j)return;W(be)}catch(ue){if(_.current!==j)return;te(Xl(ue,Gt.current,"Failed to estimate gas."))}finally{_.current===j&&B(!1)}})()},[k,Te,le,Z,q,G,h,De?.rpc,m,n]);let Xe=pe.useMemo(()=>{if(!_r(m)||!Z||le===null)return!1;let j=Bi(Z,Pi(m.chainId));return j===null?!1:le+j>ut},[m,Z,le,ut]),kt=pe.useCallback(async()=>{if(!(!Te||le===null)&&!Xe){ee(""),F(""),U("submitting"),xe("submitted");try{let j="",ue=await Pp({repository:h,args:$l({token:m,walletAddress:n,recipient:Te,rawAmount:le}),chainId:m.chainId,onSubmitted:be=>{j=be,F(be),U("confirming"),ge(ql(n,Te)),g?.({txHash:be,chainId:m.chainId,amount:S,tokenSymbol:m.symbol,recipient:Te})}});if(ue==="success")U("success"),xe("confirmed"),j&&y?y?.(j):R("result");else if(ue==="reverted"){let be="Transaction reverted on-chain.";U("error"),ee(be),xe("confirmed",{status:"failure",reason:Dn(new Error(be))}),j&&w?w({txHash:j,chainId:m.chainId,message:be}):R("result")}else{let be="Transaction receipt was not found. Please check again later.";U("error"),ee(be),xe("confirmed",{status:"failure",reason:"timeout"}),j&&w?w({txHash:j,chainId:m.chainId,message:be}):R("result")}}catch(j){U("error"),xe("confirmed",{status:"failure",reason:Dn(j)}),ee(Xl(j,{nativeSymbol:Be||void 0,networkName:Nt,tokenSymbol:m.symbol})),R("result")}}},[h,Te,le,Xe,m,S,n,g,y,w,Be,Nt,xe]),[bt,Ve]=pe.useState(!1),Yt=pe.useRef(void 0);pe.useEffect(()=>()=>clearTimeout(Yt.current),[]);let Kt=pe.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),Ve(!0),clearTimeout(Yt.current),Yt.current=setTimeout(()=>Ve(!1),2e3)}catch{}},[A]),Ot=pe.useCallback(()=>{if(!ot||!A)return;let j=Ie=>{typeof window<"u"&&window.open(Ie,"_blank","noopener,noreferrer")};if(!c){j(ot);return}let ue=c(ot,{category:"send",origin:"send-transaction",payload:{chainId:m.chainId,txHash:A}});if(ue&&typeof ue.then=="function"){let Ie=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ue.then(et=>{if(et===null){Ie?.close();return}let Bt=et??ot;if(Ie)try{Ie.location.href=Bt}catch{Ie.close(),j(Bt)}else j(Bt)});return}let be=ue;be!==null&&j(be??ot)},[c,m.chainId,ot,A]),Zt=pe.useCallback(()=>{ee(""),F(""),U("idle"),W(null),te(""),Ze.current.delete("submitted"),Ze.current.delete("confirmed"),R("review")},[]);return{step:k,status:L,token:m,tokens:s.length>0?s:[m],recipient:I,amount:S,amountUsd:Ht,fieldErrors:M,error:ne,txHash:A,gasEstimate:Z,gasLoading:q,gasError:G,insufficientGas:Xe,reviewRawAmount:le,reviewRecipient:Te,recentAddresses:he,accounts:o,accountName:r,walletAddress:n,resolvedEnv:Ue,transactionUrl:ot,networkName:Nt,nativeSymbol:Be,nativeDecimals:De?.currency_decimals??m.quantity.decimals,balanceRaw:ut,balanceText:St,priceUsd:xt,canSelectToken:(s.length>0?s:[m]).length>1,canSend:h.canSend,getTokenPriceUsd:u,setRecipient:vt,setAmount:st,setMax:Tt,selectToken:$e,goToTokenSelect:qt,selectRecipient:Qe,submitRecipient:nn,submitAmount:at,confirmSend:kt,retry:Zt,back:lt,hashCopied:bt,copyHash:Kt,openTransaction:Ot}}import*as sr from"react";import{jsx as Ca,jsxs as ed}from"react/jsx-runtime";function zp({flow:e}){let{amount:t,setAmount:n,amountUsd:r,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=sr.useRef(null),d=sr.useCallback(()=>{requestAnimationFrame(()=>{let w=l.current;if(!w)return;let f=w.value.length;w.setSelectionRange(f,f)})},[]);sr.useEffect(()=>{l.current?.focus(),d()},[d]),sr.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let p=sr.useMemo(()=>{let w=Dr(t,i.quantity.decimals);return"value"in w&&w.value>a},[t,i.quantity.decimals,a]),[b,u]=sr.useState(!1),g=!b&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return Ca("div",{className:"sf-body sf-amount",children:ed("div",{className:"sf-amount-center",children:[Ca("span",{className:"sf-amount-usd",children:r!==void 0?zi(r):"\xA0"}),Ca("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:Ca("input",{ref:l,className:"sf-amount-input",value:g,onChange:w=>{let f=w.target.value;if(b)n(f);else if(t===""){if(f.length<4)return;u(!0);let c=f.startsWith("0.00")?f.slice(4):f;n(c)}else u(!0),n(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),ed("div",{className:"sf-amount-balance",children:[Ca("span",{children:"Balance:"}),ed("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}import*as lr from"react";var fw=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function td(e){return fw.has(e.toLowerCase())}var mw="0x0000000000000000000000000000000000000001",gw={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},hw={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function ji(e){let t=Ct[e];return[{chainId:t.cross,address:mw},{chainId:t.bsc,address:gw[e]},{chainId:t.cross,address:hw[e]}].map(({chainId:n,address:r})=>({chainId:n,address:r.toLowerCase()}))}var Fp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function Ra(e,t){let n=Ct[e];if(t===n.cross)return Fp.cross;if(t===n.bsc)return Fp.bsc}var bw={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Pr(e,t,n={}){if(!t||!t.startsWith("0x"))return;let{size:r=120,bg:o,format:a="png"}=n,i=bw[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${r}${s}`}import{jsx as Hn,jsxs as Wi}from"react/jsx-runtime";function Up({size:e=20,className:t}){return Wi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),Hn("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function jp({size:e=20,className:t}){return Hn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:Hn("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2M12 11v6M9 14h6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wp({size:e=20,className:t}){return Wi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),Hn("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Gp({size:e=16,className:t}){return Hn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:Hn("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Hp({size:e=56,className:t}){return Wi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),Hn("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function _p({size:e=56,className:t}){return Wi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),Hn("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import{jsx as Qt,jsxs as vr}from"react/jsx-runtime";function Qp(e,t){return e.name||`Account ${(e.index??t)+1}`}function Vp(e){return e.trim().slice(0,1).toUpperCase()||"A"}function qp(e){return e.toLowerCase()}function Yp({flow:e}){let{recipient:t,setRecipient:n,fieldErrors:r,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=lr.useMemo(()=>a.filter(m=>m.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,b=lr.useMemo(()=>new Map(d.map((m,x)=>[qp(m.address),{account:m,index:x}])),[d]),[u,g]=lr.useState("recent"),y=lr.useRef(null);lr.useEffect(()=>{y.current?.focus()},[]);let w="1A1A2E",f=lr.useCallback(async()=>{try{let m=await navigator.clipboard.readText();m&&n(m.trim())}catch{}},[n]),c=t.trim().length>0,h=yr(t.trim());return vr("div",{className:"sf-recipient",children:[vr("div",{className:"sf-recipient-top",children:[vr("div",{className:"sf-address-field","data-filled":c||void 0,"data-invalid":r.recipient||void 0,children:[Qt("textarea",{ref:y,className:"sf-address-input",value:t,onChange:m=>n(m.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:c?2:1}),c?Qt("button",{type:"button",className:"sf-address-action",onClick:()=>n(""),"aria-label":"Clear","data-track":"recipient_clear",children:Qt(Wp,{size:20})}):Qt("button",{type:"button",className:"sf-address-action",onClick:f,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:Qt(jp,{size:20})})]}),r.recipient&&Qt("p",{className:"sf-field-error",role:"alert",children:r.recipient}),vr("div",{className:"sf-tabs",role:"tablist",children:[Qt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>g("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&Qt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>g("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),Qt("div",{className:"sf-address-list",children:u==="account"&&p?d.map((m,x)=>{let k=Qp(m,x),R=Pr(s,m.address,{size:56,bg:w});return vr("button",{type:"button",className:"sf-address-row",onClick:()=>l(m.address),"data-track":"recipient_item",children:[vr("span",{className:"sf-address-avatar",children:[R&&Qt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Qt("span",{className:"sf-address-avatar-fallback",children:Vp(k)})]}),vr("span",{className:"sf-address-meta",children:[Qt("span",{className:"sf-address-name",children:k}),Qt("span",{className:"sf-address-value",children:Xt(m.address)})]})]},m.address)}):o.length>0?o.map(m=>{let x=b.get(qp(m.address)),k=x?Qp(x.account,x.index):Xt(m.address),R=Pr(s,m.address,{size:56,bg:w});return vr("button",{type:"button",className:"sf-address-row",onClick:()=>l(m.address),"data-track":"recipient_item",children:[vr("span",{className:"sf-address-avatar",children:[R&&Qt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Qt("span",{className:"sf-address-avatar-fallback",children:Vp(k)})]}),vr("span",{className:"sf-address-meta",children:[Qt("span",{className:"sf-address-name",children:k}),Qt("span",{className:"sf-address-value",children:Xt(m.address)})]})]},m.address)}):Qt("div",{className:"sf-empty",children:"No send history"})}),c&&!h&&!r.recipient&&Qt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as bn,jsxs as Ko}from"react/jsx-runtime";function Zp({flow:e}){let{status:t,txHash:n,error:r,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?Ko("div",{className:"sf-body sf-result sf-result--error",children:[bn("span",{className:"sf-result-icon",children:bn(_p,{size:56})}),Ko("div",{className:"sf-result-copy",children:[bn("h3",{className:"sf-result-title",children:"Transaction Failed"}),bn("p",{className:"sf-result-desc",children:r||"Something went wrong. Please try again."})]}),n&&bn(Kp,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]}):Ko("div",{className:"sf-body sf-result",children:[bn("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?bn(Hp,{size:56}):bn("span",{className:"sf-result-spinner"})}),Ko("div",{className:"sf-result-copy",children:[bn("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),bn("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),n&&bn(Kp,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]})}function Kp({txHash:e,hashCopied:t,onCopy:n,onOpen:r}){return Ko("div",{className:"sf-result-hash-card",children:[bn("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),Ko("div",{className:"sf-result-hash-row",children:[bn("button",{type:"button",className:"sf-result-hash-link",onClick:r,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:Xt(e)}),bn("button",{type:"button",className:"sf-result-copy-btn",onClick:n,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?bn(ir,{size:16}):"Copy"})]})]})}import{jsx as At,jsxs as wn}from"react/jsx-runtime";var Gi="\u2014";function Xp({flow:e}){let{token:t,reviewRawAmount:n,reviewRecipient:r,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:b,gasError:u,insufficientGas:g,error:y,resolvedEnv:w}=e,f=_r(t),c=n!==null?xr(n,t.quantity.decimals):"",h=o?.trim()||`Account ${(a[0]?.index??0)+1}`,m=Pr(w,i,{size:56,bg:"1A1A2E"}),x=l||(f?t.symbol:""),k=Pi(t.chainId),R=p?Ip(p,k):null,I=p?Bi(p,k):null,C=L=>L!==null&&x?`${Zl(L,d)} ${x}`:Gi,S=L=>L!==void 0?`${Sp(L)} Gwei`:Gi,E=(()=>{if(!f||!p||I===null||n===null)return Gi;let L=n+I;return`${Zl(L,d)} ${x||t.symbol}`})(),M=L=>b?"\u2026":L,O=[{label:"Est. Tx Fee",value:M(C(I))},...R==="dynamic"?[{label:"Max Priority Fee",value:M(S(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(S(p?.maxFeePerGas))}]:R==="legacy"?[{label:"Gas Price",value:M(S(p?Oi(p):void 0))}]:[],{label:"Gas Limit",value:M(p?Tp(p.gasLimit):Gi)}];return wn("div",{className:"sf-body sf-review",children:[wn("div",{className:"sf-review-amount",children:[At("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:L=>{L.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),wn("span",{className:"sf-review-amount-value",children:[c,At("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),wn("div",{className:"sf-review-parties",children:[wn("div",{className:"sf-review-card sf-review-party",children:[At("span",{className:"sf-review-party-label",children:"From"}),wn("div",{className:"sf-review-party-head",children:[At("span",{className:"sf-review-party-avatar",children:m&&At("img",{src:m,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),At("span",{className:"sf-review-party-name",children:h})]}),At("span",{className:"sf-review-party-addr",children:i})]}),At("span",{className:"sf-review-arrow","aria-hidden":!0,children:At(Gp,{size:16})}),wn("div",{className:"sf-review-card sf-review-party",children:[At("span",{className:"sf-review-party-label",children:"To"}),At("span",{className:"sf-review-party-addr",children:r})]})]}),wn("section",{className:"sf-review-card",children:[At("h3",{className:"sf-review-section-title",children:"Summary"}),wn("div",{className:"sf-review-row",children:[At("span",{className:"sf-review-row-label",children:"Network"}),At("span",{className:"sf-review-row-value",children:s})]}),O.map(L=>wn("div",{className:"sf-review-row",children:[At("span",{className:"sf-review-row-label",children:L.label}),At("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),wn("section",{className:"sf-review-card",children:[At("h3",{className:"sf-review-section-title",children:"Total"}),wn("div",{className:"sf-review-row",children:[At("span",{className:"sf-review-row-label",children:"Total Amount"}),wn("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),f&&wn("div",{className:"sf-review-row",children:[At("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),At("span",{className:"sf-review-row-value",children:M(E)})]})]}),g&&!u&&!y&&wn("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",x||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||y)&&At("div",{className:"sf-message sf-message--error",role:"alert",children:u||y})]})}import*as Hi from"react";import{jsx as Qr,jsxs as vo}from"react/jsx-runtime";function Jp({flow:e}){let[t,n]=Hi.useState(""),r=t.trim().toLowerCase(),o=Hi.useMemo(()=>r?e.tokens.filter(a=>a.symbol.toLowerCase().includes(r)||a.name.toLowerCase().includes(r)):e.tokens,[e.tokens,r]);return vo("div",{className:"sf-body sf-token-select",children:[vo("div",{className:"sf-search",children:[Qr(Up,{size:20}),Qr("input",{className:"sf-search-input",value:t,onChange:a=>n(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),vo("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=Ra(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return vo("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[vo("span",{className:"sf-token-left",children:[vo("span",{className:"sf-token-icon-wrap",children:[Qr("img",{className:"sf-token-icon",src:a.icon_url,alt:"",width:40,height:40,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),s&&Qr("img",{className:"sf-token-chain-badge",src:s,alt:"","aria-hidden":!0,width:16,height:16,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.style.display="none"}})]}),Qr("span",{className:"sf-token-name",children:a.symbol})]}),vo("span",{className:"sf-token-right",children:[Qr("span",{className:"sf-token-balance",children:Lr(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&Qr("span",{className:"sf-token-price",children:zi(l)})]})]},i)}),o.length===0&&Qr("div",{className:"sf-empty",children:"No tokens found"})]})]})}ce(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff;cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.sf-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{display:flex;gap:0;margin:16px 0 0}.sf-tab{position:relative;padding:8px 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-accent-primary-high, #f0640d)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-accent-primary-high, #f0640d)}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #f0640d);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #f0640d)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
-
`);import{jsx as Jt,jsxs as _i}from"react/jsx-runtime";var ww={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Qi({onClose:e,onBackToWallet:t,onConfirmSuccess:n,onSuccess:r,className:o,...a}){let i=$p.useCallback(c=>{r?.(c),n?.(c)},[n,r]),l=Bp({...a,onSuccess:r||n?i:void 0,onExit:t}),{step:d,status:p}=l,b=yr(l.recipient.trim()),u=Dr(l.amount,l.token.quantity.decimals),g="value"in u&&u.value<=l.balanceRaw,y=p==="submitting"||p==="confirming",w=d!=="result",f=ww[d]??"";return Jt(ve,{feature:"send",children:_i("div",{className:ye("sf-root",o),"data-step":d,children:[_i("header",{className:"sf-header",children:[w?Jt("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:Jt(On,{size:24})}):Jt("span",{className:"sf-header-btn","aria-hidden":!0}),Jt("span",{className:"sf-header-title",children:f}),Jt("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close","data-wi-close":!0,children:Jt(hn,{size:24})})]}),d==="token"&&Jt(Jp,{flow:l}),d==="recipient"&&Jt(Yp,{flow:l}),d==="amount"&&Jt(zp,{flow:l}),d==="review"&&Jt(Xp,{flow:l}),d==="result"&&Jt(Zp,{flow:l}),_i("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitRecipient,"data-disabled":!b||void 0,"aria-disabled":!b,"data-track":"recipient_next",children:"Next"}),d==="amount"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!g||void 0,"aria-disabled":!g,"data-track":"amount_next",children:"Next"}),d==="review"&&_i("div",{className:"sf-footer-row",children:[Jt("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:y,"data-track":"review_cancel",children:"Cancel"}),Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:y||!l.canSend||l.insufficientGas,"data-track":"review_send",children:y?"Sending...":"Send"})]}),d==="result"&&p==="success"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>n?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}function Vi({env:e,theme:t="dark",showBalance:n=!1,showForgeToken:r=!1,showGameToken:o=!0,showQR:a=!0,showBridge:i=!0,showNft:s=!1,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:b,profileImageUrl:u,connectorId:g,connectorName:y,connectorIconUrl:w,preferredTokens:f=[],onSelectWallet:c,onCopyAddress:h,onBuy:m,onBuyDisabledMessage:x,onBridgeDisabledMessage:k,onSendDisabledMessage:R,onDisconnect:I,disconnectLabel:C="Disconnect",termsUrl:S=Mi,termsLabel:E="Terms of Service",privacyUrl:M=Li,privacyLabel:O="Privacy Policy",showPortfolio:L=!1,showOnePop:U=!1,onePopSummary:A,onOnePopOpen:F,onOnePopSend:ne,onOnePopClaim:ee,onOnePopActivity:Z,onOnePopRepliesSeen:W,onePopGetTokenSlot:q,onePopLogoSrc:B,onePopHeroSrc:G,portfolioTitle:te="My Portfolio",portfolioSections:_,showTotalAssets:le=!0,totalAssetsLabel:me="Total Assets USD",sendTransaction:Te,getTransactionReceipt:de,estimateGas:he,onOutlink:ge,lpBalanceReader:Ze,stakingRewardsReader:xe,bridgeTokens:Ue,bridgeHistory:ot,getBridgeQuote:De,getBridgeToTokens:je,getBridgeApproval:Be,approveBridge:Nt,submitBridge:Gt,onReceive:ut,onBridge:St,onSend:xt,style:Ht},{presentation:vt,open:st,isMobile:Tt,drawerDirection:$e,modal:qt,close:lt}){let nn=it(e),Qe=g?Ii[g]:void 0,at=y??Qe?.name,Xe=w??Qe?.iconUrl,[kt,bt]=rn.useState(null),[Ve,Yt]=rn.useState("top"),[Kt,Ot]=rn.useState(null),[Zt,j]=rn.useState("wallet"),[ue,be]=rn.useState(null),[Ie,et]=rn.useState(null),[Bt,It]=rn.useState(null),[Cn,Rn]=rn.useState(null),P=rn.useCallback(()=>{j("wallet"),be(null),et(null),It(null),Rn(null)},[]);rn.useEffect(()=>{st||P()},[st,P]);let ke=lt??P;rn.useEffect(()=>{jo(d)},[d]);let We=rn.useCallback(()=>{Yl(d),I?.()},[I,d]);return rn.useMemo(()=>({presentation:vt,env:nn,theme:t,isMobile:Tt,open:st,drawerDirection:$e,modal:qt,showBalance:n,showForgeToken:r,showGameToken:o,showQR:a,showBridge:i,showNft:s,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:b,profileImageUrl:u,connectorName:at,connectorIconUrl:Xe,preferredTokens:f,close:ke,onSelectWallet:c,onCopyAddress:h,onBuy:m,onBuyDisabledMessage:x,onBridgeDisabledMessage:k,onSendDisabledMessage:R,onDisconnect:I?We:void 0,disconnectLabel:C,termsUrl:S,termsLabel:E,privacyUrl:M,privacyLabel:O,portalStyle:Ht,navContent:kt,navPosition:Ve,setNavContent:bt,setNavPosition:Yt,footerContent:Kt,setFooterContent:Ot,view:Zt,setView:j,selectedSendToken:ue,setSelectedSendToken:be,selectedDetailToken:Ie,setSelectedDetailToken:et,selectedNftCollection:Bt,setSelectedNftCollection:It,selectedNft:Cn,setSelectedNft:Rn,showPortfolio:L,showOnePop:U,onePopSummary:A,onOnePopOpen:F,onOnePopSend:ne,onOnePopClaim:ee,onOnePopActivity:Z,onOnePopRepliesSeen:W,onePopGetTokenSlot:q,onePopLogoSrc:B,onePopHeroSrc:G,portfolioTitle:te,portfolioSections:_,showTotalAssets:le,totalAssetsLabel:me,sendTransaction:Te,getTransactionReceipt:de,estimateGas:he,onOutlink:ge,lpBalanceReader:Ze,stakingRewardsReader:xe,bridgeTokens:Ue,bridgeHistory:ot,getBridgeQuote:De,getBridgeToTokens:je,getBridgeApproval:Be,approveBridge:Nt,submitBridge:Gt,onReceive:ut,onBridge:St,onSend:xt}),[vt,nn,t,Tt,st,$e,qt,n,r,o,a,i,s,l,d,p,b,u,at,Xe,f,ke,c,h,m,x,k,R,I,We,C,S,E,M,O,Ht,kt,Ve,Kt,Zt,ue,Ie,Bt,Cn,L,U,A,F,ne,ee,Z,W,q,B,G,te,_,le,me,Te,de,he,ge,Ze,xe,Ue,ot,De,je,Be,Nt,Gt,ut,St,xt])}import*as eu from"@radix-ui/react-popover";import{Drawer as yw}from"vaul";import{jsx as qi,jsxs as xw}from"react/jsx-runtime";function tu({asChild:e,className:t,children:n}){let{isMobile:r,theme:o,walletAddress:a}=Hr(),i=n!=null,s=e??!0,l=i?n:xw("button",{type:"button",className:ye("wi-trigger-btn",t),"data-theme":o,"data-mobile":r||void 0,children:[qi(sp,{size:r?14:16}),qi("span",{className:"wi-trigger-address",children:Xt(a)})]});return r?qi(yw.Trigger,{asChild:s,children:l}):qi(eu.Trigger,{asChild:s,children:l})}import*as Q from"react";import*as As from"@radix-ui/react-popover";import{Drawer as Es}from"vaul";import mg from"bignumber.js";import nd from"bignumber.js";var vw=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function gt(e){if(e==null)return null;if(e instanceof nd)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new nd(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!vw.test(t))return null;let n=new nd(t);return n.isFinite()?n:null}import{useQueries as kw}from"@tanstack/react-query";import{useMemo as Cw}from"react";import*as Yi from"react";function nu(e){if(!e||typeof e!="object")return;let t=[],n=new Set,r=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!Bc(a)){r.push(a);continue}let s=zc(a);if(s===void 0){o.push(a);continue}n.has(s)||(n.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:r,skippedMalformed:o}}var ru=new Set;function ou(e,t){ru.has(e)||(ru.add(e),console.warn(t))}function au(e){let t=Ft(zo,e,Yi.useCallback(r=>{let o=nu(r?.chains);if(o)return o.skippedNonEvm.length>0&&ou(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&ou(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),n=Yi.useMemo(()=>_l(e),[e]);return t??n}var rd="user-balance";async function Rw(e,t,n,r){let o=new URLSearchParams({networkId:t,account:n}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:r});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Vr(e,t,n=!0){let r=au(e),o=kw({queries:r.map(l=>({queryKey:[rd,e,t,l],queryFn:async({signal:d})=>Rw(await Ne("walletServer",e),l,t,d),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:Cw(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}import{useQuery as Nw,useQueries as Sw}from"@tanstack/react-query";import{useMemo as Tw}from"react";var Iw="forge-holdings",Ew="forge-token-image";async function Aw(e,t,n){let r=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:n});if(!r.ok)throw new Error(`Failed to fetch forge holdings: ${r.status}`);let o=await r.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Mw(e,t,n){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:n});if(!r.ok)return{address:t,image_url:""};let o=await r.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function iu(e,t,n=!0){let{data:r,...o}=Nw({queryKey:[Iw,e,t],queryFn:async({signal:a})=>Aw(await Ne("bondingCurve",e),t,a),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1});return{holdings:r??[],...o}}function su(e,t,n=!0){let r=Sw({queries:t.map(a=>({queryKey:[Ew,e,a],queryFn:async({signal:i})=>Mw(await Ne("bondingCurve",e),a,i),enabled:n,staleTime:1/0}))});return{imageMap:Tw(()=>{let a=new Map;for(let i of r)i.data&&a.set(i.data.address,i.data.image_url);return a},[r])}}import{useQuery as Lw}from"@tanstack/react-query";import{useMemo as Dw}from"react";var od="token-stats";function kr(e,t){return`${e}:${t.toLowerCase()}`}function qr(e,t=!0){let{data:n,...r}=Lw({queryKey:[od,e],queryFn:async({signal:a})=>{let i=await Ne("walletServer",e),s=await fetch(`${i}/v1/public/token/stats`,{cache:"no-store",signal:a});if(!s.ok)throw new Error(`Failed to fetch token stats: ${s.status}`);let l=await s.json();if(l.code!==200)throw new Error(`Token stats API error: ${l.code}`);return l},enabled:t,staleTime:3e4});return{statsMap:Dw(()=>{let a=new Map;if(!n?.data)return a;for(let i of n.data){let s=kr(i.chain_id,i.address);a.set(s,i)}return a},[n]),...r}}import{useQuery as Pw}from"@tanstack/react-query";var Ow="crossd-apr",lu=6e4,Bw="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Ki,Na;function ad(){return Ki&&Ki.expiresAt>Date.now()?Promise.resolve(Ki.value):Na||(Na=(async()=>{let e=await fetch(Bw,{cache:"no-store"});if(!e.ok)throw new Error(`Failed to fetch CROSSD overview: ${e.status}`);let t=await e.json();if(t.code!==200)throw new Error(`CROSSD overview API error: ${t.code}`);let n=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(n))throw new Error("CROSSD overview returned a non-numeric APR");let r=n*100;return Ki={value:r,expiresAt:Date.now()+lu},r})().finally(()=>{Na=void 0}),Na)}function Zi(e){let t=Math.abs(e),n=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${n}%`}function du(){let{data:e,...t}=Pw({queryKey:[Ow],queryFn:ad,staleTime:lu});return{aprPercent:e??null,...t}}import{useQuery as zw}from"@tanstack/react-query";import{useMemo as cu}from"react";var Fw="token-info";function Xi(e,t){return`${t.toLowerCase()}_${e}`}function pu(e,t=!0){let{data:n,...r}=zw({queryKey:[Fw,e],queryFn:async({signal:i})=>{let s=await Ne("walletServer",e),l=await fetch(`${s}/v1/public/token/info`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch token info: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token info API error: ${d.code}`);return d},enabled:t,staleTime:1/0}),o=cu(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data){let l=Xi(s.chain_id,s.address);i.set(l,s.category)}return i},[n]),a=cu(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data)i.set(Xi(s.chain_id,s.address),s);return i},[n]);return{categoryMap:o,infoMap:a,...r}}import{useMemo as Uw}from"react";import jw from"bignumber.js";function uu(e,t,n){let{tokens:r,isLoading:o}=Vr(e,t,n),{statsMap:a}=qr(e,n);return Uw(()=>{let i=new jw(0);for(let p of r){let b=a.get(kr(p.chainId,p.address));if(!b)continue;let u=gt(p.quantity.numeric),g=gt(b.price);if(!u||!g)continue;let y=u.shiftedBy(-p.quantity.decimals).multipliedBy(g);y.isNaN()||(i=i.plus(y))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=wp(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[r,a,o])}import mu from"bignumber.js";var Ww=/^0x[0-9a-f]{40}$/i;function gu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;let{chainId:r,address:o}=n,a=gi(r);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!Ww.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function Gw(e){return new Map(e.map((t,n)=>[`${t.chainId}:${t.address.toLowerCase()}`,n]))}var Hw=new mu("0.0001");function id(e){return(gt(e.quantity.numeric)??new mu(0)).shiftedBy(-e.quantity.decimals)}function fu(e,t){return`${e}:${t.toLowerCase()}`}function _w(e,t){return`${t.toLowerCase()}_${e}`}function hu({env:e,tokens:t,pinnedTokens:n,preferredTokens:r,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],b=new Set;for(let f of o.values())b.add(f.chain_id);let u=b.size>0,g=Gw(n??ji(e)),y=new Map;(r??[]).forEach((f,c)=>{let h=gi(f.chainId);h!==void 0&&y.set(`${h}:${f.address.toLowerCase()}`,c)});for(let f of t){let c=`${f.chainId}:${f.address.toLowerCase()}`,h=g.has(c),m=y.get(c);if(h)s.push(f);else if(m!==void 0)d.push(f);else if(id(f).isGreaterThanOrEqualTo(Hw)){if(!i&&a.get(_w(f.chainId,f.address))==="game")continue;u&&!b.has(f.chainId)?l.push(f):p.push(f)}}s.sort((f,c)=>{let h=g.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,m=g.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return h-m}),d.sort((f,c)=>{let h=y.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,m=y.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return h-m});let w=(f,c)=>{let h=o.get(fu(f.chainId,f.address)),m=o.get(fu(c.chainId,c.address)),x=id(f).multipliedBy(gt(h?.price)??0);return id(c).multipliedBy(gt(m?.price)??0).minus(x).toNumber()};return l.sort(w),p.sort(w),[...s,...l,...d,...p]}import*as Ji from"react";var bu=new Set;function Qw(e){bu.has(e)||(bu.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function wu(e){let t=Ft(hi,e,Ji.useCallback(r=>{let o=r?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=gu(o);if(!a){Qw(e);return}return a},[e])),n=Ji.useMemo(()=>ji(e),[e]);return t??n}import{QRCodeSVG as Wv}from"qrcode.react";import{WALLET_LABELS as Gv}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as Yw}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as sd}from"@nexus-cross/crossx-design-system";import{jsx as Ge,jsxs as ko}from"react/jsx-runtime";var Vw='<svg width="100%" height="100%" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_75048_28969)"><rect width="640" height="640" rx="100" fill="white"/><path d="M640.092 -0.18042H0.0917969V639.82H640.092V-0.18042Z" fill="#CE3E35"/><path d="M43.6074 104.484C43.6074 71.3473 70.4703 44.4844 103.607 44.4844H536.393C569.53 44.4844 596.393 71.3473 596.393 104.484V346.514H43.6074V104.484Z" fill="white"/><g filter="url(#filter0_d_75048_28969)"><path d="M639.908 639.822H0.0917969V158.676C0.0917969 136.585 18.0004 118.676 40.0918 118.676H218.544C237.426 118.676 252.868 132.846 264.251 147.912C277.196 165.045 297.355 176.058 319.999 176.058C342.644 176.058 362.803 165.045 375.748 147.912C387.131 132.846 402.573 118.676 421.455 118.676H599.908C622 118.676 639.908 136.585 639.908 158.676V639.822Z" fill="url(#paint0_linear_75048_28969)"/></g><path d="M223.621 639.503H639.909V181.499L223.621 448.166V639.503Z" fill="url(#paint1_linear_75048_28969)"/><path d="M223.645 639.819H0.0917969V212.869L223.645 449.197V639.819Z" fill="url(#paint2_linear_75048_28969)"/><g filter="url(#filter1_d_75048_28969)"><path d="M317.103 250.341L228.024 301.829C212.311 310.864 206.867 331.162 215.899 346.881C224.93 362.6 245.221 368.046 260.933 359.01L336.28 315.444L300.401 353.936V504.934C300.401 523.129 315.247 537.981 333.434 537.981C351.621 537.981 366.468 523.129 366.468 504.934V278.932C366.468 272.62 364.489 266.431 362.014 262.347C352.735 246.752 332.692 241.182 316.979 250.217L317.103 250.341Z" fill="white"/></g></g><defs><filter id="filter0_d_75048_28969" x="-19.9082" y="93.6763" width="679.816" height="561.146" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-5"/><feGaussianBlur stdDeviation="10"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><filter id="filter1_d_75048_28969" x="190.367" y="224.71" width="211.348" height="348.518" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.03953" dy="7.03953"/><feGaussianBlur stdDeviation="14.1039"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><linearGradient id="paint0_linear_75048_28969" x1="-74.0158" y1="54.6376" x2="542.251" y2="802.323" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_75048_28969" x1="159.749" y1="206.729" x2="471.286" y2="474.513" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_75048_28969" x1="399.134" y1="82.7297" x2="104.683" y2="466.123" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_75048_28969"><rect width="640" height="640" rx="100" fill="white"/></clipPath></defs></svg>',qw=`data:image/svg+xml,${encodeURIComponent(Vw)}`;function $i(){return Ge("img",{src:qw,width:40,height:40,alt:"",style:{display:"block"}})}function yu(){return ko("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[ko("g",{clipPath:"url(#clip0_1331_27065)",children:[Ge("path",{d:"M37.2488 38.4674L28.6626 35.8175L22.1876 39.8295L17.6699 39.8274L11.191 35.8175L2.60875 38.4674L-0.00195312 29.3328L2.60875 19.1947L-0.00195312 10.6234L2.60875 0L16.0192 8.30453H23.838L37.2488 0L39.8595 10.6234L37.2488 19.1947L39.8595 29.3328L37.2488 38.4674Z",fill:"#FF5C16"}),Ge("path",{d:"M2.60938 0L16.0201 8.31037L15.4868 14.0137L2.60938 0ZM11.1919 29.3366L17.0925 33.9956L11.1919 35.8175V29.3366ZM16.6209 21.6342L15.4868 14.0175L8.22768 19.1971L8.22374 19.195V19.1988L8.24628 24.5302L11.1899 21.6345L16.6209 21.6342ZM37.2477 0L23.837 8.31037L24.3685 14.0137L37.2477 0ZM28.6654 29.3366L22.7646 33.9956L28.6654 35.8175V29.3366ZM31.6313 19.1985V19.1947L31.6297 19.1968L24.3705 14.0175L23.2364 21.6342H28.6651L31.6108 24.5296L31.6313 19.1985Z",fill:"#FF5C16"}),Ge("path",{d:"M11.191 35.8175L2.60875 38.4674L-0.00195312 29.3366H11.191V35.8175ZM16.62 21.6321L18.2595 32.6435L15.9873 26.5208L8.24368 24.5296L11.189 21.6324H16.62V21.6321ZM28.6662 35.8175L37.2488 38.4674L39.8595 29.3366H28.6662V35.8175ZM23.2375 21.6321L21.598 32.6435L23.8699 26.5208L31.6138 24.5296L28.6665 21.6324H23.2375V21.6321Z",fill:"#E34807"}),Ge("path",{d:"M-0.00195312 29.3328L2.60875 19.1947H8.22284L8.2434 24.5278L15.9876 26.519L18.2595 32.6414L17.0916 33.9897L11.191 29.3307H-0.00195312V29.3328ZM39.8595 29.3328L37.2488 19.1947H31.6344L31.6138 24.5278L23.8702 26.519L21.598 32.6414L22.7657 33.9897L28.6665 29.3307H39.8595V29.3328ZM23.838 8.30444H16.0192L15.4882 14.0078L18.2597 32.6355H21.598L24.3713 14.0078L23.838 8.30444Z",fill:"#FF8D5D"}),Ge("path",{d:"M2.60875 0L-0.00195312 10.6234L2.60875 19.1947H8.22284L15.4859 14.0137L2.60875 0ZM14.9975 23.8438H12.4541L11.0693 25.2508L15.9893 26.515L14.9975 23.842V23.8438ZM37.2488 0L39.8595 10.6234L37.2488 19.1947H31.6344L24.3716 14.0137L37.2488 0ZM24.8637 23.8438H27.4107L28.7955 25.2526L23.8699 26.5191L24.8637 23.8418V23.8438ZM22.1857 36.1956L22.7659 33.9936L21.598 32.6453H18.2572L17.0896 33.9936L17.6696 36.1956",fill:"#661800"}),Ge("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),Ge("path",{d:"M11.1914 35.8131L17.672 39.8289V36.193L17.0917 33.9912L11.1914 35.8131ZM28.6649 35.8131L22.1841 39.8289V36.193L22.7644 33.9912L28.6649 35.8131Z",fill:"#E7EBF6"})]}),Ge("defs",{children:Ge("clipPath",{id:"clip0_1331_27065",children:Ge("rect",{width:"40",height:"40",fill:"white"})})})]})}function xu(){return ko("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ge("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),Ge("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),Ge("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),Ge("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),Ge("path",{d:"M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z",fill:"#F3BA2F"})]})}function vu(){return ko("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[Ge("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),Ge("path",{d:"M89.1233 136.695V59.7551H118.481V140.524L74.5862 184.774L30.4787 140.524V107.55H59.9073V136.695L74.5862 151.303L89.1233 136.695Z",fill:"white"}),Ge("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),Ge("path",{d:"M199.534 59.9334C202.562 60.0484 208.427 60.4824 212.031 63.6902C215.635 66.898 216.937 71.0498 216.937 73.1199V104.017L198.767 114.828L216.937 125.561V172.713C216.937 174.511 216.405 178.276 211.034 181.377C205.664 184.477 202.613 184.969 201.758 184.827H143.949C141.879 184.904 136.712 184.182 132.602 180.686C128.493 177.19 128.462 175.216 128.462 173.515V125.561L146.173 114.828L128.462 104.017V71.1268C128.462 69.721 130.109 65.7781 133.237 63.5701C137.147 60.8101 141.112 59.9334 144.409 59.9334H199.534ZM158.3 122.264V166.221H187.033V122.264H158.3ZM158.3 107.794H187.033V78.5272H158.3V107.794Z",fill:"white"})]})}function ku(){return ko("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ko("g",{clipPath:"url(#clip0_1185_7785)",children:[Ge("path",{d:"M14 28C21.75 28 28 21.75 28 14C28 6.25 21.75 0 14 0C6.25 0 0 6.25 0 14C0 21.75 6.25 28 14 28Z",fill:"#EB0029"}),Ge("path",{d:"M19.4975 8.36232L6 6L13.103 23L23 11.5311L19.4975 8.36232ZM19.2801 9.4034L21.3449 11.27L15.6975 12.2424L19.2801 9.4034ZM14.4714 12.0479L8.51876 7.35252L18.247 9.05524L14.4714 12.0479ZM14.0467 12.8782L13.0765 20.5098L7.84385 7.98492L14.0467 12.8782ZM14.9454 13.2835L21.1983 12.2064L14.026 20.518L14.9454 13.2835Z",fill:"white"})]}),Ge("defs",{children:Ge("clipPath",{id:"clip0_1185_7785",children:Ge("rect",{width:"28",height:"28",fill:"white"})})})]})}function Cu(){return ko("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[Ge("path",{fill:"#FFC107",d:"M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"}),Ge("path",{fill:"#FF3D00",d:"M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"}),Ge("path",{fill:"#4CAF50",d:"M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"}),Ge("path",{fill:"#1976D2",d:"M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"})]})}function Ru(){return Ge("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:Ge("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})})}function Nu(){return Ge("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ge("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Sa={cross_embedded:{id:"cross_embedded",name:sd.social,description:"Sign in with Google or Apple",icon:$i},cross_wallet:{id:"cross_wallet",name:sd.app,description:"App approval is required",icon:$i,featured:!0},cross_extension:{id:"cross_extension",name:sd.extension,description:"Browser extension approval is required",icon:$i,rdns:"nexus.to.crosswallet.desktop",installUrl:"https://chromewebstore.google.com/detail/crossx/nninbdadmocnokibpaaohnoepbnpdgcg",visibility:"desktop-only"},metamask:{id:"metamask",name:"MetaMask",description:"Browser extension approval is required",icon:yu,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:xu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:vu,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:ku,badge:"For SHOP"}};function ld(e){return Sa[e]}var dd={google:{id:"google",name:"Google",icon:Cu},apple:{id:"apple",name:"Apple",icon:Ru}};function Su(e){return dd[e]}var Tu="dappui.wcm.last-selected",Kw=new Set(["google","apple"]);function Iu(e){try{window.localStorage.setItem(Tu,e)}catch{}}function Eu(){let e=null;try{e=window.localStorage.getItem(Tu)}catch{return}if(e)return Kw.has(e)?Yw.default:Sa[e]?.name}function Mt(e,t,n,r){if(!r||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=r(t,n)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,p=b=>{if(b===null){d?.close();return}let u=b??t;if(d)try{d.location.href=u}catch{d.close(),a(u)}else a(u)};o.then(p,b=>{console.error("[dapp-ui] onOutlink rejected:",b),d?.close()});return}let s=o;if(s===null)return;a(s??t)}import*as No from"react";import{Drawer as Hy}from"vaul";import{createContext as $w,useContext as e1,useMemo as t1}from"react";import _n from"bignumber.js";var Zw=/^(\d{4}-\d{2}-\d{2})/;function Au(e){if(!e||e.length===0)return;let t=new Map,n;for(let{key:o,cumulative:a}of e.map(i=>({key:Zw.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),n=o;if(n===void 0)return;let r=new Date().toISOString().slice(0,10);return t.get(r)??t.get(n)}function Mu(e){return e.poolType==="Unknown"}function es(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ts(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Ta(e,t){let n=e.length+t.length;if(n>32)return"xs";if(n>24)return"sm"}function cd(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Xw=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function Ia(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let r=e instanceof Error?e.message:"";for(let a of Xw){let i=r.indexOf(a);i>=0&&(r=r.slice(0,i))}return r.split(`
|
|
8
|
-
`).map(a=>a.trim()).find(a=>a.length>0)||t}var Jw="0xe00e8bf3";function Lu(e,t){let n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let r=n.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Jw}${r}${o}`}function Zo(e){return!e||e<=0n?"0":new _n(e.toString()).shiftedBy(-9).toFormat(2,_n.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function ns(e){return!e||e<=0n?"0":new _n(e.toString()).toFormat(0,_n.ROUND_DOWN)}function rs(e){if(!e||e<=0n)return"0";let t=new _n(e.toString()).shiftedBy(-18),n=t.isLessThan(1e-4)?7:4;return t.toFormat(n,_n.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function Cr(e,t){let n=new _n(e).shiftedBy(-t);return!n.isFinite()||n.isZero()?"0":n.isGreaterThanOrEqualTo(1)?n.toFormat(2,_n.ROUND_DOWN):n.toFormat(4,_n.ROUND_DOWN)}function pd(e){return Cr(e,0)}var Ea={rate:1,symbol:"$"};function Co(e,t=Ea){let n=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(n).toFormat(2,_n.ROUND_DOWN)}`}function Yr(e,t,n,r=Ea){let o=new _n(n||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new _n(e||"0").shiftedBy(-t).times(o);return a.isFinite()?Co(a,r):null}var Aa=$w(null);function Lt(){let e=e1(Aa);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Qn(){let{conversionRatio:e,currencySymbol:t}=Lt();return t1(()=>({rate:typeof e=="number"&&e>0?e:Ea.rate,symbol:t||Ea.symbol}),[e,t])}import{Drawer as n1}from"vaul";import{jsx as Du}from"react/jsx-runtime";function Pu({asChild:e,children:t}){let{walletAddress:n}=Lt(),r=t!=null,o=e??!0,a=r?t:Du("button",{type:"button",children:Xt(n)});return Du(n1.Trigger,{asChild:o,children:a})}import{Drawer as ms}from"vaul";import*as Pt from"react";import{useQueryClient as Wy}from"@tanstack/react-query";import{createContext as r1,useContext as o1}from"react";var ud=r1(null);function Ou(){return o1(ud)}import{jsx as yn,jsxs as ss}from"react/jsx-runtime";function Bu({size:e=22,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function zu({size:e=22,className:t}){return ss("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M16.17 13.75a7.333 7.333 0 11-1.54-7.59L18.333 9.167",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Fu({size:e=12,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function os({size:e=16,className:t}){return ss("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("path",{d:"M5.333 5.333V4a1.333 1.333 0 011.334-1.333h5.333A1.333 1.333 0 0113.333 4v5.333a1.333 1.333 0 01-1.333 1.334h-1.333",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M4 5.333h5.333c.737 0 1.334.597 1.334 1.334V12c0 .736-.597 1.333-1.334 1.333H4A1.333 1.333 0 012.667 12V6.667C2.667 5.93 3.263 5.333 4 5.333z",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function as({size:e=16,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function is({size:e=48,className:t}){return ss("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),yn("path",{d:"M14 24.5l6.6 6.6L34.5 17.5",stroke:"var(--wp-claim-success-mark, #ffffff)",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Bn({size:e=12,className:t}){return ss("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[yn("path",{d:"M5 2H2.5A1.5 1.5 0 0 0 1 3.5V9.5A1.5 1.5 0 0 0 2.5 11H8.5A1.5 1.5 0 0 0 10 9.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as a1}from"@tanstack/react-query";import{useMemo as Uu}from"react";var i1="wp:reward-pools";function Xo(e,t=!0){let{data:n,...r}=a1({queryKey:[i1,e],queryFn:async({signal:i})=>{let s=await Ne("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch pools: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Pools API error: ${d.code}`);return d},enabled:t,staleTime:0}),o=Uu(()=>n?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[n]),a=Uu(()=>n?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[n]);return{crossPools:o,gamePools:a,allPools:n?.data.pools??[],...r}}import{useQuery as s1}from"@tanstack/react-query";import{useMemo as l1}from"react";var d1="wp:user-deposits";function ls(e,t,n=!0){let r=n&&!!t,{data:o,...a}=s1({queryKey:[d1,e,t],queryFn:async({signal:s})=>{let l=await Ne("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:r,staleTime:0});return{depositMap:l1(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}import{useQuery as c1}from"@tanstack/react-query";import{useMemo as p1}from"react";var ju={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Wu={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var Gu={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var fd={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},Hu={dev:`${fd.dev}/portfolio`,stage:`${fd.stage}/portfolio`,production:`${fd.production}/portfolio`};var _u={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Vn={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",production:"https://contents.crosstoken.io/frontend/common/app-launcher/icons"},ds={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Qu={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Vu={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},qu={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var u1="wp:token-info",f1="0x0000000000000000000000000000000000000001";function Rr(e,t=!0){let n=Ct[e].cross,{data:r,...o}=c1({queryKey:[u1,e],queryFn:async({signal:p})=>{let b=await Ne("walletServer",e),u=await fetch(`${b}/v1/public/token/info`,{cache:"no-store",signal:p});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let g=await u.json();if(g.code!==200)throw new Error(`Token info API error: ${g.code}`);return g},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=p1(()=>{let p=new Map,b=new Map;if(!r?.data)return{byChainAddr:p,byChainSym:b};for(let u of r.data){let g=u.address.toLowerCase();p.set(`${u.chain_id}:${g}`,u),p.set(g,u);let y=u.symbol.replace(/^t/,"").toUpperCase(),w=`${u.chain_id}:${y}`;b.has(w)||b.set(w,u),b.has(y)||b.set(y,u)}return{byChainAddr:p,byChainSym:b}},[r]);return{getTokenImage:(p,b,u)=>{let g=p.toLowerCase(),y=!!u?.chainOnly,w=a.get(`${n}:${g}`);if(w?.image)return w.image;if(!y){let f=a.get(g);if(f?.image)return f.image}if(b){let f=b.replace(/^t/,"").toUpperCase(),c=i.get(`${n}:${f}`);if(c?.image)return c.image;if(!y){let h=i.get(f);if(h?.image)return h.image}}return""},getTokenSymbol:(p,b,u)=>{let g=p.toLowerCase();return(a.get(`${n}:${g}`)??(u?.chainOnly?void 0:a.get(g)))?.symbol||b},getNativeToken:()=>a.get(`${n}:${f1}`),...o}}import*as gd from"react";import{jsx as md,jsxs as Yu}from"react/jsx-runtime";function qn({sectionKey:e,title:t,icon:n,iconFit:r="cover",isEmpty:o,loading:a=!1,children:i}){let s=Ou();return gd.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),gd.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:Yu("div",{className:"wp-svc-card",children:[Yu("div",{className:"wp-svc-card-head",children:[md("img",{className:"wp-svc-card-icon",src:n,alt:"",style:{objectFit:r}}),md("span",{className:"wp-svc-card-title",children:t})]}),md("div",{className:"wp-svc-items",children:i})]})}import hd from"bignumber.js";import{jsx as dn,jsxs as cn}from"react/jsx-runtime";var m1="ONErewards";function g1(e){return new hd(e||"0").isGreaterThan(0)}function Ku(){let{env:e,walletAddress:t,onOutlink:n}=Lt(),r=Qn(),o=!!t,{allPools:a,isLoading:i}=Xo(e,o),{depositMap:s,isLoading:l}=ls(e,t,o),{getTokenImage:d}=Rr(e,o),p=(g,y)=>`${ju[e]}/gametoken/tokens/${g.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,b=`${Vn[e]}/reward.png`,u=a.filter(g=>{let y=s.get(g.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0";return!(new hd(w).isZero()&&new hd(f).isZero())});return dn(qn,{sectionKey:"rewards",title:m1,icon:b,isEmpty:u.length===0,loading:i||l,children:u.map(g=>{let y=s.get(g.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0",c=p(g,"withdraw"),h=p(g,"claim"),m=d(g.deposit_token.address,g.deposit_token.symbol),x=g.reward_tokens[0],k=x?d(x.address,x.symbol):"",R=g.reward_tokens.map(L=>L.symbol),I=R.length>0?`${g.deposit_token.symbol}-${R.join("/")}`:g.deposit_token.symbol,C=x?Cr(f,x.decimals):"0",S=x?.symbol??"Reward",E=Yr(w,g.deposit_token.decimals,g.deposit_token.price,r),M=x?Yr(f,x.decimals,x.price,r):null,O=!!y&&g1(f);return cn("article",{className:"wp-item","data-side":"reward",children:[cn("div",{className:"wp-item-body",children:[cn("div",{className:"wp-item-line",children:[cn("span",{className:"wp-item-label",children:["Pool",dn("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),cn("div",{className:"wp-svc-token",children:[cn("span",{className:"wp-token-stack","aria-hidden":!0,children:[m&&dn("img",{className:"wp-svc-token-icon",src:m,alt:""}),k&&dn("img",{className:"wp-svc-token-icon",src:k,alt:""})]}),dn("span",{children:I})]})]}),cn("div",{className:"wp-item-line",children:[dn("span",{className:"wp-item-label",children:"Deposited"}),cn("div",{className:"wp-svc-token wp-svc-token--amount",children:[m&&dn("img",{className:"wp-svc-token-icon",src:m,alt:""}),cn("div",{className:"wp-svc-amount",children:[dn("span",{className:"wp-svc-amount-main",children:Cr(w,g.deposit_token.decimals)}),E&&dn("span",{className:"wp-item-usd",children:E})]})]})]}),cn("div",{className:"wp-item-line",children:[cn("span",{className:"wp-item-label",children:["Claimable (",S,")"]}),cn("div",{className:"wp-svc-token wp-svc-token--amount",children:[k&&dn("img",{className:"wp-svc-token-icon",src:k,alt:""}),cn("div",{className:"wp-svc-amount",children:[dn("span",{className:"wp-svc-amount-main",children:C}),M&&dn("span",{className:"wp-item-usd",children:M})]})]})]})]}),cn("div",{className:"wp-item-tags",children:[cn("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>Mt(L,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:y}},n),children:[dn("span",{className:"wp-tag-label",children:"Withdraw"}),dn(Bn,{size:12,className:"wp-tag-icon"})]}),cn("a",{className:"wp-tag wp-tag--mint","data-disabled":!O||void 0,"aria-disabled":!O||void 0,href:O?h:void 0,target:O?"_blank":void 0,rel:O?"noopener noreferrer":void 0,onClick:L=>{if(!O){L.preventDefault();return}Mt(L,h,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:y}},n)},children:[dn("span",{className:"wp-tag-label",children:"Claim"}),dn(Bn,{size:12,className:"wp-tag-icon"})]})]})]},g.pool_address)})})}import*as of from"react";import{useQuery as C1}from"@tanstack/react-query";import{useMemo as cs}from"react";var h1="0x70a08231",b1="0x18160ddd",w1="0x313ce567",y1=8e3;async function x1(e,t,n,r){let o=new AbortController,a=setTimeout(()=>o.abort(),y1);r&&r.addEventListener("abort",()=>o.abort(),{once:!0});let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:o.signal}).finally(()=>clearTimeout(a));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let s=await i.json();if(s.error)throw new Error(`RPC ${t}: ${s.error.message}`);if(s.result===void 0)throw new Error(`RPC ${t}: empty result`);return s.result}function v1(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function Ma(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Or(e,t,n,r,o){try{return await x1(e,"eth_call",[o?{from:o,to:t,data:n}:{to:t,data:n},"latest"],r)}catch{return}}async function k1(e,t,n,r){let[o,a,i]=await Promise.all([Or(e,n,h1+v1(t),r),Or(e,n,b1,r),Or(e,n,w1,r)]),s=Ma(o);if(s===void 0)return null;let l=Ma(i);return{balance:s,totalSupply:Ma(a),decimals:l!==void 0?Number(l):void 0}}async function La(e,t){let n=Ct[e].cross,r=await Ne("walletServer",e),o=await fetch(`${r}/v1/public/chain/info/${n}`,{cache:"no-store",signal:t});if(!o.ok)return;let a=await o.json();return("data"in a&&a.data!==void 0?Array.isArray(a.data)?a.data[0]:a.data:a)?.rpc||void 0}async function Zu(e,t,n,r){if(!t||n.length===0)return{};let o;try{o=await La(e,r)}catch{o=void 0}if(!o)return{};let a=await Promise.all(n.map(async s=>[s.toLowerCase(),await k1(o,t,s,r)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var R1="wp:withdraw-token-meta",N1="0xc89039c5",S1="0x95d89b41",T1="0x313ce567";function I1(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),n=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(n)||n<=0||n>64)return;let r=t.slice(128,128+n*2),o="";for(let a=0;a<r.length;a+=2)o+=String.fromCharCode(parseInt(r.slice(a,a+2),16));return o||void 0}catch{return}}function E1(e){if(!e||e==="0x")return;let n="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(n)&&n!=="0x0000000000000000000000000000000000000000"?n:void 0}async function A1(e,t,n){if(t.length===0)return{};let r;try{r=await La(e,n)}catch{r=void 0}if(!r)return{};let o=await Promise.all(t.map(async i=>{let s=E1(await Or(r,i,N1,n));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Or(r,s,S1,n),Or(r,s,T1,n)]),p=I1(l),b=Ma(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:b!==void 0?Number(b):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function Xu(e,t,n=!0){let o=n&&!!t,{allPools:a,isLoading:i}=Xo(e,o),{deposits:s,isLoading:l}=ls(e,t,o),d=cs(()=>{let f=new Map;for(let c of a)f.set(c.pool_address.toLowerCase(),c);return f},[a]),p=cs(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),b=cs(()=>p.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[p,d]),{data:u,isLoading:g}=C1({queryKey:[R1,e,b],queryFn:({signal:f})=>A1(e,b,f),enabled:o&&b.length>0,staleTime:1440*60*1e3});return{positions:cs(()=>{let f=[];for(let c of p){let h=c.pool_address.toLowerCase(),m=d.get(h);if(m){f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:m.pool_type,tokenSymbol:m.deposit_token.symbol,tokenAddress:m.deposit_token.address,decimals:m.deposit_token.decimals,price:m.deposit_token.price,depositedRaw:c.deposited_amount});continue}let x=u?.[h];x&&f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:x.symbol,tokenAddress:x.tokenAddress,decimals:x.decimals,depositedRaw:c.deposited_amount})}return f},[p,d,u]),isLoading:i||l||g}}import*as on from"react";import{Fragment as Ju,jsx as Oe,jsxs as Ut}from"react/jsx-runtime";var M1=400;function L1(e,t,n){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${rs(e.gasLimit*r)} ${n??""}`.trim()}function bd(e,t,n){return n==="loading"?"Estimating...":n==="error"||n==="unavailable"?"-":`${e} ${t}`.trim()}function D1({position:e,size:t}){return e.icon?Oe("img",{src:e.icon,alt:"",width:t,height:t}):Oe("span",{children:e.tokenSymbol.slice(0,1)})}function $u({open:e,status:t,positions:n,initialPoolAddress:r,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:b,trackFunnel:u,nativeSymbol:g}){let[y,w]=on.useState(null),[f,c]=on.useState("idle"),h=on.useRef(0),m=on.useRef(void 0),x=on.useRef(null);on.useEffect(()=>()=>clearTimeout(m.current),[]);let k=on.useMemo(()=>{let U=r?.toLowerCase();return n.find(A=>A.poolAddress.toLowerCase()===U)??n[0]??null},[n,r]),R=on.useMemo(()=>{try{return BigInt(k?.depositedRaw??"0")}catch{return 0n}},[k?.depositedRaw]),I=k?.decimals??18;on.useEffect(()=>{!e||!k||u?.("position_selected")},[e,k,u]);let C=on.useCallback(()=>{w(null),c(l?"idle":"unavailable"),h.current+=1,x.current=null},[]);if(on.useEffect(()=>{e&&C()},[e,C]),on.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(m.current);return}if(!l||!k){clearTimeout(m.current),c("unavailable");return}if(R<=0n){clearTimeout(m.current),h.current+=1,x.current=null,w(null),c("idle");return}let U=`${k.poolAddress.toLowerCase()}:${R.toString()}`;if(x.current===U)return;x.current=U,clearTimeout(m.current);let A=h.current+1;h.current=A,c("loading"),m.current=setTimeout(()=>{l(k,R).then(F=>{h.current===A&&(w(F??null),c(F?"ready":"unavailable"))}).catch(()=>{h.current===A&&(w(null),c("error"))})},M1)},[e,t,R,l,k]),!e||!k)return null;let S=t==="submitting",E=Zo(y?.maxPriorityFeePerGas),M=Zo(y?.maxFeePerGas??y?.gasPrice),O=ns(y?.gasLimit),L=Cr(k.depositedRaw,I);return Oe("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:U=>{U.target===U.currentTarget&&!S&&d()},children:Ut("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-withdraw-title","aria-label":"Withdraw","data-status":t,"data-vaul-no-drag":!0,children:[Oe("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Oe("span",{})}),Ut("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?Ut(Ju,{children:[Oe("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Oe(is,{})}),Ut("div",{className:"wp-claim-copy",children:[Oe("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Oe("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),Oe("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Ut("div",{className:"wp-claim-list-item",children:[Oe("span",{children:"Tx Hash"}),Ut("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[Oe("strong",{children:ts(a)}),s?Oe(as,{}):Oe(os,{})]})]})})]}):Ut(Ju,{children:[t==="error"&&Ut("div",{className:"wp-claim-heading",children:[Oe("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Oe("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),Ut("div",{className:"wp-claim-reward-card","data-fit":Ta(k.tokenSymbol,L),"aria-label":"Deposited balance",children:[Oe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Oe(D1,{position:k,size:28})}),Oe("strong",{className:"wp-claim-reward-symbol",children:k.tokenSymbol}),Oe("strong",{className:"wp-claim-reward-amount",children:L})]}),Ut("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[Ut("div",{className:"wp-claim-account-row",children:[Ut("div",{className:"wp-claim-account",children:[Oe("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),Ut("strong",{children:[k.tokenSymbol," Pool"]})]}),Oe("span",{children:es(o)})]}),Oe("span",{className:"wp-claim-divider","aria-hidden":!0}),Ut("div",{className:"wp-claim-detail-list",children:[Ut("div",{className:"wp-claim-detail-row",children:[Oe("span",{children:"Est. Tx Fee"}),Oe("strong",{children:L1(y,f,g)})]}),Ut("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Priority Fee Per Gas"}),Oe("strong",{children:bd(E,"Gwei",f)})]}),Ut("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Max Fee Per Gas"}),Oe("strong",{children:bd(M,"Gwei",f)})]}),Ut("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Gas Limit"}),Oe("strong",{children:bd(O,"",f)})]})]})]})]}),Ut("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Oe("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),Ut("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}k&&R>0n&&p(k,R,y)},disabled:S||(t==="confirm"||t==="error")&&R<=0n,children:[t==="success"&&"Done",t==="submitting"&&Oe("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),Oe("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Oe("span",{})})]})})}import*as Dt from"react";import{useQueryClient as B1}from"@tanstack/react-query";import{useQuery as P1}from"@tanstack/react-query";var O1="wp:reward-factory-info";function ef(e,t=!0){let{data:n,...r}=P1({queryKey:[O1,e],queryFn:async({signal:o})=>{let a=await Ne("gameReward",e),i=await fetch(`${a}/v1/factory/info`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Factory info fetch failed: ${i.status}`);let s=await i.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:n?.data??null,routerAddress:n?.data.router_address??"",...r}}var tf="wp:";function Kr(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function nf(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function rf(e){let{env:t,walletAddress:n,sendTransaction:r,estimateGas:o}=Lt(),a=!!n,i=!!r,s=B1(),{routerAddress:l}=ef(t,a&&i),d=nf(l),[p,b]=Dt.useState(!1),[u,g]=Dt.useState(void 0),[y,w]=Dt.useState("confirm"),[f,c]=Dt.useState(),[h,m]=Dt.useState(""),[x,k]=Dt.useState(!1),R=Dt.useRef(void 0);Dt.useEffect(()=>()=>clearTimeout(R.current),[]);let I=Dt.useRef(new Set),C=Dt.useCallback((F,ne)=>{I.current.has(F)||(I.current.add(F),Ye("withdraw",F,{...ne,tags:{section:e,...ne?.tags}}))},[e]),S=Dt.useCallback((F,ne)=>d?{to:d,value:0n,data:Lu(F,ne),chainId:Ct[t].cross}:null,[t,d]),E=Dt.useCallback(()=>{Kr(s)},[s]),M=Dt.useCallback(F=>{g(F),b(!0),w("confirm"),c(void 0),m(""),k(!1),I.current=new Set,C("opened")},[C]),O=Dt.useCallback(()=>{y!=="submitting"&&(b(!1),g(void 0),w("confirm"),c(void 0),m(""),k(!1),y==="success"&&E())},[y,E]),L=Dt.useCallback(async(F,ne)=>{if(!o)return null;let ee=S(F.poolId,ne),Z=nf(n);return!ee||!Z?null:o({...ee,from:Z})},[S,o,n]),U=Dt.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),k(!0),clearTimeout(R.current),R.current=setTimeout(()=>k(!1),1400)}catch{k(!1)}},[f]),A=Dt.useCallback(async(F,ne,ee)=>{if(!r){w("error"),m("Withdraw is not available for this wallet.");return}if(!d){w("error"),m("Withdraw contract address is not available.");return}try{w("submitting"),m("");let Z=S(F.poolId,ne);if(!Z){w("error"),m("Withdraw contract address is not available.");return}C("submitted");let W=await r({...Z,gas:ee?.gasLimit&&ee.gasLimit>0n?ee.gasLimit:void 0,maxFeePerGas:ee?.maxFeePerGas&&ee.maxFeePerGas>0n?ee.maxFeePerGas:void 0,maxPriorityFeePerGas:ee?.maxPriorityFeePerGas&&ee.maxPriorityFeePerGas>0n?ee.maxPriorityFeePerGas:void 0});c(W),w("success"),C("confirmed"),E()}catch(Z){w("error"),m(Ia(Z,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:Dn(Z)})}},[S,E,d,r,C]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:u,status:y,txHash:f,error:h,copied:x,hasEstimator:!!o,openWithdraw:M,closeWithdraw:O,estimateWithdraw:L,confirmWithdraw:A,copyHash:U,trackFunnelOnce:C}}import{Fragment as F1,jsx as Nn,jsxs as Br}from"react/jsx-runtime";var z1="ONEpoints";function af(){let{env:e,walletAddress:t,onOutlink:n}=Lt(),r=Qn(),o=!!t,{getTokenImage:a,getNativeToken:i}=Rr(e,o),s=rf("points"),{positions:l,isLoading:d}=Xu(e,t,o),p=of.useMemo(()=>l.filter(Mu).map(g=>({...g,icon:a(g.tokenAddress,g.tokenSymbol)})),[l,a]),b=`${Vn[e]}/point.png`,u=Wu[e];return Br(F1,{children:[Nn(qn,{sectionKey:"points",title:z1,icon:b,isEmpty:p.length===0,loading:d,children:p.map(g=>{let y=g.price?Yr(g.depositedRaw,g.decimals,g.price,r):null;return Br("article",{className:"wp-item","data-side":"reward",children:[Br("div",{className:"wp-item-body",children:[Br("div",{className:"wp-item-line",children:[Nn("span",{className:"wp-item-label",children:"Token"}),Br("div",{className:"wp-svc-token",children:[g.icon&&Nn("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),Nn("span",{children:g.tokenSymbol})]})]}),Br("div",{className:"wp-item-line",children:[Nn("span",{className:"wp-item-label",children:"Deposited"}),Br("div",{className:"wp-svc-token wp-svc-token--amount",children:[g.icon&&Nn("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),Br("div",{className:"wp-svc-amount",children:[Nn("span",{className:"wp-svc-amount-main",children:Cr(g.depositedRaw,g.decimals)}),y&&Nn("span",{className:"wp-item-usd",children:y})]})]})]})]}),Nn("div",{className:"wp-item-tags",children:s.canWithdrawInline?Nn("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(g.poolAddress),children:Nn("span",{className:"wp-tag-label",children:"Withdraw"})}):Br("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:w=>Mt(w,u,{category:"portfolio",origin:"portfolio-points",payload:{position:g}},n),children:[Nn("span",{className:"wp-tag-label",children:"Withdraw"}),Nn(Bn,{size:12,className:"wp-tag-icon"})]})})]},g.poolAddress)})}),Nn($u,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}import*as wd from"react";import{useQuery as U1}from"@tanstack/react-query";var j1="wp:stake-info";function sf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=U1({queryKey:[j1,e,t],queryFn:async({signal:s})=>{let l=await Ne("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:r,staleTime:0});return{stakeInfo:o?.data,...a}}import{useQuery as W1}from"@tanstack/react-query";var G1="wp:stake-rewards",H1=31;function lf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=W1({queryKey:[G1,e,t],queryFn:async({signal:i})=>{let s=await Ne("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${H1}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:r,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Au(o),...a}}import{useQuery as _1}from"@tanstack/react-query";var Q1="wp:staking-onchain";function df(e,t,n=!0){let r=n&&!!t&&!!e,{data:o,...a}=_1({queryKey:[Q1,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:r,staleTime:0});return{onchain:o,...a}}import{useMemo as cf}from"react";import V1 from"bignumber.js";function pf(e){return e?.trim().toUpperCase()==="ONE"}function uf(e){return new V1(e||"0").isGreaterThan(0)}function ps(e,t,n=!0){let{allPools:r}=Xo(e,n),o=cf(()=>{for(let d of r)for(let p of[d.deposit_token,...d.reward_tokens])if(pf(p?.symbol)&&uf(p.price))return p.price},[r]),a=n&&o===void 0,{tokens:i}=Vr(e,t,a),{statsMap:s}=qr(e,a),l=Ct[e].cross;return cf(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&pf(p.symbol));if(d){let p=s.get(kr(d.chainId,d.address));if(p&&uf(p.price))return p.price}return"0"},[o,i,s,l])}import Xr from"bignumber.js";import{jsx as Yn,jsxs as Zr}from"react/jsx-runtime";function q1(e){if(!e)return"\u2014";let t=new Xr(e);return t.isFinite()?`${t.toFormat(2,Xr.ROUND_DOWN)}%`:"\u2014"}function ff(){let{env:e,walletAddress:t,onOutlink:n,stakingRewardsReader:r}=Lt(),o=Qn(),a=!!t,{stakeInfo:i,isLoading:s}=sf(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=lf(e,t,a),{onchain:b}=df(t,r,a),u=ps(e,t,a),{getNativeToken:g}=Rr(e,a),y=g()?.symbol,w="ONEstaking",f=`${Vn[e]}/cross-staking.png`,c=Hu[e],h=i?.total_stake??"0",m=wd.useMemo(()=>b?new Xr(b.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[b,l,i]),x=wd.useMemo(()=>b?new Xr(b.stakedWei.toString()).shiftedBy(-18):new Xr(h),[b,h]),k=d!==void 0?new Xr(d):void 0,R=i?.days_since_first_stake,I=k!==void 0&&k.isFinite()&&x.isGreaterThan(0)&&R!==null&&R!==void 0?k.div(x).times(365).div(Math.max(1,R)).times(100):void 0,C=!(new Xr(h).isZero()&&new Xr(m).isZero()),S=Yr(h,0,u,o),E=Yr(m,0,u,o);return Yn(qn,{sectionKey:"staking",title:w,icon:f,iconFit:"contain",isEmpty:!C,loading:s||p,children:Zr("article",{className:"wp-item","data-side":"stake",children:[Zr("div",{className:"wp-item-body",children:[Zr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"Staked"}),Zr("div",{className:"wp-svc-amount",children:[Yn("span",{className:"wp-svc-amount-main",children:`${pd(h)} ${y??""}`.trim()}),S&&Yn("span",{className:"wp-item-usd",children:S})]})]}),Zr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"Rewards Earned"}),Zr("div",{className:"wp-svc-amount",children:[Yn("span",{className:"wp-svc-amount-main",children:`${pd(m)} ${y??""}`.trim()}),E&&Yn("span",{className:"wp-item-usd",children:E})]})]}),Zr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"My APR"}),Yn("span",{children:q1(I?.toString(10))})]})]}),Yn("div",{className:"wp-item-tags",children:Zr("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>Mt(M,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},n),children:[Yn("span",{className:"wp-tag-label",children:"Manage"}),Yn(Bn,{size:12,className:"wp-tag-icon"})]})})]})})}import*as yd from"react";import{useQuery as Y1}from"@tanstack/react-query";var K1="wp:game-swap-pools";function mf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=Y1({queryKey:[K1,e,t],queryFn:async({signal:i})=>{let s=await Ne("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:r,staleTime:0});return{pools:o??[],...a}}import{useQuery as Z1}from"@tanstack/react-query";var X1="wp:game-swap-lp-balances";function gf(e,t,n,r){let o=[...n].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=Z1({queryKey:[X1,e,t,o,!!r],queryFn:async({signal:l})=>{let d=r?await r(o):await Zu(e,t,o,l),p={};for(let[b,u]of Object.entries(d))p[b.toLowerCase()]=u;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}import zr from"bignumber.js";import{jsx as Kn,jsxs as dr}from"react/jsx-runtime";var J1="Gametoken LP",bf=18,$1=new zr("0.0001");function hf(e){return e?.trim().toUpperCase()==="ONE"}function ey(e){return e&&e>0?e:bf}function ty(e){let t=hf(e.token_a?.symbol)&&!hf(e.token_b?.symbol),n=t?e.reserve_a:e.reserve_b,r=ey(t?e.token_a?.decimals:e.token_b?.decimals),o=new zr(n||"0").shiftedBy(-r);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new zr(0):o.times(2)}function ny(e,t,n,r){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||r||"?",i=t?.decimals??bf,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new zr(t.balance.toString()),p=new zr(t.totalSupply.toString()),b=d.div(p);s=b.times(100);let u=b.times(ty(e));if(u.isGreaterThan(0)){let g=new zr(e.quote_usd??e.cross_usd??"0");l=g.isGreaterThan(0)?Co(u.times(g),n):`${u.toFormat(4,zr.ROUND_DOWN)} ${r??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function wf(){let{env:e,walletAddress:t,onOutlink:n,lpBalanceReader:r}=Lt(),o=Qn(),a=!!t,{pools:i,isLoading:s}=mf(e,t,a),l=yd.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=gf(e,t,l,r),{getNativeToken:b}=Rr(e,a),u=b()?.symbol,g=`${Vn[e]}/game-token.png`,y=Object.keys(d).length>0,w=yd.useMemo(()=>{let c=i.map(h=>ny(h,d[h.pair_address?.toLowerCase()],o,u));return y?c.filter(h=>h.lpAmountRaw?new zr(h.lpAmountRaw).shiftedBy(-h.lpDecimals).isGreaterThanOrEqualTo($1):!1):c},[i,d,y,o,u]),f=c=>{let h=c.token_a?.address??c.pair_address;return`${_u[e]}/gametoken/tokens/${h}?trade=deposit`};return Kn(qn,{sectionKey:"gameSwap",title:J1,icon:g,iconFit:"contain",isEmpty:w.length===0,loading:s||p,children:w.map(c=>{let{pool:h}=c,m=f(h),x=`${c.tokenASymbol} / ${c.tokenBSymbol}`,k=h.token_a?.logo_url,R=h.token_b?.logo_url;return dr("article",{className:"wp-item","data-side":"game-swap",children:[dr("div",{className:"wp-item-body",children:[dr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Pool"}),dr("div",{className:"wp-svc-token",children:[dr("span",{className:"wp-token-stack","aria-hidden":!0,children:[k&&Kn("img",{className:"wp-svc-token-icon",src:k,alt:""}),R&&Kn("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),Kn("span",{children:x})]})]}),c.lpAmountRaw!==void 0&&dr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"My LP"}),dr("span",{children:[Cr(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&dr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Pool Share"}),dr("span",{children:[c.sharePercent.toFormat(2,zr.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&dr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Value"}),Kn("span",{children:c.valueText})]})]}),Kn("div",{className:"wp-item-tags",children:dr("a",{className:"wp-tag wp-tag--mint",href:m,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":x,onClick:I=>Mt(I,m,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:h}},n),children:[Kn("span",{className:"wp-tag-label",children:"Manage"}),Kn(Bn,{size:12,className:"wp-tag-icon"})]})})]},h.pair_address)})})}import Ro from"bignumber.js";import{useMemo as dy}from"react";import{useQuery as ry}from"@tanstack/react-query";var oy="wp:forge-pools";function yf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=ry({queryKey:[oy,e,t],queryFn:async()=>{let s=await Ne("bondingCurve",e),l=await fetch(`${s}/v1/users/${t}/pools`,{cache:"no-store"});if(!l.ok)throw new Error(`forge pools fetch failed: ${l.status}`);return(await l.json()).data?.items??[]},enabled:r,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}import{useQueries as ay}from"@tanstack/react-query";import{useMemo as iy}from"react";var sy="wp:forge-token-detail";async function ly(e,t){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return n.ok?(await n.json())?.data?.token??null:null}function xf(e,t,n=!0){let r=ay({queries:t.map(i=>({queryKey:[sy,e,i],queryFn:async()=>ly(await Ne("bondingCurve",e),i),enabled:n&&!!i,staleTime:3e4}))}),o=iy(()=>{let i=new Map;for(let s=0;s<r.length;s++){let l=r[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[r,t]),a=r.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}import{jsx as Sn,jsxs as Jr}from"react/jsx-runtime";var cy="ONEforge",vf=18,py="https://contents.crosstoken.io/wallet/token/images/FT.png";function uy(e){if(!e||e==="0")return"0";let t=new Ro(e).shiftedBy(-vf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Ro.ROUND_DOWN):t.toFormat(4,Ro.ROUND_DOWN)}function fy(e){let t=Number(e);return!Number.isFinite(t)||t<=0?"0%":t>=1?`${(Math.floor(t*100)/100).toFixed(2)}%`:`${(Math.floor(t*1e4)/1e4).toFixed(4)}%`}function my(e,t,n,r){let o=new Ro(n||"0");if(!o.isGreaterThan(0))return null;let a=new Ro(e.total_supply||"0"),i=new Ro(e.lp_balance||"0"),s=new Ro(t?.reserve_b||"0").shiftedBy(-vf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?Co(p,r):null}function kf(){let{env:e,walletAddress:t,onOutlink:n}=Lt(),r=Qn(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=yf(e,t,o),l=dy(()=>a.map(g=>g.token.address),[a]),{detailMap:d}=xf(e,l,o&&l.length>0),p=ps(e,t,o),b=g=>`${Gu[e]}/forge/token/${g.token.address}`,u=`${Vn[e]}/forge.png`;return Sn(qn,{sectionKey:"forge",title:cy,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(g=>{let y=d.get(g.token.address.toLowerCase()),w=y?.image_url||y?.image||g.token.image||py,f=y?.symbol||g.token.symbol,c=b(g),h=my(g,y,p,r);return Jr("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:m=>Mt(m,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:g,tokenDetail:y}},n),children:[Jr("div",{className:"wp-item-body",children:[Jr("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"Asset"}),Jr("div",{className:"wp-svc-token",children:[Sn("img",{className:"wp-svc-token-icon",src:w,alt:""}),Sn("span",{children:f}),y?.name&&Sn("span",{className:"wp-token-subtle",children:y.name})]})]}),Jr("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"LP Balance"}),Sn("div",{className:"wp-svc-token wp-svc-token--amount",children:Jr("div",{className:"wp-svc-amount",children:[Sn("span",{className:"wp-svc-amount-main",children:uy(g.lp_balance)}),h&&Sn("span",{className:"wp-item-usd",children:h})]})})]}),Jr("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"Ownership"}),Sn("span",{className:"wp-line-value",children:fy(g.pool_ownership)})]})]}),Sn("div",{className:"wp-item-tags",children:Jr("span",{className:"wp-tag wp-tag--muted",children:[Sn("span",{className:"wp-tag-label",children:"Withdraw"}),Sn(Bn,{size:12,className:"wp-tag-icon"})]})})]},g.pair_address)})})}import{useMemo as Of}from"react";import Fy from"bignumber.js";import{useQuery as gy}from"@tanstack/react-query";var hy="wp:crossd-positions";function by(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(r=>{if(!r?.token_id||!r.liquidity)return!1;try{return BigInt(r.liquidity)>0n}catch{return!1}})}function Cf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=gy({queryKey:[hy,e,t],queryFn:async()=>{let s=await fetch(`${ds[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return by(await s.json())},enabled:r,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}import{useQueries as wy}from"@tanstack/react-query";import{useMemo as yy}from"react";var xy="wp:crossd-position-details";function vy(e){let t=e??{},n=t.data??t;return n?.token_id||n?.pool?n:null}function Rf(e,t,n=!0){let r=wy({queries:t.map(a=>({queryKey:[xy,e,a],queryFn:async()=>{let i=await fetch(`${ds[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return vy(await i.json())},enabled:n&&!!a,staleTime:6e4}))});return{detailMap:yy(()=>{let a=new Map;return r.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[r,t])}}import*as Fr from"react";import{Fragment as Sf,jsx as Pe,jsxs as an}from"react/jsx-runtime";var ky=300*1e3,Nf="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Cy(e,t,n){if(t)return"Estimating...";if(!e)return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${rs(e.gasLimit*r)} ${n??""}`.trim()}function xd(e,t,n){return n?"Estimating...":`${e} ${t}`.trim()}function Tf({open:e,status:t,target:n,token0Icon:r,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:b,prepareWithdraw:u,confirmWithdraw:g,onClose:y,onCopyHash:w,trackFunnel:f}){let[c,h]=Fr.useState(null),[m,x]=Fr.useState(null),k=Fr.useRef(0);Fr.useEffect(()=>{if(!e||!n)return;let _=++k.current;h(null),x(null),f?.("dialog_opened"),u().then(le=>{k.current===_&&(h(le),x(le?Date.now():null))})},[e,n]);let R=t==="submitting",I=t==="estimating"||t==="confirm"&&!c,C=Fr.useCallback(async()=>{let _=c,le=!m||Date.now()-m>ky;if(!_||le){let me=++k.current;if(_=await u(),k.current!==me)return;h(_),x(_?Date.now():null)}_&&await g(_)},[c,m,u,g]);if(!e||!n)return null;let{position:S,detail:E}=n,M=E.pool?.token0,O=E.pool?.token1,L=a||M?.symbol||S.pool?.token0_symbol||"?",U=i||O?.symbol||S.pool?.token1_symbol||"?",A=M?.decimals??18,F=O?.decimals??18,ne=r||M?.logo_url||Nf,ee=o||O?.logo_url||Nf,Z=`${L}/${U}`,W=c?Yo(c.expectedAmount0.toString(),A):null,q=c?Yo(c.expectedAmount1.toString(),F):null,B=Zo(c?.estimate?.maxPriorityFeePerGas),G=Zo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),te=ns(c?.estimate?.gasLimit);return Pe("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:_=>{_.target===_.currentTarget&&!R&&y()},children:an("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-crossd-withdraw-title","aria-label":"Withdraw position","data-status":t,"data-vaul-no-drag":!0,children:[Pe("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Pe("span",{})}),an("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?an(Sf,{children:[Pe("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Pe(is,{})}),an("div",{className:"wp-claim-copy",children:[Pe("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),an("p",{className:"wp-claim-desc",children:["Your ",Z," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),Pe("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:an("div",{className:"wp-claim-list-item",children:[Pe("span",{children:"Tx Hash"}),an("button",{type:"button",className:"wp-claim-hash",onClick:w,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[Pe("strong",{children:ts(l)}),p?Pe(as,{}):Pe(os,{})]})]})})]}):an(Sf,{children:[t==="error"&&an("div",{className:"wp-claim-heading",children:[Pe("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Pe("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),an("div",{className:"wp-claim-reward-card","data-fit":Ta(L,W??""),"aria-label":`Expected ${L}`,children:[Pe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Pe("img",{src:ne,alt:"",width:28,height:28})}),Pe("strong",{className:"wp-claim-reward-symbol",children:L}),Pe("strong",{className:"wp-claim-reward-amount",children:W??"Estimating..."})]}),an("div",{className:"wp-claim-reward-card","data-fit":Ta(U,q??""),"aria-label":`Expected ${U}`,children:[Pe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Pe("img",{src:ee,alt:"",width:28,height:28})}),Pe("strong",{className:"wp-claim-reward-symbol",children:U}),Pe("strong",{className:"wp-claim-reward-amount",children:q??"Estimating..."})]}),b&&Pe("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:an("div",{className:"wp-claim-detail-list",children:[an("div",{className:"wp-claim-detail-row",children:[Pe("span",{children:"Est. Tx Fee"}),Pe("strong",{children:Cy(c?.estimate,I,s)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Priority Fee Per Gas"}),Pe("strong",{children:xd(B,"Gwei",I)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Max Fee Per Gas"}),Pe("strong",{children:xd(G,"Gwei",I)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Gas Limit"}),Pe("strong",{children:xd(te,"",I)})]})]})})]}),an("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Pe("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),Pe("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}R||I||(f?.("confirm_clicked"),C())},disabled:R||I,children:t==="success"?"Done":R?Pe("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):I?Pe("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),Pe("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Pe("span",{})})]})})}import*as Rt from"react";import{useQueryClient as Oy}from"@tanstack/react-query";var Ry="0x0c49ccbe",Ny="0xfc6f7865",Sy="0x49404b7c",Ty="0xdf2ab5bb",Iy="0xac9650d8",If=(1n<<128n)-1n,Af=600n,Ey=99n,Ay=100n;function vd(e){return e*Ey/Ay}function Ef(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Tn(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let n=e.toString(16);if(n.length>64)throw new Error(`${t} exceeds uint256`);return n.padStart(64,"0")}function us(e,t){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`${t} is not a valid address`);return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function kd(e){return Ry+Tn(e.tokenId,"tokenId")+Tn(e.liquidity,"liquidity")+Tn(e.amount0Min,"amount0Min")+Tn(e.amount1Min,"amount1Min")+Tn(e.deadline,"deadline")}function My(e){return Ny+Tn(e.tokenId,"tokenId")+us(e.recipient,"recipient")+Tn(e.amount0Max,"amount0Max")+Tn(e.amount1Max,"amount1Max")}function Ly(e,t){return Sy+Tn(e,"amountMinimum")+us(t,"recipient")}function Dy(e,t,n){return Ty+us(e,"token")+Tn(t,"amountMinimum")+us(n,"recipient")}function Py(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let a=o.replace(/^0x/,"");if(a.length%2!==0||!/^[0-9a-fA-F]*$/.test(a))throw new Error("multicall element must be valid hex bytes");let i=a.length%64===0?a:a.padEnd(a.length+(64-a.length%64),"0");return Tn(BigInt(a.length/2),"callLength")+i.toLowerCase()}),n=BigInt(e.length)*32n,r=[];for(let o of t)r.push(Tn(n,"callOffset")),n+=BigInt(o.length/2);return Iy+Tn(0x20n,"arrayOffset")+Tn(BigInt(e.length),"arrayLength")+r.join("")+t.join("")}function Mf(e){if(!e||e==="0x")return null;let t=e.replace(/^0x/,"");return t.length<128||!/^[0-9a-fA-F]+$/.test(t)?null:{amount0:BigInt(`0x${t.slice(0,64)}`),amount1:BigInt(`0x${t.slice(64,128)}`)}}function Lf(e){let t=Ef(e.token0,e.wcrossAddress),n=Ef(e.token1,e.wcrossAddress),r=t||n,o=[kd({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),My({tokenId:e.tokenId,recipient:r?e.positionManagerAddress:e.owner,amount0Max:If,amount1Max:If})];return r&&(o.push(Ly(0n,e.owner)),o.push(Dy(t?e.token1:e.token0,0n,e.owner))),Py(o)}async function Df(e,t,n){let r;try{r=await La(e,n)}catch{r=void 0}if(!r)return null;let o=kd({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Or(r,t.positionManager,o,n,t.owner);return Mf(a)}var By=[1500,3e3,4500,6e3];function zy(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Pf(){let{env:e,walletAddress:t,sendTransaction:n,estimateGas:r}=Lt(),o=!!n,a=Oy(),[i,s]=Rt.useState(!1),[l,d]=Rt.useState(null),[p,b]=Rt.useState("confirm"),[u,g]=Rt.useState(),[y,w]=Rt.useState(""),[f,c]=Rt.useState(!1),[h,m]=Rt.useState(new Set),x=Rt.useRef(void 0),k=Rt.useRef([]),R=Rt.useRef(0);Rt.useEffect(()=>()=>{clearTimeout(x.current),k.current.forEach(clearTimeout)},[]);let I=Rt.useRef(new Set),C=Rt.useCallback((A,F)=>{I.current.has(A)||(I.current.add(A),Ye("withdraw",A,{...F,tags:{section:"crossdPool",...F?.tags}}))},[]),S=Rt.useCallback(()=>{let A=()=>Kr(a);A(),k.current.forEach(clearTimeout),k.current=By.map(F=>setTimeout(A,F))},[a]),E=Rt.useCallback(A=>{R.current+=1,d(A),s(!0),b("confirm"),g(void 0),w(""),c(!1),I.current=new Set,C("opened")},[C]),M=Rt.useCallback(()=>{p!=="submitting"&&(R.current+=1,s(!1),d(null),b("confirm"),g(void 0),w(""),c(!1))},[p]),O=Rt.useCallback(async()=>{let A=R.current,F=zy(t),ne=l?.position.token_id,ee=l?.position.liquidity,Z=l?.detail.pool?.token0?.address,W=l?.detail.pool?.token1?.address;if(!F||!ne||!ee||!Z||!W)return b("error"),w("Position data is incomplete. Please refresh and retry."),null;try{b("estimating"),w("");let q=BigInt(ne),B=BigInt(ee),G=BigInt(Math.floor(Date.now()/1e3))+Af,te=Vu[e],_=await Df(e,{owner:F,positionManager:te,tokenId:q,liquidity:B,deadline:G});if(R.current!==A)return null;if(!_)return b("error"),w("Failed to estimate withdrawal amounts. Please retry."),null;let le=Lf({tokenId:q,liquidity:B,amount0Min:vd(_.amount0),amount1Min:vd(_.amount1),deadline:G,owner:F,positionManagerAddress:te,token0:Z,token1:W,wcrossAddress:qu[e]}),me={to:te,value:0n,data:le,chainId:Ct[e].cross},Te=null;if(r){try{Te=await r({...me,from:F})}catch{Te=null}if(R.current!==A)return null}return b("confirm"),{tx:me,estimate:Te,expectedAmount0:_.amount0,expectedAmount1:_.amount1}}catch(q){return R.current!==A||(b("error"),w(Ia(q,"Failed to prepare withdraw."))),null}},[e,r,l,t]),L=Rt.useCallback(async A=>{if(!n){b("error"),w("Withdraw is not available for this wallet.");return}try{b("submitting"),w(""),C("submitted");let F=await n({...A.tx,gas:A.estimate?.gasLimit&&A.estimate.gasLimit>0n?A.estimate.gasLimit:void 0,maxFeePerGas:A.estimate?.maxFeePerGas&&A.estimate.maxFeePerGas>0n?A.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:A.estimate?.maxPriorityFeePerGas&&A.estimate.maxPriorityFeePerGas>0n?A.estimate.maxPriorityFeePerGas:void 0});g(F),b("success");let ne=l?.position.token_id;ne&&m(ee=>{let Z=new Set(ee);return Z.add(ne),Z}),C("confirmed"),S()}catch(F){b("error"),w(Ia(F,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:Dn(F)})}},[S,n,l,C]),U=Rt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),c(!0),clearTimeout(x.current),x.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:h,status:p,txHash:u,error:y,copied:f,hasEstimator:!!r,openWithdraw:E,closeWithdraw:M,prepareWithdraw:O,confirmWithdraw:L,copyHash:U,trackFunnelOnce:C}}import{Fragment as jy,jsx as In,jsxs as $r}from"react/jsx-runtime";var Uy="ONEusd Pool",Bf="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function zf(){let{env:e,walletAddress:t,onOutlink:n}=Lt(),r=Qn(),o=!!t,{positions:a,isLoading:i}=Cf(e,t,o),s=Pf(),l=Of(()=>a.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[a,s.withdrawnTokenIds]),d=Of(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:p}=Rf(e,d,o&&d.length>0),b=`${Qu[e]}/pool`,{getTokenImage:u,getTokenSymbol:g,getNativeToken:y}=Rr(e,o),w=u("","ONEUSD",{chainOnly:!0})||`${Vn[e]}/crossd.png`,f={chainOnly:!0},c=(C,S)=>{let E=cd(g(C?.address??"",C?.symbol??S,f));return E==="ONE"?y()?.symbol??"?":E??"?"},h=(C,S)=>{let E=C?.symbol??S,M=cd(E);return M==="ONE"?y()?.image||Bf:u(C?.address??"",M,f)||C?.logo_url||Bf},m=s.target?.detail.pool,x=h(m?.token0,s.target?.position.pool?.token0_symbol),k=h(m?.token1,s.target?.position.pool?.token1_symbol),R=c(m?.token0,s.target?.position.pool?.token0_symbol),I=c(m?.token1,s.target?.position.pool?.token1_symbol);return $r(jy,{children:[In(qn,{sectionKey:"crossdPool",title:Uy,icon:w,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(C=>{let S=C.token_id?p.get(C.token_id):void 0,E=`${c(S?.pool?.token0,C.pool?.token0_symbol)}/${c(S?.pool?.token1,C.pool?.token1_symbol)}`,M=C.pool?.fee_tier_percentage,O=h(S?.pool?.token0,C.pool?.token0_symbol),L=h(S?.pool?.token1,C.pool?.token1_symbol),U=Co(new Fy(C.position_value_usd??"0"),r),A=s.canWithdrawInline&&!!S?.pool?.token0?.address&&!!S?.pool?.token1?.address;return $r("article",{className:"wp-item","data-side":"crossd",children:[$r("div",{className:"wp-item-body",children:[$r("div",{className:"wp-item-line",children:[In("span",{className:"wp-item-label",children:"Pool"}),$r("div",{className:"wp-svc-token",children:[$r("span",{className:"wp-token-stack","aria-hidden":!0,children:[In("img",{className:"wp-svc-token-icon",src:O,alt:""}),In("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),In("span",{children:E}),M&&In("span",{className:"wp-token-subtle",children:M})]})]}),$r("div",{className:"wp-item-line",children:[In("span",{className:"wp-item-label",children:"Position Value"}),In("span",{className:"wp-line-value",children:U})]})]}),In("div",{className:"wp-item-tags",children:A?In("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{S&&s.openWithdraw({position:C,detail:S})},children:In("span",{className:"wp-tag-label",children:"Withdraw"})}):$r("a",{className:"wp-tag wp-tag--muted",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:F=>Mt(F,b,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:S}},n),children:[In("span",{className:"wp-tag-label",children:"Withdraw"}),In(Bn,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),In(Tf,{open:s.isOpen,status:s.status,target:s.target,token0Icon:x,token1Icon:k,token0Symbol:R,token1Symbol:I,nativeSymbol:y()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var fs=["rewards","points","staking","gameSwap","forge","crossdPool"];ce(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-default, #202530);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-medium, #252b39);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-lowest, #362519);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #fff5ee);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:#fff;font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40)}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:#101820;font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
-
`);import{Fragment as Gy,jsx as Ke,jsxs as Ur}from"react/jsx-runtime";var Cd=15;function Jo({env:e,theme:t="light",walletAddress:n,walletName:r,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:b,sendTransaction:u,estimateGas:g,conversionRatio:y,currencySymbol:w,sections:f}){let c=it(e),h=Pt.useCallback(de=>!f||f.includes(de),[f]),m=!!n,x=Wy(),[k,R]=Pt.useState({}),I=Pt.useCallback((de,he)=>{R(ge=>{let Ze=ge[de];return Ze&&Ze.loading===he.loading&&Ze.empty===he.empty?ge:{...ge,[de]:he}})},[]),C=Pt.useCallback(de=>{R(he=>{if(!(de in he))return he;let ge={...he};return delete ge[de],ge})},[]),S=Pt.useMemo(()=>({report:I,unregister:C}),[I,C]),[E,M]=Pt.useState(Cd),[O,L]=Pt.useState(!1),[U,A]=Pt.useState(!1),F=Pt.useRef(void 0),ne=Pt.useCallback(()=>{Kr(x)},[x]),ee=Pt.useCallback(()=>{ne(),L(!0),setTimeout(()=>L(!1),600),M(Cd)},[ne]);Pt.useEffect(()=>{if(!m||!i)return;let de=setInterval(()=>{M(he=>he<=1?(ee(),Cd):he-1)},1e3);return()=>clearInterval(de)},[m,i,ee]);let Z=Pt.useCallback(()=>{o?.()},[o]),W=m?Pr(c,n,{size:64}):void 0,q=Pt.useCallback(async()=>{if(!(U||!n))try{await navigator.clipboard.writeText(n),A(!0),clearTimeout(F.current),F.current=setTimeout(()=>A(!1),2e3)}catch{}},[n,U]);Pt.useEffect(()=>()=>clearTimeout(F.current),[]);let B=Pt.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:n,close:Z,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:b,sendTransaction:u,estimateGas:g,conversionRatio:y,currencySymbol:w}),[c,t,n,Z,d,p,b,u,g,y,w]),G=fs.filter(h),te=G.length>0&&G.every(de=>{let he=k[de];return!!he&&!he.loading}),_=te&&G.every(de=>k[de]?.empty),le=G.some(de=>{let he=k[de];return!!he&&!he.empty}),me=G.length>0&&!te&&!le,Te=Ur(Gy,{children:[a&&Ur("div",{className:"wp-header",children:[Ur("div",{className:"wp-header-account",children:[o&&Ke("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:Ke(Bu,{})}),Ke("span",{className:"wp-header-avatar","aria-hidden":!0,children:W&&Ke("img",{src:W,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(r||n)&&Ur("div",{className:"wp-header-account-meta",children:[r&&Ke("span",{className:"wp-header-wallet-name",title:r,children:r}),n&&Ur("button",{type:"button",className:"wp-header-address-btn",onClick:q,"aria-label":"Copy wallet address","data-track":"address_copy",children:[Ke("span",{className:"wp-header-address",children:es(n)}),Ke("span",{className:"wp-header-address-copy","data-copied":U,children:U?Ke(ir,{size:14}):Ke(Mr,{size:14})})]})]})]}),Ur("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ee,children:[Ke(zu,{className:O?"wp-spin-once":void 0}),m&&Ke("span",{className:"wp-refresh-badge",children:E})]})]}),Ke("div",{className:"wp-body",children:Ur("div",{className:"wp-body-inner","data-empty":_||void 0,children:[h("rewards")&&Ke(Ku,{}),h("points")&&Ke(af,{}),h("staking")&&Ke(ff,{}),h("gameSwap")&&Ke(wf,{}),h("forge")&&Ke(kf,{}),h("crossdPool")&&Ke(zf,{}),me&&Ke("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:Ke("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),_&&Ur("div",{className:"wp-portfolio-empty",role:"status",children:[Ke("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:Ur("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[Ke("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),Ke("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),Ke("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),Ke("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),Ke("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return Ke(Aa.Provider,{value:B,children:Ke(ud.Provider,{value:S,children:Ke(ve,{feature:"wallet_portfolio",children:s==="none"?Te:Ke("div",{className:ye(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:Te})})})})}import{jsx as Rd,jsxs as Ff}from"react/jsx-runtime";function Uf({className:e}){let{env:t,theme:n,walletAddress:r,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Lt();return Ff(ms.Portal,{children:[Rd(ms.Overlay,{className:"wp-overlay"}),Ff(ms.Content,{className:ye("wp-fullscreen",e),"data-theme":n,children:[Rd(ms.Title,{className:"wp-sr-only",children:"Portfolio"}),Rd(Jo,{env:t,theme:n,walletAddress:r,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}import{jsx as jf}from"react/jsx-runtime";function _y({env:e,theme:t="light",walletAddress:n,open:r,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:b,children:u}){let g=it(e),y=r!==void 0,[w,f]=No.useState(!1),c=y?r:w,h=No.useCallback(k=>{y||f(k),o?.(k)},[y,o]),m=No.useCallback(()=>h(!1),[h]),x=No.useMemo(()=>({env:g,theme:t,open:c,walletAddress:n,close:m,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:b}),[g,t,c,n,m,a,i,s,l,d,p,b]);return jf(Aa.Provider,{value:x,children:jf(Hy.Root,{direction:"bottom",open:c,onOpenChange:h,noBodyStyles:!0,children:u})})}var Wf=Object.assign(_y,{Trigger:Pu,Content:Uf});import*as se from"react";import{createPortal as za}from"react-dom";import rm from"bignumber.js";import*as gs from"react";var Gf=120;function Hf(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function _f(){let[e,t]=gs.useState(!1);return gs.useEffect(()=>{let n=window.visualViewport,r=()=>n?.height??window.innerHeight,o=r(),a=()=>{let d=r();o=Math.max(o,d),t(o-d>Gf)},i=()=>{o=r(),t(!1)},s=d=>{Hf(d.target)&&o-r()>Gf&&t(!0)},l=d=>{Hf(d.target)&&t(!1)};return a(),n?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{n?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}import*as hs from"react";function bs(e,t=160){let[n,r]=hs.useState(e||null);return hs.useEffect(()=>{if(e){r(e);return}let o=window.setTimeout(()=>r(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||n,e?"open":"closed"]}import{jsx as eo,jsxs as g7}from"react/jsx-runtime";function Qf({size:e=16,className:t}){return eo("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:eo("path",{d:"M2.667 8a5.333 5.333 0 1 0 1.562-3.771L2.667 5.79M2.667 2.667v3.124h3.124M8 5.333V8l1.667 1",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Vf({size:e=16,className:t}){return eo("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:eo("path",{d:"M2.667 4h4M9.333 4h4M6.667 2.667v2.666M2.667 12h4M9.333 12h4M9.333 10.667v2.666M2.667 8h1.666M7 8h6.333M4.333 6.667v2.666",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Nd({size:e=20,className:t}){return eo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:eo("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function qf({size:e=16,className:t}){return eo("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:eo("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as Y from"react";import Qy from"bignumber.js";function Yf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Kf(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Qy.ROUND_DOWN).toFixed()}function Vy(e){return e.fromToken.symbol.toLowerCase()===e.toToken.symbol.toLowerCase()||e.fromToken.chainId===e.toToken.chainId&&e.fromToken.address.toLowerCase()===e.toToken.address.toLowerCase()}function qy(e){let t=e.fromToken.priceUsd,n=e.toToken.priceUsd,r=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=gt(r);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Yf(t)&&Yf(n)?e.lastChangedBy==="to"?{fromAmount:Kf(o.multipliedBy(n).dividedBy(t))}:{toAmount:Kf(o.multipliedBy(t).dividedBy(n))}:Vy(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Zf({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(n){return e?e(n):qy(n)},async submitBridge(n){if(!t)throw new Error("Bridge submit handler is not configured.");return t(n)}}}var Xf=15,Yy=18,tm="cross_bridge_terms_accepted",Ky=3600*24*365;function Zy(e){let t=e.replace(/[^\d.]/g,""),n=t.indexOf(".");n!==-1&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,""));let r=t.indexOf(".");if(r===-1)return t.slice(0,Xf);let o=t.slice(0,r).slice(0,Xf),a=t.slice(r+1).slice(0,Yy);return`${o}.${a}`}function Xy(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${tm}=true`)}function Jy(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${tm}=true`,"Path=/",`Max-Age=${Ky}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function $y(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let n=r=>Math.floor(r*100)/100;if(t<3){let r=n(t*3);return String(r<1?1:r)}return"10"}function Jf(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function ex(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let n=new Set([Jf(e.symbol),Jf(t.symbol)]);return n.has("ONE")&&n.has("ONEUSD")}function cr(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ws(e){return e[0]}function Sd(e,t,n,r){if(n&&!cr(n,t))return n;let o=t?r?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??ws(e);let a=e.findIndex(s=>cr(s,t)),i=a>=0?e[a+1]:void 0;return i&&!cr(i,t)?i:e.find(s=>!cr(s,t))??t}function $f({fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}}function ys(e,t=0){if(!e||t>5)return[];if(typeof e=="string")return[e];if(!(e instanceof Error)&&typeof e!="object")return[String(e)];let n=e;return[...[e instanceof Error?e.name:n.name,e instanceof Error?e.message:n.message,n.shortMessage,n.details,n.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...ys(n.cause,t+1),...ys(n.data,t+1),...ys(n.error,t+1)]}function Td(e){let t=ys(e).join(" ").toLowerCase(),n=t.includes("signature_failed")&&(t.includes("\uD0C0\uC785 \uB370\uC774\uD130 \uC11C\uBA85\uC5D0 \uC2E4\uD328")||t.includes("typed data")||t.includes("signtypeddata"));return t.includes("4001")||t.includes("err_user_rejected")||t.includes("userrejectedrequesterror")||t.includes("user rejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("rejected the request")||t.includes("request rejected")||t.includes("action_rejected")||t.includes("rejected by user")||n}function em(e,t){return Td(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
-
`)[0]?.trim()||t}function nm(e){let{tokens:t,initialFromToken:n,initialToToken:r,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:b,onSubmitted:u,onSuccess:g,onFailed:y,onExit:w}=e,f=Y.useMemo(()=>Zf({getQuote:p,submitBridge:b}),[p,b]),[c,h]=Y.useState("form"),[m,x]=Y.useState(n??ws(t)),[k,R]=Y.useState(()=>Sd(t,n??ws(t),r,o)),[I,C]=Y.useState(""),[S,E]=Y.useState(""),[M,O]=Y.useState("from"),[L,U]=Y.useState(l),[A,F]=Y.useState(null),ne=Y.useMemo(()=>ex(m,k),[m,k]),ee=Y.useMemo(()=>ne?"1":L==="auto"?$y(A?.priceImpact):L,[ne,L,A?.priceImpact]),[Z,W]=Y.useState(""),[q,B]=Y.useState("idle"),[G,te]=Y.useState(""),[_,le]=Y.useState(null),[me,Te]=Y.useState([]),[de,he]=Y.useState(!1),[ge,Ze]=Y.useState(Xy),[xe,Ue]=Y.useState(null),[ot,De]=Y.useState(!1),[je,Be]=Y.useState(null),[Nt,Gt]=Y.useState(null),[ut,St]=Y.useState(!1),[xt,Ht]=Y.useState(!1),vt=Y.useRef(0),st=Y.useRef(null),Tt=Y.useRef(!1),$e=Y.useRef(!1),qt=Y.useRef(!1),lt=Y.useRef(!1),nn=Y.useRef(!1),Qe=Y.useRef(!1),at=Y.useRef(!1);Y.useEffect(()=>{qt.current||(qt.current=!0,Ye("bridge","opened"))},[]);let Xe=Y.useCallback(()=>{st.current&&(clearTimeout(st.current),st.current=null)},[]),kt=Y.useCallback(z=>{Xe(),Gt(z)},[Xe]);Y.useEffect(()=>Xe,[Xe]),Y.useEffect(()=>{let z=t.find(Ce=>cr(Ce,m))??ws(t),Re=z?o?.(z,t):void 0,V=Re?.find(Ce=>cr(Ce,k))??(Re?void 0:t.find(Ce=>cr(Ce,k)))??Sd(t,z,void 0,o);x(z),R(V)},[o,t,m,k]);let bt=Y.useCallback((z,Re)=>{let V=Zy(z);if(!V){vt.current+=1,C(""),E(""),O(Re),F(null),W(""),B("idle");return}Re==="from"?C(V):E(V),O(Re),W(""),!nn.current&&Number(V)>0&&(nn.current=!0,Ye("bridge","amount_entered"))},[]),Ve=Y.useCallback(()=>{vt.current+=1,C(""),E(""),O("from"),F(null),W(""),te(""),B("idle"),Ue(null),De(!1),Be(null),St(!1),kt(null)},[kt]),Yt=Y.useCallback(z=>{cr(z,m)||(lt.current||(lt.current=!0,Ye("bridge","token_selected",{tags:{item_id:`from:${z.symbol}`}})),x(z),R(Sd(t,z,void 0,o)),Ve())},[m,o,Ve,t]),Kt=Y.useCallback(z=>{cr(z,k)||cr(z,m)||(lt.current||(lt.current=!0,Ye("bridge","token_selected",{tags:{item_id:`to:${z.symbol}`}})),R(z),Ve())},[m,Ve,k]),Ot=Y.useMemo(()=>m?o?.(m,t)??t.filter(z=>!cr(z,m)):[],[m,o,t]),Zt=Y.useCallback(()=>{m?.balance&&bt(m.balance,"from")},[m?.balance,bt]),j=Y.useCallback(()=>{!m||!k||(x(k),R(m),Ve())},[m,Ve,k]),ue=Y.useCallback(()=>{vt.current+=1,C(""),E(""),O("from"),F(null),W(""),te("")},[]);Y.useEffect(()=>{if(!m||!k)return;if(!I&&!S){F(null),W(""),B(V=>V==="quoting"?"idle":V);return}let z=++vt.current,Re=$f({fromToken:m,toToken:k,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:L});B(V=>V==="submitting"?V:f.canQuote?"quoting":"idle"),(async()=>{try{let V=await f.getQuote(Re);if(vt.current!==z)return;V.fromAmount!==void 0&&M==="to"&&C(V.fromAmount),V.toAmount!==void 0&&M==="from"&&E(V.toAmount),F(V.summary??null),W(V.error??"")}catch(V){if(vt.current!==z)return;W(V instanceof Error?V.message:"Failed to quote bridge.")}finally{vt.current===z&&B(V=>V==="quoting"?"idle":V)}})()},[I,m,M,f,L,S,k]);let be=Y.useCallback(()=>!m||!k?null:$f({fromToken:m,toToken:k,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:ee}),[ee,I,m,M,S,k]),Ie=Y.useCallback(async(z,Re)=>{if(!Tt.current){Tt.current=!0,te(""),St(!1),De(!1),B("submitting");try{if(!Re?.skipApprovalCheck&&a){let Ce=await a(z);if(Ce){Ue(Ce),Be(z),B("idle");return}}Ue(null),Be(null),kt("processing");let V=await f.submitBridge(z);le(V),B("success"),Te(Ce=>[{id:V.txHash,timestamp:new Date().toISOString(),txHash:V.txHash,fromToken:V.fromToken,toToken:V.toToken,fromAmount:V.fromAmount,toAmount:V.toAmount,summary:A??void 0,status:"pending"},...Ce.filter(Ln=>Ln.txHash!==V.txHash)]),ue(),Ht(!0),kt(null),St(!0),Ye("bridge","confirmed"),Qe.current=!1,at.current=!1,u?.(V),g?.(V)}catch(V){if(kt(null),Ye("bridge","confirmed",{status:"failure",reason:Dn(V)}),Qe.current=!1,at.current=!1,Td(V)){B("idle");return}let Ce=em(V,"Failed to submit bridge.");te(Ce),B("error"),y?.({message:Ce})}finally{Tt.current=!1}}},[a,y,u,g,f,ue,kt,A]),et=Y.useCallback(async()=>{if(Z)return;let z=be();if(z){if(Qe.current||(Qe.current=!0,Ye("bridge","submitted")),!ge){Be(z),he(!0);return}await Ie(z)}},[be,Z,Ie,ge]),Bt=Y.useCallback(async()=>{let z=je??be();z&&(Jy(),Ze(!0),he(!1),await Ie(z))},[be,je,Ie]),It=Y.useCallback(()=>{he(!1),Be(null)},[]),Cn=Y.useCallback(async()=>{if(!($e.current||q==="submitting"||!xe||!je||!i)){$e.current=!0,te(""),B("submitting");try{await i(je,xe),at.current||(at.current=!0,Ye("bridge","approved")),Ue(null),B("idle"),De(!0)}catch(z){if(Td(z)){B("idle");return}let Re=em(z,"Failed to approve token.");te(Re),B("error"),y?.({message:Re})}finally{$e.current=!1}}},[xe,i,y,je,Ie,q]),Rn=Y.useCallback(()=>{q!=="submitting"&&(Ue(null),De(!1),Be(null),B("idle"))},[q]),P=Y.useCallback(async()=>{if(q==="submitting")return;let z=je??be();if(!z){De(!1),te("Bridge input is no longer available. Please try again."),B("error");return}De(!1),await Ie(z,{skipApprovalCheck:!0})},[be,je,Ie,q]),ke=Y.useCallback(()=>{St(!1)},[]),We=Y.useCallback(z=>{h(z),z==="history"&&Ht(!1)},[]),X=Y.useCallback(()=>{if(c==="history"){We("form");return}w?.()},[w,We,c]),we=Y.useMemo(()=>[...s,...me.filter(z=>!s.some(Re=>Re.txHash===z.txHash))],[s,me]);return{step:c,setStep:We,status:q,error:G,quoteError:Z,fromToken:m,toToken:k,tokens:t,availableToTokens:Ot,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:L,effectiveSlippage:ee,slippageLocked:ne,setSlippage:U,summary:A,history:we,submitted:_,canSubmit:f.canSubmit,termsOpen:de,approvalInfo:xe,approvalSuccessOpen:ot,approveBridge:i,pendingSubmitInput:je,submitToast:Nt,successDialogOpen:ut,dismissSuccessDialog:ke,hasNewHistory:xt,termsUrl:d,setFromToken:x,setToToken:R,selectFromToken:Yt,selectToToken:Kt,setAmount:bt,setMax:Zt,swapTokens:j,submit:et,confirmTerms:Bt,cancelTerms:It,confirmApproval:Cn,cancelApproval:Rn,continueAfterApproval:P,back:X}}ce(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #f0640d)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-accent-primary-low, #fff5ee)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #ff8438);color:var(--ds-accent-primary-on-primary, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #f0640d);background:var(--ds-accent-primary-default, #f0640d)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #f0640d);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #f0640d);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #f0640d);border-right-color:var(--ds-accent-primary-default, #f0640d);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #00ceb2)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #00ceb2);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #00a0a2);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #f0640d)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #f0640d)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #f0640d);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
-
`);import{Fragment as ta,jsx as v,jsxs as D}from"react/jsx-runtime";var dm=se.createContext(void 0);function Fa(){return se.useContext(dm)}function tx(e){let[t,n]=se.useState(void 0);return se.useEffect(()=>{let r=e.current;if(!r)return;let o=()=>{let i=r.closest("[data-theme]");n(i?.getAttribute("data-theme")??void 0)};o();let a=new MutationObserver(o);return a.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[e]),t}var om=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],nx=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function rx(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function am(e){let t=e.replace(/[^\d.]/g,""),[n="",...r]=t.split("."),o=r.join("");return r.length===0?n:`${n}.${o.slice(0,2)}`}function cm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function pm(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function im(e,t){let n=Number(e||"0"),r=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(n)?n*r:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function ox(e,t=6){if(!e)return e;let[n,r=""]=e.split(".");if(!r)return n;let o=r.slice(0,t).replace(/0+$/,"");return o?`${n}.${o}`:n}function um(e,t){if(!t)return!1;let n=gt(e),r=gt(t.balance);return!n||!r?!1:n.isGreaterThan(r)}function Pa(e){if(!e.isFinite()||e.isNaN())return"0";let n=e.decimalPlaces(6,rm.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[r="0",o]=n.split("."),a=new rm(r||"0").toFormat(0);return o?`${a}.${o}`:a}function ax(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function ix(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=r=>r.toString().padStart(2,"0");return[`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`].join(" ")}function sx(e){let t=gt(e);return t?Pa(t):e||"0"}function lx(e,t){if(t?.priceUsd===void 0)return null;let n=gt(e);if(!n)return null;let r=n.multipliedBy(t.priceUsd);return r.isFinite()?`$${r.toFormat(2)}`:null}function Rs(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function dx(e,t){return t==="all"?!0:Rs(e)===t}function cx(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function $o(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function fm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function mm(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":fm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function gm(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function xs(e){return!e||e==="0"||Number(e)===0}function hm(e){let t=e.trim().toLowerCase();return t?t.startsWith("minimum ")?{from:e}:t.startsWith("available ")&&t.includes("or more")?{to:e}:t.includes("insufficient balance")||t.includes("not enough balance")||t.includes("exceeds balance")||t.includes("insufficient network fee")?{from:e}:t.includes("insufficient liquidity")||t.includes("not enough liquidity")?{to:e}:{}:{}}function bm(e){let t=e.fromToken,n=e.toToken,r=mm(t,n),o=e.fromAmount||"0",a=e.toAmount||"0",i=r!==void 0&&!gm(r),s=r!==void 0&&r!=="bridge";return{pathType:r,bridgeInfo:i?[{label:"Route",value:t&&n?`${$o(t.chainId)} \u2192 ${$o(n.chainId)}`:"-"},{label:"Validator Fee",value:xs(o)?"0":"Free",tone:xs(o)?"default":"accent"},{label:"Network Fee",value:xs(o)?"0":"Free",tone:xs(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&n?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:n.symbol,iconUrl:n.iconUrl}]}:{label:"Route",value:"-"},{label:"Price Impact",value:"0%"},{label:"In Amount",value:o,valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Swap Fee",value:"0",valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Out Amount",value:a,valueToken:n?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0}]:void 0,txFee:[{label:"Priority Fee Per Gas",value:"0 Gwei"},{label:"Max Fee Per Gas",value:"0 Gwei"},{label:"Gas Limit",value:"0"}],txFeeInfo:{estTxFee:"0",isDelegateFee:!1}}}function Oa({token:e,size:t=20}){let n=e?.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":!!n?"true":"false",style:{width:t,height:t},children:n?v("img",{src:n,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function vs(e,t){if(e.length===0)return;let n=e.findIndex(r=>fm(r,t));return e[(n+1)%e.length]}function sm({label:e,token:t,amount:n,usd:r,onAmountChange:o,onTokenClick:a,locked:i=!1}){return D("section",{className:"bf-amount-panel",children:[D("div",{className:"bf-amount-head",children:[v("span",{children:e}),D("span",{className:"bf-balance",children:[pm(t?.balance??"0")," ",t?.symbol??""]})]}),D("div",{className:"bf-amount-main",children:[D("label",{className:"bf-amount-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:n,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":wm(n)}),v("span",{className:"bf-amount-usd",children:r})]}),D("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Oa,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?cm(t):"none"),!i&&v(Gn,{size:16})]})]})]})}function px(e){if(!e)return"";let[t="",n]=e.replace(/,/g,"").split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n===void 0?r:`${r}.${n}`}function wm(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function ux(){return D("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[v("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function lm({label:e,token:t,amount:n,onAmountChange:r,onTokenClick:o,onMax:a,locked:i}){return D("section",{className:"bf-embedded-amount-panel",children:[D("div",{className:"bf-embedded-amount-head",children:[D("span",{className:"bf-embedded-amount-label",children:[v("strong",{children:e}),!(e==="From")&&v("em",{children:"estimated"})]}),t&&D("span",{className:"bf-embedded-balance",children:[v(ux,{}),v("span",{className:"bf-embedded-balance-value",children:pm(t.balance)}),v("span",{children:t.symbol}),a&&v("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),D("div",{className:"bf-embedded-amount-main",children:[D("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Oa,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?cm(t):"none"),!i&&v(Gn,{size:14})]}),D("label",{className:"bf-embedded-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:px(n),onChange:l=>r(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":wm(n)})]})]})]})}function fx({flow:e,onClose:t}){let n=se.useId(),[r,o]=se.useState(null),a=om.find(w=>w.value===e.slippage),[i,s]=se.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,b=Number.isFinite(d)&&d>5&&!p,u=w=>{e.setSlippage(w),t()},g=()=>{!l||p||(e.setSlippage(am(i)),t())};if(se.useEffect(()=>{o(document.body)},[]),se.useEffect(()=>{let w=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),!r)return null;let y=Fa();return za(v("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:w=>{w.target===w.currentTarget&&t()},children:D("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[D("header",{className:"bf-slippage-head",children:[v("h3",{id:n,children:"Slippage Settings"}),v("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:v(hn,{size:24})})]}),D("div",{className:"bf-slippage-body",children:[v("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),D("div",{className:"bf-slippage-controls",children:[v("div",{className:"bf-slippage-presets",children:om.map(w=>v("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===w.value?"true":"false",onClick:()=>u(w.value),children:w.label},w.value))}),D("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[v("span",{className:"bf-sr-only",children:"Custom slippage percent"}),v("input",{value:i,onChange:w=>{s(am(w.target.value))},onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),g())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),v("span",{"aria-hidden":"true",children:"%"})]})]}),p?v("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):b?v("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&v("button",{type:"button",className:"bf-slippage-apply",onClick:g,disabled:p,children:"Apply"})]})]})}),r)}function ym({flow:e,env:t}){let n=se.useId(),[r,o]=se.useState(!1),[a,i]=se.useState(null),s=Fa(),l=Ft("apps.json",t,u=>Wn(u?.legal?.termsUrl,t)),d=e.termsUrl??l??xp;se.useEffect(()=>{i(document.body)},[]),se.useEffect(()=>{let u=g=>{g.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[p,b]=bs(e.termsOpen);return!a||!p?null:za(v("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":b,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:D("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[v("h3",{id:n,children:"Agree to Terms of Service"}),v("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),D("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[v("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":r,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(u=>!u),children:v("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),D("div",{className:"bf-terms-copy",children:[v("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&v("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),v("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),v("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function mx({value:e,disabled:t=!1}){let[n,r]=se.useState(!1);return v("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:n?"OK":"Copy"})}function xm({flow:e,approval:t}){let n=se.useId(),[r,o]=se.useState(null),a=Fa();se.useEffect(()=>{o(document.body)},[]),se.useEffect(()=>{if(!t)return;let p=b=>{e.status!=="submitting"&&b.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=bs(t);if(!r||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return za(v("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:D("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[D("h3",{id:n,children:["Approve ",i.token.symbol]}),v(Oa,{token:i.token,size:72}),D("div",{className:"bf-approve-address-box",children:[v("span",{children:"Token Address"}),D("div",{children:[v("strong",{children:i.tokenAddress}),v(mx,{value:i.tokenAddress,disabled:d})]})]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:d?"Approving...":"Approve"})]})]})]})}),r)}function vm({flow:e}){let t=se.useId(),[n,r]=se.useState(null),o=Fa();se.useEffect(()=>{r(document.body)},[]),se.useEffect(()=>{if(!e.approvalSuccessOpen)return;let l=d=>{d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]);let[a,i]=bs(e.approvalSuccessOpen);if(!n||!a)return null;let s=e.status==="submitting";return za(v("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:D("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[v("h3",{id:t,children:"Approval Success"}),v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",v("br",{}),"Please continue to the next step."]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:s?"Continuing...":"Continue"})]})]})]})}),n)}function gx({fromAmount:e,toAmount:t,fromToken:n,toToken:r}){let o=se.useMemo(()=>{let i=gt(e),s=gt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&n&&r&&n.symbol!==r.symbol);return v(Da,{open:a,children:D("div",{className:"bf-exchange-rate",children:[D("span",{children:["1 ",n?.symbol]}),v("span",{"aria-hidden":"true",children:"="}),D("span",{children:[o?Pa(o):""," ",r?.symbol]})]})})}function km({flow:e}){return e.submitToast?D("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-spinner"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Transaction Processing"}),v("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function Cm({message:e}){let[t,n]=se.useState(!1);return se.useEffect(()=>{if(!e){n(!1);return}n(!0);let r=window.setTimeout(()=>{n(!1)},3500);return()=>window.clearTimeout(r)},[e]),!e||!t?null:D("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-error-mark",children:"!"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Error"}),v("span",{children:e})]})]})}function hx(e){switch(e){case"swap":case"deposit-swap":case"swap-withdraw":return"Swap Transaction Sent";case"bridge":return"Bridge Transaction Sent";case"swap-bridge":return"Swap & Bridge Transaction Sent";case"bridge-swap":return"Bridge & Swap Transaction Sent";default:return"Transaction Sent"}}function Rm({flow:e}){let t=se.useId(),[n,r]=se.useState(null),o=e.submitted,a=Fa();return se.useEffect(()=>{r(document.body)},[]),se.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!n||!e.successDialogOpen||!o?null:za(v("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:v("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:D("div",{className:"bf-success-body",children:[v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("div",{className:"bf-success-copy",children:[v("strong",{id:t,children:hx(o.pathType)}),v("span",{children:"Please check the results in the history."})]}),v("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>D(se.Fragment,{children:[s>0&&v("span",{className:"bf-success-route-arrow",children:"\u2192"}),v(Ba,{token:i,size:43})]},`${i.symbol}-${s}`))}),v("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),n)}function Ba({token:e,size:t=16}){let n=!!e.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":n?"true":"false",style:{width:t,height:t},children:e.iconUrl?v("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function bx({row:e}){return e.routeTokens&&e.routeTokens.length>0?v("span",{className:"bf-info-route",children:e.routeTokens.map((t,n)=>D(se.Fragment,{children:[n>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Ba,{token:t})]},`${t.symbol}-${n}`))}):e.valueToken?D("span",{className:"bf-info-value-token",children:[v(Ba,{token:e.valueToken}),v("span",{children:e.value})]}):v(ta,{children:e.value})}function Nm({rows:e}){return!e||e.length===0?null:v("div",{className:"bf-info-rows",children:e.map(t=>D("div",{className:"bf-info-row",children:[v("span",{className:"bf-info-label",children:t.label}),v("span",{className:"bf-info-value","data-tone":t.tone??"default",children:v(bx,{row:t})})]},`${t.label}-${t.value}`))})}function wx(e,t,n){return e.pathType==="bridge"?"Bridge Info":gm(e.pathType)?"Swap Info":t&&n?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Da({open:e,className:t,children:n}){let r=se.useRef(null);return e&&(r.current=n),v("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:v("div",{className:"bf-collapse-inner",children:e?n:r.current})})}function yx({summary:e,from:t,to:n,feeDelegated:r}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=wx(e,o,a),[l,d]=se.useState(!0),[p,b]=se.useState(!0);return D("div",{className:"bf-details",children:[e.liquidity&&D("section",{className:"bf-liquidity",children:[D("div",{className:"bf-liquidity-head",children:[v("span",{children:e.liquidity.label??"Available Liquidity"}),v("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),v("div",{className:"bf-liquidity-track",children:v("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&D("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:s}),v(Gn,{size:16,className:"bf-collapse-chevron"})]}),l&&v("div",{className:"bf-collapse-body",children:v(Im,{summary:e,from:t,to:n,feeDelegated:r})})]}),i&&D("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>b(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:"Est. Tx Fee"}),D("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&v("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&v("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),v("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:ox(e.txFeeInfo?.estTxFee??"0")}),v(Gn,{size:16,className:"bf-collapse-chevron"})]})]}),p&&v("div",{className:"bf-collapse-body",children:v(Nm,{rows:e.txFee})})]})]})}function xx(e){return{...e,bridgeInfo:e.bridgeInfo?.map(t=>({...t,value:t.label==="Route"?t.value.replace(/\bCROSS\b/g,"ONEchain"):t.value})),swapInfo:e.swapInfo?.map(t=>({...t,label:t.label.startsWith("Swap Fee")?"Est. Swap Fee":t.label}))}}function ks(e){let t=gt(e);if(!(!t||t.lte(0)))return Pa(t)}function vx(e,t,n,r){if(!n||!r)return;let o=gt(e),a=gt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${n.symbol} = ${Pa(i)} ${r.symbol}`;let s=o.dividedBy(a);return`1 ${r.symbol} = ${Pa(s)} ${n.symbol}`}var kx=1,Cx=5;function Sm(e){return gt(e)?.toNumber()??null}function Tm(e){let t=Sm(e);if(t!==null){if(t>=Cx)return"danger";if(t>=kx)return"warning"}}var Rx=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Nx=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Sx=/fee/i,Tx=/impact|rate|slippage|minimum|min\.|received/i,Cs=/impact/i,Ix=/^route$/i;function Ex(e,t,n){let r=e.find(p=>Rx.test(p.label)),o=e.find(p=>Nx.test(p.label)),a=new Set;r&&a.add(r),o&&a.add(o);let i=e.find(p=>Ix.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let b=Sx.test(p.label);if(!b&&!Tx.test(p.label))continue;a.add(p);let u=Sm(p.value),g=b&&(u===0||/^\s*free\s*$/i.test(String(p.value??"")));g&&t==="swap"||d.push({text:g?`${p.label} Free`:`${p.label} ${p.value}`,tone:g?"accent":Cs.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:Tm(p.value):void 0})}return{key:t,label:n,routeText:l,routeTokens:s,inRow:r,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function Ax({steps:e}){return v("div",{className:"bf-route-steps",children:e.map((t,n)=>D("div",{className:"bf-route-step","data-last":n===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[D("span",{className:"bf-route-rail","aria-hidden":"true",children:[v("span",{className:"bf-route-line"}),v("span",{className:"bf-route-dot","data-final":n===e.length-1?"true":"false"})]}),D("span",{className:"bf-route-body",children:[D("span",{className:"bf-route-head",children:[v("span",{className:"bf-route-title",children:t.title}),v("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((r,o)=>D(se.Fragment,{children:[o>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(Ba,{token:r})]},`${r.symbol}-${o}`)):D(ta,{children:[t.amountToken&&v(Ba,{token:t.amountToken}),v("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&D("span",{className:"bf-route-meta",children:[t.meta.map(r=>v("span",{"data-tone":r.tone??"default",children:r.text},r.text)),t.tags.map(r=>v("span",{className:"bf-route-tag",children:r},r))]})]})]},t.key))})}function Mx(e){if(!Cs.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=Tm(e.value);return t?{...e,tone:t}:e}function Im({summary:e,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=se.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([k,R])=>{let I=k==="swap"?e.swapInfo:e.bridgeInfo;return I?.length?Ex(I,k,R):null}).filter(k=>k!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),b=l.inRow?.value??n?.amount,u=d.outRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),g=d.outRow?.value??r?.amount;if(!b)return null;let y=e.txFeeInfo,w=a&&y&&!y.isDelegateFee?[{text:`Gas ${y.estTxFee}${y.tokenSymbol?` ${y.tokenSymbol}`:""}`}]:[],f=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:b,amountToken:p,routeTokens:f?void 0:l.routeTokens,meta:[...w.length?[{text:"EST."}]:n?.chain?[{text:`on ${n.chain}`}]:[],...w,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(x=>!Cs.test(x.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(x=>({key:`hop-${x.key}`,title:x.label,amount:x.routeText??"",routeTokens:x.routeTokens,meta:x.meta,tags:i&&x.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:g??"\u2014",amountToken:u,meta:[...r?.chain?[{text:`on ${r.chain}`}]:[],...f?[]:l.meta.filter(x=>Cs.test(x.text))],tags:[]}],h=[...s.flatMap(x=>x.rest),...a?e.txFee??[]:[]].map(Mx),m=!!t;return D(ta,{children:[v(Ax,{steps:c}),(h.length>0||m)&&v("div",{className:"bf-info-section",children:v(Nm,{rows:[...m?[{label:"Rate",value:t}]:[],...h]})})]})}function Lx({summary:e,rateLine:t,from:n,to:r,feeDelegated:o}){let a=se.useMemo(()=>xx(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:v("div",{className:"bf-embedded-details",children:v(Im,{summary:a,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:!0})})}function Dx({flow:e,env:t,toastError:n}){return D(ta,{children:[v(ym,{flow:e,env:t}),v(xm,{flow:e,approval:e.approvalInfo??null}),v(vm,{flow:e}),v(km,{flow:e}),v(Cm,{message:e.submitToast?"":n}),v(Rm,{flow:e})]})}function Px({flow:e,env:t,isConnected:n,onRequestConnect:r,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=se.useMemo(()=>a?e.summary??bm(e):null,[a,e]),s=hm(e.quoteError),l=um(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),b=p?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",g=e.error||u,y=e.status==="submitting",w=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||y,f=y?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return D(ta,{children:[v("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:D("div",{className:"bf-embedded-form",children:[D("div",{className:"bf-embedded-fields",children:[D("div",{className:"bf-embedded-field-group",children:[v(lm,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=vs(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&v("div",{className:"bf-embedded-field-error",children:d})]}),v("div",{className:"bf-embedded-direction","aria-hidden":"true",children:v("span",{children:v(Nd,{size:16})})}),D("div",{className:"bf-embedded-field-group",children:[v(lm,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=vs(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),b&&v("div",{className:"bf-embedded-field-error",children:b})]})]}),v(Da,{open:!!i?.liquidity,children:i?.liquidity&&D("section",{className:"bf-embedded-liquidity",children:[D("div",{children:[v("span",{children:i.liquidity.label??"Available Liquidity"}),v("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),v("span",{className:"bf-embedded-liquidity-track",children:v("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),v(Da,{open:p&&a,children:v("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),v(Da,{open:!!i,children:i&&v("div",{className:"bf-embedded-summary",children:v(Lx,{summary:i,feeDelegated:o,rateLine:vx(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ks(e.fromAmount),chain:e.fromToken?$o(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ks(e.toAmount),chain:e.toToken?$o(e.toToken.chainId):void 0}})})}),v("div",{className:"bf-embedded-action-footer",children:n?v("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:w,"aria-busy":y,"aria-label":y?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:y?v("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):v("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),v(Dx,{flow:e,env:t,toastError:g})]})}function Ox({item:e}){let t=Rs(e),n=lx(e.fromAmount,e.fromToken);return D("article",{className:"bf-history-item",children:[D("div",{className:"bf-history-item-head",children:[v("span",{className:"bf-history-status","data-status":t,children:cx(t)}),v("time",{className:"bf-history-time",dateTime:e.timestamp,children:ix(e.timestamp)})]}),D("div",{className:"bf-history-item-body",children:[D("strong",{className:"bf-history-amount",children:[sx(e.fromAmount)," ",e.fromToken.symbol]}),D("div",{className:"bf-history-meta",children:[v("span",{className:"bf-history-usd",children:n??ax(e.txHash)}),D("span",{className:"bf-history-route",children:[D("span",{className:"bf-history-route-token",children:[v(Oa,{token:e.fromToken,size:16}),v("span",{children:e.fromToken.symbol})]}),v(qf,{size:16,className:"bf-history-route-arrow"}),D("span",{className:"bf-history-route-token",children:[v(Oa,{token:e.toToken,size:16}),v("span",{children:e.toToken.symbol})]})]})]})]})]})}function Bx({flow:e}){let[t,n]=se.useState("all"),r=e.history.some(i=>Rs(i)==="pending"),o=e.history.filter(i=>dx(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return D("main",{className:"bf-history-body",children:[v("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:nx.map(i=>D("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>n(i.value),"data-track":"history_filter","data-track-id":i.value,children:[v("span",{children:i.label}),i.value==="pending"&&r&&v("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?v("div",{className:"bf-history-list",children:o.map(i=>v(Ox,{item:i},i.id||i.txHash))}):v("div",{className:"bf-empty",children:a})]})}function zx({flow:e,env:t,feeDelegated:n}){let[r,o]=se.useState(!1),[a,i]=se.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=se.useMemo(()=>s?e.summary??bm(e):null,[s,e]),d=Ft("apps.json",t,h=>Wn(h?.bridgePoweredBy?.url,t)),p=hm(e.quoteError),b=um(e.fromAmount,e.fromToken),u=b?"Insufficient balance":p.from,g=e.quoteError&&!p.from&&!p.to?e.quoteError:"",y=e.error||g,w=e.history.some(h=>Rs(h)==="pending"),c=(l?.pathType??mm(e.fromToken,e.toToken))!=="bridge";return D(ta,{children:[D("main",{className:"bf-body",children:[D("div",{className:"bf-toolbar",children:[D("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[v(Qf,{}),v("span",{children:"History"}),(w||e.hasNewHistory)&&v("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&D("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":r,children:[v(Vf,{}),v("span",{children:e.slippageLocked?"Auto 1%":rx(e.slippage,e.effectiveSlippage)})]})]}),D("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[v(sm,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:im(e.fromAmount,e.fromToken),onAmountChange:h=>e.setAmount(h,"from"),onTokenClick:()=>{let h=vs(e.tokens,e.fromToken);h&&e.selectFromToken(h)},locked:e.tokens.length<=1}),u&&v("div",{className:"bf-field-error",children:u}),v("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(h=>h+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:v(Nd,{size:22})}),v(sm,{label:"To",token:e.toToken,amount:e.toAmount,usd:im(e.toAmount,e.toToken),onAmountChange:h=>e.setAmount(h,"to"),onTokenClick:()=>{let h=vs(e.availableToTokens,e.toToken);h&&e.selectToToken(h)},locked:e.availableToTokens.length<=1}),p.to&&v("div",{className:"bf-field-error",children:p.to})]}),v(gx,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),v(Da,{open:!!l,children:l&&v(yx,{summary:l,feeDelegated:n,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:ks(e.fromAmount),chain:e.fromToken?$o(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:ks(e.toAmount),chain:e.toToken?$o(e.toToken.chainId):void 0}})})]}),D("footer",{className:"bf-footer",children:[v("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||b,children:e.status==="submitting"?"Processing...":"Next"}),d&&D("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",v("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&v(fx,{flow:e,onClose:()=>o(!1)}),v(ym,{flow:e,env:t}),v(xm,{flow:e,approval:e.approvalInfo??null}),v(vm,{flow:e}),v(km,{flow:e}),v(Cm,{message:e.submitToast?"":y}),v(Rm,{flow:e})]})}function ea({onClose:e,onBackToWallet:t,feeDelegated:n,env:r,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=se.useMemo(()=>it(r),[r]),b=_f(),u=nm({...d,onExit:t}),g=se.useRef(null),y=tx(g),w=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,c=o==="embedded"&&u.step==="form"&&!t?null:u.back;return v(ve,{feature:"bridge",children:v(dm.Provider,{value:y,children:D("div",{ref:g,className:ye("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&b?"true":"false",children:[D("header",{className:"bf-header",children:[c?v("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:v(On,{size:24})}):v("span",{className:"bf-header-spacer","aria-hidden":"true"}),v("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:w}),v("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close","data-wi-close":!0,children:v(hn,{size:24})})]}),u.step==="history"?v(Bx,{flow:u}):o==="embedded"?v(Px,{flow:u,env:p,isConnected:f,onRequestConnect:s,feeDelegated:n}):v(zx,{flow:u,env:p,feeDelegated:n})]})})})}import*as pn from"react";import $x from"bignumber.js";import{useInfiniteQuery as Fx}from"@tanstack/react-query";var Ux="token-history";function Em(e,t,n,r,o=!0){return Fx({queryKey:[Ux,e,t,n.toLowerCase(),r.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Ne("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:n,wallet:r}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let b=await p.json();if(b.code!==200)throw new Error(`Token history API error: ${b.code}`);return b.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!r&&!!n&&t>0,staleTime:1e4})}import*as Ns from"react";var Id={chart:!1,balance:!0,overview:!1,social:!1,history:!0},jx=Object.keys(Id);function Am(e){let[t,n]=Ns.useState({visibility:Id,isLoaded:!1});return Ns.useEffect(()=>{let r=!0;return Ar(hi,e).then(o=>{if(!r)return;let a=o?.tokenDetail?.sections,i={...Id};if(a)for(let s of jx){let l=a[s];typeof l=="boolean"&&(i[s]=l)}n({visibility:i,isLoaded:!0})}),()=>{r=!1}},[e]),t}import*as xn from"react";import{useQuery as Wx,keepPreviousData as Gx}from"@tanstack/react-query";var Hx="token-price-history";function Mm(e,t,n,r,o=!0){return Wx({queryKey:[Hx,e,t,n.toLowerCase(),r],queryFn:async({signal:a})=>{let i=await Ne("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:n,interval:r}),l=await fetch(`${i}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token price history API error: ${d.code}`);return d.data??[]},enabled:o&&!!n&&t>0,staleTime:3e4,placeholderData:Gx})}import{Fragment as Jx,jsx as sn,jsxs as na}from"react/jsx-runtime";var _x="var(--ds-system-green-high, #00a869)",Qx="var(--wi-error, #e70077)",So=150,Ss=3,Ed=18,Vx=18,qx=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],Yx=new Set(["7d","30d","1y"]);function Kx(){let e=xn.useRef(null),[t,n]=xn.useState(0);return xn.useEffect(()=>{let r=e.current;if(!r)return;let o=new ResizeObserver(a=>{n(a[0]?.contentRect.width??0)});return o.observe(r),n(r.clientWidth),()=>o.disconnect()},[]),[e,t]}function Zx(e,t){let n=new Date(e*1e3),r=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",r).format(n)}function Xx(e,t){if(t<=0||e.length===0)return null;let n=e.length===1?[e[0],e[0]]:e,r=n.length,o=n[0],a=n[0],i=0,s=0;for(let h=1;h<r;h++)n[h]>o&&(o=n[h],i=h),n[h]<a&&(a=n[h],s=h);let l=o-a||1,d=Math.max(1,t-Ss*2),p=So-Ed-Vx,b=h=>r===1?t/2:Ss+h/(r-1)*d,u=h=>Ed+(1-(h-a)/l)*p,g=n.map((h,m)=>({x:b(m),y:u(h)})),y=g.map((h,m)=>`${m===0?"M":"L"}${h.x.toFixed(2)},${h.y.toFixed(2)}`).join(" "),w=g[0],f=g[g.length-1],c=`${y} L${f.x.toFixed(2)},${So} L${w.x.toFixed(2)},${So} Z`;return{values:n,points:g,linePath:y,areaPath:c,maxIdx:i,minIdx:s}}function Lm({env:e,chainId:t,tokenAddress:n}){let[r,o]=xn.useState("1d"),[a,i]=xn.useState(null),s=xn.useId(),[l,d]=Kx(),{data:p,isLoading:b,isError:u}=Mm(e,t,n,r,!0),g=xn.useMemo(()=>(p??[]).filter(F=>Number.isFinite(Number(F.price))).slice().sort((F,ne)=>F.updated_at-ne.updated_at),[p]),y=xn.useMemo(()=>g.map(A=>Number(A.price)),[g]),w=xn.useMemo(()=>Xx(y,d),[y,d]);xn.useEffect(()=>{i(null)},[r]);let f=g.length>0,c=a!==null&&a<y.length?a:y.length-1,h=f?y[c]:0,m=f?y[0]:0,x=m!==0?(h-m)/m*100:0,k=x>=0,R=k?_x:Qx,I=(k?"+":"-")+(Math.floor(Math.abs(x)*100)/100).toFixed(2)+"%",C=a!==null&&g[a]?Zx(g[a].updated_at,Yx.has(r)):"",S=A=>{if(!w||d<=0)return;let F=A.currentTarget.getBoundingClientRect(),ne=A.clientX-F.left;if(w.values.length<=1){i(0);return}let Z=Math.max(1,d-Ss*2),W=Math.min(1,Math.max(0,(ne-Ss)/Z)),q=Math.round(W*(g.length-1));i(Math.min(g.length-1,Math.max(0,q)))},E=()=>i(null);if(!b&&(u||!f))return null;let M=a!==null&&w&&w.points[a]?w.points[a]:null,O=w?.points[w.maxIdx],L=w?.points[w.minIdx],U=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return na("section",{className:"wi-td-chart",children:[na("div",{className:"wi-td-chart-panel",children:[sn("span",{className:"wi-td-chart-price",children:f?xo(h):"\u2014"}),f&&na("span",{className:"wi-td-chart-change","data-positive":k,children:[sn("span",{children:I}),C&&sn("span",{className:"wi-td-chart-when",children:C})]})]}),sn("div",{ref:l,className:"wi-td-chart-plot",children:b&&!f?sn("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):w&&d>0&&na("svg",{className:"wi-td-chart-svg",width:d,height:So,role:"img","aria-label":"Price chart",children:[sn("defs",{children:na("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[sn("stop",{offset:"0%",stopColor:R,stopOpacity:.28}),sn("stop",{offset:"100%",stopColor:R,stopOpacity:0})]})}),sn("path",{d:w.areaPath,fill:`url(#${s})`}),sn("path",{d:w.linePath,fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),O&&sn("text",{className:"wi-td-chart-minmax",x:U(O.x),y:Math.max(11,O.y-7),textAnchor:"middle",children:xo(w.values[w.maxIdx])}),L&&w.minIdx!==w.maxIdx&&sn("text",{className:"wi-td-chart-minmax",x:U(L.x),y:Math.min(So-5,L.y+14),textAnchor:"middle",children:xo(w.values[w.minIdx])}),M&&na(Jx,{children:[sn("line",{className:"wi-td-chart-cursor",x1:M.x,y1:Ed-6,x2:M.x,y2:So}),sn("circle",{cx:M.x,cy:M.y,r:4,fill:R,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),sn("rect",{x:0,y:0,width:d,height:So,fill:"transparent",style:{touchAction:"none"},onPointerMove:S,onPointerDown:S,onPointerLeave:E,onPointerCancel:E})]})}),sn("div",{className:"wi-td-chart-tabs",role:"tablist",children:qx.map(A=>sn("button",{type:"button",role:"tab","aria-selected":r===A.key,className:"wi-td-chart-tab","data-active":r===A.key||void 0,onClick:()=>o(A.key),"data-track":"token_detail_interval","data-track-id":A.key,children:A.label},A.key))})]})}import{Fragment as Om,jsx as re,jsxs as ct}from"react/jsx-runtime";var ev="https://contents.crosstoken.io/wallet/token/images/FT.png",tv={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function nv(e){return e.length>24?"xs":e.length>18?"sm":"md"}function rv(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m`;let o=Math.floor(r/60);if(o<24)return`about ${o}h`;let a=Math.floor(o/24);if(a<30)return`${a}d`;let i=Math.floor(a/30);return i<12?`${i}mo`:`${Math.floor(i/12)}y`}function Dm(e){let[t,n]=e.split("."),r="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(r+=","),r+=t[o]}return n?`${r}.${n}`:r}function Pm(e,t){let n=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=n/i,l=n%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let r=n/10n**BigInt(t-2),o=r/100n,a=r%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function ov(e,t,n){let r=pn.useRef(null),o=pn.useRef(null),[a,i]=pn.useState(t);return pn.useLayoutEffect(()=>{let s=r.current,l=o.current;if(!s||!l)return;let d=()=>{let b=s.clientWidth;if(!b)return;let u=window.getComputedStyle(l),g=document.createElement("span");g.textContent=l.textContent,g.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(g);let y=g.offsetWidth;if(document.body.removeChild(g),y<=b){i(t);return}let w=Math.max(n,Math.floor(t*b/y));i(w)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,n]),{containerRef:r,textRef:o,fontSize:a}}function av(e){let t=gt(e);return t?t.decimalPlaces(4,$x.ROUND_DOWN).toFormat():"-"}function iv(){return ct("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[re("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),re("path",{d:"M3 12h18M12 3c2.5 2.5 3.8 5.8 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.8-3.8-9S9.5 5.5 12 3Z",stroke:"currentColor",strokeWidth:"1.6"})]})}function sv(){return re("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M21.9 4.3 18.6 20c-.2 1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-4.9 9-8.1c.4-.3-.1-.5-.6-.2L6.2 13.2l-4.8-1.5c-1-.3-1-1 .2-1.5L20.6 3c.9-.3 1.6.2 1.3 1.3Z"})})}function lv(){return re("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M18.9 2H22l-7.3 8.3L23.3 22h-6.8l-5.3-6.9L5.1 22H2l7.8-8.9L1 2h6.9l4.8 6.4L18.9 2Zm-1.2 18h1.9L7.2 4H5.2l12.5 16Z"})})}function dv(){return re("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M6.9 6.5c0-.2-.1-.5-.3-.6L4.6 3.6V3.3h6.3l4.9 10.7 4.3-10.7H26v.3l-1.8 1.7c-.2.1-.2.3-.2.5v12.4c0 .2 0 .4.2.5l1.7 1.7v.3h-8.7v-.3l1.8-1.7c.2-.2.2-.2.2-.5V8.1l-5 12.6h-.7L7.9 8.1v8.5c0 .3.1.6.3.8l2.3 2.8v.3H4v-.3l2.3-2.8c.2-.2.3-.5.3-.8V6.5Z",transform:"scale(0.85)"})})}function Bm({env:e,isMobile:t,token:n,walletAddress:r,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let b=n.quantity.decimals,[u,g]=pn.useState(!1),{buildTxUrl:y,chainInfo:w}=Di(e,n.chainId,!0),{visibility:f}=Am(e),{data:c,isLoading:h,isError:m,fetchNextPage:x,hasNextPage:k,isFetchingNextPage:R,refetch:I}=Em(e,n.chainId,n.address,r,!0),C=pn.useMemo(()=>c?.pages?c.pages.flat():[],[c]),S=pn.useRef(null);pn.useEffect(()=>{if(!t)return;let G=S.current;if(!G||!k)return;let te=new IntersectionObserver(_=>{_[0]?.isIntersecting&&!R&&x()},{rootMargin:"120px"});return te.observe(G),()=>te.disconnect()},[t,k,R,x]);let E=pn.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(n.address).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[n.address]),M=Dm(Pm(n.quantity.numeric,b)),O=o?.price?Ai(n.quantity.numeric,b,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:U,textRef:A,fontSize:F}=ov(L,30,14),ee=go(n.chainId,e).name??w?.name??`Chain ${n.chainId}`,Z=w?.explorer_url,W=a?.deployed??!0,q=pn.useMemo(()=>{let G=[];return a?.info_url&&G.push({key:"web",label:"Website",url:a.info_url,icon:re(iv,{})}),a?.telegram_url&&G.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:re(sv,{})}),a?.x_url&&G.push({key:"x",label:"X",url:a.x_url,icon:re(lv,{})}),a?.medium_url&&G.push({key:"medium",label:"Medium",url:a.medium_url,icon:re(dv,{})}),G},[a]),B=(G,te,_,le)=>{Mt(G,te,{category:"token-detail",origin:_,payload:{address:n.address,txHash:le}},p)};return ct(Om,{children:[ct("div",{className:"wi-sticky-header",children:[ct("div",{className:"wi-header wi-header--receive",children:[re("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:re(On,{size:24})}),ct("span",{className:"wi-td-header-title",children:[re("img",{src:n.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:G=>{G.currentTarget.src=ev}}),re("span",{className:"wi-td-header-name",children:n.symbol})]}),re("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:re(hn,{size:24})})]}),re("hr",{className:"wi-divider"})]}),ct("div",{className:"wi-td-scroll",children:[f.chart&&re(Lm,{env:e,chainId:n.chainId,tokenAddress:n.address}),f.balance&&ct("section",{className:"wi-td-balance-card",children:[ct("div",{className:"wi-td-balance-left",ref:U,children:[re("span",{className:"wi-td-balance-label",children:"My Balance"}),re("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:F},children:L}),i&&O&&re("span",{className:"wi-td-balance-fiat",children:O})]}),re("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(n),"aria-label":`Send ${n.symbol}`,"data-track":"token_detail_send","data-track-id":n.symbol,children:re("span",{children:"Send"})})]}),f.overview&&ct("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),ct("div",{className:"wi-td-rows",children:[ct("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Network"}),Z?ct("a",{className:"wi-td-row-value wi-td-row-link",href:Z,target:"_blank",rel:"noopener noreferrer",onClick:G=>B(G,Z,"token-network"),children:[re("span",{children:ee}),re(xa,{className:"wi-td-external-icon"})]}):re("span",{className:"wi-td-row-value",children:ee})]}),ct("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Contract Address"}),ct("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[re("span",{children:Xt(n.address)}),u?re(ir,{size:14}):re(Mr,{size:14})]})]}),ct("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Decimals"}),re("span",{className:"wi-td-row-value",children:b})]}),ct("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Total Supply"}),re("span",{className:"wi-td-row-value",children:av(o?.circulating_supply)})]})]})]}),f.social&&q.length>0&&ct("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Social Media"}),re("div",{className:"wi-td-social-row",children:q.map(G=>re("a",{className:"wi-td-social-btn",href:G.url,target:"_blank",rel:"noopener noreferrer","aria-label":G.label,onClick:te=>B(te,G.url,"token-social"),children:G.icon},G.key))})]}),f.history&&ct("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Token History"}),h&&re("div",{className:"wi-td-history-list",children:Array.from({length:3},(G,te)=>ct("div",{className:"wi-td-history-skeleton",children:[re("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),re("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${te}`))}),!h&&m&&ct("div",{className:"wi-td-history-empty",children:[re("span",{children:"Failed to load history."}),re("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>I(),children:"Retry"})]}),!h&&!m&&C.length===0&&re("div",{className:"wi-td-history-empty",children:re("span",{children:"No transactions found."})}),!h&&!m&&C.length>0&&ct("div",{className:"wi-td-history-list",children:[C.map((G,te)=>{let _=G.to_alias?.toLowerCase().includes("bridge")??!1,le=G.from_alias?.toLowerCase().includes("bridge")??!1,me=_?"bridge-out":le?"bridge-in":G.to?.toLowerCase()===r.toLowerCase()?"receive":"send",Te=me==="receive"||me==="bridge-in",de=Te?G.from:G.to,he=Dm(Pm(G.amount,b)),ge=y(G.tx),Ze=rv(G.timestamp),xe=ct(Om,{children:[ct("div",{className:"wi-td-history-top",children:[re("span",{className:"wi-td-history-type","data-direction":me,children:tv[me]}),re("span",{className:"wi-td-history-counter",children:Xt(de??"")})]}),ct("div",{className:"wi-td-history-bottom",children:[ct("span",{className:"wi-td-history-meta",children:[re("span",{className:"wi-td-history-status","data-status":G.status,children:G.status==="success"?"Success":"Failed"}),Ze&&re("span",{className:"wi-td-history-time",children:Ze})]}),ct("span",{className:"wi-td-history-amount","data-size":nv(`${Te?"+":"-"}${he} ${n.symbol}`),children:[Te?"+":"-",he," ",n.symbol]})]})]}),Ue=`${G.tx}-${G.log_index}-${te}`;return ge?re("a",{className:"wi-td-history-item wi-td-history-item--link",href:ge,target:"_blank",rel:"noopener noreferrer",onClick:ot=>B(ot,ge,"token-tx",G.tx),children:xe},Ue):re("div",{className:"wi-td-history-item",children:xe},Ue)}),k&&(t?re("div",{ref:S,className:"wi-td-history-sentinel",children:R&&re("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):re("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>x(),disabled:R,children:R?"Loading\u2026":"Load more"}))]})]})]})]})}import*as to from"react";import{useQuery as hv}from"@tanstack/react-query";var cv="https://ipfs.io/ipfs/",pv=/^0x[0-9a-fA-F]{40}$/,zm=/^\d+$/;function uv(e,t){return typeof e!="string"||!zm.test(e)?t:BigInt(e)}function Fm(e,t){let n=e.token?.address,r=e.token_id;if(typeof n!="string"||!pv.test(n)||typeof r!="string"||!zm.test(r))return null;let o=t==="ERC1155"?uv(e.quantity,1n):1n;return o<=0n?null:{contract:n.toLowerCase(),tokenId:r,standard:t,tokenUri:e.token_uri||null,quantity:o,collectionName:e.token?.name||gv(n),collectionSymbol:e.token?.symbol||"",collectionIconUrl:Io(e.token?.icon_url)}}function Um(e){let t=new Map,n=new Set;for(let r of e){let o=`${r.contract}:${r.tokenId}`;if(n.has(o))continue;n.add(o);let a=t.get(r.contract);a||(a={contract:r.contract,standard:r.standard,name:r.collectionName,symbol:r.collectionSymbol,iconUrl:r.collectionIconUrl,items:[]},t.set(r.contract,a)),a.items.push(r)}return[...t.values()]}function Io(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;if(/^ipfs:\/\//i.test(t)){let n=t.replace(/^ipfs:\/\//i,"").replace(/^ipfs\//i,"");return n?`${cv}${n}`:null}if(/^data:image\//i.test(t))return t;try{let n=new URL(t);return n.protocol!=="https:"&&n.protocol!=="http:"||n.username||n.password?null:n.toString()}catch{return null}}function jm(e){let t=/^data:application\/json(;[^,]*)?,(.*)$/is.exec(e.trim());if(!t)return;let n=t[1]??"",r=t[2]??"";try{let o=/;base64/i.test(n)?fv(r):decodeURIComponent(r);return JSON.parse(o)}catch{return null}}function fv(e){let t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function To(e){return typeof e=="string"&&e.trim()?e.trim():null}function mv(e){return typeof e=="string"?e.trim()||null:typeof e=="number"||typeof e=="boolean"?String(e):null}function Ad(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,n=To(t.image_data),r=Io(To(t.image)??To(t.image_url))??(n&&n.startsWith("<svg")?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`:null),o=[];if(Array.isArray(t.attributes))for(let a of t.attributes){if(!a||typeof a!="object")continue;let i=a,s=mv(i.value);s!==null&&o.push({traitType:To(i.trait_type),value:s})}return{name:To(t.name),description:To(t.description),image:r,animationUrl:Io(To(t.animation_url)),attributes:o}}function Wm(e){if(!e)return!1;let t=e.split(/[?#]/)[0]?.toLowerCase()??"";return/\.(mp4|webm|ogg|ogv|mov)$/.test(t)}function Md(e,t){return t?.trim()?t.trim():`#${e}`}function Ld(e,t=12){if(e.length<=t)return`#${e}`;let n=Math.ceil((t-1)/2),r=Math.floor((t-1)/2);return`#${e.slice(0,n)}\u2026${e.slice(-r)}`}function Dd(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function gv(e){return`${e.slice(0,6)}\u2026${e.slice(-4)}`}var bv="nft-holdings",wv=5,yv=100,xv=["ERC721","ERC1155"];async function vv(e,t,n,r){let o=[],a=t.toLowerCase();for(let i=1;i<=wv;i+=1){let s=new URLSearchParams({page:String(i),page_size:String(yv),sort_by:"updated",sort_order:"desc"}),l=await fetch(`${e}/v1/accounts/${a}/nfts/${n}?${s}`,{cache:"no-store",signal:r});if(!l.ok)throw new Error(`Failed to fetch ${n} holdings: ${l.status}`);let d=await l.json();for(let p of d.data?.nfts??[]){let b=Fm(p,n);b&&o.push(b)}if(!d.data?.next_page)break}return o}function Gm(e,t,n=!0){return hv({queryKey:[bv,e,t.toLowerCase()],queryFn:async({signal:r})=>{let o=await Ne("crossExplorer",e),a=await Promise.all(xv.map(i=>vv(o,t,i,r)));return Um(a.flat())},enabled:!!t&&n,staleTime:6e4,retry:1})}import{useQuery as kv}from"@tanstack/react-query";var Cv="nft-metadata",Rv=3e3,Nv=4,Pd=0,Hm=[];async function Sv(e){Pd>=Nv&&await new Promise(t=>Hm.push(t)),Pd+=1;try{return await e()}finally{Pd-=1,Hm.shift()?.()}}async function Tv(e,t){let n=jm(e);if(n!==void 0)return Ad(n);let r=Io(e);return r?Sv(async()=>{let o=new AbortController,a=()=>o.abort();t?.addEventListener("abort",a);let i=setTimeout(a,Rv);try{let s=await fetch(r,{signal:o.signal,credentials:"omit",referrerPolicy:"no-referrer"});return s.ok?Ad(await s.json()):null}catch{return null}finally{clearTimeout(i),t?.removeEventListener("abort",a)}}):null}function Ts(e,t=!0){return kv({queryKey:[Cv,e],queryFn:({signal:n})=>Tv(e,n),enabled:!!e&&t,staleTime:1/0,gcTime:30*6e4,retry:!1})}import{useQuery as Iv}from"@tanstack/react-query";var Ev="nft-instance";function _m(e,t,n,r=!0){return Iv({queryKey:[Ev,e,t,n],queryFn:async({signal:o})=>{let a=await Ne("crossExplorer",e),i=await fetch(`${a}/v1/tokens/${t}/instances/${n}`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Failed to fetch NFT instance: ${i.status}`);return(await i.json()).data?.instance??null},enabled:!!t&&!!n&&r,staleTime:5*6e4,retry:!1})}import{Fragment as Zm,jsx as J,jsxs as nt}from"react/jsx-runtime";var Qm={ERC721:"ERC-721",ERC1155:"ERC-1155"};function Od({src:e,tokenId:t,alt:n,className:r}){let[o,a]=to.useState(!1);return to.useEffect(()=>a(!1),[e]),!e||o?J("div",{className:ye("wi-nft-media wi-nft-media--fallback",r),role:"img","aria-label":n,"data-nft-fallback":!0,children:J("span",{className:"wi-nft-media-fallback-text",children:Ld(t)})}):J("img",{src:e,alt:n,className:ye("wi-nft-media",r),loading:"lazy",decoding:"async",draggable:!1,referrerPolicy:"no-referrer",onError:()=>a(!0)})}function Av({collection:e}){let t=e.items[0],{data:n}=Ts(t?.tokenUri??null,!e.iconUrl);return J(Od,{src:e.iconUrl??n?.image??null,tokenId:t?.tokenId??"0",alt:e.name,className:"wi-nft-thumb"})}function Vm({env:e,walletAddress:t,active:n,onSelectCollection:r}){let{data:o,isLoading:a,isError:i,refetch:s,isFetching:l}=Gm(e,t,n);return a?J("div",{className:"wi-token-list","aria-busy":"true",children:Array.from({length:4},(d,p)=>J("div",{className:"wi-skeleton-item","data-nft-skeleton":!0,children:nt("div",{className:"wi-skeleton-left",children:[J("div",{className:"wi-skeleton-block wi-nft-thumb-skeleton"}),nt("div",{className:"wi-skeleton-lines",children:[J("div",{className:"wi-skeleton-block",style:{width:96,height:14}}),J("div",{className:"wi-skeleton-block",style:{width:56,height:12}})]})]})},p))}):i?nt("div",{className:"wi-nft-state",role:"alert",children:[J("span",{className:"wi-nft-state-text",children:"Couldn\u2019t load NFTs"}),J("button",{type:"button",className:"wi-nft-retry",onClick:()=>{s()},disabled:l,"data-track":"nft_retry",children:l?"Retrying\u2026":"Try again"})]}):!o||o.length===0?J("div",{className:"wi-empty",children:"No NFTs Found"}):J("div",{className:"wi-token-list",children:o.map(d=>nt("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>r(d),"aria-label":`View ${d.name} NFTs`,"data-track":"nft_collection","data-track-id":d.contract,children:[nt("div",{className:"wi-token-left",children:[J(Av,{collection:d}),nt("div",{className:"wi-token-info",children:[J("span",{className:"wi-token-name",children:d.name}),J("div",{className:"wi-token-price-row",children:J("span",{className:"wi-token-price",children:Qm[d.standard]})})]})]}),J("div",{className:"wi-token-right",children:J("span",{className:"wi-token-balance","data-nft-count":!0,children:d.items.length})})]},d.contract))})}function qm({title:e,onBack:t,onClose:n}){return nt("div",{className:"wi-sticky-header",children:[nt("div",{className:"wi-header wi-header--receive",children:[J("button",{type:"button",className:"wi-header-back",onClick:t,"aria-label":"Back",children:J(On,{size:24})}),J("span",{className:"wi-td-header-title",children:J("span",{className:"wi-td-header-name wi-nft-header-name",children:e})}),J("button",{type:"button",className:"wi-header-action",onClick:n,"aria-label":"Close","data-wi-close":!0,children:J(hn,{size:24})})]}),J("hr",{className:"wi-divider"})]})}function Mv({item:e,onSelect:t}){let{data:n}=Ts(e.tokenUri),r=Md(e.tokenId,n?.name);return nt("button",{type:"button",className:"wi-nft-card",onClick:()=>t(e),"aria-label":`View ${r}`,"data-track":"nft_detail","data-track-id":`${e.contract}:${e.tokenId}`,children:[nt("span",{className:"wi-nft-card-media",children:[J(Od,{src:n?.image??null,tokenId:e.tokenId,alt:r}),e.standard==="ERC1155"&&e.quantity>1n&&nt("span",{className:"wi-nft-card-qty",children:["\xD7",Dd(e.quantity)]})]}),J("span",{className:"wi-nft-card-name",children:r}),n?.name&&J("span",{className:"wi-nft-card-id",children:Ld(e.tokenId)})]})}function Ym({collection:e,onBack:t,onClose:n,onSelectNft:r}){return nt(Zm,{children:[J(qm,{title:e.name,onBack:t,onClose:n}),J("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:J("div",{className:"wi-nft-grid",children:e.items.map(o=>J(Mv,{item:o,onSelect:r},`${o.contract}:${o.tokenId}`))})})]})}function Lv({image:e,animationUrl:t,tokenId:n,alt:r}){let[o,a]=to.useState(!1);return Wm(t)&&!o?J("video",{className:"wi-nft-media wi-nft-detail-media",src:t,poster:e??void 0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onError:()=>a(!0),"aria-label":r}):J(Od,{src:e,tokenId:n,alt:r,className:"wi-nft-detail-media"})}function Km({env:e,item:t,onBack:n,onClose:r,onOutlink:o}){let{data:a,isLoading:i}=Ts(t.tokenUri),{data:s}=_m(e,t.contract,t.tokenId,!i&&!a),l=Md(t.tokenId,a?.name??s?.name??null),d=a?.description??s?.description??null,p=a?.image??Io(s?.image_url),b=a?.attributes??[],u=Ct[e].cross,{chainInfo:g}=Di(e,u),w=go(u,e).name??g?.name??`Chain ${u}`,f=g?.explorer_url?.replace(/\/+$/,""),c=f?`${f}/token/${t.contract}/instance/${t.tokenId}`:null,[h,m]=to.useState(!1),x=to.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(t.contract).then(()=>{m(!0),setTimeout(()=>m(!1),1500)}).catch(()=>{})},[t.contract]),k=(R,I,C)=>Mt(R,I,{category:"nft-detail",origin:C,payload:{contract:t.contract,tokenId:t.tokenId}},o);return nt(Zm,{children:[J(qm,{title:l,onBack:n,onClose:r}),nt("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:[J("div",{className:"wi-nft-detail-hero",children:J(Lv,{image:p,animationUrl:a?.animationUrl??null,tokenId:t.tokenId,alt:l})}),nt("section",{className:"wi-td-section",children:[nt("div",{className:"wi-nft-detail-titles",children:[J("span",{className:"wi-nft-detail-collection",children:t.collectionName}),J("h3",{className:"wi-td-section-title wi-nft-detail-name",children:l})]}),d&&J("p",{className:"wi-nft-detail-desc",children:d})]}),nt("section",{className:"wi-td-section",children:[J("h3",{className:"wi-td-section-title",children:"Details"}),nt("div",{className:"wi-td-rows",children:[nt("div",{className:"wi-td-row",children:[J("span",{className:"wi-td-row-label",children:"Token ID"}),J("span",{className:"wi-td-row-value",children:t.tokenId})]}),nt("div",{className:"wi-td-row",children:[J("span",{className:"wi-td-row-label",children:"Token Standard"}),J("span",{className:"wi-td-row-value",children:Qm[t.standard]})]}),t.standard==="ERC1155"&&nt("div",{className:"wi-td-row",children:[J("span",{className:"wi-td-row-label",children:"Quantity"}),J("span",{className:"wi-td-row-value",children:Dd(t.quantity)})]}),nt("div",{className:"wi-td-row",children:[J("span",{className:"wi-td-row-label",children:"Network"}),f?nt("a",{className:"wi-td-row-value wi-td-row-link",href:f,target:"_blank",rel:"noopener noreferrer",onClick:R=>k(R,f,"nft-network"),children:[J("span",{children:w}),J(xa,{className:"wi-td-external-icon"})]}):J("span",{className:"wi-td-row-value",children:w})]}),nt("div",{className:"wi-td-row",children:[J("span",{className:"wi-td-row-label",children:"Contract Address"}),nt("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:x,"aria-label":"Copy contract address",children:[J("span",{children:Xt(t.contract)}),h?J(ir,{size:14}):J(Mr,{size:14})]})]})]})]}),b.length>0&&nt("section",{className:"wi-td-section",children:[J("h3",{className:"wi-td-section-title",children:"Attributes"}),J("div",{className:"wi-nft-attrs",children:b.map((R,I)=>nt("div",{className:"wi-nft-attr",children:[R.traitType&&J("span",{className:"wi-nft-attr-type",children:R.traitType}),J("span",{className:"wi-nft-attr-value",children:R.value})]},`${R.traitType??""}-${I}`))})]}),c&&nt("a",{className:"wi-nft-explorer-btn",href:c,target:"_blank",rel:"noopener noreferrer",onClick:R=>k(R,c,"nft-explorer"),"data-track":"nft_explorer",children:[J("span",{children:"View on Explorer"}),J(xa,{className:"wi-td-external-icon"})]})]})]})}import*as pr from"react";var Xm={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function $m(e,t){let n=Xm[e]??Xm.production;return t==="send"?n:`${n}/${t}`}var Jm={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function eg(e){return Jm[e]??Jm.production}import{jsx as ie,jsxs as vn}from"react/jsx-runtime";function Bd({size:e=20,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ie("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),ie("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function tg({size:e=24,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ie("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),ie("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ng({size:e=24,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[ie("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),ie("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),ie("path",{d:"m2 16 6 6"}),ie("circle",{cx:"16",cy:"9",r:"2.9"}),ie("circle",{cx:"6",cy:"5",r:"3"})]})})}function rg({size:e=24,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[ie("path",{d:"M15 12h-5M15 8h-5"}),ie("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),ie("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function Ua({size:e=12,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ie("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function og({size:e=20,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ie("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),ie("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function ag({size:e=20,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ie("circle",{cx:"9",cy:"7",r:"3.4"}),ie("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),ie("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),ie("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function ig({size:e=20,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ie("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),ie("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function sg({size:e=20,className:t}){return ie("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ie("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),ie("path",{d:"M12 9v6"}),ie("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function lg({className:e}){return vn("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[ie("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),ie("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),ie("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),ie("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),ie("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),ie("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),ie("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),ie("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),ie("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:ie("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),vn("g",{mask:"url(#wi-op-logo-mask)",children:[ie("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),ie("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),ie("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),ie("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),vn("defs",{children:[vn("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[ie("stop",{stopColor:"#F1603C"}),ie("stop",{offset:"1",stopColor:"#EE2566"})]}),vn("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[ie("stop",{stopColor:"#F3752D"}),ie("stop",{offset:"1",stopColor:"#EC1272"})]}),vn("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[ie("stop",{stopColor:"white",stopOpacity:"0.5"}),ie("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),vn("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[ie("stop",{stopColor:"white",stopOpacity:"0.5"}),ie("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var Dv="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu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Y/FdDuPKsD9g9ugoyXSZyYtiUcvGLfOEqlhV9e/NWTH1sKcn3/QEaD/ui0vu7Yy6OJ9w90FYYzx0eJPrca0nH0k8XQHcTM9/RHvOlFQF9qnKW5DHLg366FhoEDkxnm1GZafbv+YtFQtJeEZzwIKkKr5uREGvR+kqr0rqvMONg8RdMGe7bfLiEh3DXisaaLWnPVFuGsufuKXDYcaT7KUY2QRrG0w/YBfJ3dL0Iwq+Ts1rVwPw6EW/mf2vvBQN9xEWoQ7eiQkd2E0IL7n3nBdqi3ZPGsI5a6KQiGzXc61A4P9EGBs88qTmQhAkR4mb+ylXAVZh/krFLuC7Ut7uDHtGuiDisDTlO+3/bQP0eH3DWK9n5/JZlbBt9YhJZd1r2yYqNlB/tZVI4EKQkr7qOlC60xl+gRhiolHBYUydO9a4i5+oeMpnPLGwTsCDx/HAmkYUs9yyTzdY4LQ9HBwJDDvPJ67WT/8o69iNhN5r6Pm/nz/XL6FN3HdgPOtkquE0weDfwxCeL1qJz+UNs953SM4sAVvJXTJgJtaDdn5jk26W6qWEeffbz7eFhHZSQT/5CcUc6kLTepaSfDjMMO13nc83Bp1gf9kmweID6+5MqNSxgHbv+z//3BrktV/Rl7DfiqPdxlkFinc/i09y+qlDycF6SDyMXIsRWi1IIvY4rojOw7PdSyYIzuQi1ul2IviqZrwjvgitwN/22Ogzpt6VUaERFfLjCSmwNIwt2hcaH3+ZB4sj7qP784wlWjexf/5iN8j6tHK6zzw4Q+QLcMcNksKjPFBaupKpIcBCUxs8o7wxVHzyRhdr/7JP7qiXejoFAtYPP/bcBCgAAAAAAAAAAA==";function dg({className:e}){return ie("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:ie("image",{href:Dv,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}ce(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #fff5ee);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
-
`);import{Fragment as Fd,jsx as oe,jsxs as rt}from"react/jsx-runtime";var Pv=6,Ov={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function cg(e,t){let n;try{n=BigInt(e||"0")}catch{return"0.00"}let r=n<0n;r&&(n=-n);let o,a;if(t<=2){let i=10n**BigInt(t);o=n/i,a=n%i*10n**BigInt(2-t)}else{let i=n/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${r?"-":""}${Bv(o.toString())}.${a.toString().padStart(2,"0")}`}function Bv(e){let t="";for(let n=0;n<e.length;n++){let r=e.length-n;n>0&&r%3===0&&(t+=","),t+=e[n]}return t}function zv(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let o=Math.floor(r/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function Fv(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function Is({env:e="production",balanceDisplay:t,balanceIconUrl:n,isBalanceLoading:r,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:b,onRepliesSeen:u,onBoard:g,onGetToken:y,getTokenSlot:w}){let f=o?.activity??[],c=f.length>0,h=o?.claimableCount??0,m=o?.repliesWaitingCount??0,x=o?.isLoading??!1,k=o?.xConnected??!1,R=pr.useCallback(A=>{window.open($m(e,A),"_blank","noopener,noreferrer")},[e]),I=pr.useCallback(()=>d?d():R("send"),[d,R]),C=pr.useCallback(()=>p?p():R("claim"),[p,R]),S=pr.useCallback(()=>{if(u?.(),b)return b();R("activity")},[b,u,R]),E=pr.useCallback(()=>g?g():R("board"),[g,R]),M=pr.useCallback(()=>{if(y)return y();window.open(eg(e),"_blank","noopener,noreferrer")},[y,e]),O=pr.useMemo(()=>!o||h<=0?null:cg(o.claimableTotalRaw,o.claimableDecimals??18),[o,h]),L=pr.useMemo(()=>f.slice(0,Pv),[f]),U=pr.useCallback(A=>{A.currentTarget.style.display="none"},[]);return rt(Fd,{children:[rt("div",{className:"wi-sticky-header",children:[rt("div",{className:"wi-header wi-header--receive",children:[oe("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:oe(On,{size:24})}),oe("span",{className:"wi-op-header-title",children:a?oe("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:U}):oe(lg,{className:"wi-op-logo"})}),oe("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:oe(hn,{size:24})})]}),oe("hr",{className:"wi-divider"})]}),rt("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[rt("section",{className:"wi-op-hero",children:[rt("div",{className:"wi-op-hero-copy",children:[rt("h2",{className:"wi-op-hero-title",children:[oe("span",{children:"Send money with"}),rt("span",{className:"wi-op-hero-title-row",children:["just an",oe(og,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),oe("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),oe("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?oe("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:U}):oe(dg,{})})]}),rt("section",{className:"wi-op-panel",children:[rt("div",{className:"wi-op-balance-card",children:[rt("div",{className:"wi-op-balance-head",children:[oe("span",{className:"wi-op-balance-label",children:"Available"}),w??rt("button",{type:"button",className:"wi-op-link-btn",onClick:M,"data-track":"onepop_get_token",children:[oe("span",{children:"Get ONEUSD"}),oe(Ua,{size:12})]})]}),oe("div",{className:"wi-op-balance-body",children:r?oe("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):rt(Fd,{children:[n&&oe("img",{src:n,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:U}),oe("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),rt("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[rt("button",{type:"button",className:"wi-op-action-card",onClick:I,"aria-label":"Send POP","data-track":"onepop_send",children:[oe(tg,{size:24}),oe("span",{children:"Send POP"})]}),rt("button",{type:"button",className:"wi-op-action-card",onClick:C,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[oe(ng,{size:24}),oe("span",{children:"Claim POPs"})]}),k&&rt("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[oe(rg,{size:24}),oe("span",{children:"Activity"})]})]})]}),oe("section",{className:"wi-op-cta-row",children:x?oe("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):rt(Fd,{children:[!c&&h<=0&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:I,"data-track":"onepop_send_first",children:"Send your first POP!"}),h>0?oe("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:C,"data-track":"onepop_claim_banner",children:`${h} POP${h===1?"":"s"} waiting to claim (total ${O})`}):!c&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),m>0&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${m} ${m===1?"reply":"replies"} waiting`})]})}),c?rt("section",{className:"wi-op-activity",children:[rt("div",{className:"wi-op-activity-head",children:[rt("div",{className:"wi-op-activity-heading",children:[oe("span",{className:"wi-op-activity-title",children:"Recent activity"}),oe("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),rt("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[oe("span",{children:"See all activity"}),oe(Ua,{size:16})]})]}),oe("ul",{className:"wi-op-activity-list",children:L.map(A=>oe(Uv,{item:A},A.id))})]}):rt("section",{className:"wi-op-features",children:[oe(zd,{icon:oe(ag,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),oe(zd,{icon:oe(ig,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),oe(zd,{icon:oe(sg,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),oe("div",{className:"wi-op-footer",children:oe("span",{children:"Powered by ONEpop"})})]})}function zd({icon:e,title:t,desc:n}){return rt("div",{className:"wi-op-feature",children:[oe("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),rt("span",{className:"wi-op-feature-copy",children:[oe("span",{className:"wi-op-feature-title",children:t}),oe("span",{className:"wi-op-feature-desc",children:n})]})]})}function Uv({item:e}){let t=Fv(e.handle),n=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,r=t.replace("@","").charAt(0).toUpperCase()||"?";return rt("li",{className:"wi-op-activity-item",children:[oe("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?oe("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):oe("span",{className:"wi-op-activity-initial",children:r})}),rt("span",{className:"wi-op-activity-copy",children:[rt("span",{className:"wi-op-activity-meta",children:[oe("span",{className:"wi-op-activity-peer",children:n}),oe("span",{className:"wi-op-activity-sep","aria-hidden":!0}),oe("span",{className:"wi-op-activity-time",children:zv(e.timestamp)})]}),oe("span",{className:"wi-op-activity-amount",children:cg(e.amountRaw,e.decimals)})]}),oe("span",{className:ye("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:Ov[e.status]})]})}import*as ug from"react";import{jsx as pg,jsxs as jv}from"react/jsx-runtime";var fg=ug.forwardRef(function({className:t,children:n,...r},o){return jv("button",{...r,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[pg("span",{children:"Get ONEUSD"}),pg(Ua,{size:12})]})});import{Fragment as Ud,jsx as N,jsxs as K}from"react/jsx-runtime";var Hv="On-ramp is not available in your region.";function _v(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:n}=window.location,r=t+n;return e.some(o=>r===o||r.startsWith(`${o}/`))}function Qv(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Vv(e){let t=e.toLowerCase().replace(/^0x/,""),n=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),r=parseInt(n.slice(0,4),16)%360,o=(r+60+parseInt(n.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${r} 85% 65%), hsl(${o} 80% 55%))`}function qv(e,t=.5){let n=Q.useRef(null),r=Q.useRef(null),[o,a]=Q.useState(1);return Q.useLayoutEffect(()=>{let i=n.current,s=r.current;if(!i||!s)return;let l=()=>{let p=i.clientWidth;if(!p)return;let b=s.cloneNode(!0);b.style.setProperty("--wi-total-scale","1"),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.visibility="hidden",b.style.maxWidth="none",b.style.width="max-content",i.appendChild(b);let u=b.offsetWidth;i.removeChild(b);let g=u>p?Math.max(t,p/u):1;a(g)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:n,valueRef:r,scale:o}}function Ms({align:e="end",sideOffset:t=12,className:n,children:r}){let{presentation:o,env:a,theme:i,isMobile:s,open:l,drawerDirection:d,modal:p,showBalance:b,showForgeToken:u,showGameToken:g,showQR:y,showBridge:w,showNft:f,qrLogoSrc:c,walletAddress:h,accountName:m,sendAccounts:x,profileImageUrl:k,connectorName:R,preferredTokens:I,close:C,onSelectWallet:S,onCopyAddress:E,onBuy:M,onDisconnect:O,disconnectLabel:L,termsUrl:U,termsLabel:A,privacyUrl:F,privacyLabel:ne,portalStyle:ee,navContent:Z,navPosition:W,footerContent:q,view:B,setView:G,selectedSendToken:te,setSelectedSendToken:_,selectedDetailToken:le,setSelectedDetailToken:me,selectedNftCollection:Te,setSelectedNftCollection:de,selectedNft:he,setSelectedNft:ge,showPortfolio:Ze,showOnePop:xe,onePopSummary:Ue,onOnePopOpen:ot,onOnePopSend:De,onOnePopClaim:je,onOnePopActivity:Be,onOnePopRepliesSeen:Nt,onePopLogoSrc:Gt,onePopGetTokenSlot:ut,onePopHeroSrc:St,portfolioTitle:xt,portfolioSections:Ht,showTotalAssets:vt,totalAssetsLabel:st,sendTransaction:Tt,getTransactionReceipt:$e,estimateGas:qt,onOutlink:lt,lpBalanceReader:nn,stakingRewardsReader:Qe,bridgeTokens:at,bridgeHistory:Xe,getBridgeQuote:kt,getBridgeToTokens:bt,getBridgeApproval:Ve,approveBridge:Yt,submitBridge:Kt,onReceive:Ot,onSend:Zt,onBuyDisabledMessage:j,onBridgeDisabledMessage:ue,onSendDisabledMessage:be}=Hr(),Ie=o==="page",[et,Bt]=Q.useState();Q.useEffect(()=>{Bt(Eu()??(Uo()?Gv.default:void 0))},[]);let It=m??R??et??"Account",[Cn,Rn]=Q.useState(null),P=Q.useRef(void 0),ke=Q.useCallback(T=>{Rn(T),clearTimeout(P.current),P.current=setTimeout(()=>Rn(null),4e3)},[]);Q.useEffect(()=>()=>clearTimeout(P.current),[]);let We=!!j,X=Q.useCallback(()=>{if(We){ke(j);return}let T=M?.();T&&typeof T.then=="function"&&T.catch(()=>{ke(j??Hv)})},[We,j,M,ke]),we=!!ue,z=!!be,{tokens:Re,isLoading:V}=Vr(a,h,l&&b),{statsMap:Ce}=qr(a,b),{aprPercent:Ln}=du(),{categoryMap:po,infoMap:gr}=pu(a,b),hr=b&&vt,{displayValue:ua,isLowerBound:wl,isLoading:yl}=uu(a,h,l&&hr),[Wr,uo]=Q.useState(!1),si=Q.useRef(null),[fo,li]=Q.useState(0),{holdings:mo,isLoading:di}=iu(a,h,l&&b&&u),xl=Q.useMemo(()=>mo.map(T=>T.token),[mo]),{imageMap:H}=su(a,xl,u&&mo.length>0),ft=wu(a),dt=Q.useMemo(()=>hu({env:a,tokens:Re,pinnedTokens:ft,preferredTokens:I,statsMap:Ce,categoryMap:po,showGameToken:g}),[Re,a,Ce,g,po,ft,I]),zt=Q.useMemo(()=>{if(!u)return[];let T=new Set(Re.map(ae=>ae.address.toLowerCase()));return[...mo].filter(ae=>!T.has(ae.token.toLowerCase())).sort((ae,tt)=>{let rr=gt(ae.value)??new mg(0);return(gt(tt.value)??new mg(0)).minus(rr).toNumber()})},[mo,u,Re]),Et=Q.useRef(!1),[qe,gn]=Q.useState(null),ze=Q.useRef(void 0),nr=qe?.chainId??te?.chainId??dt[0]?.chainId??0,{transactionUrl:Gr}=va(a,nr,qe?.txHash,!!(qe?.txHash&&nr)),mt=Q.useCallback(T=>{Et.current=!0,G(T)},[G]),[N0,vl]=Q.useState("recipient"),fa=Q.useCallback(()=>{_(null),vl("recipient"),mt("wallet")},[_,mt]),ci=Q.useCallback((T,ae="recipient")=>{if(z){ke(be);return}vl(ae),_(T),mt("send")},[z,be,ke,_,mt]),S0=Q.useCallback(T=>{me(T),mt("token-detail")},[me,mt]),T0=Q.useCallback(()=>{ot?.(),mt("onepop")},[ot,mt]),I0=Q.useCallback(()=>{me(null),mt("wallet")},[me,mt]),[kl,E0]=Q.useState("tokens"),A0=f&&kl==="nfts",M0=Q.useCallback(T=>{de(T),mt("nft-collection")},[de,mt]),L0=Q.useCallback(T=>{ge(T),mt("nft-detail")},[ge,mt]),D0=Q.useCallback(()=>{ge(null),mt("nft-collection")},[ge,mt]),P0=Q.useCallback(()=>{de(null),mt("wallet")},[de,mt]),O0=Q.useCallback(T=>{ci(T,"recipient")},[ci]),pi=Ft("apps.json",a,T=>Wn(T?.gametokenBridge,a)),yc=Ft("apps.json",a,T=>T?.gametokenSites),B0=Q.useCallback(()=>{if(we){ke(ue);return}if(pi){if(_v(yc)){window.location.assign(pi);return}window.open(pi,"_blank","noopener,noreferrer")}},[we,ue,pi,yc,ke]),z0=Q.useCallback(T=>{clearTimeout(ze.current),_(null),mt("wallet"),gn({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${Xt(T.recipient)}`})},[_,mt]),F0=Q.useCallback(T=>{let ae=te?.chainId;_(null),mt("wallet"),!(!T||!ae)&&(gn(tt=>({status:"success",txHash:T,chainId:ae,description:tt?.txHash===T?tt.description:"Tap to see your transaction"})),clearTimeout(ze.current),ze.current=setTimeout(()=>gn(null),5e3))},[te?.chainId,_,mt]),U0=Q.useCallback(T=>{let ae=T.txHash;ae&&(gn({status:"error",txHash:ae,chainId:T.chainId,description:T.message}),clearTimeout(ze.current),ze.current=setTimeout(()=>gn(null),5e3))},[]),ma=Q.useMemo(()=>{if(Ot)return Ot;if(y)return()=>mt("qr")},[Ot,y,mt]),ui=Q.useMemo(()=>{if(Zt)return Zt;if(dt.length===0)return;let T=dt[0];return()=>ci(T,"token")},[Zt,dt,ci]),xc=Q.useCallback(()=>{if(z){ke(be);return}ui?.()},[z,be,ui,ke]);Q.useEffect(()=>{l||(Et.current=!1,vl("recipient"))},[l]);let Cl=Q.useRef(null);Q.useEffect(()=>{let T=Cl.current;if(!T||!s)return;let ae=tt=>{tt.pointerType==="touch"&&tt.stopPropagation()};return T.addEventListener("pointerdown",ae),()=>T.removeEventListener("pointerdown",ae)},[s]);let[Oo,vc]=Q.useState(!1),Rl=Q.useRef(void 0),[ga,ha]=Q.useState(!1);Q.useEffect(()=>{if(!ga)return;let T=()=>ha(!1),ae=rr=>{rr.key==="Escape"&&ha(!1)},tt=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",ae,!0)},0);return()=>{clearTimeout(tt),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",ae,!0)}},[ga]),Q.useEffect(()=>{ha(!1)},[h]),Q.useEffect(()=>()=>clearTimeout(Rl.current),[]),Q.useEffect(()=>()=>clearTimeout(ze.current),[]),Q.useEffect(()=>{let T=si.current;if(!T||q===null){li(0);return}let ae=()=>{li(T.offsetHeight)};if(ae(),typeof ResizeObserver>"u")return;let tt=new ResizeObserver(ae);return tt.observe(T),()=>tt.disconnect()},[q]);let kc=Q.useCallback(async()=>{if(!Oo)try{await navigator.clipboard.writeText(h),vc(!0),clearTimeout(Rl.current),Rl.current=setTimeout(()=>vc(!1),2e3),E?.(h,!0)}catch{E?.(h,!1)}},[h,E,Oo]),fi=Q.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),Cc=Q.useMemo(()=>({background:Vv(h)}),[h]),mi=Q.useMemo(()=>k||Pr(a,h,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[k,a,h,i]),Nl=Q.useMemo(()=>Qv(ua),[ua]),{containerRef:j0,valueRef:W0,scale:G0}=qv(Wr?"\u2022\u2022\u2022\u2022\u2022\u2022":ua),Rc=U||F?K("div",{className:"wi-legal-links",children:[U&&N("a",{className:"wi-legal-link",href:U,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>Mt(T,U,{category:"terms",origin:"terms"},lt),children:A}),U&&F&&N("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),F&&N("a",{className:"wi-legal-link",href:F,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>Mt(T,F,{category:"privacy",origin:"privacy"},lt),children:ne})]}):null,Nc=O?K("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{O(),C()},children:[N(lp,{size:16}),N("span",{className:"wi-disconnect-label",children:L})]}):null,H0=b&&!Z,Sc=!hr,Tc=K("button",{type:"button",className:ye("wi-action-card",z&&"wi-action-card--dimmed"),onClick:xc,disabled:!z&&!ui,"aria-disabled":z||void 0,"aria-label":"Send","data-track":"send_open",children:[N(up,{size:20}),N("span",{children:"Send"})]}),_0=H0?Ie?Sc?N("div",{className:"wi-action-row","aria-label":"Wallet actions",children:Tc}):null:K("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[K("button",{type:"button",className:ye("wi-action-card",We&&"wi-action-card--dimmed"),onClick:X,disabled:!M&&!We,"aria-disabled":We||void 0,"aria-label":"Buy","data-track":"buy",children:[N(gp,{size:20}),N("span",{children:"Buy"})]}),w?K("button",{type:"button",className:ye("wi-action-card",we&&"wi-action-card--dimmed"),onClick:B0,"aria-disabled":we||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[N(hp,{size:20}),N("span",{children:"Bridge"})]}):K("button",{type:"button",className:"wi-action-card",onClick:ma,disabled:!ma,"aria-label":"Receive","data-track":"receive",children:[N(Ei,{size:20}),N("span",{children:"Receive"})]}),Sc&&Tc,xe&&K("button",{type:"button",className:"wi-action-card",onClick:T0,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[N(Bd,{size:20}),N("span",{children:"ONEpop"})]}),Ze?K("button",{type:"button",className:"wi-action-card",onClick:()=>mt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[N(mp,{size:20}),N("span",{children:"Portfolio"})]}):w?K("button",{type:"button",className:"wi-action-card",onClick:ma,disabled:!ma,"aria-label":"Receive","data-track":"receive",children:[N(Ei,{size:20}),N("span",{children:"Receive"})]}):null]}):null,Q0=K("div",{className:ye("wi-view-inner",Et.current&&"wi-view-wallet"),children:[hr&&K("div",{className:"wi-total-section",children:[K("div",{className:"wi-total-head",children:[N("span",{className:"wi-total-label",children:st}),N("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),uo(ae=>!ae)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),uo(ae=>!ae))},"aria-label":Wr?"Show balance":"Hide balance","data-track":"balance_toggle",children:Wr?N(cp,{}):N(dp,{})})]}),K("div",{className:"wi-total-body",children:[N("div",{className:"wi-total-value-wrap",ref:j0,children:yl?N("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):N("div",{className:"wi-total-value","data-hidden":Wr||void 0,ref:W0,style:{"--wi-total-scale":G0},children:Wr?N("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):K(Ud,{children:[wl&&N("span",{className:"wi-total-lte",children:"\u2264"}),N("span",{className:"wi-total-currency",children:"$"}),N("span",{className:"wi-total-amount",children:Nl.main}),Nl.decimal&&N("span",{className:"wi-total-decimal",children:Nl.decimal})]})})}),N("button",{type:"button",className:ye("wi-total-send",z&&"wi-total-send--dimmed"),onClick:xc,disabled:!z&&!ui,"aria-disabled":z||void 0,"aria-label":"Send","data-track":"send_open",children:N(fp,{size:27})})]})]}),W==="top"&&(Z?N("div",{className:"wi-nav-fixed",children:Z}):_0),f&&N("div",{className:"wi-asset-tabs",role:"tablist","aria-label":"Assets",children:["tokens","nfts"].map(T=>N("button",{type:"button",role:"tab",className:"wi-asset-tab","aria-selected":kl===T,"data-active":kl===T||void 0,onClick:()=>E0(T),"data-track":"asset_tab","data-track-id":T,children:T==="tokens"?"Tokens":"NFTs"},T))}),A0?N("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:N(Vm,{env:a,walletAddress:h,active:l,onSelectCollection:M0})}):b&&N("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:K("div",{className:"wi-token-list",children:[V&&Array.from({length:5},(T,ae)=>K("div",{className:"wi-skeleton-item",children:[K("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),K("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),K("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},ae)),!V&&dt.length===0&&!u&&N("div",{className:"wi-empty",children:"No Tokens Found"}),dt.map(T=>{let ae=Ce.get(kr(T.chainId,T.address)),tt=ae?parseFloat(ae.percent_change_24h):null,rr=tt!==null&&tt>=0,El=Ra(a,T.chainId),rb=td(T.address);return K("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>S0(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[K("div",{className:"wi-token-left",children:[K("div",{className:"wi-token-icon-wrap",children:[N("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:fi,onError:Al=>{Al.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),El&&N("img",{src:El,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Al=>{Al.currentTarget.style.display="none"}})]}),K("div",{className:"wi-token-info",children:[K("span",{className:"wi-token-name-row",children:[N("span",{className:"wi-token-name",children:T.symbol}),rb&&Ln!==null&&N("span",{className:"wi-token-apr",children:Zi(Ln)})]}),ae&&K("div",{className:"wi-token-price-row",children:[N("span",{className:"wi-token-price",children:xo(ae.price)}),N("span",{className:"wi-token-change","data-positive":rr,"data-zero":tt===0||void 0,children:tt!==null&&(tt===0?"0%":`${rr?"+":"-"}${(rr?Math.floor:Math.ceil)(Math.abs(tt)*100)/100}%`)})]})]})]}),K("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Lr(T.quantity.numeric,T.quantity.decimals)}),ae&&N("span",{className:"wi-token-value",children:Ai(T.quantity.numeric,T.quantity.decimals,ae.price)})]})]},`${T.address}-${T.chainId}`)}),u&&di&&Array.from({length:3},(T,ae)=>K("div",{className:"wi-skeleton-item",children:[K("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),K("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),K("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${ae}`)),u&&!di&&!V&&dt.length===0&&zt.length===0&&N("div",{className:"wi-empty",children:"No Tokens Found"}),u&&zt.map(T=>{let ae=H.get(T.token)||"",tt=Ra(a,Ct[a].cross);return K("div",{className:"wi-token-item",children:[K("div",{className:"wi-token-left",children:[K("div",{className:"wi-token-icon-wrap",children:[N("img",{src:ae||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:T.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:fi,onError:rr=>{rr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),tt&&N("img",{src:tt,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:rr=>{rr.currentTarget.style.display="none"}})]}),K("div",{className:"wi-token-info",children:[N("span",{className:"wi-token-name",children:T.token_name}),N("div",{className:"wi-token-price-row",children:K("span",{className:"wi-token-price",children:[Lr(T.current_price,18)," CROSS"]})})]})]}),K("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Lr(T.balance,18)}),N("span",{className:"wi-token-value",children:xo(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),W==="bottom"&&Z&&N("div",{className:"wi-nav-fixed",children:Z}),Nc&&N("div",{className:"wi-wallet-disconnect-row",children:Nc})]},"wallet"),V0=Ze?N("div",{className:ye("wi-view-inner wi-portfolio-body",Et.current&&"wi-view-portfolio"),children:N(Jo,{env:a,theme:i,walletAddress:h,showHeader:!1,onOutlink:lt,lpBalanceReader:nn,stakingRewardsReader:Qe,sendTransaction:Tt,estimateGas:qt,sections:Ht})},"portfolio"):null,q0=te?N("div",{className:ye("wi-view-inner wi-send-body",Et.current&&"wi-view-send"),children:N(Qi,{env:a,theme:i,walletAddress:h,accountName:It,accounts:x,initialStep:N0,token:te,tokens:dt,onTokenChange:_,sendTransaction:Tt,getTransactionReceipt:$e,estimateGas:qt,getTokenPriceUsd:T=>{let ae=Ce.get(kr(T.chainId,T.address));if(!ae?.price)return;let tt=parseFloat(ae.price);return Number.isFinite(tt)?tt:void 0},onClose:C,onBackToWallet:fa,onSubmitted:z0,onSuccess:F0,onFailed:U0,onOutlink:lt})},"send"):null,Y0=Q.useMemo(()=>at||dt.map(T=>{let ae=Ce.get(kr(T.chainId,T.address)),tt=ae?.price?parseFloat(ae.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:Yo(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(tt)?tt:void 0}}),[at,Ce,dt]),K0=N("div",{className:ye("wi-view-inner wi-bridge-body",Et.current&&"wi-view-send"),children:N(ea,{env:a,walletAddress:h,tokens:Y0,history:Xe,termsUrl:U,getQuote:kt,getToTokens:bt,getApproval:Ve,approveBridge:Yt,submitBridge:Kt,onClose:C,onBackToWallet:fa})},"bridge"),Z0=le?N("div",{className:ye("wi-view-inner wi-token-detail-body",Et.current&&"wi-view-send"),children:N(Bm,{env:a,isMobile:s,token:le,walletAddress:h,stat:Ce.get(kr(le.chainId,le.address)),tokenInfo:gr.get(Xi(le.chainId,le.address)),showBalance:b,onBack:I0,onClose:C,onSend:O0,onOutlink:lt})},"token-detail"):null,X0=Te?N("div",{className:ye("wi-view-inner wi-token-detail-body",Et.current&&"wi-view-send"),children:N(Ym,{collection:Te,onBack:P0,onClose:C,onSelectNft:L0})},"nft-collection"):null,J0=he?N("div",{className:ye("wi-view-inner wi-token-detail-body",Et.current&&"wi-view-send"),children:N(Km,{env:a,item:he,onBack:D0,onClose:C,onOutlink:lt})},"nft-detail"):null,Bo=Q.useMemo(()=>{let T=Ct[a].cross;return dt.find(ae=>ae.chainId===T&&td(ae.address))??dt.find(ae=>ae.chainId===T&&ae.symbol.toUpperCase().includes("ONEUSD"))},[dt,a]),$0=Q.useMemo(()=>{if(Bo)return Lr(Bo.quantity.numeric,Bo.quantity.decimals)},[Bo]),eb=xe?N("div",{className:ye("wi-view-inner wi-onepop-body",Et.current&&"wi-view-send"),children:N(Is,{env:a,balanceDisplay:$0,balanceIconUrl:Bo?.icon_url,isBalanceLoading:V&&!Bo,summary:Ue,logoSrc:Gt,heroSrc:St,getTokenSlot:ut,onBack:fa,onClose:C,onSend:De,onClaim:je,onActivity:Be,onRepliesSeen:Nt})},"onepop"):null,Sl=!!S&&m?.trim().toLowerCase()!=="my wallet",Ic=K(Ud,{children:[K("span",{className:"wi-receive-avatar",children:[N("span",{className:"wi-avatar-fallback",style:Cc}),mi&&N("img",{src:mi,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:fi,onError:T=>{T.currentTarget.style.display="none"}})]}),N("span",{className:"wi-receive-account-name",children:It}),Sl&&N("span",{className:"wi-receive-chevron","data-open":ga,"aria-hidden":"true",children:N(Gn,{size:16})})]}),tb=K("div",{className:ye("wi-view-inner wi-qr-body",Et.current&&"wi-view-qr"),children:[K("div",{className:"wi-receive-section",children:[Sl?N("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{ha(!0),S?.()},"aria-label":"Switch account",children:Ic}):N("div",{className:"wi-receive-account",children:Ic}),K("div",{className:"wi-qr-block",children:[K("div",{className:"wi-qr-box",children:[N(Wv,{value:h,size:180,level:"H",marginSize:2,...c&&{imageSettings:{src:c,height:33,width:33,excavate:!0}}}),!c&&N("div",{className:"wi-qr-logo",children:N(pp,{size:33})})]}),N("p",{className:"wi-qr-address",children:h})]}),K("button",{type:"button",className:"wi-qr-copy-btn",onClick:kc,"data-track":"address_copy",children:[N("span",{className:"wi-qr-copy-icon",children:Oo?N(ir,{size:16}):N(Mr,{size:16})}),N("span",{className:"wi-qr-copy-text",children:Oo?"Copied!":"Copy address"})]})]}),Rc&&N("div",{className:"wi-receive-footer",children:Rc})]},"qr"),nb=B==="qr"||B==="portfolio"||B==="send"||B==="bridge",Ec=q!==null?N("div",{className:"wi-builtin-footer",children:q}):null,Ac=K("div",{className:"wi-account-text",children:[Sl?K("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{ha(!0),S?.()},"aria-label":"Switch account","aria-expanded":ga,children:[N("span",{className:"wi-account-name",children:It}),N("span",{className:"wi-account-switch","data-open":ga,"aria-hidden":"true",children:N(Gn,{size:20})})]}):N("div",{className:"wi-account-row",children:N("span",{className:"wi-account-name",children:It})}),K("button",{type:"button",className:"wi-address-row-btn",onClick:kc,"aria-label":"Copy address","data-track":"address_copy",children:[N("span",{className:"wi-account-address",children:Xt(h)}),N("span",{className:"wi-account-copy","data-copied":Oo,children:Oo?N(ir,{size:12}):N(Mr,{size:12})})]})]}),Tl=K(Ud,{children:[r,B==="qr"?N("div",{className:"wi-sticky-header",children:K("div",{className:"wi-header wi-header--receive",children:[N("button",{type:"button",className:"wi-header-back",onClick:fa,"aria-label":"Back",children:N(On,{size:24})}),N("span",{className:"wi-receive-title",children:"Receive"}),N("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:N(hn,{size:24})})]})}):B==="send"||B==="bridge"||B==="token-detail"||B==="onepop"||B==="nft-collection"||B==="nft-detail"?null:nb?K("div",{className:"wi-sticky-header",children:[K("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[N("button",{type:"button",className:"wi-header-back",onClick:fa,"aria-label":"Back",children:N(On,{size:24})}),N("div",{className:"wi-account-block wi-account-block--sub-account",children:Ac}),N("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:N(hn,{size:24})})]}),N("hr",{className:"wi-divider"})]}):K("div",{className:"wi-sticky-header",children:[K("div",{className:"wi-header wi-header--wallet",children:[K("div",{className:"wi-account-block",children:[K("div",{className:"wi-avatar",children:[N("div",{className:"wi-avatar-fallback",style:Cc}),mi&&N("img",{src:mi,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:fi,onError:T=>{T.currentTarget.style.display="none"}})]}),Ac]}),K("div",{className:"wi-header-actions",children:[y&&(w||Ie)&&N("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ma,"aria-label":"Show QR code","data-track":"receive",children:N(Ei,{size:20})}),N("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:N(hn,{size:24})})]})]}),N("hr",{className:"wi-divider"})]}),K("div",{className:"wi-view-container",children:[B==="wallet"&&Q0,B==="qr"&&tb,B==="portfolio"&&V0,B==="send"&&q0,B==="bridge"&&K0,B==="token-detail"&&Z0,B==="onepop"&&eb,B==="nft-collection"&&X0,B==="nft-detail"&&J0]}),(B==="wallet"||B==="onepop")&&Cn&&N("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Cn}),B==="wallet"&&qe&&K("a",{className:"wi-send-toast",href:Gr??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!Gr){T.preventDefault();return}Mt(T,Gr,{category:"send",origin:"send-transaction",payload:{chainId:qe.chainId,txHash:qe.txHash}},lt)},children:[N("span",{className:"wi-send-toast-icon","data-status":qe.status,"aria-hidden":!0,children:qe.status==="pending"?N("span",{className:"wi-send-toast-spinner"}):qe.status==="error"?N("span",{className:"wi-send-toast-error-dot"}):N(bp,{size:20})}),K("span",{className:"wi-send-toast-copy",children:[N("span",{className:"wi-send-toast-title",children:qe.status==="pending"?"Sending...":qe.status==="error"?"Send failed":"Send complete"}),N("span",{className:"wi-send-toast-desc",children:qe.status==="pending"||qe.status==="error"?qe.description:"Tap to see your transaction"})]})]}),Ec&&B!=="portfolio"&&B!=="send"&&B!=="token-detail"&&B!=="nft-collection"&&B!=="nft-detail"&&B!=="onepop"&&N("div",{className:"wi-sticky-footer",children:N("div",{className:"wi-footer",ref:si,children:Ec})})]}),Il={...ee,...fo>0?{"--wi-footer-height":`${fo}px`}:null},Mc=Q.useCallback(T=>{let ae=T.detail.originalEvent.target;ae instanceof Element&&ae.closest("[data-rd-shell]")!==null&&T.preventDefault()},[]);return Ie?N(ve,{feature:"wallet_info",children:K("div",{className:ye("wi-drawer-content wi-page-content",n),"data-theme":i,style:Il,"data-no-balance":!b||void 0,"data-has-footer":fo>0||void 0,"data-view":B,children:[N("h1",{className:"wi-sr-only",children:"My Wallet"}),Tl]})}):s?N(ve,{feature:"wallet_info",children:K(Es.Portal,{children:[p&&N(Es.Overlay,{className:"wi-drawer-overlay"}),K(Es.Content,{className:ye("wi-drawer-content",n),"data-theme":i,"data-vaul-no-drag":d==="left"||d==="right"?!0:void 0,style:Il,"data-direction":d,"data-no-balance":!b||void 0,"data-has-footer":fo>0||void 0,"data-view":B,onInteractOutside:Mc,children:[N(Es.Title,{className:"wi-sr-only",children:"My Wallet"}),Tl]})]})}):K(ve,{feature:"wallet_info",children:[p&&l&&N("div",{className:"wi-drawer-overlay",onClick:C}),N(As.Portal,{children:N(As.Content,{align:e,sideOffset:t,className:ye("wi-popover-content",n),"data-theme":i,style:Il,"data-no-balance":!b||void 0,"data-has-footer":fo>0||void 0,"data-view":B,onInteractOutside:Mc,children:Tl})})]})}import*as gg from"react";function hg({position:e="top",children:t}){let{setNavContent:n,setNavPosition:r}=Hr();return gg.useEffect(()=>(n(t),r(e),()=>n(null)),[t,e,n,r]),null}import*as bg from"react";function wg({children:e}){let{setFooterContent:t}=Hr();return bg.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}ce(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
|
|
5
|
+
`);ce("");import{jsx as _l}from"react/jsx-runtime";function Jc({env:e,theme:t="dark",mobileBreakpoint:n=768,domain:r,children:o}){let a=Ho(`(max-width: ${n}px)`),[i,s]=_o.useState(!1),l=_o.useCallback(()=>s(!1),[]),d=at(e);or(i,l);let p=_o.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:r,close:l}),[d,t,a,i,r,l]);return _l(jl.Provider,{value:p,children:a?_l(_b.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):_l(Xc.Root,{open:i,onOpenChange:s,children:o},"popover")})}import*as np from"@radix-ui/react-popover";import{Drawer as Qb}from"vaul";import{jsx as Pn,jsxs as Vb}from"react/jsx-runtime";function $c({size:e=18}){return Vb("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Pn("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),Pn("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function ep(){return Pn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Pn("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tp(){return Pn("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Pn("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as Vo}from"react/jsx-runtime";function rp({asChild:e,children:t,className:n,style:r}){let{isMobile:o,theme:a}=Ni(),i=t!=null,s=e??!0,l=n?`al-trigger-btn ${n}`:"al-trigger-btn",d=i?t:Vo("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:r,children:Vo($c,{size:18})});return o?Vo(xe,{feature:"app_launcher",children:Vo(Qb.Trigger,{asChild:s,children:d})}):Vo(xe,{feature:"app_launcher",children:Vo(np.Trigger,{asChild:s,children:d})})}import*as xr from"react";import*as Ei from"@radix-ui/react-popover";import{Drawer as Qo}from"vaul";import{useQuery as Kb}from"@tanstack/react-query";var op={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",production:"https://contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json"};var qb="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Yb="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function yr(e,t){return`${e==="production"?Yb:qb}/${t}.png`}function ap(e){let t=e==="production"?"production":"stage";return{version:"0.0.1-fallback",items:[{id:"gametoken-cross",label:"Gametoken",description:"Trade game tokens easily using CROSS.",url:{dev:"https://stg.onechain.nexus/gametoken",stage:"https://stg.onechain.nexus/gametoken",production:"https://www.onechain.nexus/gametoken"},iconUrl:yr(t,"game-token"),order:1e3,type:"gametoken",badge:null,isNew:!1,serviceStatus:"available"},{id:"forge",label:"Forge",description:"Launch Your Game, Ignite the Market",url:{dev:"https://stg.onechain.nexus/forge",stage:"https://stg.onechain.nexus/forge",production:"https://onechain.nexus/forge"},iconUrl:yr(t,"forge"),order:4e3,type:"forge",badge:null,isNew:!0,serviceStatus:"available"},{id:"crossd",label:"Bridge",description:"The first decentralized exchange on the CROSS network.",url:{dev:"https://stg.crossdefi.io/swap-bridge",stage:"https://stg.crossdefi.io/swap-bridge",production:"https://www.crossdefi.io/swap-bridge"},iconUrl:yr(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"onepop",label:"ONEpop",description:"Send crypto with just an X handle.",url:{dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"},iconUrl:t==="production"?"https://contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png":"https://stg-contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png",order:5500,type:"onepop",badge:null,isNew:!0,serviceStatus:"available"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:yr(t,"prediction"),order:6e3,type:"prediction",badge:null,isNew:!0,serviceStatus:"available"},{id:"rewards",label:"Rewards",description:"Deposit CROSS and earn rewards. Grow together.",url:{dev:"https://stg.onechain.nexus/rewards",stage:"https://stg.onechain.nexus/rewards",production:"https://onechain.nexus/rewards"},iconUrl:yr(t,"reward"),order:7e3,type:"rewards",badge:null,isNew:!1,serviceStatus:"ending"},{id:"cross-staking",label:"Staking",description:"Stake CROSS and earn rewards.",url:{dev:"https://stg-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},iconUrl:yr(t,"cross-staking"),order:7500,type:"cross-staking",badge:null,isNew:!0,serviceStatus:"available"},{id:"play",label:"Quest",description:"Discover and play games on CROSS.",url:{dev:"https://stg.onechain.nexus/quest",stage:"https://stg.onechain.nexus/quest",production:"https://www.onechain.nexus/quest"},iconUrl:yr(t,"play"),order:8500,type:"play",badge:null,isNew:!0,serviceStatus:"available"},{id:"shop",label:"Shop",description:"Game Payment Platform & In-Game Currency Store.",url:{dev:"https://stg.onechain.nexus/shop",stage:"https://stg.onechain.nexus/shop",production:"https://www.onechain.nexus/shop"},iconUrl:yr(t,"shop"),order:9e3,type:"shop",badge:null,isNew:!1,serviceStatus:"available"},{id:"explorer",label:"Explorer",description:"View transactions, blocks, and token data on the CROSS network.",url:{dev:"https://stg-explorer.onechain.nexus",stage:"https://stg-explorer.onechain.nexus",production:"https://explorer.onechain.nexus"},iconUrl:yr(t,"explorer"),order:12e3,type:"explorer",badge:null,isNew:!1,serviceStatus:"available"},{id:"wave",label:"Wave",description:"Stream, support, and earn in the CROSS ecosystem.",url:{dev:"https://stg.onechain.nexus/wave",stage:"https://stg.onechain.nexus/wave",production:"https://www.onechain.nexus/wave"},iconUrl:yr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Ii(e){let t=at(e);return Kb({queryKey:["global-menu",t],queryFn:async()=>{try{let n=await fetch(op[t],{cache:"no-store"});if(!n.ok)throw new Error(`Failed to fetch global menu: ${n.status}`);return n.json()}catch{return ap(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Vl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function sp(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function lp(e){return[...e].sort((t,n)=>{let r=ip(t)-ip(n);return r!==0?r:t.order-n.order})}function ip(e){let t=Vl(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as Vt,jsxs as qo}from"react/jsx-runtime";function Zb(e){return e.id==="cross-staking"||e.type==="cross-staking"}function cp({align:e="end",sideOffset:t=8,className:n}){let{env:r,theme:o,isMobile:a,domain:i,close:s}=Ni(),{data:l}=Ii(r),d=xr.useMemo(()=>lp(l?.items??[]),[l?.items]),p=24,g=xr.useRef(null),u=xr.useRef(!1),m=xr.useCallback(x=>{g.current={x:x.clientX,y:x.clientY},u.current=!1},[]),y=xr.useCallback(x=>{let k=g.current;g.current=null,k&&(u.current=Math.abs(x.clientX-k.x)>p||Math.abs(x.clientY-k.y)>p)},[]),w=xr.useCallback(()=>{g.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",c=xr.useCallback((x,k)=>{let R=u.current;if(u.current=!1,R&&x.detail!==0)return;let S=k.url[r]??k.url.production,C=dp(S,i);if(!C)try{let N=new URL(S);if(N.pathname===window.location.pathname&&N.search===window.location.search&&N.hash===window.location.hash){s();return}}catch{}if(C){let N=window.open(S,"_blank");if(N){N.opener=null,s();return}}window.location.href=S},[r,i,s]),h=x=>{let k=x.url[r]??x.url.production,R=dp(k,i),S=Vl(x),C=S==="ending",N=sp(x.iconUrl,r),E=!1;if(!R)try{let A=new URL(k).pathname;E=f===A||f.startsWith(A+"/")}catch{E=!1}return Vt("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":x.id,"data-active":E||void 0,"data-service-status":S,onPointerDown:m,onPointerUp:y,onPointerCancel:w,onClick:A=>c(A,x),children:qo("div",{className:"al-grid-item-left",children:[qo("div",{className:"al-grid-item-icon",children:[Vt("img",{src:N,alt:x.label,width:24,height:24,loading:"lazy"}),x.isNew&&Vt("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),qo("span",{className:"al-grid-item-text",children:[Vt("span",{className:"al-grid-item-label",children:x.label}),C&&Vt("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),x.badge&&!Zb(x)&&Vt("span",{className:"al-badge al-badge-list",children:x.badge})]})]})},x.id)},b=Vt("div",{className:"al-menu","data-theme":o,children:Vt("div",{className:"al-grid",children:d.map(h)})});return a?Vt(xe,{feature:"app_launcher",children:qo(Qo.Portal,{children:[Vt(Qo.Overlay,{className:"al-drawer-overlay"}),qo(Qo.Content,{className:ye("al-drawer-content",n),"data-theme":o,children:[qo("div",{className:"al-drawer-header",children:[Vt(Qo.Close,{className:"al-drawer-close","data-track":"close",children:Vt(ep,{})}),Vt(Qo.Title,{className:"al-drawer-title",children:"ONE Services"}),Vt(Qo.Close,{className:"al-drawer-close","data-track":"close",children:Vt(tp,{})})]}),Vt("div",{className:"al-drawer-body",children:b})]})]})}):Vt(xe,{feature:"app_launcher",children:Vt(Ei.Portal,{children:Vt(Ei.Content,{align:e,sideOffset:t,className:ye("al-popover-content",n),"data-theme":o,children:b})})})}function dp(e,t){try{let n=new URL(e).hostname;return typeof window>"u"?!0:n!==(t??window.location.hostname)}catch{return!1}}import*as Wa from"react";import*as Ig from"@radix-ui/react-popover";import{Drawer as d2}from"vaul";import{createContext as Xb,useContext as Jb}from"react";var xa=Xb(null);function _r(){let e=Jb(xa);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import*as rn from"react";import{WALLET_LABELS as $b}from"@nexus-cross/crossx-design-system";var Ql=(r=>(r.CROSSx="crossx",r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r))(Ql||{}),Ai={crossx:{name:$b.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};import*as ou from"react";import{jsx as ve,jsxs as Vr}from"react/jsx-runtime";function pp({size:e=16,className:t}){return Vr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("path",{d:"M12.6667 4.66667V2.66667C12.6667 2.48986 12.5964 2.32029 12.4714 2.19526C12.3464 2.07024 12.1768 2 12 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333C2 3.68696 2.14048 4.02609 2.39052 4.27614C2.64057 4.52619 2.97971 4.66667 3.33333 4.66667H13.3333C13.5101 4.66667 13.6797 4.7369 13.8047 4.86193C13.9298 4.98695 14 5.15652 14 5.33333V8M14 8H12C11.6464 8 11.3072 8.14048 11.0572 8.39052C10.8071 8.64057 10.6667 8.97971 10.6667 9.33333C10.6667 9.68696 10.8071 10.0261 11.0572 10.2761C11.3072 10.5262 11.6464 10.6667 12 10.6667H14C14.1768 10.6667 14.3464 10.5964 14.4714 10.4714C14.5964 10.3464 14.6667 10.1768 14.6667 10V8.66667C14.6667 8.48986 14.5964 8.32029 14.4714 8.19526C14.3464 8.07024 14.1768 8 14 8Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),ve("path",{d:"M2 3.33325V12.6666C2 13.0202 2.14048 13.3593 2.39052 13.6094C2.64057 13.8594 2.97971 13.9999 3.33333 13.9999H13.3333C13.5101 13.9999 13.6797 13.9297 13.8047 13.8047C13.9298 13.6796 14 13.5101 14 13.3333V10.6666",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Lr({size:e=16,className:t}){return ve("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M9.40284 17.0647H4.85156V4.84656H17.0697V9.39783H15.4407V6.47565H6.48066V15.4356H9.40284V17.0647ZM21.5192 12.5644H12.5592V21.5244H21.5192V12.5644ZM23.1483 10.9353V23.1535H10.9301V10.9353H23.1483Z",fill:"currentColor"})})}function ar({size:e=16,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function hn({size:e=24,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function up({size:e=20,className:t}){return Vr("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("path",{d:"M7.5 17.5H4.167A1.667 1.667 0 012.5 15.833V4.167A1.667 1.667 0 014.167 2.5H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),ve("path",{d:"M13.333 14.167L17.5 10l-4.167-4.167M17.5 10H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Mi({size:e=20,className:t}){return ve("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:ve("path",{d:"M7.91305 10.8327C8.60341 10.8327 9.16305 11.3924 9.16305 12.0827V16.2458C9.16305 16.9361 8.60341 17.4958 7.91305 17.4958H3.75C3.05964 17.4958 2.5 16.9361 2.5 16.2458L2.5 12.0827C2.5 11.3924 3.05964 10.8327 3.75 10.8327H7.91305ZM14.1685 17.4958H12.5027V15.83H14.1685V17.4958ZM17.5 17.4958H15.8342V15.83H17.5V17.4958ZM4.16576 12.4985V15.83H7.49729V12.4985H4.16576ZM12.5027 15.83H10.8369V14.1642H12.5027V15.83ZM15.8342 15.83H14.1685V14.1642H15.8342V15.83ZM14.1685 14.1642H12.5027V12.4985H14.1685V14.1642ZM17.5 14.1642H15.8342V12.4985H17.5V14.1642ZM12.5027 12.4985H10.8369V10.8327H12.5027V12.4985ZM15.8342 12.4985H14.1685V10.8327H15.8342V12.4985ZM7.91305 2.50391C8.60341 2.50391 9.16305 3.06355 9.16305 3.75391V7.91696C9.16305 8.60731 8.60341 9.16696 7.91305 9.16696H3.75C3.05964 9.16696 2.5 8.60731 2.5 7.91696L2.5 3.75391C2.5 3.06355 3.05964 2.50391 3.75 2.50391L7.91305 2.50391ZM16.2419 2.50391C16.9322 2.50391 17.4919 3.06355 17.4919 3.75391V7.91696C17.4919 8.60731 16.9322 9.16696 16.2419 9.16696H12.0788C11.3885 9.16696 10.8288 8.60731 10.8288 7.91696V3.75391C10.8288 3.06355 11.3885 2.50391 12.0788 2.50391L16.2419 2.50391ZM4.16576 4.16967L4.16576 7.50119L7.49729 7.50119L7.49729 4.16967L4.16576 4.16967ZM12.4946 4.16967V7.50119H15.8261V4.16967H12.4946Z",fill:"currentColor",fillOpacity:1})})}function On({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Gn({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function fp({size:e=16,className:t}){return Vr("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("path",{d:"M1.667 10S4.167 4.167 10 4.167 18.333 10 18.333 10 15.833 15.833 10 15.833 1.667 10 1.667 10z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),ve("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function mp({size:e=16,className:t}){return Vr("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("path",{d:"M14.95 14.95A8.283 8.283 0 0110 16.667c-5.833 0-8.333-5.833-8.333-5.833a15.238 15.238 0 014.183-4.884m3.267-1.55A7.55 7.55 0 0110 4.167c5.833 0 8.333 5.833 8.333 5.833a15.28 15.28 0 01-1.783 2.633M11.767 11.767a2.5 2.5 0 11-3.534-3.534",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),ve("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var ew='<svg width="100%" height="100%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',tw=`data:image/svg+xml,${encodeURIComponent(ew)}`;function gp({size:e=42,className:t}){return ve("img",{src:tw,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function hp({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M9.19133 10.8077C9.04905 10.6657 8.87947 10.554 8.69283 10.4792L2.78881 8.11167C2.71832 8.08338 2.65816 8.03421 2.61642 7.97075C2.57468 7.90729 2.55335 7.83258 2.5553 7.75665C2.55724 7.68072 2.58237 7.6072 2.6273 7.54596C2.67224 7.48472 2.73483 7.4387 2.80668 7.41406L16.9525 2.5747C17.0185 2.55087 17.0899 2.54632 17.1583 2.56159C17.2268 2.57685 17.2895 2.6113 17.3391 2.66089C17.3887 2.71049 17.4231 2.77319 17.4384 2.84165C17.4536 2.9101 17.4491 2.9815 17.4253 3.04746L12.5859 17.1933C12.5613 17.2651 12.5152 17.3277 12.454 17.3727C12.3928 17.4176 12.3192 17.4427 12.2433 17.4447C12.1674 17.4466 12.0927 17.4253 12.0292 17.3835C11.9658 17.3418 11.9166 17.2817 11.8883 17.2112L9.52073 11.3056C9.44567 11.1191 9.33362 10.9498 9.19133 10.8077ZM9.19133 10.8077L17.3367 2.66404",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function bp({size:e=24,className:t}){return Vr("svg",{width:e,height:e,viewBox:"-2.5 -2.5 26.67 26.67",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("defs",{children:Vr("linearGradient",{id:"wi-send-solid-grad",x1:"21.6678",y1:"10.8341",x2:"3.99487",y2:"19.2366",gradientUnits:"userSpaceOnUse",children:[ve("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),ve("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),ve("path",{d:"M19.7662 0.0826863C20.8951 -0.311758 21.9796 0.772686 21.5851 1.90158L15.0018 20.7127C14.574 21.9327 12.874 22.0016 12.3496 20.8205L9.1729 13.6738L13.644 9.20158C13.7912 9.0436 13.8713 8.83466 13.8675 8.61877C13.8637 8.40288 13.7763 8.1969 13.6236 8.04422C13.4709 7.89154 13.2649 7.80408 13.049 7.80027C12.8331 7.79646 12.6242 7.8766 12.4662 8.0238L7.99401 12.4949L0.847345 9.31824C-0.333766 8.79269 -0.263766 7.0938 0.955123 6.66602L19.7662 0.0826863Z",fill:"url(#wi-send-solid-grad)"})]})}function wp({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M10.8333 14.1667V7.5M15 14.1667V4.16667M2.5 2.5V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H17.5M6.66667 14.1667V11.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function yp({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M6.6665 9.99984H13.3332M9.99984 6.6665V13.3332M18.3332 9.99984C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39746 18.3332 1.6665 14.6022 1.6665 9.99984C1.6665 5.39746 5.39746 1.6665 9.99984 1.6665C14.6022 1.6665 18.3332 5.39746 18.3332 9.99984Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function xp({size:e=20,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:ve("path",{d:"M6.667 2.5 3.333 5.833 6.667 9.167M3.333 5.833h13.334M13.333 17.5l3.334-3.333-3.334-3.334M16.667 14.167H3.333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function vp({size:e=20,className:t}){return Vr("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[ve("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),ve("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}function va({size:e=14,className:t}){return ve("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:ve("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function kp({className:e}){return Vr("svg",{viewBox:"0 0 540 540",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,children:[ve("path",{d:"M341.385 435.217V376.643H326.742V362H370.672V376.643H356.029V435.217H341.385Z"}),ve("path",{d:"M261.725 435.217V362H305.656V376.643H276.369V391.287H305.656V405.93H276.369V435.217H261.725Z"}),ve("path",{d:"M167.422 435.217V362H182.066V376.643H196.709V391.287H211.352V405.93H225.996V362H240.639V435.217H225.996V420.573H211.352V405.93H196.709V391.287H182.066V435.217H167.422Z"}),ve("path",{d:"M237.374 204.563C243.054 204.563 248.502 202.307 252.518 198.29C256.534 194.274 258.791 188.826 258.791 183.146C258.791 177.466 256.534 172.019 252.518 168.002C248.502 163.986 243.054 161.73 237.374 161.73C231.694 161.73 226.247 163.986 222.23 168.002C218.214 172.019 215.957 177.466 215.957 183.146C215.957 188.826 218.214 194.274 222.23 198.29C226.247 202.307 231.694 204.563 237.374 204.563ZM371.228 145.667L269.499 86.7713L167.77 145.667V263.459L269.499 322.355L371.228 263.459V145.667ZM269.499 111.518L349.812 158.014V231.687L300.96 202.389L215.604 266.404L189.187 251.112V158.014L269.499 111.518ZM269.499 297.608L235.746 278.065L302.288 228.164L345.1 253.843L269.499 297.608Z"})]})}import*as pe from"react";import xo from"bignumber.js";function nw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return t>0&&e.charCodeAt(t-1)===46&&t--,e.slice(0,t)}function Dr(e,t){if(!e||e==="0")return"0.00";let n=new xo(e).shiftedBy(-t),r=n.isGreaterThanOrEqualTo(1)?2:4;return n.toFormat(r,xo.ROUND_DOWN)}function Xt(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function vo(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let n=t>=1?2:4,r=Math.pow(10,n);return`$${(Math.floor(t*r)/r).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}`}function Li(e,t,n){let o=new xo(e).shiftedBy(-t).multipliedBy(new xo(n));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(xo.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,xo.ROUND_DOWN):o.decimalPlaces(4,xo.ROUND_DOWN)).toFormat()}`}function Cp(e){if(e===""||e===null||e===void 0)return{displayValue:"0",isLowerBound:!1};let t=typeof e=="number"?e.toString():e;if(t==="0"||t==="0.0")return{displayValue:"0",isLowerBound:!1};let n=t;if(n.includes("e")||n.includes("E")){let i=Number(n);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};n=nw(i.toFixed(18))}let[r="0",o=""]=n.split(".");if(Number(r)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(r).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${r}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}import{useMemo as Sp}from"react";import{useQuery as rw}from"@tanstack/react-query";var Rt={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},Rp={dev:[jn(612044),jn(97),jn(998)],stage:[jn(612044),jn(97),jn(998)],production:[jn(612055),jn(56)]};function ql(e){return Rp[e]}var Di="https://terms.onechain.nexus/docs/terms-july-23-2026",Pi="https://terms.onechain.nexus/docs/pp-july-23-2026",Np="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var ow="send:chain-info";function aw(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let n=t[0];if(!n)throw new Error("Chain info payload is empty.");return n}return t}return e}function Yl(e,...t){let n=e.replace(/\/+$/,""),r=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[n,...r].join("/")}function Tp(e,t,n,r){if(r)return t===Rt[e].cross?Ip(t,r):n?.explorer_url?Yl(n.explorer_url,n.explorer_postfix?.transaction??"tx",r):iw(e,t,r)}function Ip(e,t){return Yl("https://explorer.onechain.nexus",String(e),"tx",t)}function iw(e,t,n){let r=Rt[e];if(t===r.cross)return Ip(t,n);if(t===r.bsc)return Yl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",n)}function ka(e,t,n,r=!0){let o=rw({queryKey:[ow,e,t],queryFn:async({signal:s})=>{let l=await Se("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return aw(p)},enabled:r,staleTime:3e5}),a=o.data;return{transactionUrl:Sp(()=>Tp(e,t,a,n),[t,a,e,n]),chainInfo:a,...o}}function Oi(e,t,n=!0){let{chainInfo:r}=ka(e,t,void 0,n);return{buildTxUrl:Sp(()=>a=>Tp(e,t,r,a),[e,t,r]),chainInfo:r}}var Ep="0x0000000000000000000000000000000000000001";var sw="0xa9059cbb",lw=/^0x[a-fA-F0-9]{40}$/,dw="nexus-cross:dapp-ui:send:recent:",Ap=10;function cw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function Ca(e){return e.toLowerCase()}function vr(e){return lw.test(e)}function Qr(e){return Ca(e.address)===Ep}function Kl(e){return`${dw}${e.toLowerCase()}`}function Yo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Kl(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>r!==null&&typeof r=="object"&&vr(r.address)&&typeof r.updatedAt=="number").slice(0,Ap):[]}catch{return[]}}function Zl(e,t){if(typeof window>"u")return[];let n=Ca(t),r=[{address:n,updatedAt:Date.now()},...Yo(e).filter(o=>o.address!==n)].slice(0,Ap);try{window.localStorage.setItem(Kl(e),JSON.stringify(r))}catch{return Yo(e)}return r}function Xl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Kl(e))}catch{}}function Pr(e,t){let n=e.trim();if(!n)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(n))return{error:"Enter a valid amount."};let[r="0",o=""]=n.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(r||"0"),i=o.padEnd(t,"0"),s=i?BigInt(i):0n,l=10n**BigInt(t),d=a*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function Ko(e,t){let n=BigInt(e||"0"),r=10n**BigInt(t),o=n/r,a=n%r;if(a===0n)return o.toString();let i=cw(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Jl(e,t){let n=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),r=t.toString(16).padStart(64,"0");return`${sw}${n}${r}`}function kr(e,t,n=10){if(t<=0)return e.toString();let r=10n**BigInt(t),o=e/r,a=e%r;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(n,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function $l(e,t){return kr(e,t,6)}function Mp(e){return kr(e,9,2)}function Lp(e){return e.toLocaleString("en-US")}function Bi(e){return e===56||e===97}function zi(e){return e.gasPrice??e.maxFeePerGas}function Dp(e,t=!1){return t?zi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Fi(e,t=!1){if(t){let n=zi(e);return n!==void 0?e.gasLimit*n:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function Ui(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Pp(e,t=0){if(t>4||e===null||e===void 0)return"";if(typeof e=="string")return e.toLowerCase();if(typeof e!="object")return"";let n=e,r=[];return typeof n.name=="string"&&r.push(n.name),typeof n.shortMessage=="string"&&r.push(n.shortMessage),typeof n.message=="string"&&r.push(n.message),typeof n.details=="string"&&r.push(n.details),n.cause!==void 0&&r.push(Pp(n.cause,t+1)),r.join(`
|
|
6
|
+
`).toLowerCase()}function pw(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e&&typeof e=="object"){let t=e;if(typeof t.shortMessage=="string")return t.shortMessage;if(typeof t.message=="string")return t.message}return""}function ed(e,t={},n="Failed to send transaction."){let r=Pp(e);if(!r)return n;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(r.includes("user rejected")||r.includes("userrejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")||r.includes("action_rejected")||r.includes("rejected by user"))return"Transaction was cancelled.";if(r.includes("insufficientfunds")||r.includes("insufficient funds")||r.includes("exceeds the balance of the account")||r.includes("insufficient balance for transfer")){let i=a?` on ${a}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return r.includes("transaction underpriced")||r.includes("replacement transaction underpriced")||r.includes("fee too low")?"Gas fee was too low for the network. Please try again.":r.includes("nonce too low")||r.includes("nonce has already been used")||r.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":r.includes("execution reverted")||r.includes("contractfunctionrevertederror")||r.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":r.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":r.includes("http request failed")||r.includes("failed to fetch")||r.includes("network request failed")||r.includes("timeout")||r.includes("econnreset")||r.includes("rpc error")||r.includes("429")?"Network connection failed. Check your internet and try again.":r.includes("estimategas")||r.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":pw(e)||n}var uw=2000000000n,fw=1000000000n;async function ji(e,t,n){let r=new AbortController,o=setTimeout(()=>r.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:r.signal}).finally(()=>clearTimeout(o));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let i=await a.json();if(i.error)throw new Error(`RPC ${t}: ${i.error.message}`);if(i.result===void 0)throw new Error(`RPC ${t}: empty result`);return i.result}function Wi(e){return BigInt(e)}function mw(e){return`0x${e.toString(16)}`}function gw(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=mw(e.value)),e.data&&(t.data=e.data),t}function hw(e){return e===56||e===97}async function Op(e){try{let t=await ji(e,"eth_gasPrice",[]);return{gasPrice:Wi(t)}}catch{return{gasPrice:uw}}}async function bw(e,t){let n=fw;try{let r=await ji(e,"eth_maxPriorityFeePerGas",[]);n=Wi(r)}catch{}return{maxFeePerGas:t+n,maxPriorityFeePerGas:n}}async function ww(e,t){if(t)return Op(e);let n;try{n=(await ji(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return n?bw(e,Wi(n)):Op(e)}async function Bp(e,t){let n=hw(t.chainId),r=gw(t),[o,a]=await Promise.all([ji(e,"eth_estimateGas",[r]),ww(e,n)]);return{gasLimit:Wi(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function zp(e){let{estimateGas:t,sendTransaction:n,getTransactionReceipt:r}=e;return{canSend:!!n,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return Bp(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!n)throw new Error("Sending is not available for this wallet.");return n(o)},getTransactionReceipt:r}}var yw=1500,xw=120;function Fp(e){return!!(e.token||e.recipient||e.amount)}function td({recipient:e,amount:t,token:n,balanceRaw:r}){let o={},a=e.trim(),i=Pr(t,n.quantity.decimals),s;return a?vr(a)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in i?o.amount=i.error:(s=i.value,s>r&&(o.amount="Amount exceeds available balance.")),!Qr(n)&&!vr(n.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&vr(a)?a:void 0}}function nd({token:e,walletAddress:t,recipient:n,rawAmount:r}){let o=t;return Qr(e)?{to:n,value:r,chainId:e.chainId,from:o}:{to:Ca(e.address),data:Jl(n,r),value:0n,chainId:e.chainId,from:o}}function vw(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var kw=e=>new Promise(t=>setTimeout(t,e));async function Up({repository:e,args:t,chainId:n,onSubmitted:r,pollIntervalMs:o=yw,pollMaxAttempts:a=xw}){let i=await e.sendTransaction(t);r(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:n}).catch(()=>null);if(d)return vw(d)?"reverted":"success";await kw(o)}return"timeout"}var jp=["token","recipient","amount","review"];function Wp(e){let{env:t,walletAddress:n,accountName:r,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:g,getTokenPriceUsd:u,onSubmitted:m,onSuccess:y,onFailed:w,onExit:f,onOutlink:c}=e,h=pe.useMemo(()=>zp({sendTransaction:d,getTransactionReceipt:p,estimateGas:g}),[d,p,g]),[b,x]=pe.useState(i);pe.useEffect(()=>{x(i)},[i.address,i.chainId]);let[k,R]=pe.useState(a),[S,C]=pe.useState(""),[N,E]=pe.useState(""),[A,B]=pe.useState({}),[L,U]=pe.useState("idle"),[M,F]=pe.useState(""),[ne,ee]=pe.useState(""),[X,W]=pe.useState(null),[Y,O]=pe.useState(!1),[G,te]=pe.useState(""),_=pe.useRef(0),[ae,be]=pe.useState(null),[Me,le]=pe.useState(""),[ge,me]=pe.useState(()=>Yo(n)),Ke=pe.useRef(new Set),ke=pe.useCallback((j,ue)=>{Ke.current.has(j)||(Ke.current.add(j),Ye("send",j,ue))},[]);pe.useEffect(()=>{ke("opened"),a!=="token"&&ke("token_selected",{tags:{item_id:i.symbol}})},[ke,a,i.symbol]);let Qe=pe.useMemo(()=>at(t),[t]),{transactionUrl:pt,chainInfo:De}=ka(Qe,b.chainId,M||void 0,!0),Ue=bo(b.chainId,Qe),Be=Ue.nativeSymbol??De?.currency_symbol??"",St=Ue.name??De?.name??`Chain ID ${b.chainId}`,Ht=pe.useRef({nativeSymbol:Be||void 0,networkName:St,tokenSymbol:b.symbol});Ht.current={nativeSymbol:Be||void 0,networkName:St,tokenSymbol:b.symbol};let ut=pe.useMemo(()=>BigInt(b.quantity.numeric||"0"),[b.quantity.numeric]),Tt=pe.useMemo(()=>Dr(b.quantity.numeric,b.quantity.decimals),[b.quantity.numeric,b.quantity.decimals]),vt=u?.(b),_t=pe.useMemo(()=>{if(vt===void 0)return;let j=parseFloat(N.replace(/,/g,""));return Number.isFinite(j)?j*vt:0},[N,vt]);pe.useEffect(()=>{E(""),B({})},[b.address,b.chainId]),pe.useEffect(()=>{_.current+=1,W(null),te(""),O(!1)},[b.address,b.chainId,S,N]),pe.useEffect(()=>{me(Yo(n))},[n]);let kt=pe.useCallback(j=>{C(j),B(ue=>({...ue,recipient:void 0}))},[]),it=pe.useCallback(j=>{E(j),B(ue=>({...ue,amount:void 0}))},[]),It=pe.useCallback(()=>{E(Tt.replace(/,/g,"")),B(j=>({...j,amount:void 0}))},[Tt]),et=pe.useCallback(j=>{x(j),l?.(j),ke("token_selected",{tags:{item_id:j.symbol}}),R("recipient")},[l,ke]),qt=pe.useCallback(()=>R("token"),[]),st=pe.useCallback(()=>{R(j=>{if(j==="result")return"review";if(j===a)return f?.(),j;let ue=jp.indexOf(j);return ue<=0?(f?.(),j):jp[ue-1]})},[a,f]),nn=pe.useCallback(()=>{let{errors:j}=td({recipient:S,amount:"1",token:b,balanceRaw:ut});if(j.recipient){B(ue=>({...ue,recipient:j.recipient}));return}B(ue=>({...ue,recipient:void 0})),ke("recipient_entered"),R("amount")},[S,b,ut,ke]),_e=pe.useCallback(j=>{C(j),B(ue=>({...ue,recipient:void 0})),ke("recipient_entered"),R("amount")},[ke]),ot=pe.useCallback(()=>{let j=td({recipient:S,amount:N,token:b,balanceRaw:ut});B(j.errors),!(Fp(j.errors)||j.rawAmount===void 0||!j.recipient)&&(be(j.rawAmount),le(j.recipient),W(null),te(""),U("idle"),ke("amount_entered"),R("review"))},[S,N,b,ut,ke]);pe.useEffect(()=>{if(k!=="review"||!Me||ae===null||X!==null||Y||G||!h.canEstimateGas(De?.rpc))return;let j=++_.current;O(!0),te(""),(async()=>{try{let ue=nd({token:b,walletAddress:n,recipient:Me,rawAmount:ae}),he=await h.estimateGas(ue,De?.rpc);if(_.current!==j)return;W(he)}catch(ue){if(_.current!==j)return;te(ed(ue,Ht.current,"Failed to estimate gas."))}finally{_.current===j&&O(!1)}})()},[k,Me,ae,X,Y,G,h,De?.rpc,b,n]);let Ze=pe.useMemo(()=>{if(!Qr(b)||!X||ae===null)return!1;let j=Fi(X,Bi(b.chainId));return j===null?!1:ae+j>ut},[b,X,ae,ut]),Ct=pe.useCallback(async()=>{if(!(!Me||ae===null)&&!Ze){ee(""),F(""),U("submitting"),ke("submitted");try{let j="",ue=await Up({repository:h,args:nd({token:b,walletAddress:n,recipient:Me,rawAmount:ae}),chainId:b.chainId,onSubmitted:he=>{j=he,F(he),U("confirming"),me(Zl(n,Me)),m?.({txHash:he,chainId:b.chainId,amount:N,tokenSymbol:b.symbol,recipient:Me})}});if(ue==="success")U("success"),ke("confirmed"),j&&y?y?.(j):R("result");else if(ue==="reverted"){let he="Transaction reverted on-chain.";U("error"),ee(he),ke("confirmed",{status:"failure",reason:Dn(new Error(he))}),j&&w?w({txHash:j,chainId:b.chainId,message:he}):R("result")}else{let he="Transaction receipt was not found. Please check again later.";U("error"),ee(he),ke("confirmed",{status:"failure",reason:"timeout"}),j&&w?w({txHash:j,chainId:b.chainId,message:he}):R("result")}}catch(j){U("error"),ke("confirmed",{status:"failure",reason:Dn(j)}),ee(ed(j,{nativeSymbol:Be||void 0,networkName:St,tokenSymbol:b.symbol})),R("result")}}},[h,Me,ae,Ze,b,N,n,m,y,w,Be,St,ke]),[bt,Ve]=pe.useState(!1),Yt=pe.useRef(void 0);pe.useEffect(()=>()=>clearTimeout(Yt.current),[]);let Kt=pe.useCallback(async()=>{if(M)try{await navigator.clipboard.writeText(M),Ve(!0),clearTimeout(Yt.current),Yt.current=setTimeout(()=>Ve(!1),2e3)}catch{}},[M]),Bt=pe.useCallback(()=>{if(!pt||!M)return;let j=Ie=>{typeof window<"u"&&window.open(Ie,"_blank","noopener,noreferrer")};if(!c){j(pt);return}let ue=c(pt,{category:"send",origin:"send-transaction",payload:{chainId:b.chainId,txHash:M}});if(ue&&typeof ue.then=="function"){let Ie=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ue.then(tt=>{if(tt===null){Ie?.close();return}let zt=tt??pt;if(Ie)try{Ie.location.href=zt}catch{Ie.close(),j(zt)}else j(zt)});return}let he=ue;he!==null&&j(he??pt)},[c,b.chainId,pt,M]),Zt=pe.useCallback(()=>{ee(""),F(""),U("idle"),W(null),te(""),Ke.current.delete("submitted"),Ke.current.delete("confirmed"),R("review")},[]);return{step:k,status:L,token:b,tokens:s.length>0?s:[b],recipient:S,amount:N,amountUsd:_t,fieldErrors:A,error:ne,txHash:M,gasEstimate:X,gasLoading:Y,gasError:G,insufficientGas:Ze,reviewRawAmount:ae,reviewRecipient:Me,recentAddresses:ge,accounts:o,accountName:r,walletAddress:n,resolvedEnv:Qe,transactionUrl:pt,networkName:St,nativeSymbol:Be,nativeDecimals:De?.currency_decimals??b.quantity.decimals,balanceRaw:ut,balanceText:Tt,priceUsd:vt,canSelectToken:(s.length>0?s:[b]).length>1,canSend:h.canSend,getTokenPriceUsd:u,setRecipient:kt,setAmount:it,setMax:It,selectToken:et,goToTokenSelect:qt,selectRecipient:_e,submitRecipient:nn,submitAmount:ot,confirmSend:Ct,retry:Zt,back:st,hashCopied:bt,copyHash:Kt,openTransaction:Bt}}import*as ir from"react";import{jsx as Ra,jsxs as rd}from"react/jsx-runtime";function Gp({flow:e}){let{amount:t,setAmount:n,amountUsd:r,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=ir.useRef(null),d=ir.useCallback(()=>{requestAnimationFrame(()=>{let w=l.current;if(!w)return;let f=w.value.length;w.setSelectionRange(f,f)})},[]);ir.useEffect(()=>{l.current?.focus(),d()},[d]),ir.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let p=ir.useMemo(()=>{let w=Pr(t,i.quantity.decimals);return"value"in w&&w.value>a},[t,i.quantity.decimals,a]),[g,u]=ir.useState(!1),m=!g&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return Ra("div",{className:"sf-body sf-amount",children:rd("div",{className:"sf-amount-center",children:[Ra("span",{className:"sf-amount-usd",children:r!==void 0?Ui(r):"\xA0"}),Ra("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:Ra("input",{ref:l,className:"sf-amount-input",value:m,onChange:w=>{let f=w.target.value;if(g)n(f);else if(t===""){if(f.length<4)return;u(!0);let c=f.startsWith("0.00")?f.slice(4):f;n(c)}else u(!0),n(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),rd("div",{className:"sf-amount-balance",children:[Ra("span",{children:"Balance:"}),rd("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}import*as dr from"react";var Rw=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function od(e){return Rw.has(e.toLowerCase())}var Nw="0x0000000000000000000000000000000000000001",Sw={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},Tw={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function Gi(e){let t=Rt[e];return[{chainId:t.cross,address:Nw},{chainId:t.bsc,address:Sw[e]},{chainId:t.cross,address:Tw[e]}].map(({chainId:n,address:r})=>({chainId:n,address:r.toLowerCase()}))}var Hp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function Na(e,t){let n=Rt[e];if(t===n.cross)return Hp.cross;if(t===n.bsc)return Hp.bsc}var Iw={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Or(e,t,n={}){if(!t||!t.startsWith("0x"))return;let{size:r=120,bg:o,format:a="png"}=n,i=Iw[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${r}${s}`}import{jsx as Hn,jsxs as Hi}from"react/jsx-runtime";function _p({size:e=20,className:t}){return Hi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),Hn("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Vp({size:e=20,className:t}){return Hn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:Hn("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2M12 11v6M9 14h6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Qp({size:e=20,className:t}){return Hi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),Hn("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function qp({size:e=16,className:t}){return Hn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:Hn("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Yp({size:e=56,className:t}){return Hi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),Hn("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Kp({size:e=56,className:t}){return Hi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Hn("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),Hn("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import*as sr from"react";var Ew=240;function _i(e,t,n,r=[]){let o=sr.useRef(null),[a,i]=sr.useState(null),[s,l]=sr.useState(null),d=sr.useCallback(g=>{g!==e&&(l(n.indexOf(g)>n.indexOf(e)?"from-right":"from-left"),t(g))},[e,t,n]);sr.useEffect(()=>{if(!s)return;let g=window.setTimeout(()=>l(null),Ew+60);return()=>window.clearTimeout(g)},[s,e]),sr.useLayoutEffect(()=>{let g=o.current;if(!g)return;let u=()=>{let y=g.querySelector("[data-active]");y&&i({left:y.offsetLeft+4,width:Math.max(y.offsetWidth-8,0)})};if(u(),typeof ResizeObserver>"u")return;let m=new ResizeObserver(u);return m.observe(g),g.querySelectorAll('[role="tab"]').forEach(y=>m.observe(y)),()=>m.disconnect()},[e,...r]);let p=a?{width:a.width,transform:`translateX(${a.left}px)`}:void 0;return{tabsRef:o,indicatorStyle:p,slide:s,select:d}}import{jsx as wt,jsxs as lr}from"react/jsx-runtime";var Aw=["recent","account"];function Zp(e,t){return e.name||`Account ${(e.index??t)+1}`}function Xp(e){return e.trim().slice(0,1).toUpperCase()||"A"}function Jp(e){return e.toLowerCase()}function $p({flow:e}){let{recipient:t,setRecipient:n,fieldErrors:r,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=dr.useMemo(()=>a.filter(S=>S.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,g=dr.useMemo(()=>new Map(d.map((S,C)=>[Jp(S.address),{account:S,index:C}])),[d]),[u,m]=dr.useState("recent"),{tabsRef:y,indicatorStyle:w,slide:f,select:c}=_i(u,m,Aw,[p]),h=dr.useRef(null);dr.useEffect(()=>{h.current?.focus()},[]);let b="1A1A2E",x=dr.useCallback(async()=>{try{let S=await navigator.clipboard.readText();S&&n(S.trim())}catch{}},[n]),k=t.trim().length>0,R=vr(t.trim());return lr("div",{className:"sf-recipient",children:[lr("div",{className:"sf-recipient-top",children:[lr("div",{className:"sf-address-field","data-filled":k||void 0,"data-invalid":r.recipient||void 0,children:[wt("textarea",{ref:h,className:"sf-address-input",value:t,onChange:S=>n(S.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:k?2:1}),k?wt("button",{type:"button",className:"sf-address-action",onClick:()=>n(""),"aria-label":"Clear","data-track":"recipient_clear",children:wt(Qp,{size:20})}):wt("button",{type:"button",className:"sf-address-action",onClick:x,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:wt(Vp,{size:20})})]}),r.recipient&&wt("p",{className:"sf-field-error",role:"alert",children:r.recipient}),lr("div",{ref:y,className:"sf-tabs",role:"tablist",children:[wt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>c("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&wt("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>c("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"}),w&&wt("span",{className:"sf-tab-indicator","aria-hidden":!0,"data-animate":f?!0:void 0,style:w})]})]}),wt("div",{className:"sf-address-list","data-tab-slide":f??void 0,children:u==="account"&&p?d.map((S,C)=>{let N=Zp(S,C),E=Or(s,S.address,{size:56,bg:b});return lr("button",{type:"button",className:"sf-address-row",onClick:()=>l(S.address),"data-track":"recipient_item",children:[lr("span",{className:"sf-address-avatar",children:[E&&wt("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),wt("span",{className:"sf-address-avatar-fallback",children:Xp(N)})]}),lr("span",{className:"sf-address-meta",children:[wt("span",{className:"sf-address-name",children:N}),wt("span",{className:"sf-address-value",children:Xt(S.address)})]})]},S.address)}):o.length>0?o.map(S=>{let C=g.get(Jp(S.address)),N=C?Zp(C.account,C.index):Xt(S.address),E=Or(s,S.address,{size:56,bg:b});return lr("button",{type:"button",className:"sf-address-row",onClick:()=>l(S.address),"data-track":"recipient_item",children:[lr("span",{className:"sf-address-avatar",children:[E&&wt("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),wt("span",{className:"sf-address-avatar-fallback",children:Xp(N)})]}),lr("span",{className:"sf-address-meta",children:[wt("span",{className:"sf-address-name",children:N}),wt("span",{className:"sf-address-value",children:Xt(S.address)})]})]},S.address)}):lr("div",{className:"sf-history-empty",role:"status",children:[wt("span",{className:"sf-history-empty-icon","aria-hidden":!0,children:wt("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:wt("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5M12 7v5l4 2"})})}),wt("p",{className:"sf-history-empty-title",children:"No send history"}),wt("p",{className:"sf-history-empty-desc",children:"Addresses you send to will appear here."})]})},u),k&&!R&&!r.recipient&&wt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as bn,jsxs as Zo}from"react/jsx-runtime";function tu({flow:e}){let{status:t,txHash:n,error:r,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?Zo("div",{className:"sf-body sf-result sf-result--error",children:[bn("span",{className:"sf-result-icon",children:bn(Kp,{size:56})}),Zo("div",{className:"sf-result-copy",children:[bn("h3",{className:"sf-result-title",children:"Transaction Failed"}),bn("p",{className:"sf-result-desc",children:r||"Something went wrong. Please try again."})]}),n&&bn(eu,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]}):Zo("div",{className:"sf-body sf-result",children:[bn("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?bn(Yp,{size:56}):bn("span",{className:"sf-result-spinner"})}),Zo("div",{className:"sf-result-copy",children:[bn("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),bn("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),n&&bn(eu,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]})}function eu({txHash:e,hashCopied:t,onCopy:n,onOpen:r}){return Zo("div",{className:"sf-result-hash-card",children:[bn("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),Zo("div",{className:"sf-result-hash-row",children:[bn("button",{type:"button",className:"sf-result-hash-link",onClick:r,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:Xt(e)}),bn("button",{type:"button",className:"sf-result-copy-btn",onClick:n,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?bn(ar,{size:16}):"Copy"})]})]})}import{jsx as Mt,jsxs as wn}from"react/jsx-runtime";var Vi="\u2014";function nu({flow:e}){let{token:t,reviewRawAmount:n,reviewRecipient:r,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:g,gasError:u,insufficientGas:m,error:y,resolvedEnv:w}=e,f=Qr(t),c=n!==null?kr(n,t.quantity.decimals):"",h=o?.trim()||`Account ${(a[0]?.index??0)+1}`,b=Or(w,i,{size:56,bg:"1A1A2E"}),x=l||(f?t.symbol:""),k=Bi(t.chainId),R=p?Dp(p,k):null,S=p?Fi(p,k):null,C=L=>L!==null&&x?`${$l(L,d)} ${x}`:Vi,N=L=>L!==void 0?`${Mp(L)} Gwei`:Vi,E=(()=>{if(!f||!p||S===null||n===null)return Vi;let L=n+S;return`${$l(L,d)} ${x||t.symbol}`})(),A=L=>g?"\u2026":L,B=[{label:"Est. Tx Fee",value:A(C(S))},...R==="dynamic"?[{label:"Max Priority Fee",value:A(N(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:A(N(p?.maxFeePerGas))}]:R==="legacy"?[{label:"Gas Price",value:A(N(p?zi(p):void 0))}]:[],{label:"Gas Limit",value:A(p?Lp(p.gasLimit):Vi)}];return wn("div",{className:"sf-body sf-review",children:[wn("div",{className:"sf-review-amount",children:[Mt("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:L=>{L.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),wn("span",{className:"sf-review-amount-value",children:[c,Mt("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),wn("div",{className:"sf-review-parties",children:[wn("div",{className:"sf-review-card sf-review-party",children:[Mt("span",{className:"sf-review-party-label",children:"From"}),wn("div",{className:"sf-review-party-head",children:[Mt("span",{className:"sf-review-party-avatar",children:b&&Mt("img",{src:b,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),Mt("span",{className:"sf-review-party-name",children:h})]}),Mt("span",{className:"sf-review-party-addr",children:i})]}),Mt("span",{className:"sf-review-arrow","aria-hidden":!0,children:Mt(qp,{size:16})}),wn("div",{className:"sf-review-card sf-review-party",children:[Mt("span",{className:"sf-review-party-label",children:"To"}),Mt("span",{className:"sf-review-party-addr",children:r})]})]}),wn("section",{className:"sf-review-card",children:[Mt("h3",{className:"sf-review-section-title",children:"Summary"}),wn("div",{className:"sf-review-row",children:[Mt("span",{className:"sf-review-row-label",children:"Network"}),Mt("span",{className:"sf-review-row-value",children:s})]}),B.map(L=>wn("div",{className:"sf-review-row",children:[Mt("span",{className:"sf-review-row-label",children:L.label}),Mt("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),wn("section",{className:"sf-review-card",children:[Mt("h3",{className:"sf-review-section-title",children:"Total"}),wn("div",{className:"sf-review-row",children:[Mt("span",{className:"sf-review-row-label",children:"Total Amount"}),wn("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),f&&wn("div",{className:"sf-review-row",children:[Mt("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),Mt("span",{className:"sf-review-row-value",children:A(E)})]})]}),m&&!u&&!y&&wn("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",x||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||y)&&Mt("div",{className:"sf-message sf-message--error",role:"alert",children:u||y})]})}import*as Qi from"react";import{jsx as qr,jsxs as ko}from"react/jsx-runtime";function ru({flow:e}){let[t,n]=Qi.useState(""),r=t.trim().toLowerCase(),o=Qi.useMemo(()=>r?e.tokens.filter(a=>a.symbol.toLowerCase().includes(r)||a.name.toLowerCase().includes(r)):e.tokens,[e.tokens,r]);return ko("div",{className:"sf-body sf-token-select",children:[ko("div",{className:"sf-search",children:[qr(_p,{size:20}),qr("input",{className:"sf-search-input",value:t,onChange:a=>n(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),ko("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=Na(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return ko("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[ko("span",{className:"sf-token-left",children:[ko("span",{className:"sf-token-icon-wrap",children:[qr("img",{className:"sf-token-icon",src:a.icon_url,alt:"",width:40,height:40,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),s&&qr("img",{className:"sf-token-chain-badge",src:s,alt:"","aria-hidden":!0,width:16,height:16,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.style.display="none"}})]}),qr("span",{className:"sf-token-name",children:a.symbol})]}),ko("span",{className:"sf-token-right",children:[qr("span",{className:"sf-token-balance",children:Dr(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&qr("span",{className:"sf-token-price",children:Ui(l)})]})]},i)}),o.length===0&&qr("div",{className:"sf-empty",children:"No tokens found"})]})]})}ce(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-history-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.sf-history-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-history-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-history-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.sf-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{position:relative;display:flex;gap:20px;margin:16px 0 0}.sf-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-content-highest, #000000)}.sf-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--ds-content-highest, #000000);pointer-events:none}.sf-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-right]{animation:sf-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-left]{animation:sf-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes sf-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes sf-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.sf-tab-indicator[data-animate]{transition:none}.sf-address-list[data-tab-slide]{animation:none}}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #7346f3);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #7346f3)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
|
|
7
|
+
`);import{jsx as Jt,jsxs as qi}from"react/jsx-runtime";var Mw={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function Yi({onClose:e,onBackToWallet:t,onConfirmSuccess:n,onSuccess:r,className:o,...a}){let i=ou.useCallback(c=>{r?.(c),n?.(c)},[n,r]),l=Wp({...a,onSuccess:r||n?i:void 0,onExit:t}),{step:d,status:p}=l,g=vr(l.recipient.trim()),u=Pr(l.amount,l.token.quantity.decimals),m="value"in u&&u.value<=l.balanceRaw,y=p==="submitting"||p==="confirming",w=d!=="result",f=Mw[d]??"";return Jt(xe,{feature:"send",children:qi("div",{className:ye("sf-root",o),"data-step":d,children:[qi("header",{className:"sf-header",children:[w?Jt("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:Jt(On,{size:24})}):Jt("span",{className:"sf-header-btn","aria-hidden":!0}),Jt("span",{className:"sf-header-title",children:f}),Jt("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close","data-wi-close":!0,children:Jt(hn,{size:24})})]}),d==="token"&&Jt(ru,{flow:l}),d==="recipient"&&Jt($p,{flow:l}),d==="amount"&&Jt(Gp,{flow:l}),d==="review"&&Jt(nu,{flow:l}),d==="result"&&Jt(tu,{flow:l}),qi("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitRecipient,"data-disabled":!g||void 0,"aria-disabled":!g,"data-track":"recipient_next",children:"Next"}),d==="amount"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!m||void 0,"aria-disabled":!m,"data-track":"amount_next",children:"Next"}),d==="review"&&qi("div",{className:"sf-footer-row",children:[Jt("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:y,"data-track":"review_cancel",children:"Cancel"}),Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:y||!l.canSend||l.insufficientGas,"data-track":"review_send",children:y?"Sending...":"Send"})]}),d==="result"&&p==="success"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>n?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&Jt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}function Ki({env:e,theme:t="dark",showBalance:n=!1,showForgeToken:r=!1,showGameToken:o=!0,showQR:a=!0,showBridge:i=!0,showNft:s=!1,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:g,profileImageUrl:u,connectorId:m,connectorName:y,connectorIconUrl:w,preferredTokens:f=[],onSelectWallet:c,onCopyAddress:h,onBuy:b,onBuyDisabledMessage:x,onBridgeDisabledMessage:k,onSendDisabledMessage:R,onDisconnect:S,disconnectLabel:C="Disconnect",termsUrl:N=Di,termsLabel:E="Terms of Service",privacyUrl:A=Pi,privacyLabel:B="Privacy Policy",showPortfolio:L=!1,showOnePop:U=!1,onePopSummary:M,onOnePopOpen:F,onOnePopSend:ne,onOnePopClaim:ee,onOnePopActivity:X,onOnePopRepliesSeen:W,onePopGetTokenSlot:Y,onePopLogoSrc:O,onePopHeroSrc:G,portfolioTitle:te="My Portfolio",portfolioSections:_,showTotalAssets:ae=!0,totalAssetsLabel:be="Total Assets USD",sendTransaction:Me,getTransactionReceipt:le,estimateGas:ge,onOutlink:me,lpBalanceReader:Ke,stakingRewardsReader:ke,bridgeTokens:Qe,bridgeHistory:pt,getBridgeQuote:De,getBridgeToTokens:Ue,getBridgeApproval:Be,approveBridge:St,submitBridge:Ht,onReceive:ut,onBridge:Tt,onSend:vt,style:_t},{presentation:kt,open:it,isMobile:It,drawerDirection:et,modal:qt,close:st}){let nn=at(e),_e=m?Ai[m]:void 0,ot=y??_e?.name,Ze=w??_e?.iconUrl,[Ct,bt]=rn.useState(null),[Ve,Yt]=rn.useState("top"),[Kt,Bt]=rn.useState(null),[Zt,j]=rn.useState("wallet"),[ue,he]=rn.useState(null),[Ie,tt]=rn.useState(null),[zt,Et]=rn.useState(null),[Cn,Rn]=rn.useState(null),P=rn.useCallback(()=>{j("wallet"),he(null),tt(null),Et(null),Rn(null)},[]);rn.useEffect(()=>{it||P()},[it,P]);let Ce=st??P;rn.useEffect(()=>{Wo(d)},[d]);let je=rn.useCallback(()=>{Xl(d),S?.()},[S,d]);return rn.useMemo(()=>({presentation:kt,env:nn,theme:t,isMobile:It,open:it,drawerDirection:et,modal:qt,showBalance:n,showForgeToken:r,showGameToken:o,showQR:a,showBridge:i,showNft:s,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:g,profileImageUrl:u,connectorName:ot,connectorIconUrl:Ze,preferredTokens:f,close:Ce,onSelectWallet:c,onCopyAddress:h,onBuy:b,onBuyDisabledMessage:x,onBridgeDisabledMessage:k,onSendDisabledMessage:R,onDisconnect:S?je:void 0,disconnectLabel:C,termsUrl:N,termsLabel:E,privacyUrl:A,privacyLabel:B,portalStyle:_t,navContent:Ct,navPosition:Ve,setNavContent:bt,setNavPosition:Yt,footerContent:Kt,setFooterContent:Bt,view:Zt,setView:j,selectedSendToken:ue,setSelectedSendToken:he,selectedDetailToken:Ie,setSelectedDetailToken:tt,selectedNftCollection:zt,setSelectedNftCollection:Et,selectedNft:Cn,setSelectedNft:Rn,showPortfolio:L,showOnePop:U,onePopSummary:M,onOnePopOpen:F,onOnePopSend:ne,onOnePopClaim:ee,onOnePopActivity:X,onOnePopRepliesSeen:W,onePopGetTokenSlot:Y,onePopLogoSrc:O,onePopHeroSrc:G,portfolioTitle:te,portfolioSections:_,showTotalAssets:ae,totalAssetsLabel:be,sendTransaction:Me,getTransactionReceipt:le,estimateGas:ge,onOutlink:me,lpBalanceReader:Ke,stakingRewardsReader:ke,bridgeTokens:Qe,bridgeHistory:pt,getBridgeQuote:De,getBridgeToTokens:Ue,getBridgeApproval:Be,approveBridge:St,submitBridge:Ht,onReceive:ut,onBridge:Tt,onSend:vt}),[kt,nn,t,It,it,et,qt,n,r,o,a,i,s,l,d,p,g,u,ot,Ze,f,Ce,c,h,b,x,k,R,S,je,C,N,E,A,B,_t,Ct,Ve,Kt,Zt,ue,Ie,zt,Cn,L,U,M,F,ne,ee,X,W,Y,O,G,te,_,ae,be,Me,le,ge,me,Ke,ke,Qe,pt,De,Ue,Be,St,Ht,ut,Tt,vt])}import*as au from"@radix-ui/react-popover";import{Drawer as Lw}from"vaul";import{jsx as Zi,jsxs as Dw}from"react/jsx-runtime";function iu({asChild:e,className:t,children:n}){let{isMobile:r,theme:o,walletAddress:a}=_r(),i=n!=null,s=e??!0,l=i?n:Dw("button",{type:"button",className:ye("wi-trigger-btn",t),"data-theme":o,"data-mobile":r||void 0,children:[Zi(pp,{size:r?14:16}),Zi("span",{className:"wi-trigger-address",children:Xt(a)})]});return r?Zi(Lw.Trigger,{asChild:s,children:l}):Zi(au.Trigger,{asChild:s,children:l})}import*as Q from"react";import*as Ds from"@radix-ui/react-popover";import{Drawer as Ls}from"vaul";import kg from"bignumber.js";import ad from"bignumber.js";var Pw=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function gt(e){if(e==null)return null;if(e instanceof ad)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new ad(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Pw.test(t))return null;let n=new ad(t);return n.isFinite()?n:null}import{useQueries as Ow}from"@tanstack/react-query";import{useMemo as Bw}from"react";import*as Xi from"react";function su(e){if(!e||typeof e!="object")return;let t=[],n=new Set,r=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!jc(a)){r.push(a);continue}let s=Wc(a);if(s===void 0){o.push(a);continue}n.has(s)||(n.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:r,skippedMalformed:o}}var lu=new Set;function du(e,t){lu.has(e)||(lu.add(e),console.warn(t))}function cu(e){let t=Ut(Fo,e,Xi.useCallback(r=>{let o=su(r?.chains);if(o)return o.skippedNonEvm.length>0&&du(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&du(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),n=Xi.useMemo(()=>ql(e),[e]);return t??n}var id="user-balance";async function zw(e,t,n,r){let o=new URLSearchParams({networkId:t,account:n}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:r});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Yr(e,t,n=!0){let r=cu(e),o=Ow({queries:r.map(l=>({queryKey:[id,e,t,l],queryFn:async({signal:d})=>zw(await Se("walletServer",e),l,t,d),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:Bw(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}import{useQuery as Fw,useQueries as Uw}from"@tanstack/react-query";import{useMemo as jw}from"react";var Ww="forge-holdings",Gw="forge-token-image";async function Hw(e,t,n){let r=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:n});if(!r.ok)throw new Error(`Failed to fetch forge holdings: ${r.status}`);let o=await r.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function _w(e,t,n){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:n});if(!r.ok)return{address:t,image_url:""};let o=await r.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function pu(e,t,n=!0){let{data:r,...o}=Fw({queryKey:[Ww,e,t],queryFn:async({signal:a})=>Hw(await Se("bondingCurve",e),t,a),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1});return{holdings:r??[],...o}}function uu(e,t,n=!0){let r=Uw({queries:t.map(a=>({queryKey:[Gw,e,a],queryFn:async({signal:i})=>_w(await Se("bondingCurve",e),a,i),enabled:n,staleTime:1/0}))});return{imageMap:jw(()=>{let a=new Map;for(let i of r)i.data&&a.set(i.data.address,i.data.image_url);return a},[r])}}import{useQuery as Vw}from"@tanstack/react-query";import{useMemo as Qw}from"react";var sd="token-stats";function Cr(e,t){return`${e}:${t.toLowerCase()}`}function Kr(e,t=!0){let{data:n,...r}=Vw({queryKey:[sd,e],queryFn:async({signal:a})=>{let i=await Se("walletServer",e),s=await fetch(`${i}/v1/public/token/stats`,{cache:"no-store",signal:a});if(!s.ok)throw new Error(`Failed to fetch token stats: ${s.status}`);let l=await s.json();if(l.code!==200)throw new Error(`Token stats API error: ${l.code}`);return l},enabled:t,staleTime:3e4});return{statsMap:Qw(()=>{let a=new Map;if(!n?.data)return a;for(let i of n.data){let s=Cr(i.chain_id,i.address);a.set(s,i)}return a},[n]),...r}}import{useQuery as qw}from"@tanstack/react-query";var Yw="crossd-apr",fu=6e4,Kw="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Ji,Sa;function ld(){return Ji&&Ji.expiresAt>Date.now()?Promise.resolve(Ji.value):Sa||(Sa=(async()=>{let e=await fetch(Kw,{cache:"no-store"});if(!e.ok)throw new Error(`Failed to fetch CROSSD overview: ${e.status}`);let t=await e.json();if(t.code!==200)throw new Error(`CROSSD overview API error: ${t.code}`);let n=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(n))throw new Error("CROSSD overview returned a non-numeric APR");let r=n*100;return Ji={value:r,expiresAt:Date.now()+fu},r})().finally(()=>{Sa=void 0}),Sa)}function $i(e){let t=Math.abs(e),n=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${n}%`}function mu(){let{data:e,...t}=qw({queryKey:[Yw],queryFn:ld,staleTime:fu});return{aprPercent:e??null,...t}}import{useQuery as Zw}from"@tanstack/react-query";import{useMemo as gu}from"react";var Xw="token-info";function es(e,t){return`${t.toLowerCase()}_${e}`}function hu(e,t=!0){let{data:n,...r}=Zw({queryKey:[Xw,e],queryFn:async({signal:i})=>{let s=await Se("walletServer",e),l=await fetch(`${s}/v1/public/token/info`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch token info: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token info API error: ${d.code}`);return d},enabled:t,staleTime:1/0}),o=gu(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data){let l=es(s.chain_id,s.address);i.set(l,s.category)}return i},[n]),a=gu(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data)i.set(es(s.chain_id,s.address),s);return i},[n]);return{categoryMap:o,infoMap:a,...r}}import{useMemo as Jw}from"react";import $w from"bignumber.js";function bu(e,t,n){let{tokens:r,isLoading:o}=Yr(e,t,n),{statsMap:a}=Kr(e,n);return Jw(()=>{let i=new $w(0);for(let p of r){let g=a.get(Cr(p.chainId,p.address));if(!g)continue;let u=gt(p.quantity.numeric),m=gt(g.price);if(!u||!m)continue;let y=u.shiftedBy(-p.quantity.decimals).multipliedBy(m);y.isNaN()||(i=i.plus(y))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Cp(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[r,a,o])}import yu from"bignumber.js";var e1=/^0x[0-9a-f]{40}$/i;function xu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;let{chainId:r,address:o}=n,a=bi(r);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!e1.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function t1(e){return new Map(e.map((t,n)=>[`${t.chainId}:${t.address.toLowerCase()}`,n]))}var n1=new yu("0.0001");function dd(e){return(gt(e.quantity.numeric)??new yu(0)).shiftedBy(-e.quantity.decimals)}function wu(e,t){return`${e}:${t.toLowerCase()}`}function r1(e,t){return`${t.toLowerCase()}_${e}`}function vu({env:e,tokens:t,pinnedTokens:n,preferredTokens:r,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],g=new Set;for(let f of o.values())g.add(f.chain_id);let u=g.size>0,m=t1(n??Gi(e)),y=new Map;(r??[]).forEach((f,c)=>{let h=bi(f.chainId);h!==void 0&&y.set(`${h}:${f.address.toLowerCase()}`,c)});for(let f of t){let c=`${f.chainId}:${f.address.toLowerCase()}`,h=m.has(c),b=y.get(c);if(h)s.push(f);else if(b!==void 0)d.push(f);else if(dd(f).isGreaterThanOrEqualTo(n1)){if(!i&&a.get(r1(f.chainId,f.address))==="game")continue;u&&!g.has(f.chainId)?l.push(f):p.push(f)}}s.sort((f,c)=>{let h=m.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,b=m.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return h-b}),d.sort((f,c)=>{let h=y.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,b=y.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return h-b});let w=(f,c)=>{let h=o.get(wu(f.chainId,f.address)),b=o.get(wu(c.chainId,c.address)),x=dd(f).multipliedBy(gt(h?.price)??0);return dd(c).multipliedBy(gt(b?.price)??0).minus(x).toNumber()};return l.sort(w),p.sort(w),[...s,...l,...d,...p]}import*as ts from"react";var ku=new Set;function o1(e){ku.has(e)||(ku.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function Cu(e){let t=Ut(wi,e,ts.useCallback(r=>{let o=r?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=xu(o);if(!a){o1(e);return}return a},[e])),n=ts.useMemo(()=>Gi(e),[e]);return t??n}import{QRCodeSVG as n2}from"qrcode.react";import{WALLET_LABELS as r2}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as s1}from"@nexus-cross/crossx-design-system";import{WALLET_LABELS as cd}from"@nexus-cross/crossx-design-system";import{jsx as We,jsxs as Co}from"react/jsx-runtime";var a1='<svg width="100%" height="100%" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_75048_28969)"><rect width="640" height="640" rx="100" fill="white"/><path d="M640.092 -0.18042H0.0917969V639.82H640.092V-0.18042Z" fill="#CE3E35"/><path d="M43.6074 104.484C43.6074 71.3473 70.4703 44.4844 103.607 44.4844H536.393C569.53 44.4844 596.393 71.3473 596.393 104.484V346.514H43.6074V104.484Z" fill="white"/><g filter="url(#filter0_d_75048_28969)"><path d="M639.908 639.822H0.0917969V158.676C0.0917969 136.585 18.0004 118.676 40.0918 118.676H218.544C237.426 118.676 252.868 132.846 264.251 147.912C277.196 165.045 297.355 176.058 319.999 176.058C342.644 176.058 362.803 165.045 375.748 147.912C387.131 132.846 402.573 118.676 421.455 118.676H599.908C622 118.676 639.908 136.585 639.908 158.676V639.822Z" fill="url(#paint0_linear_75048_28969)"/></g><path d="M223.621 639.503H639.909V181.499L223.621 448.166V639.503Z" fill="url(#paint1_linear_75048_28969)"/><path d="M223.645 639.819H0.0917969V212.869L223.645 449.197V639.819Z" fill="url(#paint2_linear_75048_28969)"/><g filter="url(#filter1_d_75048_28969)"><path d="M317.103 250.341L228.024 301.829C212.311 310.864 206.867 331.162 215.899 346.881C224.93 362.6 245.221 368.046 260.933 359.01L336.28 315.444L300.401 353.936V504.934C300.401 523.129 315.247 537.981 333.434 537.981C351.621 537.981 366.468 523.129 366.468 504.934V278.932C366.468 272.62 364.489 266.431 362.014 262.347C352.735 246.752 332.692 241.182 316.979 250.217L317.103 250.341Z" fill="white"/></g></g><defs><filter id="filter0_d_75048_28969" x="-19.9082" y="93.6763" width="679.816" height="561.146" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-5"/><feGaussianBlur stdDeviation="10"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><filter id="filter1_d_75048_28969" x="190.367" y="224.71" width="211.348" height="348.518" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.03953" dy="7.03953"/><feGaussianBlur stdDeviation="14.1039"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><linearGradient id="paint0_linear_75048_28969" x1="-74.0158" y1="54.6376" x2="542.251" y2="802.323" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_75048_28969" x1="159.749" y1="206.729" x2="471.286" y2="474.513" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_75048_28969" x1="399.134" y1="82.7297" x2="104.683" y2="466.123" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_75048_28969"><rect width="640" height="640" rx="100" fill="white"/></clipPath></defs></svg>',i1=`data:image/svg+xml,${encodeURIComponent(a1)}`;function ns(){return We("img",{src:i1,width:40,height:40,alt:"",style:{display:"block"}})}function Ru(){return Co("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[Co("g",{clipPath:"url(#clip0_1331_27065)",children:[We("path",{d:"M37.2488 38.4674L28.6626 35.8175L22.1876 39.8295L17.6699 39.8274L11.191 35.8175L2.60875 38.4674L-0.00195312 29.3328L2.60875 19.1947L-0.00195312 10.6234L2.60875 0L16.0192 8.30453H23.838L37.2488 0L39.8595 10.6234L37.2488 19.1947L39.8595 29.3328L37.2488 38.4674Z",fill:"#FF5C16"}),We("path",{d:"M2.60938 0L16.0201 8.31037L15.4868 14.0137L2.60938 0ZM11.1919 29.3366L17.0925 33.9956L11.1919 35.8175V29.3366ZM16.6209 21.6342L15.4868 14.0175L8.22768 19.1971L8.22374 19.195V19.1988L8.24628 24.5302L11.1899 21.6345L16.6209 21.6342ZM37.2477 0L23.837 8.31037L24.3685 14.0137L37.2477 0ZM28.6654 29.3366L22.7646 33.9956L28.6654 35.8175V29.3366ZM31.6313 19.1985V19.1947L31.6297 19.1968L24.3705 14.0175L23.2364 21.6342H28.6651L31.6108 24.5296L31.6313 19.1985Z",fill:"#FF5C16"}),We("path",{d:"M11.191 35.8175L2.60875 38.4674L-0.00195312 29.3366H11.191V35.8175ZM16.62 21.6321L18.2595 32.6435L15.9873 26.5208L8.24368 24.5296L11.189 21.6324H16.62V21.6321ZM28.6662 35.8175L37.2488 38.4674L39.8595 29.3366H28.6662V35.8175ZM23.2375 21.6321L21.598 32.6435L23.8699 26.5208L31.6138 24.5296L28.6665 21.6324H23.2375V21.6321Z",fill:"#E34807"}),We("path",{d:"M-0.00195312 29.3328L2.60875 19.1947H8.22284L8.2434 24.5278L15.9876 26.519L18.2595 32.6414L17.0916 33.9897L11.191 29.3307H-0.00195312V29.3328ZM39.8595 29.3328L37.2488 19.1947H31.6344L31.6138 24.5278L23.8702 26.519L21.598 32.6414L22.7657 33.9897L28.6665 29.3307H39.8595V29.3328ZM23.838 8.30444H16.0192L15.4882 14.0078L18.2597 32.6355H21.598L24.3713 14.0078L23.838 8.30444Z",fill:"#FF8D5D"}),We("path",{d:"M2.60875 0L-0.00195312 10.6234L2.60875 19.1947H8.22284L15.4859 14.0137L2.60875 0ZM14.9975 23.8438H12.4541L11.0693 25.2508L15.9893 26.515L14.9975 23.842V23.8438ZM37.2488 0L39.8595 10.6234L37.2488 19.1947H31.6344L24.3716 14.0137L37.2488 0ZM24.8637 23.8438H27.4107L28.7955 25.2526L23.8699 26.5191L24.8637 23.8418V23.8438ZM22.1857 36.1956L22.7659 33.9936L21.598 32.6453H18.2572L17.0896 33.9936L17.6696 36.1956",fill:"#661800"}),We("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),We("path",{d:"M11.1914 35.8131L17.672 39.8289V36.193L17.0917 33.9912L11.1914 35.8131ZM28.6649 35.8131L22.1841 39.8289V36.193L22.7644 33.9912L28.6649 35.8131Z",fill:"#E7EBF6"})]}),We("defs",{children:We("clipPath",{id:"clip0_1331_27065",children:We("rect",{width:"40",height:"40",fill:"white"})})})]})}function Nu(){return Co("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[We("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),We("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),We("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),We("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),We("path",{d:"M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z",fill:"#F3BA2F"})]})}function Su(){return Co("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[We("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),We("path",{d:"M89.1233 136.695V59.7551H118.481V140.524L74.5862 184.774L30.4787 140.524V107.55H59.9073V136.695L74.5862 151.303L89.1233 136.695Z",fill:"white"}),We("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),We("path",{d:"M199.534 59.9334C202.562 60.0484 208.427 60.4824 212.031 63.6902C215.635 66.898 216.937 71.0498 216.937 73.1199V104.017L198.767 114.828L216.937 125.561V172.713C216.937 174.511 216.405 178.276 211.034 181.377C205.664 184.477 202.613 184.969 201.758 184.827H143.949C141.879 184.904 136.712 184.182 132.602 180.686C128.493 177.19 128.462 175.216 128.462 173.515V125.561L146.173 114.828L128.462 104.017V71.1268C128.462 69.721 130.109 65.7781 133.237 63.5701C137.147 60.8101 141.112 59.9334 144.409 59.9334H199.534ZM158.3 122.264V166.221H187.033V122.264H158.3ZM158.3 107.794H187.033V78.5272H158.3V107.794Z",fill:"white"})]})}function Tu(){return Co("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Co("g",{clipPath:"url(#clip0_1185_7785)",children:[We("path",{d:"M14 28C21.75 28 28 21.75 28 14C28 6.25 21.75 0 14 0C6.25 0 0 6.25 0 14C0 21.75 6.25 28 14 28Z",fill:"#EB0029"}),We("path",{d:"M19.4975 8.36232L6 6L13.103 23L23 11.5311L19.4975 8.36232ZM19.2801 9.4034L21.3449 11.27L15.6975 12.2424L19.2801 9.4034ZM14.4714 12.0479L8.51876 7.35252L18.247 9.05524L14.4714 12.0479ZM14.0467 12.8782L13.0765 20.5098L7.84385 7.98492L14.0467 12.8782ZM14.9454 13.2835L21.1983 12.2064L14.026 20.518L14.9454 13.2835Z",fill:"white"})]}),We("defs",{children:We("clipPath",{id:"clip0_1185_7785",children:We("rect",{width:"28",height:"28",fill:"white"})})})]})}function Iu(){return Co("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[We("path",{fill:"#FFC107",d:"M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"}),We("path",{fill:"#FF3D00",d:"M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"}),We("path",{fill:"#4CAF50",d:"M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"}),We("path",{fill:"#1976D2",d:"M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"})]})}function Eu(){return We("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:We("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})})}function Au(){return We("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:We("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Ta={cross_embedded:{id:"cross_embedded",name:cd.social,description:"Sign in with Google or Apple",icon:ns},cross_wallet:{id:"cross_wallet",name:cd.app,description:"App approval is required",icon:ns,featured:!0},cross_extension:{id:"cross_extension",name:cd.extension,description:"Browser extension approval is required",icon:ns,rdns:"nexus.to.crosswallet.desktop",installUrl:"https://chromewebstore.google.com/detail/crossx/nninbdadmocnokibpaaohnoepbnpdgcg",visibility:"desktop-only"},metamask:{id:"metamask",name:"MetaMask",description:"Browser extension approval is required",icon:Ru,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:Nu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:Su,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:Tu,badge:"For SHOP"}};function pd(e){return Ta[e]}var ud={google:{id:"google",name:"Google",icon:Iu},apple:{id:"apple",name:"Apple",icon:Eu}};function Mu(e){return ud[e]}var Lu="dappui.wcm.last-selected",l1=new Set(["google","apple"]);function Du(e){try{window.localStorage.setItem(Lu,e)}catch{}}function Pu(){let e=null;try{e=window.localStorage.getItem(Lu)}catch{return}if(e)return l1.has(e)?s1.default:Ta[e]?.name}function Lt(e,t,n,r){if(!r||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=r(t,n)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,p=g=>{if(g===null){d?.close();return}let u=g??t;if(d)try{d.location.href=u}catch{d.close(),a(u)}else a(u)};o.then(p,g=>{console.error("[dapp-ui] onOutlink rejected:",g),d?.close()});return}let s=o;if(s===null)return;a(s??t)}import*as So from"react";import{Drawer as nx}from"vaul";import{createContext as u1,useContext as f1,useMemo as m1}from"react";import _n from"bignumber.js";var d1=/^(\d{4}-\d{2}-\d{2})/;function Ou(e){if(!e||e.length===0)return;let t=new Map,n;for(let{key:o,cumulative:a}of e.map(i=>({key:d1.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),n=o;if(n===void 0)return;let r=new Date().toISOString().slice(0,10);return t.get(r)??t.get(n)}function Bu(e){return e.poolType==="Unknown"}function rs(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function os(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Ia(e,t){let n=e.length+t.length;if(n>32)return"xs";if(n>24)return"sm"}function fd(e){return e?.toUpperCase()==="WONE"?"ONE":e}var c1=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function Ea(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let r=e instanceof Error?e.message:"";for(let a of c1){let i=r.indexOf(a);i>=0&&(r=r.slice(0,i))}return r.split(`
|
|
8
|
+
`).map(a=>a.trim()).find(a=>a.length>0)||t}var p1="0xe00e8bf3";function zu(e,t){let n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let r=n.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${p1}${r}${o}`}function Xo(e){return!e||e<=0n?"0":new _n(e.toString()).shiftedBy(-9).toFormat(2,_n.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function as(e){return!e||e<=0n?"0":new _n(e.toString()).toFormat(0,_n.ROUND_DOWN)}function is(e){if(!e||e<=0n)return"0";let t=new _n(e.toString()).shiftedBy(-18),n=t.isLessThan(1e-4)?7:4;return t.toFormat(n,_n.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function Rr(e,t){let n=new _n(e).shiftedBy(-t);return!n.isFinite()||n.isZero()?"0":n.isGreaterThanOrEqualTo(1)?n.toFormat(2,_n.ROUND_DOWN):n.toFormat(4,_n.ROUND_DOWN)}function md(e){return Rr(e,0)}var Aa={rate:1,symbol:"$"};function Ro(e,t=Aa){let n=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(n).toFormat(2,_n.ROUND_DOWN)}`}function Zr(e,t,n,r=Aa){let o=new _n(n||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new _n(e||"0").shiftedBy(-t).times(o);return a.isFinite()?Ro(a,r):null}var Ma=u1(null);function Dt(){let e=f1(Ma);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Vn(){let{conversionRatio:e,currencySymbol:t}=Dt();return m1(()=>({rate:typeof e=="number"&&e>0?e:Aa.rate,symbol:t||Aa.symbol}),[e,t])}import{Drawer as g1}from"vaul";import{jsx as Fu}from"react/jsx-runtime";function Uu({asChild:e,children:t}){let{walletAddress:n}=Dt(),r=t!=null,o=e??!0,a=r?t:Fu("button",{type:"button",children:Xt(n)});return Fu(g1.Trigger,{asChild:o,children:a})}import{Drawer as bs}from"vaul";import*as Ot from"react";import{useQueryClient as ex}from"@tanstack/react-query";import{createContext as h1,useContext as b1}from"react";var gd=h1(null);function ju(){return b1(gd)}import{jsx as yn,jsxs as cs}from"react/jsx-runtime";function Wu({size:e=22,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Gu({size:e=22,className:t}){return cs("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M16.17 13.75a7.333 7.333 0 11-1.54-7.59L18.333 9.167",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Hu({size:e=12,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function ss({size:e=16,className:t}){return cs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("path",{d:"M5.333 5.333V4a1.333 1.333 0 011.334-1.333h5.333A1.333 1.333 0 0113.333 4v5.333a1.333 1.333 0 01-1.333 1.334h-1.333",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M4 5.333h5.333c.737 0 1.334.597 1.334 1.334V12c0 .736-.597 1.333-1.334 1.333H4A1.333 1.333 0 012.667 12V6.667C2.667 5.93 3.263 5.333 4 5.333z",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ls({size:e=16,className:t}){return yn("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:yn("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function ds({size:e=48,className:t}){return cs("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[yn("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),yn("path",{d:"M14 24.5l6.6 6.6L34.5 17.5",stroke:"var(--wp-claim-success-mark, #ffffff)",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Bn({size:e=12,className:t}){return cs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[yn("path",{d:"M5 2H2.5A1.5 1.5 0 0 0 1 3.5V9.5A1.5 1.5 0 0 0 2.5 11H8.5A1.5 1.5 0 0 0 10 9.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),yn("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as w1}from"@tanstack/react-query";import{useMemo as _u}from"react";var y1="wp:reward-pools";function Jo(e,t=!0){let{data:n,...r}=w1({queryKey:[y1,e],queryFn:async({signal:i})=>{let s=await Se("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch pools: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Pools API error: ${d.code}`);return d},enabled:t,staleTime:0}),o=_u(()=>n?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[n]),a=_u(()=>n?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[n]);return{crossPools:o,gamePools:a,allPools:n?.data.pools??[],...r}}import{useQuery as x1}from"@tanstack/react-query";import{useMemo as v1}from"react";var k1="wp:user-deposits";function ps(e,t,n=!0){let r=n&&!!t,{data:o,...a}=x1({queryKey:[k1,e,t],queryFn:async({signal:s})=>{let l=await Se("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:r,staleTime:0});return{depositMap:v1(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}import{useQuery as C1}from"@tanstack/react-query";import{useMemo as R1}from"react";var Vu={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Qu={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var qu={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var hd={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},Yu={dev:`${hd.dev}/portfolio`,stage:`${hd.stage}/portfolio`,production:`${hd.production}/portfolio`};var Ku={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Qn={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",production:"https://contents.crosstoken.io/frontend/common/app-launcher/icons"},us={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Zu={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Xu={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Ju={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var N1="wp:token-info",S1="0x0000000000000000000000000000000000000001";function Nr(e,t=!0){let n=Rt[e].cross,{data:r,...o}=C1({queryKey:[N1,e],queryFn:async({signal:p})=>{let g=await Se("walletServer",e),u=await fetch(`${g}/v1/public/token/info`,{cache:"no-store",signal:p});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let m=await u.json();if(m.code!==200)throw new Error(`Token info API error: ${m.code}`);return m},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=R1(()=>{let p=new Map,g=new Map;if(!r?.data)return{byChainAddr:p,byChainSym:g};for(let u of r.data){let m=u.address.toLowerCase();p.set(`${u.chain_id}:${m}`,u),p.set(m,u);let y=u.symbol.replace(/^t/,"").toUpperCase(),w=`${u.chain_id}:${y}`;g.has(w)||g.set(w,u),g.has(y)||g.set(y,u)}return{byChainAddr:p,byChainSym:g}},[r]);return{getTokenImage:(p,g,u)=>{let m=p.toLowerCase(),y=!!u?.chainOnly,w=a.get(`${n}:${m}`);if(w?.image)return w.image;if(!y){let f=a.get(m);if(f?.image)return f.image}if(g){let f=g.replace(/^t/,"").toUpperCase(),c=i.get(`${n}:${f}`);if(c?.image)return c.image;if(!y){let h=i.get(f);if(h?.image)return h.image}}return""},getTokenSymbol:(p,g,u)=>{let m=p.toLowerCase();return(a.get(`${n}:${m}`)??(u?.chainOnly?void 0:a.get(m)))?.symbol||g},getNativeToken:()=>a.get(`${n}:${S1}`),...o}}import*as wd from"react";import{jsx as bd,jsxs as $u}from"react/jsx-runtime";function qn({sectionKey:e,title:t,icon:n,iconFit:r="cover",isEmpty:o,loading:a=!1,children:i}){let s=ju();return wd.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),wd.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:$u("div",{className:"wp-svc-card",children:[$u("div",{className:"wp-svc-card-head",children:[bd("img",{className:"wp-svc-card-icon",src:n,alt:"",style:{objectFit:r}}),bd("span",{className:"wp-svc-card-title",children:t})]}),bd("div",{className:"wp-svc-items",children:i})]})}import yd from"bignumber.js";import{jsx as dn,jsxs as cn}from"react/jsx-runtime";var T1="ONErewards";function I1(e){return new yd(e||"0").isGreaterThan(0)}function ef(){let{env:e,walletAddress:t,onOutlink:n}=Dt(),r=Vn(),o=!!t,{allPools:a,isLoading:i}=Jo(e,o),{depositMap:s,isLoading:l}=ps(e,t,o),{getTokenImage:d}=Nr(e,o),p=(m,y)=>`${Vu[e]}/gametoken/tokens/${m.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,g=`${Qn[e]}/reward.png`,u=a.filter(m=>{let y=s.get(m.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0";return!(new yd(w).isZero()&&new yd(f).isZero())});return dn(qn,{sectionKey:"rewards",title:T1,icon:g,isEmpty:u.length===0,loading:i||l,children:u.map(m=>{let y=s.get(m.pool_address.toLowerCase()),w=y?.deposited_amount??"0",f=y?.claimable_reward??"0",c=p(m,"withdraw"),h=p(m,"claim"),b=d(m.deposit_token.address,m.deposit_token.symbol),x=m.reward_tokens[0],k=x?d(x.address,x.symbol):"",R=m.reward_tokens.map(L=>L.symbol),S=R.length>0?`${m.deposit_token.symbol}-${R.join("/")}`:m.deposit_token.symbol,C=x?Rr(f,x.decimals):"0",N=x?.symbol??"Reward",E=Zr(w,m.deposit_token.decimals,m.deposit_token.price,r),A=x?Zr(f,x.decimals,x.price,r):null,B=!!y&&I1(f);return cn("article",{className:"wp-item","data-side":"reward",children:[cn("div",{className:"wp-item-body",children:[cn("div",{className:"wp-item-line",children:[cn("span",{className:"wp-item-label",children:["Pool",dn("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),cn("div",{className:"wp-svc-token",children:[cn("span",{className:"wp-token-stack","aria-hidden":!0,children:[b&&dn("img",{className:"wp-svc-token-icon",src:b,alt:""}),k&&dn("img",{className:"wp-svc-token-icon",src:k,alt:""})]}),dn("span",{children:S})]})]}),cn("div",{className:"wp-item-line",children:[dn("span",{className:"wp-item-label",children:"Deposited"}),cn("div",{className:"wp-svc-token wp-svc-token--amount",children:[b&&dn("img",{className:"wp-svc-token-icon",src:b,alt:""}),cn("div",{className:"wp-svc-amount",children:[dn("span",{className:"wp-svc-amount-main",children:Rr(w,m.deposit_token.decimals)}),E&&dn("span",{className:"wp-item-usd",children:E})]})]})]}),cn("div",{className:"wp-item-line",children:[cn("span",{className:"wp-item-label",children:["Claimable (",N,")"]}),cn("div",{className:"wp-svc-token wp-svc-token--amount",children:[k&&dn("img",{className:"wp-svc-token-icon",src:k,alt:""}),cn("div",{className:"wp-svc-amount",children:[dn("span",{className:"wp-svc-amount-main",children:C}),A&&dn("span",{className:"wp-item-usd",children:A})]})]})]})]}),cn("div",{className:"wp-item-tags",children:[cn("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>Lt(L,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},n),children:[dn("span",{className:"wp-tag-label",children:"Withdraw"}),dn(Bn,{size:12,className:"wp-tag-icon"})]}),cn("a",{className:"wp-tag wp-tag--mint","data-disabled":!B||void 0,"aria-disabled":!B||void 0,href:B?h:void 0,target:B?"_blank":void 0,rel:B?"noopener noreferrer":void 0,onClick:L=>{if(!B){L.preventDefault();return}Lt(L,h,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:y}},n)},children:[dn("span",{className:"wp-tag-label",children:"Claim"}),dn(Bn,{size:12,className:"wp-tag-icon"})]})]})]},m.pool_address)})})}import*as cf from"react";import{useQuery as B1}from"@tanstack/react-query";import{useMemo as fs}from"react";var E1="0x70a08231",A1="0x18160ddd",M1="0x313ce567",L1=8e3;async function D1(e,t,n,r){let o=new AbortController,a=setTimeout(()=>o.abort(),L1);r&&r.addEventListener("abort",()=>o.abort(),{once:!0});let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:o.signal}).finally(()=>clearTimeout(a));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let s=await i.json();if(s.error)throw new Error(`RPC ${t}: ${s.error.message}`);if(s.result===void 0)throw new Error(`RPC ${t}: empty result`);return s.result}function P1(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function La(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Br(e,t,n,r,o){try{return await D1(e,"eth_call",[o?{from:o,to:t,data:n}:{to:t,data:n},"latest"],r)}catch{return}}async function O1(e,t,n,r){let[o,a,i]=await Promise.all([Br(e,n,E1+P1(t),r),Br(e,n,A1,r),Br(e,n,M1,r)]),s=La(o);if(s===void 0)return null;let l=La(i);return{balance:s,totalSupply:La(a),decimals:l!==void 0?Number(l):void 0}}async function Da(e,t){let n=Rt[e].cross,r=await Se("walletServer",e),o=await fetch(`${r}/v1/public/chain/info/${n}`,{cache:"no-store",signal:t});if(!o.ok)return;let a=await o.json();return("data"in a&&a.data!==void 0?Array.isArray(a.data)?a.data[0]:a.data:a)?.rpc||void 0}async function tf(e,t,n,r){if(!t||n.length===0)return{};let o;try{o=await Da(e,r)}catch{o=void 0}if(!o)return{};let a=await Promise.all(n.map(async s=>[s.toLowerCase(),await O1(o,t,s,r)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var z1="wp:withdraw-token-meta",F1="0xc89039c5",U1="0x95d89b41",j1="0x313ce567";function W1(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),n=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(n)||n<=0||n>64)return;let r=t.slice(128,128+n*2),o="";for(let a=0;a<r.length;a+=2)o+=String.fromCharCode(parseInt(r.slice(a,a+2),16));return o||void 0}catch{return}}function G1(e){if(!e||e==="0x")return;let n="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(n)&&n!=="0x0000000000000000000000000000000000000000"?n:void 0}async function H1(e,t,n){if(t.length===0)return{};let r;try{r=await Da(e,n)}catch{r=void 0}if(!r)return{};let o=await Promise.all(t.map(async i=>{let s=G1(await Br(r,i,F1,n));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Br(r,s,U1,n),Br(r,s,j1,n)]),p=W1(l),g=La(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:g!==void 0?Number(g):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function nf(e,t,n=!0){let o=n&&!!t,{allPools:a,isLoading:i}=Jo(e,o),{deposits:s,isLoading:l}=ps(e,t,o),d=fs(()=>{let f=new Map;for(let c of a)f.set(c.pool_address.toLowerCase(),c);return f},[a]),p=fs(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),g=fs(()=>p.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[p,d]),{data:u,isLoading:m}=B1({queryKey:[z1,e,g],queryFn:({signal:f})=>H1(e,g,f),enabled:o&&g.length>0,staleTime:1440*60*1e3});return{positions:fs(()=>{let f=[];for(let c of p){let h=c.pool_address.toLowerCase(),b=d.get(h);if(b){f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:b.pool_type,tokenSymbol:b.deposit_token.symbol,tokenAddress:b.deposit_token.address,decimals:b.deposit_token.decimals,price:b.deposit_token.price,depositedRaw:c.deposited_amount});continue}let x=u?.[h];x&&f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:x.symbol,tokenAddress:x.tokenAddress,decimals:x.decimals,depositedRaw:c.deposited_amount})}return f},[p,d,u]),isLoading:i||l||m}}import*as on from"react";import{Fragment as rf,jsx as Oe,jsxs as jt}from"react/jsx-runtime";var _1=400;function V1(e,t,n){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function xd(e,t,n){return n==="loading"?"Estimating...":n==="error"||n==="unavailable"?"-":`${e} ${t}`.trim()}function Q1({position:e,size:t}){return e.icon?Oe("img",{src:e.icon,alt:"",width:t,height:t}):Oe("span",{children:e.tokenSymbol.slice(0,1)})}function of({open:e,status:t,positions:n,initialPoolAddress:r,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:g,trackFunnel:u,nativeSymbol:m}){let[y,w]=on.useState(null),[f,c]=on.useState("idle"),h=on.useRef(0),b=on.useRef(void 0),x=on.useRef(null);on.useEffect(()=>()=>clearTimeout(b.current),[]);let k=on.useMemo(()=>{let U=r?.toLowerCase();return n.find(M=>M.poolAddress.toLowerCase()===U)??n[0]??null},[n,r]),R=on.useMemo(()=>{try{return BigInt(k?.depositedRaw??"0")}catch{return 0n}},[k?.depositedRaw]),S=k?.decimals??18;on.useEffect(()=>{!e||!k||u?.("position_selected")},[e,k,u]);let C=on.useCallback(()=>{w(null),c(l?"idle":"unavailable"),h.current+=1,x.current=null},[]);if(on.useEffect(()=>{e&&C()},[e,C]),on.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(b.current);return}if(!l||!k){clearTimeout(b.current),c("unavailable");return}if(R<=0n){clearTimeout(b.current),h.current+=1,x.current=null,w(null),c("idle");return}let U=`${k.poolAddress.toLowerCase()}:${R.toString()}`;if(x.current===U)return;x.current=U,clearTimeout(b.current);let M=h.current+1;h.current=M,c("loading"),b.current=setTimeout(()=>{l(k,R).then(F=>{h.current===M&&(w(F??null),c(F?"ready":"unavailable"))}).catch(()=>{h.current===M&&(w(null),c("error"))})},_1)},[e,t,R,l,k]),!e||!k)return null;let N=t==="submitting",E=Xo(y?.maxPriorityFeePerGas),A=Xo(y?.maxFeePerGas??y?.gasPrice),B=as(y?.gasLimit),L=Rr(k.depositedRaw,S);return Oe("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:U=>{U.target===U.currentTarget&&!N&&d()},children:jt("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-withdraw-title","aria-label":"Withdraw","data-status":t,"data-vaul-no-drag":!0,children:[Oe("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Oe("span",{})}),jt("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?jt(rf,{children:[Oe("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Oe(ds,{})}),jt("div",{className:"wp-claim-copy",children:[Oe("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Oe("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),Oe("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:jt("div",{className:"wp-claim-list-item",children:[Oe("span",{children:"Tx Hash"}),jt("button",{type:"button",className:"wp-claim-hash",onClick:g,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[Oe("strong",{children:os(a)}),s?Oe(ls,{}):Oe(ss,{})]})]})})]}):jt(rf,{children:[t==="error"&&jt("div",{className:"wp-claim-heading",children:[Oe("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Oe("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),jt("div",{className:"wp-claim-reward-card","data-fit":Ia(k.tokenSymbol,L),"aria-label":"Deposited balance",children:[Oe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Oe(Q1,{position:k,size:28})}),Oe("strong",{className:"wp-claim-reward-symbol",children:k.tokenSymbol}),Oe("strong",{className:"wp-claim-reward-amount",children:L})]}),jt("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[jt("div",{className:"wp-claim-account-row",children:[jt("div",{className:"wp-claim-account",children:[Oe("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),jt("strong",{children:[k.tokenSymbol," Pool"]})]}),Oe("span",{children:rs(o)})]}),Oe("span",{className:"wp-claim-divider","aria-hidden":!0}),jt("div",{className:"wp-claim-detail-list",children:[jt("div",{className:"wp-claim-detail-row",children:[Oe("span",{children:"Est. Tx Fee"}),Oe("strong",{children:V1(y,f,m)})]}),jt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Priority Fee Per Gas"}),Oe("strong",{children:xd(E,"Gwei",f)})]}),jt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Max Fee Per Gas"}),Oe("strong",{children:xd(A,"Gwei",f)})]}),jt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Oe("span",{children:"Gas Limit"}),Oe("strong",{children:xd(B,"",f)})]})]})]})]}),jt("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Oe("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),jt("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}k&&R>0n&&p(k,R,y)},disabled:N||(t==="confirm"||t==="error")&&R<=0n,children:[t==="success"&&"Done",t==="submitting"&&Oe("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),Oe("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Oe("span",{})})]})})}import*as Pt from"react";import{useQueryClient as K1}from"@tanstack/react-query";import{useQuery as q1}from"@tanstack/react-query";var Y1="wp:reward-factory-info";function af(e,t=!0){let{data:n,...r}=q1({queryKey:[Y1,e],queryFn:async({signal:o})=>{let a=await Se("gameReward",e),i=await fetch(`${a}/v1/factory/info`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Factory info fetch failed: ${i.status}`);let s=await i.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:n?.data??null,routerAddress:n?.data.router_address??"",...r}}var sf="wp:";function Xr(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function lf(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function df(e){let{env:t,walletAddress:n,sendTransaction:r,estimateGas:o}=Dt(),a=!!n,i=!!r,s=K1(),{routerAddress:l}=af(t,a&&i),d=lf(l),[p,g]=Pt.useState(!1),[u,m]=Pt.useState(void 0),[y,w]=Pt.useState("confirm"),[f,c]=Pt.useState(),[h,b]=Pt.useState(""),[x,k]=Pt.useState(!1),R=Pt.useRef(void 0);Pt.useEffect(()=>()=>clearTimeout(R.current),[]);let S=Pt.useRef(new Set),C=Pt.useCallback((F,ne)=>{S.current.has(F)||(S.current.add(F),Ye("withdraw",F,{...ne,tags:{section:e,...ne?.tags}}))},[e]),N=Pt.useCallback((F,ne)=>d?{to:d,value:0n,data:zu(F,ne),chainId:Rt[t].cross}:null,[t,d]),E=Pt.useCallback(()=>{Xr(s)},[s]),A=Pt.useCallback(F=>{m(F),g(!0),w("confirm"),c(void 0),b(""),k(!1),S.current=new Set,C("opened")},[C]),B=Pt.useCallback(()=>{y!=="submitting"&&(g(!1),m(void 0),w("confirm"),c(void 0),b(""),k(!1),y==="success"&&E())},[y,E]),L=Pt.useCallback(async(F,ne)=>{if(!o)return null;let ee=N(F.poolId,ne),X=lf(n);return!ee||!X?null:o({...ee,from:X})},[N,o,n]),U=Pt.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),k(!0),clearTimeout(R.current),R.current=setTimeout(()=>k(!1),1400)}catch{k(!1)}},[f]),M=Pt.useCallback(async(F,ne,ee)=>{if(!r){w("error"),b("Withdraw is not available for this wallet.");return}if(!d){w("error"),b("Withdraw contract address is not available.");return}try{w("submitting"),b("");let X=N(F.poolId,ne);if(!X){w("error"),b("Withdraw contract address is not available.");return}C("submitted");let W=await r({...X,gas:ee?.gasLimit&&ee.gasLimit>0n?ee.gasLimit:void 0,maxFeePerGas:ee?.maxFeePerGas&&ee.maxFeePerGas>0n?ee.maxFeePerGas:void 0,maxPriorityFeePerGas:ee?.maxPriorityFeePerGas&&ee.maxPriorityFeePerGas>0n?ee.maxPriorityFeePerGas:void 0});c(W),w("success"),C("confirmed"),E()}catch(X){w("error"),b(Ea(X,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:Dn(X)})}},[N,E,d,r,C]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:u,status:y,txHash:f,error:h,copied:x,hasEstimator:!!o,openWithdraw:A,closeWithdraw:B,estimateWithdraw:L,confirmWithdraw:M,copyHash:U,trackFunnelOnce:C}}import{Fragment as X1,jsx as Nn,jsxs as zr}from"react/jsx-runtime";var Z1="ONEpoints";function pf(){let{env:e,walletAddress:t,onOutlink:n}=Dt(),r=Vn(),o=!!t,{getTokenImage:a,getNativeToken:i}=Nr(e,o),s=df("points"),{positions:l,isLoading:d}=nf(e,t,o),p=cf.useMemo(()=>l.filter(Bu).map(m=>({...m,icon:a(m.tokenAddress,m.tokenSymbol)})),[l,a]),g=`${Qn[e]}/point.png`,u=Qu[e];return zr(X1,{children:[Nn(qn,{sectionKey:"points",title:Z1,icon:g,isEmpty:p.length===0,loading:d,children:p.map(m=>{let y=m.price?Zr(m.depositedRaw,m.decimals,m.price,r):null;return zr("article",{className:"wp-item","data-side":"reward",children:[zr("div",{className:"wp-item-body",children:[zr("div",{className:"wp-item-line",children:[Nn("span",{className:"wp-item-label",children:"Token"}),zr("div",{className:"wp-svc-token",children:[m.icon&&Nn("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),Nn("span",{children:m.tokenSymbol})]})]}),zr("div",{className:"wp-item-line",children:[Nn("span",{className:"wp-item-label",children:"Deposited"}),zr("div",{className:"wp-svc-token wp-svc-token--amount",children:[m.icon&&Nn("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),zr("div",{className:"wp-svc-amount",children:[Nn("span",{className:"wp-svc-amount-main",children:Rr(m.depositedRaw,m.decimals)}),y&&Nn("span",{className:"wp-item-usd",children:y})]})]})]})]}),Nn("div",{className:"wp-item-tags",children:s.canWithdrawInline?Nn("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(m.poolAddress),children:Nn("span",{className:"wp-tag-label",children:"Withdraw"})}):zr("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:w=>Lt(w,u,{category:"portfolio",origin:"portfolio-points",payload:{position:m}},n),children:[Nn("span",{className:"wp-tag-label",children:"Withdraw"}),Nn(Bn,{size:12,className:"wp-tag-icon"})]})})]},m.poolAddress)})}),Nn(of,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}import*as vd from"react";import{useQuery as J1}from"@tanstack/react-query";var $1="wp:stake-info";function uf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=J1({queryKey:[$1,e,t],queryFn:async({signal:s})=>{let l=await Se("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:r,staleTime:0});return{stakeInfo:o?.data,...a}}import{useQuery as ey}from"@tanstack/react-query";var ty="wp:stake-rewards",ny=31;function ff(e,t,n=!0){let r=n&&!!t,{data:o,...a}=ey({queryKey:[ty,e,t],queryFn:async({signal:i})=>{let s=await Se("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${ny}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:r,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Ou(o),...a}}import{useQuery as ry}from"@tanstack/react-query";var oy="wp:staking-onchain";function mf(e,t,n=!0){let r=n&&!!t&&!!e,{data:o,...a}=ry({queryKey:[oy,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:r,staleTime:0});return{onchain:o,...a}}import{useMemo as gf}from"react";import ay from"bignumber.js";function hf(e){return e?.trim().toUpperCase()==="ONE"}function bf(e){return new ay(e||"0").isGreaterThan(0)}function ms(e,t,n=!0){let{allPools:r}=Jo(e,n),o=gf(()=>{for(let d of r)for(let p of[d.deposit_token,...d.reward_tokens])if(hf(p?.symbol)&&bf(p.price))return p.price},[r]),a=n&&o===void 0,{tokens:i}=Yr(e,t,a),{statsMap:s}=Kr(e,a),l=Rt[e].cross;return gf(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&hf(p.symbol));if(d){let p=s.get(Cr(d.chainId,d.address));if(p&&bf(p.price))return p.price}return"0"},[o,i,s,l])}import $r from"bignumber.js";import{jsx as Yn,jsxs as Jr}from"react/jsx-runtime";function iy(e){if(!e)return"\u2014";let t=new $r(e);return t.isFinite()?`${t.toFormat(2,$r.ROUND_DOWN)}%`:"\u2014"}function wf(){let{env:e,walletAddress:t,onOutlink:n,stakingRewardsReader:r}=Dt(),o=Vn(),a=!!t,{stakeInfo:i,isLoading:s}=uf(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=ff(e,t,a),{onchain:g}=mf(t,r,a),u=ms(e,t,a),{getNativeToken:m}=Nr(e,a),y=m()?.symbol,w="ONEstaking",f=`${Qn[e]}/cross-staking.png`,c=Yu[e],h=i?.total_stake??"0",b=vd.useMemo(()=>g?new $r(g.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[g,l,i]),x=vd.useMemo(()=>g?new $r(g.stakedWei.toString()).shiftedBy(-18):new $r(h),[g,h]),k=d!==void 0?new $r(d):void 0,R=i?.days_since_first_stake,S=k!==void 0&&k.isFinite()&&x.isGreaterThan(0)&&R!==null&&R!==void 0?k.div(x).times(365).div(Math.max(1,R)).times(100):void 0,C=!(new $r(h).isZero()&&new $r(b).isZero()),N=Zr(h,0,u,o),E=Zr(b,0,u,o);return Yn(qn,{sectionKey:"staking",title:w,icon:f,iconFit:"contain",isEmpty:!C,loading:s||p,children:Jr("article",{className:"wp-item","data-side":"stake",children:[Jr("div",{className:"wp-item-body",children:[Jr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"Staked"}),Jr("div",{className:"wp-svc-amount",children:[Yn("span",{className:"wp-svc-amount-main",children:`${md(h)} ${y??""}`.trim()}),N&&Yn("span",{className:"wp-item-usd",children:N})]})]}),Jr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"Rewards Earned"}),Jr("div",{className:"wp-svc-amount",children:[Yn("span",{className:"wp-svc-amount-main",children:`${md(b)} ${y??""}`.trim()}),E&&Yn("span",{className:"wp-item-usd",children:E})]})]}),Jr("div",{className:"wp-item-line",children:[Yn("span",{className:"wp-item-label",children:"My APR"}),Yn("span",{children:iy(S?.toString(10))})]})]}),Yn("div",{className:"wp-item-tags",children:Jr("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:A=>Lt(A,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},n),children:[Yn("span",{className:"wp-tag-label",children:"Manage"}),Yn(Bn,{size:12,className:"wp-tag-icon"})]})})]})})}import*as kd from"react";import{useQuery as sy}from"@tanstack/react-query";var ly="wp:game-swap-pools";function yf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=sy({queryKey:[ly,e,t],queryFn:async({signal:i})=>{let s=await Se("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:r,staleTime:0});return{pools:o??[],...a}}import{useQuery as dy}from"@tanstack/react-query";var cy="wp:game-swap-lp-balances";function xf(e,t,n,r){let o=[...n].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=dy({queryKey:[cy,e,t,o,!!r],queryFn:async({signal:l})=>{let d=r?await r(o):await tf(e,t,o,l),p={};for(let[g,u]of Object.entries(d))p[g.toLowerCase()]=u;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}import Fr from"bignumber.js";import{jsx as Kn,jsxs as cr}from"react/jsx-runtime";var py="Gametoken LP",kf=18,uy=new Fr("0.0001");function vf(e){return e?.trim().toUpperCase()==="ONE"}function fy(e){return e&&e>0?e:kf}function my(e){let t=vf(e.token_a?.symbol)&&!vf(e.token_b?.symbol),n=t?e.reserve_a:e.reserve_b,r=fy(t?e.token_a?.decimals:e.token_b?.decimals),o=new Fr(n||"0").shiftedBy(-r);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new Fr(0):o.times(2)}function gy(e,t,n,r){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||r||"?",i=t?.decimals??kf,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new Fr(t.balance.toString()),p=new Fr(t.totalSupply.toString()),g=d.div(p);s=g.times(100);let u=g.times(my(e));if(u.isGreaterThan(0)){let m=new Fr(e.quote_usd??e.cross_usd??"0");l=m.isGreaterThan(0)?Ro(u.times(m),n):`${u.toFormat(4,Fr.ROUND_DOWN)} ${r??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function Cf(){let{env:e,walletAddress:t,onOutlink:n,lpBalanceReader:r}=Dt(),o=Vn(),a=!!t,{pools:i,isLoading:s}=yf(e,t,a),l=kd.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=xf(e,t,l,r),{getNativeToken:g}=Nr(e,a),u=g()?.symbol,m=`${Qn[e]}/game-token.png`,y=Object.keys(d).length>0,w=kd.useMemo(()=>{let c=i.map(h=>gy(h,d[h.pair_address?.toLowerCase()],o,u));return y?c.filter(h=>h.lpAmountRaw?new Fr(h.lpAmountRaw).shiftedBy(-h.lpDecimals).isGreaterThanOrEqualTo(uy):!1):c},[i,d,y,o,u]),f=c=>{let h=c.token_a?.address??c.pair_address;return`${Ku[e]}/gametoken/tokens/${h}?trade=deposit`};return Kn(qn,{sectionKey:"gameSwap",title:py,icon:m,iconFit:"contain",isEmpty:w.length===0,loading:s||p,children:w.map(c=>{let{pool:h}=c,b=f(h),x=`${c.tokenASymbol} / ${c.tokenBSymbol}`,k=h.token_a?.logo_url,R=h.token_b?.logo_url;return cr("article",{className:"wp-item","data-side":"game-swap",children:[cr("div",{className:"wp-item-body",children:[cr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Pool"}),cr("div",{className:"wp-svc-token",children:[cr("span",{className:"wp-token-stack","aria-hidden":!0,children:[k&&Kn("img",{className:"wp-svc-token-icon",src:k,alt:""}),R&&Kn("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),Kn("span",{children:x})]})]}),c.lpAmountRaw!==void 0&&cr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"My LP"}),cr("span",{children:[Rr(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&cr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Pool Share"}),cr("span",{children:[c.sharePercent.toFormat(2,Fr.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&cr("div",{className:"wp-item-line",children:[Kn("span",{className:"wp-item-label",children:"Value"}),Kn("span",{children:c.valueText})]})]}),Kn("div",{className:"wp-item-tags",children:cr("a",{className:"wp-tag wp-tag--mint",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":x,onClick:S=>Lt(S,b,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:h}},n),children:[Kn("span",{className:"wp-tag-label",children:"Manage"}),Kn(Bn,{size:12,className:"wp-tag-icon"})]})})]},h.pair_address)})})}import No from"bignumber.js";import{useMemo as ky}from"react";import{useQuery as hy}from"@tanstack/react-query";var by="wp:forge-pools";function Rf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=hy({queryKey:[by,e,t],queryFn:async()=>{let s=await Se("bondingCurve",e),l=await fetch(`${s}/v1/users/${t}/pools`,{cache:"no-store"});if(!l.ok)throw new Error(`forge pools fetch failed: ${l.status}`);return(await l.json()).data?.items??[]},enabled:r,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}import{useQueries as wy}from"@tanstack/react-query";import{useMemo as yy}from"react";var xy="wp:forge-token-detail";async function vy(e,t){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return n.ok?(await n.json())?.data?.token??null:null}function Nf(e,t,n=!0){let r=wy({queries:t.map(i=>({queryKey:[xy,e,i],queryFn:async()=>vy(await Se("bondingCurve",e),i),enabled:n&&!!i,staleTime:3e4}))}),o=yy(()=>{let i=new Map;for(let s=0;s<r.length;s++){let l=r[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[r,t]),a=r.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}import{jsx as Sn,jsxs as eo}from"react/jsx-runtime";var Cy="ONEforge",Sf=18,Ry="https://contents.crosstoken.io/wallet/token/images/FT.png";function Ny(e){if(!e||e==="0")return"0";let t=new No(e).shiftedBy(-Sf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,No.ROUND_DOWN):t.toFormat(4,No.ROUND_DOWN)}function Sy(e){let t=Number(e);return!Number.isFinite(t)||t<=0?"0%":t>=1?`${(Math.floor(t*100)/100).toFixed(2)}%`:`${(Math.floor(t*1e4)/1e4).toFixed(4)}%`}function Ty(e,t,n,r){let o=new No(n||"0");if(!o.isGreaterThan(0))return null;let a=new No(e.total_supply||"0"),i=new No(e.lp_balance||"0"),s=new No(t?.reserve_b||"0").shiftedBy(-Sf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?Ro(p,r):null}function Tf(){let{env:e,walletAddress:t,onOutlink:n}=Dt(),r=Vn(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=Rf(e,t,o),l=ky(()=>a.map(m=>m.token.address),[a]),{detailMap:d}=Nf(e,l,o&&l.length>0),p=ms(e,t,o),g=m=>`${qu[e]}/forge/token/${m.token.address}`,u=`${Qn[e]}/forge.png`;return Sn(qn,{sectionKey:"forge",title:Cy,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(m=>{let y=d.get(m.token.address.toLowerCase()),w=y?.image_url||y?.image||m.token.image||Ry,f=y?.symbol||m.token.symbol,c=g(m),h=Ty(m,y,p,r);return eo("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:b=>Lt(b,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:m,tokenDetail:y}},n),children:[eo("div",{className:"wp-item-body",children:[eo("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"Asset"}),eo("div",{className:"wp-svc-token",children:[Sn("img",{className:"wp-svc-token-icon",src:w,alt:""}),Sn("span",{children:f}),y?.name&&Sn("span",{className:"wp-token-subtle",children:y.name})]})]}),eo("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"LP Balance"}),Sn("div",{className:"wp-svc-token wp-svc-token--amount",children:eo("div",{className:"wp-svc-amount",children:[Sn("span",{className:"wp-svc-amount-main",children:Ny(m.lp_balance)}),h&&Sn("span",{className:"wp-item-usd",children:h})]})})]}),eo("div",{className:"wp-item-line",children:[Sn("span",{className:"wp-item-label",children:"Ownership"}),Sn("span",{className:"wp-line-value",children:Sy(m.pool_ownership)})]})]}),Sn("div",{className:"wp-item-tags",children:eo("span",{className:"wp-tag wp-tag--muted",children:[Sn("span",{className:"wp-tag-label",children:"Withdraw"}),Sn(Bn,{size:12,className:"wp-tag-icon"})]})})]},m.pair_address)})})}import{useMemo as jf}from"react";import Xy from"bignumber.js";import{useQuery as Iy}from"@tanstack/react-query";var Ey="wp:crossd-positions";function Ay(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(r=>{if(!r?.token_id||!r.liquidity)return!1;try{return BigInt(r.liquidity)>0n}catch{return!1}})}function If(e,t,n=!0){let r=n&&!!t,{data:o,...a}=Iy({queryKey:[Ey,e,t],queryFn:async()=>{let s=await fetch(`${us[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Ay(await s.json())},enabled:r,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}import{useQueries as My}from"@tanstack/react-query";import{useMemo as Ly}from"react";var Dy="wp:crossd-position-details";function Py(e){let t=e??{},n=t.data??t;return n?.token_id||n?.pool?n:null}function Ef(e,t,n=!0){let r=My({queries:t.map(a=>({queryKey:[Dy,e,a],queryFn:async()=>{let i=await fetch(`${us[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return Py(await i.json())},enabled:n&&!!a,staleTime:6e4}))});return{detailMap:Ly(()=>{let a=new Map;return r.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[r,t])}}import*as Ur from"react";import{Fragment as Mf,jsx as Pe,jsxs as an}from"react/jsx-runtime";var Oy=300*1e3,Af="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function By(e,t,n){if(t)return"Estimating...";if(!e)return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function Cd(e,t,n){return n?"Estimating...":`${e} ${t}`.trim()}function Lf({open:e,status:t,target:n,token0Icon:r,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:g,prepareWithdraw:u,confirmWithdraw:m,onClose:y,onCopyHash:w,trackFunnel:f}){let[c,h]=Ur.useState(null),[b,x]=Ur.useState(null),k=Ur.useRef(0);Ur.useEffect(()=>{if(!e||!n)return;let _=++k.current;h(null),x(null),f?.("dialog_opened"),u().then(ae=>{k.current===_&&(h(ae),x(ae?Date.now():null))})},[e,n]);let R=t==="submitting",S=t==="estimating"||t==="confirm"&&!c,C=Ur.useCallback(async()=>{let _=c,ae=!b||Date.now()-b>Oy;if(!_||ae){let be=++k.current;if(_=await u(),k.current!==be)return;h(_),x(_?Date.now():null)}_&&await m(_)},[c,b,u,m]);if(!e||!n)return null;let{position:N,detail:E}=n,A=E.pool?.token0,B=E.pool?.token1,L=a||A?.symbol||N.pool?.token0_symbol||"?",U=i||B?.symbol||N.pool?.token1_symbol||"?",M=A?.decimals??18,F=B?.decimals??18,ne=r||A?.logo_url||Af,ee=o||B?.logo_url||Af,X=`${L}/${U}`,W=c?Ko(c.expectedAmount0.toString(),M):null,Y=c?Ko(c.expectedAmount1.toString(),F):null,O=Xo(c?.estimate?.maxPriorityFeePerGas),G=Xo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),te=as(c?.estimate?.gasLimit);return Pe("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:_=>{_.target===_.currentTarget&&!R&&y()},children:an("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-crossd-withdraw-title","aria-label":"Withdraw position","data-status":t,"data-vaul-no-drag":!0,children:[Pe("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Pe("span",{})}),an("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?an(Mf,{children:[Pe("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Pe(ds,{})}),an("div",{className:"wp-claim-copy",children:[Pe("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),an("p",{className:"wp-claim-desc",children:["Your ",X," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),Pe("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:an("div",{className:"wp-claim-list-item",children:[Pe("span",{children:"Tx Hash"}),an("button",{type:"button",className:"wp-claim-hash",onClick:w,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[Pe("strong",{children:os(l)}),p?Pe(ls,{}):Pe(ss,{})]})]})})]}):an(Mf,{children:[t==="error"&&an("div",{className:"wp-claim-heading",children:[Pe("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Pe("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),an("div",{className:"wp-claim-reward-card","data-fit":Ia(L,W??""),"aria-label":`Expected ${L}`,children:[Pe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Pe("img",{src:ne,alt:"",width:28,height:28})}),Pe("strong",{className:"wp-claim-reward-symbol",children:L}),Pe("strong",{className:"wp-claim-reward-amount",children:W??"Estimating..."})]}),an("div",{className:"wp-claim-reward-card","data-fit":Ia(U,Y??""),"aria-label":`Expected ${U}`,children:[Pe("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Pe("img",{src:ee,alt:"",width:28,height:28})}),Pe("strong",{className:"wp-claim-reward-symbol",children:U}),Pe("strong",{className:"wp-claim-reward-amount",children:Y??"Estimating..."})]}),g&&Pe("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:an("div",{className:"wp-claim-detail-list",children:[an("div",{className:"wp-claim-detail-row",children:[Pe("span",{children:"Est. Tx Fee"}),Pe("strong",{children:By(c?.estimate,S,s)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Priority Fee Per Gas"}),Pe("strong",{children:Cd(O,"Gwei",S)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Max Fee Per Gas"}),Pe("strong",{children:Cd(G,"Gwei",S)})]}),an("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Pe("span",{children:"Gas Limit"}),Pe("strong",{children:Cd(te,"",S)})]})]})})]}),an("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Pe("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),Pe("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}R||S||(f?.("confirm_clicked"),C())},disabled:R||S,children:t==="success"?"Done":R?Pe("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):S?Pe("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),Pe("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Pe("span",{})})]})})}import*as Nt from"react";import{useQueryClient as Yy}from"@tanstack/react-query";var zy="0x0c49ccbe",Fy="0xfc6f7865",Uy="0x49404b7c",jy="0xdf2ab5bb",Wy="0xac9650d8",Df=(1n<<128n)-1n,Of=600n,Gy=99n,Hy=100n;function Rd(e){return e*Gy/Hy}function Pf(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Tn(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let n=e.toString(16);if(n.length>64)throw new Error(`${t} exceeds uint256`);return n.padStart(64,"0")}function gs(e,t){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`${t} is not a valid address`);return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function Nd(e){return zy+Tn(e.tokenId,"tokenId")+Tn(e.liquidity,"liquidity")+Tn(e.amount0Min,"amount0Min")+Tn(e.amount1Min,"amount1Min")+Tn(e.deadline,"deadline")}function _y(e){return Fy+Tn(e.tokenId,"tokenId")+gs(e.recipient,"recipient")+Tn(e.amount0Max,"amount0Max")+Tn(e.amount1Max,"amount1Max")}function Vy(e,t){return Uy+Tn(e,"amountMinimum")+gs(t,"recipient")}function Qy(e,t,n){return jy+gs(e,"token")+Tn(t,"amountMinimum")+gs(n,"recipient")}function qy(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let a=o.replace(/^0x/,"");if(a.length%2!==0||!/^[0-9a-fA-F]*$/.test(a))throw new Error("multicall element must be valid hex bytes");let i=a.length%64===0?a:a.padEnd(a.length+(64-a.length%64),"0");return Tn(BigInt(a.length/2),"callLength")+i.toLowerCase()}),n=BigInt(e.length)*32n,r=[];for(let o of t)r.push(Tn(n,"callOffset")),n+=BigInt(o.length/2);return Wy+Tn(0x20n,"arrayOffset")+Tn(BigInt(e.length),"arrayLength")+r.join("")+t.join("")}function Bf(e){if(!e||e==="0x")return null;let t=e.replace(/^0x/,"");return t.length<128||!/^[0-9a-fA-F]+$/.test(t)?null:{amount0:BigInt(`0x${t.slice(0,64)}`),amount1:BigInt(`0x${t.slice(64,128)}`)}}function zf(e){let t=Pf(e.token0,e.wcrossAddress),n=Pf(e.token1,e.wcrossAddress),r=t||n,o=[Nd({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),_y({tokenId:e.tokenId,recipient:r?e.positionManagerAddress:e.owner,amount0Max:Df,amount1Max:Df})];return r&&(o.push(Vy(0n,e.owner)),o.push(Qy(t?e.token1:e.token0,0n,e.owner))),qy(o)}async function Ff(e,t,n){let r;try{r=await Da(e,n)}catch{r=void 0}if(!r)return null;let o=Nd({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Br(r,t.positionManager,o,n,t.owner);return Bf(a)}var Ky=[1500,3e3,4500,6e3];function Zy(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Uf(){let{env:e,walletAddress:t,sendTransaction:n,estimateGas:r}=Dt(),o=!!n,a=Yy(),[i,s]=Nt.useState(!1),[l,d]=Nt.useState(null),[p,g]=Nt.useState("confirm"),[u,m]=Nt.useState(),[y,w]=Nt.useState(""),[f,c]=Nt.useState(!1),[h,b]=Nt.useState(new Set),x=Nt.useRef(void 0),k=Nt.useRef([]),R=Nt.useRef(0);Nt.useEffect(()=>()=>{clearTimeout(x.current),k.current.forEach(clearTimeout)},[]);let S=Nt.useRef(new Set),C=Nt.useCallback((M,F)=>{S.current.has(M)||(S.current.add(M),Ye("withdraw",M,{...F,tags:{section:"crossdPool",...F?.tags}}))},[]),N=Nt.useCallback(()=>{let M=()=>Xr(a);M(),k.current.forEach(clearTimeout),k.current=Ky.map(F=>setTimeout(M,F))},[a]),E=Nt.useCallback(M=>{R.current+=1,d(M),s(!0),g("confirm"),m(void 0),w(""),c(!1),S.current=new Set,C("opened")},[C]),A=Nt.useCallback(()=>{p!=="submitting"&&(R.current+=1,s(!1),d(null),g("confirm"),m(void 0),w(""),c(!1))},[p]),B=Nt.useCallback(async()=>{let M=R.current,F=Zy(t),ne=l?.position.token_id,ee=l?.position.liquidity,X=l?.detail.pool?.token0?.address,W=l?.detail.pool?.token1?.address;if(!F||!ne||!ee||!X||!W)return g("error"),w("Position data is incomplete. Please refresh and retry."),null;try{g("estimating"),w("");let Y=BigInt(ne),O=BigInt(ee),G=BigInt(Math.floor(Date.now()/1e3))+Of,te=Xu[e],_=await Ff(e,{owner:F,positionManager:te,tokenId:Y,liquidity:O,deadline:G});if(R.current!==M)return null;if(!_)return g("error"),w("Failed to estimate withdrawal amounts. Please retry."),null;let ae=zf({tokenId:Y,liquidity:O,amount0Min:Rd(_.amount0),amount1Min:Rd(_.amount1),deadline:G,owner:F,positionManagerAddress:te,token0:X,token1:W,wcrossAddress:Ju[e]}),be={to:te,value:0n,data:ae,chainId:Rt[e].cross},Me=null;if(r){try{Me=await r({...be,from:F})}catch{Me=null}if(R.current!==M)return null}return g("confirm"),{tx:be,estimate:Me,expectedAmount0:_.amount0,expectedAmount1:_.amount1}}catch(Y){return R.current!==M||(g("error"),w(Ea(Y,"Failed to prepare withdraw."))),null}},[e,r,l,t]),L=Nt.useCallback(async M=>{if(!n){g("error"),w("Withdraw is not available for this wallet.");return}try{g("submitting"),w(""),C("submitted");let F=await n({...M.tx,gas:M.estimate?.gasLimit&&M.estimate.gasLimit>0n?M.estimate.gasLimit:void 0,maxFeePerGas:M.estimate?.maxFeePerGas&&M.estimate.maxFeePerGas>0n?M.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:M.estimate?.maxPriorityFeePerGas&&M.estimate.maxPriorityFeePerGas>0n?M.estimate.maxPriorityFeePerGas:void 0});m(F),g("success");let ne=l?.position.token_id;ne&&b(ee=>{let X=new Set(ee);return X.add(ne),X}),C("confirmed"),N()}catch(F){g("error"),w(Ea(F,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:Dn(F)})}},[N,n,l,C]),U=Nt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),c(!0),clearTimeout(x.current),x.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:h,status:p,txHash:u,error:y,copied:f,hasEstimator:!!r,openWithdraw:E,closeWithdraw:A,prepareWithdraw:B,confirmWithdraw:L,copyHash:U,trackFunnelOnce:C}}import{Fragment as $y,jsx as In,jsxs as to}from"react/jsx-runtime";var Jy="ONEusd Pool",Wf="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Gf(){let{env:e,walletAddress:t,onOutlink:n}=Dt(),r=Vn(),o=!!t,{positions:a,isLoading:i}=If(e,t,o),s=Uf(),l=jf(()=>a.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[a,s.withdrawnTokenIds]),d=jf(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:p}=Ef(e,d,o&&d.length>0),g=`${Zu[e]}/pool`,{getTokenImage:u,getTokenSymbol:m,getNativeToken:y}=Nr(e,o),w=u("","ONEUSD",{chainOnly:!0})||`${Qn[e]}/crossd.png`,f={chainOnly:!0},c=(C,N)=>{let E=fd(m(C?.address??"",C?.symbol??N,f));return E==="ONE"?y()?.symbol??"?":E??"?"},h=(C,N)=>{let E=C?.symbol??N,A=fd(E);return A==="ONE"?y()?.image||Wf:u(C?.address??"",A,f)||C?.logo_url||Wf},b=s.target?.detail.pool,x=h(b?.token0,s.target?.position.pool?.token0_symbol),k=h(b?.token1,s.target?.position.pool?.token1_symbol),R=c(b?.token0,s.target?.position.pool?.token0_symbol),S=c(b?.token1,s.target?.position.pool?.token1_symbol);return to($y,{children:[In(qn,{sectionKey:"crossdPool",title:Jy,icon:w,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(C=>{let N=C.token_id?p.get(C.token_id):void 0,E=`${c(N?.pool?.token0,C.pool?.token0_symbol)}/${c(N?.pool?.token1,C.pool?.token1_symbol)}`,A=C.pool?.fee_tier_percentage,B=h(N?.pool?.token0,C.pool?.token0_symbol),L=h(N?.pool?.token1,C.pool?.token1_symbol),U=Ro(new Xy(C.position_value_usd??"0"),r),M=s.canWithdrawInline&&!!N?.pool?.token0?.address&&!!N?.pool?.token1?.address;return to("article",{className:"wp-item","data-side":"crossd",children:[to("div",{className:"wp-item-body",children:[to("div",{className:"wp-item-line",children:[In("span",{className:"wp-item-label",children:"Pool"}),to("div",{className:"wp-svc-token",children:[to("span",{className:"wp-token-stack","aria-hidden":!0,children:[In("img",{className:"wp-svc-token-icon",src:B,alt:""}),In("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),In("span",{children:E}),A&&In("span",{className:"wp-token-subtle",children:A})]})]}),to("div",{className:"wp-item-line",children:[In("span",{className:"wp-item-label",children:"Position Value"}),In("span",{className:"wp-line-value",children:U})]})]}),In("div",{className:"wp-item-tags",children:M?In("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{N&&s.openWithdraw({position:C,detail:N})},children:In("span",{className:"wp-tag-label",children:"Withdraw"})}):to("a",{className:"wp-tag wp-tag--muted",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:F=>Lt(F,g,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:N}},n),children:[In("span",{className:"wp-tag-label",children:"Withdraw"}),In(Bn,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),In(Lf,{open:s.isOpen,status:s.status,target:s.target,token0Icon:x,token1Icon:k,token0Symbol:R,token1Symbol:S,nativeSymbol:y()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var hs=["rewards","points","staking","gameSwap","forge","crossdPool"];ce(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-dim, #191d27);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-default, #1e232e);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #a392ff);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #2e2854);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #7346f3);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #f5f3ff);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40);background:var(--ds-surface-medium, var(--wp-control))}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
|
|
9
|
+
`);import{Fragment as tx,jsx as Xe,jsxs as jr}from"react/jsx-runtime";var Sd=15;function $o({env:e,theme:t="light",walletAddress:n,walletName:r,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:g,sendTransaction:u,estimateGas:m,conversionRatio:y,currencySymbol:w,sections:f}){let c=at(e),h=Ot.useCallback(le=>!f||f.includes(le),[f]),b=!!n,x=ex(),[k,R]=Ot.useState({}),S=Ot.useCallback((le,ge)=>{R(me=>{let Ke=me[le];return Ke&&Ke.loading===ge.loading&&Ke.empty===ge.empty?me:{...me,[le]:ge}})},[]),C=Ot.useCallback(le=>{R(ge=>{if(!(le in ge))return ge;let me={...ge};return delete me[le],me})},[]),N=Ot.useMemo(()=>({report:S,unregister:C}),[S,C]),[E,A]=Ot.useState(Sd),[B,L]=Ot.useState(!1),[U,M]=Ot.useState(!1),F=Ot.useRef(void 0),ne=Ot.useCallback(()=>{Xr(x)},[x]),ee=Ot.useCallback(()=>{ne(),L(!0),setTimeout(()=>L(!1),600),A(Sd)},[ne]);Ot.useEffect(()=>{if(!b||!i)return;let le=setInterval(()=>{A(ge=>ge<=1?(ee(),Sd):ge-1)},1e3);return()=>clearInterval(le)},[b,i,ee]);let X=Ot.useCallback(()=>{o?.()},[o]),W=b?Or(c,n,{size:64}):void 0,Y=Ot.useCallback(async()=>{if(!(U||!n))try{await navigator.clipboard.writeText(n),M(!0),clearTimeout(F.current),F.current=setTimeout(()=>M(!1),2e3)}catch{}},[n,U]);Ot.useEffect(()=>()=>clearTimeout(F.current),[]);let O=Ot.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:n,close:X,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:g,sendTransaction:u,estimateGas:m,conversionRatio:y,currencySymbol:w}),[c,t,n,X,d,p,g,u,m,y,w]),G=hs.filter(h),te=G.length>0&&G.every(le=>{let ge=k[le];return!!ge&&!ge.loading}),_=te&&G.every(le=>k[le]?.empty),ae=G.some(le=>{let ge=k[le];return!!ge&&!ge.empty}),be=G.length>0&&!te&&!ae,Me=jr(tx,{children:[a&&jr("div",{className:"wp-header",children:[jr("div",{className:"wp-header-account",children:[o&&Xe("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:Xe(Wu,{})}),Xe("span",{className:"wp-header-avatar","aria-hidden":!0,children:W&&Xe("img",{src:W,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(r||n)&&jr("div",{className:"wp-header-account-meta",children:[r&&Xe("span",{className:"wp-header-wallet-name",title:r,children:r}),n&&jr("button",{type:"button",className:"wp-header-address-btn",onClick:Y,"aria-label":"Copy wallet address","data-track":"address_copy",children:[Xe("span",{className:"wp-header-address",children:rs(n)}),Xe("span",{className:"wp-header-address-copy","data-copied":U,children:U?Xe(ar,{size:14}):Xe(Lr,{size:14})})]})]})]}),jr("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ee,children:[Xe(Gu,{className:B?"wp-spin-once":void 0}),b&&Xe("span",{className:"wp-refresh-badge",children:E})]})]}),Xe("div",{className:"wp-body",children:jr("div",{className:"wp-body-inner","data-empty":_||void 0,children:[h("rewards")&&Xe(ef,{}),h("points")&&Xe(pf,{}),h("staking")&&Xe(wf,{}),h("gameSwap")&&Xe(Cf,{}),h("forge")&&Xe(Tf,{}),h("crossdPool")&&Xe(Gf,{}),be&&Xe("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:Xe("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),_&&jr("div",{className:"wp-portfolio-empty",role:"status",children:[Xe("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:jr("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[Xe("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),Xe("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),Xe("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),Xe("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return Xe(Ma.Provider,{value:O,children:Xe(gd.Provider,{value:N,children:Xe(xe,{feature:"wallet_portfolio",children:s==="none"?Me:Xe("div",{className:ye(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:Me})})})})}import{jsx as Td,jsxs as Hf}from"react/jsx-runtime";function _f({className:e}){let{env:t,theme:n,walletAddress:r,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Dt();return Hf(bs.Portal,{children:[Td(bs.Overlay,{className:"wp-overlay"}),Hf(bs.Content,{className:ye("wp-fullscreen",e),"data-theme":n,children:[Td(bs.Title,{className:"wp-sr-only",children:"Portfolio"}),Td($o,{env:t,theme:n,walletAddress:r,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}import{jsx as Vf}from"react/jsx-runtime";function rx({env:e,theme:t="light",walletAddress:n,open:r,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:g,children:u}){let m=at(e),y=r!==void 0,[w,f]=So.useState(!1),c=y?r:w,h=So.useCallback(k=>{y||f(k),o?.(k)},[y,o]),b=So.useCallback(()=>h(!1),[h]),x=So.useMemo(()=>({env:m,theme:t,open:c,walletAddress:n,close:b,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:g}),[m,t,c,n,b,a,i,s,l,d,p,g]);return Vf(Ma.Provider,{value:x,children:Vf(nx.Root,{direction:"bottom",open:c,onOpenChange:h,noBodyStyles:!0,children:u})})}var Qf=Object.assign(rx,{Trigger:Uu,Content:_f});import*as de from"react";import{createPortal as Fa}from"react-dom";import lm from"bignumber.js";import*as ws from"react";var qf=120;function Yf(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Kf(){let[e,t]=ws.useState(!1);return ws.useEffect(()=>{let n=window.visualViewport,r=()=>n?.height??window.innerHeight,o=r(),a=()=>{let d=r();o=Math.max(o,d),t(o-d>qf)},i=()=>{o=r(),t(!1)},s=d=>{Yf(d.target)&&o-r()>qf&&t(!0)},l=d=>{Yf(d.target)&&t(!1)};return a(),n?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{n?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}import*as ys from"react";function xs(e,t=160){let[n,r]=ys.useState(e||null);return ys.useEffect(()=>{if(e){r(e);return}let o=window.setTimeout(()=>r(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||n,e?"open":"closed"]}import{jsx as no,jsxs as L7}from"react/jsx-runtime";function Zf({size:e=16,className:t}){return no("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:no("path",{d:"M2.667 8a5.333 5.333 0 1 0 1.562-3.771L2.667 5.79M2.667 2.667v3.124h3.124M8 5.333V8l1.667 1",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Xf({size:e=16,className:t}){return no("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:no("path",{d:"M2.667 4h4M9.333 4h4M6.667 2.667v2.666M2.667 12h4M9.333 12h4M9.333 10.667v2.666M2.667 8h1.666M7 8h6.333M4.333 6.667v2.666",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Id({size:e=20,className:t}){return no("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:no("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Jf({size:e=16,className:t}){return no("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:no("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as K from"react";import ox from"bignumber.js";function $f(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function em(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,ox.ROUND_DOWN).toFixed()}function ax(e){return e.fromToken.symbol.toLowerCase()===e.toToken.symbol.toLowerCase()||e.fromToken.chainId===e.toToken.chainId&&e.fromToken.address.toLowerCase()===e.toToken.address.toLowerCase()}function ix(e){let t=e.fromToken.priceUsd,n=e.toToken.priceUsd,r=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=gt(r);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:$f(t)&&$f(n)?e.lastChangedBy==="to"?{fromAmount:em(o.multipliedBy(n).dividedBy(t))}:{toAmount:em(o.multipliedBy(t).dividedBy(n))}:ax(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function tm({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(n){return e?e(n):ix(n)},async submitBridge(n){if(!t)throw new Error("Bridge submit handler is not configured.");return t(n)}}}var nm=15,sx=18,im="cross_bridge_terms_accepted",lx=3600*24*365;function dx(e){let t=e.replace(/[^\d.]/g,""),n=t.indexOf(".");n!==-1&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,""));let r=t.indexOf(".");if(r===-1)return t.slice(0,nm);let o=t.slice(0,r).slice(0,nm),a=t.slice(r+1).slice(0,sx);return`${o}.${a}`}function cx(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${im}=true`)}function px(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${im}=true`,"Path=/",`Max-Age=${lx}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function ux(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let n=r=>Math.floor(r*100)/100;if(t<3){let r=n(t*3);return String(r<1?1:r)}return"10"}function rm(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function fx(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let n=new Set([rm(e.symbol),rm(t.symbol)]);return n.has("ONE")&&n.has("ONEUSD")}function pr(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function vs(e){return e[0]}function Ed(e,t,n,r){if(n&&!pr(n,t))return n;let o=t?r?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??vs(e);let a=e.findIndex(s=>pr(s,t)),i=a>=0?e[a+1]:void 0;return i&&!pr(i,t)?i:e.find(s=>!pr(s,t))??t}function om({fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}}function ks(e,t=0){if(!e||t>5)return[];if(typeof e=="string")return[e];if(!(e instanceof Error)&&typeof e!="object")return[String(e)];let n=e;return[...[e instanceof Error?e.name:n.name,e instanceof Error?e.message:n.message,n.shortMessage,n.details,n.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...ks(n.cause,t+1),...ks(n.data,t+1),...ks(n.error,t+1)]}function Ad(e){let t=ks(e).join(" ").toLowerCase(),n=t.includes("signature_failed")&&(t.includes("\uD0C0\uC785 \uB370\uC774\uD130 \uC11C\uBA85\uC5D0 \uC2E4\uD328")||t.includes("typed data")||t.includes("signtypeddata"));return t.includes("4001")||t.includes("err_user_rejected")||t.includes("userrejectedrequesterror")||t.includes("user rejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("rejected the request")||t.includes("request rejected")||t.includes("action_rejected")||t.includes("rejected by user")||n}function am(e,t){return Ad(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
+
`)[0]?.trim()||t}function sm(e){let{tokens:t,initialFromToken:n,initialToToken:r,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:g,onSubmitted:u,onSuccess:m,onFailed:y,onExit:w}=e,f=K.useMemo(()=>tm({getQuote:p,submitBridge:g}),[p,g]),[c,h]=K.useState("form"),[b,x]=K.useState(n??vs(t)),[k,R]=K.useState(()=>Ed(t,n??vs(t),r,o)),[S,C]=K.useState(""),[N,E]=K.useState(""),[A,B]=K.useState("from"),[L,U]=K.useState(l),[M,F]=K.useState(null),ne=K.useMemo(()=>fx(b,k),[b,k]),ee=K.useMemo(()=>ne?"1":L==="auto"?ux(M?.priceImpact):L,[ne,L,M?.priceImpact]),[X,W]=K.useState(""),[Y,O]=K.useState("idle"),[G,te]=K.useState(""),[_,ae]=K.useState(null),[be,Me]=K.useState([]),[le,ge]=K.useState(!1),[me,Ke]=K.useState(cx),[ke,Qe]=K.useState(null),[pt,De]=K.useState(!1),[Ue,Be]=K.useState(null),[St,Ht]=K.useState(null),[ut,Tt]=K.useState(!1),[vt,_t]=K.useState(!1),kt=K.useRef(0),it=K.useRef(null),It=K.useRef(!1),et=K.useRef(!1),qt=K.useRef(!1),st=K.useRef(!1),nn=K.useRef(!1),_e=K.useRef(!1),ot=K.useRef(!1);K.useEffect(()=>{qt.current||(qt.current=!0,Ye("bridge","opened"))},[]);let Ze=K.useCallback(()=>{it.current&&(clearTimeout(it.current),it.current=null)},[]),Ct=K.useCallback(z=>{Ze(),Ht(z)},[Ze]);K.useEffect(()=>Ze,[Ze]),K.useEffect(()=>{let z=t.find(Re=>pr(Re,b))??vs(t),Ne=z?o?.(z,t):void 0,q=Ne?.find(Re=>pr(Re,k))??(Ne?void 0:t.find(Re=>pr(Re,k)))??Ed(t,z,void 0,o);x(z),R(q)},[o,t,b,k]);let bt=K.useCallback((z,Ne)=>{let q=dx(z);if(!q){kt.current+=1,C(""),E(""),B(Ne),F(null),W(""),O("idle");return}Ne==="from"?C(q):E(q),B(Ne),W(""),!nn.current&&Number(q)>0&&(nn.current=!0,Ye("bridge","amount_entered"))},[]),Ve=K.useCallback(()=>{kt.current+=1,C(""),E(""),B("from"),F(null),W(""),te(""),O("idle"),Qe(null),De(!1),Be(null),Tt(!1),Ct(null)},[Ct]),Yt=K.useCallback(z=>{pr(z,b)||(st.current||(st.current=!0,Ye("bridge","token_selected",{tags:{item_id:`from:${z.symbol}`}})),x(z),R(Ed(t,z,void 0,o)),Ve())},[b,o,Ve,t]),Kt=K.useCallback(z=>{pr(z,k)||pr(z,b)||(st.current||(st.current=!0,Ye("bridge","token_selected",{tags:{item_id:`to:${z.symbol}`}})),R(z),Ve())},[b,Ve,k]),Bt=K.useMemo(()=>b?o?.(b,t)??t.filter(z=>!pr(z,b)):[],[b,o,t]),Zt=K.useCallback(()=>{b?.balance&&bt(b.balance,"from")},[b?.balance,bt]),j=K.useCallback(()=>{!b||!k||(x(k),R(b),Ve())},[b,Ve,k]),ue=K.useCallback(()=>{kt.current+=1,C(""),E(""),B("from"),F(null),W(""),te("")},[]);K.useEffect(()=>{if(!b||!k)return;if(!S&&!N){F(null),W(""),O(q=>q==="quoting"?"idle":q);return}let z=++kt.current,Ne=om({fromToken:b,toToken:k,fromAmount:S,toAmount:N,lastChangedBy:A,slippage:L});O(q=>q==="submitting"?q:f.canQuote?"quoting":"idle"),(async()=>{try{let q=await f.getQuote(Ne);if(kt.current!==z)return;q.fromAmount!==void 0&&A==="to"&&C(q.fromAmount),q.toAmount!==void 0&&A==="from"&&E(q.toAmount),F(q.summary??null),W(q.error??"")}catch(q){if(kt.current!==z)return;W(q instanceof Error?q.message:"Failed to quote bridge.")}finally{kt.current===z&&O(q=>q==="quoting"?"idle":q)}})()},[S,b,A,f,L,N,k]);let he=K.useCallback(()=>!b||!k?null:om({fromToken:b,toToken:k,fromAmount:S,toAmount:N,lastChangedBy:A,slippage:ee}),[ee,S,b,A,N,k]),Ie=K.useCallback(async(z,Ne)=>{if(!It.current){It.current=!0,te(""),Tt(!1),De(!1),O("submitting");try{if(!Ne?.skipApprovalCheck&&a){let Re=await a(z);if(Re){Qe(Re),Be(z),O("idle");return}}Qe(null),Be(null),Ct("processing");let q=await f.submitBridge(z);ae(q),O("success"),Me(Re=>[{id:q.txHash,timestamp:new Date().toISOString(),txHash:q.txHash,fromToken:q.fromToken,toToken:q.toToken,fromAmount:q.fromAmount,toAmount:q.toAmount,summary:M??void 0,status:"pending"},...Re.filter(Ln=>Ln.txHash!==q.txHash)]),ue(),_t(!0),Ct(null),Tt(!0),Ye("bridge","confirmed"),_e.current=!1,ot.current=!1,u?.(q),m?.(q)}catch(q){if(Ct(null),Ye("bridge","confirmed",{status:"failure",reason:Dn(q)}),_e.current=!1,ot.current=!1,Ad(q)){O("idle");return}let Re=am(q,"Failed to submit bridge.");te(Re),O("error"),y?.({message:Re})}finally{It.current=!1}}},[a,y,u,m,f,ue,Ct,M]),tt=K.useCallback(async()=>{if(X)return;let z=he();if(z){if(_e.current||(_e.current=!0,Ye("bridge","submitted")),!me){Be(z),ge(!0);return}await Ie(z)}},[he,X,Ie,me]),zt=K.useCallback(async()=>{let z=Ue??he();z&&(px(),Ke(!0),ge(!1),await Ie(z))},[he,Ue,Ie]),Et=K.useCallback(()=>{ge(!1),Be(null)},[]),Cn=K.useCallback(async()=>{if(!(et.current||Y==="submitting"||!ke||!Ue||!i)){et.current=!0,te(""),O("submitting");try{await i(Ue,ke),ot.current||(ot.current=!0,Ye("bridge","approved")),Qe(null),O("idle"),De(!0)}catch(z){if(Ad(z)){O("idle");return}let Ne=am(z,"Failed to approve token.");te(Ne),O("error"),y?.({message:Ne})}finally{et.current=!1}}},[ke,i,y,Ue,Ie,Y]),Rn=K.useCallback(()=>{Y!=="submitting"&&(Qe(null),De(!1),Be(null),O("idle"))},[Y]),P=K.useCallback(async()=>{if(Y==="submitting")return;let z=Ue??he();if(!z){De(!1),te("Bridge input is no longer available. Please try again."),O("error");return}De(!1),await Ie(z,{skipApprovalCheck:!0})},[he,Ue,Ie,Y]),Ce=K.useCallback(()=>{Tt(!1)},[]),je=K.useCallback(z=>{h(z),z==="history"&&_t(!1)},[]),J=K.useCallback(()=>{if(c==="history"){je("form");return}w?.()},[w,je,c]),we=K.useMemo(()=>[...s,...be.filter(z=>!s.some(Ne=>Ne.txHash===z.txHash))],[s,be]);return{step:c,setStep:je,status:Y,error:G,quoteError:X,fromToken:b,toToken:k,tokens:t,availableToTokens:Bt,fromAmount:S,toAmount:N,lastChangedBy:A,slippage:L,effectiveSlippage:ee,slippageLocked:ne,setSlippage:U,summary:M,history:we,submitted:_,canSubmit:f.canSubmit,termsOpen:le,approvalInfo:ke,approvalSuccessOpen:pt,approveBridge:i,pendingSubmitInput:Ue,submitToast:St,successDialogOpen:ut,dismissSuccessDialog:Ce,hasNewHistory:vt,termsUrl:d,setFromToken:x,setToToken:R,selectFromToken:Yt,selectToToken:Kt,setAmount:bt,setMax:Zt,swapTokens:j,submit:tt,confirmTerms:zt,cancelTerms:Et,confirmApproval:Cn,cancelApproval:Rn,continueAfterApproval:P,back:J}}ce(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-default, #7e54f4)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #7e54f4);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-right-color:var(--ds-accent-primary-default, #7e54f4);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #7e54f4);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #7346f3);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #7e54f4)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #7346f3)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #7346f3);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
+
`);import{Fragment as na,jsx as v,jsxs as D}from"react/jsx-runtime";var mm=de.createContext(void 0);function Ua(){return de.useContext(mm)}function mx(e){let[t,n]=de.useState(void 0);return de.useEffect(()=>{let r=e.current;if(!r)return;let o=()=>{let i=r.closest("[data-theme]");n(i?.getAttribute("data-theme")??void 0)};o();let a=new MutationObserver(o);return a.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[e]),t}var dm=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],gx=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function hx(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function cm(e){let t=e.replace(/[^\d.]/g,""),[n="",...r]=t.split("."),o=r.join("");return r.length===0?n:`${n}.${o.slice(0,2)}`}function gm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function hm(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function pm(e,t){let n=Number(e||"0"),r=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(n)?n*r:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function bx(e,t=6){if(!e)return e;let[n,r=""]=e.split(".");if(!r)return n;let o=r.slice(0,t).replace(/0+$/,"");return o?`${n}.${o}`:n}function bm(e,t){if(!t)return!1;let n=gt(e),r=gt(t.balance);return!n||!r?!1:n.isGreaterThan(r)}function Oa(e){if(!e.isFinite()||e.isNaN())return"0";let n=e.decimalPlaces(6,lm.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[r="0",o]=n.split("."),a=new lm(r||"0").toFormat(0);return o?`${a}.${o}`:a}function wx(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function yx(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=r=>r.toString().padStart(2,"0");return[`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`].join(" ")}function xx(e){let t=gt(e);return t?Oa(t):e||"0"}function vx(e,t){if(t?.priceUsd===void 0)return null;let n=gt(e);if(!n)return null;let r=n.multipliedBy(t.priceUsd);return r.isFinite()?`$${r.toFormat(2)}`:null}function Ts(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function kx(e,t){return t==="all"?!0:Ts(e)===t}function Cx(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function ea(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function wm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ym(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":wm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function xm(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function Cs(e){return!e||e==="0"||Number(e)===0}function vm(e){let t=e.trim().toLowerCase();return t?t.startsWith("minimum ")?{from:e}:t.startsWith("available ")&&t.includes("or more")?{to:e}:t.includes("insufficient balance")||t.includes("not enough balance")||t.includes("exceeds balance")||t.includes("insufficient network fee")?{from:e}:t.includes("insufficient liquidity")||t.includes("not enough liquidity")?{to:e}:{}:{}}function km(e){let t=e.fromToken,n=e.toToken,r=ym(t,n),o=e.fromAmount||"0",a=e.toAmount||"0",i=r!==void 0&&!xm(r),s=r!==void 0&&r!=="bridge";return{pathType:r,bridgeInfo:i?[{label:"Route",value:t&&n?`${ea(t.chainId)} \u2192 ${ea(n.chainId)}`:"-"},{label:"Validator Fee",value:Cs(o)?"0":"Free",tone:Cs(o)?"default":"accent"},{label:"Network Fee",value:Cs(o)?"0":"Free",tone:Cs(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&n?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:n.symbol,iconUrl:n.iconUrl}]}:{label:"Route",value:"-"},{label:"Price Impact",value:"0%"},{label:"In Amount",value:o,valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Swap Fee",value:"0",valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Out Amount",value:a,valueToken:n?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0}]:void 0,txFee:[{label:"Priority Fee Per Gas",value:"0 Gwei"},{label:"Max Fee Per Gas",value:"0 Gwei"},{label:"Gas Limit",value:"0"}],txFeeInfo:{estTxFee:"0",isDelegateFee:!1}}}function Ba({token:e,size:t=20}){let n=e?.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":!!n?"true":"false",style:{width:t,height:t},children:n?v("img",{src:n,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function Rs(e,t){if(e.length===0)return;let n=e.findIndex(r=>wm(r,t));return e[(n+1)%e.length]}function um({label:e,token:t,amount:n,usd:r,onAmountChange:o,onTokenClick:a,locked:i=!1}){return D("section",{className:"bf-amount-panel",children:[D("div",{className:"bf-amount-head",children:[v("span",{children:e}),D("span",{className:"bf-balance",children:[hm(t?.balance??"0")," ",t?.symbol??""]})]}),D("div",{className:"bf-amount-main",children:[D("label",{className:"bf-amount-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:n,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":Cm(n)}),v("span",{className:"bf-amount-usd",children:r})]}),D("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Ba,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?gm(t):"none"),!i&&v(Gn,{size:16})]})]})]})}function Rx(e){if(!e)return"";let[t="",n]=e.replace(/,/g,"").split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n===void 0?r:`${r}.${n}`}function Cm(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function Nx(){return D("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[v("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),v("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function fm({label:e,token:t,amount:n,onAmountChange:r,onTokenClick:o,onMax:a,locked:i}){return D("section",{className:"bf-embedded-amount-panel",children:[D("div",{className:"bf-embedded-amount-head",children:[D("span",{className:"bf-embedded-amount-label",children:[v("strong",{children:e}),!(e==="From")&&v("em",{children:"estimated"})]}),t&&D("span",{className:"bf-embedded-balance",children:[v(Nx,{}),v("span",{className:"bf-embedded-balance-value",children:hm(t.balance)}),v("span",{children:t.symbol}),a&&v("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),D("div",{className:"bf-embedded-amount-main",children:[D("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[D("span",{className:"bf-token-pill-face",children:[v(Ba,{token:t}),v("span",{children:t?.symbol??"Select"})]},t?gm(t):"none"),!i&&v(Gn,{size:14})]}),D("label",{className:"bf-embedded-input-wrap",children:[D("span",{className:"bf-sr-only",children:[e," amount"]}),v("input",{type:"text",inputMode:"decimal",value:Rx(n),onChange:l=>r(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":Cm(n)})]})]})]})}function Sx({flow:e,onClose:t}){let n=de.useId(),[r,o]=de.useState(null),a=dm.find(w=>w.value===e.slippage),[i,s]=de.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,g=Number.isFinite(d)&&d>5&&!p,u=w=>{e.setSlippage(w),t()},m=()=>{!l||p||(e.setSlippage(cm(i)),t())};if(de.useEffect(()=>{o(document.body)},[]),de.useEffect(()=>{let w=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),!r)return null;let y=Ua();return Fa(v("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:w=>{w.target===w.currentTarget&&t()},children:D("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[D("header",{className:"bf-slippage-head",children:[v("h3",{id:n,children:"Slippage Settings"}),v("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:v(hn,{size:24})})]}),D("div",{className:"bf-slippage-body",children:[v("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),D("div",{className:"bf-slippage-controls",children:[v("div",{className:"bf-slippage-presets",children:dm.map(w=>v("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===w.value?"true":"false",onClick:()=>u(w.value),children:w.label},w.value))}),D("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[v("span",{className:"bf-sr-only",children:"Custom slippage percent"}),v("input",{value:i,onChange:w=>{s(cm(w.target.value))},onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),m())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),v("span",{"aria-hidden":"true",children:"%"})]})]}),p?v("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):g?v("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&v("button",{type:"button",className:"bf-slippage-apply",onClick:m,disabled:p,children:"Apply"})]})]})}),r)}function Rm({flow:e,env:t}){let n=de.useId(),[r,o]=de.useState(!1),[a,i]=de.useState(null),s=Ua(),l=Ut("apps.json",t,u=>Wn(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Np;de.useEffect(()=>{i(document.body)},[]),de.useEffect(()=>{let u=m=>{m.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[p,g]=xs(e.termsOpen);return!a||!p?null:Fa(v("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":g,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:D("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[v("h3",{id:n,children:"Agree to Terms of Service"}),v("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),D("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[v("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":r,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(u=>!u),children:v("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),D("div",{className:"bf-terms-copy",children:[v("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&v("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),v("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),v("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function Tx({value:e,disabled:t=!1}){let[n,r]=de.useState(!1);return v("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:n?"OK":"Copy"})}function Nm({flow:e,approval:t}){let n=de.useId(),[r,o]=de.useState(null),a=Ua();de.useEffect(()=>{o(document.body)},[]),de.useEffect(()=>{if(!t)return;let p=g=>{e.status!=="submitting"&&g.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=xs(t);if(!r||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return Fa(v("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:D("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[D("h3",{id:n,children:["Approve ",i.token.symbol]}),v(Ba,{token:i.token,size:72}),D("div",{className:"bf-approve-address-box",children:[v("span",{children:"Token Address"}),D("div",{children:[v("strong",{children:i.tokenAddress}),v(Tx,{value:i.tokenAddress,disabled:d})]})]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:d?"Approving...":"Approve"})]})]})]})}),r)}function Sm({flow:e}){let t=de.useId(),[n,r]=de.useState(null),o=Ua();de.useEffect(()=>{r(document.body)},[]),de.useEffect(()=>{if(!e.approvalSuccessOpen)return;let l=d=>{d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]);let[a,i]=xs(e.approvalSuccessOpen);if(!n||!a)return null;let s=e.status==="submitting";return Fa(v("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:D("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[v("h3",{id:t,children:"Approval Success"}),v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",v("br",{}),"Please continue to the next step."]}),D("div",{className:"bf-action-buttons",children:[v("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),D("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&v("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),v("span",{children:s?"Continuing...":"Continue"})]})]})]})}),n)}function Ix({fromAmount:e,toAmount:t,fromToken:n,toToken:r}){let o=de.useMemo(()=>{let i=gt(e),s=gt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&n&&r&&n.symbol!==r.symbol);return v(Pa,{open:a,children:D("div",{className:"bf-exchange-rate",children:[D("span",{children:["1 ",n?.symbol]}),v("span",{"aria-hidden":"true",children:"="}),D("span",{children:[o?Oa(o):""," ",r?.symbol]})]})})}function Tm({flow:e}){return e.submitToast?D("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-spinner"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Transaction Processing"}),v("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function Im({message:e}){let[t,n]=de.useState(!1);return de.useEffect(()=>{if(!e){n(!1);return}n(!0);let r=window.setTimeout(()=>{n(!1)},3500);return()=>window.clearTimeout(r)},[e]),!e||!t?null:D("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[v("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:v("span",{className:"bf-status-error-mark",children:"!"})}),D("span",{className:"bf-status-toast-copy",children:[v("strong",{children:"Error"}),v("span",{children:e})]})]})}function Ex(e){switch(e){case"swap":case"deposit-swap":case"swap-withdraw":return"Swap Transaction Sent";case"bridge":return"Bridge Transaction Sent";case"swap-bridge":return"Swap & Bridge Transaction Sent";case"bridge-swap":return"Bridge & Swap Transaction Sent";default:return"Transaction Sent"}}function Em({flow:e}){let t=de.useId(),[n,r]=de.useState(null),o=e.submitted,a=Ua();return de.useEffect(()=>{r(document.body)},[]),de.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!n||!e.successDialogOpen||!o?null:Fa(v("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:v("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:D("div",{className:"bf-success-body",children:[v("span",{className:"bf-success-mark","aria-hidden":"true"}),D("div",{className:"bf-success-copy",children:[v("strong",{id:t,children:Ex(o.pathType)}),v("span",{children:"Please check the results in the history."})]}),v("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>D(de.Fragment,{children:[s>0&&v("span",{className:"bf-success-route-arrow",children:"\u2192"}),v(za,{token:i,size:43})]},`${i.symbol}-${s}`))}),v("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),n)}function za({token:e,size:t=16}){let n=!!e.iconUrl;return v("span",{className:"bf-token-icon","data-has-image":n?"true":"false",style:{width:t,height:t},children:e.iconUrl?v("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):v("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function Ax({row:e}){return e.routeTokens&&e.routeTokens.length>0?v("span",{className:"bf-info-route",children:e.routeTokens.map((t,n)=>D(de.Fragment,{children:[n>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(za,{token:t})]},`${t.symbol}-${n}`))}):e.valueToken?D("span",{className:"bf-info-value-token",children:[v(za,{token:e.valueToken}),v("span",{children:e.value})]}):v(na,{children:e.value})}function Am({rows:e}){return!e||e.length===0?null:v("div",{className:"bf-info-rows",children:e.map(t=>D("div",{className:"bf-info-row",children:[v("span",{className:"bf-info-label",children:t.label}),v("span",{className:"bf-info-value","data-tone":t.tone??"default",children:v(Ax,{row:t})})]},`${t.label}-${t.value}`))})}function Mx(e,t,n){return e.pathType==="bridge"?"Bridge Info":xm(e.pathType)?"Swap Info":t&&n?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Pa({open:e,className:t,children:n}){let r=de.useRef(null);return e&&(r.current=n),v("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:v("div",{className:"bf-collapse-inner",children:e?n:r.current})})}function Lx({summary:e,from:t,to:n,feeDelegated:r}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=Mx(e,o,a),[l,d]=de.useState(!0),[p,g]=de.useState(!0);return D("div",{className:"bf-details",children:[e.liquidity&&D("section",{className:"bf-liquidity",children:[D("div",{className:"bf-liquidity-head",children:[v("span",{children:e.liquidity.label??"Available Liquidity"}),v("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),v("div",{className:"bf-liquidity-track",children:v("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&D("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:s}),v(Gn,{size:16,className:"bf-collapse-chevron"})]}),l&&v("div",{className:"bf-collapse-body",children:v(Dm,{summary:e,from:t,to:n,feeDelegated:r})})]}),i&&D("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[D("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>g(u=>!u),"data-track":"details_toggle",children:[v("h3",{children:"Est. Tx Fee"}),D("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&v("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&v("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),v("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:bx(e.txFeeInfo?.estTxFee??"0")}),v(Gn,{size:16,className:"bf-collapse-chevron"})]})]}),p&&v("div",{className:"bf-collapse-body",children:v(Am,{rows:e.txFee})})]})]})}function Dx(e){return{...e,bridgeInfo:e.bridgeInfo?.map(t=>({...t,value:t.label==="Route"?t.value.replace(/\bCROSS\b/g,"ONEchain"):t.value})),swapInfo:e.swapInfo?.map(t=>({...t,label:t.label.startsWith("Swap Fee")?"Est. Swap Fee":t.label}))}}function Ns(e){let t=gt(e);if(!(!t||t.lte(0)))return Oa(t)}function Px(e,t,n,r){if(!n||!r)return;let o=gt(e),a=gt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${n.symbol} = ${Oa(i)} ${r.symbol}`;let s=o.dividedBy(a);return`1 ${r.symbol} = ${Oa(s)} ${n.symbol}`}var Ox=1,Bx=5;function Mm(e){return gt(e)?.toNumber()??null}function Lm(e){let t=Mm(e);if(t!==null){if(t>=Bx)return"danger";if(t>=Ox)return"warning"}}var zx=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Fx=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Ux=/fee/i,jx=/impact|rate|slippage|minimum|min\.|received/i,Ss=/impact/i,Wx=/^route$/i;function Gx(e,t,n){let r=e.find(p=>zx.test(p.label)),o=e.find(p=>Fx.test(p.label)),a=new Set;r&&a.add(r),o&&a.add(o);let i=e.find(p=>Wx.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let g=Ux.test(p.label);if(!g&&!jx.test(p.label))continue;a.add(p);let u=Mm(p.value),m=g&&(u===0||/^\s*free\s*$/i.test(String(p.value??"")));m&&t==="swap"||d.push({text:m?`${p.label} Free`:`${p.label} ${p.value}`,tone:m?"accent":Ss.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:Lm(p.value):void 0})}return{key:t,label:n,routeText:l,routeTokens:s,inRow:r,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function Hx({steps:e}){return v("div",{className:"bf-route-steps",children:e.map((t,n)=>D("div",{className:"bf-route-step","data-last":n===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[D("span",{className:"bf-route-rail","aria-hidden":"true",children:[v("span",{className:"bf-route-line"}),v("span",{className:"bf-route-dot","data-final":n===e.length-1?"true":"false"})]}),D("span",{className:"bf-route-body",children:[D("span",{className:"bf-route-head",children:[v("span",{className:"bf-route-title",children:t.title}),v("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((r,o)=>D(de.Fragment,{children:[o>0&&v("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),v(za,{token:r})]},`${r.symbol}-${o}`)):D(na,{children:[t.amountToken&&v(za,{token:t.amountToken}),v("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&D("span",{className:"bf-route-meta",children:[t.meta.map(r=>v("span",{"data-tone":r.tone??"default",children:r.text},r.text)),t.tags.map(r=>v("span",{className:"bf-route-tag",children:r},r))]})]})]},t.key))})}function _x(e){if(!Ss.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=Lm(e.value);return t?{...e,tone:t}:e}function Dm({summary:e,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=de.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([k,R])=>{let S=k==="swap"?e.swapInfo:e.bridgeInfo;return S?.length?Gx(S,k,R):null}).filter(k=>k!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),g=l.inRow?.value??n?.amount,u=d.outRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),m=d.outRow?.value??r?.amount;if(!g)return null;let y=e.txFeeInfo,w=a&&y&&!y.isDelegateFee?[{text:`Gas ${y.estTxFee}${y.tokenSymbol?` ${y.tokenSymbol}`:""}`}]:[],f=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:g,amountToken:p,routeTokens:f?void 0:l.routeTokens,meta:[...w.length?[{text:"EST."}]:n?.chain?[{text:`on ${n.chain}`}]:[],...w,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(x=>!Ss.test(x.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(x=>({key:`hop-${x.key}`,title:x.label,amount:x.routeText??"",routeTokens:x.routeTokens,meta:x.meta,tags:i&&x.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:m??"\u2014",amountToken:u,meta:[...r?.chain?[{text:`on ${r.chain}`}]:[],...f?[]:l.meta.filter(x=>Ss.test(x.text))],tags:[]}],h=[...s.flatMap(x=>x.rest),...a?e.txFee??[]:[]].map(_x),b=!!t;return D(na,{children:[v(Hx,{steps:c}),(h.length>0||b)&&v("div",{className:"bf-info-section",children:v(Am,{rows:[...b?[{label:"Rate",value:t}]:[],...h]})})]})}function Vx({summary:e,rateLine:t,from:n,to:r,feeDelegated:o}){let a=de.useMemo(()=>Dx(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:v("div",{className:"bf-embedded-details",children:v(Dm,{summary:a,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:!0})})}function Qx({flow:e,env:t,toastError:n}){return D(na,{children:[v(Rm,{flow:e,env:t}),v(Nm,{flow:e,approval:e.approvalInfo??null}),v(Sm,{flow:e}),v(Tm,{flow:e}),v(Im,{message:e.submitToast?"":n}),v(Em,{flow:e})]})}function qx({flow:e,env:t,isConnected:n,onRequestConnect:r,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=de.useMemo(()=>a?e.summary??km(e):null,[a,e]),s=vm(e.quoteError),l=bm(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),g=p?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",m=e.error||u,y=e.status==="submitting",w=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||y,f=y?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return D(na,{children:[v("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:D("div",{className:"bf-embedded-form",children:[D("div",{className:"bf-embedded-fields",children:[D("div",{className:"bf-embedded-field-group",children:[v(fm,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=Rs(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&v("div",{className:"bf-embedded-field-error",children:d})]}),v("div",{className:"bf-embedded-direction","aria-hidden":"true",children:v("span",{children:v(Id,{size:16})})}),D("div",{className:"bf-embedded-field-group",children:[v(fm,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=Rs(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),g&&v("div",{className:"bf-embedded-field-error",children:g})]})]}),v(Pa,{open:!!i?.liquidity,children:i?.liquidity&&D("section",{className:"bf-embedded-liquidity",children:[D("div",{children:[v("span",{children:i.liquidity.label??"Available Liquidity"}),v("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),v("span",{className:"bf-embedded-liquidity-track",children:v("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),v(Pa,{open:p&&a,children:v("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),v(Pa,{open:!!i,children:i&&v("div",{className:"bf-embedded-summary",children:v(Vx,{summary:i,feeDelegated:o,rateLine:Px(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Ns(e.fromAmount),chain:e.fromToken?ea(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Ns(e.toAmount),chain:e.toToken?ea(e.toToken.chainId):void 0}})})}),v("div",{className:"bf-embedded-action-footer",children:n?v("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:w,"aria-busy":y,"aria-label":y?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:y?v("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):v("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),v(Qx,{flow:e,env:t,toastError:m})]})}function Yx({item:e}){let t=Ts(e),n=vx(e.fromAmount,e.fromToken);return D("article",{className:"bf-history-item",children:[D("div",{className:"bf-history-item-head",children:[v("span",{className:"bf-history-status","data-status":t,children:Cx(t)}),v("time",{className:"bf-history-time",dateTime:e.timestamp,children:yx(e.timestamp)})]}),D("div",{className:"bf-history-item-body",children:[D("strong",{className:"bf-history-amount",children:[xx(e.fromAmount)," ",e.fromToken.symbol]}),D("div",{className:"bf-history-meta",children:[v("span",{className:"bf-history-usd",children:n??wx(e.txHash)}),D("span",{className:"bf-history-route",children:[D("span",{className:"bf-history-route-token",children:[v(Ba,{token:e.fromToken,size:16}),v("span",{children:e.fromToken.symbol})]}),v(Jf,{size:16,className:"bf-history-route-arrow"}),D("span",{className:"bf-history-route-token",children:[v(Ba,{token:e.toToken,size:16}),v("span",{children:e.toToken.symbol})]})]})]})]})]})}function Kx({flow:e}){let[t,n]=de.useState("all"),r=e.history.some(i=>Ts(i)==="pending"),o=e.history.filter(i=>kx(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return D("main",{className:"bf-history-body",children:[v("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:gx.map(i=>D("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>n(i.value),"data-track":"history_filter","data-track-id":i.value,children:[v("span",{children:i.label}),i.value==="pending"&&r&&v("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?v("div",{className:"bf-history-list",children:o.map(i=>v(Yx,{item:i},i.id||i.txHash))}):v("div",{className:"bf-empty",children:a})]})}function Zx({flow:e,env:t,feeDelegated:n}){let[r,o]=de.useState(!1),[a,i]=de.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=de.useMemo(()=>s?e.summary??km(e):null,[s,e]),d=Ut("apps.json",t,h=>Wn(h?.bridgePoweredBy?.url,t)),p=vm(e.quoteError),g=bm(e.fromAmount,e.fromToken),u=g?"Insufficient balance":p.from,m=e.quoteError&&!p.from&&!p.to?e.quoteError:"",y=e.error||m,w=e.history.some(h=>Ts(h)==="pending"),c=(l?.pathType??ym(e.fromToken,e.toToken))!=="bridge";return D(na,{children:[D("main",{className:"bf-body",children:[D("div",{className:"bf-toolbar",children:[D("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[v(Zf,{}),v("span",{children:"History"}),(w||e.hasNewHistory)&&v("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&D("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":r,children:[v(Xf,{}),v("span",{children:e.slippageLocked?"Auto 1%":hx(e.slippage,e.effectiveSlippage)})]})]}),D("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[v(um,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:pm(e.fromAmount,e.fromToken),onAmountChange:h=>e.setAmount(h,"from"),onTokenClick:()=>{let h=Rs(e.tokens,e.fromToken);h&&e.selectFromToken(h)},locked:e.tokens.length<=1}),u&&v("div",{className:"bf-field-error",children:u}),v("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(h=>h+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:v(Id,{size:22})}),v(um,{label:"To",token:e.toToken,amount:e.toAmount,usd:pm(e.toAmount,e.toToken),onAmountChange:h=>e.setAmount(h,"to"),onTokenClick:()=>{let h=Rs(e.availableToTokens,e.toToken);h&&e.selectToToken(h)},locked:e.availableToTokens.length<=1}),p.to&&v("div",{className:"bf-field-error",children:p.to})]}),v(Ix,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),v(Pa,{open:!!l,children:l&&v(Lx,{summary:l,feeDelegated:n,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Ns(e.fromAmount),chain:e.fromToken?ea(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Ns(e.toAmount),chain:e.toToken?ea(e.toToken.chainId):void 0}})})]}),D("footer",{className:"bf-footer",children:[v("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||g,children:e.status==="submitting"?"Processing...":"Next"}),d&&D("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",v("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&v(Sx,{flow:e,onClose:()=>o(!1)}),v(Rm,{flow:e,env:t}),v(Nm,{flow:e,approval:e.approvalInfo??null}),v(Sm,{flow:e}),v(Tm,{flow:e}),v(Im,{message:e.submitToast?"":y}),v(Em,{flow:e})]})}function ta({onClose:e,onBackToWallet:t,feeDelegated:n,env:r,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=de.useMemo(()=>at(r),[r]),g=Kf(),u=sm({...d,onExit:t}),m=de.useRef(null),y=mx(m),w=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,c=o==="embedded"&&u.step==="form"&&!t?null:u.back;return v(xe,{feature:"bridge",children:v(mm.Provider,{value:y,children:D("div",{ref:m,className:ye("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&g?"true":"false",children:[D("header",{className:"bf-header",children:[c?v("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:v(On,{size:24})}):v("span",{className:"bf-header-spacer","aria-hidden":"true"}),v("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:w}),v("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close","data-wi-close":!0,children:v(hn,{size:24})})]}),u.step==="history"?v(Kx,{flow:u}):o==="embedded"?v(qx,{flow:u,env:p,isConnected:f,onRequestConnect:s,feeDelegated:n}):v(Zx,{flow:u,env:p,feeDelegated:n})]})})})}import*as pn from"react";import fv from"bignumber.js";import{useInfiniteQuery as Xx}from"@tanstack/react-query";var Jx="token-history";function Pm(e,t,n,r,o=!0){return Xx({queryKey:[Jx,e,t,n.toLowerCase(),r.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Se("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:n,wallet:r}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let g=await p.json();if(g.code!==200)throw new Error(`Token history API error: ${g.code}`);return g.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!r&&!!n&&t>0,staleTime:1e4})}import*as Is from"react";var Md={chart:!1,balance:!0,overview:!1,social:!1,history:!0},$x=Object.keys(Md);function Om(e){let[t,n]=Is.useState({visibility:Md,isLoaded:!1});return Is.useEffect(()=>{let r=!0;return Mr(wi,e).then(o=>{if(!r)return;let a=o?.tokenDetail?.sections,i={...Md};if(a)for(let s of $x){let l=a[s];typeof l=="boolean"&&(i[s]=l)}n({visibility:i,isLoaded:!0})}),()=>{r=!1}},[e]),t}import*as xn from"react";import{useQuery as ev,keepPreviousData as tv}from"@tanstack/react-query";var nv="token-price-history";function Bm(e,t,n,r,o=!0){return ev({queryKey:[nv,e,t,n.toLowerCase(),r],queryFn:async({signal:a})=>{let i=await Se("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:n,interval:r}),l=await fetch(`${i}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token price history API error: ${d.code}`);return d.data??[]},enabled:o&&!!n&&t>0,staleTime:3e4,placeholderData:tv})}import{Fragment as pv,jsx as sn,jsxs as ra}from"react/jsx-runtime";var rv="var(--ds-system-green-high, #00a869)",ov="var(--wi-error, #e70077)",To=150,Es=3,Ld=18,av=18,iv=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],sv=new Set(["7d","30d","1y"]);function lv(){let e=xn.useRef(null),[t,n]=xn.useState(0);return xn.useEffect(()=>{let r=e.current;if(!r)return;let o=new ResizeObserver(a=>{n(a[0]?.contentRect.width??0)});return o.observe(r),n(r.clientWidth),()=>o.disconnect()},[]),[e,t]}function dv(e,t){let n=new Date(e*1e3),r=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",r).format(n)}function cv(e,t){if(t<=0||e.length===0)return null;let n=e.length===1?[e[0],e[0]]:e,r=n.length,o=n[0],a=n[0],i=0,s=0;for(let h=1;h<r;h++)n[h]>o&&(o=n[h],i=h),n[h]<a&&(a=n[h],s=h);let l=o-a||1,d=Math.max(1,t-Es*2),p=To-Ld-av,g=h=>r===1?t/2:Es+h/(r-1)*d,u=h=>Ld+(1-(h-a)/l)*p,m=n.map((h,b)=>({x:g(b),y:u(h)})),y=m.map((h,b)=>`${b===0?"M":"L"}${h.x.toFixed(2)},${h.y.toFixed(2)}`).join(" "),w=m[0],f=m[m.length-1],c=`${y} L${f.x.toFixed(2)},${To} L${w.x.toFixed(2)},${To} Z`;return{values:n,points:m,linePath:y,areaPath:c,maxIdx:i,minIdx:s}}function zm({env:e,chainId:t,tokenAddress:n}){let[r,o]=xn.useState("1d"),[a,i]=xn.useState(null),s=xn.useId(),[l,d]=lv(),{data:p,isLoading:g,isError:u}=Bm(e,t,n,r,!0),m=xn.useMemo(()=>(p??[]).filter(F=>Number.isFinite(Number(F.price))).slice().sort((F,ne)=>F.updated_at-ne.updated_at),[p]),y=xn.useMemo(()=>m.map(M=>Number(M.price)),[m]),w=xn.useMemo(()=>cv(y,d),[y,d]);xn.useEffect(()=>{i(null)},[r]);let f=m.length>0,c=a!==null&&a<y.length?a:y.length-1,h=f?y[c]:0,b=f?y[0]:0,x=b!==0?(h-b)/b*100:0,k=x>=0,R=k?rv:ov,S=(k?"+":"-")+(Math.floor(Math.abs(x)*100)/100).toFixed(2)+"%",C=a!==null&&m[a]?dv(m[a].updated_at,sv.has(r)):"",N=M=>{if(!w||d<=0)return;let F=M.currentTarget.getBoundingClientRect(),ne=M.clientX-F.left;if(w.values.length<=1){i(0);return}let X=Math.max(1,d-Es*2),W=Math.min(1,Math.max(0,(ne-Es)/X)),Y=Math.round(W*(m.length-1));i(Math.min(m.length-1,Math.max(0,Y)))},E=()=>i(null);if(!g&&(u||!f))return null;let A=a!==null&&w&&w.points[a]?w.points[a]:null,B=w?.points[w.maxIdx],L=w?.points[w.minIdx],U=M=>Math.min(Math.max(M,24),Math.max(24,d-24));return ra("section",{className:"wi-td-chart",children:[ra("div",{className:"wi-td-chart-panel",children:[sn("span",{className:"wi-td-chart-price",children:f?vo(h):"\u2014"}),f&&ra("span",{className:"wi-td-chart-change","data-positive":k,children:[sn("span",{children:S}),C&&sn("span",{className:"wi-td-chart-when",children:C})]})]}),sn("div",{ref:l,className:"wi-td-chart-plot",children:g&&!f?sn("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):w&&d>0&&ra("svg",{className:"wi-td-chart-svg",width:d,height:To,role:"img","aria-label":"Price chart",children:[sn("defs",{children:ra("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[sn("stop",{offset:"0%",stopColor:R,stopOpacity:.28}),sn("stop",{offset:"100%",stopColor:R,stopOpacity:0})]})}),sn("path",{d:w.areaPath,fill:`url(#${s})`}),sn("path",{d:w.linePath,fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),B&&sn("text",{className:"wi-td-chart-minmax",x:U(B.x),y:Math.max(11,B.y-7),textAnchor:"middle",children:vo(w.values[w.maxIdx])}),L&&w.minIdx!==w.maxIdx&&sn("text",{className:"wi-td-chart-minmax",x:U(L.x),y:Math.min(To-5,L.y+14),textAnchor:"middle",children:vo(w.values[w.minIdx])}),A&&ra(pv,{children:[sn("line",{className:"wi-td-chart-cursor",x1:A.x,y1:Ld-6,x2:A.x,y2:To}),sn("circle",{cx:A.x,cy:A.y,r:4,fill:R,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),sn("rect",{x:0,y:0,width:d,height:To,fill:"transparent",style:{touchAction:"none"},onPointerMove:N,onPointerDown:N,onPointerLeave:E,onPointerCancel:E})]})}),sn("div",{className:"wi-td-chart-tabs",role:"tablist",children:iv.map(M=>sn("button",{type:"button",role:"tab","aria-selected":r===M.key,className:"wi-td-chart-tab","data-active":r===M.key||void 0,onClick:()=>o(M.key),"data-track":"token_detail_interval","data-track-id":M.key,children:M.label},M.key))})]})}var uv="0x0000000000000000000000000000000000000000";function Dd(e){return e?.toLowerCase().includes("bridge")??!1}function Fm(e,t){return Dd(e.to_alias)?"bridge-out":Dd(e.from_alias)||e.from?.toLowerCase()===uv&&Dd(e.tx_to_alias)?"bridge-in":e.to?.toLowerCase()===t.toLowerCase()?"receive":"send"}function Um(e){return e==="receive"||e==="bridge-in"}import{Fragment as Gm,jsx as re,jsxs as dt}from"react/jsx-runtime";var mv="https://contents.crosstoken.io/wallet/token/images/FT.png",gv={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function hv(e){return e.length>24?"xs":e.length>18?"sm":"md"}function bv(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m`;let o=Math.floor(r/60);if(o<24)return`about ${o}h`;let a=Math.floor(o/24);if(a<30)return`${a}d`;let i=Math.floor(a/30);return i<12?`${i}mo`:`${Math.floor(i/12)}y`}function jm(e){let[t,n]=e.split("."),r="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(r+=","),r+=t[o]}return n?`${r}.${n}`:r}function Wm(e,t){let n=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=n/i,l=n%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let r=n/10n**BigInt(t-2),o=r/100n,a=r%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function wv(e,t,n){let r=pn.useRef(null),o=pn.useRef(null),[a,i]=pn.useState(t);return pn.useLayoutEffect(()=>{let s=r.current,l=o.current;if(!s||!l)return;let d=()=>{let g=s.clientWidth;if(!g)return;let u=window.getComputedStyle(l),m=document.createElement("span");m.textContent=l.textContent,m.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(m);let y=m.offsetWidth;if(document.body.removeChild(m),y<=g){i(t);return}let w=Math.max(n,Math.floor(t*g/y));i(w)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,n]),{containerRef:r,textRef:o,fontSize:a}}function yv(e){let t=gt(e);return t?t.decimalPlaces(4,fv.ROUND_DOWN).toFormat():"-"}function xv(){return dt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[re("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),re("path",{d:"M3 12h18M12 3c2.5 2.5 3.8 5.8 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.8-3.8-9S9.5 5.5 12 3Z",stroke:"currentColor",strokeWidth:"1.6"})]})}function vv(){return re("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M21.9 4.3 18.6 20c-.2 1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-4.9 9-8.1c.4-.3-.1-.5-.6-.2L6.2 13.2l-4.8-1.5c-1-.3-1-1 .2-1.5L20.6 3c.9-.3 1.6.2 1.3 1.3Z"})})}function kv(){return re("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M18.9 2H22l-7.3 8.3L23.3 22h-6.8l-5.3-6.9L5.1 22H2l7.8-8.9L1 2h6.9l4.8 6.4L18.9 2Zm-1.2 18h1.9L7.2 4H5.2l12.5 16Z"})})}function Cv(){return re("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:re("path",{d:"M6.9 6.5c0-.2-.1-.5-.3-.6L4.6 3.6V3.3h6.3l4.9 10.7 4.3-10.7H26v.3l-1.8 1.7c-.2.1-.2.3-.2.5v12.4c0 .2 0 .4.2.5l1.7 1.7v.3h-8.7v-.3l1.8-1.7c.2-.2.2-.2.2-.5V8.1l-5 12.6h-.7L7.9 8.1v8.5c0 .3.1.6.3.8l2.3 2.8v.3H4v-.3l2.3-2.8c.2-.2.3-.5.3-.8V6.5Z",transform:"scale(0.85)"})})}function Hm({env:e,isMobile:t,token:n,walletAddress:r,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let g=n.quantity.decimals,[u,m]=pn.useState(!1),{buildTxUrl:y,chainInfo:w}=Oi(e,n.chainId,!0),{visibility:f}=Om(e),{data:c,isLoading:h,isError:b,fetchNextPage:x,hasNextPage:k,isFetchingNextPage:R,refetch:S}=Pm(e,n.chainId,n.address,r,!0),C=pn.useMemo(()=>c?.pages?c.pages.flat():[],[c]),N=pn.useRef(null);pn.useEffect(()=>{if(!t)return;let G=N.current;if(!G||!k)return;let te=new IntersectionObserver(_=>{_[0]?.isIntersecting&&!R&&x()},{rootMargin:"120px"});return te.observe(G),()=>te.disconnect()},[t,k,R,x]);let E=pn.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(n.address).then(()=>{m(!0),setTimeout(()=>m(!1),1500)}).catch(()=>{})},[n.address]),A=jm(Wm(n.quantity.numeric,g)),B=o?.price?Li(n.quantity.numeric,g,o.price):null,L=i?A:"\u2022\u2022\u2022\u2022",{containerRef:U,textRef:M,fontSize:F}=wv(L,30,14),ee=bo(n.chainId,e).name??w?.name??`Chain ${n.chainId}`,X=w?.explorer_url,W=a?.deployed??!0,Y=pn.useMemo(()=>{let G=[];return a?.info_url&&G.push({key:"web",label:"Website",url:a.info_url,icon:re(xv,{})}),a?.telegram_url&&G.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:re(vv,{})}),a?.x_url&&G.push({key:"x",label:"X",url:a.x_url,icon:re(kv,{})}),a?.medium_url&&G.push({key:"medium",label:"Medium",url:a.medium_url,icon:re(Cv,{})}),G},[a]),O=(G,te,_,ae)=>{Lt(G,te,{category:"token-detail",origin:_,payload:{address:n.address,txHash:ae}},p)};return dt(Gm,{children:[dt("div",{className:"wi-sticky-header",children:[dt("div",{className:"wi-header wi-header--receive",children:[re("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:re(On,{size:24})}),dt("span",{className:"wi-td-header-title",children:[re("img",{src:n.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:G=>{G.currentTarget.src=mv}}),re("span",{className:"wi-td-header-name",children:n.symbol})]}),re("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:re(hn,{size:24})})]}),re("hr",{className:"wi-divider"})]}),dt("div",{className:"wi-td-scroll",children:[f.chart&&re(zm,{env:e,chainId:n.chainId,tokenAddress:n.address}),f.balance&&dt("section",{className:"wi-td-balance-card",children:[dt("div",{className:"wi-td-balance-left",ref:U,children:[re("span",{className:"wi-td-balance-label",children:"My Balance"}),re("span",{className:"wi-td-balance-amount",ref:M,style:{fontSize:F},children:L}),i&&B&&re("span",{className:"wi-td-balance-fiat",children:B})]}),re("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(n),"aria-label":`Send ${n.symbol}`,"data-track":"token_detail_send","data-track-id":n.symbol,children:re("span",{children:"Send"})})]}),f.overview&&dt("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),dt("div",{className:"wi-td-rows",children:[dt("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Network"}),X?dt("a",{className:"wi-td-row-value wi-td-row-link",href:X,target:"_blank",rel:"noopener noreferrer",onClick:G=>O(G,X,"token-network"),children:[re("span",{children:ee}),re(va,{className:"wi-td-external-icon"})]}):re("span",{className:"wi-td-row-value",children:ee})]}),dt("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Contract Address"}),dt("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[re("span",{children:Xt(n.address)}),u?re(ar,{size:14}):re(Lr,{size:14})]})]}),dt("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Decimals"}),re("span",{className:"wi-td-row-value",children:g})]}),dt("div",{className:"wi-td-row",children:[re("span",{className:"wi-td-row-label",children:"Total Supply"}),re("span",{className:"wi-td-row-value",children:yv(o?.circulating_supply)})]})]})]}),f.social&&Y.length>0&&dt("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Social Media"}),re("div",{className:"wi-td-social-row",children:Y.map(G=>re("a",{className:"wi-td-social-btn",href:G.url,target:"_blank",rel:"noopener noreferrer","aria-label":G.label,onClick:te=>O(te,G.url,"token-social"),children:G.icon},G.key))})]}),f.history&&dt("section",{className:"wi-td-section",children:[re("h3",{className:"wi-td-section-title",children:"Token History"}),h&&re("div",{className:"wi-td-history-list",children:Array.from({length:3},(G,te)=>dt("div",{className:"wi-td-history-skeleton",children:[re("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),re("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${te}`))}),!h&&b&&dt("div",{className:"wi-td-history-empty",children:[re("span",{children:"Failed to load history."}),re("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>S(),children:"Retry"})]}),!h&&!b&&C.length===0&&re("div",{className:"wi-td-history-empty",children:re("span",{children:"No transactions found."})}),!h&&!b&&C.length>0&&dt("div",{className:"wi-td-history-list",children:[C.map((G,te)=>{let _=Fm(G,r),ae=Um(_),be=ae?G.from:G.to,Me=jm(Wm(G.amount,g)),le=y(G.tx),ge=bv(G.timestamp),me=dt(Gm,{children:[dt("div",{className:"wi-td-history-top",children:[re("span",{className:"wi-td-history-type","data-direction":_,children:gv[_]}),re("span",{className:"wi-td-history-counter",children:Xt(be??"")})]}),dt("div",{className:"wi-td-history-bottom",children:[dt("span",{className:"wi-td-history-meta",children:[re("span",{className:"wi-td-history-status","data-status":G.status,children:G.status==="success"?"Success":"Failed"}),ge&&re("span",{className:"wi-td-history-time",children:ge})]}),dt("span",{className:"wi-td-history-amount","data-size":hv(`${ae?"+":"-"}${Me} ${n.symbol}`),children:[ae?"+":"-",Me," ",n.symbol]})]})]}),Ke=`${G.tx}-${G.log_index}-${te}`;return le?re("a",{className:"wi-td-history-item wi-td-history-item--link",href:le,target:"_blank",rel:"noopener noreferrer",onClick:ke=>O(ke,le,"token-tx",G.tx),children:me},Ke):re("div",{className:"wi-td-history-item",children:me},Ke)}),k&&(t?re("div",{ref:N,className:"wi-td-history-sentinel",children:R&&re("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):re("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>x(),disabled:R,children:R?"Loading\u2026":"Load more"}))]})]})]})]})}import*as ro from"react";import{useQuery as Mv}from"@tanstack/react-query";var Rv="https://ipfs.io/ipfs/",Nv=/^0x[0-9a-fA-F]{40}$/,_m=/^\d+$/;function Sv(e,t){return typeof e!="string"||!_m.test(e)?t:BigInt(e)}function Vm(e,t){let n=e.token?.address,r=e.token_id;if(typeof n!="string"||!Nv.test(n)||typeof r!="string"||!_m.test(r))return null;let o=t==="ERC1155"?Sv(e.quantity,1n):1n;return o<=0n?null:{contract:n.toLowerCase(),tokenId:r,standard:t,tokenUri:e.token_uri||null,quantity:o,collectionName:e.token?.name||Av(n),collectionSymbol:e.token?.symbol||"",collectionIconUrl:Eo(e.token?.icon_url),collectionNamed:!!(e.token?.name||e.token?.symbol)}}function Qm(e){let t=new Map,n=new Set;for(let r of e){let o=`${r.contract}:${r.tokenId}`;if(n.has(o))continue;n.add(o);let a=t.get(r.contract);a||(a={contract:r.contract,standard:r.standard,name:r.collectionName,symbol:r.collectionSymbol,iconUrl:r.collectionIconUrl,items:[]},t.set(r.contract,a)),a.items.push(r)}return[...t.values()].filter(Tv)}function Tv(e){return e.items.some(t=>t.collectionNamed)||!!e.iconUrl||e.items.some(t=>!!t.tokenUri)}function Eo(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;if(/^ipfs:\/\//i.test(t)){let n=t.replace(/^ipfs:\/\//i,"").replace(/^ipfs\//i,"");return n?`${Rv}${n}`:null}if(/^data:image\//i.test(t))return t;try{let n=new URL(t);return n.protocol!=="https:"&&n.protocol!=="http:"||n.username||n.password?null:n.toString()}catch{return null}}function qm(e){let t=/^data:application\/json(;[^,]*)?,(.*)$/is.exec(e.trim());if(!t)return;let n=t[1]??"",r=t[2]??"";try{let o=/;base64/i.test(n)?Iv(r):decodeURIComponent(r);return JSON.parse(o)}catch{return null}}function Iv(e){let t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function Io(e){return typeof e=="string"&&e.trim()?e.trim():null}function Ev(e){return typeof e=="string"?e.trim()||null:typeof e=="number"||typeof e=="boolean"?String(e):null}function Pd(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,n=Io(t.image_data),r=Eo(Io(t.image)??Io(t.image_url))??(n&&n.startsWith("<svg")?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`:null),o=[];if(Array.isArray(t.attributes))for(let a of t.attributes){if(!a||typeof a!="object")continue;let i=a,s=Ev(i.value);s!==null&&o.push({traitType:Io(i.trait_type),value:s})}return{name:Io(t.name),description:Io(t.description),image:r,animationUrl:Eo(Io(t.animation_url)),attributes:o}}function Ym(e){if(!e)return!1;let t=e.split(/[?#]/)[0]?.toLowerCase()??"";return/\.(mp4|webm|ogg|ogv|mov)$/.test(t)}function Od(e,t){return t?.trim()?t.trim():`#${e}`}function Km(e,t=12){if(e.length<=t)return`#${e}`;let n=Math.ceil((t-1)/2),r=Math.floor((t-1)/2);return`#${e.slice(0,n)}\u2026${e.slice(-r)}`}function Bd(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Av(e){return`${e.slice(0,6)}\u2026${e.slice(-4)}`}var Lv="nft-holdings",Dv=5,Pv=100,Ov=["ERC721","ERC1155"];async function Bv(e,t,n,r){let o=[],a=t.toLowerCase();for(let i=1;i<=Dv;i+=1){let s=new URLSearchParams({page:String(i),page_size:String(Pv),sort_by:"updated",sort_order:"desc"}),l=await fetch(`${e}/v1/accounts/${a}/nfts/${n}?${s}`,{cache:"no-store",signal:r});if(!l.ok)throw new Error(`Failed to fetch ${n} holdings: ${l.status}`);let d=await l.json();for(let p of d.data?.nfts??[]){let g=Vm(p,n);g&&o.push(g)}if(!d.data?.next_page)break}return o}function Zm(e,t,n=!0){return Mv({queryKey:[Lv,e,t.toLowerCase()],queryFn:async({signal:r})=>{let o=await Se("crossExplorer",e),a=await Promise.all(Ov.map(i=>Bv(o,t,i,r)));return Qm(a.flat())},enabled:!!t&&n,staleTime:6e4,retry:1})}import{useQuery as zv}from"@tanstack/react-query";var Fv="nft-metadata",Uv=3e3,jv=4,zd=0,Xm=[];async function Wv(e){zd>=jv&&await new Promise(t=>Xm.push(t)),zd+=1;try{return await e()}finally{zd-=1,Xm.shift()?.()}}async function Gv(e,t){let n=qm(e);if(n!==void 0)return Pd(n);let r=Eo(e);return r?Wv(async()=>{let o=new AbortController,a=()=>o.abort();t?.addEventListener("abort",a);let i=setTimeout(a,Uv);try{let s=await fetch(r,{signal:o.signal,credentials:"omit",referrerPolicy:"no-referrer"});return s.ok?Pd(await s.json()):null}catch{return null}finally{clearTimeout(i),t?.removeEventListener("abort",a)}}):null}function As(e,t=!0){return zv({queryKey:[Fv,e],queryFn:({signal:n})=>Gv(e,n),enabled:!!e&&t,staleTime:1/0,gcTime:30*6e4,retry:!1})}import{useQuery as Hv}from"@tanstack/react-query";var _v="nft-instance";function Jm(e,t,n,r=!0){return Hv({queryKey:[_v,e,t,n],queryFn:async({signal:o})=>{let a=await Se("crossExplorer",e),i=await fetch(`${a}/v1/tokens/${t}/instances/${n}`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Failed to fetch NFT instance: ${i.status}`);return(await i.json()).data?.instance??null},enabled:!!t&&!!n&&r,staleTime:5*6e4,retry:!1})}import{Fragment as og,jsx as V,jsxs as Je}from"react/jsx-runtime";var $m={ERC721:"ERC-721",ERC1155:"ERC-1155"};function Fd({src:e,alt:t,className:n}){let[r,o]=ro.useState(!1);return ro.useEffect(()=>o(!1),[e]),!e||r?V("div",{className:ye("wi-nft-media wi-nft-media--fallback",n),role:"img","aria-label":t,"data-nft-fallback":!0,children:V(kp,{className:"wi-nft-media-fallback-icon"})}):V("img",{src:e,alt:t,className:ye("wi-nft-media",n),loading:"lazy",decoding:"async",draggable:!1,referrerPolicy:"no-referrer",onError:()=>o(!0)})}function Vv({collection:e}){let t=e.items[0],{data:n}=As(t?.tokenUri??null,!e.iconUrl);return V(Fd,{src:e.iconUrl??n?.image??null,alt:e.name,className:"wi-nft-thumb"})}function eg({env:e,walletAddress:t,active:n,onSelectCollection:r}){let{data:o,isLoading:a,isError:i,refetch:s,isFetching:l}=Zm(e,t,n);return a?V("div",{className:"wi-token-list","aria-busy":"true",children:Array.from({length:4},(d,p)=>V("div",{className:"wi-skeleton-item","data-nft-skeleton":!0,children:Je("div",{className:"wi-skeleton-left",children:[V("div",{className:"wi-skeleton-block wi-nft-thumb-skeleton"}),Je("div",{className:"wi-skeleton-lines",children:[V("div",{className:"wi-skeleton-block",style:{width:96,height:14}}),V("div",{className:"wi-skeleton-block",style:{width:56,height:12}})]})]})},p))}):i?Je("div",{className:"wi-nft-state",role:"alert",children:[V("span",{className:"wi-nft-state-text",children:"Couldn\u2019t load NFTs"}),V("button",{type:"button",className:"wi-nft-retry",onClick:()=>{s()},disabled:l,"data-track":"nft_retry",children:l?"Retrying\u2026":"Try again"})]}):!o||o.length===0?Je("div",{className:"wi-nft-empty",role:"status",children:[V("span",{className:"wi-nft-empty-icon","aria-hidden":!0,children:V("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:V("path",{d:"M18 22H4a2 2 0 0 1-2-2V6M22 13l-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18M14 8a2 2 0 1 1-4 0a2 2 0 1 1 4 0ZM8 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z"})})}),V("p",{className:"wi-nft-empty-title",children:"No NFTs yet"}),V("p",{className:"wi-nft-empty-desc",children:"NFTs you own will appear here."})]}):V("div",{className:"wi-token-list",children:o.map(d=>Je("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>r(d),"aria-label":`View ${d.name} NFTs`,"data-track":"nft_collection","data-track-id":d.contract,children:[Je("div",{className:"wi-token-left",children:[V(Vv,{collection:d}),Je("div",{className:"wi-token-info",children:[V("span",{className:"wi-token-name",children:d.name}),V("div",{className:"wi-token-price-row",children:V("span",{className:"wi-token-price",children:$m[d.standard]})})]})]}),V("div",{className:"wi-token-right",children:V("span",{className:"wi-token-balance","data-nft-count":!0,children:d.items.length})})]},d.contract))})}function tg({title:e,onBack:t,onClose:n}){return Je("div",{className:"wi-sticky-header",children:[Je("div",{className:"wi-header wi-header--receive",children:[V("button",{type:"button",className:"wi-header-back",onClick:t,"aria-label":"Back",children:V(On,{size:24})}),V("span",{className:"wi-td-header-title",children:V("span",{className:"wi-td-header-name wi-nft-header-name",children:e})}),V("button",{type:"button",className:"wi-header-action",onClick:n,"aria-label":"Close","data-wi-close":!0,children:V(hn,{size:24})})]}),V("hr",{className:"wi-divider"})]})}function Qv({item:e,onSelect:t}){let{data:n}=As(e.tokenUri),r=Od(e.tokenId,n?.name);return Je("button",{type:"button",className:"wi-nft-card",onClick:()=>t(e),"aria-label":`View ${r}`,"data-track":"nft_detail","data-track-id":`${e.contract}:${e.tokenId}`,children:[Je("span",{className:"wi-nft-card-media",children:[V(Fd,{src:n?.image??null,alt:r}),e.standard==="ERC1155"&&e.quantity>1n&&Je("span",{className:"wi-nft-card-qty",children:["\xD7",Bd(e.quantity)]})]}),V("span",{className:"wi-nft-card-name",children:r}),n?.name&&V("span",{className:"wi-nft-card-id",children:Km(e.tokenId)})]})}function ng({collection:e,onBack:t,onClose:n,onSelectNft:r}){return Je(og,{children:[V(tg,{title:e.name,onBack:t,onClose:n}),V("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:V("div",{className:"wi-nft-grid",children:e.items.map(o=>V(Qv,{item:o,onSelect:r},`${o.contract}:${o.tokenId}`))})})]})}function qv({image:e,animationUrl:t,alt:n}){let[r,o]=ro.useState(!1);return Ym(t)&&!r?V("video",{className:"wi-nft-media wi-nft-detail-media",src:t,poster:e??void 0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onError:()=>o(!0),"aria-label":n}):V(Fd,{src:e,alt:n,className:"wi-nft-detail-media"})}function rg({env:e,item:t,onBack:n,onClose:r,onOutlink:o}){let{data:a,isLoading:i}=As(t.tokenUri),{data:s}=Jm(e,t.contract,t.tokenId,!i&&!a),l=Od(t.tokenId,a?.name??s?.name??null),d=a?.description??s?.description??null,p=a?.image??Eo(s?.image_url),g=a?.attributes??[],u=Rt[e].cross,{chainInfo:m}=Oi(e,u),w=bo(u,e).name??m?.name??`Chain ${u}`,f=m?.explorer_url?.replace(/\/+$/,""),c=f?`${f}/token/${t.contract}/instance/${t.tokenId}`:null,[h,b]=ro.useState(!1),x=ro.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(t.contract).then(()=>{b(!0),setTimeout(()=>b(!1),1500)}).catch(()=>{})},[t.contract]),k=(R,S,C)=>Lt(R,S,{category:"nft-detail",origin:C,payload:{contract:t.contract,tokenId:t.tokenId}},o);return Je(og,{children:[V(tg,{title:l,onBack:n,onClose:r}),Je("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:[V("div",{className:"wi-nft-detail-hero",children:V(qv,{image:p,animationUrl:a?.animationUrl??null,alt:l})}),Je("section",{className:"wi-td-section",children:[Je("div",{className:"wi-nft-detail-titles",children:[V("span",{className:"wi-nft-detail-collection",children:t.collectionName}),V("h3",{className:"wi-td-section-title wi-nft-detail-name",children:l})]}),d&&V("p",{className:"wi-nft-detail-desc",children:d})]}),Je("section",{className:"wi-td-section",children:[V("h3",{className:"wi-td-section-title",children:"Details"}),Je("div",{className:"wi-td-rows",children:[Je("div",{className:"wi-td-row",children:[V("span",{className:"wi-td-row-label",children:"Token ID"}),V("span",{className:"wi-td-row-value",children:t.tokenId})]}),Je("div",{className:"wi-td-row",children:[V("span",{className:"wi-td-row-label",children:"Token Standard"}),V("span",{className:"wi-td-row-value",children:$m[t.standard]})]}),t.standard==="ERC1155"&&Je("div",{className:"wi-td-row",children:[V("span",{className:"wi-td-row-label",children:"Quantity"}),V("span",{className:"wi-td-row-value",children:Bd(t.quantity)})]}),Je("div",{className:"wi-td-row",children:[V("span",{className:"wi-td-row-label",children:"Network"}),f?Je("a",{className:"wi-td-row-value wi-td-row-link",href:f,target:"_blank",rel:"noopener noreferrer",onClick:R=>k(R,f,"nft-network"),children:[V("span",{children:w}),V(va,{className:"wi-td-external-icon"})]}):V("span",{className:"wi-td-row-value",children:w})]}),Je("div",{className:"wi-td-row",children:[V("span",{className:"wi-td-row-label",children:"Contract Address"}),Je("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:x,"aria-label":"Copy contract address",children:[V("span",{children:Xt(t.contract)}),h?V(ar,{size:14}):V(Lr,{size:14})]})]})]})]}),g.length>0&&Je("section",{className:"wi-td-section",children:[V("h3",{className:"wi-td-section-title",children:"Attributes"}),V("div",{className:"wi-nft-attrs",children:g.map((R,S)=>Je("div",{className:"wi-nft-attr",children:[R.traitType&&V("span",{className:"wi-nft-attr-type",children:R.traitType}),V("span",{className:"wi-nft-attr-value",children:R.value})]},`${R.traitType??""}-${S}`))})]}),c&&Je("a",{className:"wi-nft-explorer-btn",href:c,target:"_blank",rel:"noopener noreferrer",onClick:R=>k(R,c,"nft-explorer"),"data-track":"nft_explorer",children:[V("span",{children:"View on Explorer"}),V(va,{className:"wi-td-external-icon"})]})]})]})}import*as ur from"react";var ag={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function sg(e,t){let n=ag[e]??ag.production;return t==="send"?n:`${n}/${t}`}var ig={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function lg(e){return ig[e]??ig.production}import{jsx as se,jsxs as vn}from"react/jsx-runtime";function Ud({size:e=20,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[se("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),se("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function dg({size:e=24,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[se("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),se("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function cg({size:e=24,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[se("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),se("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),se("path",{d:"m2 16 6 6"}),se("circle",{cx:"16",cy:"9",r:"2.9"}),se("circle",{cx:"6",cy:"5",r:"3"})]})})}function pg({size:e=24,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[se("path",{d:"M15 12h-5M15 8h-5"}),se("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),se("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function ja({size:e=12,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:se("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function ug({size:e=20,className:t}){return vn("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[se("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),se("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function fg({size:e=20,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[se("circle",{cx:"9",cy:"7",r:"3.4"}),se("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),se("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),se("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function mg({size:e=20,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[se("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),se("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function gg({size:e=20,className:t}){return se("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:vn("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[se("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),se("path",{d:"M12 9v6"}),se("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function hg({className:e}){return vn("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[se("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),se("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),se("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),se("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),se("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),se("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),se("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),se("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),se("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:se("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),vn("g",{mask:"url(#wi-op-logo-mask)",children:[se("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),se("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),se("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),se("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),vn("defs",{children:[vn("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[se("stop",{stopColor:"#F1603C"}),se("stop",{offset:"1",stopColor:"#EE2566"})]}),vn("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[se("stop",{stopColor:"#F3752D"}),se("stop",{offset:"1",stopColor:"#EC1272"})]}),vn("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[se("stop",{stopColor:"white",stopOpacity:"0.5"}),se("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),vn("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[se("stop",{stopColor:"white",stopOpacity:"0.5"}),se("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var Yv="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu9lNurFtp7Zt27btHtuu3YPatnWM1A2q08bJJmmyu/P7X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WTH1sKcn3/QEaD/ui0vu7Yy6OJ9w90FYYzx0eJPrca0nH0k8XQHcTM9/RHvOlFQF9qnKW5DHLg366FhoEDkxnm1GZafbv+YtFQtJeEZzwIKkKr5uREGvR+kqr0rqvMONg8RdMGe7bfLiEh3DXisaaLWnPVFuGsufuKXDYcaT7KUY2QRrG0w/YBfJ3dL0Iwq+Ts1rVwPw6EW/mf2vvBQN9xEWoQ7eiQkd2E0IL7n3nBdqi3ZPGsI5a6KQiGzXc61A4P9EGBs88qTmQhAkR4mb+ylXAVZh/krFLuC7Ut7uDHtGuiDisDTlO+3/bQP0eH3DWK9n5/JZlbBt9YhJZd1r2yYqNlB/tZVI4EKQkr7qOlC60xl+gRhiolHBYUydO9a4i5+oeMpnPLGwTsCDx/HAmkYUs9yyTzdY4LQ9HBwJDDvPJ67WT/8o69iNhN5r6Pm/nz/XL6FN3HdgPOtkquE0weDfwxCeL1qJz+UNs953SM4sAVvJXTJgJtaDdn5jk26W6qWEeffbz7eFhHZSQT/5CcUc6kLTepaSfDjMMO13nc83Bp1gf9kmweID6+5MqNSxgHbv+z//3BrktV/Rl7DfiqPdxlkFinc/i09y+qlDycF6SDyMXIsRWi1IIvY4rojOw7PdSyYIzuQi1ul2IviqZrwjvgitwN/22Ogzpt6VUaERFfLjCSmwNIwt2hcaH3+ZB4sj7qP784wlWjexf/5iN8j6tHK6zzw4Q+QLcMcNksKjPFBaupKpIcBCUxs8o7wxVHzyRhdr/7JP7qiXejoFAtYPP/bcBCgAAAAAAAAAAA==";function bg({className:e}){return se("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:se("image",{href:Yv,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}ce(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
|
|
12
|
+
`);import{Fragment as Wd,jsx as oe,jsxs as rt}from"react/jsx-runtime";var Kv=6,Zv={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function wg(e,t){let n;try{n=BigInt(e||"0")}catch{return"0.00"}let r=n<0n;r&&(n=-n);let o,a;if(t<=2){let i=10n**BigInt(t);o=n/i,a=n%i*10n**BigInt(2-t)}else{let i=n/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${r?"-":""}${Xv(o.toString())}.${a.toString().padStart(2,"0")}`}function Xv(e){let t="";for(let n=0;n<e.length;n++){let r=e.length-n;n>0&&r%3===0&&(t+=","),t+=e[n]}return t}function Jv(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let o=Math.floor(r/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function $v(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function Ms({env:e="production",balanceDisplay:t,balanceIconUrl:n,isBalanceLoading:r,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:g,onRepliesSeen:u,onBoard:m,onGetToken:y,getTokenSlot:w}){let f=o?.activity??[],c=f.length>0,h=o?.claimableCount??0,b=o?.repliesWaitingCount??0,x=o?.isLoading??!1,k=o?.xConnected??!1,R=ur.useCallback(M=>{window.open(sg(e,M),"_blank","noopener,noreferrer")},[e]),S=ur.useCallback(()=>d?d():R("send"),[d,R]),C=ur.useCallback(()=>p?p():R("claim"),[p,R]),N=ur.useCallback(()=>{if(u?.(),g)return g();R("activity")},[g,u,R]),E=ur.useCallback(()=>m?m():R("board"),[m,R]),A=ur.useCallback(()=>{if(y)return y();window.open(lg(e),"_blank","noopener,noreferrer")},[y,e]),B=ur.useMemo(()=>!o||h<=0?null:wg(o.claimableTotalRaw,o.claimableDecimals??18),[o,h]),L=ur.useMemo(()=>f.slice(0,Kv),[f]),U=ur.useCallback(M=>{M.currentTarget.style.display="none"},[]);return rt(Wd,{children:[rt("div",{className:"wi-sticky-header",children:[rt("div",{className:"wi-header wi-header--receive",children:[oe("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:oe(On,{size:24})}),oe("span",{className:"wi-op-header-title",children:a?oe("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:U}):oe(hg,{className:"wi-op-logo"})}),oe("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:oe(hn,{size:24})})]}),oe("hr",{className:"wi-divider"})]}),rt("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[rt("section",{className:"wi-op-hero",children:[rt("div",{className:"wi-op-hero-copy",children:[rt("h2",{className:"wi-op-hero-title",children:[oe("span",{children:"Send money with"}),rt("span",{className:"wi-op-hero-title-row",children:["just an",oe(ug,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),oe("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),oe("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?oe("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:U}):oe(bg,{})})]}),rt("section",{className:"wi-op-panel",children:[rt("div",{className:"wi-op-balance-card",children:[rt("div",{className:"wi-op-balance-head",children:[oe("span",{className:"wi-op-balance-label",children:"Available"}),w??rt("button",{type:"button",className:"wi-op-link-btn",onClick:A,"data-track":"onepop_get_token",children:[oe("span",{children:"Get ONEUSD"}),oe(ja,{size:12})]})]}),oe("div",{className:"wi-op-balance-body",children:r?oe("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):rt(Wd,{children:[n&&oe("img",{src:n,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:U}),oe("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),rt("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[rt("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Send POP","data-track":"onepop_send",children:[oe(dg,{size:24}),oe("span",{children:"Send POP"})]}),rt("button",{type:"button",className:"wi-op-action-card",onClick:C,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[oe(cg,{size:24}),oe("span",{children:"Claim POPs"})]}),k&&rt("button",{type:"button",className:"wi-op-action-card",onClick:N,"aria-label":"Activity","data-track":"onepop_activity",children:[oe(pg,{size:24}),oe("span",{children:"Activity"})]})]})]}),oe("section",{className:"wi-op-cta-row",children:x?oe("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):rt(Wd,{children:[!c&&h<=0&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:S,"data-track":"onepop_send_first",children:"Send your first POP!"}),h>0?oe("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:C,"data-track":"onepop_claim_banner",children:`${h} POP${h===1?"":"s"} waiting to claim (total ${B})`}):!c&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),b>0&&oe("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:N,"data-track":"onepop_replies",children:`${b} ${b===1?"reply":"replies"} waiting`})]})}),c?rt("section",{className:"wi-op-activity",children:[rt("div",{className:"wi-op-activity-head",children:[rt("div",{className:"wi-op-activity-heading",children:[oe("span",{className:"wi-op-activity-title",children:"Recent activity"}),oe("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),rt("button",{type:"button",className:"wi-op-link-btn",onClick:N,"data-track":"onepop_see_all_activity",children:[oe("span",{children:"See all activity"}),oe(ja,{size:16})]})]}),oe("ul",{className:"wi-op-activity-list",children:L.map(M=>oe(e2,{item:M},M.id))})]}):rt("section",{className:"wi-op-features",children:[oe(jd,{icon:oe(fg,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),oe(jd,{icon:oe(mg,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),oe(jd,{icon:oe(gg,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),oe("div",{className:"wi-op-footer",children:oe("span",{children:"Powered by ONEpop"})})]})}function jd({icon:e,title:t,desc:n}){return rt("div",{className:"wi-op-feature",children:[oe("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),rt("span",{className:"wi-op-feature-copy",children:[oe("span",{className:"wi-op-feature-title",children:t}),oe("span",{className:"wi-op-feature-desc",children:n})]})]})}function e2({item:e}){let t=$v(e.handle),n=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,r=t.replace("@","").charAt(0).toUpperCase()||"?";return rt("li",{className:"wi-op-activity-item",children:[oe("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?oe("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):oe("span",{className:"wi-op-activity-initial",children:r})}),rt("span",{className:"wi-op-activity-copy",children:[rt("span",{className:"wi-op-activity-meta",children:[oe("span",{className:"wi-op-activity-peer",children:n}),oe("span",{className:"wi-op-activity-sep","aria-hidden":!0}),oe("span",{className:"wi-op-activity-time",children:Jv(e.timestamp)})]}),oe("span",{className:"wi-op-activity-amount",children:wg(e.amountRaw,e.decimals)})]}),oe("span",{className:ye("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:Zv[e.status]})]})}import*as xg from"react";import{jsx as yg,jsxs as t2}from"react/jsx-runtime";var vg=xg.forwardRef(function({className:t,children:n,...r},o){return t2("button",{...r,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[yg("span",{children:"Get ONEUSD"}),yg(ja,{size:12})]})});import{Fragment as Gd,jsx as T,jsxs as Z}from"react/jsx-runtime";var Cg=["tokens","nfts"],o2="On-ramp is not available in your region.";function a2(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:n}=window.location,r=t+n;return e.some(o=>r===o||r.startsWith(`${o}/`))}function i2(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function s2(e){let t=e.toLowerCase().replace(/^0x/,""),n=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),r=parseInt(n.slice(0,4),16)%360,o=(r+60+parseInt(n.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${r} 85% 65%), hsl(${o} 80% 55%))`}function l2(e,t=.5){let n=Q.useRef(null),r=Q.useRef(null),[o,a]=Q.useState(1);return Q.useLayoutEffect(()=>{let i=n.current,s=r.current;if(!i||!s)return;let l=()=>{let p=i.clientWidth;if(!p)return;let g=s.cloneNode(!0);g.style.setProperty("--wi-total-scale","1"),g.style.position="absolute",g.style.left="-9999px",g.style.top="-9999px",g.style.visibility="hidden",g.style.maxWidth="none",g.style.width="max-content",i.appendChild(g);let u=g.offsetWidth;i.removeChild(g);let m=u>p?Math.max(t,p/u):1;a(m)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:n,valueRef:r,scale:o}}function Ps({align:e="end",sideOffset:t=12,className:n,children:r}){let{presentation:o,env:a,theme:i,isMobile:s,open:l,drawerDirection:d,modal:p,showBalance:g,showForgeToken:u,showGameToken:m,showQR:y,showBridge:w,showNft:f,qrLogoSrc:c,walletAddress:h,accountName:b,sendAccounts:x,profileImageUrl:k,connectorName:R,preferredTokens:S,close:C,onSelectWallet:N,onCopyAddress:E,onBuy:A,onDisconnect:B,disconnectLabel:L,termsUrl:U,termsLabel:M,privacyUrl:F,privacyLabel:ne,portalStyle:ee,navContent:X,navPosition:W,footerContent:Y,view:O,setView:G,selectedSendToken:te,setSelectedSendToken:_,selectedDetailToken:ae,setSelectedDetailToken:be,selectedNftCollection:Me,setSelectedNftCollection:le,selectedNft:ge,setSelectedNft:me,showPortfolio:Ke,showOnePop:ke,onePopSummary:Qe,onOnePopOpen:pt,onOnePopSend:De,onOnePopClaim:Ue,onOnePopActivity:Be,onOnePopRepliesSeen:St,onePopLogoSrc:Ht,onePopGetTokenSlot:ut,onePopHeroSrc:Tt,portfolioTitle:vt,portfolioSections:_t,showTotalAssets:kt,totalAssetsLabel:it,sendTransaction:It,getTransactionReceipt:et,estimateGas:qt,onOutlink:st,lpBalanceReader:nn,stakingRewardsReader:_e,bridgeTokens:ot,bridgeHistory:Ze,getBridgeQuote:Ct,getBridgeToTokens:bt,getBridgeApproval:Ve,approveBridge:Yt,submitBridge:Kt,onReceive:Bt,onSend:Zt,onBuyDisabledMessage:j,onBridgeDisabledMessage:ue,onSendDisabledMessage:he}=_r(),Ie=o==="page",[tt,zt]=Q.useState();Q.useEffect(()=>{zt(Pu()??(jo()?r2.default:void 0))},[]);let Et=b??R??tt??"Account",[Cn,Rn]=Q.useState(null),P=Q.useRef(void 0),Ce=Q.useCallback(I=>{Rn(I),clearTimeout(P.current),P.current=setTimeout(()=>Rn(null),4e3)},[]);Q.useEffect(()=>()=>clearTimeout(P.current),[]);let je=!!j,J=Q.useCallback(()=>{if(je){Ce(j);return}let I=A?.();I&&typeof I.then=="function"&&I.catch(()=>{Ce(j??o2)})},[je,j,A,Ce]),we=!!ue,z=!!he,{tokens:Ne,isLoading:q}=Yr(a,h,l&&g),{statsMap:Re}=Kr(a,g),{aprPercent:Ln}=mu(),{categoryMap:fo,infoMap:hr}=hu(a,g),br=g&&kt,{displayValue:fa,isLowerBound:vl,isLoading:kl}=bu(a,h,l&&br),[Gr,mo]=Q.useState(!1),li=Q.useRef(null),[go,di]=Q.useState(0),{holdings:ho,isLoading:ci}=pu(a,h,l&&g&&u),Cl=Q.useMemo(()=>ho.map(I=>I.token),[ho]),{imageMap:H}=uu(a,Cl,u&&ho.length>0),ft=Cu(a),lt=Q.useMemo(()=>vu({env:a,tokens:Ne,pinnedTokens:ft,preferredTokens:S,statsMap:Re,categoryMap:fo,showGameToken:m}),[Ne,a,Re,m,fo,ft,S]),Ft=Q.useMemo(()=>{if(!u)return[];let I=new Set(Ne.map(ie=>ie.address.toLowerCase()));return[...ho].filter(ie=>!I.has(ie.token.toLowerCase())).sort((ie,nt)=>{let rr=gt(ie.value)??new kg(0);return(gt(nt.value)??new kg(0)).minus(rr).toNumber()})},[ho,u,Ne]),At=Q.useRef(!1),[qe,gn]=Q.useState(null),ze=Q.useRef(void 0),nr=qe?.chainId??te?.chainId??lt[0]?.chainId??0,{transactionUrl:Hr}=ka(a,nr,qe?.txHash,!!(qe?.txHash&&nr)),mt=Q.useCallback(I=>{At.current=!0,G(I)},[G]),[P0,Rl]=Q.useState("recipient"),ma=Q.useCallback(()=>{_(null),Rl("recipient"),mt("wallet")},[_,mt]),pi=Q.useCallback((I,ie="recipient")=>{if(z){Ce(he);return}Rl(ie),_(I),mt("send")},[z,he,Ce,_,mt]),O0=Q.useCallback(I=>{be(I),mt("token-detail")},[be,mt]),B0=Q.useCallback(()=>{pt?.(),mt("onepop")},[pt,mt]),z0=Q.useCallback(()=>{be(null),mt("wallet")},[be,mt]),[ui,F0]=Q.useState("tokens"),U0=f&&ui==="nfts",{tabsRef:j0,indicatorStyle:kc,slide:Nl,select:W0}=_i(ui,F0,Cg,[f,O]),G0=Q.useCallback(I=>{le(I),mt("nft-collection")},[le,mt]),H0=Q.useCallback(I=>{me(I),mt("nft-detail")},[me,mt]),_0=Q.useCallback(()=>{me(null),mt("nft-collection")},[me,mt]),V0=Q.useCallback(()=>{le(null),mt("wallet")},[le,mt]),Q0=Q.useCallback(I=>{pi(I,"recipient")},[pi]),fi=Ut("apps.json",a,I=>Wn(I?.gametokenBridge,a)),Cc=Ut("apps.json",a,I=>I?.gametokenSites),q0=Q.useCallback(()=>{if(we){Ce(ue);return}if(fi){if(a2(Cc)){window.location.assign(fi);return}window.open(fi,"_blank","noopener,noreferrer")}},[we,ue,fi,Cc,Ce]),Y0=Q.useCallback(I=>{clearTimeout(ze.current),_(null),mt("wallet"),gn({status:"pending",txHash:I.txHash,chainId:I.chainId,description:`${I.amount} ${I.tokenSymbol} to ${Xt(I.recipient)}`})},[_,mt]),K0=Q.useCallback(I=>{let ie=te?.chainId;_(null),mt("wallet"),!(!I||!ie)&&(gn(nt=>({status:"success",txHash:I,chainId:ie,description:nt?.txHash===I?nt.description:"Tap to see your transaction"})),clearTimeout(ze.current),ze.current=setTimeout(()=>gn(null),5e3))},[te?.chainId,_,mt]),Z0=Q.useCallback(I=>{let ie=I.txHash;ie&&(gn({status:"error",txHash:ie,chainId:I.chainId,description:I.message}),clearTimeout(ze.current),ze.current=setTimeout(()=>gn(null),5e3))},[]),ga=Q.useMemo(()=>{if(Bt)return Bt;if(y)return()=>mt("qr")},[Bt,y,mt]),mi=Q.useMemo(()=>{if(Zt)return Zt;if(lt.length===0)return;let I=lt[0];return()=>pi(I,"token")},[Zt,lt,pi]),Rc=Q.useCallback(()=>{if(z){Ce(he);return}mi?.()},[z,he,mi,Ce]);Q.useEffect(()=>{l||(At.current=!1,Rl("recipient"))},[l]);let Sl=Q.useRef(null);Q.useEffect(()=>{let I=Sl.current;if(!I||!s)return;let ie=nt=>{nt.pointerType==="touch"&&nt.stopPropagation()};return I.addEventListener("pointerdown",ie),()=>I.removeEventListener("pointerdown",ie)},[s]);let[Bo,Nc]=Q.useState(!1),Tl=Q.useRef(void 0),[ha,ba]=Q.useState(!1);Q.useEffect(()=>{if(!ha)return;let I=()=>ba(!1),ie=rr=>{rr.key==="Escape"&&ba(!1)},nt=setTimeout(()=>{document.addEventListener("mousedown",I,!0),document.addEventListener("keydown",ie,!0)},0);return()=>{clearTimeout(nt),document.removeEventListener("mousedown",I,!0),document.removeEventListener("keydown",ie,!0)}},[ha]),Q.useEffect(()=>{ba(!1)},[h]),Q.useEffect(()=>()=>clearTimeout(Tl.current),[]),Q.useEffect(()=>()=>clearTimeout(ze.current),[]),Q.useEffect(()=>{let I=li.current;if(!I||Y===null){di(0);return}let ie=()=>{di(I.offsetHeight)};if(ie(),typeof ResizeObserver>"u")return;let nt=new ResizeObserver(ie);return nt.observe(I),()=>nt.disconnect()},[Y]);let Sc=Q.useCallback(async()=>{if(!Bo)try{await navigator.clipboard.writeText(h),Nc(!0),clearTimeout(Tl.current),Tl.current=setTimeout(()=>Nc(!1),2e3),E?.(h,!0)}catch{E?.(h,!1)}},[h,E,Bo]),gi=Q.useCallback(I=>{I.currentTarget.setAttribute("data-loaded","true")},[]),Tc=Q.useMemo(()=>({background:s2(h)}),[h]),hi=Q.useMemo(()=>k||Or(a,h,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[k,a,h,i]),Il=Q.useMemo(()=>i2(fa),[fa]),{containerRef:X0,valueRef:J0,scale:$0}=l2(Gr?"\u2022\u2022\u2022\u2022\u2022\u2022":fa),Ic=U||F?Z("div",{className:"wi-legal-links",children:[U&&T("a",{className:"wi-legal-link",href:U,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:I=>Lt(I,U,{category:"terms",origin:"terms"},st),children:M}),U&&F&&T("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),F&&T("a",{className:"wi-legal-link",href:F,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:I=>Lt(I,F,{category:"privacy",origin:"privacy"},st),children:ne})]}):null,Ec=B?Z("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{B(),C()},children:[T(up,{size:16}),T("span",{className:"wi-disconnect-label",children:L})]}):null,eb=g&&!X,Ac=!br,Mc=Z("button",{type:"button",className:ye("wi-action-card",z&&"wi-action-card--dimmed"),onClick:Rc,disabled:!z&&!mi,"aria-disabled":z||void 0,"aria-label":"Send","data-track":"send_open",children:[T(hp,{size:20}),T("span",{children:"Send"})]}),tb=eb?Ie?Ac?T("div",{className:"wi-action-row","aria-label":"Wallet actions",children:Mc}):null:Z("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[Z("button",{type:"button",className:ye("wi-action-card",je&&"wi-action-card--dimmed"),onClick:J,disabled:!A&&!je,"aria-disabled":je||void 0,"aria-label":"Buy","data-track":"buy",children:[T(yp,{size:20}),T("span",{children:"Buy"})]}),w?Z("button",{type:"button",className:ye("wi-action-card",we&&"wi-action-card--dimmed"),onClick:q0,"aria-disabled":we||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[T(xp,{size:20}),T("span",{children:"Bridge"})]}):Z("button",{type:"button",className:"wi-action-card",onClick:ga,disabled:!ga,"aria-label":"Receive","data-track":"receive",children:[T(Mi,{size:20}),T("span",{children:"Receive"})]}),Ac&&Mc,ke&&Z("button",{type:"button",className:"wi-action-card",onClick:B0,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[T(Ud,{size:20}),T("span",{children:"ONEpop"})]}),Ke?Z("button",{type:"button",className:"wi-action-card",onClick:()=>mt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[T(wp,{size:20}),T("span",{children:"Portfolio"})]}):w?Z("button",{type:"button",className:"wi-action-card",onClick:ga,disabled:!ga,"aria-label":"Receive","data-track":"receive",children:[T(Mi,{size:20}),T("span",{children:"Receive"})]}):null]}):null,nb=Z("div",{className:ye("wi-view-inner",At.current&&"wi-view-wallet"),children:[br&&Z("div",{className:"wi-total-section",children:[Z("div",{className:"wi-total-head",children:[T("span",{className:"wi-total-label",children:it}),T("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:I=>{I.stopPropagation(),mo(ie=>!ie)},onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation(),mo(ie=>!ie))},"aria-label":Gr?"Show balance":"Hide balance","data-track":"balance_toggle",children:Gr?T(mp,{}):T(fp,{})})]}),Z("div",{className:"wi-total-body",children:[T("div",{className:"wi-total-value-wrap",ref:X0,children:kl?T("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):T("div",{className:"wi-total-value","data-hidden":Gr||void 0,ref:J0,style:{"--wi-total-scale":$0},children:Gr?T("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):Z(Gd,{children:[vl&&T("span",{className:"wi-total-lte",children:"\u2264"}),T("span",{className:"wi-total-currency",children:"$"}),T("span",{className:"wi-total-amount",children:Il.main}),Il.decimal&&T("span",{className:"wi-total-decimal",children:Il.decimal})]})})}),T("button",{type:"button",className:ye("wi-total-send",z&&"wi-total-send--dimmed"),onClick:Rc,disabled:!z&&!mi,"aria-disabled":z||void 0,"aria-label":"Send","data-track":"send_open",children:T(bp,{size:27})})]})]}),W==="top"&&(X?T("div",{className:"wi-nav-fixed",children:X}):tb),f&&Z("div",{ref:j0,className:"wi-asset-tabs",role:"tablist","aria-label":"Assets",children:[Cg.map(I=>T("button",{type:"button",role:"tab",className:"wi-asset-tab","aria-selected":ui===I,"data-active":ui===I||void 0,onClick:()=>W0(I),"data-track":"asset_tab","data-track-id":I,children:I==="tokens"?"Tokens":"NFTs"},I)),kc&&T("span",{className:"wi-asset-tab-indicator","aria-hidden":!0,"data-animate":Nl?!0:void 0,style:kc})]}),U0?T("div",{ref:Sl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":Nl??void 0,children:T(eg,{env:a,walletAddress:h,active:l,onSelectCollection:G0})},"nfts"):g&&T("div",{ref:Sl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":Nl??void 0,children:Z("div",{className:"wi-token-list",children:[q&&Array.from({length:5},(I,ie)=>Z("div",{className:"wi-skeleton-item",children:[Z("div",{className:"wi-skeleton-left",children:[T("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Z("div",{className:"wi-skeleton-lines",children:[T("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),T("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Z("div",{className:"wi-skeleton-right",children:[T("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),T("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},ie)),!q&<.length===0&&!u&&T("div",{className:"wi-empty",children:"No Tokens Found"}),lt.map(I=>{let ie=Re.get(Cr(I.chainId,I.address)),nt=ie?parseFloat(ie.percent_change_24h):null,rr=nt!==null&&nt>=0,Ll=Na(a,I.chainId),mb=od(I.address);return Z("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>O0(I),"aria-label":`View ${I.symbol} detail`,"data-track":"token_detail","data-track-id":I.symbol,children:[Z("div",{className:"wi-token-left",children:[Z("div",{className:"wi-token-icon-wrap",children:[T("img",{src:I.icon_url,alt:I.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:gi,onError:Dl=>{Dl.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Ll&&T("img",{src:Ll,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Dl=>{Dl.currentTarget.style.display="none"}})]}),Z("div",{className:"wi-token-info",children:[Z("span",{className:"wi-token-name-row",children:[T("span",{className:"wi-token-name",children:I.symbol}),mb&&Ln!==null&&T("span",{className:"wi-token-apr",children:$i(Ln)})]}),ie&&Z("div",{className:"wi-token-price-row",children:[T("span",{className:"wi-token-price",children:vo(ie.price)}),T("span",{className:"wi-token-change","data-positive":rr,"data-zero":nt===0||void 0,children:nt!==null&&(nt===0?"0%":`${rr?"+":"-"}${(rr?Math.floor:Math.ceil)(Math.abs(nt)*100)/100}%`)})]})]})]}),Z("div",{className:"wi-token-right",children:[T("span",{className:"wi-token-balance",children:Dr(I.quantity.numeric,I.quantity.decimals)}),ie&&T("span",{className:"wi-token-value",children:Li(I.quantity.numeric,I.quantity.decimals,ie.price)})]})]},`${I.address}-${I.chainId}`)}),u&&ci&&Array.from({length:3},(I,ie)=>Z("div",{className:"wi-skeleton-item",children:[Z("div",{className:"wi-skeleton-left",children:[T("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Z("div",{className:"wi-skeleton-lines",children:[T("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),T("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Z("div",{className:"wi-skeleton-right",children:[T("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),T("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${ie}`)),u&&!ci&&!q&<.length===0&&Ft.length===0&&T("div",{className:"wi-empty",children:"No Tokens Found"}),u&&Ft.map(I=>{let ie=H.get(I.token)||"",nt=Na(a,Rt[a].cross);return Z("div",{className:"wi-token-item",children:[Z("div",{className:"wi-token-left",children:[Z("div",{className:"wi-token-icon-wrap",children:[T("img",{src:ie||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:I.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:gi,onError:rr=>{rr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),nt&&T("img",{src:nt,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:rr=>{rr.currentTarget.style.display="none"}})]}),Z("div",{className:"wi-token-info",children:[T("span",{className:"wi-token-name",children:I.token_name}),T("div",{className:"wi-token-price-row",children:Z("span",{className:"wi-token-price",children:[Dr(I.current_price,18)," CROSS"]})})]})]}),Z("div",{className:"wi-token-right",children:[T("span",{className:"wi-token-balance",children:Dr(I.balance,18)}),T("span",{className:"wi-token-value",children:vo(I.current_value_usd)})]})]},`forge-${I.token}`)})]})},"tokens"),W==="bottom"&&X&&T("div",{className:"wi-nav-fixed",children:X}),Ec&&T("div",{className:"wi-wallet-disconnect-row",children:Ec})]},"wallet"),rb=Ke?T("div",{className:ye("wi-view-inner wi-portfolio-body",At.current&&"wi-view-portfolio"),children:T($o,{env:a,theme:i,walletAddress:h,showHeader:!1,onOutlink:st,lpBalanceReader:nn,stakingRewardsReader:_e,sendTransaction:It,estimateGas:qt,sections:_t})},"portfolio"):null,ob=te?T("div",{className:ye("wi-view-inner wi-send-body",At.current&&"wi-view-send"),children:T(Yi,{env:a,theme:i,walletAddress:h,accountName:Et,accounts:x,initialStep:P0,token:te,tokens:lt,onTokenChange:_,sendTransaction:It,getTransactionReceipt:et,estimateGas:qt,getTokenPriceUsd:I=>{let ie=Re.get(Cr(I.chainId,I.address));if(!ie?.price)return;let nt=parseFloat(ie.price);return Number.isFinite(nt)?nt:void 0},onClose:C,onBackToWallet:ma,onSubmitted:Y0,onSuccess:K0,onFailed:Z0,onOutlink:st})},"send"):null,ab=Q.useMemo(()=>ot||lt.map(I=>{let ie=Re.get(Cr(I.chainId,I.address)),nt=ie?.price?parseFloat(ie.price):void 0;return{name:I.name,symbol:I.symbol,chainId:I.chainId,address:I.address,decimals:I.quantity.decimals,balance:Ko(I.quantity.numeric,I.quantity.decimals),iconUrl:I.icon_url,priceUsd:Number.isFinite(nt)?nt:void 0}}),[ot,Re,lt]),ib=T("div",{className:ye("wi-view-inner wi-bridge-body",At.current&&"wi-view-send"),children:T(ta,{env:a,walletAddress:h,tokens:ab,history:Ze,termsUrl:U,getQuote:Ct,getToTokens:bt,getApproval:Ve,approveBridge:Yt,submitBridge:Kt,onClose:C,onBackToWallet:ma})},"bridge"),sb=ae?T("div",{className:ye("wi-view-inner wi-token-detail-body",At.current&&"wi-view-send"),children:T(Hm,{env:a,isMobile:s,token:ae,walletAddress:h,stat:Re.get(Cr(ae.chainId,ae.address)),tokenInfo:hr.get(es(ae.chainId,ae.address)),showBalance:g,onBack:z0,onClose:C,onSend:Q0,onOutlink:st})},"token-detail"):null,lb=Me?T("div",{className:ye("wi-view-inner wi-token-detail-body",At.current&&"wi-view-send"),children:T(ng,{collection:Me,onBack:V0,onClose:C,onSelectNft:H0})},"nft-collection"):null,db=ge?T("div",{className:ye("wi-view-inner wi-token-detail-body",At.current&&"wi-view-send"),children:T(rg,{env:a,item:ge,onBack:_0,onClose:C,onOutlink:st})},"nft-detail"):null,zo=Q.useMemo(()=>{let I=Rt[a].cross;return lt.find(ie=>ie.chainId===I&&od(ie.address))??lt.find(ie=>ie.chainId===I&&ie.symbol.toUpperCase().includes("ONEUSD"))},[lt,a]),cb=Q.useMemo(()=>{if(zo)return Dr(zo.quantity.numeric,zo.quantity.decimals)},[zo]),pb=ke?T("div",{className:ye("wi-view-inner wi-onepop-body",At.current&&"wi-view-send"),children:T(Ms,{env:a,balanceDisplay:cb,balanceIconUrl:zo?.icon_url,isBalanceLoading:q&&!zo,summary:Qe,logoSrc:Ht,heroSrc:Tt,getTokenSlot:ut,onBack:ma,onClose:C,onSend:De,onClaim:Ue,onActivity:Be,onRepliesSeen:St})},"onepop"):null,El=!!N&&b?.trim().toLowerCase()!=="my wallet",Lc=Z(Gd,{children:[Z("span",{className:"wi-receive-avatar",children:[T("span",{className:"wi-avatar-fallback",style:Tc}),hi&&T("img",{src:hi,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:gi,onError:I=>{I.currentTarget.style.display="none"}})]}),T("span",{className:"wi-receive-account-name",children:Et}),El&&T("span",{className:"wi-receive-chevron","data-open":ha,"aria-hidden":"true",children:T(Gn,{size:16})})]}),ub=Z("div",{className:ye("wi-view-inner wi-qr-body",At.current&&"wi-view-qr"),children:[Z("div",{className:"wi-receive-section",children:[El?T("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{ba(!0),N?.()},"aria-label":"Switch account",children:Lc}):T("div",{className:"wi-receive-account",children:Lc}),Z("div",{className:"wi-qr-block",children:[Z("div",{className:"wi-qr-box",children:[T(n2,{value:h,size:180,level:"H",marginSize:2,...c&&{imageSettings:{src:c,height:33,width:33,excavate:!0}}}),!c&&T("div",{className:"wi-qr-logo",children:T(gp,{size:33})})]}),T("p",{className:"wi-qr-address",children:h})]}),Z("button",{type:"button",className:"wi-qr-copy-btn",onClick:Sc,"data-track":"address_copy",children:[T("span",{className:"wi-qr-copy-icon",children:Bo?T(ar,{size:16}):T(Lr,{size:16})}),T("span",{className:"wi-qr-copy-text",children:Bo?"Copied!":"Copy address"})]})]}),Ic&&T("div",{className:"wi-receive-footer",children:Ic})]},"qr"),fb=O==="qr"||O==="portfolio"||O==="send"||O==="bridge",Dc=Y!==null?T("div",{className:"wi-builtin-footer",children:Y}):null,Pc=Z("div",{className:"wi-account-text",children:[El?Z("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{ba(!0),N?.()},"aria-label":"Switch account","aria-expanded":ha,children:[T("span",{className:"wi-account-name",children:Et}),T("span",{className:"wi-account-switch","data-open":ha,"aria-hidden":"true",children:T(Gn,{size:20})})]}):T("div",{className:"wi-account-row",children:T("span",{className:"wi-account-name",children:Et})}),Z("button",{type:"button",className:"wi-address-row-btn",onClick:Sc,"aria-label":"Copy address","data-track":"address_copy",children:[T("span",{className:"wi-account-address",children:Xt(h)}),T("span",{className:"wi-account-copy","data-copied":Bo,children:Bo?T(ar,{size:12}):T(Lr,{size:12})})]})]}),Al=Z(Gd,{children:[r,O==="qr"?T("div",{className:"wi-sticky-header",children:Z("div",{className:"wi-header wi-header--receive",children:[T("button",{type:"button",className:"wi-header-back",onClick:ma,"aria-label":"Back",children:T(On,{size:24})}),T("span",{className:"wi-receive-title",children:"Receive"}),T("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:T(hn,{size:24})})]})}):O==="send"||O==="bridge"||O==="token-detail"||O==="onepop"||O==="nft-collection"||O==="nft-detail"?null:fb?Z("div",{className:"wi-sticky-header",children:[Z("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[T("button",{type:"button",className:"wi-header-back",onClick:ma,"aria-label":"Back",children:T(On,{size:24})}),T("div",{className:"wi-account-block wi-account-block--sub-account",children:Pc}),T("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:T(hn,{size:24})})]}),T("hr",{className:"wi-divider"})]}):Z("div",{className:"wi-sticky-header",children:[Z("div",{className:"wi-header wi-header--wallet",children:[Z("div",{className:"wi-account-block",children:[Z("div",{className:"wi-avatar",children:[T("div",{className:"wi-avatar-fallback",style:Tc}),hi&&T("img",{src:hi,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:gi,onError:I=>{I.currentTarget.style.display="none"}})]}),Pc]}),Z("div",{className:"wi-header-actions",children:[y&&(w||Ie)&&T("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ga,"aria-label":"Show QR code","data-track":"receive",children:T(Mi,{size:20})}),T("button",{type:"button",className:"wi-header-action",onClick:C,"aria-label":"Close","data-wi-close":!0,children:T(hn,{size:24})})]})]}),T("hr",{className:"wi-divider"})]}),Z("div",{className:"wi-view-container",children:[O==="wallet"&&nb,O==="qr"&&ub,O==="portfolio"&&rb,O==="send"&&ob,O==="bridge"&&ib,O==="token-detail"&&sb,O==="onepop"&&pb,O==="nft-collection"&&lb,O==="nft-detail"&&db]}),(O==="wallet"||O==="onepop")&&Cn&&T("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Cn}),O==="wallet"&&qe&&Z("a",{className:"wi-send-toast",href:Hr??"#",target:"_blank",rel:"noopener noreferrer",onClick:I=>{if(!Hr){I.preventDefault();return}Lt(I,Hr,{category:"send",origin:"send-transaction",payload:{chainId:qe.chainId,txHash:qe.txHash}},st)},children:[T("span",{className:"wi-send-toast-icon","data-status":qe.status,"aria-hidden":!0,children:qe.status==="pending"?T("span",{className:"wi-send-toast-spinner"}):qe.status==="error"?T("span",{className:"wi-send-toast-error-dot"}):T(vp,{size:20})}),Z("span",{className:"wi-send-toast-copy",children:[T("span",{className:"wi-send-toast-title",children:qe.status==="pending"?"Sending...":qe.status==="error"?"Send failed":"Send complete"}),T("span",{className:"wi-send-toast-desc",children:qe.status==="pending"||qe.status==="error"?qe.description:"Tap to see your transaction"})]})]}),Dc&&O!=="portfolio"&&O!=="send"&&O!=="token-detail"&&O!=="nft-collection"&&O!=="nft-detail"&&O!=="onepop"&&T("div",{className:"wi-sticky-footer",children:T("div",{className:"wi-footer",ref:li,children:Dc})})]}),Ml={...ee,...go>0?{"--wi-footer-height":`${go}px`}:null},Oc=Q.useCallback(I=>{let ie=I.detail.originalEvent.target;ie instanceof Element&&ie.closest("[data-rd-shell]")!==null&&I.preventDefault()},[]);return Ie?T(xe,{feature:"wallet_info",children:Z("div",{className:ye("wi-drawer-content wi-page-content",n),"data-theme":i,style:Ml,"data-no-balance":!g||void 0,"data-has-footer":go>0||void 0,"data-view":O,children:[T("h1",{className:"wi-sr-only",children:"My Wallet"}),Al]})}):s?T(xe,{feature:"wallet_info",children:Z(Ls.Portal,{children:[p&&T(Ls.Overlay,{className:"wi-drawer-overlay"}),Z(Ls.Content,{className:ye("wi-drawer-content",n),"data-theme":i,"data-vaul-no-drag":d==="left"||d==="right"?!0:void 0,style:Ml,"data-direction":d,"data-no-balance":!g||void 0,"data-has-footer":go>0||void 0,"data-view":O,onInteractOutside:Oc,children:[T(Ls.Title,{className:"wi-sr-only",children:"My Wallet"}),Al]})]})}):Z(xe,{feature:"wallet_info",children:[p&&l&&T("div",{className:"wi-drawer-overlay",onClick:C}),T(Ds.Portal,{children:T(Ds.Content,{align:e,sideOffset:t,className:ye("wi-popover-content",n),"data-theme":i,style:Ml,"data-no-balance":!g||void 0,"data-has-footer":go>0||void 0,"data-view":O,onInteractOutside:Oc,children:Al})})]})}import*as Rg from"react";function Ng({position:e="top",children:t}){let{setNavContent:n,setNavPosition:r}=_r();return Rg.useEffect(()=>(n(t),r(e),()=>n(null)),[t,e,n,r]),null}import*as Sg from"react";function Tg({children:e}){let{setFooterContent:t}=_r();return Sg.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}ce(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #a392ff);--wi-send-solid-from: #ff4d85;--wi-send-solid-to: #ff7f55;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #7346f3);--wi-send-solid-from: #f62e61;--wi-send-solid-to: #f7564a;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
|
|
13
13
|
`);ce(`.wi-trigger-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border:1px solid rgba(255,255,255,.2);background:#1a2332;border-radius:9999px;cursor:pointer;color:#fff;font-family:inherit;font-size:16px;font-weight:500;line-height:24px;letter-spacing:-.3125px;transition:opacity .15s ease}.wi-trigger-btn:hover{opacity:.85}.wi-trigger-btn[data-theme=light]{background:#f3f6f8;border-color:#1212121a;color:#121212}.wi-trigger-btn[data-mobile]{font-size:14px;padding:6px 12px;gap:6px;line-height:20px}.wi-trigger-address{white-space:nowrap}.wi-divider{height:1px;background:var(--wi-border-default);margin:0;border:none;flex-shrink:0}[data-theme=light] .wi-divider{background:#1212121a}[data-theme=dark] .wi-divider{background:#ffffff1a}
|
|
14
14
|
`);ce(`@keyframes wi-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes wi-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes wi-slide-in-right{0%{transform:translate(40px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes wi-slide-in-left{0%{transform:translate(-40px);opacity:0}to{transform:translate(0);opacity:1}}
|
|
15
|
-
`);ce(`.wi-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;width:393px;border-radius:24px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--wi-surface-bg);box-shadow:var(--ds-shadow-modal, var(--wi-shadow));animation:wi-fade-in .15s ease-out;height:min(680px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.wi-popover-content[data-no-balance]{height:auto}.wi-popover-content[data-has-footer]:not([data-no-balance]){height:min(calc(680px + var(--wi-footer-height, 0px)),calc(100dvh - 32px))}.wi-drawer-overlay{position:fixed;inset:0;z-index:100000;background:#0009}.wi-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;max-height:100vh;background:var(--wi-surface-bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}.wi-drawer-content[data-no-balance]{bottom:auto;max-height:none}.wi-drawer-content[data-no-balance][data-direction=bottom]{bottom:0;top:auto;border-radius:24px 24px 0 0}.wi-drawer-content[data-direction=left]{right:auto;left:0}.wi-drawer-content[data-direction=bottom]{top:0;left:0;right:0;width:100%;max-height:100dvh;margin:0 auto}.wi-drawer-content[data-direction=bottom][data-view=qr]{max-height:100dvh}.wi-popover-content[data-view=qr]{max-height:calc(100dvh - 32px)}.wi-drawer-content.wi-page-content{position:relative;inset:auto;z-index:auto;width:100%;max-width:480px;height:100dvh;max-height:none;margin:0 auto;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}.wi-page-content [data-wi-close]{visibility:hidden;pointer-events:none}.wi-page-content .wi-header-actions [data-wi-close]{display:none}.wi-sticky-header{flex-shrink:0;position:relative}.wi-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px}.wi-header--wallet{align-items:flex-start;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--wallet+.wi-divider{display:none}.wi-header--sub-account{align-items:center}.wi-header--sub-account .wi-header-back{width:32px;height:38px}.wi-header--sub-account .wi-header-action{flex-shrink:0}.wi-account-block{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wi-account-block--sub-account{align-items:center}.wi-avatar{flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;background:var(--wi-surface-bg);box-sizing:border-box;overflow:hidden}.wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-avatar-img{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;object-fit:cover;background:transparent}.wi-account-text{display:flex;flex-direction:column;gap:2px;min-width:0}.wi-account-row{display:flex;align-items:center;gap:8px;min-width:0}.wi-account-row--btn{padding:2px;margin:0;width:fit-content;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit;border-radius:6px;transition:background-color .15s ease,opacity .15s ease}.wi-account-row--btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .06))}.wi-account-row--btn:focus-visible{outline:2px solid var(--wi-primary, #f0640d);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-total-send:hover:not(:disabled){background:#2e3544}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.93)}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.wi-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-page-content .wi-action-toast,.wi-page-content .wi-send-toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-accent-primary-on-inverted, #ff8438);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #ff8438)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
|
|
16
|
-
`);ce(`.wi-td-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;gap:8px;pointer-events:none}.wi-td-header-icon{width:24px;height:24px;object-fit:contain;flex-shrink:0}.wi-td-header-name{font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;gap:24px;padding:20px 24px 24px;background:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-td-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-td-scroll::-webkit-scrollbar{width:4px}.wi-td-scroll::-webkit-scrollbar-track{background:transparent}.wi-td-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#0003}.wi-td-chart{display:flex;flex-direction:column;gap:14px}.wi-td-chart-panel{display:flex;flex-direction:column;gap:4px}.wi-td-chart-price{font-size:26px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-change{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ds-system-green-high, #00a869)}.wi-td-chart-change[data-positive=false]{color:var(--wi-error, #e70077)}.wi-td-chart-when{font-weight:400;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-chart-plot{position:relative;width:100%;height:150px}.wi-td-chart-svg{display:block;width:100%;height:150px;overflow:visible;touch-action:none}.wi-td-chart-minmax{fill:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:11px;font-family:inherit}.wi-td-chart-cursor{stroke:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));stroke-width:1;stroke-dasharray:3 3}.wi-td-chart-skeleton{width:100%;height:150px;border-radius:12px}.wi-td-chart-tabs{display:flex;gap:6px;justify-content:space-between}.wi-td-chart-tab{flex:1;padding:7px 0;border:none;border-radius:8px;background:transparent;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));transition:background .15s ease,color .15s ease}.wi-td-chart-tab[data-active]{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1));color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-tab:hover:not([data-active]){color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-radius:16px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-balance-left{display:flex;flex-direction:column;gap:4px;flex:1 1 0;min-width:0}.wi-td-balance-label{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-amount{font-size:30px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff);white-space:nowrap;max-width:100%}.wi-td-balance-fiat{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-send-btn{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:12px 22px;border:none;border-radius:999px;cursor:pointer;font-family:inherit;font-size:15px;font-weight:600;color:var(--wi-on-primary, #ffffff);background:var(--wi-primary, #
|
|
17
|
-
`);ce(`.wi-asset-tabs{display:flex;gap:20px;padding:
|
|
15
|
+
`);ce(`.wi-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;width:393px;border-radius:24px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--wi-surface-bg);box-shadow:var(--ds-shadow-modal, var(--wi-shadow));animation:wi-fade-in .15s ease-out;height:min(680px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.wi-popover-content[data-no-balance]{height:auto}.wi-popover-content[data-has-footer]:not([data-no-balance]){height:min(calc(680px + var(--wi-footer-height, 0px)),calc(100dvh - 32px))}.wi-drawer-overlay{position:fixed;inset:0;z-index:100000;background:#0009}.wi-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;max-height:100vh;background:var(--wi-surface-bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}.wi-drawer-content[data-no-balance]{bottom:auto;max-height:none}.wi-drawer-content[data-no-balance][data-direction=bottom]{bottom:0;top:auto;border-radius:24px 24px 0 0}.wi-drawer-content[data-direction=left]{right:auto;left:0}.wi-drawer-content[data-direction=bottom]{top:0;left:0;right:0;width:100%;max-height:100dvh;margin:0 auto}.wi-drawer-content[data-direction=bottom][data-view=qr]{max-height:100dvh}.wi-popover-content[data-view=qr]{max-height:calc(100dvh - 32px)}.wi-drawer-content.wi-page-content{position:relative;inset:auto;z-index:auto;width:100%;max-width:480px;height:100dvh;max-height:none;margin:0 auto;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}.wi-page-content [data-wi-close]{visibility:hidden;pointer-events:none}.wi-page-content .wi-header-actions [data-wi-close]{display:none}.wi-sticky-header{flex-shrink:0;position:relative}.wi-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px}.wi-header--wallet{align-items:flex-start;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--wallet+.wi-divider{display:none}.wi-header--sub-account{align-items:center}.wi-header--sub-account .wi-header-back{width:32px;height:38px}.wi-header--sub-account .wi-header-action{flex-shrink:0}.wi-account-block{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wi-account-block--sub-account{align-items:center}.wi-avatar{flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;background:var(--wi-surface-bg);box-sizing:border-box;overflow:hidden}.wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-avatar-img{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;object-fit:cover;background:transparent}.wi-account-text{display:flex;flex-direction:column;gap:2px;min-width:0}.wi-account-row{display:flex;align-items:center;gap:8px;min-width:0}.wi-account-row--btn{padding:2px;margin:0;width:fit-content;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit;border-radius:6px;transition:background-color .15s ease,opacity .15s ease}.wi-account-row--btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .06))}.wi-account-row--btn:focus-visible{outline:2px solid var(--wi-primary, #7346f3);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .38s cubic-bezier(.34,1.8,.64,1)}.wi-total-send:hover:not(:disabled){background:#2e3544;transform:scale(1.06)}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.88);transition:background-color .15s ease,transform .08s ease-out}@media(prefers-reduced-motion:reduce){.wi-total-send,.wi-total-send:active:not(:disabled){transition:background-color .15s ease}.wi-total-send:hover:not(:disabled){transform:none}}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.wi-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-page-content .wi-action-toast,.wi-page-content .wi-send-toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #7346f3)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid color-mix(in srgb,var(--ds-accent-primary-on-inverted, #7e54f4) 22%,transparent);border-top-color:var(--ds-accent-primary-on-inverted, #7e54f4);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #7e54f4)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
|
|
16
|
+
`);ce(`.wi-td-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;gap:8px;pointer-events:none}.wi-td-header-icon{width:24px;height:24px;object-fit:contain;flex-shrink:0}.wi-td-header-name{font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;gap:24px;padding:20px 24px 24px;background:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-td-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-td-scroll::-webkit-scrollbar{width:4px}.wi-td-scroll::-webkit-scrollbar-track{background:transparent}.wi-td-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#0003}.wi-td-chart{display:flex;flex-direction:column;gap:14px}.wi-td-chart-panel{display:flex;flex-direction:column;gap:4px}.wi-td-chart-price{font-size:26px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-change{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ds-system-green-high, #00a869)}.wi-td-chart-change[data-positive=false]{color:var(--wi-error, #e70077)}.wi-td-chart-when{font-weight:400;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-chart-plot{position:relative;width:100%;height:150px}.wi-td-chart-svg{display:block;width:100%;height:150px;overflow:visible;touch-action:none}.wi-td-chart-minmax{fill:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:11px;font-family:inherit}.wi-td-chart-cursor{stroke:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));stroke-width:1;stroke-dasharray:3 3}.wi-td-chart-skeleton{width:100%;height:150px;border-radius:12px}.wi-td-chart-tabs{display:flex;gap:6px;justify-content:space-between}.wi-td-chart-tab{flex:1;padding:7px 0;border:none;border-radius:8px;background:transparent;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));transition:background .15s ease,color .15s ease}.wi-td-chart-tab[data-active]{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1));color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-tab:hover:not([data-active]){color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-radius:16px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-balance-left{display:flex;flex-direction:column;gap:4px;flex:1 1 0;min-width:0}.wi-td-balance-label{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-amount{font-size:30px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff);white-space:nowrap;max-width:100%}.wi-td-balance-fiat{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-send-btn{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:12px 22px;border:none;border-radius:999px;cursor:pointer;font-family:inherit;font-size:15px;font-weight:600;color:var(--wi-on-primary, #ffffff);background:var(--wi-primary, #7346f3);transition:filter .15s ease}.wi-td-send-btn:hover{filter:brightness(1.06)}.wi-td-send-btn:active{filter:brightness(.94)}.wi-td-section{display:flex;flex-direction:column;gap:14px}.wi-td-section-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-rows{display:flex;flex-direction:column;gap:12px}.wi-td-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wi-td-row-label{font-size:15px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-row-value{font-size:15px;font-weight:500;color:var(--wi-texticon-primary, #ffffff);text-align:right;word-break:break-all}.wi-td-row-link,.wi-td-row-copy{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;cursor:pointer;font-family:inherit;text-decoration:none}.wi-td-row-link:hover,.wi-td-row-copy:hover{opacity:.8}.wi-td-external-icon{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-row-copy svg{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-social-row{display:flex;flex-wrap:wrap;gap:10px}.wi-td-social-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--wi-texticon-primary, #ffffff);background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none;transition:background .15s ease}.wi-td-social-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-list{display:flex;flex-direction:column;gap:10px}.wi-td-history-item{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none}.wi-td-history-item--link{cursor:pointer;transition:background .15s ease}.wi-td-history-item--link:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-top,.wi-td-history-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.wi-td-history-type{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-history-type[data-direction=receive],.wi-td-history-type[data-direction=bridge-in]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-counter{font-size:14px;color:var(--wi-primary, #7346f3);font-variant-numeric:tabular-nums}.wi-td-history-meta{display:inline-flex;align-items:center;gap:8px;min-width:0}.wi-td-history-status{font-size:14px;font-weight:500}.wi-td-history-status[data-status=success]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-status[data-status=fail]{color:var(--wi-error, #e70077)}.wi-td-history-time{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-history-amount{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.wi-td-history-amount[data-size=sm]{font-size:13px}.wi-td-history-amount[data-size=xs]{font-size:11px;white-space:normal;word-break:break-all}.wi-td-history-skeleton{display:flex;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-history-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:14px;text-align:center}.wi-td-retry-btn{padding:8px 18px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.wi-td-retry-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-sentinel{display:flex;align-items:center;justify-content:center;min-height:32px}.wi-td-history-loading{font-size:13px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-loadmore-btn{align-self:center;margin-top:2px;padding:10px 24px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease}.wi-td-loadmore-btn:hover:not(:disabled){background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-loadmore-btn:disabled{cursor:default;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}
|
|
17
|
+
`);ce(`.wi-asset-tabs{position:relative;display:flex;gap:20px;padding:20px 24px 0;flex-shrink:0}.wi-drawer-content .wi-asset-tabs{padding:20px 16px 0}.wi-scrollable-body[data-tab-slide=from-right]{animation:wi-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.wi-scrollable-body[data-tab-slide=from-left]{animation:wi-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes wi-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes wi-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.wi-scrollable-body[data-tab-slide]{animation:none}.wi-asset-tab-indicator[data-animate]{transition:none}}.wi-asset-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;color:var(--wi-texticon-tertiary);transition:color .15s ease}.wi-asset-tab[data-active]{color:var(--wi-texticon-primary)}.wi-asset-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--wi-texticon-primary);pointer-events:none}.wi-asset-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.wi-nft-media{display:block;width:100%;height:100%;object-fit:cover;background:var(--wi-surface-subtle)}.wi-nft-media--fallback{display:flex;align-items:center;justify-content:center;overflow:hidden}.wi-nft-media-fallback-icon{width:100%;height:100%;color:var(--wi-texticon-tertiary)}.wi-nft-thumb,.wi-nft-thumb-skeleton{width:40px;height:40px;border-radius:8px;flex-shrink:0;overflow:hidden}.wi-nft-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.wi-nft-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, var(--wi-surface-default));color:var(--wi-texticon-tertiary)}.wi-nft-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, var(--wi-texticon-primary))}.wi-nft-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--wi-texticon-tertiary)}.wi-nft-state{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 24px}.wi-nft-state-text{font-size:16px;color:var(--wi-texticon-secondary)}.wi-nft-retry{padding:10px 20px;border:1px solid var(--wi-border-default);border-radius:999px;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-retry:disabled{opacity:.6;cursor:default}.wi-nft-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.wi-nft-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit}.wi-nft-card-media{position:relative;display:block;aspect-ratio:1 / 1;border-radius:12px;overflow:hidden;background:var(--wi-surface-subtle)}.wi-nft-card-media .wi-nft-media{object-fit:contain}.wi-nft-card:hover .wi-nft-card-media{filter:brightness(1.06)}.wi-nft-card-qty{position:absolute;right:6px;bottom:6px;padding:2px 6px;border-radius:999px;font-size:12px;font-weight:600;color:var(--wi-texticon-primary);background:var(--wi-surface-default)}.wi-nft-card-name,.wi-nft-card-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-card-name{font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-card-id{font-size:12px;color:var(--wi-texticon-tertiary)}.wi-nft-header-name{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-detail-hero{aspect-ratio:1 / 1;width:100%;border-radius:16px;overflow:hidden;background:var(--wi-surface-subtle);flex-shrink:0}.wi-nft-detail-media{object-fit:contain}.wi-nft-detail-titles{display:flex;flex-direction:column;gap:4px;min-width:0}.wi-nft-detail-collection{font-size:14px;color:var(--wi-texticon-tertiary)}.wi-nft-detail-name{word-break:break-word}.wi-nft-detail-desc{margin:0;font-size:15px;line-height:1.5;color:var(--wi-texticon-secondary);white-space:pre-line;word-break:break-word}.wi-nft-attrs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wi-nft-attr{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 12px;border-radius:12px;background:var(--wi-surface-subtle)}.wi-nft-attr-type{font-size:12px;color:var(--wi-texticon-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-attr-value{font-size:14px;font-weight:600;color:var(--wi-texticon-primary);word-break:break-word}.wi-nft-explorer-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:14px 20px;border:1px solid var(--wi-border-default);border-radius:999px;font-size:15px;font-weight:600;color:var(--wi-texticon-primary);text-decoration:none;flex-shrink:0}.wi-nft-explorer-btn:hover{opacity:.85}
|
|
18
18
|
`);ce(`.wi-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
19
|
-
`);import{jsx as jd}from"react/jsx-runtime";function Kv({mobileBreakpoint:e=768,drawerDirection:t,modal:n,open:r,onOpenChange:o,children:a,...i}){let s=Go(`(max-width: ${e}px)`),l=t??(i.showBalance?"right":"bottom"),d=l==="left"||l==="right",p=r!==void 0,[b,u]=ja.useState(!1),g=p?r:b,y=ja.useCallback(c=>{p||u(c),o?.(c)},[p,o]),w=ja.useCallback(()=>y(!1),[y]);or(g,w);let f=Vi(i,{presentation:"overlay",open:g,isMobile:s,drawerDirection:l,modal:n??!1,close:w});return jd(ya.Provider,{value:f,children:s?jd(Yv.Root,{direction:l,open:g,onOpenChange:y,handleOnly:d,noBodyStyles:!0,repositionInputs:!1,children:a},"drawer"):jd(yg.Root,{open:g,onOpenChange:y,children:a},"popover")})}var ra=Object.assign(Kv,{Trigger:tu,Content:Ms,Nav:hg,Footer:wg});import*as vg from"react";import{jsx as xg}from"react/jsx-runtime";function kg({className:e,children:t,...n}){let r=Vi({...n,onDisconnect:void 0,onBuy:void 0,onBuyDisabledMessage:void 0,showBridge:!1,onBridgeDisabledMessage:void 0,showOnePop:!1,showPortfolio:!1,showNft:n.showNft??!0},{presentation:"page",open:!0,isMobile:!0,drawerDirection:"bottom",modal:!1});or(r.view!=="wallet",r.close);let{setView:o}=r,a=vg.useCallback(()=>o("nft-collection"),[o]);return or(r.view==="nft-detail",a),xg(ya.Provider,{value:r,children:xg(Ms,{className:e,children:t})})}import*as _e from"react";import*as Ks from"react";import{createContext as Zv,useContext as Xv}from"react";var Wd=Zv(null);function Wa(){let e=Xv(Wd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as oh from"react";import{createContext as Jv,useContext as $v}from"react";var Ls=Jv(null);function ur(){let e=$v(Ls);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as e2,useContext as t2,useLayoutEffect as n2,useState as r2}from"react";function Cg(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(n){if(n!==e){e=n;for(let r of[...t])r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}var Gd=e2(null);function o2(){let e=t2(Gd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function Rg(){let e=o2(),[t,n]=r2(e.getSnapshot);return n2(()=>(n(e.getSnapshot()),e.subscribe(()=>n(e.getSnapshot()))),[e]),t}ce(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #8181ff);--rd-accent-contrast: var(--ds-accent-primary-on, #0f1117);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
|
|
20
|
-
`);import{jsx as no,jsxs as fr}from"react/jsx-runtime";function Ng({minNotice:e,arrivalStatus:t}){let n=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,r=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return n?`${n} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return n?`${n} at the processing address. Checking the minimum.`:"Deposit detected. Checking the minimum.";case"funded":return`${e.min} ${e.symbol} received at the processing address. Preparing delivery.`;case"processing":return"Minimum reached. Bridging and delivering to ONEchain.";case"completed":return"Transfer completed. Funds were delivered to ONEchain.";case"failed":return`Transfer needs attention${t.backendStatus?` (${t.backendStatus})`:""}.`;case"unavailable":return e.remaining===void 0?"Live status is temporarily unavailable. Retrying automatically.":void 0;default:return e.remaining===void 0?"Waiting for your deposit.":void 0}})();return r?fr("div",{className:`rd-checklist-status rd-checklist-status-${t.phase}`,"data-rd-deposit-status":"","data-phase":t.phase,role:"status","aria-live":"polite","aria-atomic":"true",children:[no("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),no("span",{children:r})]},`live:${t.phase}:${r}`):e.remaining!==void 0?fr("div",{className:"rd-checklist-status rd-checklist-status-waiting rd-min-notice-pending","data-rd-min-notice-pending":"",role:"status","aria-live":"polite","aria-atomic":"true",children:[no("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),fr("span",{children:["Waiting for"," ",fr("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function Sg({minNotice:e,onlySend:t,showWalletCreditNote:n=!1}){return fr("div",{className:"rd-checklist","data-rd-checklist":"",children:[fr("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[no("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),fr("span",{children:[fr("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",fr("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),fr("div",{className:"rd-checklist-row",children:[no("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),no("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),n&&fr("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[no("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),no("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as h2,useId as b2,useState as Eg}from"react";var Ga="0x0000000000000000000000000000000000000000",a2=/^0x[0-9a-fA-F]{40}$/;function pt(e){return a2.test(e)}function $t(e,t){let n=e<0n,o=(n?-e:e).toString().padStart(t+1,"0"),a=t===0?o:o.slice(0,-t),i=t===0?"":o.slice(-t).replace(/0+$/,""),s=i?`${a}.${i}`:a;return n?`-${s}`:s}function Ds(e,t){let n=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!n)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,r,o,a=""]=n;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return r==="-"?-i:i}import{useId as Eo}from"react";var Hd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwo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iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function Tg(e){switch(e.toUpperCase()){case"ONEUSD":return Hd;case"PONEUSD":return i2;case"USDT":return s2;case"USDC":return l2;default:return}}import{jsx as $,jsxs as un}from"react/jsx-runtime";function Ig(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function d2({size:e,bg:t,fg:n="#ffffff",children:r}){return un("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[$("circle",{cx:"12",cy:"12",r:"12",fill:t}),$("g",{fill:n,stroke:n,children:r})]})}function _d({size:e,bg:t,fg:n="#ffffff",text:r}){return $(d2,{size:e,bg:t,fg:n,children:$("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:n,children:r})})}function oa({size:e,viewBox:t="0 0 24 24",children:n}){return $("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:n})}function c2({size:e}){let t=Eo();return un(oa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#000",d:"M24 0H0v24h24z"}),$("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),$("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),$("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),$("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),$("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),$("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.048-5-2.9L12 4l5 8.148zm-4.67-3.136 4.588-7.475v5.435zm-.068.204 4.656-2.068v4.768zm4.816-2.068v4.768l4.653-2.7zm0-.176 4.588 2.04-4.588-7.475z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.917-5-2.84L12 20l5-6.924zm-4.44-2.341 4.36 2.48v3.56zm4.519 2.48v3.56l4.36-6.04z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function p2({size:e}){let t=Eo();return un(oa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"M7.635 6.449 12 4l4.364 2.449-1.6.907L12 5.809 9.24 7.356zm8.73 3.093-1.6-.906L12 10.182 9.24 8.636l-1.605.906v1.81l2.756 1.546v3.089l1.609.906 1.604-.906v-3.09l2.76-1.546zm0 4.903V12.63l-1.6.907v1.809zm1.141.64-2.76 1.542v1.813l4.365-2.453v-4.898l-1.605.902zm-1.604-7.09 1.6.907v1.81l1.609-.903V7.996l-1.605-.907L15.902 8zm-5.511 9.29v1.808L12 20l1.604-.907V17.29l-1.604.9-1.605-.907zM7.635 14.44l1.6.907v-1.81l-1.6-.906v1.813zm2.756-6.444L12 8.902l1.604-.906L12 7.089 10.395 8zm-3.898.906 1.605-.906-1.6-.907L4.888 8v1.813l1.605.903zm0 3.09-1.604-.903v4.898l4.364 2.453v-1.818L6.498 15.08v-3.093z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function u2({size:e}){let t=Eo();return un(oa,{size:e,viewBox:"0 0 111 111",children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#fff",d:"M0 0h111v111H0z"}),$("path",{fill:"#0052FF",d:"M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function f2({size:e}){let t=Eo();return un(oa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#213147",d:"M24 0H0v24h24z"}),un("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[$("path",{fill:"#fff",d:"m13.203 13.216-.787 2.124a.27.27 0 0 0 0 .183l1.354 3.655 1.565-.89-1.879-5.072c-.042-.117-.21-.117-.253 0m1.577-3.573a.135.135 0 0 0-.253 0l-.787 2.124a.27.27 0 0 0 0 .183l2.217 5.985 1.565-.89z"}),$("path",{fill:"#fff",d:"M11.999 4.991a.24.24 0 0 1 .111.03l5.969 3.393a.22.22 0 0 1 .112.19v6.787a.22.22 0 0 1-.112.19l-5.969 3.395a.2.2 0 0 1-.111.029.24.24 0 0 1-.113-.03l-5.968-3.39a.22.22 0 0 1-.112-.19v-6.79a.22.22 0 0 1 .112-.19l5.969-3.393a.23.23 0 0 1 .111-.03m0-.991c-.213 0-.426.054-.616.163L5.416 7.556a1.21 1.21 0 0 0-.616 1.05v6.787c0 .433.234.834.616 1.05l5.968 3.394a1.25 1.25 0 0 0 1.232 0l5.968-3.394a1.21 1.21 0 0 0 .616-1.05V8.606a1.21 1.21 0 0 0-.616-1.05l-5.97-3.393A1.24 1.24 0 0 0 11.998 4"}),$("path",{fill:"#fff",d:"m8.052 17.943.55-1.482 1.105.905-1.034.93zm3.445-9.823H9.984a.27.27 0 0 0-.254.175l-3.243 8.757 1.565.89L11.623 8.3a.132.132 0 0 0-.127-.179"}),$("path",{fill:"#fff",d:"M14.144 8.12h-1.513a.27.27 0 0 0-.253.175l-3.704 10 1.565.89 4.032-10.886a.133.133 0 0 0-.127-.179"})]})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function m2({size:e}){let t=Eo(),n=Eo();return un(oa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:`url(#${n})`,d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"m15.88 14.86 3.794-2.165a.64.64 0 0 0 .326-.558v-4.33a.64.64 0 0 0-.326-.556L15.88 5.086a.66.66 0 0 0-.65 0L11.432 7.25a.64.64 0 0 0-.325.557v7.737l-2.662 1.517-2.661-1.517v-3.036l2.661-1.517 1.755 1.001V9.958l-1.43-.816a.66.66 0 0 0-.65 0l-3.796 2.165a.64.64 0 0 0-.325.557v4.33c0 .229.124.442.325.557l3.796 2.165c.2.114.45.114.65 0l3.796-2.165a.64.64 0 0 0 .325-.557V8.455l.048-.026 2.613-1.49 2.661 1.516v3.036l-2.661 1.517-1.753-.999v2.037l1.427.814a.66.66 0 0 0 .651 0z"})]}),un("defs",{children:[un("linearGradient",{id:n,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[$("stop",{stopColor:"#A726C1"}),$("stop",{offset:".88",stopColor:"#803BDF"}),$("stop",{offset:"1",stopColor:"#7B3FE4"})]}),$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function g2({size:e}){let t=Eo();return un(oa,{size:e,children:[$("path",{fill:"#000",d:"M24 0H0v24h24z"}),$("g",{transform:"translate(5 5.9) scale(0.1386)",children:$("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),$("defs",{children:un("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[$("stop",{offset:"0.08",stopColor:"#9945FF"}),$("stop",{offset:"0.3",stopColor:"#8752F3"}),$("stop",{offset:"0.5",stopColor:"#5497D5"}),$("stop",{offset:"0.6",stopColor:"#43B4CA"}),$("stop",{offset:"0.72",stopColor:"#28E0B9"}),$("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function Ps({chainId:e,chainName:t,size:n=20}){switch(e){case 1:return $(c2,{size:n});case 56:return $(p2,{size:n});case 8453:return $(u2,{size:n});case 42161:return $(f2,{size:n});case 137:return $(m2,{size:n});case 792703809:return $(g2,{size:n});case 612055:return $(_d,{size:n,bg:"#0b1f3a",text:"CR"});default:return $(_d,{size:n,bg:"#676b7a",text:Ig(t??String(e))})}}function Ao({symbol:e,logoUrl:t,size:n=20}){let r=t&&t.trim().length>0?t.trim():Tg(e);return r?$("img",{src:r,alt:"","aria-hidden":"true",width:n,height:n,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):$(_d,{size:n,bg:"#676b7a",text:Ig(e)})}import{QRCodeSVG as w2}from"qrcode.react";import{Fragment as Os,jsx as ht,jsxs as Vt}from"react/jsx-runtime";function Bs(){return Vt("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[ht("span",{className:"rd-skeleton rd-skeleton-qr"}),ht("span",{className:"rd-skeleton rd-skeleton-address"})]})}function y2(e){let{depositAddress:t,originChainId:n,originCurrency:r,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${n}?value=${o.toString()}`:`ethereum:${t}@${n}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${r}@${n}/transfer?${i.toString()}`}function x2(e){let{depositAddress:t,splMint:n,humanAmount:r}=e,o=new URLSearchParams;return r&&o.set("amount",r),o.set("spl-token",n),`solana:${t}?${o.toString()}`}function Ag({depositAddress:e,originChainId:t,originChainName:n,originCurrency:r,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:b=!0}){let[u,g]=Eg(!1),[y,w]=Eg("address"),f=b2();h2(()=>{w("address")},[e]);let c=r.toLowerCase()===Ga,h=s==="svm";async function m(){try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),1500)}catch{}}let x;if(o)try{let A=BigInt(o);A>0n&&(x=A)}catch{}let k=x!==void 0,R;if(k)try{R=$t(x,i)}catch{R=o}let I=h?x2({depositAddress:e,splMint:r,humanAmount:R??""}):y2({depositAddress:e,originChainId:t,originCurrency:r,amountWei:x,isNative:c}),{isSubmitting:C,isConfirming:S,isConfirmed:E,needsSwitch:M,txHash:O,reverted:L,error:U}=l;return Vt("section",{className:"rd-stack",children:[Vt("div",{className:"rd-deposit-head","data-compact-view":y,children:[Vt("div",{className:"rd-deposit-qr-pane",children:[Vt("div",{className:"rd-deposit-qr",children:[ht(w2,{value:I,size:144,level:"H"}),ht("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:ht(Ps,{chainId:t,chainName:n,size:28})})]}),ht("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>w("address"),children:Vt("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[ht("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),ht("path",{d:"M16 8V6.25A2.25 2.25 0 0 0 13.75 4h-7.5A2.25 2.25 0 0 0 4 6.25v7.5A2.25 2.25 0 0 0 6.25 16H8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})})]}),Vt("div",{className:"rd-deposit-address",children:[ht("span",{className:"rd-deposit-address-label",children:Vt("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",ht("span",{id:f,className:"rd-address-tooltip",role:"tooltip",children:"This is a reusable, open deposit address. A wrong token or wrong chain will not be processed automatically, and recovery has weaker guarantees than a one-time order address and may require a manual request."})]})}),ht("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>w("qr"),children:ht("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:ht("path",{d:"M7.913 10.833c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25v-4.163c0-.69.56-1.25 1.25-1.25h4.163Zm6.255 6.663h-1.665V15.83h1.665v1.666Zm3.332 0h-1.666V15.83H17.5v1.666Zm-13.334-5v3.334h3.331v-3.333H4.166Zm8.337 3.334h-1.666v-1.666h1.666v1.666Zm3.331 0h-1.666v-1.666h1.666v1.666Zm-1.666-1.666h-1.665v-1.667h1.665v1.667Zm3.332 0h-1.666v-1.667H17.5v1.667Zm-4.997-1.667h-1.666v-1.664h1.666v1.664Zm3.331 0h-1.666v-1.664h1.666v1.664ZM7.913 2.504c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163Zm8.329 0c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25h-4.163c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163ZM4.166 4.17V7.5h3.331V4.17H4.166Zm8.329 0V7.5h3.331V4.17h-3.331Z",fill:"currentColor"})})}),ht("span",{className:"rd-address-full",title:e,children:e}),Vt("button",{type:"button",className:"rd-address-copy",onClick:m,"aria-label":`Copy deposit address ${e}`,children:[u?ht("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:ht("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Vt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[ht("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),ht("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),ht("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!h&&p&&Vt(Os,{children:[ht("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:C||S||E&&!L,children:E&&!L?"Deposit sent":S?"Confirming...":C?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${n})`:""}`}),U&&ht("div",{className:"rd-callout rd-callout-danger",children:U}),O&&Vt("p",{className:"rd-card-hint",children:["Tx: ",ht("span",{style:{fontFamily:"monospace"},children:O})]}),E&&L&&ht("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!L&&ht("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),h&&Vt("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",k?Vt(Os,{children:["exactly"," ",Vt("strong",{children:[R," ",a]})]}):Vt(Os,{children:["any amount of ",ht("strong",{children:a})]}),"."]}),(k||!h&&!p&&b)&&Vt("p",{className:"rd-card-hint",children:[k&&Vt(Os,{children:["Send exactly"," ",Vt("strong",{children:[R," ",a]})," ","on ",n," to this address."]}),!h&&!p&&b&&!k&&"Enter an amount to deposit in one click."]})]})}import{useEffect as v2,useId as k2,useRef as Mg,useState as Qd}from"react";import*as ro from"@radix-ui/react-popover";import{jsx as Nr,jsxs as Ha}from"react/jsx-runtime";function _a({value:e,options:t,onChange:n,disabled:r,ariaLabel:o,id:a}){let i=k2(),s=a??i,l=`${s}-listbox`,[d,p]=Qd(!1),b=t.findIndex(E=>E.value===e),[u,g]=Qd(b>=0?b:0),y=Mg(null),w=Mg([]),f=!!r||t.length===0,c=b>=0?t[b]:void 0;v2(()=>{d&&w.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[h,m]=Qd(null);function x(){f||(m(y.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),g(b>=0?b:0),p(!0))}function k(E){p(!1),E&&y.current?.focus()}function R(E){let M=t[E];M&&(n(M.value),k(!0))}function I(){f||(d?k(!1):x())}function C(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?g(M=>Math.min(M+1,t.length-1)):x();break;case"ArrowUp":E.preventDefault(),d?g(M=>Math.max(M-1,0)):x();break;case"Enter":case" ":E.preventDefault(),d?R(u):x();break;case"Escape":d&&(E.preventDefault(),k(!0));break;case"Tab":d&&p(!1);break;default:break}}let S=d&&t[u]?`${s}-option-${u}`:void 0;return Nr(ro.Root,{open:d,onOpenChange:E=>E?x():k(!1),children:Ha("div",{className:"rd-dropdown",children:[Nr(ro.Trigger,{asChild:!0,children:Ha("button",{type:"button",id:s,ref:y,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":S,"aria-label":o,disabled:f,onClick:I,onKeyDown:C,children:[Ha("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,Ha("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&Nr("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),Nr("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:Nr(Gn,{size:16})})]})}),d&&Nr(ro.Portal,{children:Nr(ro.Content,{className:"rd-dropdown-popover","data-theme":h??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:Nr("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,M)=>{let O=E.value===e,L=M===u;return Ha("li",{id:`${s}-option-${M}`,role:"option","aria-selected":O,ref:U=>{w.current[M]=U},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",O?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>g(M),onClick:U=>{U.preventDefault(),R(M)},children:[E.icon,Nr("span",{className:"rd-dropdown-option-label",children:E.label}),O&&Nr("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}import{Fragment as Vd,jsx as oo,jsxs as Zn}from"react/jsx-runtime";function C2(e,t){if(!e)return"--";try{return $t(BigInt(e),t)}catch{return"--"}}function Lg({quote:e,isLoading:t,error:n,humanAmount:r,originSymbol:o,destination:a}){return Zn("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Zn("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[oo("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),oo("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),oo("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&n&&Zn("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",n.message]}),!t&&!n&&e&&o&&Zn(Vd,{children:[Zn("div",{className:"rd-quote-strip",children:[Zn("span",{className:"rd-quote-strip-side",children:[Zn("b",{children:[r," ",o]}),oo("small",{children:"You send"})]}),oo("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Zn("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Zn("b",{children:["~",C2(e.expectedCrossd,a.decimals)," ",a.symbol]}),oo("small",{children:"You receive"})]})]}),e.belowMin&&oo("div",{className:"rd-callout rd-callout-warning",children:"This amount is below the minimum the bridge will accept. Increase the amount to continue."}),(e.assumesParity||e.feeUsd)&&Zn("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Zn(Vd,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Zn(Vd,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!n&&!e&&oo("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as Og}from"react";var Dg={1:{base:"https://etherscan.io",name:"Etherscan",kind:"evm"},56:{base:"https://bscscan.com",name:"BscScan",kind:"evm"},137:{base:"https://polygonscan.com",name:"PolygonScan",kind:"evm"},8453:{base:"https://basescan.org",name:"BaseScan",kind:"evm"},42161:{base:"https://arbiscan.io",name:"Arbiscan",kind:"evm"},612055:{base:"https://scan.crosstoken.io",name:"ONEchain Scan",kind:"evm"},792703809:{base:"https://solscan.io",name:"Solscan",kind:"svm"}};function Pg(e,t){let n=Dg[e];if(!(!n||!t))return{url:`${n.base}/token/${t}`,name:n.name}}var R2={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function aa(e){return R2[e]??`Chain ${e}`}function zs(e,t){let n=Dg[e];if(!(!n||!t))return{url:`${n.base}/tx/${t}`,name:n.name}}import{jsx as Xn,jsxs as ao}from"react/jsx-runtime";function N2(e){let t=new Map;for(let n of e.origins)t.has(n.chainId)||t.set(n.chainId,n.chainName);return Array.from(t,([n,r])=>({chainId:n,chainName:r}))}function Bg(e,t){return t===void 0?[]:e.origins.filter(n=>n.chainId===t)}function S2(e,t){let n=$t(e,t),r=n.indexOf(".");return r===-1?n:`${n.slice(0,r)}.${n.slice(r+1,r+1+4)}`.replace(/\.?0+$/,"")||n.slice(0,r)}function zg({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let b=Og(()=>N2(e),[e]),u=Og(()=>Bg(e,t?.chainId),[e,t?.chainId]);function g(c){let h=Number(c),m=Bg(e,h)[0];m&&n(m)}function y(c){let h=u.find(m=>m.token.address.toLowerCase()===c.toLowerCase());h&&n(h)}let w=i?`${S2(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${w?` (${w})`:""}`:void 0;return ao("section",{className:"rd-stack","data-rd-source-form":"",children:[ao("div",{className:"rd-field",children:[ao("div",{className:"rd-field-label-row",children:[Xn("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=Pg(t.chainId,t.token.address);return c?ao("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),ao("div",{className:"rd-field-row",children:[Xn(_a,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:g,disabled:p,options:b.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:Xn(Ps,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),Xn(_a,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:p||u.length===0,options:u.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:Xn(Ao,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&ao("label",{className:"rd-field",children:[Xn("span",{className:"rd-field-label",children:"Amount (optional)"}),ao("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[Xn("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:r,onChange:c=>{let h=c.target.value;if(h===""){o(h);return}h.startsWith(".")&&(h=`0${h}`),/^\d*\.?\d{0,4}$/.test(h)&&(h=h.replace(/^0+(?=\d)/,""),!((h.split(".")[0]??"").length>12)&&o(h))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&Xn("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&Xn("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(w||s)&&ao("span",{className:"rd-amount-meta",children:[Xn("span",{}),Xn("span",{children:s?"Balance: \u2026":w?`Balance: ${w}`:""})]}),f&&Xn("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}import{Fragment as Fg,jsx as He,jsxs as kn}from"react/jsx-runtime";function Ug({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:b,recipientValid:u,balance:g,balanceLoading:y,insufficientBalance:w,targetOptions:f,selectedTarget:c,onChangeTarget:h,showTargetSelector:m,quote:x,quoteLoading:k,quoteError:R,depositAddress:I,depositAddressLoading:C,depositAddressError:S,arrivalStatus:E,amountSmallestUnits:M,depositState:O,onDeposit:L,canDeposit:U,oneClickEnabled:A,locked:F,onRequestConnect:ne}){let ee=f.length>1&&m,{phase:Z,isSubmitting:W,isConfirming:q,isConfirmed:B,needsSwitch:G,reverted:te,error:_}=O,le=c?.symbol??e.destination.symbol;return kn(Fg,{children:[i&&He(Ng,{minNotice:i,arrivalStatus:E}),F?kn("section",{className:"rd-locked-card","data-rd-locked":"",children:[He("span",{className:"rd-locked-glyph","aria-hidden":"true",children:kn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[He("path",{d:"M4 7.5A2.5 2.5 0 0 1 6.5 5h10A2.5 2.5 0 0 1 19 7.5v9a2.5 2.5 0 0 1-2.5 2.5h-10A2.5 2.5 0 0 1 4 16.5v-9Z",stroke:"currentColor",strokeWidth:"1.7"}),He("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),He("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),He("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),He("h3",{className:"rd-locked-title",children:"Connect your wallet"}),He("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),b&&He("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),ne&&kn("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:ne,children:[kn("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[He("path",{d:"M5 6.5h11.5A2.5 2.5 0 0 1 19 9v8.5H7A3 3 0 0 1 4 14.5v-8A2.5 2.5 0 0 1 6.5 4H16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),He("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):I?He(Ag,{depositAddress:I,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:O,onDeposit:L,canDeposit:U,oneClickEnabled:A}):C?kn(Fg,{children:[He(Bs,{}),A&&M&&He("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),He("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):S?kn("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",S.message]}):null,He(zg,{catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,balance:g,balanceLoading:y,insufficientBalance:w,onMax:l}),kn("div",{className:"rd-field","data-rd-delivery":"",children:[He("span",{className:"rd-field-label",children:"Deliver as"}),ee?He(_a,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:h,options:f.map(me=>({value:me.symbol,label:me.symbol,subLabel:"on ONEchain",icon:He(Ao,{symbol:me.symbol,size:22})}))}):kn("div",{className:"rd-static-target",children:[He(Ao,{symbol:le,size:22}),He("span",{children:le})]}),b&&kn("label",{className:"rd-delivery-recipient",children:[He("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:me=>p(me.target.value),"data-vaul-no-drag":!0}),He("span",{className:"rd-card-hint",children:"Defaults to your connected wallet. It can differ from the address you deposit from, and is also used as the refund address if anything goes wrong."}),!u&&He("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&kn("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&He("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),r.trim()&&He(Lg,{quote:x,isLoading:k,error:R,humanAmount:r,originSymbol:t.token.symbol,destination:e.destination}),i&&He(Sg,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!b&&u}),A&&Z!=="idle"&&!U&&kn("div",{className:"rd-card",children:[W&&kn("p",{className:"rd-muted",children:[He("span",{className:"rd-spinner"})," ",G?"Switching network...":"Confirm in wallet..."]}),q&&kn("p",{className:"rd-muted",children:[He("span",{className:"rd-spinner"})," Confirming..."]}),O.txHash&&kn("p",{className:"rd-card-hint",children:["Tx: ",He("span",{style:{fontFamily:"monospace"},children:O.txHash})]}),B&&te&&He("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),B&&!te&&He("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),_&&He("div",{className:"rd-callout rd-callout-danger",children:_})]})]})}import{useEffect as T2,useId as I2,useRef as jg,useState as qd}from"react";import{createPortal as E2}from"react-dom";import{Fragment as Kd,jsx as Se,jsxs as wt}from"react/jsx-runtime";function Va({requiresIdentity:e=!1}){return wt("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[Se("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:wt("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Se("path",{d:"M7 3.8h7l3 3V12M7 3.8A2.2 2.2 0 0 0 4.8 6v12A2.2 2.2 0 0 0 7 20.2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"}),Se("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),Se("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),Se("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),Se("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),Se("p",{className:"rd-history-empty-copy",children:e?"Connect a wallet or provide an address to see transfer history.":"Your deposits and their delivery progress will appear here."}),!e&&wt("span",{className:"rd-history-empty-live",children:[Se("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Qa=56;function Gg(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function A2(e){let t=e.trim().toUpperCase(),r={AWAITING_DEPOSIT:"Waiting for deposit",BSC_FUNDED:"Deposit confirmed",RELAY_PENDING:"Bridging",RELAY_SUBMITTED:"Bridging",BRIDGING:"Bridging",CROSS_PENDING:"Delivering",FINALIZING:"Delivering",EXECUTING:"Delivering",COMPLETED:"Completed",RELAY_REFUNDED:"Refunded",REFUNDED:"Refunded",EXPIRED:"Expired",FAILED:"Failed"}[t];if(r)return r;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function M2(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Gg(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Fs(e,t){if(e){if(t===void 0)return e;try{return $t(BigInt(e),t)}catch{return e}}}function L2(e,t=4){let n=e.indexOf(".");if(n<0)return e;let r=e.slice(0,n+1+t).replace(/0+$/,"").replace(/\.$/,"");return r===""?"0":r}function D2(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Wg(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Yd({amount:e,symbol:t,className:n}){let r=e?`${e}${t?` ${t}`:""}`:"",o=I2(),a=jg(null),i=jg(null),[s,l]=qd(!1),[d,p]=qd({top:-9999,left:-9999,visibility:"hidden"});return T2(()=>{if(!s)return;let b=()=>{let u=a.current,g=i.current;if(!u||!g)return;let y=u.getBoundingClientRect(),w=g.getBoundingClientRect(),f=12,c=8,h=Math.max(f,window.innerWidth-w.width-f),m=Math.min(Math.max(y.left+y.width/2-w.width/2,f),h),x=y.top-w.height-c,k=x>=f?x:y.bottom+c,R=Math.max(f,window.innerHeight-w.height-f),I=Math.min(Math.max(k,f),R),C=window.getComputedStyle(u);p({top:I,left:m,visibility:"visible",backgroundColor:C.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:C.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:C.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:C.getPropertyValue("--rd-surface").trim()||"#171923"})};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0)}},[s]),e?wt(Kd,{children:[wt("span",{ref:a,className:n,"aria-label":r,"aria-describedby":s?o:void 0,"data-full-value":r,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[L2(e),t?` ${t}`:""]}),s&&typeof document<"u"&&E2(Se("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:r}),document.body)]}):Se("span",{className:n,children:"-"})}function P2(e){let t=(e.deposits??[]).filter(r=>r.originChainId),n=new Set(t.map(r=>`${r.originChainId}:${(r.originCurrency??"").toLowerCase()}`));if(t.length>0){let r=t[0];return{chainId:r.originChainId,currency:r.originCurrency??"",routes:n.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function O2(e,t){if(!e)return;let n,r;try{n=BigInt(e),r=t.map(s=>BigInt(s.amount))}catch{return}let o=r.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=r.map(s=>n*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=n-i,a}function Us({label:e,chainId:t,txHash:n,amount:r,shared:o,missingLabel:a="Pending"}){let i=n?zs(t,n):void 0;return wt("div",{className:"rd-history-step",children:[Se("span",{className:`rd-history-step-dot${n?" rd-history-step-dot-done":""}`}),Se("span",{className:"rd-history-step-label",children:e}),Se("span",{className:"rd-history-step-chain",children:aa(t)}),r&&Se(Yd,{amount:r,className:"rd-history-step-amount"}),wt("span",{className:"rd-history-step-tx",children:[i?Se("a",{href:i.url,target:"_blank",rel:"noreferrer",title:n,"aria-label":`${e} transaction on ${aa(t)}`,children:Wg(n)}):n?Se("span",{title:n,children:Wg(n)}):Se("span",{className:"rd-muted",children:a}),o&&n&&Se("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function B2(e){let t=e.deposits??[],n=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=O2(n,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Qa,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:r,currency:o,routes:a}=P2(e);return[{key:e.orderId,order:e,chainId:r,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:n,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function js({orders:e,isLoading:t,error:n,catalog:r,showTitle:o=!0}){let[a,i]=qd({}),s=l=>i(d=>({...d,[l]:!d[l]}));return wt("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&Se("div",{className:"rd-card-header",children:Se("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&wt("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[Se("span",{className:"rd-spinner"})," Loading orders..."]}),n&&wt("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",n.message]}),!t&&!n&&e.length===0&&Se(Va,{}),e.length>0&&Se("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(B2).map(l=>{let{order:d}=l,p=r?.origins.find(S=>S.chainId===l.chainId&&S.token.address.toLowerCase()===l.currency.toLowerCase()),b=(d.target?r?.targets.find(S=>S.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??r?.targets.find(S=>S.isDefault),u=b?.symbol??r?.destination.symbol??"",g=b?.decimals??r?.destination.decimals,y=r?.origins.find(S=>S.chainId===Qa),w=Fs(l.sentRaw,y?.token.decimals),f=y?.token.symbol??"USDT",c=Fs(l.receivedRaw,g),h=d.deposits??[],m=!!a[l.key],x=D2(d.completedAt??d.createdAt),k=A2(d.status),I=d.status==="COMPLETED"||Gg(d.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return wt("div",{className:"rd-history-group",children:[wt("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":m,"aria-label":`Toggle transfer details: ${k}, ${x}`,children:[wt("span",{className:"rd-history-card-top",children:[Se("span",{className:"rd-history-asset",children:l.routes>1?wt(Kd,{children:["Multiple deposits ",wt("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):wt(Kd,{children:[p?.token.symbol??u," ",wt("span",{className:"rd-muted",children:["from ",aa(l.chainId)]})]})}),Se("span",{className:M2(d.status),title:d.status,children:k})]}),wt("span",{className:"rd-history-card-amounts",children:[wt("span",{className:"rd-history-amount-block",children:[Se("span",{className:"rd-history-amount-label",children:"Processing address"}),Se(Yd,{amount:w,symbol:f,className:"rd-history-num"})]}),Se("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),wt("span",{className:"rd-history-amount-block",children:[Se("span",{className:"rd-history-amount-label",children:C}),Se(Yd,{amount:c,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),wt("span",{className:"rd-history-card-foot",children:[wt("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",x]}),Se("span",{className:"rd-history-chevron","aria-hidden":"true",children:Se(Gn,{size:16})})]})]}),m&&wt("div",{className:"rd-history-detail",children:[l.deposit?Se(Us,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Qa,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Fs(l.deposit.amount,y?.token.decimals)}):h.length>0?h.map(S=>Se(Us,{label:"Deposit confirmed",chainId:S.originChainId??Qa,txHash:S.originTxHash||S.txHash,amount:Fs(S.amount,y?.token.decimals)},`${S.txHash}-${S.blockNumber}`)):wt("div",{className:"rd-history-step",children:[Se("span",{className:"rd-history-step-dot"}),Se("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),Se("span",{className:"rd-muted",children:"Details unavailable"})]}),Se(Us,{label:"Bridge",chainId:Qa,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:I}),Se(Us,{label:"ONEchain delivery",chainId:r?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:I})]})]},l.key)})})]})}import{useEffect as eh,useState as $d}from"react";import{useCallback as Ya,useEffect as F2,useMemo as qg,useRef as Yg,useState as qa}from"react";var mr=class extends Error{constructor(t,n,r){super(n),this.name="RelayApiError",this.status=t,this.body=r}};function en(e){let t=e.baseUrl.replace(/\/+$/,"");async function n(r,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${r}`,{...o,headers:a})}catch(l){throw new mr(0,`network error calling ${r}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${r} failed with status ${i.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new mr(i.status,l,d)}try{return JSON.parse(s)}catch{throw new mr(i.status,`expected a JSON response from ${r} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return n("/v1/config").then(r=>({...r,targets:r.targets??[]}))},getQuote(r){return n("/v1/quote",{method:"POST",body:JSON.stringify(r)})},getDepositAddress(r,o){let a=new URLSearchParams({user:r.user,originChainId:String(r.originChainId),originCurrency:r.originCurrency});return o&&a.set("target",o),n(`/v1/deposit-address?${a.toString()}`)},getOrder(r){return n(`/v1/orders/${encodeURIComponent(r)}`)},listOrders(r){let o=new URLSearchParams({user:r});return n(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(r){return`${t}/v1/orders/stream?user=${encodeURIComponent(r)}`},getRecovery(r){let o=new URLSearchParams({user:r.user});return r.target&&o.set("target",r.target),n(`/v1/recovery?${o.toString()}`)}}}var Hg=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],Zd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Xd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var ia=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Ws(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function z2(e,t){return t.some(n=>Ws(n,e))}function Gs(e){if(!e||e.length===0)return ia;let t=new Set,n=[];for(let r of e){if(typeof r!="string"||!pt(r))continue;let o=r.toLowerCase();t.has(o)||(t.add(o),n.push(r))}return n.length>0?n:ia}async function _g(e,t,{factory:n,forwarder:r,recipient:o,version:a,trusted:i=ia}){if(!n||!r||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!z2(n,i))return{ok:!1,reason:`factory ${n} is not a recognized deposit-address factory -- refusing to sign against it`};if(!e)return{ok:!1,reason:"no chain connection available to verify the forwarder address"};let s;try{s=await e({chainId:t,address:n,abi:Xd,functionName:"computeAddress",args:[o,BigInt(a)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return Ws(s,r)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${r}, but factory ${n} derives ${s} for this account -- refusing to sign`}}async function Qg(e,t,{forwarder:n,recipient:r,version:o,trusted:a=ia}){if(!n||!r||o===void 0)return{ok:!1,reason:"address verification is missing inputs (forwarder/recipient/version)"};if(!e)return{ok:!1,reason:"no BSC chain connection available to verify the deposit forwarder -- add BNB Smart Chain (chain 56) to your wagmi config"};let i=await Promise.all(a.map(async s=>{try{return await e({chainId:t,address:s,abi:Xd,functionName:"computeAddress",args:[r,BigInt(o)]})}catch{return}}));return i.some(s=>Ws(s,n))?{ok:!0}:i.every(s=>s===void 0)?{ok:!1,reason:"could not reach any deposit-address factory on BSC to verify the forwarder"}:{ok:!1,reason:`forwarder address mismatch: ${n} is not the address any known factory derives for this account -- refusing to deposit`}}function Vg(e,t){return Ws(e,t)}var io=56,Jd={step:"idle"};function U2(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Ka(e={}){let t=Yg(e);t.current=e;let n=e.wallet,r=n?.walletChainId,o=e.recipient,a=o&&pt(o)?o:void 0,[i,s]=qa({}),l=Ya((u,g)=>{s(y=>({...y,[u.toLowerCase()]:g}))},[]),d=Ya(u=>u?i[u.toLowerCase()]??Jd:Jd,[i]),p=qg(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:Ya(async(u,g,y)=>{if(!a||!u?.forwarder)return;let w=u.forwarder;l(w,{step:"switching"});try{if(r!==io){if(!n?.switchChain)throw new Error("wallet cannot switch chains");await n.switchChain(io)}if(!n?.writeContract||!n?.readContract||!n?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await _g(n.readContract,io,{factory:u.factory,forwarder:u.forwarder,recipient:a,version:u.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let c;if(!u.isDeployed){if(l(w,{step:"deploying"}),c=await n.writeContract({address:u.factory,abi:Hg,functionName:"deploy",args:[a,BigInt(u.version)],chainId:io}),l(w,{step:"deploying",deployTxHash:c}),(await n.waitForReceipt({chainId:io,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(w,{step:"recovering",deployTxHash:c});let h=g==="execute"?await n.writeContract({address:u.forwarder,abi:Zd,functionName:"execute",args:[],chainId:io}):await n.writeContract({address:u.forwarder,abi:Zd,functionName:"sweepToUser",args:[y??U2(u)],chainId:io});if(l(w,{step:"recovering",deployTxHash:c,actionTxHash:h}),(await n.waitForReceipt({chainId:io,hash:h})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${h})`);l(w,{step:"done",deployTxHash:c,actionTxHash:h}),t.current.onRecoverySuccess?.({action:g,forwarder:u.forwarder,actionTxHash:h,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(f){let c=f instanceof Error?f:new Error(String(f));s(h=>{let m=w.toLowerCase();return{...h,[m]:{...h[m]??Jd,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,r,n,l]),stateFor:d,busy:p}}function Kg(e={}){let t=Yg(e);t.current=e;let n=qg(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&pt(r)?r:void 0,[a,i]=qa(),[s,l]=qa(!1),[d,p]=qa(),[b,u]=qa(0),g=e.target,y=e.enabled??!0,w=e.refetchInterval;F2(()=>{if(!o||!y){i(void 0),p(void 0),l(!1);return}let x=!1,k=!1,R=!0;async function I(){if(!(x||k)){k=!0,R&&l(!0);try{let S=await n.getRecovery({user:o,target:g});if(x)return;i(S),p(void 0)}catch(S){if(x)return;let E=S instanceof Error?S:new Error(String(S));p(E),t.current.onError?.(E),E instanceof mr&&E.status===401&&t.current.onUnauthorized?.()}finally{k=!1,!x&&R&&l(!1),R=!1}}}I();let C=typeof w=="number"&&Number.isFinite(w)&&w>0?setInterval(()=>{I()},w):void 0;return()=>{x=!0,C&&clearInterval(C)}},[n,o,b,g,y,w]);let f=Ya(()=>u(x=>x+1),[]),c=Ka({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),h=Ya(async(x,k)=>{a&&await c.recover(a,x,k)},[c,a]),m=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:h,recoveryState:m}}var j2="BSC_FUNDED";function Zg(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function W2(e,t){return e.target||t}function sa(e,t=[]){let n=e.find(o=>o.isDefault)?.symbol,r=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=r.get(a);if(i){i.targets.push(o.symbol);continue}r.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of r.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==j2)continue;let s=W2(i,n);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=Zg(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...r.values()]}function Xg(e){return e.filter(t=>(t.info.tokens??[]).some(n=>n.recoverable)?!0:Zg(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Hs(e){return e.reduce((t,n)=>t+(n.info.tokens??[]).filter(r=>r.recoverable).length,0)}import{Fragment as Qs,jsx as fe,jsxs as Je}from"react/jsx-runtime";var G2=56;function H2(e){return{client:e.client,apiBaseUrl:e.apiBaseUrl,recipient:e.recipient,target:e.target,enabled:e.targets===void 0,wallet:e.wallet,trustedFactories:e.trustedFactories,onUnauthorized:e.onUnauthorized,onError:e.onError}}var _2="This balance may already be processing. Recover only if it remains stuck.",_s="USDT",Jg="primary";function Q2(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function V2(e){let t=e.toLowerCase();return t.includes("insufficient funds")||t.includes("insufficientfunds")||t.includes("exceeds the balance of the account")||t.includes("insufficient balance for transfer")?"Not enough BNB for the network fee. Add BNB to your connected wallet and try again.":t.includes("user rejected")||t.includes("userrejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("action_rejected")||t.includes("rejected by user")?"Transaction cancelled in your wallet.":"Recovery couldn't be completed. Check your wallet and try again."}function th({message:e}){let[t,n]=$d("idle");eh(()=>{if(t==="idle")return;let a=window.setTimeout(()=>n("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function r(){if(typeof navigator>"u"||!navigator.clipboard){n("failed");return}try{await navigator.clipboard.writeText(e),n("copied")}catch{n("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return Je("details",{className:"rd-error-details",children:[fe("summary",{children:"View technical details"}),Je("div",{className:"rd-error-log",children:[fe("button",{type:"button",className:"rd-error-copy",onClick:()=>{r()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?fe("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Je("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[fe("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),fe("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}),fe("code",{children:e})]})]})}function Za(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function jr(e,t){try{return $t(e,t)}catch{return e.toString()}}function $g(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function q2(e){let t=Za(e.bridgeMinWei),n=[];for(let a of e.tokens??[]){let i=Za(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let r=Za(e.balance),o=n.some(a=>a.action?.kind==="execute");return r>0n&&e.suggestedAction==="execute"&&!o?n.unshift({key:Jg,symbol:_s,decimals:e.decimals,balance:r,action:{kind:"execute"}}):n.length===0&&r>0n&&e.suggestedAction!=="none"&&n.push({key:Jg,symbol:_s,decimals:e.decimals,balance:r,action:{kind:"sweep"}}),n}function Y2({deposit:e,decimals:t}){let n=e.originChainId??G2,r=e.originTxHash||e.txHash,o=r?zs(n,r):void 0;return Je("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[fe("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),fe("span",{className:"rd-history-step-chain",children:aa(n)}),fe("span",{className:"rd-history-step-amount",children:jr(Za(e.amount),t)}),fe("span",{className:"rd-history-step-tx",children:o?fe("a",{href:o.url,target:"_blank",rel:"noreferrer",title:r,children:$g(r)}):r?fe("span",{title:r,children:$g(r)}):null})]})}function K2({group:e,showTargetLabel:t,busy:n,state:r,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=q2(s),d=Za(s.balance),p=l.length===1?`${jr(l[0].balance,l[0].decimals)}`:`${l.length} assets`,b=e.deposits.length>0&&e.depositsTotal>=d,u=d>e.depositsTotal?d-e.depositsTotal:0n,g=r.step==="switching"||r.step==="deploying"||r.step==="recovering",w=l.find(c=>i(c)===a)?.action?.kind;function f(){if(r.step==="switching")return"Switching to BNB Chain\u2026";if(r.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=w==="execute"?"continuing ONEchain delivery":"returning funds";return r.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return Je("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&Je("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",fe("b",{children:e.targets.join(", ")})]}),Je("div",{className:"rd-recover-sum",children:[fe("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),Je("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&Je(Qs,{children:[" ",fe("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&Je("details",{className:"rd-recover-made-of",children:[Je("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),Je("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>fe(Y2,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!b&&Je("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",jr(e.depositsTotal,s.decimals)," of"," ",jr(d,s.decimals)," ",_s,". The remaining"," ",jr(u,s.decimals)," ",_s," is still included when you act."]})]})]}),fe("div",{className:"rd-token-list",children:l.map(c=>{let h=i(c),m=g&&a===h;return Je("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[fe(Ao,{symbol:c.symbol,size:26}),Je("div",{className:"rd-token-row-info",children:[l.length>1&&Je("span",{className:"rd-token-row-amount",children:[jr(c.balance,c.decimals)," ",fe("span",{className:"rd-token-row-symbol",children:c.symbol})]}),m?fe("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):c.shortfall!==void 0&&c.minimum!==void 0?Je("span",{className:"rd-token-row-warn",children:["Needs ",Je("b",{children:[jr(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",jr(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",fe("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?fe("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):fe("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),m?fe("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&fe("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:n,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&r.step==="idle"&&Je("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",fe("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&fe("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||_2}),r.step==="done"&&fe("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:w==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),r.step==="error"&&r.error&&Je(Qs,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:V2(r.error)}),fe(th,{message:r.error})]})]})}function Vs(e){let{info:t,loading:n,error:r,refresh:o}=Kg(H2(e)),a=n||e.targets!==void 0&&e.targetsLoading===!0,i=Ka({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[s,l]=$d(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=Xg(sa(d,e.orders??[])),b=p.length>0,u=e.targets!==void 0?e.onRecovered:o,g=e.wallet?.walletAddress,y=e.wallet?.getBalance,[w,f]=$d();return eh(()=>{if(!b||!y||!g){f(void 0);return}let c=!1;return y({chainId:56,address:g}).then(h=>{c||f({value:h.value,decimals:h.decimals})}).catch(()=>{c||f(void 0)}),()=>{c=!0}},[b,y,g]),Je("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&fe("div",{className:"rd-card-header",children:fe("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&fe("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:Q2(e.otherTargetsRecoverable)}),a&&Je("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[fe("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),r&&Je(Qs,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),fe(th,{message:r.message})]}),!a&&!r&&!b&&Je("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[fe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:Je("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[fe("path",{d:"M5 11.5V8.8A2.8 2.8 0 0 1 7.8 6h8.4A2.8 2.8 0 0 1 19 8.8v6.4a2.8 2.8 0 0 1-2.8 2.8H7.8A2.8 2.8 0 0 1 5 15.2v-3.7Z",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),fe("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),fe("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&Je("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!r&&p.map(c=>fe(K2,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:h=>`${c.forwarder.toLowerCase()}:${h.key}`,onRecover:h=>{h.action&&(l(`${c.forwarder.toLowerCase()}:${h.key}`),i.recover(c.info,h.action.kind,h.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!r&&b&&Je("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",w&&Je(Qs,{children:[" ",Je("b",{children:[jr(w.value,w.decimals)," BNB"]})]}),!w&&" unavailable","."]}),!a&&!r&&b&&fe("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as jt from"react";import*as En from"@radix-ui/react-dialog";import{Drawer as la}from"vaul";ce(`html body[data-scroll-locked]{overflow-y:auto!important;margin-right:0!important}.rd-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.rd-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--rd-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;font-family:inherit}.rd-dialog-content.rd-deposit-shell{height:min(40rem,90vh)}.rd-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--rd-drawer-max-width, none);min-width:var(--rd-drawer-min-width, 0);max-height:min(85dvh,calc(100svh - env(safe-area-inset-top,0px)));margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain}.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=bottom],.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=top]{height:min(40rem,85dvh,calc(100svh - env(safe-area-inset-top,0px)))}.rd-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.rd-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.rd-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.rd-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.rd-drawer-content[data-vaul-drawer-direction=left] .rd-drawer-handle,.rd-drawer-content[data-vaul-drawer-direction=right] .rd-drawer-handle{display:none}.rd-overlay{animation:rd-overlay-show .18s ease-out}.rd-overlay[data-state=closed]{animation:rd-overlay-hide .15s ease-in}.rd-dialog-content{animation:rd-dialog-show .2s ease-out}.rd-dialog-content[data-state=closed]{animation:rd-dialog-hide .15s ease-in}@keyframes rd-overlay-show{0%{opacity:0}}@keyframes rd-overlay-hide{to{opacity:0}}@keyframes rd-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@keyframes rd-dialog-hide{to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@media(prefers-reduced-motion:reduce){.rd-overlay,.rd-overlay[data-state=closed],.rd-dialog-content,.rd-dialog-content[data-state=closed]{animation:none}}.rd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
21
|
-
`);import{jsx as Jn,jsxs as qs}from"react/jsx-runtime";var nh=24;function rh(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Z2(e,t,n){let r=n?.offsetTop??t.top,o=n?n.offsetTop+n.height:t.bottom,a=Math.max(t.top,r)+nh,i=Math.min(t.bottom,o)-nh;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function X2(){let e=jt.useRef(0),[t,n]=jt.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return jt.useEffect(()=>{let r=window.visualViewport;if(!r)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,r.height+r.offsetTop);let i=Math.max(0,e.current-r.height-r.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=r.height;n(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}},[]),t}function J2(e){let t=`(max-width: ${e}px)`,[n,r]=jt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return jt.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);r(o.matches);let a=i=>r(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}function Sr({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:n="bottom",dialogWidth:r,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=J2(t),[b,u]=jt.useState(!1),g=s!==void 0,y=g?s:b,w=jt.useCallback(m=>{g||u(m),l?.(m)},[g,l]);or(y,jt.useCallback(()=>w(!1),[w]));let f=jt.useMemo(()=>{let m={};return r&&(m["--rd-dialog-width"]=r),o&&(m["--rd-drawer-max-width"]=o),a&&(m["--rd-drawer-min-width"]=a),{...m,...i}},[r,o,a,i]),c=jt.useMemo(()=>({open:y,setOpen:w,isMobile:p,theme:e,drawerDirection:n,portalStyle:f}),[y,w,p,e,n,f]),h=Jn("div",{"data-theme":e,style:f,children:d});return p?Jn(Ls.Provider,{value:c,children:Jn(la.Root,{direction:n,open:y,onOpenChange:w,noBodyStyles:!0,children:h},"drawer")}):Jn(Ls.Provider,{value:c,children:Jn(En.Root,{open:y,onOpenChange:w,children:h})})}function da({asChild:e,children:t,dataAttributes:n}){let{isMobile:r}=ur(),o=r?la.Trigger:En.Trigger;return Jn(o,{asChild:e,...n,children:t})}function Tr({className:e,ariaTitle:t,children:n}){let{open:r,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=ur(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=X2(),b=Uo(),u=jt.useRef(null),g=jt.useRef(null);jt.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),jt.useEffect(()=>{g.current&&clearTimeout(g.current);let c=document.activeElement;!r&&rh(c)&&u.current?.contains(c)&&c.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(h=>{h.scrollTo?.({top:0,behavior:"auto"})})},[r]);let y=o&&i==="bottom"&&l>0,w=y?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,f=jt.useCallback(c=>{if(!o||i!=="bottom"||!rh(c.target))return;let h=c.target,m=h.closest("[data-rd-scroll-area]");m&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{let x=Z2(h.getBoundingClientRect(),m.getBoundingClientRect(),window.visualViewport);Math.abs(x)>=1&&m.scrollBy?.({top:x,behavior:"auto"}),g.current=null},280))},[i,o]);return o?qs(la.Portal,{children:[Jn(la.Overlay,{className:"rd-overlay"}),qs(la.Content,{ref:u,className:ye("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":b?"true":"false","data-rd-keyboard-adjusted":y?"true":"false",style:{...s,...w},onFocusCapture:f,children:[Jn(la.Title,{className:"rd-sr-only",children:t}),Jn("div",{className:"rd-drawer-handle"}),n]})]}):qs(En.Portal,{children:[Jn(En.Overlay,{className:"rd-overlay"}),qs(En.Content,{className:ye("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[Jn(En.Title,{className:"rd-sr-only",children:t}),Jn(En.Description,{className:"rd-sr-only",children:t}),n]})]})}import{Fragment as tk,jsx as Fe,jsxs as zn}from"react/jsx-runtime";function $2({id:e,activeView:t,recoverableCount:n,onChange:r}){let o=["deposit","history","recover"];return Fe("div",{className:"rd-deposit-tabs",role:"tablist","aria-label":"Deposit navigation","data-tab-count":o.length,"data-active-index":o.indexOf(t),children:o.map(a=>{let i=a==="deposit"?"Deposit":a==="history"?"History":"Recover";return zn("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>r(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,p=o[d];r(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[Fe("span",{children:i}),a==="recover"&&n>0&&Fe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function ah({className:e}){let t=Wa();return Fe(ve,{feature:"relay",children:Fe(Tr,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:Fe(ek,{})})})}function ek(){let e=Wa(),{theme:t}=ur(),n=Rg(),r=oh.useId();if(!n)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:b,origin:u,setOrigin:g,amount:y,setAmount:w,recipient:f,setRecipient:c,recipientValid:h,balance:m,balanceLoading:x,insufficientBalance:k,depositAddress:R,depositAddressLoading:I,depositAddressError:C,arrivalStatus:S,quote:E,quoteLoading:M,quoteError:O,canDeposit:L,deposit:U,depositState:A,targetOptions:F,selectedTarget:ne,setSelectedTarget:ee,showAmountInput:Z,minNotice:W,showRecipientInput:q,showTargetSelector:B,showOneClick:G,showConnectPrompt:te,showRecipientHint:_,canRecover:le,recoverableCount:me,recoveryTargetsLoading:Te,recoveryTargets:de,recoveryOrders:he,historyOrdersLoading:ge,historyOrdersError:Ze,refreshRecovery:xe,trustedFactories:Ue,amountHint:ot,amountSmallestUnits:De,onMax:je}=n;return zn("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[Fe($2,{id:r,activeView:o,recoverableCount:me,onChange:a}),i&&Fe("div",{className:"rd-deposit-tab-panel",id:`${r}-recover-panel`,role:"tabpanel","aria-labelledby":`${r}-recover-tab`,children:le?Fe(Vs,{client:e.client,apiBaseUrl:s,recipient:f,target:ne?.symbol,wallet:l,trustedFactories:Ue,targets:(d?.targets.length??0)>0?de:void 0,targetsLoading:Te,orders:he,onRecovered:xe,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):zn("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[Fe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:zn("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Fe("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),Fe("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),Fe("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),Fe("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),Fe("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&Fe("div",{className:"rd-deposit-tab-panel",id:`${r}-history-panel`,role:"tabpanel","aria-labelledby":`${r}-history-tab`,children:h&&f.trim()?Fe(js,{orders:he,isLoading:p||ge,error:b??Ze,catalog:d,showTitle:!1}):Fe(Va,{requiresIdentity:!0})}),o==="deposit"&&zn("div",{className:"rd-deposit-tab-panel",id:`${r}-deposit-panel`,role:"tabpanel","aria-labelledby":`${r}-deposit-tab`,children:[p&&zn("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Fe(Bs,{}),te&&e.onRequestConnect&&Fe("span",{className:"rd-skeleton rd-skeleton-cta"}),zn("section",{className:"rd-stack",children:[zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),zn("div",{className:"rd-field-row",children:[Fe("span",{className:"rd-skeleton rd-skeleton-field"}),Fe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),Z&&zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"}),(q||f.trim().length>0)&&zn(tk,{children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"}),q&&Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Fe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&Fe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),b&&zn("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",b.message]}),_&&Fe("div",{className:"rd-callout rd-callout-muted",children:q?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&Fe(Ug,{catalog:d,origin:u,onChangeOrigin:g,amount:y,onChangeAmount:w,showAmountInput:Z,minNotice:W,amountHint:ot,onMax:je,recipient:f,onChangeRecipient:c,showRecipientInput:q,recipientValid:h,balance:m,balanceLoading:x,insufficientBalance:k,targetOptions:F,selectedTarget:ne,onChangeTarget:ee,showTargetSelector:B,quote:E,quoteLoading:M,quoteError:O,depositAddress:R,depositAddressLoading:I,depositAddressError:C,arrivalStatus:S,amountSmallestUnits:De,depositState:A,onDeposit:()=>{U()},canDeposit:L&&G,oneClickEnabled:G,locked:te,onRequestConnect:e.onRequestConnect})]})]})}import{jsx as ec}from"react/jsx-runtime";function ih({asChild:e,children:t}){return ec(ve,{feature:"relay",children:ec(da,{asChild:e??t!=null,children:t??ec("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as Le from"react";import{useCallback as Xa,useEffect as so,useMemo as tc,useRef as nc,useState as yt}from"react";import{useEffect as nk,useState as rk}from"react";function sh(e,t){let[n,r]=rk(e);return nk(()=>{let o=setTimeout(()=>r(e),t);return()=>clearTimeout(o)},[e,t]),n}var ok=500,dh=56,lh={chainId:dh,token:"0x55d398326f99059fF775485246999027B3197955"},ch=3e4,ak=5e3;function ik(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?ch:Math.max(ak,e*1e3)}var sk=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function rc(e,t){let n=e.trim();if(!n)return null;try{let r=Ds(n,t);return r>0n?r:null}catch{return null}}function ph(e={}){let t=nc(e);t.current=e;let n=tc(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.wallet,o=r?.walletAddress,a=!!o,i=r?.walletChainId,[s,l]=yt(),[d,p]=yt(!0),[b,u]=yt();so(()=>{let X=!1;return p(!0),n.getConfig().then(we=>{X||(l(we),u(void 0))}).catch(we=>{X||u(we instanceof Error?we:new Error(String(we)))}).finally(()=>{X||p(!1)}),()=>{X=!0}},[n]);let g=e.chains,y=tc(()=>{if(!s)return[];if(!g||g.length===0)return s.origins;let X=new Set(g);return s.origins.filter(we=>X.has(we.chainId))},[s,g]),w=tc(()=>s?{...s,origins:y}:void 0,[s,y]),[f,c]=yt();so(()=>{if(f||y.length===0)return;let X=t.current.defaultToken,we=X?y.find(z=>z.chainId===X.chainId&&z.token.address.toLowerCase()===X.address.toLowerCase()):void 0;c(we??y[0])},[y,f]);let[h,m]=yt(),x=Xa(()=>{Xe(void 0),Yt(!1),Ot(!1),j(!1),bt(void 0)},[]),k=Xa(X=>{c(X),m(void 0),x()},[x]),R=f?.kind==="svm",[I,C]=yt(""),S=e.amount!==void 0?e.amount:I,E=Xa(X=>{C(X),m(void 0),x()},[x]),M=sh(S,ok),O=f?rc(M,f.token.decimals):null,L=f?rc(S,f.token.decimals):null,[U,A]=yt(""),[F,ne]=yt(!1),ee=e.recipient!==void 0?e.recipient:U,Z=Xa(X=>{A(X),ne(!0),m(void 0),x()},[x]);so(()=>{e.recipient===void 0&&o&&!F&&A(o)},[o,F,e.recipient]);let W=ee.length===0||pt(ee),q=ee.length>0&&pt(ee)?ee:void 0,[B,G]=yt(),[te,_]=yt(!1),[le,me]=yt(0),Te=r?.getBalance;so(()=>{if(!Te||!o||!f||R){G(void 0),_(!1);return}let X=!1;_(!0);let we=f.token.address.toLowerCase()===Ga?void 0:f.token.address;return Te({chainId:f.chainId,address:o,token:we}).then(z=>{X||G({...z,formatted:$t(z.value,z.decimals)})}).catch(()=>{X||G(void 0)}).finally(()=>{X||_(!1)}),()=>{X=!0}},[Te,o,f,R,le]);let de=B?.value??null,he=!R&&L!==null&&de!==null&&L>de,[ge,Ze]=yt(),[xe,Ue]=yt(!1),[ot,De]=yt(),je=f?.chainId,Be=f?.token.address,Nt=e.target;so(()=>{if(!q||!je||!Be){Ze(void 0),De(void 0),Ue(!1);return}let X=!1;return Ze(void 0),De(void 0),Ue(!0),(Nt?n.getDepositAddress({user:q,originChainId:je,originCurrency:Be},Nt):n.getDepositAddress({user:q,originChainId:je,originCurrency:Be})).then(z=>{X||(Ze(z),De(void 0),t.current.onDepositAddress?.(z))}).catch(z=>{if(X)return;Ze(void 0);let Re=z instanceof Error?z:new Error(String(z));De(Re),t.current.onError?.(Re)}).finally(()=>{X||Ue(!1)}),()=>{X=!0}},[n,q,je,Be,Nt]);let Gt=[je??"",(Be??"").toLowerCase(),(q??"").toLowerCase(),Nt??"",S.trim()].join("|"),ut=nc(Gt);so(()=>{ut.current!==Gt&&(ut.current=Gt,m(void 0),x())},[Gt,x]);let[St,xt]=yt(),[Ht,vt]=yt(!1),[st,Tt]=yt(),$e=O?.toString();so(()=>{if(!je||!Be||!$e){xt(void 0),Tt(void 0),vt(!1);return}let X=!1,we,z=!0;async function Re(){z&&vt(!0);let V=ch;try{let Ce=await n.getQuote({originChainId:je,originCurrency:Be,amount:$e});if(X)return;xt(Ce),Tt(void 0),V=ik(Ce.ttl)}catch(Ce){if(X)return;xt(void 0),Tt(Ce instanceof Error?Ce:new Error(String(Ce)))}finally{X||vt(!1),z=!1}X||(we=setTimeout(Re,V))}return Re(),()=>{X=!0,we&&clearTimeout(we)}},[n,je,Be,$e]);let[qt,lt]=yt(!1),[nn,Qe]=yt(!1),[at,Xe]=yt(),[kt,bt]=yt(),[Ve,Yt]=yt(!1),[Kt,Ot]=yt(!1),[Zt,j]=yt(!1),ue=r?.waitForReceipt,be=nc(void 0);so(()=>{if(!at||!f||!ue)return;let X=!1;return Yt(!0),Ot(!1),j(!1),ue({chainId:f.chainId,hash:at}).then(we=>{X||(Ot(!0),j(we.status==="reverted"),me(z=>z+1),we.status!=="reverted"&&at!==be.current&&(be.current=at,t.current.onDeposited?.(at)))}).catch(we=>{X||bt(we instanceof Error?we.message:String(we))}).finally(()=>{X||Yt(!1)}),()=>{X=!0}},[at,ue]);let Ie=i!==void 0&&f!==void 0&&i!==f.chainId,et=qt||nn,Bt=h??kt,It="idle";Bt?It="error":Kt?It="confirmed":Ve?It="confirming":et&&(It=qt?"switching":"pending");let Cn={phase:It,isSubmitting:et,isConfirming:Ve,isConfirmed:Kt,needsSwitch:Ie,txHash:at,reverted:Kt&&Zt,error:Bt},Rn=!!(f&&ge&&ge.originChainId===f.chainId&&ge.originCurrency.toLowerCase()===f.token.address.toLowerCase()),P=!!(r?.sendTransaction&&r?.writeContract&&r?.readContract&&r?.waitForReceipt),ke=!!(a&&P&&f&&!R&&ge&&Rn&&L&&L>0n&&!he&&!et&&!Ve),We=Xa(async()=>{if(R||!f||!ge||!r?.sendTransaction||!r?.writeContract)return;m(void 0);let X=rc(S,f.token.decimals);if(!X||X<=0n){m("enter an amount to use the one-click deposit");return}let we=f.token.address.toLowerCase()===Ga,z=ge.depositAddress,Re=await Qg(r?.readContract,dh,{forwarder:ge.forwarder,recipient:q,version:ge.version,trusted:t.current.trustedFactories});if(!Re.ok){m(`address verification failed: ${Re.reason}`);return}if(f.chainId===lh.chainId&&f.token.address.toLowerCase()===lh.token.toLowerCase()&&!Vg(z,ge.forwarder)){m("address verification failed: deposit address does not match the verified forwarder (expected them to be identical on this route; check the backend's direct_same_token setting)");return}try{if(Ie){if(!r?.switchChain)throw new Error("wallet cannot switch chains");lt(!0);try{await r.switchChain(f.chainId)}finally{lt(!1)}}x(),Qe(!0);try{let Ce=we?await r.sendTransaction({chainId:f.chainId,to:z,value:X}):await r.writeContract({chainId:f.chainId,address:f.token.address,abi:sk,functionName:"transfer",args:[z,X]});Xe(Ce)}finally{Qe(!1)}}catch(Ce){m(Ce.message)}},[R,f,ge,S,Ie,r,q,x]);return{address:o,isConnected:a,catalog:w,catalogLoading:d,catalogError:b,origin:f,setOrigin:k,recipient:ee,setRecipient:Z,recipientValid:W,amount:S,setAmount:E,balance:B,balanceLoading:te,insufficientBalance:he,isSvmOrigin:R,depositAddress:ge?.depositAddress,depositAddressResult:ge,depositAddressLoading:xe,depositAddressError:ot,quote:St,quoteLoading:Ht,quoteError:st,canDeposit:ke,deposit:We,depositState:Cn}}import{useEffect as lk,useRef as dk,useState as ca}from"react";var ck=3e4,pk=300;function lo(e){let t=dk(e);t.current=e;let{client:n,enabled:r=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??ck,i=e.recipient&&pt(e.recipient)?e.recipient:void 0,[s,l]=ca([]),[d,p]=ca(!1),[b,u]=ca(),[g,y]=ca(!1),[w,f]=ca(),[c,h]=ca(0);return lk(()=>{if(!i){l([]),u(void 0),p(!1),y(!1),f(void 0),h(0);return}if(!r){l([]),u(void 0),p(!1),y(!1),f(void 0),h(0);return}let m=!1,x=!0,k,R=0,I=0;async function C(){let O=++R;I+=1,x&&p(!0);try{let L=await n.listOrders(i);if(m)return;O===R&&(l(L),u(void 0))}catch(L){if(m)return;let U=L instanceof Error?L:new Error(String(L));O===R&&(u(U),t.current.onError?.(U))}finally{I-=1,!m&&O===R&&(p(!1),y(!0),f(i),h(L=>L+1)),x=!1}}function S(){k&&clearTimeout(k),k=setTimeout(()=>{k=void 0,m||C()},pk)}C();let E;o&&typeof EventSource<"u"&&(E=new EventSource(n.ordersStreamUrl(i)),E.addEventListener("orders-changed",S),E.onopen=()=>{S()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{I===0&&C()},a):void 0;return()=>{m=!0,k&&clearTimeout(k),M&&clearInterval(M),E?.close()}},[n,i,r,o,a]),{orders:s,ordersLoading:d,ordersError:b,ordersInitialized:g,ordersForRecipient:w,ordersRevision:c}}import{useMemo as uk,useState as fk}from"react";function uh(e,t){if(t){let n=e.find(r=>r.symbol===t);if(n)return n}return e.find(n=>n.isDefault)??e[0]}function fh({catalogTargets:e,filter:t,defaultTarget:n}){let r=uk(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=fk(()=>uh(r,n)?.symbol),i=(o!==void 0?r.find(l=>l.symbol===o):void 0)??uh(r,n);function s(l){r.some(d=>d.symbol===l)&&a(l)}return{options:r,selected:i,setSelected:s}}var mk={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function co(e){return e.apiBaseUrl?e.apiBaseUrl:mk[it(e.environment)]}import{jsx as yk,jsxs as xk}from"react/jsx-runtime";var mh=1e3;function gk(e,t,n,r,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=n.walletAddress&&pt(n.walletAddress)?n.walletAddress:void 0;return{client:e.client,apiBaseUrl:r,wallet:n,chains:e.chains,recipient:a?i??"":e.recipient,amount:a&&!i?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Ys(e,t){let n=e.trim();if(!n)return 0n;try{let r=Ds(n,t);return r>0n?r:0n}catch{return 0n}}function hk(e,t,n,r){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(n&&o.toLowerCase()===n.toLowerCase()):r}function gh(e,t,n){return`${e}:${t.toLowerCase()}:${n}`}function bk(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function hh({open:e,children:t}){let[n]=Le.useState(Cg);return xk(Gd.Provider,{value:n,children:[e&&yk(wk,{store:n}),t]})}function wk({store:e}){let t=Wa(),{showTargetSelector:n=!0}=t,r=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&pt(t.walletAddress)),[a,i]=Le.useState("deposit"),s=a==="recover",l=Le.useCallback(H=>{i(ft=>(typeof H=="function"?H(ft==="recover"):H)?"recover":"deposit")},[]);Le.useEffect(()=>{Ye("relay","opened")},[]);let[d,p]=Le.useState(void 0),b=Le.useMemo(()=>co({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=Le.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),g=it(t.environment),y=Ft("apps.json",g,H=>({min:Wn(H?.relay?.minDepositAmount,g),max:Wn(H?.relay?.maxDepositAmount,g),trustedFactories:bi(H,g)})),w=Le.useMemo(()=>t.trustedFactories??Gs(y?.trustedFactories),[t.trustedFactories,y?.trustedFactories]),{isConnected:f,catalog:c,catalogLoading:h,catalogError:m,origin:x,setOrigin:k,amount:R,setAmount:I,recipient:C,setRecipient:S,recipientValid:E,balance:M,balanceLoading:O,insufficientBalance:L,depositAddress:U,depositAddressResult:A,depositAddressLoading:F,depositAddressError:ne,quote:ee,quoteLoading:Z,quoteError:W,canDeposit:q,deposit:B,depositState:G}=ph(gk(t,d,u,b,w)),{options:te,selected:_,setSelected:le}=fh({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Le.useEffect(()=>{p(_?.symbol)},[_?.symbol]);let me=t.amount===void 0&&!t.hideAmount,Te=!r&&(t.showRecipientInput??!0)&&t.recipient===void 0,de=E&&C.trim().length>0&&pt(C),he=!r&&t.recipient!==void 0&&t.recipient.trim().length>0,ge=r?!o||!de:!f&&!he&&!de,Ze=!!c&&!de&&!ge,xe=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),Ue=Le.useMemo(()=>t.client?t.client:en({baseUrl:b}),[t.client,b]),[ot,De]=Le.useState({}),[je,Be]=Le.useState(!1),[Nt,Gt]=Le.useState(0),ut=Le.useCallback(()=>Gt(H=>H+1),[]),St=G.isConfirmed,xt=de&&(!!A||a!=="deposit"),{orders:Ht,ordersLoading:vt,ordersError:st,ordersInitialized:Tt,ordersForRecipient:$e}=lo({client:Ue,recipient:xt?C:void 0,enabled:xt,refetchInterval:mh}),qt=Ht,lt=_??c?.targets.find(H=>H.isDefault),nn=lt?.symbol??c?.destination.symbol,Qe=lt?.isDefault??!0,at=A?.version,Xe=Le.useMemo(()=>Ht.filter(H=>hk(H,at,nn,Qe)),[Ht,at,nn,Qe]),kt=Le.useRef(void 0),[bt,Ve]=Le.useState(),[Yt,Kt]=Le.useState(),Ot=`${C.toLowerCase()}:${nn?.toLowerCase()??""}:${at??""}`;Le.useEffect(()=>{let H=$e?.toLowerCase()===C.toLowerCase();if(!xt||!Tt||!H||st){xt||(kt.current=void 0,Ve(void 0),Kt(void 0));return}let ft=new Set(Xe.map(ze=>ze.orderId)),dt=new Set(Xe.flatMap(ze=>(ze.deposits??[]).map(nr=>gh(ze.orderId,nr.txHash,nr.blockNumber)))),zt=kt.current;if(!zt||zt.key!==Ot){kt.current={key:Ot,orderIds:ft,depositKeys:dt,statuses:new Map(Xe.map(ze=>[ze.orderId,ze.status]))},Ve(void 0),Kt(void 0);return}let Et,qe=0n,gn=!1;for(let ze of Xe)for(let nr of ze.deposits??[]){let Gr=gh(ze.orderId,nr.txHash,nr.blockNumber);if(!zt.depositKeys.has(Gr)){Et??(Et=ze);try{qe+=BigInt(nr.amount),gn=!0}catch{}}}Et??(Et=Xe.find(ze=>!zt.orderIds.has(ze.orderId))),Et??(Et=Xe.find(ze=>zt.statuses.get(ze.orderId)!==ze.status));for(let ze of ft)zt.orderIds.add(ze);for(let ze of dt)zt.depositKeys.add(ze);for(let ze of Xe)zt.statuses.set(ze.orderId,ze.status);Et&&(Ve(Et.orderId),gn&&Kt(qe))},[Ot,Xe,$e,xt,C,st,Tt]),Le.useEffect(()=>{let H=c?.targets??[];if(!xe||!de||H.length===0){De({}),Be(!1);return}let ft=!1;return Be(!0),Promise.all(H.map(dt=>Ue.getRecovery({user:C,target:dt.symbol}).catch(()=>{}))).then(dt=>{if(ft)return;let zt={};H.forEach((Et,qe)=>{let gn=dt[qe];gn&&(zt[Et.symbol]=gn)}),De(zt),Be(!1)}),()=>{ft=!0}},[Ue,xe,de,C,c,St,Nt]);let Zt=Le.useMemo(()=>(c?.targets??[]).map(H=>({symbol:H.symbol,isDefault:H.isDefault,info:ot[H.symbol]})).filter(H=>H.info!==void 0),[c,ot]),j=Le.useMemo(()=>Hs(sa(Zt)),[Zt]),[ue,be]=Le.useState(void 0),[Ie,et]=Le.useState(),Bt=!!c&&(c?.targets.length??0)>0&&!d;Le.useEffect(()=>{if(!de||!x||!A||Bt){be(void 0),et(void 0);return}let H=!1,ft=!1,dt=A.forwarder.toLowerCase();be(void 0),et(void 0);async function zt(){if(!(H||ft)){ft=!0;try{let qe=await Ue.getRecovery({user:C,target:d||void 0});if(H)return;if(qe?.forwarder&&qe.forwarder.toLowerCase()!==dt){be(void 0),et(void 0);return}if(et(qe),!qe||qe.suggestedAction!=="sweep"){be(void 0);return}let gn;try{gn=BigInt(qe.balance)}catch{be(void 0);return}let ze=Number(qe.decimals);if(gn<=0n||!Number.isInteger(ze)||ze<0){be(void 0);return}let nr=qe.tokens?.find(Gr=>Gr.address?.toLowerCase()===qe.token?.toLowerCase()&&Gr.symbol)?.symbol;be({balance:gn,decimals:ze,symbol:nr})}catch{}finally{ft=!1}}}zt();let Et=setInterval(()=>{zt()},mh);return()=>{H=!0,clearInterval(Et)}},[Ue,de,C,d,Bt,x,A,St]);let It=Le.useCallback(()=>{!x||!M||I($t(M.value,x.token.decimals))},[x,M,I]),Cn=Le.useRef(!1),Rn=!!U;Le.useEffect(()=>{!Rn||Cn.current||(Cn.current=!0,Ye("relay","deposit_address_shown"))},[Rn]);let P=G.txHash;Le.useEffect(()=>{P&&Ye("relay","deposit_submitted")},[P]);let ke=(()=>{let H=Number(y?.min);return Number.isFinite(H)&&H>=0?String(y?.min):"6"})(),We=(()=>{let H=Number(y?.max);return Number.isFinite(H)&&H>0?String(y?.max):void 0})(),X=(()=>{if(!x)return 0n;let H=Ys(ke,x.token.decimals),ft=BigInt(x.minAmount);return H>ft?H:ft})(),we=x?$t(X,x.token.decimals):ke,z=(()=>{if(!x||!ue||X<=0n)return;let H=x.token.decimals,ft=ue.decimals,dt=H>=ft?ue.balance*10n**BigInt(H-ft):ue.balance/10n**BigInt(ft-H);if(dt>=X)return;let zt=X-dt;return{pending:$t(ue.balance,ft),pendingSymbol:ue.symbol,remaining:$t(zt,H)}})(),Re=c?.origins.find(H=>H.chainId===56&&!!(Ie?.token&&H.token.address.toLowerCase()===Ie.token.toLowerCase()))??c?.origins.find(H=>H.chainId===56&&H.token.symbol.toUpperCase()==="USDT"),V=Number.isInteger(Ie?.decimals)&&(Ie?.decimals??-1)>=0?Ie.decimals:Re?.token.decimals,Ce=Ie?.tokens?.find(H=>H.address?.toLowerCase()===Ie.token?.toLowerCase()&&H.symbol)?.symbol??Re?.token.symbol,Ln=Yt!==void 0&&V!==void 0?$t(Yt,V):void 0,po=(()=>{if(!x||V===void 0)return;let H=x.token.decimals;if(V>=H)return X*10n**BigInt(V-H);let ft=10n**BigInt(H-V);return(X+ft-1n)/ft})(),gr=bt?Xe.find(H=>H.orderId===bt):void 0,hr=gr??Xe.find(H=>H.status==="BSC_FUNDED"||H.status==="BRIDGE_INITIATED"||H.status==="BRIDGE_PENDING"),ua=(()=>{if(!hr||po===void 0)return!1;try{return BigInt(hr.amountIn)>=po}catch{return!1}})(),wl=(()=>{if(!Ie||po===void 0)return!1;try{return BigInt(Ie.balance)>0n&&BigInt(Ie.balance)>=po}catch{return!1}})(),yl=(()=>{let H={amount:Ln,symbol:Ce,backendStatus:hr?.status};return!A||!xt||!Tt?{phase:"connecting",...H}:$e?.toLowerCase()!==C.toLowerCase()||st?{phase:"unavailable",...H}:gr?.status==="COMPLETED"?{phase:"completed",...H,backendStatus:gr.status}:gr&&bk(gr.status)?{phase:"failed",...H,backendStatus:gr.status}:hr?.status==="BRIDGE_INITIATED"||hr?.status==="BRIDGE_PENDING"?{phase:"processing",...H}:hr?.status==="BSC_FUNDED"&&ua||wl?{phase:"funded",...H}:gr?{phase:"detected",...H,backendStatus:gr.status}:{phase:"waiting",...H}})(),Wr=x&&We?Ys(We,x.token.decimals):void 0,uo=x&&R.trim()?Ys(R,x.token.decimals):0n,si=!!(x&&uo>0n&&uo<X),fo=!!(x&&Wr!==void 0&&uo>0n&&uo>Wr),li=(()=>{if(x){if(si)return`Amount is below the ${we} ${x.token.symbol} minimum.`;if(fo)return`Amount is above the ${We} ${x.token.symbol} maximum.`}})(),mo=t.showOneClickDeposit??!1,di=x&&R.trim()?Ys(R,x.token.decimals).toString():void 0,xl={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:b,wallet:u,catalog:c,catalogLoading:h,catalogError:m,origin:x,setOrigin:k,amount:R,setAmount:I,recipient:C,setRecipient:S,recipientValid:E,balance:M,balanceLoading:O,insufficientBalance:L,depositAddress:U,depositAddressLoading:F,depositAddressError:ne,arrivalStatus:yl,quote:ee,quoteLoading:Z,quoteError:W,canDeposit:q,deposit:B,depositState:G,targetOptions:te,selectedTarget:_,setSelectedTarget:le,showAmountInput:me,minNotice:x?{min:we,symbol:x.token.symbol,...z}:void 0,showRecipientInput:Te,showTargetSelector:n,showOneClick:mo,showConnectPrompt:ge,showRecipientHint:Ze,canRecover:xe,recoverableCount:j,recoveryTargetsLoading:je,recoveryTargets:Zt,recoveryOrders:qt,historyOrdersLoading:vt,historyOrdersError:st,refreshRecovery:ut,trustedFactories:w,amountHint:li,amountSmallestUnits:di,onMax:me&&M&&M.value>0n?It:void 0};return Le.useLayoutEffect(()=>{e.publish(xl)}),Le.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as oc}from"react/jsx-runtime";function vk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[b,u]=Ks.useState(!1),g=l!==void 0,y=g?l:b,w=Ks.useCallback(f=>{g||u(f),d?.(f)},[g,d]);return oc(Wd.Provider,{value:e,children:oc(hh,{open:y,children:oc(Sr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:p})})})}var Ja=Object.assign(vk,{Trigger:ih,Content:ah});import{createContext as kk,useContext as Ck}from"react";var ac=kk(null);function ic(){let e=Ck(ac);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as Fn from"react";import{jsx as Mo}from"react/jsx-runtime";function bh({className:e}){let t=ic(),{open:n}=ur();return Fn.useEffect(()=>{n&&Ye("relay","history_opened")},[n]),Mo(ve,{feature:"relay",children:Mo(Tr,{ariaTitle:"Transfer history",className:e??t.className,children:Mo(Rk,{})})})}function Rk(){let e=ic(),{theme:t}=ur(),n=Fn.useMemo(()=>{if(e.client)return e.client;let f=co({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return en({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),r=e.recipient??e.walletAddress,o=!!(r&&pt(r)),[a,i]=Fn.useState(),[s,l]=Fn.useState(!1),[d,p]=Fn.useState(),b=Fn.useRef(e.onError);b.current=e.onError,Fn.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let f=!1;return i(void 0),l(!0),p(void 0),n.getConfig().then(c=>{f||i(c)}).catch(c=>{if(f)return;let h=c instanceof Error?c:new Error(String(c));p(h),b.current?.(h)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[n,o]);let{orders:u,ordersLoading:g,ordersError:y}=lo({client:n,recipient:o?r:void 0,enabled:!!a,onError:e.onError}),w=Fn.useCallback(f=>{if(!e.onOutlink)return;let h=f.target.closest?.('a[target="_blank"]');h?.href&&e.onOutlink(h.href)},[e.onOutlink]);return Mo("div",{className:"rd-root rd-wizard","data-theme":t,children:o?Mo("div",{onClick:w,children:Mo(js,{orders:u,isLoading:s||g,error:d??y,catalog:a,showTitle:!1})}):Mo(Va,{requiresIdentity:!0})})}import{jsx as sc}from"react/jsx-runtime";function wh({asChild:e,children:t}){return sc(ve,{feature:"relay",children:sc(da,{asChild:e??t!=null,children:t??sc("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as yh}from"react/jsx-runtime";function Nk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e;return yh(ac.Provider,{value:e,children:yh(Sr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var xh=Object.assign(Nk,{Trigger:wh,Content:bh});import*as $n from"react";import*as Un from"react";var Zs=[],Sk=3e4;function vh({client:e,recipient:t}){let[n,r]=Un.useState({targets:Zs}),[o,a]=Un.useState(0),i=Un.useRef(void 0),s=Un.useRef(void 0),l=t&&pt(t)?t.toLowerCase():void 0;Un.useEffect(()=>{if(!l){r({targets:Zs});return}let w=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let c=(async()=>{let h,m=[];try{m=(await e.getConfig()).targets}catch(C){h=C instanceof Error?C:new Error(String(C))}let x=m.length===0?[()=>e.getRecovery({user:l})]:m.map(C=>()=>e.getRecovery({user:l,target:C.symbol})),k=await Promise.all(x.map(async C=>{try{return{info:await C()}}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}})),R=m.length===0?k[0]?.info?[{symbol:"",isDefault:!0,info:k[0].info}]:[]:m.flatMap((C,S)=>k[S]?.info?[{symbol:C.symbol,isDefault:C.isDefault,info:k[S].info}]:[]),I=k.find(C=>C.error)?.error;return{targets:R,badgeFailed:!!(h||I&&R.length===0),error:h??I}})().catch(h=>({targets:Zs,badgeFailed:!0,error:h instanceof Error?h:new Error(String(h))}));f={client:e,recipientKey:l,generation:o,promise:c},i.current=f,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return f.promise.then(c=>{w||r({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{w=!0}},[e,l,o]);let d=Un.useCallback(()=>a(w=>w+1),[]),p=Un.useCallback(()=>{if(!l)return;let w=i.current;if(w?.client===e&&w.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<Sk||a(c=>c+1)},[e,l]),b=l&&n.recipientKey===l?n.targets:Zs,u=l&&n.recipientKey===l?n.error:void 0,g=!!(l&&n.recipientKey!==l),y=!!(l&&n.recipientKey===l&&n.badgeFailed);return Un.useMemo(()=>({count:y?0:Hs(sa(b)),targets:b,loading:g,error:u,refresh:d,refreshIfStale:p}),[b,g,y,u,d,p])}import{createContext as Tk,useContext as Ik}from"react";var lc=Tk(null);function dc(){let e=Ik(lc);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function cc(){return dc().props}function kh(){return dc().recovery}function Ch(){return dc().recovery.count}import*as Lo from"react";import{jsx as Do,jsxs as Ak}from"react/jsx-runtime";function Rh({className:e}){let t=cc(),{open:n}=ur();return Lo.useEffect(()=>{n&&Ye("relay","recovery_opened")},[n]),Do(ve,{feature:"relay",children:Do(Tr,{ariaTitle:"Recover stuck funds",className:e??t.className,children:Do(Ek,{})})})}function Ek(){let e=cc(),{targets:t,loading:n,refresh:r}=kh(),{theme:o}=ur(),a=Lo.useMemo(()=>co({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=Lo.useMemo(()=>e.client?e.client:en({baseUrl:a}),[e.client,a]),s=Lo.useMemo(()=>({walletAddress:e.walletAddress,walletChainId:e.walletChainId,sendTransaction:e.sendTransaction,writeContract:e.writeContract,readContract:e.readContract,switchChain:e.switchChain,waitForReceipt:e.waitForReceipt,getBalance:e.getBalance}),[e.walletAddress,e.walletChainId,e.sendTransaction,e.writeContract,e.readContract,e.switchChain,e.waitForReceipt,e.getBalance]),l=e.walletAddress&&pt(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||pt(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,b=it(e.environment),u=Ft("apps.json",b,h=>bi(h,b)),g=Lo.useMemo(()=>e.trustedFactories??Gs(u),[e.trustedFactories,u]),y=!!(e.writeContract&&e.readContract&&e.waitForReceipt),w=!!p&&y,f=p,{orders:c}=lo({client:i,recipient:w?f:void 0,enabled:w,live:!1});return Ak("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&Do("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&Do("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!y&&Do("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),w&&Do(Vs,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:g,targets:t,targetsLoading:n,orders:c,onRecovered:r,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as pc}from"react/jsx-runtime";function Nh({asChild:e,children:t}){let n=Ch();return pc(ve,{feature:"relay",children:pc(da,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":n},children:t??pc("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as Sh}from"react/jsx-runtime";function Mk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[b,u]=$n.useState(!1),g=l!==void 0,y=g?l:b,w=$n.useCallback(R=>{g||u(R),d?.(R)},[g,d]),f=$n.useMemo(()=>{if(e.client)return e.client;let R=co({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return en({baseUrl:R})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&pt(e.walletAddress)?e.walletAddress:void 0,h=c&&(!e.recipient||pt(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,m=vh({client:f,recipient:h});$n.useEffect(()=>{y&&m.refreshIfStale()},[y,m.refreshIfStale]);let x=$n.useRef(void 0);$n.useEffect(()=>{!y||!m.error||x.current===m.error||(x.current=m.error,e.onError?.(m.error))},[y,m.error,e.onError]);let k=$n.useMemo(()=>({props:e,recovery:m}),[e,m]);return Sh(lc.Provider,{value:k,children:Sh(Sr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:p})})}var Th=Object.assign(Mk,{Trigger:Nh,Content:Rh});import{useCallback as Lk,useEffect as Dk,useMemo as Pk,useRef as Ok,useState as Xs}from"react";function Ih(e={}){let t=Ok(e);t.current=e;let n=Pk(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.enabled??!0,o=e.refetchInterval,[a,i]=Xs(),[s,l]=Xs(!1),[d,p]=Xs(),[b,u]=Xs(0);Dk(()=>{if(!r){i(void 0),l(!1),p(void 0);return}let y=!1,w=!1;i(void 0),l(!0),p(void 0);async function f(){if(!(y||w)){w=!0;try{let h=await n.getConfig();if(y)return;i(h),p(void 0)}catch(h){if(y)return;let m=h instanceof Error?h:new Error(String(h));p(m),t.current.onError?.(m)}finally{w=!1,y||l(!1)}}}f();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{y=!0,c&&clearInterval(c)}},[n,r,b,o]);let g=Lk(()=>u(y=>y+1),[]);return{config:a,loading:s,error:d,refresh:g}}import{useQuery as Bk}from"@tanstack/react-query";import{useCallback as Eh,useEffect as zk,useMemo as uc,useRef as Ah}from"react";var Fk=1,Mh=new WeakMap;function Uk(e){let t=Mh.get(e);if(t!==void 0)return t;let n=Fk++;return Mh.set(e,n),n}function Lh(e={}){let t=Ah(e);t.current=e;let n=uc(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&pt(r)?r:void 0,a=e.target,i=e.query,s=uc(()=>Uk(n),[n]),l=uc(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=Bk({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return n.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),p=Ah(0);zk(()=>{let w=d.error,f=d.errorUpdatedAt;!w||f===p.current||(p.current=f,t.current.onError?.(w),w instanceof mr&&w.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let b=Eh(()=>{d.refetch()},[d.refetch]),u=Ka({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:b}),g=d.data,y=Eh(async(w,f)=>{g&&await u.recover(g,w,f)},[u,g]);return{info:g,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:b,recover:y,recoveryState:u.stateFor(g?.forwarder)}}import{Fragment as _k,jsx as er,jsxs as tr}from"react/jsx-runtime";var jk={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Wk={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function Gk(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Dh(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Hk(e){return e==="done"?"rd-stepper-item rd-stepper-item-done":e==="active"?"rd-stepper-item rd-stepper-item-active":"rd-stepper-item rd-stepper-item-pending"}function Ph({orderId:e,order:t,error:n}){let r=!t&&!n;return tr("section",{className:"rd-card",children:[tr("div",{className:"rd-card-header",children:[er("h2",{className:"rd-card-title",children:"4. Status"}),t&&er("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Dh(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),tr("p",{className:"rd-card-hint",children:["Order ",e]}),r&&tr("p",{className:"rd-muted",children:[er("span",{className:"rd-spinner"})," Loading status..."]}),n&&tr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",n.message]}),t&&tr(_k,{children:[er("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>tr("li",{className:Hk(o.status),children:[tr("div",{className:"rd-stepper-rail",children:[er("span",{className:"rd-stepper-dot",children:Gk(o.status)}),a<t.steps.length-1&&er("span",{className:"rd-stepper-line"})]}),tr("div",{className:"rd-stepper-body",children:[er("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&er("div",{className:"rd-stepper-meta",children:er(fc,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&tr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&er(fc,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&er(fc,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Dh(t.status)&&tr("div",{className:"rd-callout rd-callout-danger",children:["This order did not complete successfully (status: ",t.status,"). If funds were deposited, refer to the refund address on the order for recovery."]}),t.status==="COMPLETED"&&er("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function fc({orderTxs:e,txKey:t}){let n=e[t];return n?tr("a",{href:`${jk[t]}${n}`,target:"_blank",rel:"noreferrer",children:[Wk[t],": ",n.slice(0,10),"..."]}):null}function Js(e){return`${e.chainId}:${e.address.toLowerCase()}`}function mc(e,t){return Js(e)===Js(t)}function $s(e,t){if(t)return e.find(n=>mc(n,t))}function $a(e,t,n){return t?{fromTokens:(n==="swap"?[t.swap.from]:t.bridge.from).map(o=>$s(e,o)).filter(o=>!!o),targetToken:$s(e,t.target)}:{fromTokens:[],targetToken:void 0}}function el(e,t){return e.some(n=>n.chainId===t.chainId&&n.address.toLowerCase()===t.address.toLowerCase())}function Oh(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(n=>Number(n)),prerelease:t[2]??null}:null}function Qk(e,t){let n=Oh(e),r=Oh(t);if(!n||!r)return null;let o=Math.max(n.parts.length,r.parts.length);for(let a=0;a<o;a+=1){let i=(n.parts[a]??0)-(r.parts[a]??0);if(i!==0)return i<0?-1:1}return n.prerelease===r.prerelease?0:n.prerelease===null?1:r.prerelease===null||n.prerelease<r.prerelease?-1:1}function Bh(e,t=ho){if(!e)return!0;let n=Qk(t,e);return n===null?!0:n>=0}var zh={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function ei(e,t){return t?.[zh[e]]??e!=="transfer"}function ti(e,t){return Bh(t?.[zh[e]])}function tl(e,t,n){return ei(e,t)&&ti(e,n)}var Fh={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function Uh(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function jh(e,t){return e?.items?.find(({id:r,type:o})=>r.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}import*as nl from"react";var Vk="contracts.json",qk=/^0x[0-9a-fA-F]{40}$/;function Wh(e){return typeof e=="string"&&qk.test(e)?e:void 0}function Yk(e,t,n){let r=Wh(n);if(r)return r;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return Wh(typeof a=="string"?a:a?.[o])}function Gh(e,t){let[n,r]=nl.useState(void 0);nl.useEffect(()=>{let a=!0;return r(void 0),Ar(Vk,e).then(i=>{a&&r(i)}),()=>{a=!1}},[e]);let o=Yk(n,e,t);return{loading:n===void 0&&!o,address:o}}var Hh=(1n<<256n)-1n,gc=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],rl=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function ni(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}import*as ol from"react";function _h(e){let[t,n]=ol.useState(null);return ol.useEffect(()=>{if(!e)return;let r=!0;return ad().then(o=>{r&&n(o)}).catch(()=>{}),()=>{r=!1}},[e]),t}function Qh(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function Kk(e){if(!e)return"";let[t="0",n=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=n.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function Zk(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Vh(e,t){return Qh(e.pathType,t)?"Bridging":"Swapping"}function qh(e,t){let n=Kk(e.toAmount);if(Qh(e.pathType,t)){let r=`arriving on ${Zk(e.toToken.chainId)}`;return n?`${n} ${r}`:r}return n?`${n} Swapped`:"Transaction completed"}import{jsx as fn,jsxs as hc}from"react/jsx-runtime";function Yh(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m7 3-3 3 3 3M4 6h13a3 3 0 0 1 3 3v1M17 21l3-3-3-3m3 3H7a3 3 0 0 1-3-3v-1",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function Kh(e){return hc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("path",{d:"M10 13a4 4 0 0 0 5.66 0l2.83-2.83a4 4 0 0 0-5.66-5.66L11.4 5.94",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M14 11a4 4 0 0 0-5.66 0L5.51 13.8a4 4 0 0 0 5.66 5.66l1.42-1.41",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Zh(e){return hc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function Xh(e){return hc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),fn("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function al(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function il(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}import*as Wt from"react";import*as sl from"react";var Xk={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},Jk=6e4,Jh=new Map,bc=new Map;function $k(e){let t=Xk[e],n=Jh.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.value);let r=bc.get(t);if(r)return r;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return Jh.set(t,{value:l,expiresAt:Date.now()+Jk}),l})().finally(()=>{bc.delete(t)});return bc.set(t,o),o}function $h(e){let t=Math.trunc(e/100),n=Math.abs(Math.trunc(e%100));return`${t}.${String(n).padStart(2,"0")}`}function e0(e,t){let[n,r]=sl.useState(void 0);return sl.useEffect(()=>{if(!t)return;let o=!0;return $k(e).then(a=>{o&&r(a)}).catch(()=>{o&&r(null)}),()=>{o=!1}},[t,e]),n}import{jsx as ln,jsxs as An}from"react/jsx-runtime";var Po="sONEUSD",e5=300,ll=6,t0=[25,50,75,100];function n0(e,t){return t>=100?e:e*BigInt(t)/100n}function r0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function t5(e,t){let n=e.replace(/[^\d.]/g,""),[r="",...o]=n.split(".");return o.length===0?r:`${r}.${o.join("").slice(0,t)}`}function n5(e,t,n,r){let[o,a]=Wt.useState(null),[i,s]=Wt.useState(null),[l,d]=Wt.useState(0),p=Wt.useCallback(()=>d(u=>u+1),[]),{readContract:b}=e;return Wt.useEffect(()=>{if(!r){a(null);return}let u=!1;s(null);let g=r,y={chainId:t.chainId,address:t.address,abi:gc},w={chainId:t.chainId,address:n,abi:rl};return Promise.all([b({...y,functionName:"balanceOf",args:[g]}),b({...y,functionName:"allowance",args:[g,n]}),b({...w,functionName:"balanceOf",args:[g]}),b({...w,functionName:"paused",args:[]})]).then(([f,c,h,m])=>{u||a({balance:ni(f),allowance:ni(c),shares:ni(h),paused:m===!0})}).catch(f=>{u||s(r0(f))}),()=>{u=!0}},[b,t.address,t.chainId,n,r,l]),{position:o,error:i,refetch:p}}function r5(e,t,n,r){let[o,a]=Wt.useState(null);return Wt.useEffect(()=>{if(r===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:n,abi:rl,functionName:"previewDeposit",args:[r]}).then(l=>{i||a(ni(l))}).catch(()=>{i||a(null)})},e5);return()=>{i=!0,clearTimeout(s)}},[r,e,t.chainId,n]),o}function o0({env:e,walletAddress:t,walletChainId:n,token:r,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:b}){let[u,g]=Wt.useState(""),[y,w]=Wt.useState("idle"),[f,c]=Wt.useState(null),h=Wt.useRef(!0);Wt.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]);let{position:m,error:x,refetch:k}=n5(a,r,o,t),R=e0(e,!0),I=Wt.useMemo(()=>u.trim()?Dr(u,r.decimals):null,[u,r.decimals]),C=I&&"value"in I?I.value:null,S=C!==null&&m!==null&&C>m.balance,E=I&&"error"in I?I.error:S?`Exceeds your ${r.symbol} balance.`:null,M=r5(a.readContract,r,o,C!==null&&!S?C:null),O=y!=="idle",L=C!==null&&m!==null&&m.allowance<C,U=!O&&!i&&!!t&&m!==null&&!m.paused&&C!==null&&!S,A=Wt.useCallback(W=>{if(!m||O)return;let q=n0(m.balance,W);g(q>0n?xr(q,r.decimals,r.decimals):""),c(null)},[O,m,r.decimals]),F=C!==null&&m!==null&&m.balance>0n?t0.find(W=>n0(m.balance,W)===C)??null:null,ne=Wt.useCallback(async()=>{if(!U||!t||C===null||!m)return;let W=t;c(null);try{if(n!==void 0&&n!==r.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${r.chainId} first.`);w("switching"),await a.switchChain(r.chainId)}if(m.allowance<C){w("approving");let B=await a.writeContract({chainId:r.chainId,address:r.address,abi:gc,functionName:"approve",args:[o,Hh]});if(a.waitForReceipt&&(w("confirming-approval"),(await a.waitForReceipt({chainId:r.chainId,hash:B})).status!=="success"))throw new Error("Approval reverted.");if(!h.current)return;k()}w("staking");let q=await a.writeContract({chainId:r.chainId,address:o,abi:rl,functionName:"deposit",args:[C,W]});if(!h.current)return;w("idle"),g(""),p({txHash:q,chainId:r.chainId,amount:C,amountText:xr(C,r.decimals,ll)})}catch(q){if(!h.current)return;let B=r0(q);w("idle"),c(B),b(B)}},[C,U,b,p,a,m,k,r.address,r.chainId,r.decimals,o,t,n]),ee=y==="switching"?"Switching network...":y==="approving"?`Approve ${r.symbol} in your wallet...`:y==="confirming-approval"?"Confirming approval...":y==="staking"?"Confirm in your wallet...":L?`Approve ${r.symbol}`:"Stake",Z=f??E??x;return An("div",{className:"gou-chooser-body gou-stake","data-busy":O?"true":"false",children:[ln("button",{type:"button",className:"gou-close",onClick:d,disabled:O,"aria-label":"Close",children:ln(il,{})}),An("header",{className:"gou-intro gou-stake-header",children:[ln("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:O,"aria-label":"Back",children:ln(al,{})}),An("h2",{children:["Stake ",r.symbol]})]}),An("form",{className:"gou-stake-form",onSubmit:W=>{W.preventDefault(),ne()},children:[An("div",{className:"gou-stake-row",children:[ln("label",{htmlFor:"gou-stake-amount",children:"Amount"}),An("span",{children:["Balance:"," ",An("strong",{className:"gou-stake-balance",children:[m?xr(m.balance,r.decimals,ll):t?"\u2026":"0"," ",r.symbol]})]})]}),An("div",{className:"gou-stake-input","data-invalid":Z?"true":"false",children:[ln("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:u,disabled:O,onChange:W=>{g(t5(W.target.value,r.decimals)),c(null)}}),ln("span",{children:r.symbol})]}),ln("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:t0.map(W=>ln("button",{type:"button","aria-pressed":F===W,disabled:O||!m||m.balance===0n,onClick:()=>A(W),"data-track":"stake_quick_amount","data-track-id":String(W),children:W>=100?"MAX":`${W}%`},W))}),Z&&ln("p",{className:"gou-stake-error",role:"alert",children:Z}),An("dl",{className:"gou-stake-estimate",children:[R&&An("div",{children:[ln("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),An("dd",{className:"gou-stake-apr",children:[$h(R.aprBps),"%"]})]}),An("div",{children:[ln("dt",{children:"You receive"}),ln("dd",{children:M!==null?`\u2248 ${xr(M,r.decimals,ll)} ${Po}`:`0 ${Po}`})]}),An("div",{children:[An("dt",{children:["Your ",Po]}),ln("dd",{className:"gou-stake-shares",children:m?`${xr(m.shares,r.decimals,ll)} ${Po}`:t?"\u2026":`0 ${Po}`})]})]}),m?.paused&&ln("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?ln("button",{type:"submit",className:"gou-stake-submit",disabled:!U,"data-track":"stake_submit",children:ee}):ln("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}ce(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #f3742e);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-default, #f3742e)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #f3742e);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #f3742e);background:var(--ds-accent-primary-low, rgba(243, 116, 46, .1));color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #00ceb2);color:var(--ds-accent-primary-on, #001b18);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
22
|
-
`);import{Fragment as s5,jsx as Ee,jsxs as tn}from"react/jsx-runtime";var o5=[{id:"swap",label:"Swap",eta:"Instant",Icon:Yh},{id:"bridge",label:"Bridge",Icon:Kh},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:Zh},{id:"stake",label:"Stake",eta:"Earn yield",Icon:Xh}],a5=4e3;function a0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function dl(e,t){try{e?.(t)}catch{}}function i5({compactTrigger:e,collapseOnScroll:t,scrollThreshold:n}){let[r,o]=_e.useState(!1);return _e.useEffect(()=>{if(t===!1){o(!1);return}let a=n??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let p=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},b=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",b,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",b)}},[t,n]),!!(e||r)}function i0({loading:e}){return tn("div",{className:"gou-route-state",role:"status",children:[e&&Ee("span",{className:"gou-spinner","aria-hidden":"true"}),Ee("h3",{children:e?"Preparing route":"Route unavailable"}),Ee("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function s0({walletAddress:e,tokens:t,pairs:n,loading:r=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:b="floating",buttonComponent:u,theme:g="dark",mobileBreakpoint:y=768,drawerDirection:w="bottom",dialogWidth:f="560px",drawerMaxWidth:c,drawerMinWidth:h,style:m,className:x,contentClassName:k,hidden:R=!1,compactTrigger:I,collapseOnScroll:C=!0,scrollThreshold:S=200,waitForTransaction:E,transactionResultDurationMs:M=a5,onRequestConnect:O,onEvent:L}){let[U,A]=_e.useState(!1),[F,ne]=_e.useState(null),[ee,Z]=_e.useState(!1),[W,q]=_e.useState(null),[B,G]=_e.useState(!1),te=_e.useRef(0),_=_e.useRef(!1),le=_e.useRef(null),me=_e.useRef(!0),Te=i5({compactTrigger:I,collapseOnScroll:C,scrollThreshold:S}),de=_e.useMemo(()=>it(s),[s]),he=Ft("apps.json",de,P=>P?.getOneUsd?.modes),ge=Ft("apps.json",de,P=>P?.getOneUsd?.minVersions),xe=Ft("app-launcher-v2.json",de,P=>jh(P,de))??Fh[de],Ue=_e.useMemo(()=>$a(t,n,"swap"),[n,t]),ot=_e.useMemo(()=>$a(t,n,"bridge"),[n,t]),De=Ue.targetToken??ot.targetToken,je=i?.readContract??a?.readContract,Be=i?.writeContract??a?.writeContract,Nt=i?.switchChain??a?.switchChain,Gt=i?.waitForReceipt??a?.waitForReceipt,ut=_e.useMemo(()=>je&&Be?{readContract:je,writeContract:Be,switchChain:Nt,waitForReceipt:Gt}:null,[je,Nt,Gt,Be]),{address:St,loading:xt}=Gh(de,i?.vaultAddress),Ht=!!(ut&&St&&De),vt=_e.useMemo(()=>o5.filter(({id:P})=>ei(P,he)),[he]),st=vt.length>0,Tt=_h(!R&&st),$e=l??De?.symbol??"ONEUSD",qt=p??De?.iconUrl??Hd,lt=b==="floating"&&Te,nn=b==="button"&&u?u:"button";_e.useEffect(()=>(me.current=!0,()=>{me.current=!1,le.current&&clearTimeout(le.current)}),[]),_e.useEffect(()=>{G(!Uh(window.location.hostname))},[]),_e.useEffect(()=>{st||A(!1)},[st]);let Qe=_e.useCallback(P=>L?.(P),[L]),at=_e.useCallback(()=>{W||!st||(Qe({name:"fab_click",state:lt?"icon_only":"expanded"}),A(!0))},[Qe,st,W,lt]),Xe=_e.useCallback(P=>{W||!tl(P,he,ge)||P==="stake"&&!Ht||(Qe({name:"action_select",action:P}),A(!1),P==="transfer"&&Z(!0),ne(P))},[Qe,he,ge,Ht,W]),kt=_e.useCallback(P=>{Qe({name:"connect_click",action:P}),Promise.resolve(O?.()).catch(ke=>{Qe({name:"failure",action:P,message:a0(ke)})})},[Qe,O]),bt=F==="swap"||F==="bridge"?F:null,Ve=bt==="swap"?Ue:ot,Yt=!!(n&&Ve.targetToken&&Ve.fromTokens.length>0),Kt=_e.useMemo(()=>{if(!Ve.targetToken)return;let P=Ve.targetToken;return ke=>{let We=o.getToTokens?.(ke,t);return We&&!el(We,P)?[]:[P]}},[o.getToTokens,Ve.targetToken,t]),{onSubmitted:Ot,onSuccess:Zt,onFailed:j,...ue}=o,{onDeposited:be,onError:Ie,...et}=a??{},Bt=_e.useCallback((P,ke,We,X,we)=>{!me.current||te.current!==P||(q({id:P,phase:ke,action:We,label:X,txHash:we}),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{!me.current||te.current!==P||(_.current=!1,q(null),le.current=null)},Math.max(0,M)))},[M]),It=_e.useCallback(P=>{if(_.current)return!1;_.current=!0;let{action:ke,txHash:We,pendingLabel:X,successNote:we,wait:z,onFailed:Re}=P,V=++te.current;return q({id:V,phase:"pending",action:ke,label:X,txHash:We}),A(!1),ne(null),Promise.resolve().then(z).then(()=>{!me.current||te.current!==V||(Bt(V,"success",ke,we,We),Qe({name:"success",action:ke,txHash:We}))}).catch(Ce=>{if(!me.current||te.current!==V)return;let Ln=a0(Ce);Bt(V,"failure",ke,"Transaction failed",We),Re?.(Ln),Qe({name:"failure",action:ke,message:Ln})}),!0},[Qe,Bt]),Cn=_e.useCallback((P,ke)=>{It({action:ke,txHash:P.txHash,pendingLabel:Vh(P,ke),successNote:qh(P,ke),wait:async()=>{await E?.(P)},onFailed:X=>dl(j,{message:X,txHash:P.txHash})})&&dl(Ot,P)},[j,Ot,It,E]),Rn=_e.useCallback(P=>{let ke=ut?.waitForReceipt;It({action:"stake",txHash:P.txHash,pendingLabel:"Staking",successNote:`${P.amountText} ${De?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!ke)return;if((await ke({chainId:P.chainId,hash:P.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[ut,De?.symbol,It]);return Ee(ve,{feature:"get_one_usd",children:tn("div",{className:x,"data-theme":g,"data-gou-mode":b,children:[tn(Sr,{theme:g,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:U,onOpenChange:A,children:[!R&&st&&(b==="button"||!W)&&tn(nn,{type:"button",className:"gou-fab",style:m,"data-trigger-mode":b,"data-icon-only":lt?"true":"false",onClick:at,disabled:!!W,"aria-label":`Get ${$e}`,"data-track":"fab_click",children:[b==="floating"&&tn("span",{className:"gou-tooltip",children:["Choose how to get ",$e]}),Ee("span",{className:"gou-fab-icon-frame",children:Ee("img",{className:"gou-fab-icon",src:qt,alt:""})}),tn("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[tn("span",{children:["Get ",$e]}),Tt!==null&&Ee("span",{className:"gou-fab-apr",children:Zi(Tt)})]})]}),W&&tn("div",{className:"gou-fab gou-fab-status",style:b==="floating"?m:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":W.phase,role:"status","aria-live":"polite","aria-label":W.phase==="pending"?`${W.label} transaction in progress`:W.label,children:[tn("span",{className:"gou-fab-icon-frame",children:[Ee("img",{className:"gou-fab-icon",src:qt,alt:""}),W.phase==="pending"&&Ee("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),Ee("span",{className:"gou-fab-label",children:W.phase==="pending"?tn(s5,{children:[W.label,tn("span",{className:"gou-fab-dots","aria-hidden":"true",children:[Ee("span",{children:"."}),Ee("span",{children:"."}),Ee("span",{children:"."})]})]}):W.label})]}),Ee(Tr,{ariaTitle:`Get ${$e}`,className:`gou-shell gou-chooser ${k??""}`,children:tn("div",{className:"gou-chooser-body",children:[Ee("button",{type:"button",className:"gou-close",onClick:()=>A(!1),"aria-label":"Close",children:Ee(il,{})}),tn("header",{className:"gou-intro",children:[tn("h2",{children:["Get ",$e]}),B&&tn("a",{className:"gou-intro-link",href:xe,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[Ee(Fu,{size:16,className:"gou-intro-link-icon"}),Ee("span",{children:"What is ONEUSD?"})]})]}),Ee("ul",{className:"gou-actions",children:vt.map(({id:P,label:ke,eta:We,Icon:X})=>{let we=P==="swap"?`Swap the ${Ue.fromTokens[0]?.symbol??"ONE"} you already hold`:P==="bridge"?`Bridge USDT to ${$e}`:P==="stake"?`Deposit ${$e} to receive ${Po}`:"Deposit from any chain or exchange",z=P==="swap"?n?.swap.feeDelegated:P==="bridge"?n?.bridge.feeDelegated:!1,Re=ti(P,ge),V=P==="stake"&&xt,Ce=P==="stake"&&Re&&!V&&!Ht,Ln=Re&&!Ce&&!V;return Ee("li",{children:tn("button",{type:"button",className:"gou-action",onClick:()=>Xe(P),disabled:!Ln,"data-supported":Ln?"true":"false","data-track":"action_select","data-track-id":P,children:[Ee("span",{className:"gou-action-icon",children:Ee(X,{})}),tn("span",{className:"gou-action-copy",children:[tn("span",{className:"gou-action-title",children:[Ee("span",{children:ke}),z&&Ln&&Ee("span",{className:"gou-badge",children:"Fee Delegated"}),!Re&&Ee("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),Ce&&Ee("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),Ee("span",{className:"gou-action-description",children:Re?Ce?"Staking is not available in this environment yet":We?`${we} \xB7 ${We}`:we:"Update the app to use this option"})]}),Ee(al,{className:"gou-action-chevron"})]})},P)})})]})})]}),Ee(Sr,{theme:g,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:!!bt,onOpenChange:P=>{P||ne(null)},children:Ee(Tr,{ariaTitle:`${bt==="bridge"?"Bridge":"Swap"} to ${$e}`,className:`gou-shell gou-execution ${k??""}`,children:Yt?Ee(ea,{...ue,env:s,variant:"embedded",title:bt==="bridge"?"Bridge":"Swap",feeDelegated:n?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>kt(bt??"swap"),tokens:Ve.fromTokens,initialFromToken:Ve.fromTokens[0],initialToToken:Ve.targetToken,getToTokens:Kt,onClose:()=>ne(null),onBackToWallet:()=>{ne(null),A(!0)},onSubmitted:P=>{Cn(P,bt??"swap")},onSuccess:P=>{dl(Zt,P)},onFailed:P=>{dl(j,P),Qe({name:"failure",action:bt??"swap",message:P.message})}},`${bt}:${Ve.fromTokens.map(P=>`${P.chainId}:${P.address}`).join(",")}`):Ee(i0,{loading:r||!n})})}),Ee(Sr,{theme:g,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:F==="stake",onOpenChange:P=>{P||ne(null)},children:Ee(Tr,{ariaTitle:`Stake ${$e}`,className:`gou-shell gou-chooser ${k??""}`,children:F==="stake"&&ut&&St&&De?Ee(o0,{env:de,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:De,vaultAddress:St,ports:ut,locked:!!W,onRequestConnect:()=>kt("stake"),onBack:()=>{ne(null),A(!0)},onClose:()=>ne(null),onSubmitted:Rn,onFailed:P=>Qe({name:"failure",action:"stake",message:P})}):Ee(i0,{loading:r||!n})})}),ee&&Ee(Ja,{...et,environment:et.environment??s,theme:et.theme??g,mobileBreakpoint:et.mobileBreakpoint??y,drawerDirection:et.drawerDirection??w,dialogWidth:et.dialogWidth??f,drawerMaxWidth:et.drawerMaxWidth??c,drawerMinWidth:et.drawerMinWidth??h,walletAddress:e,open:F==="transfer",onOpenChange:P=>{P||ne(null)},requireWalletConnection:!0,showRecovery:et.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>kt("transfer"),onDeposited:P=>{be?.(P),Qe({name:"success",action:"transfer",txHash:P})},onError:P=>{Ie?.(P),Qe({name:"failure",action:"transfer",message:P.message})},children:Ee(Ja.Content,{})})]})})}import*as Er from"react";import*as h0 from"@radix-ui/react-dialog";import{Drawer as b5}from"vaul";import{createContext as l5,useContext as d5}from"react";var cl=l5(null);function ri(){let e=d5(cl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as l0,useEffect as c5,useCallback as p5}from"react";function pl(){let[e,t]=l0([]),[n,r]=l0(!0);c5(()=>{if(typeof window>"u"){r(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>r(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=p5(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:n}}import*as d0 from"@radix-ui/react-dialog";import{Drawer as u5}from"vaul";import{jsx as wc}from"react/jsx-runtime";function c0({asChild:e,children:t}){let{isMobile:n}=ri(),r=n?u5.Trigger:d0.Trigger;return wc(ve,{feature:"wallet_connect",children:wc(r,{asChild:e??t!=null,children:t??wc("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as f5}from"react";import{WALLET_LABELS as m5}from"@nexus-cross/crossx-design-system";import*as Ir from"@radix-ui/react-dialog";import{Drawer as ul}from"vaul";import{Fragment as m0,jsx as Ae,jsxs as mn}from"react/jsx-runtime";function p0(e,t){Ye("connect","wallet_selected",{tags:{item_id:e}}),Iu(e);let n=t?.();n instanceof Promise&&n.then(()=>Ye("connect","connected"),r=>Ye("connect","connected",{status:"failure",reason:Dn(r)}))}function g5({wallet:e,detected:t,onConnect:n}){let r=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}n()},o=e.icon,a=e.featured===!0;return mn("button",{type:"button",className:ye("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:r,children:[mn("div",{className:"wcm-wallet-item-left",children:[Ae("div",{className:"wcm-wallet-icon",children:Ae(o,{})}),mn("div",{className:"wcm-wallet-name-row",children:[Ae("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&Ae("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?Ae("span",{className:"wcm-installed-label",children:"Installed"}):Ae("span",{className:"wcm-install-btn",children:"Install"}))]})}function h5({social:e,onSignIn:t}){let n=e.icon,r=`Sign in with ${e.name}`;return mn("button",{type:"button",className:"wcm-social-item","data-provider":e.id,"data-track":"social_provider_click","data-track-id":e.id,onClick:t,"aria-label":r,children:[Ae("span",{className:"wcm-social-icon",children:Ae(n,{})}),Ae("span",{className:"wcm-social-name",children:r})]})}function u0(){let{wallets:e,activeWalletIds:t,socialProviders:n,activeSocialIds:r,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=ri(),d=t.filter(u=>{let g=ld(u).visibility;return!g||g==="always"?!0:g==="desktop-only"?!l:g==="mobile-only"?l:!0}),p=r.length>0,b=d.length>0;return mn(m0,{children:[mn("div",{className:"wcm-header",children:[mn("div",{className:"wcm-header-text",children:[Ae("h2",{className:"wcm-title",children:m5.default}),!l&&Ae("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),Ae("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:Ae(Nu,{})})]}),mn("div",{className:"wcm-body",children:[p&&mn(m0,{children:[!l&&mn("div",{className:"wcm-section-header",children:[Ae("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),Ae("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),Ae("div",{className:"wcm-social-grid",children:r.map(u=>{let g=Su(u);return Ae(h5,{social:g,onSignIn:()=>{p0(u,n[u]),s()}},u)})}),b&&mn("div",{className:"wcm-separator",children:[Ae("div",{className:"wcm-separator-line"}),Ae("span",{className:"wcm-separator-text",children:"Other Wallets"}),Ae("div",{className:"wcm-separator-line"})]})]}),b&&Ae("div",{className:"wcm-wallet-list",children:d.map(u=>{let g=ld(u),y=g.rdns?i(g.rdns):!1;return Ae(g5,{wallet:g,detected:y,onConnect:()=>{p0(u,e[u]),s()}},u)})}),mn("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",Ae(f0,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",Ae(f0,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function f0({href:e,track:t,children:n}){return e?Ae("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:n}):Ae("span",{className:"wcm-terms-link",children:n})}function g0({className:e}){let{isMobile:t,theme:n,portalStyle:r,open:o}=ri();return f5(()=>{o&&Ye("connect","opened")},[o]),t?Ae(ve,{feature:"wallet_connect",children:mn(ul.Portal,{children:[Ae(ul.Overlay,{className:"wcm-overlay"}),mn(ul.Content,{className:ye("wcm-drawer-content",e),"data-theme":n,style:r,children:[Ae(ul.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ae("div",{className:"wcm-drawer-handle"}),Ae("div",{className:"wcm-drawer-body",children:Ae(u0,{})})]})]})}):Ae(ve,{feature:"wallet_connect",children:mn(Ir.Portal,{children:[Ae(Ir.Overlay,{className:"wcm-overlay"}),mn(Ir.Content,{className:ye("wcm-dialog-content",e),"data-theme":n,style:r,children:[Ae(Ir.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ae(Ir.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),Ae("div",{className:"wcm-dialog-body",children:Ae(u0,{})})]})]})})}ce(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #fff5ee);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #f0640d);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:#ff8438;border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:#fff;white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
19
|
+
`);import{jsx as Hd}from"react/jsx-runtime";function c2({mobileBreakpoint:e=768,drawerDirection:t,modal:n,open:r,onOpenChange:o,children:a,...i}){let s=Ho(`(max-width: ${e}px)`),l=t??(i.showBalance?"right":"bottom"),d=l==="left"||l==="right",p=r!==void 0,[g,u]=Wa.useState(!1),m=p?r:g,y=Wa.useCallback(c=>{p||u(c),o?.(c)},[p,o]),w=Wa.useCallback(()=>y(!1),[y]);or(m,w);let f=Ki(i,{presentation:"overlay",open:m,isMobile:s,drawerDirection:l,modal:n??!1,close:w});return Hd(xa.Provider,{value:f,children:s?Hd(d2.Root,{direction:l,open:m,onOpenChange:y,handleOnly:d,noBodyStyles:!0,repositionInputs:!1,children:a},"drawer"):Hd(Ig.Root,{open:m,onOpenChange:y,children:a},"popover")})}var oa=Object.assign(c2,{Trigger:iu,Content:Ps,Nav:Ng,Footer:Tg});import*as Ag from"react";import{jsx as Eg}from"react/jsx-runtime";function Mg({className:e,children:t,...n}){let r=Ki({...n,onDisconnect:void 0,onBuy:void 0,onBuyDisabledMessage:void 0,showBridge:!1,onBridgeDisabledMessage:void 0,showOnePop:!1,showPortfolio:!1,showNft:n.showNft??!0},{presentation:"page",open:!0,isMobile:!0,drawerDirection:"bottom",modal:!1});or(r.view!=="wallet",r.close);let{setView:o}=r,a=Ag.useCallback(()=>o("nft-collection"),[o]);return or(r.view==="nft-detail",a),Eg(xa.Provider,{value:r,children:Eg(Ps,{className:e,children:t})})}import*as He from"react";import*as Js from"react";import{createContext as p2,useContext as u2}from"react";var _d=p2(null);function Ga(){let e=u2(_d);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as fh from"react";import{createContext as f2,useContext as m2}from"react";var Os=f2(null);function fr(){let e=m2(Os);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as g2,useContext as h2,useLayoutEffect as b2,useState as w2}from"react";function Lg(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(n){if(n!==e){e=n;for(let r of[...t])r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}var Vd=g2(null);function y2(){let e=h2(Vd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function Dg(){let e=y2(),[t,n]=w2(e.getSnapshot);return b2(()=>(n(e.getSnapshot()),e.subscribe(()=>n(e.getSnapshot()))),[e]),t}ce(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #a392ff);--rd-accent-contrast: var(--ds-accent-primary-on, #000000);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
|
|
20
|
+
`);import{jsx as oo,jsxs as mr}from"react/jsx-runtime";function Pg({minNotice:e,arrivalStatus:t}){let n=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,r=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return n?`${n} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return n?`${n} at the processing address. Checking the minimum.`:"Deposit detected. Checking the minimum.";case"funded":return`${e.min} ${e.symbol} received at the processing address. Preparing delivery.`;case"processing":return"Minimum reached. Bridging and delivering to ONEchain.";case"completed":return"Transfer completed. Funds were delivered to ONEchain.";case"failed":return`Transfer needs attention${t.backendStatus?` (${t.backendStatus})`:""}.`;case"unavailable":return e.remaining===void 0?"Live status is temporarily unavailable. Retrying automatically.":void 0;default:return e.remaining===void 0?"Waiting for your deposit.":void 0}})();return r?mr("div",{className:`rd-checklist-status rd-checklist-status-${t.phase}`,"data-rd-deposit-status":"","data-phase":t.phase,role:"status","aria-live":"polite","aria-atomic":"true",children:[oo("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),oo("span",{children:r})]},`live:${t.phase}:${r}`):e.remaining!==void 0?mr("div",{className:"rd-checklist-status rd-checklist-status-waiting rd-min-notice-pending","data-rd-min-notice-pending":"",role:"status","aria-live":"polite","aria-atomic":"true",children:[oo("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),mr("span",{children:["Waiting for"," ",mr("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function Og({minNotice:e,onlySend:t,showWalletCreditNote:n=!1}){return mr("div",{className:"rd-checklist","data-rd-checklist":"",children:[mr("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[oo("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),mr("span",{children:[mr("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",mr("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),mr("div",{className:"rd-checklist-row",children:[oo("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),oo("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),n&&mr("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[oo("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),oo("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as M2,useId as L2,useState as Fg}from"react";var Ha="0x0000000000000000000000000000000000000000",x2=/^0x[0-9a-fA-F]{40}$/;function ct(e){return x2.test(e)}function $t(e,t){let n=e<0n,o=(n?-e:e).toString().padStart(t+1,"0"),a=t===0?o:o.slice(0,-t),i=t===0?"":o.slice(-t).replace(/0+$/,""),s=i?`${a}.${i}`:a;return n?`-${s}`:s}function Bs(e,t){let n=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!n)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,r,o,a=""]=n;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return r==="-"?-i:i}import{useId as Ao}from"react";var Qd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNzQwMDBfMzg1OTApIi8+CjxwYXRoIGQ9Ik0xODguNjIzIDU0MC4wMDFINTM5Ljg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RRuoOVnCsGHJM3ZKbPGDgJUuSGDa8qW09Sft5Nlsz0gQO4CFLEeb1ecgg11vySmT7YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function Bg(e){switch(e.toUpperCase()){case"ONEUSD":return Qd;case"PONEUSD":return v2;case"USDT":return k2;case"USDC":return C2;default:return}}import{jsx as $,jsxs as un}from"react/jsx-runtime";function zg(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function R2({size:e,bg:t,fg:n="#ffffff",children:r}){return un("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[$("circle",{cx:"12",cy:"12",r:"12",fill:t}),$("g",{fill:n,stroke:n,children:r})]})}function qd({size:e,bg:t,fg:n="#ffffff",text:r}){return $(R2,{size:e,bg:t,fg:n,children:$("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:n,children:r})})}function aa({size:e,viewBox:t="0 0 24 24",children:n}){return $("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:n})}function N2({size:e}){let t=Ao();return un(aa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#000",d:"M24 0H0v24h24z"}),$("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),$("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),$("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),$("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),$("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),$("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.048-5-2.9L12 4l5 8.148zm-4.67-3.136 4.588-7.475v5.435zm-.068.204 4.656-2.068v4.768zm4.816-2.068v4.768l4.653-2.7zm0-.176 4.588 2.04-4.588-7.475z"}),$("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.917-5-2.84L12 20l5-6.924zm-4.44-2.341 4.36 2.48v3.56zm4.519 2.48v3.56l4.36-6.04z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function S2({size:e}){let t=Ao();return un(aa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"M7.635 6.449 12 4l4.364 2.449-1.6.907L12 5.809 9.24 7.356zm8.73 3.093-1.6-.906L12 10.182 9.24 8.636l-1.605.906v1.81l2.756 1.546v3.089l1.609.906 1.604-.906v-3.09l2.76-1.546zm0 4.903V12.63l-1.6.907v1.809zm1.141.64-2.76 1.542v1.813l4.365-2.453v-4.898l-1.605.902zm-1.604-7.09 1.6.907v1.81l1.609-.903V7.996l-1.605-.907L15.902 8zm-5.511 9.29v1.808L12 20l1.604-.907V17.29l-1.604.9-1.605-.907zM7.635 14.44l1.6.907v-1.81l-1.6-.906v1.813zm2.756-6.444L12 8.902l1.604-.906L12 7.089 10.395 8zm-3.898.906 1.605-.906-1.6-.907L4.888 8v1.813l1.605.903zm0 3.09-1.604-.903v4.898l4.364 2.453v-1.818L6.498 15.08v-3.093z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function T2({size:e}){let t=Ao();return un(aa,{size:e,viewBox:"0 0 111 111",children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#fff",d:"M0 0h111v111H0z"}),$("path",{fill:"#0052FF",d:"M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z"})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function I2({size:e}){let t=Ao();return un(aa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:"#213147",d:"M24 0H0v24h24z"}),un("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[$("path",{fill:"#fff",d:"m13.203 13.216-.787 2.124a.27.27 0 0 0 0 .183l1.354 3.655 1.565-.89-1.879-5.072c-.042-.117-.21-.117-.253 0m1.577-3.573a.135.135 0 0 0-.253 0l-.787 2.124a.27.27 0 0 0 0 .183l2.217 5.985 1.565-.89z"}),$("path",{fill:"#fff",d:"M11.999 4.991a.24.24 0 0 1 .111.03l5.969 3.393a.22.22 0 0 1 .112.19v6.787a.22.22 0 0 1-.112.19l-5.969 3.395a.2.2 0 0 1-.111.029.24.24 0 0 1-.113-.03l-5.968-3.39a.22.22 0 0 1-.112-.19v-6.79a.22.22 0 0 1 .112-.19l5.969-3.393a.23.23 0 0 1 .111-.03m0-.991c-.213 0-.426.054-.616.163L5.416 7.556a1.21 1.21 0 0 0-.616 1.05v6.787c0 .433.234.834.616 1.05l5.968 3.394a1.25 1.25 0 0 0 1.232 0l5.968-3.394a1.21 1.21 0 0 0 .616-1.05V8.606a1.21 1.21 0 0 0-.616-1.05l-5.97-3.393A1.24 1.24 0 0 0 11.998 4"}),$("path",{fill:"#fff",d:"m8.052 17.943.55-1.482 1.105.905-1.034.93zm3.445-9.823H9.984a.27.27 0 0 0-.254.175l-3.243 8.757 1.565.89L11.623 8.3a.132.132 0 0 0-.127-.179"}),$("path",{fill:"#fff",d:"M14.144 8.12h-1.513a.27.27 0 0 0-.253.175l-3.704 10 1.565.89 4.032-10.886a.133.133 0 0 0-.127-.179"})]})]}),$("defs",{children:$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function E2({size:e}){let t=Ao(),n=Ao();return un(aa,{size:e,children:[un("g",{clipPath:`url(#${t})`,children:[$("path",{fill:`url(#${n})`,d:"M24 0H0v24h24z"}),$("path",{fill:"#fff",d:"m15.88 14.86 3.794-2.165a.64.64 0 0 0 .326-.558v-4.33a.64.64 0 0 0-.326-.556L15.88 5.086a.66.66 0 0 0-.65 0L11.432 7.25a.64.64 0 0 0-.325.557v7.737l-2.662 1.517-2.661-1.517v-3.036l2.661-1.517 1.755 1.001V9.958l-1.43-.816a.66.66 0 0 0-.65 0l-3.796 2.165a.64.64 0 0 0-.325.557v4.33c0 .229.124.442.325.557l3.796 2.165c.2.114.45.114.65 0l3.796-2.165a.64.64 0 0 0 .325-.557V8.455l.048-.026 2.613-1.49 2.661 1.516v3.036l-2.661 1.517-1.753-.999v2.037l1.427.814a.66.66 0 0 0 .651 0z"})]}),un("defs",{children:[un("linearGradient",{id:n,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[$("stop",{stopColor:"#A726C1"}),$("stop",{offset:".88",stopColor:"#803BDF"}),$("stop",{offset:"1",stopColor:"#7B3FE4"})]}),$("clipPath",{id:t,children:$("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function A2({size:e}){let t=Ao();return un(aa,{size:e,children:[$("path",{fill:"#000",d:"M24 0H0v24h24z"}),$("g",{transform:"translate(5 5.9) scale(0.1386)",children:$("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),$("defs",{children:un("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[$("stop",{offset:"0.08",stopColor:"#9945FF"}),$("stop",{offset:"0.3",stopColor:"#8752F3"}),$("stop",{offset:"0.5",stopColor:"#5497D5"}),$("stop",{offset:"0.6",stopColor:"#43B4CA"}),$("stop",{offset:"0.72",stopColor:"#28E0B9"}),$("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function zs({chainId:e,chainName:t,size:n=20}){switch(e){case 1:return $(N2,{size:n});case 56:return $(S2,{size:n});case 8453:return $(T2,{size:n});case 42161:return $(I2,{size:n});case 137:return $(E2,{size:n});case 792703809:return $(A2,{size:n});case 612055:return $(qd,{size:n,bg:"#0b1f3a",text:"CR"});default:return $(qd,{size:n,bg:"#676b7a",text:zg(t??String(e))})}}function Mo({symbol:e,logoUrl:t,size:n=20}){let r=t&&t.trim().length>0?t.trim():Bg(e);return r?$("img",{src:r,alt:"","aria-hidden":"true",width:n,height:n,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):$(qd,{size:n,bg:"#676b7a",text:zg(e)})}import{QRCodeSVG as D2}from"qrcode.react";import{Fragment as Fs,jsx as ht,jsxs as Qt}from"react/jsx-runtime";function Us(){return Qt("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[ht("span",{className:"rd-skeleton rd-skeleton-qr"}),ht("span",{className:"rd-skeleton rd-skeleton-address"})]})}function P2(e){let{depositAddress:t,originChainId:n,originCurrency:r,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${n}?value=${o.toString()}`:`ethereum:${t}@${n}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${r}@${n}/transfer?${i.toString()}`}function O2(e){let{depositAddress:t,splMint:n,humanAmount:r}=e,o=new URLSearchParams;return r&&o.set("amount",r),o.set("spl-token",n),`solana:${t}?${o.toString()}`}function Ug({depositAddress:e,originChainId:t,originChainName:n,originCurrency:r,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:g=!0}){let[u,m]=Fg(!1),[y,w]=Fg("address"),f=L2();M2(()=>{w("address")},[e]);let c=r.toLowerCase()===Ha,h=s==="svm";async function b(){try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),1500)}catch{}}let x;if(o)try{let M=BigInt(o);M>0n&&(x=M)}catch{}let k=x!==void 0,R;if(k)try{R=$t(x,i)}catch{R=o}let S=h?O2({depositAddress:e,splMint:r,humanAmount:R??""}):P2({depositAddress:e,originChainId:t,originCurrency:r,amountWei:x,isNative:c}),{isSubmitting:C,isConfirming:N,isConfirmed:E,needsSwitch:A,txHash:B,reverted:L,error:U}=l;return Qt("section",{className:"rd-stack",children:[Qt("div",{className:"rd-deposit-head","data-compact-view":y,children:[Qt("div",{className:"rd-deposit-qr-pane",children:[Qt("div",{className:"rd-deposit-qr",children:[ht(D2,{value:S,size:144,level:"H"}),ht("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:ht(zs,{chainId:t,chainName:n,size:28})})]}),ht("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>w("address"),children:Qt("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[ht("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),ht("path",{d:"M16 8V6.25A2.25 2.25 0 0 0 13.75 4h-7.5A2.25 2.25 0 0 0 4 6.25v7.5A2.25 2.25 0 0 0 6.25 16H8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})})]}),Qt("div",{className:"rd-deposit-address",children:[ht("span",{className:"rd-deposit-address-label",children:Qt("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",ht("span",{id:f,className:"rd-address-tooltip",role:"tooltip",children:"This is a reusable, open deposit address. A wrong token or wrong chain will not be processed automatically, and recovery has weaker guarantees than a one-time order address and may require a manual request."})]})}),ht("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>w("qr"),children:ht("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:ht("path",{d:"M7.913 10.833c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25v-4.163c0-.69.56-1.25 1.25-1.25h4.163Zm6.255 6.663h-1.665V15.83h1.665v1.666Zm3.332 0h-1.666V15.83H17.5v1.666Zm-13.334-5v3.334h3.331v-3.333H4.166Zm8.337 3.334h-1.666v-1.666h1.666v1.666Zm3.331 0h-1.666v-1.666h1.666v1.666Zm-1.666-1.666h-1.665v-1.667h1.665v1.667Zm3.332 0h-1.666v-1.667H17.5v1.667Zm-4.997-1.667h-1.666v-1.664h1.666v1.664Zm3.331 0h-1.666v-1.664h1.666v1.664ZM7.913 2.504c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163Zm8.329 0c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25h-4.163c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163ZM4.166 4.17V7.5h3.331V4.17H4.166Zm8.329 0V7.5h3.331V4.17h-3.331Z",fill:"currentColor"})})}),ht("span",{className:"rd-address-full",title:e,children:e}),Qt("button",{type:"button",className:"rd-address-copy",onClick:b,"aria-label":`Copy deposit address ${e}`,children:[u?ht("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:ht("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Qt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[ht("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),ht("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),ht("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!h&&p&&Qt(Fs,{children:[ht("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:C||N||E&&!L,children:E&&!L?"Deposit sent":N?"Confirming...":C?A?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${A?` (switch to ${n})`:""}`}),U&&ht("div",{className:"rd-callout rd-callout-danger",children:U}),B&&Qt("p",{className:"rd-card-hint",children:["Tx: ",ht("span",{style:{fontFamily:"monospace"},children:B})]}),E&&L&&ht("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!L&&ht("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),h&&Qt("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",k?Qt(Fs,{children:["exactly"," ",Qt("strong",{children:[R," ",a]})]}):Qt(Fs,{children:["any amount of ",ht("strong",{children:a})]}),"."]}),(k||!h&&!p&&g)&&Qt("p",{className:"rd-card-hint",children:[k&&Qt(Fs,{children:["Send exactly"," ",Qt("strong",{children:[R," ",a]})," ","on ",n," to this address."]}),!h&&!p&&g&&!k&&"Enter an amount to deposit in one click."]})]})}import{useEffect as B2,useId as z2,useRef as jg,useState as Yd}from"react";import*as ao from"@radix-ui/react-popover";import{jsx as Sr,jsxs as _a}from"react/jsx-runtime";function Va({value:e,options:t,onChange:n,disabled:r,ariaLabel:o,id:a}){let i=z2(),s=a??i,l=`${s}-listbox`,[d,p]=Yd(!1),g=t.findIndex(E=>E.value===e),[u,m]=Yd(g>=0?g:0),y=jg(null),w=jg([]),f=!!r||t.length===0,c=g>=0?t[g]:void 0;B2(()=>{d&&w.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[h,b]=Yd(null);function x(){f||(b(y.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),m(g>=0?g:0),p(!0))}function k(E){p(!1),E&&y.current?.focus()}function R(E){let A=t[E];A&&(n(A.value),k(!0))}function S(){f||(d?k(!1):x())}function C(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?m(A=>Math.min(A+1,t.length-1)):x();break;case"ArrowUp":E.preventDefault(),d?m(A=>Math.max(A-1,0)):x();break;case"Enter":case" ":E.preventDefault(),d?R(u):x();break;case"Escape":d&&(E.preventDefault(),k(!0));break;case"Tab":d&&p(!1);break;default:break}}let N=d&&t[u]?`${s}-option-${u}`:void 0;return Sr(ao.Root,{open:d,onOpenChange:E=>E?x():k(!1),children:_a("div",{className:"rd-dropdown",children:[Sr(ao.Trigger,{asChild:!0,children:_a("button",{type:"button",id:s,ref:y,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":N,"aria-label":o,disabled:f,onClick:S,onKeyDown:C,children:[_a("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,_a("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&Sr("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),Sr("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:Sr(Gn,{size:16})})]})}),d&&Sr(ao.Portal,{children:Sr(ao.Content,{className:"rd-dropdown-popover","data-theme":h??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:Sr("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,A)=>{let B=E.value===e,L=A===u;return _a("li",{id:`${s}-option-${A}`,role:"option","aria-selected":B,ref:U=>{w.current[A]=U},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",B?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>m(A),onClick:U=>{U.preventDefault(),R(A)},children:[E.icon,Sr("span",{className:"rd-dropdown-option-label",children:E.label}),B&&Sr("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}import{Fragment as Kd,jsx as io,jsxs as Zn}from"react/jsx-runtime";function F2(e,t){if(!e)return"--";try{return $t(BigInt(e),t)}catch{return"--"}}function Wg({quote:e,isLoading:t,error:n,humanAmount:r,originSymbol:o,destination:a}){return Zn("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Zn("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[io("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),io("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),io("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&n&&Zn("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",n.message]}),!t&&!n&&e&&o&&Zn(Kd,{children:[Zn("div",{className:"rd-quote-strip",children:[Zn("span",{className:"rd-quote-strip-side",children:[Zn("b",{children:[r," ",o]}),io("small",{children:"You send"})]}),io("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Zn("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Zn("b",{children:["~",F2(e.expectedCrossd,a.decimals)," ",a.symbol]}),io("small",{children:"You receive"})]})]}),e.belowMin&&io("div",{className:"rd-callout rd-callout-warning",children:"This amount is below the minimum the bridge will accept. Increase the amount to continue."}),(e.assumesParity||e.feeUsd)&&Zn("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Zn(Kd,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Zn(Kd,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!n&&!e&&io("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as _g}from"react";var Gg={1:{base:"https://etherscan.io",name:"Etherscan",kind:"evm"},56:{base:"https://bscscan.com",name:"BscScan",kind:"evm"},137:{base:"https://polygonscan.com",name:"PolygonScan",kind:"evm"},8453:{base:"https://basescan.org",name:"BaseScan",kind:"evm"},42161:{base:"https://arbiscan.io",name:"Arbiscan",kind:"evm"},612055:{base:"https://scan.crosstoken.io",name:"ONEchain Scan",kind:"evm"},792703809:{base:"https://solscan.io",name:"Solscan",kind:"svm"}};function Hg(e,t){let n=Gg[e];if(!(!n||!t))return{url:`${n.base}/token/${t}`,name:n.name}}var U2={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function ia(e){return U2[e]??`Chain ${e}`}function js(e,t){let n=Gg[e];if(!(!n||!t))return{url:`${n.base}/tx/${t}`,name:n.name}}import{jsx as Xn,jsxs as so}from"react/jsx-runtime";function j2(e){let t=new Map;for(let n of e.origins)t.has(n.chainId)||t.set(n.chainId,n.chainName);return Array.from(t,([n,r])=>({chainId:n,chainName:r}))}function Vg(e,t){return t===void 0?[]:e.origins.filter(n=>n.chainId===t)}function W2(e,t){let n=$t(e,t),r=n.indexOf(".");return r===-1?n:`${n.slice(0,r)}.${n.slice(r+1,r+1+4)}`.replace(/\.?0+$/,"")||n.slice(0,r)}function Qg({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let g=_g(()=>j2(e),[e]),u=_g(()=>Vg(e,t?.chainId),[e,t?.chainId]);function m(c){let h=Number(c),b=Vg(e,h)[0];b&&n(b)}function y(c){let h=u.find(b=>b.token.address.toLowerCase()===c.toLowerCase());h&&n(h)}let w=i?`${W2(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${w?` (${w})`:""}`:void 0;return so("section",{className:"rd-stack","data-rd-source-form":"",children:[so("div",{className:"rd-field",children:[so("div",{className:"rd-field-label-row",children:[Xn("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=Hg(t.chainId,t.token.address);return c?so("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),so("div",{className:"rd-field-row",children:[Xn(Va,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:m,disabled:p,options:g.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:Xn(zs,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),Xn(Va,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:p||u.length===0,options:u.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:Xn(Mo,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&so("label",{className:"rd-field",children:[Xn("span",{className:"rd-field-label",children:"Amount (optional)"}),so("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[Xn("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:r,onChange:c=>{let h=c.target.value;if(h===""){o(h);return}h.startsWith(".")&&(h=`0${h}`),/^\d*\.?\d{0,4}$/.test(h)&&(h=h.replace(/^0+(?=\d)/,""),!((h.split(".")[0]??"").length>12)&&o(h))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&Xn("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&Xn("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(w||s)&&so("span",{className:"rd-amount-meta",children:[Xn("span",{}),Xn("span",{children:s?"Balance: \u2026":w?`Balance: ${w}`:""})]}),f&&Xn("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}import{Fragment as qg,jsx as Ge,jsxs as kn}from"react/jsx-runtime";function Yg({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:g,recipientValid:u,balance:m,balanceLoading:y,insufficientBalance:w,targetOptions:f,selectedTarget:c,onChangeTarget:h,showTargetSelector:b,quote:x,quoteLoading:k,quoteError:R,depositAddress:S,depositAddressLoading:C,depositAddressError:N,arrivalStatus:E,amountSmallestUnits:A,depositState:B,onDeposit:L,canDeposit:U,oneClickEnabled:M,locked:F,onRequestConnect:ne}){let ee=f.length>1&&b,{phase:X,isSubmitting:W,isConfirming:Y,isConfirmed:O,needsSwitch:G,reverted:te,error:_}=B,ae=c?.symbol??e.destination.symbol;return kn(qg,{children:[i&&Ge(Pg,{minNotice:i,arrivalStatus:E}),F?kn("section",{className:"rd-locked-card","data-rd-locked":"",children:[Ge("span",{className:"rd-locked-glyph","aria-hidden":"true",children:kn("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Ge("path",{d:"M4 7.5A2.5 2.5 0 0 1 6.5 5h10A2.5 2.5 0 0 1 19 7.5v9a2.5 2.5 0 0 1-2.5 2.5h-10A2.5 2.5 0 0 1 4 16.5v-9Z",stroke:"currentColor",strokeWidth:"1.7"}),Ge("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),Ge("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),Ge("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),Ge("h3",{className:"rd-locked-title",children:"Connect your wallet"}),Ge("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),g&&Ge("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),ne&&kn("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:ne,children:[kn("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[Ge("path",{d:"M5 6.5h11.5A2.5 2.5 0 0 1 19 9v8.5H7A3 3 0 0 1 4 14.5v-8A2.5 2.5 0 0 1 6.5 4H16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),Ge("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):S?Ge(Ug,{depositAddress:S,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:A,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:B,onDeposit:L,canDeposit:U,oneClickEnabled:M}):C?kn(qg,{children:[Ge(Us,{}),M&&A&&Ge("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),Ge("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):N?kn("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",N.message]}):null,Ge(Qg,{catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,balance:m,balanceLoading:y,insufficientBalance:w,onMax:l}),kn("div",{className:"rd-field","data-rd-delivery":"",children:[Ge("span",{className:"rd-field-label",children:"Deliver as"}),ee?Ge(Va,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:h,options:f.map(be=>({value:be.symbol,label:be.symbol,subLabel:"on ONEchain",icon:Ge(Mo,{symbol:be.symbol,size:22})}))}):kn("div",{className:"rd-static-target",children:[Ge(Mo,{symbol:ae,size:22}),Ge("span",{children:ae})]}),g&&kn("label",{className:"rd-delivery-recipient",children:[Ge("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:be=>p(be.target.value),"data-vaul-no-drag":!0}),Ge("span",{className:"rd-card-hint",children:"Defaults to your connected wallet. It can differ from the address you deposit from, and is also used as the refund address if anything goes wrong."}),!u&&Ge("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&kn("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&Ge("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),r.trim()&&Ge(Wg,{quote:x,isLoading:k,error:R,humanAmount:r,originSymbol:t.token.symbol,destination:e.destination}),i&&Ge(Og,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!g&&u}),M&&X!=="idle"&&!U&&kn("div",{className:"rd-card",children:[W&&kn("p",{className:"rd-muted",children:[Ge("span",{className:"rd-spinner"})," ",G?"Switching network...":"Confirm in wallet..."]}),Y&&kn("p",{className:"rd-muted",children:[Ge("span",{className:"rd-spinner"})," Confirming..."]}),B.txHash&&kn("p",{className:"rd-card-hint",children:["Tx: ",Ge("span",{style:{fontFamily:"monospace"},children:B.txHash})]}),O&&te&&Ge("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),O&&!te&&Ge("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),_&&Ge("div",{className:"rd-callout rd-callout-danger",children:_})]})]})}import{useEffect as G2,useId as H2,useRef as Kg,useState as Zd}from"react";import{createPortal as _2}from"react-dom";import{Fragment as Jd,jsx as Te,jsxs as yt}from"react/jsx-runtime";function qa({requiresIdentity:e=!1}){return yt("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[Te("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:yt("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Te("path",{d:"M7 3.8h7l3 3V12M7 3.8A2.2 2.2 0 0 0 4.8 6v12A2.2 2.2 0 0 0 7 20.2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"}),Te("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),Te("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),Te("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),Te("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),Te("p",{className:"rd-history-empty-copy",children:e?"Connect a wallet or provide an address to see transfer history.":"Your deposits and their delivery progress will appear here."}),!e&&yt("span",{className:"rd-history-empty-live",children:[Te("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Qa=56;function Xg(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function V2(e){let t=e.trim().toUpperCase(),r={AWAITING_DEPOSIT:"Waiting for deposit",BSC_FUNDED:"Deposit confirmed",RELAY_PENDING:"Bridging",RELAY_SUBMITTED:"Bridging",BRIDGING:"Bridging",CROSS_PENDING:"Delivering",FINALIZING:"Delivering",EXECUTING:"Delivering",COMPLETED:"Completed",RELAY_REFUNDED:"Refunded",REFUNDED:"Refunded",EXPIRED:"Expired",FAILED:"Failed"}[t];if(r)return r;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function Q2(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Xg(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Ws(e,t){if(e){if(t===void 0)return e;try{return $t(BigInt(e),t)}catch{return e}}}function q2(e,t=4){let n=e.indexOf(".");if(n<0)return e;let r=e.slice(0,n+1+t).replace(/0+$/,"").replace(/\.$/,"");return r===""?"0":r}function Y2(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Zg(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Xd({amount:e,symbol:t,className:n}){let r=e?`${e}${t?` ${t}`:""}`:"",o=H2(),a=Kg(null),i=Kg(null),[s,l]=Zd(!1),[d,p]=Zd({top:-9999,left:-9999,visibility:"hidden"});return G2(()=>{if(!s)return;let g=()=>{let u=a.current,m=i.current;if(!u||!m)return;let y=u.getBoundingClientRect(),w=m.getBoundingClientRect(),f=12,c=8,h=Math.max(f,window.innerWidth-w.width-f),b=Math.min(Math.max(y.left+y.width/2-w.width/2,f),h),x=y.top-w.height-c,k=x>=f?x:y.bottom+c,R=Math.max(f,window.innerHeight-w.height-f),S=Math.min(Math.max(k,f),R),C=window.getComputedStyle(u);p({top:S,left:b,visibility:"visible",backgroundColor:C.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:C.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:C.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:C.getPropertyValue("--rd-surface").trim()||"#171923"})};return g(),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0)}},[s]),e?yt(Jd,{children:[yt("span",{ref:a,className:n,"aria-label":r,"aria-describedby":s?o:void 0,"data-full-value":r,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[q2(e),t?` ${t}`:""]}),s&&typeof document<"u"&&_2(Te("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:r}),document.body)]}):Te("span",{className:n,children:"-"})}function K2(e){let t=(e.deposits??[]).filter(r=>r.originChainId),n=new Set(t.map(r=>`${r.originChainId}:${(r.originCurrency??"").toLowerCase()}`));if(t.length>0){let r=t[0];return{chainId:r.originChainId,currency:r.originCurrency??"",routes:n.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Z2(e,t){if(!e)return;let n,r;try{n=BigInt(e),r=t.map(s=>BigInt(s.amount))}catch{return}let o=r.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=r.map(s=>n*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=n-i,a}function Gs({label:e,chainId:t,txHash:n,amount:r,shared:o,missingLabel:a="Pending"}){let i=n?js(t,n):void 0;return yt("div",{className:"rd-history-step",children:[Te("span",{className:`rd-history-step-dot${n?" rd-history-step-dot-done":""}`}),Te("span",{className:"rd-history-step-label",children:e}),Te("span",{className:"rd-history-step-chain",children:ia(t)}),r&&Te(Xd,{amount:r,className:"rd-history-step-amount"}),yt("span",{className:"rd-history-step-tx",children:[i?Te("a",{href:i.url,target:"_blank",rel:"noreferrer",title:n,"aria-label":`${e} transaction on ${ia(t)}`,children:Zg(n)}):n?Te("span",{title:n,children:Zg(n)}):Te("span",{className:"rd-muted",children:a}),o&&n&&Te("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function X2(e){let t=e.deposits??[],n=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Z2(n,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Qa,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:r,currency:o,routes:a}=K2(e);return[{key:e.orderId,order:e,chainId:r,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:n,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function Hs({orders:e,isLoading:t,error:n,catalog:r,showTitle:o=!0}){let[a,i]=Zd({}),s=l=>i(d=>({...d,[l]:!d[l]}));return yt("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&Te("div",{className:"rd-card-header",children:Te("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&yt("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[Te("span",{className:"rd-spinner"})," Loading orders..."]}),n&&yt("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",n.message]}),!t&&!n&&e.length===0&&Te(qa,{}),e.length>0&&Te("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(X2).map(l=>{let{order:d}=l,p=r?.origins.find(N=>N.chainId===l.chainId&&N.token.address.toLowerCase()===l.currency.toLowerCase()),g=(d.target?r?.targets.find(N=>N.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??r?.targets.find(N=>N.isDefault),u=g?.symbol??r?.destination.symbol??"",m=g?.decimals??r?.destination.decimals,y=r?.origins.find(N=>N.chainId===Qa),w=Ws(l.sentRaw,y?.token.decimals),f=y?.token.symbol??"USDT",c=Ws(l.receivedRaw,m),h=d.deposits??[],b=!!a[l.key],x=Y2(d.completedAt??d.createdAt),k=V2(d.status),S=d.status==="COMPLETED"||Xg(d.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return yt("div",{className:"rd-history-group",children:[yt("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":b,"aria-label":`Toggle transfer details: ${k}, ${x}`,children:[yt("span",{className:"rd-history-card-top",children:[Te("span",{className:"rd-history-asset",children:l.routes>1?yt(Jd,{children:["Multiple deposits ",yt("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):yt(Jd,{children:[p?.token.symbol??u," ",yt("span",{className:"rd-muted",children:["from ",ia(l.chainId)]})]})}),Te("span",{className:Q2(d.status),title:d.status,children:k})]}),yt("span",{className:"rd-history-card-amounts",children:[yt("span",{className:"rd-history-amount-block",children:[Te("span",{className:"rd-history-amount-label",children:"Processing address"}),Te(Xd,{amount:w,symbol:f,className:"rd-history-num"})]}),Te("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),yt("span",{className:"rd-history-amount-block",children:[Te("span",{className:"rd-history-amount-label",children:C}),Te(Xd,{amount:c,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),yt("span",{className:"rd-history-card-foot",children:[yt("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",x]}),Te("span",{className:"rd-history-chevron","aria-hidden":"true",children:Te(Gn,{size:16})})]})]}),b&&yt("div",{className:"rd-history-detail",children:[l.deposit?Te(Gs,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Qa,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Ws(l.deposit.amount,y?.token.decimals)}):h.length>0?h.map(N=>Te(Gs,{label:"Deposit confirmed",chainId:N.originChainId??Qa,txHash:N.originTxHash||N.txHash,amount:Ws(N.amount,y?.token.decimals)},`${N.txHash}-${N.blockNumber}`)):yt("div",{className:"rd-history-step",children:[Te("span",{className:"rd-history-step-dot"}),Te("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),Te("span",{className:"rd-muted",children:"Details unavailable"})]}),Te(Gs,{label:"Bridge",chainId:Qa,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:S}),Te(Gs,{label:"ONEchain delivery",chainId:r?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:S})]})]},l.key)})})]})}import{useEffect as dh,useState as nc}from"react";import{useCallback as Ka,useEffect as $2,useMemo as nh,useRef as rh,useState as Ya}from"react";var gr=class extends Error{constructor(t,n,r){super(n),this.name="RelayApiError",this.status=t,this.body=r}};function en(e){let t=e.baseUrl.replace(/\/+$/,"");async function n(r,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${r}`,{...o,headers:a})}catch(l){throw new gr(0,`network error calling ${r}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${r} failed with status ${i.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new gr(i.status,l,d)}try{return JSON.parse(s)}catch{throw new gr(i.status,`expected a JSON response from ${r} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return n("/v1/config").then(r=>({...r,targets:r.targets??[]}))},getQuote(r){return n("/v1/quote",{method:"POST",body:JSON.stringify(r)})},getDepositAddress(r,o){let a=new URLSearchParams({user:r.user,originChainId:String(r.originChainId),originCurrency:r.originCurrency});return o&&a.set("target",o),n(`/v1/deposit-address?${a.toString()}`)},getOrder(r){return n(`/v1/orders/${encodeURIComponent(r)}`)},listOrders(r){let o=new URLSearchParams({user:r});return n(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(r){return`${t}/v1/orders/stream?user=${encodeURIComponent(r)}`},getRecovery(r){let o=new URLSearchParams({user:r.user});return r.target&&o.set("target",r.target),n(`/v1/recovery?${o.toString()}`)}}}var Jg=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],$d=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],ec=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var sa=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function _s(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function J2(e,t){return t.some(n=>_s(n,e))}function Vs(e){if(!e||e.length===0)return sa;let t=new Set,n=[];for(let r of e){if(typeof r!="string"||!ct(r))continue;let o=r.toLowerCase();t.has(o)||(t.add(o),n.push(r))}return n.length>0?n:sa}async function $g(e,t,{factory:n,forwarder:r,recipient:o,version:a,trusted:i=sa}){if(!n||!r||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!J2(n,i))return{ok:!1,reason:`factory ${n} is not a recognized deposit-address factory -- refusing to sign against it`};if(!e)return{ok:!1,reason:"no chain connection available to verify the forwarder address"};let s;try{s=await e({chainId:t,address:n,abi:ec,functionName:"computeAddress",args:[o,BigInt(a)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return _s(s,r)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${r}, but factory ${n} derives ${s} for this account -- refusing to sign`}}async function eh(e,t,{forwarder:n,recipient:r,version:o,trusted:a=sa}){if(!n||!r||o===void 0)return{ok:!1,reason:"address verification is missing inputs (forwarder/recipient/version)"};if(!e)return{ok:!1,reason:"no BSC chain connection available to verify the deposit forwarder -- add BNB Smart Chain (chain 56) to your wagmi config"};let i=await Promise.all(a.map(async s=>{try{return await e({chainId:t,address:s,abi:ec,functionName:"computeAddress",args:[r,BigInt(o)]})}catch{return}}));return i.some(s=>_s(s,n))?{ok:!0}:i.every(s=>s===void 0)?{ok:!1,reason:"could not reach any deposit-address factory on BSC to verify the forwarder"}:{ok:!1,reason:`forwarder address mismatch: ${n} is not the address any known factory derives for this account -- refusing to deposit`}}function th(e,t){return _s(e,t)}var lo=56,tc={step:"idle"};function ek(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Za(e={}){let t=rh(e);t.current=e;let n=e.wallet,r=n?.walletChainId,o=e.recipient,a=o&&ct(o)?o:void 0,[i,s]=Ya({}),l=Ka((u,m)=>{s(y=>({...y,[u.toLowerCase()]:m}))},[]),d=Ka(u=>u?i[u.toLowerCase()]??tc:tc,[i]),p=nh(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:Ka(async(u,m,y)=>{if(!a||!u?.forwarder)return;let w=u.forwarder;l(w,{step:"switching"});try{if(r!==lo){if(!n?.switchChain)throw new Error("wallet cannot switch chains");await n.switchChain(lo)}if(!n?.writeContract||!n?.readContract||!n?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await $g(n.readContract,lo,{factory:u.factory,forwarder:u.forwarder,recipient:a,version:u.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let c;if(!u.isDeployed){if(l(w,{step:"deploying"}),c=await n.writeContract({address:u.factory,abi:Jg,functionName:"deploy",args:[a,BigInt(u.version)],chainId:lo}),l(w,{step:"deploying",deployTxHash:c}),(await n.waitForReceipt({chainId:lo,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(w,{step:"recovering",deployTxHash:c});let h=m==="execute"?await n.writeContract({address:u.forwarder,abi:$d,functionName:"execute",args:[],chainId:lo}):await n.writeContract({address:u.forwarder,abi:$d,functionName:"sweepToUser",args:[y??ek(u)],chainId:lo});if(l(w,{step:"recovering",deployTxHash:c,actionTxHash:h}),(await n.waitForReceipt({chainId:lo,hash:h})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${h})`);l(w,{step:"done",deployTxHash:c,actionTxHash:h}),t.current.onRecoverySuccess?.({action:m,forwarder:u.forwarder,actionTxHash:h,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(f){let c=f instanceof Error?f:new Error(String(f));s(h=>{let b=w.toLowerCase();return{...h,[b]:{...h[b]??tc,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,r,n,l]),stateFor:d,busy:p}}function oh(e={}){let t=rh(e);t.current=e;let n=nh(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ct(r)?r:void 0,[a,i]=Ya(),[s,l]=Ya(!1),[d,p]=Ya(),[g,u]=Ya(0),m=e.target,y=e.enabled??!0,w=e.refetchInterval;$2(()=>{if(!o||!y){i(void 0),p(void 0),l(!1);return}let x=!1,k=!1,R=!0;async function S(){if(!(x||k)){k=!0,R&&l(!0);try{let N=await n.getRecovery({user:o,target:m});if(x)return;i(N),p(void 0)}catch(N){if(x)return;let E=N instanceof Error?N:new Error(String(N));p(E),t.current.onError?.(E),E instanceof gr&&E.status===401&&t.current.onUnauthorized?.()}finally{k=!1,!x&&R&&l(!1),R=!1}}}S();let C=typeof w=="number"&&Number.isFinite(w)&&w>0?setInterval(()=>{S()},w):void 0;return()=>{x=!0,C&&clearInterval(C)}},[n,o,g,m,y,w]);let f=Ka(()=>u(x=>x+1),[]),c=Za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),h=Ka(async(x,k)=>{a&&await c.recover(a,x,k)},[c,a]),b=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:h,recoveryState:b}}var tk="BSC_FUNDED";function ah(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function nk(e,t){return e.target||t}function la(e,t=[]){let n=e.find(o=>o.isDefault)?.symbol,r=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=r.get(a);if(i){i.targets.push(o.symbol);continue}r.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of r.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==tk)continue;let s=nk(i,n);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=ah(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...r.values()]}function ih(e){return e.filter(t=>(t.info.tokens??[]).some(n=>n.recoverable)?!0:ah(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Qs(e){return e.reduce((t,n)=>t+(n.info.tokens??[]).filter(r=>r.recoverable).length,0)}import{Fragment as Ys,jsx as fe,jsxs as $e}from"react/jsx-runtime";var rk=56;function ok(e){return{client:e.client,apiBaseUrl:e.apiBaseUrl,recipient:e.recipient,target:e.target,enabled:e.targets===void 0,wallet:e.wallet,trustedFactories:e.trustedFactories,onUnauthorized:e.onUnauthorized,onError:e.onError}}var ak="This balance may already be processing. Recover only if it remains stuck.",qs="USDT",sh="primary";function ik(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function sk(e){let t=e.toLowerCase();return t.includes("insufficient funds")||t.includes("insufficientfunds")||t.includes("exceeds the balance of the account")||t.includes("insufficient balance for transfer")?"Not enough BNB for the network fee. Add BNB to your connected wallet and try again.":t.includes("user rejected")||t.includes("userrejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("action_rejected")||t.includes("rejected by user")?"Transaction cancelled in your wallet.":"Recovery couldn't be completed. Check your wallet and try again."}function ch({message:e}){let[t,n]=nc("idle");dh(()=>{if(t==="idle")return;let a=window.setTimeout(()=>n("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function r(){if(typeof navigator>"u"||!navigator.clipboard){n("failed");return}try{await navigator.clipboard.writeText(e),n("copied")}catch{n("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return $e("details",{className:"rd-error-details",children:[fe("summary",{children:"View technical details"}),$e("div",{className:"rd-error-log",children:[fe("button",{type:"button",className:"rd-error-copy",onClick:()=>{r()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?fe("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):$e("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[fe("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),fe("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}),fe("code",{children:e})]})]})}function Xa(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function Wr(e,t){try{return $t(e,t)}catch{return e.toString()}}function lh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function lk(e){let t=Xa(e.bridgeMinWei),n=[];for(let a of e.tokens??[]){let i=Xa(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let r=Xa(e.balance),o=n.some(a=>a.action?.kind==="execute");return r>0n&&e.suggestedAction==="execute"&&!o?n.unshift({key:sh,symbol:qs,decimals:e.decimals,balance:r,action:{kind:"execute"}}):n.length===0&&r>0n&&e.suggestedAction!=="none"&&n.push({key:sh,symbol:qs,decimals:e.decimals,balance:r,action:{kind:"sweep"}}),n}function dk({deposit:e,decimals:t}){let n=e.originChainId??rk,r=e.originTxHash||e.txHash,o=r?js(n,r):void 0;return $e("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[fe("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),fe("span",{className:"rd-history-step-chain",children:ia(n)}),fe("span",{className:"rd-history-step-amount",children:Wr(Xa(e.amount),t)}),fe("span",{className:"rd-history-step-tx",children:o?fe("a",{href:o.url,target:"_blank",rel:"noreferrer",title:r,children:lh(r)}):r?fe("span",{title:r,children:lh(r)}):null})]})}function ck({group:e,showTargetLabel:t,busy:n,state:r,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=lk(s),d=Xa(s.balance),p=l.length===1?`${Wr(l[0].balance,l[0].decimals)}`:`${l.length} assets`,g=e.deposits.length>0&&e.depositsTotal>=d,u=d>e.depositsTotal?d-e.depositsTotal:0n,m=r.step==="switching"||r.step==="deploying"||r.step==="recovering",w=l.find(c=>i(c)===a)?.action?.kind;function f(){if(r.step==="switching")return"Switching to BNB Chain\u2026";if(r.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=w==="execute"?"continuing ONEchain delivery":"returning funds";return r.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return $e("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&$e("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",fe("b",{children:e.targets.join(", ")})]}),$e("div",{className:"rd-recover-sum",children:[fe("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),$e("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&$e(Ys,{children:[" ",fe("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&$e("details",{className:"rd-recover-made-of",children:[$e("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),$e("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>fe(dk,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!g&&$e("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",Wr(e.depositsTotal,s.decimals)," of"," ",Wr(d,s.decimals)," ",qs,". The remaining"," ",Wr(u,s.decimals)," ",qs," is still included when you act."]})]})]}),fe("div",{className:"rd-token-list",children:l.map(c=>{let h=i(c),b=m&&a===h;return $e("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[fe(Mo,{symbol:c.symbol,size:26}),$e("div",{className:"rd-token-row-info",children:[l.length>1&&$e("span",{className:"rd-token-row-amount",children:[Wr(c.balance,c.decimals)," ",fe("span",{className:"rd-token-row-symbol",children:c.symbol})]}),b?fe("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):c.shortfall!==void 0&&c.minimum!==void 0?$e("span",{className:"rd-token-row-warn",children:["Needs ",$e("b",{children:[Wr(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",Wr(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",fe("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?fe("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):fe("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),b?fe("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&fe("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:n,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&r.step==="idle"&&$e("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",fe("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&fe("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||ak}),r.step==="done"&&fe("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:w==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),r.step==="error"&&r.error&&$e(Ys,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:sk(r.error)}),fe(ch,{message:r.error})]})]})}function Ks(e){let{info:t,loading:n,error:r,refresh:o}=oh(ok(e)),a=n||e.targets!==void 0&&e.targetsLoading===!0,i=Za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[s,l]=nc(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=ih(la(d,e.orders??[])),g=p.length>0,u=e.targets!==void 0?e.onRecovered:o,m=e.wallet?.walletAddress,y=e.wallet?.getBalance,[w,f]=nc();return dh(()=>{if(!g||!y||!m){f(void 0);return}let c=!1;return y({chainId:56,address:m}).then(h=>{c||f({value:h.value,decimals:h.decimals})}).catch(()=>{c||f(void 0)}),()=>{c=!0}},[g,y,m]),$e("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&fe("div",{className:"rd-card-header",children:fe("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&fe("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:ik(e.otherTargetsRecoverable)}),a&&$e("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[fe("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),r&&$e(Ys,{children:[fe("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),fe(ch,{message:r.message})]}),!a&&!r&&!g&&$e("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[fe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:$e("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[fe("path",{d:"M5 11.5V8.8A2.8 2.8 0 0 1 7.8 6h8.4A2.8 2.8 0 0 1 19 8.8v6.4a2.8 2.8 0 0 1-2.8 2.8H7.8A2.8 2.8 0 0 1 5 15.2v-3.7Z",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),fe("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),fe("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),fe("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&$e("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:fe("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!r&&p.map(c=>fe(ck,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:h=>`${c.forwarder.toLowerCase()}:${h.key}`,onRecover:h=>{h.action&&(l(`${c.forwarder.toLowerCase()}:${h.key}`),i.recover(c.info,h.action.kind,h.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!r&&g&&$e("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",w&&$e(Ys,{children:[" ",$e("b",{children:[Wr(w.value,w.decimals)," BNB"]})]}),!w&&" unavailable","."]}),!a&&!r&&g&&fe("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as Wt from"react";import*as En from"@radix-ui/react-dialog";import{Drawer as da}from"vaul";ce(`html body[data-scroll-locked]{overflow-y:auto!important;margin-right:0!important}.rd-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.rd-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--rd-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;font-family:inherit}.rd-dialog-content.rd-deposit-shell{height:min(40rem,90vh)}.rd-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--rd-drawer-max-width, none);min-width:var(--rd-drawer-min-width, 0);max-height:min(85dvh,calc(100svh - env(safe-area-inset-top,0px)));margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain}.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=bottom],.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=top]{height:min(40rem,85dvh,calc(100svh - env(safe-area-inset-top,0px)))}.rd-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.rd-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.rd-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.rd-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.rd-drawer-content[data-vaul-drawer-direction=left] .rd-drawer-handle,.rd-drawer-content[data-vaul-drawer-direction=right] .rd-drawer-handle{display:none}.rd-overlay{animation:rd-overlay-show .18s ease-out}.rd-overlay[data-state=closed]{animation:rd-overlay-hide .15s ease-in}.rd-dialog-content{animation:rd-dialog-show .2s ease-out}.rd-dialog-content[data-state=closed]{animation:rd-dialog-hide .15s ease-in}@keyframes rd-overlay-show{0%{opacity:0}}@keyframes rd-overlay-hide{to{opacity:0}}@keyframes rd-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@keyframes rd-dialog-hide{to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@media(prefers-reduced-motion:reduce){.rd-overlay,.rd-overlay[data-state=closed],.rd-dialog-content,.rd-dialog-content[data-state=closed]{animation:none}}.rd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
21
|
+
`);import{jsx as Jn,jsxs as Zs}from"react/jsx-runtime";var ph=24;function uh(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function pk(e,t,n){let r=n?.offsetTop??t.top,o=n?n.offsetTop+n.height:t.bottom,a=Math.max(t.top,r)+ph,i=Math.min(t.bottom,o)-ph;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function uk(){let e=Wt.useRef(0),[t,n]=Wt.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return Wt.useEffect(()=>{let r=window.visualViewport;if(!r)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,r.height+r.offsetTop);let i=Math.max(0,e.current-r.height-r.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=r.height;n(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}},[]),t}function fk(e){let t=`(max-width: ${e}px)`,[n,r]=Wt.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return Wt.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);r(o.matches);let a=i=>r(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}function Tr({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:n="bottom",dialogWidth:r,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=fk(t),[g,u]=Wt.useState(!1),m=s!==void 0,y=m?s:g,w=Wt.useCallback(b=>{m||u(b),l?.(b)},[m,l]);or(y,Wt.useCallback(()=>w(!1),[w]));let f=Wt.useMemo(()=>{let b={};return r&&(b["--rd-dialog-width"]=r),o&&(b["--rd-drawer-max-width"]=o),a&&(b["--rd-drawer-min-width"]=a),{...b,...i}},[r,o,a,i]),c=Wt.useMemo(()=>({open:y,setOpen:w,isMobile:p,theme:e,drawerDirection:n,portalStyle:f}),[y,w,p,e,n,f]),h=Jn("div",{"data-theme":e,style:f,children:d});return p?Jn(Os.Provider,{value:c,children:Jn(da.Root,{direction:n,open:y,onOpenChange:w,noBodyStyles:!0,children:h},"drawer")}):Jn(Os.Provider,{value:c,children:Jn(En.Root,{open:y,onOpenChange:w,children:h})})}function ca({asChild:e,children:t,dataAttributes:n}){let{isMobile:r}=fr(),o=r?da.Trigger:En.Trigger;return Jn(o,{asChild:e,...n,children:t})}function Ir({className:e,ariaTitle:t,children:n}){let{open:r,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=fr(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=uk(),g=jo(),u=Wt.useRef(null),m=Wt.useRef(null);Wt.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),Wt.useEffect(()=>{m.current&&clearTimeout(m.current);let c=document.activeElement;!r&&uh(c)&&u.current?.contains(c)&&c.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(h=>{h.scrollTo?.({top:0,behavior:"auto"})})},[r]);let y=o&&i==="bottom"&&l>0,w=y?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,f=Wt.useCallback(c=>{if(!o||i!=="bottom"||!uh(c.target))return;let h=c.target,b=h.closest("[data-rd-scroll-area]");b&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{let x=pk(h.getBoundingClientRect(),b.getBoundingClientRect(),window.visualViewport);Math.abs(x)>=1&&b.scrollBy?.({top:x,behavior:"auto"}),m.current=null},280))},[i,o]);return o?Zs(da.Portal,{children:[Jn(da.Overlay,{className:"rd-overlay"}),Zs(da.Content,{ref:u,className:ye("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":g?"true":"false","data-rd-keyboard-adjusted":y?"true":"false",style:{...s,...w},onFocusCapture:f,children:[Jn(da.Title,{className:"rd-sr-only",children:t}),Jn("div",{className:"rd-drawer-handle"}),n]})]}):Zs(En.Portal,{children:[Jn(En.Overlay,{className:"rd-overlay"}),Zs(En.Content,{className:ye("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[Jn(En.Title,{className:"rd-sr-only",children:t}),Jn(En.Description,{className:"rd-sr-only",children:t}),n]})]})}import{Fragment as hk,jsx as Fe,jsxs as zn}from"react/jsx-runtime";function mk({id:e,activeView:t,recoverableCount:n,onChange:r}){let o=["deposit","history","recover"];return Fe("div",{className:"rd-deposit-tabs",role:"tablist","aria-label":"Deposit navigation","data-tab-count":o.length,"data-active-index":o.indexOf(t),children:o.map(a=>{let i=a==="deposit"?"Deposit":a==="history"?"History":"Recover";return zn("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>r(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,p=o[d];r(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[Fe("span",{children:i}),a==="recover"&&n>0&&Fe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function mh({className:e}){let t=Ga();return Fe(xe,{feature:"relay",children:Fe(Ir,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:Fe(gk,{})})})}function gk(){let e=Ga(),{theme:t}=fr(),n=Dg(),r=fh.useId();if(!n)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:g,origin:u,setOrigin:m,amount:y,setAmount:w,recipient:f,setRecipient:c,recipientValid:h,balance:b,balanceLoading:x,insufficientBalance:k,depositAddress:R,depositAddressLoading:S,depositAddressError:C,arrivalStatus:N,quote:E,quoteLoading:A,quoteError:B,canDeposit:L,deposit:U,depositState:M,targetOptions:F,selectedTarget:ne,setSelectedTarget:ee,showAmountInput:X,minNotice:W,showRecipientInput:Y,showTargetSelector:O,showOneClick:G,showConnectPrompt:te,showRecipientHint:_,canRecover:ae,recoverableCount:be,recoveryTargetsLoading:Me,recoveryTargets:le,recoveryOrders:ge,historyOrdersLoading:me,historyOrdersError:Ke,refreshRecovery:ke,trustedFactories:Qe,amountHint:pt,amountSmallestUnits:De,onMax:Ue}=n;return zn("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[Fe(mk,{id:r,activeView:o,recoverableCount:be,onChange:a}),i&&Fe("div",{className:"rd-deposit-tab-panel",id:`${r}-recover-panel`,role:"tabpanel","aria-labelledby":`${r}-recover-tab`,children:ae?Fe(Ks,{client:e.client,apiBaseUrl:s,recipient:f,target:ne?.symbol,wallet:l,trustedFactories:Qe,targets:(d?.targets.length??0)>0?le:void 0,targetsLoading:Me,orders:ge,onRecovered:ke,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):zn("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[Fe("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:zn("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Fe("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),Fe("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),Fe("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),Fe("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),Fe("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&Fe("div",{className:"rd-deposit-tab-panel",id:`${r}-history-panel`,role:"tabpanel","aria-labelledby":`${r}-history-tab`,children:h&&f.trim()?Fe(Hs,{orders:ge,isLoading:p||me,error:g??Ke,catalog:d,showTitle:!1}):Fe(qa,{requiresIdentity:!0})}),o==="deposit"&&zn("div",{className:"rd-deposit-tab-panel",id:`${r}-deposit-panel`,role:"tabpanel","aria-labelledby":`${r}-deposit-tab`,children:[p&&zn("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Fe(Us,{}),te&&e.onRequestConnect&&Fe("span",{className:"rd-skeleton rd-skeleton-cta"}),zn("section",{className:"rd-stack",children:[zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),zn("div",{className:"rd-field-row",children:[Fe("span",{className:"rd-skeleton rd-skeleton-field"}),Fe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),X&&zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),zn("div",{className:"rd-field",children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"}),(Y||f.trim().length>0)&&zn(hk,{children:[Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Fe("span",{className:"rd-skeleton rd-skeleton-field"}),Y&&Fe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Fe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&Fe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),g&&zn("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",g.message]}),_&&Fe("div",{className:"rd-callout rd-callout-muted",children:Y?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&Fe(Yg,{catalog:d,origin:u,onChangeOrigin:m,amount:y,onChangeAmount:w,showAmountInput:X,minNotice:W,amountHint:pt,onMax:Ue,recipient:f,onChangeRecipient:c,showRecipientInput:Y,recipientValid:h,balance:b,balanceLoading:x,insufficientBalance:k,targetOptions:F,selectedTarget:ne,onChangeTarget:ee,showTargetSelector:O,quote:E,quoteLoading:A,quoteError:B,depositAddress:R,depositAddressLoading:S,depositAddressError:C,arrivalStatus:N,amountSmallestUnits:De,depositState:M,onDeposit:()=>{U()},canDeposit:L&&G,oneClickEnabled:G,locked:te,onRequestConnect:e.onRequestConnect})]})]})}import{jsx as rc}from"react/jsx-runtime";function gh({asChild:e,children:t}){return rc(xe,{feature:"relay",children:rc(ca,{asChild:e??t!=null,children:t??rc("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as Le from"react";import{useCallback as Ja,useEffect as co,useMemo as oc,useRef as ac,useState as xt}from"react";import{useEffect as bk,useState as wk}from"react";function hh(e,t){let[n,r]=wk(e);return bk(()=>{let o=setTimeout(()=>r(e),t);return()=>clearTimeout(o)},[e,t]),n}var yk=500,wh=56,bh={chainId:wh,token:"0x55d398326f99059fF775485246999027B3197955"},yh=3e4,xk=5e3;function vk(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?yh:Math.max(xk,e*1e3)}var kk=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function ic(e,t){let n=e.trim();if(!n)return null;try{let r=Bs(n,t);return r>0n?r:null}catch{return null}}function xh(e={}){let t=ac(e);t.current=e;let n=oc(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.wallet,o=r?.walletAddress,a=!!o,i=r?.walletChainId,[s,l]=xt(),[d,p]=xt(!0),[g,u]=xt();co(()=>{let J=!1;return p(!0),n.getConfig().then(we=>{J||(l(we),u(void 0))}).catch(we=>{J||u(we instanceof Error?we:new Error(String(we)))}).finally(()=>{J||p(!1)}),()=>{J=!0}},[n]);let m=e.chains,y=oc(()=>{if(!s)return[];if(!m||m.length===0)return s.origins;let J=new Set(m);return s.origins.filter(we=>J.has(we.chainId))},[s,m]),w=oc(()=>s?{...s,origins:y}:void 0,[s,y]),[f,c]=xt();co(()=>{if(f||y.length===0)return;let J=t.current.defaultToken,we=J?y.find(z=>z.chainId===J.chainId&&z.token.address.toLowerCase()===J.address.toLowerCase()):void 0;c(we??y[0])},[y,f]);let[h,b]=xt(),x=Ja(()=>{Ze(void 0),Yt(!1),Bt(!1),j(!1),bt(void 0)},[]),k=Ja(J=>{c(J),b(void 0),x()},[x]),R=f?.kind==="svm",[S,C]=xt(""),N=e.amount!==void 0?e.amount:S,E=Ja(J=>{C(J),b(void 0),x()},[x]),A=hh(N,yk),B=f?ic(A,f.token.decimals):null,L=f?ic(N,f.token.decimals):null,[U,M]=xt(""),[F,ne]=xt(!1),ee=e.recipient!==void 0?e.recipient:U,X=Ja(J=>{M(J),ne(!0),b(void 0),x()},[x]);co(()=>{e.recipient===void 0&&o&&!F&&M(o)},[o,F,e.recipient]);let W=ee.length===0||ct(ee),Y=ee.length>0&&ct(ee)?ee:void 0,[O,G]=xt(),[te,_]=xt(!1),[ae,be]=xt(0),Me=r?.getBalance;co(()=>{if(!Me||!o||!f||R){G(void 0),_(!1);return}let J=!1;_(!0);let we=f.token.address.toLowerCase()===Ha?void 0:f.token.address;return Me({chainId:f.chainId,address:o,token:we}).then(z=>{J||G({...z,formatted:$t(z.value,z.decimals)})}).catch(()=>{J||G(void 0)}).finally(()=>{J||_(!1)}),()=>{J=!0}},[Me,o,f,R,ae]);let le=O?.value??null,ge=!R&&L!==null&&le!==null&&L>le,[me,Ke]=xt(),[ke,Qe]=xt(!1),[pt,De]=xt(),Ue=f?.chainId,Be=f?.token.address,St=e.target;co(()=>{if(!Y||!Ue||!Be){Ke(void 0),De(void 0),Qe(!1);return}let J=!1;return Ke(void 0),De(void 0),Qe(!0),(St?n.getDepositAddress({user:Y,originChainId:Ue,originCurrency:Be},St):n.getDepositAddress({user:Y,originChainId:Ue,originCurrency:Be})).then(z=>{J||(Ke(z),De(void 0),t.current.onDepositAddress?.(z))}).catch(z=>{if(J)return;Ke(void 0);let Ne=z instanceof Error?z:new Error(String(z));De(Ne),t.current.onError?.(Ne)}).finally(()=>{J||Qe(!1)}),()=>{J=!0}},[n,Y,Ue,Be,St]);let Ht=[Ue??"",(Be??"").toLowerCase(),(Y??"").toLowerCase(),St??"",N.trim()].join("|"),ut=ac(Ht);co(()=>{ut.current!==Ht&&(ut.current=Ht,b(void 0),x())},[Ht,x]);let[Tt,vt]=xt(),[_t,kt]=xt(!1),[it,It]=xt(),et=B?.toString();co(()=>{if(!Ue||!Be||!et){vt(void 0),It(void 0),kt(!1);return}let J=!1,we,z=!0;async function Ne(){z&&kt(!0);let q=yh;try{let Re=await n.getQuote({originChainId:Ue,originCurrency:Be,amount:et});if(J)return;vt(Re),It(void 0),q=vk(Re.ttl)}catch(Re){if(J)return;vt(void 0),It(Re instanceof Error?Re:new Error(String(Re)))}finally{J||kt(!1),z=!1}J||(we=setTimeout(Ne,q))}return Ne(),()=>{J=!0,we&&clearTimeout(we)}},[n,Ue,Be,et]);let[qt,st]=xt(!1),[nn,_e]=xt(!1),[ot,Ze]=xt(),[Ct,bt]=xt(),[Ve,Yt]=xt(!1),[Kt,Bt]=xt(!1),[Zt,j]=xt(!1),ue=r?.waitForReceipt,he=ac(void 0);co(()=>{if(!ot||!f||!ue)return;let J=!1;return Yt(!0),Bt(!1),j(!1),ue({chainId:f.chainId,hash:ot}).then(we=>{J||(Bt(!0),j(we.status==="reverted"),be(z=>z+1),we.status!=="reverted"&&ot!==he.current&&(he.current=ot,t.current.onDeposited?.(ot)))}).catch(we=>{J||bt(we instanceof Error?we.message:String(we))}).finally(()=>{J||Yt(!1)}),()=>{J=!0}},[ot,ue]);let Ie=i!==void 0&&f!==void 0&&i!==f.chainId,tt=qt||nn,zt=h??Ct,Et="idle";zt?Et="error":Kt?Et="confirmed":Ve?Et="confirming":tt&&(Et=qt?"switching":"pending");let Cn={phase:Et,isSubmitting:tt,isConfirming:Ve,isConfirmed:Kt,needsSwitch:Ie,txHash:ot,reverted:Kt&&Zt,error:zt},Rn=!!(f&&me&&me.originChainId===f.chainId&&me.originCurrency.toLowerCase()===f.token.address.toLowerCase()),P=!!(r?.sendTransaction&&r?.writeContract&&r?.readContract&&r?.waitForReceipt),Ce=!!(a&&P&&f&&!R&&me&&Rn&&L&&L>0n&&!ge&&!tt&&!Ve),je=Ja(async()=>{if(R||!f||!me||!r?.sendTransaction||!r?.writeContract)return;b(void 0);let J=ic(N,f.token.decimals);if(!J||J<=0n){b("enter an amount to use the one-click deposit");return}let we=f.token.address.toLowerCase()===Ha,z=me.depositAddress,Ne=await eh(r?.readContract,wh,{forwarder:me.forwarder,recipient:Y,version:me.version,trusted:t.current.trustedFactories});if(!Ne.ok){b(`address verification failed: ${Ne.reason}`);return}if(f.chainId===bh.chainId&&f.token.address.toLowerCase()===bh.token.toLowerCase()&&!th(z,me.forwarder)){b("address verification failed: deposit address does not match the verified forwarder (expected them to be identical on this route; check the backend's direct_same_token setting)");return}try{if(Ie){if(!r?.switchChain)throw new Error("wallet cannot switch chains");st(!0);try{await r.switchChain(f.chainId)}finally{st(!1)}}x(),_e(!0);try{let Re=we?await r.sendTransaction({chainId:f.chainId,to:z,value:J}):await r.writeContract({chainId:f.chainId,address:f.token.address,abi:kk,functionName:"transfer",args:[z,J]});Ze(Re)}finally{_e(!1)}}catch(Re){b(Re.message)}},[R,f,me,N,Ie,r,Y,x]);return{address:o,isConnected:a,catalog:w,catalogLoading:d,catalogError:g,origin:f,setOrigin:k,recipient:ee,setRecipient:X,recipientValid:W,amount:N,setAmount:E,balance:O,balanceLoading:te,insufficientBalance:ge,isSvmOrigin:R,depositAddress:me?.depositAddress,depositAddressResult:me,depositAddressLoading:ke,depositAddressError:pt,quote:Tt,quoteLoading:_t,quoteError:it,canDeposit:Ce,deposit:je,depositState:Cn}}import{useEffect as Ck,useRef as Rk,useState as pa}from"react";var Nk=3e4,Sk=300;function po(e){let t=Rk(e);t.current=e;let{client:n,enabled:r=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Nk,i=e.recipient&&ct(e.recipient)?e.recipient:void 0,[s,l]=pa([]),[d,p]=pa(!1),[g,u]=pa(),[m,y]=pa(!1),[w,f]=pa(),[c,h]=pa(0);return Ck(()=>{if(!i){l([]),u(void 0),p(!1),y(!1),f(void 0),h(0);return}if(!r){l([]),u(void 0),p(!1),y(!1),f(void 0),h(0);return}let b=!1,x=!0,k,R=0,S=0;async function C(){let B=++R;S+=1,x&&p(!0);try{let L=await n.listOrders(i);if(b)return;B===R&&(l(L),u(void 0))}catch(L){if(b)return;let U=L instanceof Error?L:new Error(String(L));B===R&&(u(U),t.current.onError?.(U))}finally{S-=1,!b&&B===R&&(p(!1),y(!0),f(i),h(L=>L+1)),x=!1}}function N(){k&&clearTimeout(k),k=setTimeout(()=>{k=void 0,b||C()},Sk)}C();let E;o&&typeof EventSource<"u"&&(E=new EventSource(n.ordersStreamUrl(i)),E.addEventListener("orders-changed",N),E.onopen=()=>{N()});let A=o&&Number.isFinite(a)&&a>0?setInterval(()=>{S===0&&C()},a):void 0;return()=>{b=!0,k&&clearTimeout(k),A&&clearInterval(A),E?.close()}},[n,i,r,o,a]),{orders:s,ordersLoading:d,ordersError:g,ordersInitialized:m,ordersForRecipient:w,ordersRevision:c}}import{useMemo as Tk,useState as Ik}from"react";function vh(e,t){if(t){let n=e.find(r=>r.symbol===t);if(n)return n}return e.find(n=>n.isDefault)??e[0]}function kh({catalogTargets:e,filter:t,defaultTarget:n}){let r=Tk(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=Ik(()=>vh(r,n)?.symbol),i=(o!==void 0?r.find(l=>l.symbol===o):void 0)??vh(r,n);function s(l){r.some(d=>d.symbol===l)&&a(l)}return{options:r,selected:i,setSelected:s}}var Ek={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function uo(e){return e.apiBaseUrl?e.apiBaseUrl:Ek[at(e.environment)]}import{jsx as Pk,jsxs as Ok}from"react/jsx-runtime";var Ch=1e3;function Ak(e,t,n,r,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=n.walletAddress&&ct(n.walletAddress)?n.walletAddress:void 0;return{client:e.client,apiBaseUrl:r,wallet:n,chains:e.chains,recipient:a?i??"":e.recipient,amount:a&&!i?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Xs(e,t){let n=e.trim();if(!n)return 0n;try{let r=Bs(n,t);return r>0n?r:0n}catch{return 0n}}function Mk(e,t,n,r){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(n&&o.toLowerCase()===n.toLowerCase()):r}function Rh(e,t,n){return`${e}:${t.toLowerCase()}:${n}`}function Lk(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Nh({open:e,children:t}){let[n]=Le.useState(Lg);return Ok(Vd.Provider,{value:n,children:[e&&Pk(Dk,{store:n}),t]})}function Dk({store:e}){let t=Ga(),{showTargetSelector:n=!0}=t,r=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&ct(t.walletAddress)),[a,i]=Le.useState("deposit"),s=a==="recover",l=Le.useCallback(H=>{i(ft=>(typeof H=="function"?H(ft==="recover"):H)?"recover":"deposit")},[]);Le.useEffect(()=>{Ye("relay","opened")},[]);let[d,p]=Le.useState(void 0),g=Le.useMemo(()=>uo({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=Le.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),m=at(t.environment),y=Ut("apps.json",m,H=>({min:Wn(H?.relay?.minDepositAmount,m),max:Wn(H?.relay?.maxDepositAmount,m),trustedFactories:yi(H,m)})),w=Le.useMemo(()=>t.trustedFactories??Vs(y?.trustedFactories),[t.trustedFactories,y?.trustedFactories]),{isConnected:f,catalog:c,catalogLoading:h,catalogError:b,origin:x,setOrigin:k,amount:R,setAmount:S,recipient:C,setRecipient:N,recipientValid:E,balance:A,balanceLoading:B,insufficientBalance:L,depositAddress:U,depositAddressResult:M,depositAddressLoading:F,depositAddressError:ne,quote:ee,quoteLoading:X,quoteError:W,canDeposit:Y,deposit:O,depositState:G}=xh(Ak(t,d,u,g,w)),{options:te,selected:_,setSelected:ae}=kh({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});Le.useEffect(()=>{p(_?.symbol)},[_?.symbol]);let be=t.amount===void 0&&!t.hideAmount,Me=!r&&(t.showRecipientInput??!0)&&t.recipient===void 0,le=E&&C.trim().length>0&&ct(C),ge=!r&&t.recipient!==void 0&&t.recipient.trim().length>0,me=r?!o||!le:!f&&!ge&&!le,Ke=!!c&&!le&&!me,ke=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),Qe=Le.useMemo(()=>t.client?t.client:en({baseUrl:g}),[t.client,g]),[pt,De]=Le.useState({}),[Ue,Be]=Le.useState(!1),[St,Ht]=Le.useState(0),ut=Le.useCallback(()=>Ht(H=>H+1),[]),Tt=G.isConfirmed,vt=le&&(!!M||a!=="deposit"),{orders:_t,ordersLoading:kt,ordersError:it,ordersInitialized:It,ordersForRecipient:et}=po({client:Qe,recipient:vt?C:void 0,enabled:vt,refetchInterval:Ch}),qt=_t,st=_??c?.targets.find(H=>H.isDefault),nn=st?.symbol??c?.destination.symbol,_e=st?.isDefault??!0,ot=M?.version,Ze=Le.useMemo(()=>_t.filter(H=>Mk(H,ot,nn,_e)),[_t,ot,nn,_e]),Ct=Le.useRef(void 0),[bt,Ve]=Le.useState(),[Yt,Kt]=Le.useState(),Bt=`${C.toLowerCase()}:${nn?.toLowerCase()??""}:${ot??""}`;Le.useEffect(()=>{let H=et?.toLowerCase()===C.toLowerCase();if(!vt||!It||!H||it){vt||(Ct.current=void 0,Ve(void 0),Kt(void 0));return}let ft=new Set(Ze.map(ze=>ze.orderId)),lt=new Set(Ze.flatMap(ze=>(ze.deposits??[]).map(nr=>Rh(ze.orderId,nr.txHash,nr.blockNumber)))),Ft=Ct.current;if(!Ft||Ft.key!==Bt){Ct.current={key:Bt,orderIds:ft,depositKeys:lt,statuses:new Map(Ze.map(ze=>[ze.orderId,ze.status]))},Ve(void 0),Kt(void 0);return}let At,qe=0n,gn=!1;for(let ze of Ze)for(let nr of ze.deposits??[]){let Hr=Rh(ze.orderId,nr.txHash,nr.blockNumber);if(!Ft.depositKeys.has(Hr)){At??(At=ze);try{qe+=BigInt(nr.amount),gn=!0}catch{}}}At??(At=Ze.find(ze=>!Ft.orderIds.has(ze.orderId))),At??(At=Ze.find(ze=>Ft.statuses.get(ze.orderId)!==ze.status));for(let ze of ft)Ft.orderIds.add(ze);for(let ze of lt)Ft.depositKeys.add(ze);for(let ze of Ze)Ft.statuses.set(ze.orderId,ze.status);At&&(Ve(At.orderId),gn&&Kt(qe))},[Bt,Ze,et,vt,C,it,It]),Le.useEffect(()=>{let H=c?.targets??[];if(!ke||!le||H.length===0){De({}),Be(!1);return}let ft=!1;return Be(!0),Promise.all(H.map(lt=>Qe.getRecovery({user:C,target:lt.symbol}).catch(()=>{}))).then(lt=>{if(ft)return;let Ft={};H.forEach((At,qe)=>{let gn=lt[qe];gn&&(Ft[At.symbol]=gn)}),De(Ft),Be(!1)}),()=>{ft=!0}},[Qe,ke,le,C,c,Tt,St]);let Zt=Le.useMemo(()=>(c?.targets??[]).map(H=>({symbol:H.symbol,isDefault:H.isDefault,info:pt[H.symbol]})).filter(H=>H.info!==void 0),[c,pt]),j=Le.useMemo(()=>Qs(la(Zt)),[Zt]),[ue,he]=Le.useState(void 0),[Ie,tt]=Le.useState(),zt=!!c&&(c?.targets.length??0)>0&&!d;Le.useEffect(()=>{if(!le||!x||!M||zt){he(void 0),tt(void 0);return}let H=!1,ft=!1,lt=M.forwarder.toLowerCase();he(void 0),tt(void 0);async function Ft(){if(!(H||ft)){ft=!0;try{let qe=await Qe.getRecovery({user:C,target:d||void 0});if(H)return;if(qe?.forwarder&&qe.forwarder.toLowerCase()!==lt){he(void 0),tt(void 0);return}if(tt(qe),!qe||qe.suggestedAction!=="sweep"){he(void 0);return}let gn;try{gn=BigInt(qe.balance)}catch{he(void 0);return}let ze=Number(qe.decimals);if(gn<=0n||!Number.isInteger(ze)||ze<0){he(void 0);return}let nr=qe.tokens?.find(Hr=>Hr.address?.toLowerCase()===qe.token?.toLowerCase()&&Hr.symbol)?.symbol;he({balance:gn,decimals:ze,symbol:nr})}catch{}finally{ft=!1}}}Ft();let At=setInterval(()=>{Ft()},Ch);return()=>{H=!0,clearInterval(At)}},[Qe,le,C,d,zt,x,M,Tt]);let Et=Le.useCallback(()=>{!x||!A||S($t(A.value,x.token.decimals))},[x,A,S]),Cn=Le.useRef(!1),Rn=!!U;Le.useEffect(()=>{!Rn||Cn.current||(Cn.current=!0,Ye("relay","deposit_address_shown"))},[Rn]);let P=G.txHash;Le.useEffect(()=>{P&&Ye("relay","deposit_submitted")},[P]);let Ce=(()=>{let H=Number(y?.min);return Number.isFinite(H)&&H>=0?String(y?.min):"6"})(),je=(()=>{let H=Number(y?.max);return Number.isFinite(H)&&H>0?String(y?.max):void 0})(),J=(()=>{if(!x)return 0n;let H=Xs(Ce,x.token.decimals),ft=BigInt(x.minAmount);return H>ft?H:ft})(),we=x?$t(J,x.token.decimals):Ce,z=(()=>{if(!x||!ue||J<=0n)return;let H=x.token.decimals,ft=ue.decimals,lt=H>=ft?ue.balance*10n**BigInt(H-ft):ue.balance/10n**BigInt(ft-H);if(lt>=J)return;let Ft=J-lt;return{pending:$t(ue.balance,ft),pendingSymbol:ue.symbol,remaining:$t(Ft,H)}})(),Ne=c?.origins.find(H=>H.chainId===56&&!!(Ie?.token&&H.token.address.toLowerCase()===Ie.token.toLowerCase()))??c?.origins.find(H=>H.chainId===56&&H.token.symbol.toUpperCase()==="USDT"),q=Number.isInteger(Ie?.decimals)&&(Ie?.decimals??-1)>=0?Ie.decimals:Ne?.token.decimals,Re=Ie?.tokens?.find(H=>H.address?.toLowerCase()===Ie.token?.toLowerCase()&&H.symbol)?.symbol??Ne?.token.symbol,Ln=Yt!==void 0&&q!==void 0?$t(Yt,q):void 0,fo=(()=>{if(!x||q===void 0)return;let H=x.token.decimals;if(q>=H)return J*10n**BigInt(q-H);let ft=10n**BigInt(H-q);return(J+ft-1n)/ft})(),hr=bt?Ze.find(H=>H.orderId===bt):void 0,br=hr??Ze.find(H=>H.status==="BSC_FUNDED"||H.status==="BRIDGE_INITIATED"||H.status==="BRIDGE_PENDING"),fa=(()=>{if(!br||fo===void 0)return!1;try{return BigInt(br.amountIn)>=fo}catch{return!1}})(),vl=(()=>{if(!Ie||fo===void 0)return!1;try{return BigInt(Ie.balance)>0n&&BigInt(Ie.balance)>=fo}catch{return!1}})(),kl=(()=>{let H={amount:Ln,symbol:Re,backendStatus:br?.status};return!M||!vt||!It?{phase:"connecting",...H}:et?.toLowerCase()!==C.toLowerCase()||it?{phase:"unavailable",...H}:hr?.status==="COMPLETED"?{phase:"completed",...H,backendStatus:hr.status}:hr&&Lk(hr.status)?{phase:"failed",...H,backendStatus:hr.status}:br?.status==="BRIDGE_INITIATED"||br?.status==="BRIDGE_PENDING"?{phase:"processing",...H}:br?.status==="BSC_FUNDED"&&fa||vl?{phase:"funded",...H}:hr?{phase:"detected",...H,backendStatus:hr.status}:{phase:"waiting",...H}})(),Gr=x&&je?Xs(je,x.token.decimals):void 0,mo=x&&R.trim()?Xs(R,x.token.decimals):0n,li=!!(x&&mo>0n&&mo<J),go=!!(x&&Gr!==void 0&&mo>0n&&mo>Gr),di=(()=>{if(x){if(li)return`Amount is below the ${we} ${x.token.symbol} minimum.`;if(go)return`Amount is above the ${je} ${x.token.symbol} maximum.`}})(),ho=t.showOneClickDeposit??!1,ci=x&&R.trim()?Xs(R,x.token.decimals).toString():void 0,Cl={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:g,wallet:u,catalog:c,catalogLoading:h,catalogError:b,origin:x,setOrigin:k,amount:R,setAmount:S,recipient:C,setRecipient:N,recipientValid:E,balance:A,balanceLoading:B,insufficientBalance:L,depositAddress:U,depositAddressLoading:F,depositAddressError:ne,arrivalStatus:kl,quote:ee,quoteLoading:X,quoteError:W,canDeposit:Y,deposit:O,depositState:G,targetOptions:te,selectedTarget:_,setSelectedTarget:ae,showAmountInput:be,minNotice:x?{min:we,symbol:x.token.symbol,...z}:void 0,showRecipientInput:Me,showTargetSelector:n,showOneClick:ho,showConnectPrompt:me,showRecipientHint:Ke,canRecover:ke,recoverableCount:j,recoveryTargetsLoading:Ue,recoveryTargets:Zt,recoveryOrders:qt,historyOrdersLoading:kt,historyOrdersError:it,refreshRecovery:ut,trustedFactories:w,amountHint:di,amountSmallestUnits:ci,onMax:be&&A&&A.value>0n?Et:void 0};return Le.useLayoutEffect(()=>{e.publish(Cl)}),Le.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as sc}from"react/jsx-runtime";function Bk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[g,u]=Js.useState(!1),m=l!==void 0,y=m?l:g,w=Js.useCallback(f=>{m||u(f),d?.(f)},[m,d]);return sc(_d.Provider,{value:e,children:sc(Nh,{open:y,children:sc(Tr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:p})})})}var $a=Object.assign(Bk,{Trigger:gh,Content:mh});import{createContext as zk,useContext as Fk}from"react";var lc=zk(null);function dc(){let e=Fk(lc);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as Fn from"react";import{jsx as Lo}from"react/jsx-runtime";function Sh({className:e}){let t=dc(),{open:n}=fr();return Fn.useEffect(()=>{n&&Ye("relay","history_opened")},[n]),Lo(xe,{feature:"relay",children:Lo(Ir,{ariaTitle:"Transfer history",className:e??t.className,children:Lo(Uk,{})})})}function Uk(){let e=dc(),{theme:t}=fr(),n=Fn.useMemo(()=>{if(e.client)return e.client;let f=uo({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return en({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),r=e.recipient??e.walletAddress,o=!!(r&&ct(r)),[a,i]=Fn.useState(),[s,l]=Fn.useState(!1),[d,p]=Fn.useState(),g=Fn.useRef(e.onError);g.current=e.onError,Fn.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let f=!1;return i(void 0),l(!0),p(void 0),n.getConfig().then(c=>{f||i(c)}).catch(c=>{if(f)return;let h=c instanceof Error?c:new Error(String(c));p(h),g.current?.(h)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[n,o]);let{orders:u,ordersLoading:m,ordersError:y}=po({client:n,recipient:o?r:void 0,enabled:!!a,onError:e.onError}),w=Fn.useCallback(f=>{if(!e.onOutlink)return;let h=f.target.closest?.('a[target="_blank"]');h?.href&&e.onOutlink(h.href)},[e.onOutlink]);return Lo("div",{className:"rd-root rd-wizard","data-theme":t,children:o?Lo("div",{onClick:w,children:Lo(Hs,{orders:u,isLoading:s||m,error:d??y,catalog:a,showTitle:!1})}):Lo(qa,{requiresIdentity:!0})})}import{jsx as cc}from"react/jsx-runtime";function Th({asChild:e,children:t}){return cc(xe,{feature:"relay",children:cc(ca,{asChild:e??t!=null,children:t??cc("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as Ih}from"react/jsx-runtime";function jk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e;return Ih(lc.Provider,{value:e,children:Ih(Tr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var Eh=Object.assign(jk,{Trigger:Th,Content:Sh});import*as $n from"react";import*as Un from"react";var $s=[],Wk=3e4;function Ah({client:e,recipient:t}){let[n,r]=Un.useState({targets:$s}),[o,a]=Un.useState(0),i=Un.useRef(void 0),s=Un.useRef(void 0),l=t&&ct(t)?t.toLowerCase():void 0;Un.useEffect(()=>{if(!l){r({targets:$s});return}let w=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let c=(async()=>{let h,b=[];try{b=(await e.getConfig()).targets}catch(C){h=C instanceof Error?C:new Error(String(C))}let x=b.length===0?[()=>e.getRecovery({user:l})]:b.map(C=>()=>e.getRecovery({user:l,target:C.symbol})),k=await Promise.all(x.map(async C=>{try{return{info:await C()}}catch(N){return{error:N instanceof Error?N:new Error(String(N))}}})),R=b.length===0?k[0]?.info?[{symbol:"",isDefault:!0,info:k[0].info}]:[]:b.flatMap((C,N)=>k[N]?.info?[{symbol:C.symbol,isDefault:C.isDefault,info:k[N].info}]:[]),S=k.find(C=>C.error)?.error;return{targets:R,badgeFailed:!!(h||S&&R.length===0),error:h??S}})().catch(h=>({targets:$s,badgeFailed:!0,error:h instanceof Error?h:new Error(String(h))}));f={client:e,recipientKey:l,generation:o,promise:c},i.current=f,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return f.promise.then(c=>{w||r({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{w=!0}},[e,l,o]);let d=Un.useCallback(()=>a(w=>w+1),[]),p=Un.useCallback(()=>{if(!l)return;let w=i.current;if(w?.client===e&&w.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<Wk||a(c=>c+1)},[e,l]),g=l&&n.recipientKey===l?n.targets:$s,u=l&&n.recipientKey===l?n.error:void 0,m=!!(l&&n.recipientKey!==l),y=!!(l&&n.recipientKey===l&&n.badgeFailed);return Un.useMemo(()=>({count:y?0:Qs(la(g)),targets:g,loading:m,error:u,refresh:d,refreshIfStale:p}),[g,m,y,u,d,p])}import{createContext as Gk,useContext as Hk}from"react";var pc=Gk(null);function uc(){let e=Hk(pc);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function fc(){return uc().props}function Mh(){return uc().recovery}function Lh(){return uc().recovery.count}import*as Do from"react";import{jsx as Po,jsxs as Vk}from"react/jsx-runtime";function Dh({className:e}){let t=fc(),{open:n}=fr();return Do.useEffect(()=>{n&&Ye("relay","recovery_opened")},[n]),Po(xe,{feature:"relay",children:Po(Ir,{ariaTitle:"Recover stuck funds",className:e??t.className,children:Po(_k,{})})})}function _k(){let e=fc(),{targets:t,loading:n,refresh:r}=Mh(),{theme:o}=fr(),a=Do.useMemo(()=>uo({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=Do.useMemo(()=>e.client?e.client:en({baseUrl:a}),[e.client,a]),s=Do.useMemo(()=>({walletAddress:e.walletAddress,walletChainId:e.walletChainId,sendTransaction:e.sendTransaction,writeContract:e.writeContract,readContract:e.readContract,switchChain:e.switchChain,waitForReceipt:e.waitForReceipt,getBalance:e.getBalance}),[e.walletAddress,e.walletChainId,e.sendTransaction,e.writeContract,e.readContract,e.switchChain,e.waitForReceipt,e.getBalance]),l=e.walletAddress&&ct(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||ct(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,g=at(e.environment),u=Ut("apps.json",g,h=>yi(h,g)),m=Do.useMemo(()=>e.trustedFactories??Vs(u),[e.trustedFactories,u]),y=!!(e.writeContract&&e.readContract&&e.waitForReceipt),w=!!p&&y,f=p,{orders:c}=po({client:i,recipient:w?f:void 0,enabled:w,live:!1});return Vk("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&Po("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&Po("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!y&&Po("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),w&&Po(Ks,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:m,targets:t,targetsLoading:n,orders:c,onRecovered:r,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as mc}from"react/jsx-runtime";function Ph({asChild:e,children:t}){let n=Lh();return mc(xe,{feature:"relay",children:mc(ca,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":n},children:t??mc("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as Oh}from"react/jsx-runtime";function Qk(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[g,u]=$n.useState(!1),m=l!==void 0,y=m?l:g,w=$n.useCallback(R=>{m||u(R),d?.(R)},[m,d]),f=$n.useMemo(()=>{if(e.client)return e.client;let R=uo({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return en({baseUrl:R})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&ct(e.walletAddress)?e.walletAddress:void 0,h=c&&(!e.recipient||ct(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,b=Ah({client:f,recipient:h});$n.useEffect(()=>{y&&b.refreshIfStale()},[y,b.refreshIfStale]);let x=$n.useRef(void 0);$n.useEffect(()=>{!y||!b.error||x.current===b.error||(x.current=b.error,e.onError?.(b.error))},[y,b.error,e.onError]);let k=$n.useMemo(()=>({props:e,recovery:b}),[e,b]);return Oh(pc.Provider,{value:k,children:Oh(Tr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:y,onOpenChange:w,children:p})})}var Bh=Object.assign(Qk,{Trigger:Ph,Content:Dh});import{useCallback as qk,useEffect as Yk,useMemo as Kk,useRef as Zk,useState as el}from"react";function zh(e={}){let t=Zk(e);t.current=e;let n=Kk(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.enabled??!0,o=e.refetchInterval,[a,i]=el(),[s,l]=el(!1),[d,p]=el(),[g,u]=el(0);Yk(()=>{if(!r){i(void 0),l(!1),p(void 0);return}let y=!1,w=!1;i(void 0),l(!0),p(void 0);async function f(){if(!(y||w)){w=!0;try{let h=await n.getConfig();if(y)return;i(h),p(void 0)}catch(h){if(y)return;let b=h instanceof Error?h:new Error(String(h));p(b),t.current.onError?.(b)}finally{w=!1,y||l(!1)}}}f();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{y=!0,c&&clearInterval(c)}},[n,r,g,o]);let m=qk(()=>u(y=>y+1),[]);return{config:a,loading:s,error:d,refresh:m}}import{useQuery as Xk}from"@tanstack/react-query";import{useCallback as Fh,useEffect as Jk,useMemo as gc,useRef as Uh}from"react";var $k=1,jh=new WeakMap;function e5(e){let t=jh.get(e);if(t!==void 0)return t;let n=$k++;return jh.set(e,n),n}function Wh(e={}){let t=Uh(e);t.current=e;let n=gc(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return en({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ct(r)?r:void 0,a=e.target,i=e.query,s=gc(()=>e5(n),[n]),l=gc(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=Xk({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return n.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),p=Uh(0);Jk(()=>{let w=d.error,f=d.errorUpdatedAt;!w||f===p.current||(p.current=f,t.current.onError?.(w),w instanceof gr&&w.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let g=Fh(()=>{d.refetch()},[d.refetch]),u=Za({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:g}),m=d.data,y=Fh(async(w,f)=>{m&&await u.recover(m,w,f)},[u,m]);return{info:m,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:g,recover:y,recoveryState:u.stateFor(m?.forwarder)}}import{Fragment as a5,jsx as er,jsxs as tr}from"react/jsx-runtime";var t5={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},n5={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function r5(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Gh(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function o5(e){return e==="done"?"rd-stepper-item rd-stepper-item-done":e==="active"?"rd-stepper-item rd-stepper-item-active":"rd-stepper-item rd-stepper-item-pending"}function Hh({orderId:e,order:t,error:n}){let r=!t&&!n;return tr("section",{className:"rd-card",children:[tr("div",{className:"rd-card-header",children:[er("h2",{className:"rd-card-title",children:"4. Status"}),t&&er("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Gh(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),tr("p",{className:"rd-card-hint",children:["Order ",e]}),r&&tr("p",{className:"rd-muted",children:[er("span",{className:"rd-spinner"})," Loading status..."]}),n&&tr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",n.message]}),t&&tr(a5,{children:[er("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>tr("li",{className:o5(o.status),children:[tr("div",{className:"rd-stepper-rail",children:[er("span",{className:"rd-stepper-dot",children:r5(o.status)}),a<t.steps.length-1&&er("span",{className:"rd-stepper-line"})]}),tr("div",{className:"rd-stepper-body",children:[er("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&er("div",{className:"rd-stepper-meta",children:er(hc,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&tr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&er(hc,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&er(hc,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Gh(t.status)&&tr("div",{className:"rd-callout rd-callout-danger",children:["This order did not complete successfully (status: ",t.status,"). If funds were deposited, refer to the refund address on the order for recovery."]}),t.status==="COMPLETED"&&er("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function hc({orderTxs:e,txKey:t}){let n=e[t];return n?tr("a",{href:`${t5[t]}${n}`,target:"_blank",rel:"noreferrer",children:[n5[t],": ",n.slice(0,10),"..."]}):null}function tl(e){return`${e.chainId}:${e.address.toLowerCase()}`}function bc(e,t){return tl(e)===tl(t)}function nl(e,t){if(t)return e.find(n=>bc(n,t))}function ei(e,t,n){return t?{fromTokens:(n==="swap"?[t.swap.from]:t.bridge.from).map(o=>nl(e,o)).filter(o=>!!o),targetToken:nl(e,t.target)}:{fromTokens:[],targetToken:void 0}}function rl(e,t){return e.some(n=>n.chainId===t.chainId&&n.address.toLowerCase()===t.address.toLowerCase())}function _h(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(n=>Number(n)),prerelease:t[2]??null}:null}function i5(e,t){let n=_h(e),r=_h(t);if(!n||!r)return null;let o=Math.max(n.parts.length,r.parts.length);for(let a=0;a<o;a+=1){let i=(n.parts[a]??0)-(r.parts[a]??0);if(i!==0)return i<0?-1:1}return n.prerelease===r.prerelease?0:n.prerelease===null?1:r.prerelease===null||n.prerelease<r.prerelease?-1:1}function Vh(e,t=wo){if(!e)return!0;let n=i5(t,e);return n===null?!0:n>=0}var Qh={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function ti(e,t){return t?.[Qh[e]]??e!=="transfer"}function ni(e,t){return Vh(t?.[Qh[e]])}function ol(e,t,n){return ti(e,t)&&ni(e,n)}var qh={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function Yh(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function Kh(e,t){return e?.items?.find(({id:r,type:o})=>r.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}import*as al from"react";var s5="contracts.json",l5=/^0x[0-9a-fA-F]{40}$/;function Zh(e){return typeof e=="string"&&l5.test(e)?e:void 0}function d5(e,t,n){let r=Zh(n);if(r)return r;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return Zh(typeof a=="string"?a:a?.[o])}function Xh(e,t){let[n,r]=al.useState(void 0);al.useEffect(()=>{let a=!0;return r(void 0),Mr(s5,e).then(i=>{a&&r(i)}),()=>{a=!1}},[e]);let o=d5(n,e,t);return{loading:n===void 0&&!o,address:o}}var Jh=(1n<<256n)-1n,wc=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],il=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function ri(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}import*as sl from"react";function $h(e){let[t,n]=sl.useState(null);return sl.useEffect(()=>{if(!e)return;let r=!0;return ld().then(o=>{r&&n(o)}).catch(()=>{}),()=>{r=!1}},[e]),t}function e0(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function c5(e){if(!e)return"";let[t="0",n=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=n.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function p5(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function t0(e,t){return e0(e.pathType,t)?"Bridging":"Swapping"}function n0(e,t){let n=c5(e.toAmount);if(e0(e.pathType,t)){let r=`arriving on ${p5(e.toToken.chainId)}`;return n?`${n} ${r}`:r}return n?`${n} Swapped`:"Transaction completed"}import{jsx as fn,jsxs as yc}from"react/jsx-runtime";function r0(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m7 3-3 3 3 3M4 6h13a3 3 0 0 1 3 3v1M17 21l3-3-3-3m3 3H7a3 3 0 0 1-3-3v-1",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function o0(e){return yc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("path",{d:"M10 13a4 4 0 0 0 5.66 0l2.83-2.83a4 4 0 0 0-5.66-5.66L11.4 5.94",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M14 11a4 4 0 0 0-5.66 0L5.51 13.8a4 4 0 0 0 5.66 5.66l1.42-1.41",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function a0(e){return yc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),fn("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function i0(e){return yc("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[fn("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),fn("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),fn("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function ll(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function dl(e){return fn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:fn("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}import*as Gt from"react";import*as cl from"react";var u5={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},f5=6e4,s0=new Map,xc=new Map;function m5(e){let t=u5[e],n=s0.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.value);let r=xc.get(t);if(r)return r;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return s0.set(t,{value:l,expiresAt:Date.now()+f5}),l})().finally(()=>{xc.delete(t)});return xc.set(t,o),o}function l0(e){let t=Math.trunc(e/100),n=Math.abs(Math.trunc(e%100));return`${t}.${String(n).padStart(2,"0")}`}function d0(e,t){let[n,r]=cl.useState(void 0);return cl.useEffect(()=>{if(!t)return;let o=!0;return m5(e).then(a=>{o&&r(a)}).catch(()=>{o&&r(null)}),()=>{o=!1}},[t,e]),n}import{jsx as ln,jsxs as An}from"react/jsx-runtime";var Oo="sONEUSD",g5=300,pl=6,c0=[25,50,75,100];function p0(e,t){return t>=100?e:e*BigInt(t)/100n}function u0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function h5(e,t){let n=e.replace(/[^\d.]/g,""),[r="",...o]=n.split(".");return o.length===0?r:`${r}.${o.join("").slice(0,t)}`}function b5(e,t,n,r){let[o,a]=Gt.useState(null),[i,s]=Gt.useState(null),[l,d]=Gt.useState(0),p=Gt.useCallback(()=>d(u=>u+1),[]),{readContract:g}=e;return Gt.useEffect(()=>{if(!r){a(null);return}let u=!1;s(null);let m=r,y={chainId:t.chainId,address:t.address,abi:wc},w={chainId:t.chainId,address:n,abi:il};return Promise.all([g({...y,functionName:"balanceOf",args:[m]}),g({...y,functionName:"allowance",args:[m,n]}),g({...w,functionName:"balanceOf",args:[m]}),g({...w,functionName:"paused",args:[]})]).then(([f,c,h,b])=>{u||a({balance:ri(f),allowance:ri(c),shares:ri(h),paused:b===!0})}).catch(f=>{u||s(u0(f))}),()=>{u=!0}},[g,t.address,t.chainId,n,r,l]),{position:o,error:i,refetch:p}}function w5(e,t,n,r){let[o,a]=Gt.useState(null);return Gt.useEffect(()=>{if(r===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:n,abi:il,functionName:"previewDeposit",args:[r]}).then(l=>{i||a(ri(l))}).catch(()=>{i||a(null)})},g5);return()=>{i=!0,clearTimeout(s)}},[r,e,t.chainId,n]),o}function f0({env:e,walletAddress:t,walletChainId:n,token:r,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:g}){let[u,m]=Gt.useState(""),[y,w]=Gt.useState("idle"),[f,c]=Gt.useState(null),h=Gt.useRef(!0);Gt.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]);let{position:b,error:x,refetch:k}=b5(a,r,o,t),R=d0(e,!0),S=Gt.useMemo(()=>u.trim()?Pr(u,r.decimals):null,[u,r.decimals]),C=S&&"value"in S?S.value:null,N=C!==null&&b!==null&&C>b.balance,E=S&&"error"in S?S.error:N?`Exceeds your ${r.symbol} balance.`:null,A=w5(a.readContract,r,o,C!==null&&!N?C:null),B=y!=="idle",L=C!==null&&b!==null&&b.allowance<C,U=!B&&!i&&!!t&&b!==null&&!b.paused&&C!==null&&!N,M=Gt.useCallback(W=>{if(!b||B)return;let Y=p0(b.balance,W);m(Y>0n?kr(Y,r.decimals,r.decimals):""),c(null)},[B,b,r.decimals]),F=C!==null&&b!==null&&b.balance>0n?c0.find(W=>p0(b.balance,W)===C)??null:null,ne=Gt.useCallback(async()=>{if(!U||!t||C===null||!b)return;let W=t;c(null);try{if(n!==void 0&&n!==r.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${r.chainId} first.`);w("switching"),await a.switchChain(r.chainId)}if(b.allowance<C){w("approving");let O=await a.writeContract({chainId:r.chainId,address:r.address,abi:wc,functionName:"approve",args:[o,Jh]});if(a.waitForReceipt&&(w("confirming-approval"),(await a.waitForReceipt({chainId:r.chainId,hash:O})).status!=="success"))throw new Error("Approval reverted.");if(!h.current)return;k()}w("staking");let Y=await a.writeContract({chainId:r.chainId,address:o,abi:il,functionName:"deposit",args:[C,W]});if(!h.current)return;w("idle"),m(""),p({txHash:Y,chainId:r.chainId,amount:C,amountText:kr(C,r.decimals,pl)})}catch(Y){if(!h.current)return;let O=u0(Y);w("idle"),c(O),g(O)}},[C,U,g,p,a,b,k,r.address,r.chainId,r.decimals,o,t,n]),ee=y==="switching"?"Switching network...":y==="approving"?`Approve ${r.symbol} in your wallet...`:y==="confirming-approval"?"Confirming approval...":y==="staking"?"Confirm in your wallet...":L?`Approve ${r.symbol}`:"Stake",X=f??E??x;return An("div",{className:"gou-chooser-body gou-stake","data-busy":B?"true":"false",children:[ln("button",{type:"button",className:"gou-close",onClick:d,disabled:B,"aria-label":"Close",children:ln(dl,{})}),An("header",{className:"gou-intro gou-stake-header",children:[ln("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:B,"aria-label":"Back",children:ln(ll,{})}),An("h2",{children:["Stake ",r.symbol]})]}),An("form",{className:"gou-stake-form",onSubmit:W=>{W.preventDefault(),ne()},children:[An("div",{className:"gou-stake-row",children:[ln("label",{htmlFor:"gou-stake-amount",children:"Amount"}),An("span",{children:["Balance:"," ",An("strong",{className:"gou-stake-balance",children:[b?kr(b.balance,r.decimals,pl):t?"\u2026":"0"," ",r.symbol]})]})]}),An("div",{className:"gou-stake-input","data-invalid":X?"true":"false",children:[ln("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:u,disabled:B,onChange:W=>{m(h5(W.target.value,r.decimals)),c(null)}}),ln("span",{children:r.symbol})]}),ln("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:c0.map(W=>ln("button",{type:"button","aria-pressed":F===W,disabled:B||!b||b.balance===0n,onClick:()=>M(W),"data-track":"stake_quick_amount","data-track-id":String(W),children:W>=100?"MAX":`${W}%`},W))}),X&&ln("p",{className:"gou-stake-error",role:"alert",children:X}),An("dl",{className:"gou-stake-estimate",children:[R&&An("div",{children:[ln("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),An("dd",{className:"gou-stake-apr",children:[l0(R.aprBps),"%"]})]}),An("div",{children:[ln("dt",{children:"You receive"}),ln("dd",{children:A!==null?`\u2248 ${kr(A,r.decimals,pl)} ${Oo}`:`0 ${Oo}`})]}),An("div",{children:[An("dt",{children:["Your ",Oo]}),ln("dd",{className:"gou-stake-shares",children:b?`${kr(b.shares,r.decimals,pl)} ${Oo}`:t?"\u2026":`0 ${Oo}`})]})]}),b?.paused&&ln("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?ln("button",{type:"submit",className:"gou-stake-submit",disabled:!U,"data-track":"stake_submit",children:ee}):ln("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}ce(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-default, #7e54f4)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
|
|
22
|
+
`);import{Fragment as k5,jsx as Ee,jsxs as tn}from"react/jsx-runtime";var y5=[{id:"swap",label:"Swap",eta:"Instant",Icon:r0},{id:"bridge",label:"Bridge",Icon:o0},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:a0},{id:"stake",label:"Stake",eta:"Earn yield",Icon:i0}],x5=4e3;function m0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function ul(e,t){try{e?.(t)}catch{}}function v5({compactTrigger:e,collapseOnScroll:t,scrollThreshold:n}){let[r,o]=He.useState(!1);return He.useEffect(()=>{if(t===!1){o(!1);return}let a=n??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let p=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},g=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",g,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",g)}},[t,n]),!!(e||r)}function g0({loading:e}){return tn("div",{className:"gou-route-state",role:"status",children:[e&&Ee("span",{className:"gou-spinner","aria-hidden":"true"}),Ee("h3",{children:e?"Preparing route":"Route unavailable"}),Ee("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function h0({walletAddress:e,tokens:t,pairs:n,loading:r=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:g="floating",buttonComponent:u,theme:m="dark",mobileBreakpoint:y=768,drawerDirection:w="bottom",dialogWidth:f="560px",drawerMaxWidth:c,drawerMinWidth:h,style:b,className:x,contentClassName:k,hidden:R=!1,compactTrigger:S,collapseOnScroll:C=!0,scrollThreshold:N=200,waitForTransaction:E,transactionResultDurationMs:A=x5,onRequestConnect:B,onEvent:L}){let[U,M]=He.useState(!1),[F,ne]=He.useState(null),[ee,X]=He.useState(!1),[W,Y]=He.useState(null),[O,G]=He.useState(!1),te=He.useRef(0),_=He.useRef(!1),ae=He.useRef(null),be=He.useRef(!0),Me=v5({compactTrigger:S,collapseOnScroll:C,scrollThreshold:N}),le=He.useMemo(()=>at(s),[s]),ge=Ut("apps.json",le,P=>P?.getOneUsd?.modes),me=Ut("apps.json",le,P=>P?.getOneUsd?.minVersions),ke=Ut("app-launcher-v2.json",le,P=>Kh(P,le))??qh[le],Qe=He.useMemo(()=>ei(t,n,"swap"),[n,t]),pt=He.useMemo(()=>ei(t,n,"bridge"),[n,t]),De=Qe.targetToken??pt.targetToken,Ue=i?.readContract??a?.readContract,Be=i?.writeContract??a?.writeContract,St=i?.switchChain??a?.switchChain,Ht=i?.waitForReceipt??a?.waitForReceipt,ut=He.useMemo(()=>Ue&&Be?{readContract:Ue,writeContract:Be,switchChain:St,waitForReceipt:Ht}:null,[Ue,St,Ht,Be]),{address:Tt,loading:vt}=Xh(le,i?.vaultAddress),_t=!!(ut&&Tt&&De),kt=He.useMemo(()=>y5.filter(({id:P})=>ti(P,ge)),[ge]),it=kt.length>0,It=$h(!R&&it),et=l??De?.symbol??"ONEUSD",qt=p??De?.iconUrl??Qd,st=g==="floating"&&Me,nn=g==="button"&&u?u:"button";He.useEffect(()=>(be.current=!0,()=>{be.current=!1,ae.current&&clearTimeout(ae.current)}),[]),He.useEffect(()=>{G(!Yh(window.location.hostname))},[]),He.useEffect(()=>{it||M(!1)},[it]);let _e=He.useCallback(P=>L?.(P),[L]),ot=He.useCallback(()=>{W||!it||(_e({name:"fab_click",state:st?"icon_only":"expanded"}),M(!0))},[_e,it,W,st]),Ze=He.useCallback(P=>{W||!ol(P,ge,me)||P==="stake"&&!_t||(_e({name:"action_select",action:P}),M(!1),P==="transfer"&&X(!0),ne(P))},[_e,ge,me,_t,W]),Ct=He.useCallback(P=>{_e({name:"connect_click",action:P}),Promise.resolve(B?.()).catch(Ce=>{_e({name:"failure",action:P,message:m0(Ce)})})},[_e,B]),bt=F==="swap"||F==="bridge"?F:null,Ve=bt==="swap"?Qe:pt,Yt=!!(n&&Ve.targetToken&&Ve.fromTokens.length>0),Kt=He.useMemo(()=>{if(!Ve.targetToken)return;let P=Ve.targetToken;return Ce=>{let je=o.getToTokens?.(Ce,t);return je&&!rl(je,P)?[]:[P]}},[o.getToTokens,Ve.targetToken,t]),{onSubmitted:Bt,onSuccess:Zt,onFailed:j,...ue}=o,{onDeposited:he,onError:Ie,...tt}=a??{},zt=He.useCallback((P,Ce,je,J,we)=>{!be.current||te.current!==P||(Y({id:P,phase:Ce,action:je,label:J,txHash:we}),ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{!be.current||te.current!==P||(_.current=!1,Y(null),ae.current=null)},Math.max(0,A)))},[A]),Et=He.useCallback(P=>{if(_.current)return!1;_.current=!0;let{action:Ce,txHash:je,pendingLabel:J,successNote:we,wait:z,onFailed:Ne}=P,q=++te.current;return Y({id:q,phase:"pending",action:Ce,label:J,txHash:je}),M(!1),ne(null),Promise.resolve().then(z).then(()=>{!be.current||te.current!==q||(zt(q,"success",Ce,we,je),_e({name:"success",action:Ce,txHash:je}))}).catch(Re=>{if(!be.current||te.current!==q)return;let Ln=m0(Re);zt(q,"failure",Ce,"Transaction failed",je),Ne?.(Ln),_e({name:"failure",action:Ce,message:Ln})}),!0},[_e,zt]),Cn=He.useCallback((P,Ce)=>{Et({action:Ce,txHash:P.txHash,pendingLabel:t0(P,Ce),successNote:n0(P,Ce),wait:async()=>{await E?.(P)},onFailed:J=>ul(j,{message:J,txHash:P.txHash})})&&ul(Bt,P)},[j,Bt,Et,E]),Rn=He.useCallback(P=>{let Ce=ut?.waitForReceipt;Et({action:"stake",txHash:P.txHash,pendingLabel:"Staking",successNote:`${P.amountText} ${De?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!Ce)return;if((await Ce({chainId:P.chainId,hash:P.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[ut,De?.symbol,Et]);return Ee(xe,{feature:"get_one_usd",children:tn("div",{className:x,"data-theme":m,"data-gou-mode":g,children:[tn(Tr,{theme:m,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:U,onOpenChange:M,children:[!R&&it&&(g==="button"||!W)&&tn(nn,{type:"button",className:"gou-fab",style:b,"data-trigger-mode":g,"data-icon-only":st?"true":"false",onClick:ot,disabled:!!W,"aria-label":`Get ${et}`,"data-track":"fab_click",children:[g==="floating"&&tn("span",{className:"gou-tooltip",children:["Choose how to get ",et]}),Ee("span",{className:"gou-fab-icon-frame",children:Ee("img",{className:"gou-fab-icon",src:qt,alt:""})}),tn("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[tn("span",{children:["Get ",et]}),It!==null&&Ee("span",{className:"gou-fab-apr",children:$i(It)})]})]}),W&&tn("div",{className:"gou-fab gou-fab-status",style:g==="floating"?b:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":W.phase,role:"status","aria-live":"polite","aria-label":W.phase==="pending"?`${W.label} transaction in progress`:W.label,children:[tn("span",{className:"gou-fab-icon-frame",children:[Ee("img",{className:"gou-fab-icon",src:qt,alt:""}),W.phase==="pending"&&Ee("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),Ee("span",{className:"gou-fab-label",children:W.phase==="pending"?tn(k5,{children:[W.label,tn("span",{className:"gou-fab-dots","aria-hidden":"true",children:[Ee("span",{children:"."}),Ee("span",{children:"."}),Ee("span",{children:"."})]})]}):W.label})]}),Ee(Ir,{ariaTitle:`Get ${et}`,className:`gou-shell gou-chooser ${k??""}`,children:tn("div",{className:"gou-chooser-body",children:[Ee("button",{type:"button",className:"gou-close",onClick:()=>M(!1),"aria-label":"Close",children:Ee(dl,{})}),tn("header",{className:"gou-intro",children:[tn("h2",{children:["Get ",et]}),O&&tn("a",{className:"gou-intro-link",href:ke,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[Ee(Hu,{size:16,className:"gou-intro-link-icon"}),Ee("span",{children:"What is ONEUSD?"})]})]}),Ee("ul",{className:"gou-actions",children:kt.map(({id:P,label:Ce,eta:je,Icon:J})=>{let we=P==="swap"?`Swap the ${Qe.fromTokens[0]?.symbol??"ONE"} you already hold`:P==="bridge"?`Bridge USDT to ${et}`:P==="stake"?`Deposit ${et} to receive ${Oo}`:"Deposit from any chain or exchange",z=P==="swap"?n?.swap.feeDelegated:P==="bridge"?n?.bridge.feeDelegated:!1,Ne=ni(P,me),q=P==="stake"&&vt,Re=P==="stake"&&Ne&&!q&&!_t,Ln=Ne&&!Re&&!q;return Ee("li",{children:tn("button",{type:"button",className:"gou-action",onClick:()=>Ze(P),disabled:!Ln,"data-supported":Ln?"true":"false","data-track":"action_select","data-track-id":P,children:[Ee("span",{className:"gou-action-icon",children:Ee(J,{})}),tn("span",{className:"gou-action-copy",children:[tn("span",{className:"gou-action-title",children:[Ee("span",{children:Ce}),z&&Ln&&Ee("span",{className:"gou-badge",children:"Fee Delegated"}),!Ne&&Ee("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),Re&&Ee("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),Ee("span",{className:"gou-action-description",children:Ne?Re?"Staking is not available in this environment yet":je?`${we} \xB7 ${je}`:we:"Update the app to use this option"})]}),Ee(ll,{className:"gou-action-chevron"})]})},P)})})]})})]}),Ee(Tr,{theme:m,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:!!bt,onOpenChange:P=>{P||ne(null)},children:Ee(Ir,{ariaTitle:`${bt==="bridge"?"Bridge":"Swap"} to ${et}`,className:`gou-shell gou-execution ${k??""}`,children:Yt?Ee(ta,{...ue,env:s,variant:"embedded",title:bt==="bridge"?"Bridge":"Swap",feeDelegated:n?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Ct(bt??"swap"),tokens:Ve.fromTokens,initialFromToken:Ve.fromTokens[0],initialToToken:Ve.targetToken,getToTokens:Kt,onClose:()=>ne(null),onBackToWallet:()=>{ne(null),M(!0)},onSubmitted:P=>{Cn(P,bt??"swap")},onSuccess:P=>{ul(Zt,P)},onFailed:P=>{ul(j,P),_e({name:"failure",action:bt??"swap",message:P.message})}},`${bt}:${Ve.fromTokens.map(P=>`${P.chainId}:${P.address}`).join(",")}`):Ee(g0,{loading:r||!n})})}),Ee(Tr,{theme:m,mobileBreakpoint:y,drawerDirection:w,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:h,open:F==="stake",onOpenChange:P=>{P||ne(null)},children:Ee(Ir,{ariaTitle:`Stake ${et}`,className:`gou-shell gou-chooser ${k??""}`,children:F==="stake"&&ut&&Tt&&De?Ee(f0,{env:le,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:De,vaultAddress:Tt,ports:ut,locked:!!W,onRequestConnect:()=>Ct("stake"),onBack:()=>{ne(null),M(!0)},onClose:()=>ne(null),onSubmitted:Rn,onFailed:P=>_e({name:"failure",action:"stake",message:P})}):Ee(g0,{loading:r||!n})})}),ee&&Ee($a,{...tt,environment:tt.environment??s,theme:tt.theme??m,mobileBreakpoint:tt.mobileBreakpoint??y,drawerDirection:tt.drawerDirection??w,dialogWidth:tt.dialogWidth??f,drawerMaxWidth:tt.drawerMaxWidth??c,drawerMinWidth:tt.drawerMinWidth??h,walletAddress:e,open:F==="transfer",onOpenChange:P=>{P||ne(null)},requireWalletConnection:!0,showRecovery:tt.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>Ct("transfer"),onDeposited:P=>{he?.(P),_e({name:"success",action:"transfer",txHash:P})},onError:P=>{Ie?.(P),_e({name:"failure",action:"transfer",message:P.message})},children:Ee($a.Content,{})})]})})}import*as Ar from"react";import*as N0 from"@radix-ui/react-dialog";import{Drawer as L5}from"vaul";import{createContext as C5,useContext as R5}from"react";var fl=C5(null);function oi(){let e=R5(fl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as b0,useEffect as N5,useCallback as S5}from"react";function ml(){let[e,t]=b0([]),[n,r]=b0(!0);N5(()=>{if(typeof window>"u"){r(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>r(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=S5(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:n}}import*as w0 from"@radix-ui/react-dialog";import{Drawer as T5}from"vaul";import{jsx as vc}from"react/jsx-runtime";function y0({asChild:e,children:t}){let{isMobile:n}=oi(),r=n?T5.Trigger:w0.Trigger;return vc(xe,{feature:"wallet_connect",children:vc(r,{asChild:e??t!=null,children:t??vc("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as I5}from"react";import{WALLET_LABELS as E5}from"@nexus-cross/crossx-design-system";import*as Er from"@radix-ui/react-dialog";import{Drawer as gl}from"vaul";import{Fragment as C0,jsx as Ae,jsxs as mn}from"react/jsx-runtime";function x0(e,t){Ye("connect","wallet_selected",{tags:{item_id:e}}),Du(e);let n=t?.();n instanceof Promise&&n.then(()=>Ye("connect","connected"),r=>Ye("connect","connected",{status:"failure",reason:Dn(r)}))}function A5({wallet:e,detected:t,onConnect:n}){let r=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}n()},o=e.icon,a=e.featured===!0;return mn("button",{type:"button",className:ye("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:r,children:[mn("div",{className:"wcm-wallet-item-left",children:[Ae("div",{className:"wcm-wallet-icon",children:Ae(o,{})}),mn("div",{className:"wcm-wallet-name-row",children:[Ae("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&Ae("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?Ae("span",{className:"wcm-installed-label",children:"Installed"}):Ae("span",{className:"wcm-install-btn",children:"Install"}))]})}function M5({social:e,onSignIn:t}){let n=e.icon,r=`Sign in with ${e.name}`;return mn("button",{type:"button",className:"wcm-social-item","data-provider":e.id,"data-track":"social_provider_click","data-track-id":e.id,onClick:t,"aria-label":r,children:[Ae("span",{className:"wcm-social-icon",children:Ae(n,{})}),Ae("span",{className:"wcm-social-name",children:r})]})}function v0(){let{wallets:e,activeWalletIds:t,socialProviders:n,activeSocialIds:r,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=oi(),d=t.filter(u=>{let m=pd(u).visibility;return!m||m==="always"?!0:m==="desktop-only"?!l:m==="mobile-only"?l:!0}),p=r.length>0,g=d.length>0;return mn(C0,{children:[mn("div",{className:"wcm-header",children:[mn("div",{className:"wcm-header-text",children:[Ae("h2",{className:"wcm-title",children:E5.default}),!l&&Ae("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),Ae("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:Ae(Au,{})})]}),mn("div",{className:"wcm-body",children:[p&&mn(C0,{children:[!l&&mn("div",{className:"wcm-section-header",children:[Ae("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),Ae("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),Ae("div",{className:"wcm-social-grid",children:r.map(u=>{let m=Mu(u);return Ae(M5,{social:m,onSignIn:()=>{x0(u,n[u]),s()}},u)})}),g&&mn("div",{className:"wcm-separator",children:[Ae("div",{className:"wcm-separator-line"}),Ae("span",{className:"wcm-separator-text",children:"Other Wallets"}),Ae("div",{className:"wcm-separator-line"})]})]}),g&&Ae("div",{className:"wcm-wallet-list",children:d.map(u=>{let m=pd(u),y=m.rdns?i(m.rdns):!1;return Ae(A5,{wallet:m,detected:y,onConnect:()=>{x0(u,e[u]),s()}},u)})}),mn("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",Ae(k0,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",Ae(k0,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function k0({href:e,track:t,children:n}){return e?Ae("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:n}):Ae("span",{className:"wcm-terms-link",children:n})}function R0({className:e}){let{isMobile:t,theme:n,portalStyle:r,open:o}=oi();return I5(()=>{o&&Ye("connect","opened")},[o]),t?Ae(xe,{feature:"wallet_connect",children:mn(gl.Portal,{children:[Ae(gl.Overlay,{className:"wcm-overlay"}),mn(gl.Content,{className:ye("wcm-drawer-content",e),"data-theme":n,style:r,children:[Ae(gl.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ae("div",{className:"wcm-drawer-handle"}),Ae("div",{className:"wcm-drawer-body",children:Ae(v0,{})})]})]})}):Ae(xe,{feature:"wallet_connect",children:mn(Er.Portal,{children:[Ae(Er.Overlay,{className:"wcm-overlay"}),mn(Er.Content,{className:ye("wcm-dialog-content",e),"data-theme":n,style:r,children:[Ae(Er.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),Ae(Er.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),Ae("div",{className:"wcm-dialog-body",children:Ae(v0,{})})]})]})})}ce(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #f5f3ff);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #7346f3);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-default, #7e54f4);border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-on, #ffffff);white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
|
|
23
23
|
`);ce(`@keyframes wcm-overlay-show{0%{opacity:0}to{opacity:1}}@keyframes wcm-overlay-hide{0%{opacity:1}to{opacity:0}}@keyframes wcm-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes wcm-dialog-hide{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}
|
|
24
|
-
`);import{jsx as
|
|
24
|
+
`);import{jsx as ai}from"react/jsx-runtime";var D5={};function P5({wallets:e,socialProviders:t=D5,termsUrl:n,privacyUrl:r,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:p,open:g,onOpenChange:u,children:m}){let y=Ho(`(max-width: ${a}px)`),[w,f]=Ar.useState(!1),c=g!==void 0,h=c?g:w,b=Ar.useCallback(A=>{c||f(A),u?.(A)},[c,u]),x=Ar.useCallback(()=>b(!1),[b]);or(h,x);let{isDetected:k}=ml(),R=Ar.useMemo(()=>Object.keys(e),[e]),S=Ar.useMemo(()=>Object.keys(t),[t]),C=Ar.useMemo(()=>{let A={};return s&&(A["--wcm-dialog-width"]=s),l&&(A["--wcm-drawer-max-width"]=l),d&&(A["--wcm-drawer-min-width"]=d),{...A,...p}},[s,l,d,p]),N=Ar.useMemo(()=>({theme:o,isMobile:y,open:h,setOpen:b,close:x,wallets:e,activeWalletIds:R,socialProviders:t,activeSocialIds:S,termsUrl:n??Di,privacyUrl:r??Pi,isDetected:k,portalStyle:C}),[o,y,h,b,x,e,R,t,S,n,r,k,C]),E=ai("div",{"data-theme":o,style:C,children:m});return y?ai(fl.Provider,{value:N,children:ai(L5.Root,{direction:i,open:h,onOpenChange:b,noBodyStyles:!0,children:E},"drawer")}):ai(fl.Provider,{value:N,children:ai(N0.Root,{open:h,onOpenChange:b,children:E})})}var S0=Object.assign(P5,{Trigger:y0,Content:R0});import{WALLET_LABELS as j5}from"@nexus-cross/crossx-design-system";import*as I0 from"react";ce(`.cb-button{--cb-bg: var(--ds-accent-primary-default, #7e54f4);--cb-bg-hover: var(--ds-accent-primary-high, #7346f3);--cb-color: var(--ds-accent-primary-on, #ffffff);--cb-border: none;--cb-radius: 8px;--cb-height: 36px;--cb-padding: 8px 16px;--cb-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-font-size: 14px;--cb-font-weight: 500;--cb-line-height: 1.5;--cb-letter-spacing: -.01em;--cb-gap: 8px;--cb-transition: opacity .15s;--cb-loading-opacity: .7;--cb-press-scale: .95;--cb-icon-size: 18px;--cb-spinner-size: 18px;--cb-spinner-thumb: currentColor;--cb-spinner-track: color-mix(in srgb, currentColor 20%, transparent)}.cb-pill{--cb-pill-bg: var(--ds-surface-default, #ffffff);--cb-pill-bg-hover: var(--cb-pill-bg);--cb-pill-color: var(--ds-content-high, rgba(0, 0, 0, .85));--cb-pill-border: 1px solid var(--ds-border-default, rgba(0, 0, 0, .07));--cb-pill-border-hover: 1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));--cb-pill-radius: 8px;--cb-pill-height: 36px;--cb-pill-padding: 1px 13px;--cb-pill-press-scale: .95;--cb-pill-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-pill-font-size: 14px;--cb-pill-font-weight: 500;--cb-pill-line-height: 1.5;--cb-pill-gap: 8px;--cb-pill-icon-size: 18px;--cb-pill-icon-placeholder-bg: var(--ds-surface-medium, #f5f7fa);--cb-pill-address-font: Inter, system-ui, -apple-system, sans-serif;--cb-pill-address-font-size: 14px;--cb-pill-address-letter-spacing: -.01em}
|
|
25
25
|
`);ce(`.cb-button{-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--cb-height);gap:var(--cb-gap);padding:var(--cb-padding);border-radius:var(--cb-radius);border:var(--cb-border);background:var(--cb-bg);color:var(--cb-color);font-family:var(--cb-font-family);font-size:var(--cb-font-size);font-weight:var(--cb-font-weight);line-height:var(--cb-line-height);letter-spacing:var(--cb-letter-spacing);cursor:pointer;transition:var(--cb-transition)}.cb-button:hover:not(:disabled){background:var(--cb-bg-hover)}.cb-button:active:not(:disabled){transform:scale(var(--cb-press-scale))}.cb-button:disabled,.cb-button[aria-busy=true]{cursor:default;opacity:var(--cb-loading-opacity)}.cb-spinner{display:inline-block;width:var(--cb-spinner-size);height:var(--cb-spinner-size);border:2px solid var(--cb-spinner-track);border-top-color:var(--cb-spinner-thumb);border-radius:50%;animation:cb-spin .6s linear infinite;flex-shrink:0}.cb-button-icon{width:var(--cb-icon-size);height:var(--cb-icon-size);flex-shrink:0}.cb-button-label{white-space:nowrap}.cb-pill{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--cb-pill-height);gap:var(--cb-pill-gap);padding:var(--cb-pill-padding);border-radius:var(--cb-pill-radius);border:var(--cb-pill-border);background:var(--cb-pill-bg);color:var(--cb-pill-color);font-family:var(--cb-pill-font-family);font-size:var(--cb-pill-font-size);font-weight:var(--cb-pill-font-weight);line-height:var(--cb-pill-line-height);cursor:pointer}.cb-pill:hover{background:var(--cb-pill-bg-hover)}.cb-pill:active:not(:disabled){transform:scale(var(--cb-pill-press-scale))}.cb-pill-icon{width:var(--cb-pill-icon-size);height:var(--cb-pill-icon-size);border-radius:50%;object-fit:contain;flex-shrink:0;background:transparent}[data-theme=dark] .cb-pill-icon[data-provider=apple]{filter:invert(1)}.cb-pill-icon-placeholder{display:inline-block;width:var(--cb-pill-icon-size);height:var(--cb-pill-icon-size);border-radius:50%;background:var(--cb-pill-icon-placeholder-bg);flex-shrink:0}.cb-pill-address{font-family:var(--cb-pill-address-font);font-size:var(--cb-pill-address-font-size);letter-spacing:var(--cb-pill-address-letter-spacing);white-space:nowrap}@media(max-width:767.98px){.cb-button,.cb-pill{width:36px;min-width:36px;padding:0}.cb-button{height:36px}.cb-button-label,.cb-pill-address{display:none}}@keyframes cb-spin{to{transform:rotate(360deg)}}
|
|
26
|
-
`);var x5='<svg preserveAspectRatio="xMidYMid meet" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',v5='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 28 28" fill="none"><g clip-path="url(#m0)"><path d="M26.07 26.93L20.06 25.07L15.53 27.88L12.37 27.88L7.83 25.07L1.83 26.93L0 20.53L1.83 13.44L0 7.44L1.83 0L11.21 5.81H16.69L26.07 0L27.9 7.44L26.07 13.44L27.9 20.53Z" fill="#FF5C16"/><path d="M7.83 20.54L11.96 23.8L7.83 25.07V20.54Z" fill="#FF5C16"/><path d="M20.06 20.54L15.93 23.8L20.06 25.07L20.06 20.54Z" fill="#FF5C16"/><path d="M11.63 15.14L12.78 22.85L11.19 18.56L5.77 17.17L7.83 15.14H11.63Z" fill="#E34807"/><path d="M16.27 15.14L15.12 22.85L16.71 18.56L22.13 17.17L20.07 15.14H16.27Z" fill="#E34807"/><path d="M0 20.53L1.83 13.44H5.76L5.77 17.17L11.19 18.56L12.78 22.85L11.96 23.79L7.83 20.53H0Z" fill="#FF8D5D"/><path d="M27.9 20.53L26.07 13.44H22.14L22.13 17.17L16.71 18.56L15.12 22.85L15.94 23.79L20.07 20.53H27.9Z" fill="#FF8D5D"/><path d="M16.69 5.81H11.21L10.84 9.81L12.78 22.85H15.12L17.06 9.81L16.69 5.81Z" fill="#FF8D5D"/><path d="M15.53 25.34V27.88H12.37V25.34H15.53Z" fill="#C0C4CD"/><path d="M7.83 25.07L12.37 27.88V25.34L11.96 23.79L7.83 25.07Z" fill="#E7EBF6"/><path d="M20.07 25.07L15.53 27.88V25.34L15.94 23.79L20.07 25.07Z" fill="#E7EBF6"/></g><defs><clipPath id="m0"><rect width="28" height="28" fill="#fff"/></clipPath></defs></svg>',k5='<svg width="100%" height="100%" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z" fill="#F3BA2F"/><path d="M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z" fill="#F3BA2F"/><path d="M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z" fill="#F3BA2F"/><path d="M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z" fill="#F3BA2F"/><path d="M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z" fill="#F3BA2F"/></svg>',C5='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"/><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"/><path fill="#4CAF50" d="M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"/><path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"/></svg>',R5='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>';function ai(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var fl=ai(x5),ml=ai(v5),gl=ai(k5),hl=ai(C5),bl=ai(R5);import{jsx as Mn,jsxs as ii}from"react/jsx-runtime";function x0({isConnecting:e,address:t,provider:n,providerName:r,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:b,label:u="Connect Wallet",connectingLabel:g="Connecting...",disconnectLabel:y,className:w,theme:f="dark",env:c,showBalance:h=!0,showPortfolio:m,drawerDirection:x,modal:k,connectorId:R,style:I,walletInfoStyle:C,sendTransaction:S,getTransactionReceipt:E,estimateGas:M,onReceive:O,onBridge:L,onSend:U,bridgeTokens:A,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:ee,getBridgeApproval:Z,approveBridge:W,submitBridge:q}){let B=w?`cb-button ${w}`:"cb-button",G=w?`cb-pill ${w}`:"cb-pill";if(y0.useEffect(()=>{jo(t)},[t]),e)return ii("button",{type:"button",disabled:!0,className:B,style:I,"aria-busy":"true",children:[Mn("span",{className:"cb-spinner","aria-hidden":"true"}),Mn("span",{className:"cb-button-label",children:g})]});if(t){let te=r??I5(n),_=n?T5[n]:void 0;return Mn(ve,{feature:"connect_button",children:ii(ra,{env:c,theme:f,drawerDirection:x,modal:k,showBalance:h,showPortfolio:m,walletAddress:t,accountName:o,sendAccounts:a,connectorName:r??(n?v0[n]:void 0),connectorId:R,onSelectWallet:d,onCopyAddress:l?(le,me)=>{me&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:C,sendTransaction:S,getTransactionReceipt:E,estimateGas:M,onReceive:O,onBridge:L,onBuy:p,onBuyDisabledMessage:b,onSend:U,bridgeTokens:A,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:ee,getBridgeApproval:Z,approveBridge:W,submitBridge:q,children:[Mn(ra.Trigger,{asChild:!0,children:ii("button",{type:"button",className:G,"data-track":"wallet_pill_open",style:I,"aria-label":`Connected with ${te}: ${w0(t)}`,children:[_?Mn("img",{src:_,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":n}):Mn("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),Mn("span",{className:"cb-pill-address",children:w0(t)})]})}),Mn(ra.Content,{align:"end",sideOffset:8})]})})}return Mn(ve,{feature:"connect_button",children:ii("button",{type:"button",onClick:i,className:B,"data-track":"connect_click",style:I,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[Mn(S5,{}),Mn("span",{className:"cb-button-label",children:u})]})})}function S5(){return ii("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[Mn("path",{d:"M3.75 5.25H14.25C15.0784 5.25 15.75 5.92157 15.75 6.75V13.5C15.75 14.3284 15.0784 15 14.25 15H3.75C2.92157 15 2.25 14.3284 2.25 13.5V4.5C2.25 3.67157 2.92157 3 3.75 3H13.5",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),Mn("path",{d:"M12 9.75H15.75V12.75H12C11.1716 12.75 10.5 12.0784 10.5 11.25C10.5 10.4216 11.1716 9.75 12 9.75Z",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),Mn("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var T5={google:hl,apple:bl,cross:fl,metamask:ml,binance:gl},v0={google:"Google",apple:"Apple",cross:N5.default,metamask:"MetaMask",binance:"Binance Wallet"};function I5(e){return e?v0[e]:"Wallet"}function w0(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as k0 from"react";ce(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
|
|
26
|
+
`);var O5='<svg preserveAspectRatio="xMidYMid meet" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',B5='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 28 28" fill="none"><g clip-path="url(#m0)"><path d="M26.07 26.93L20.06 25.07L15.53 27.88L12.37 27.88L7.83 25.07L1.83 26.93L0 20.53L1.83 13.44L0 7.44L1.83 0L11.21 5.81H16.69L26.07 0L27.9 7.44L26.07 13.44L27.9 20.53Z" fill="#FF5C16"/><path d="M7.83 20.54L11.96 23.8L7.83 25.07V20.54Z" fill="#FF5C16"/><path d="M20.06 20.54L15.93 23.8L20.06 25.07L20.06 20.54Z" fill="#FF5C16"/><path d="M11.63 15.14L12.78 22.85L11.19 18.56L5.77 17.17L7.83 15.14H11.63Z" fill="#E34807"/><path d="M16.27 15.14L15.12 22.85L16.71 18.56L22.13 17.17L20.07 15.14H16.27Z" fill="#E34807"/><path d="M0 20.53L1.83 13.44H5.76L5.77 17.17L11.19 18.56L12.78 22.85L11.96 23.79L7.83 20.53H0Z" fill="#FF8D5D"/><path d="M27.9 20.53L26.07 13.44H22.14L22.13 17.17L16.71 18.56L15.12 22.85L15.94 23.79L20.07 20.53H27.9Z" fill="#FF8D5D"/><path d="M16.69 5.81H11.21L10.84 9.81L12.78 22.85H15.12L17.06 9.81L16.69 5.81Z" fill="#FF8D5D"/><path d="M15.53 25.34V27.88H12.37V25.34H15.53Z" fill="#C0C4CD"/><path d="M7.83 25.07L12.37 27.88V25.34L11.96 23.79L7.83 25.07Z" fill="#E7EBF6"/><path d="M20.07 25.07L15.53 27.88V25.34L15.94 23.79L20.07 25.07Z" fill="#E7EBF6"/></g><defs><clipPath id="m0"><rect width="28" height="28" fill="#fff"/></clipPath></defs></svg>',z5='<svg width="100%" height="100%" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z" fill="#F3BA2F"/><path d="M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z" fill="#F3BA2F"/><path d="M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z" fill="#F3BA2F"/><path d="M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z" fill="#F3BA2F"/><path d="M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z" fill="#F3BA2F"/></svg>',F5='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"/><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"/><path fill="#4CAF50" d="M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"/><path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"/></svg>',U5='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>';function ii(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var hl=ii(O5),bl=ii(B5),wl=ii(z5),yl=ii(F5),xl=ii(U5);import{jsx as Mn,jsxs as si}from"react/jsx-runtime";function E0({isConnecting:e,address:t,provider:n,providerName:r,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:g,label:u="Connect Wallet",connectingLabel:m="Connecting...",disconnectLabel:y,className:w,theme:f="dark",env:c,showBalance:h=!0,showPortfolio:b,drawerDirection:x,modal:k,connectorId:R,style:S,walletInfoStyle:C,sendTransaction:N,getTransactionReceipt:E,estimateGas:A,onReceive:B,onBridge:L,onSend:U,bridgeTokens:M,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:ee,getBridgeApproval:X,approveBridge:W,submitBridge:Y}){let O=w?`cb-button ${w}`:"cb-button",G=w?`cb-pill ${w}`:"cb-pill";if(I0.useEffect(()=>{Wo(t)},[t]),e)return si("button",{type:"button",disabled:!0,className:O,style:S,"aria-busy":"true",children:[Mn("span",{className:"cb-spinner","aria-hidden":"true"}),Mn("span",{className:"cb-button-label",children:m})]});if(t){let te=r??H5(n),_=n?G5[n]:void 0;return Mn(xe,{feature:"connect_button",children:si(oa,{env:c,theme:f,drawerDirection:x,modal:k,showBalance:h,showPortfolio:b,walletAddress:t,accountName:o,sendAccounts:a,connectorName:r??(n?A0[n]:void 0),connectorId:R,onSelectWallet:d,onCopyAddress:l?(ae,be)=>{be&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:C,sendTransaction:N,getTransactionReceipt:E,estimateGas:A,onReceive:B,onBridge:L,onBuy:p,onBuyDisabledMessage:g,onSend:U,bridgeTokens:M,bridgeHistory:F,getBridgeQuote:ne,getBridgeToTokens:ee,getBridgeApproval:X,approveBridge:W,submitBridge:Y,children:[Mn(oa.Trigger,{asChild:!0,children:si("button",{type:"button",className:G,"data-track":"wallet_pill_open",style:S,"aria-label":`Connected with ${te}: ${T0(t)}`,children:[_?Mn("img",{src:_,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":n}):Mn("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),Mn("span",{className:"cb-pill-address",children:T0(t)})]})}),Mn(oa.Content,{align:"end",sideOffset:8})]})})}return Mn(xe,{feature:"connect_button",children:si("button",{type:"button",onClick:i,className:O,"data-track":"connect_click",style:S,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[Mn(W5,{}),Mn("span",{className:"cb-button-label",children:u})]})})}function W5(){return si("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[Mn("path",{d:"M3.75 5.25H14.25C15.0784 5.25 15.75 5.92157 15.75 6.75V13.5C15.75 14.3284 15.0784 15 14.25 15H3.75C2.92157 15 2.25 14.3284 2.25 13.5V4.5C2.25 3.67157 2.92157 3 3.75 3H13.5",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),Mn("path",{d:"M12 9.75H15.75V12.75H12C11.1716 12.75 10.5 12.0784 10.5 11.25C10.5 10.4216 11.1716 9.75 12 9.75Z",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),Mn("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var G5={google:yl,apple:xl,cross:hl,metamask:bl,binance:wl},A0={google:"Google",apple:"Apple",cross:j5.default,metamask:"MetaMask",binance:"Binance Wallet"};function H5(e){return e?A0[e]:"Wallet"}function T0(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as M0 from"react";ce(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
|
|
27
27
|
`);ce(`.sb-button{-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--sb-height);gap:var(--sb-gap);padding:var(--sb-padding);border-radius:var(--sb-radius);border:var(--sb-border-width) solid var(--sb-border);background:var(--sb-bg);backdrop-filter:blur(var(--sb-blur));-webkit-backdrop-filter:blur(var(--sb-blur));color:var(--sb-color);font-family:Inter,system-ui,-apple-system,sans-serif;font-weight:var(--sb-font-weight);font-size:var(--sb-font-size);line-height:var(--sb-line-height);letter-spacing:var(--sb-letter-spacing);cursor:pointer;transition:border-color var(--sb-hover-duration) var(--sb-easing),color var(--sb-hover-duration) var(--sb-easing)}@media(hover:hover){.sb-button:hover:not(:disabled){border-color:var(--sb-border-hover);color:var(--sb-color-hover)}.sb-button:hover:not(:disabled) .sb-button-icon{transform:rotate(var(--sb-icon-hover-rotation))}}.sb-button:active:not(:disabled){transform:scale(var(--sb-press-scale))}.sb-button:disabled,.sb-button[aria-busy=true]{cursor:default;opacity:var(--sb-disabled-opacity)}.sb-button-icon{width:var(--sb-icon-size);height:var(--sb-icon-size);flex-shrink:0;color:inherit;transition:transform var(--sb-icon-duration) var(--sb-easing),color var(--sb-icon-duration) var(--sb-easing)}.sb-spinner{display:inline-block;width:var(--sb-spinner-size);height:var(--sb-spinner-size);border:2px solid var(--sb-spinner-track);border-top-color:var(--sb-spinner-thumb);border-radius:50%;animation:sb-spin .6s linear infinite;flex-shrink:0}.sb-label{white-space:nowrap}@keyframes sb-spin{to{transform:rotate(360deg)}}
|
|
28
|
-
`);import{jsx as
|
|
28
|
+
`);import{jsx as ua,jsxs as V5}from"react/jsx-runtime";var L0="https://www.onechain.nexus/skills";function D0({label:e="Skills",href:t,onClick:n,className:r,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:p="button"}){let[g,u]=M0.useState(!1),m=at(),y=Ut("apps.json",m,k=>Wn(k?.skills,m)),w=t??y,f=async k=>{if(w&&!n){d?window.open(w,"_blank","noopener,noreferrer"):window.location.href=w;return}if(n)try{u(!0),await n()}finally{u(!1)}},c=i||s||g,h=s||g,b=h?l:e,x=r?`sb-button ${r}`:"sb-button";return ua(xe,{feature:"skills",children:V5("button",{type:p,onClick:f,disabled:c,className:x,"data-theme":a,"data-track":"click",style:o,"aria-busy":h,children:[h?ua("span",{className:"sb-spinner","aria-hidden":"true"}):ua(_5,{}),ua("span",{className:"sb-label",children:b})]})})}function _5(){return ua("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:ua("path",{d:"M15.5879 3.95142C16.0211 2.78097 17.6761 2.78099 18.1094 3.95142L19.6221 8.03833C20.6569 10.8348 22.8618 13.0396 25.6582 14.0745L29.7451 15.5872C30.9157 16.0204 30.9157 17.6754 29.7451 18.1086L25.6582 19.6213C22.8618 20.6562 20.657 22.861 19.6221 25.6575L18.1094 29.7444C17.6762 30.9149 16.0211 30.9149 15.5879 29.7444L14.0752 25.6575C13.0403 22.861 10.8355 20.6562 8.03906 19.6213L3.95215 18.1086C2.78172 17.6754 2.7817 16.0204 3.95215 15.5872L8.03906 14.0745C10.8355 13.0396 13.0403 10.8348 14.0752 8.03833L15.5879 3.95142Z",stroke:"currentColor",strokeWidth:"1.93556"})})}Bl({mode:"dapp-ui"});export{xl as APPLE_ICON,Jc as AppLauncher,cp as AppLauncherContent,rp as AppLauncherTrigger,wl as BINANCE_ICON,ta as BridgeFlow,Fo as CHAINS_CONFIG_FILE,Ai as CONNECTOR_REGISTRY,hl as CROSSX_ICON,E0 as ConnectButton,Ql as ConnectorId,L0 as DEFAULT_SKILLS_HREF,sa as DEFAULT_TRUSTED_FACTORIES,Ci as DappUiErrorBoundary,yl as GOOGLE_ICON,h0 as GetOneUsd,bl as METAMASK_ICON,Ms as OnePopBody,vg as OnePopGetTokenTrigger,hs as PORTFOLIO_SECTIONS,gr as RelayApiError,$a as RelayDeposit,Eh as RelayHistory,Bh as RelayRecovery,ud as SOCIAL_REGISTRY,Yi as SendFlow,D0 as SkillsButton,Hh as StatusTracker,sd as TOKEN_STATS_QUERY_KEY,id as USER_BALANCE_QUERY_KEY,sf as WALLET_PORTFOLIO_QUERY_PREFIX,Ta as WALLET_REGISTRY,S0 as WalletConnectModal,oa as WalletInfo,Mg as WalletInfoPage,Qf as WalletPortfolio,$o as WalletPortfolioBody,Bl as announceAppLauncherUsage,ki as captureDappUiException,en as createRelayClient,nl as findGetOneUsdToken,wb as getChainDisplay,vi as getDappUiSentryScope,tl as getOneUsdTokenKey,ya as initDappUiSentry,Xr as invalidateWalletPortfolioQueries,ol as isGetOneUsdActionEnabled,ni as isGetOneUsdActionSupported,ti as isGetOneUsdActionVisible,rl as isGetOneUsdTargetAvailable,bc as matchesGetOneUsdToken,Dn as normalizeFailureReason,at as resolveEnvironment,ei as resolveGetOneUsdRoute,Ol as selectChainMeta,Wo as setDappUiAnalyticsUser,Ri as trackDappUiEvent,Ye as trackDappUiFunnel,bo as useChainDisplay,yb as useChainsConfig,Ii as useGlobalMenu,zh as useRelayConfig,po as useRelayOrders,Wh as useRelayRecovery,Yr as useTokenBalance,Kr as useTokenStats,ml as useWalletDetect};
|
|
29
29
|
//# sourceMappingURL=index.js.map
|